diff options
author | Anton Khirnov <anton@khirnov.net> | 2015-01-17 22:28:46 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2015-03-21 11:27:12 +0100 |
commit | d231e84b06a9964c840cff4e228509f706165fb6 (patch) | |
tree | 0bd1fa87587cf1601faf4ef9648110442e586a1d /libavcodec/h264_mb.c | |
parent | d40ae0e595fe90b5583b9269f8bb000402bde5a6 (diff) | |
download | ffmpeg-streaming-d231e84b06a9964c840cff4e228509f706165fb6.zip ffmpeg-streaming-d231e84b06a9964c840cff4e228509f706165fb6.tar.gz |
h264: move the quantizers into the per-slice context
Diffstat (limited to 'libavcodec/h264_mb.c')
-rw-r--r-- | libavcodec/h264_mb.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/libavcodec/h264_mb.c b/libavcodec/h264_mb.c index b2899b6..86beb19 100644 --- a/libavcodec/h264_mb.c +++ b/libavcodec/h264_mb.c @@ -605,6 +605,7 @@ static av_always_inline void dctcoef_set(int16_t *mb, int high_bit_depth, } static av_always_inline void hl_decode_mb_predict_luma(H264Context *h, + H264SliceContext *sl, int mb_type, int is_h264, int simple, int transform_bypass, @@ -616,7 +617,7 @@ static av_always_inline void hl_decode_mb_predict_luma(H264Context *h, void (*idct_add)(uint8_t *dst, int16_t *block, int stride); void (*idct_dc_add)(uint8_t *dst, int16_t *block, int stride); int i; - int qscale = p == 0 ? h->qscale : h->chroma_qp[p - 1]; + int qscale = p == 0 ? sl->qscale : sl->chroma_qp[p - 1]; block_offset += 16 * p; if (IS_INTRA4x4(mb_type)) { if (IS_8x8DCT(mb_type)) { @@ -720,7 +721,8 @@ static av_always_inline void hl_decode_mb_predict_luma(H264Context *h, } } -static av_always_inline void hl_decode_mb_idct_luma(H264Context *h, int mb_type, +static av_always_inline void hl_decode_mb_idct_luma(H264Context *h, H264SliceContext *sl, + int mb_type, int is_h264, int simple, int transform_bypass, int pixel_shift, @@ -784,7 +786,7 @@ static av_always_inline void hl_decode_mb_idct_luma(H264Context *h, int mb_type, // FIXME benchmark weird rule, & below uint8_t *const ptr = dest_y + block_offset[i]; ff_svq3_add_idct_c(ptr, h->mb + i * 16 + p * 256, linesize, - h->qscale, IS_INTRA(mb_type) ? 1 : 0); + sl->qscale, IS_INTRA(mb_type) ? 1 : 0); } } } @@ -807,7 +809,7 @@ void ff_h264_hl_decode_mb(H264Context *h, H264SliceContext *sl) const int mb_xy = h->mb_xy; const int mb_type = h->cur_pic.mb_type[mb_xy]; int is_complex = CONFIG_SMALL || h->is_complex || - IS_INTRA_PCM(mb_type) || h->qscale == 0; + IS_INTRA_PCM(mb_type) || sl->qscale == 0; if (CHROMA444(h)) { if (is_complex || h->pixel_shift) |