diff options
author | Ronald S. Bultje <rsbultje@gmail.com> | 2013-02-18 21:03:02 -0800 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-02-19 16:25:50 +0100 |
commit | 1acd7d594c15aa491729c837ad3519d3469e620a (patch) | |
tree | 4a515aa31c7483d8a2fdfa1d4399c9a9d2b29cae /libavcodec/h264.c | |
parent | a1f1ca96b42698002920467c0aab9e636893088a (diff) | |
download | ffmpeg-1acd7d594c15aa491729c837ad3519d3469e620a.tar.gz |
h264: integrate clear_blocks calls with IDCT.
The non-intra-pcm branch in hl_decode_mb (simple, 8bpp) goes from 700
to 672 cycles, and the complete loop of decode_mb_cabac and hl_decode_mb
(in the decode_slice loop) goes from 1759 to 1733 cycles on the clip
tested (cathedral), i.e. almost 30 cycles per mb faster.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r-- | libavcodec/h264.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c index fe12846f4f..ec709760e4 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -2191,7 +2191,7 @@ static av_always_inline void hl_decode_mb_predict_luma(H264Context *h, if (IS_8x8DCT(mb_type)) { if (transform_bypass) { idct_dc_add = - idct_add = h->h264dsp.h264_add_pixels8; + idct_add = h->h264dsp.h264_add_pixels8_clear; } else { idct_dc_add = h->h264dsp.h264_idct8_dc_add; idct_add = h->h264dsp.h264_idct8_add; @@ -2216,7 +2216,7 @@ static av_always_inline void hl_decode_mb_predict_luma(H264Context *h, } else { if (transform_bypass) { idct_dc_add = - idct_add = h->h264dsp.h264_add_pixels4; + idct_add = h->h264dsp.h264_add_pixels4_clear; } else { idct_dc_add = h->h264dsp.h264_idct_dc_add; idct_add = h->h264dsp.h264_idct_add; @@ -2313,9 +2313,9 @@ static av_always_inline void hl_decode_mb_idct_luma(H264Context *h, int mb_type, for (i = 0; i < 16; i++) if (h->non_zero_count_cache[scan8[i + p * 16]] || dctcoef_get(h->mb, pixel_shift, i * 16 + p * 256)) - h->h264dsp.h264_add_pixels4(dest_y + block_offset[i], - h->mb + (i * 16 + p * 256 << pixel_shift), - linesize); + h->h264dsp.h264_add_pixels4_clear(dest_y + block_offset[i], + h->mb + (i * 16 + p * 256 << pixel_shift), + linesize); } } else { h->h264dsp.h264_idct_add16intra(dest_y, block_offset, @@ -2326,8 +2326,8 @@ static av_always_inline void hl_decode_mb_idct_luma(H264Context *h, int mb_type, } else if (h->cbp & 15) { if (transform_bypass) { const int di = IS_8x8DCT(mb_type) ? 4 : 1; - idct_add = IS_8x8DCT(mb_type) ? h->h264dsp.h264_add_pixels8 - : h->h264dsp.h264_add_pixels4; + idct_add = IS_8x8DCT(mb_type) ? h->h264dsp.h264_add_pixels8_clear + : h->h264dsp.h264_add_pixels4_clear; for (i = 0; i < 16; i += di) if (h->non_zero_count_cache[scan8[i + p * 16]]) idct_add(dest_y + block_offset[i], |