Skip to content
Snippets Groups Projects
Commit c9ccbc73 authored by Anton Khirnov's avatar Anton Khirnov
Browse files

h264: update the current bit depth/chroma type in init_slice_header()

With frame threading, it is currently only updated in the context where
the change occurs, but not in any other contexts.
parent 29dcde2b
No related branches found
No related tags found
No related merge requests found
...@@ -1014,6 +1014,8 @@ static int h264_slice_header_init(H264Context *h, int reinit) ...@@ -1014,6 +1014,8 @@ static int h264_slice_header_init(H264Context *h, int reinit)
h->avctx->bits_per_raw_sample = h->sps.bit_depth_luma; h->avctx->bits_per_raw_sample = h->sps.bit_depth_luma;
h->pixel_shift = h->sps.bit_depth_luma > 8; h->pixel_shift = h->sps.bit_depth_luma > 8;
h->chroma_format_idc = h->sps.chroma_format_idc;
h->bit_depth_luma = h->sps.bit_depth_luma;
ff_h264dsp_init(&h->h264dsp, h->sps.bit_depth_luma, ff_h264dsp_init(&h->h264dsp, h->sps.bit_depth_luma,
h->sps.chroma_format_idc); h->sps.chroma_format_idc);
...@@ -1158,11 +1160,8 @@ int ff_h264_decode_slice_header(H264Context *h, H264SliceContext *sl) ...@@ -1158,11 +1160,8 @@ int ff_h264_decode_slice_header(H264Context *h, H264SliceContext *sl)
h->sps = *h->sps_buffers[h->pps.sps_id]; h->sps = *h->sps_buffers[h->pps.sps_id];
if (h->bit_depth_luma != h->sps.bit_depth_luma || if (h->bit_depth_luma != h->sps.bit_depth_luma ||
h->chroma_format_idc != h->sps.chroma_format_idc) { h->chroma_format_idc != h->sps.chroma_format_idc)
h->bit_depth_luma = h->sps.bit_depth_luma;
h->chroma_format_idc = h->sps.chroma_format_idc;
needs_reinit = 1; needs_reinit = 1;
}
if (h->flags & CODEC_FLAG_LOW_DELAY || if (h->flags & CODEC_FLAG_LOW_DELAY ||
(h->sps.bitstream_restriction_flag && (h->sps.bitstream_restriction_flag &&
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment