summaryrefslogtreecommitdiff
path: root/libavcodec/h264idct.c
diff options
context:
space:
mode:
authorMåns Rullgård <mans@mansr.com>2010-06-22 23:12:48 +0000
committerMåns Rullgård <mans@mansr.com>2010-06-22 23:12:48 +0000
commit8fbd4f51a8bf8ae56303d1c7a18bf357b606df61 (patch)
tree610d916dda31bc04e497492cceaabf7248813257 /libavcodec/h264idct.c
parent25d3445811bd75df1de726973de00d1ebfaf9ed4 (diff)
Improve some uses of ff_cropTbl with constant offset
Originally committed as revision 23728 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/h264idct.c')
-rw-r--r--libavcodec/h264idct.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/h264idct.c b/libavcodec/h264idct.c
index da5c6a5182..31e072f984 100644
--- a/libavcodec/h264idct.c
+++ b/libavcodec/h264idct.c
@@ -143,24 +143,24 @@ void ff_h264_idct8_add_c(uint8_t *dst, DCTELEM *block, int stride){
// assumes all AC coefs are 0
void ff_h264_idct_dc_add_c(uint8_t *dst, DCTELEM *block, int stride){
int i, j;
- uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;
int dc = (block[0] + 32) >> 6;
+ uint8_t *cm = ff_cropTbl + MAX_NEG_CROP + dc;
for( j = 0; j < 4; j++ )
{
for( i = 0; i < 4; i++ )
- dst[i] = cm[ dst[i] + dc ];
+ dst[i] = cm[ dst[i] ];
dst += stride;
}
}
void ff_h264_idct8_dc_add_c(uint8_t *dst, DCTELEM *block, int stride){
int i, j;
- uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;
int dc = (block[0] + 32) >> 6;
+ uint8_t *cm = ff_cropTbl + MAX_NEG_CROP + dc;
for( j = 0; j < 8; j++ )
{
for( i = 0; i < 8; i++ )
- dst[i] = cm[ dst[i] + dc ];
+ dst[i] = cm[ dst[i] ];
dst += stride;
}
}