diff options
author | Janne Grunau <janne-libav@jannau.net> | 2013-03-20 12:57:46 +0100 |
---|---|---|
committer | Janne Grunau <janne-libav@jannau.net> | 2013-03-20 13:12:10 +0100 |
commit | a157c7f2b8ac05188a116dbfc2fec401c1d4957a (patch) | |
tree | 0ef847cf3f3e95e7b04237dfd3905c39878f40a3 /libavcodec/h264.c | |
parent | a5e6080a8d85122ba67bf6e5d1592b82a0397b5b (diff) | |
download | ffmpeg-a157c7f2b8ac05188a116dbfc2fec401c1d4957a.tar.gz |
h264: fix bit depth changes with frame threading
AVCodecContext.bits_per_raw_sample is updated from the previous thread
in the generic update function before the codec specific update_thread
function is called. The check for reinitialization of dsp functions uses
bits_per_raw_sample. When called from update_thread_context it will be
already at the current value and the dsp functions aren't updated if
only the bit depth changes.
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r-- | libavcodec/h264.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 98ace67425..fe4acd69e6 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -1573,6 +1573,11 @@ static int decode_update_thread_context(AVCodecContext *dst, h->sps.chroma_format_idc != h1->sps.chroma_format_idc || h->sps.colorspace != h1->sps.colorspace)) { + /* set bits_per_raw_sample to the previous value. the check for changed + * bit depth in h264_set_parameter_from_sps() uses it and sets it to + * the current value */ + h->avctx->bits_per_raw_sample = h->sps.bit_depth_luma; + av_freep(&h->bipred_scratchpad); h->width = h1->width; |