Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2013-02-19 09:03:02 +0400
committerMartin Storsjö <martin@martin.st>2013-04-10 12:03:06 +0400
commit62844c3fd66940c7747e9b2bb7804e265319f43f (patch)
treeb0e5a05644457aa5d7598d1fefa1a41f83550753 /libavcodec/h264.c
parente8cafd2773bc56455c8816593cbd9368f2d69a80 (diff)
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: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r--libavcodec/h264.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index bfe9940738..7d7f37601a 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -2257,7 +2257,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;
@@ -2282,7 +2282,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;
@@ -2379,9 +2379,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,
@@ -2392,8 +2392,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],