Mercurial > libavcodec.hg
diff h264idct.c @ 11926:43e39953f4f9 libavcodec
Improve some uses of ff_cropTbl with constant offset
author | mru |
---|---|
date | Tue, 22 Jun 2010 23:12:48 +0000 |
parents | 7dd2a45249a9 |
children |
line wrap: on
line diff
--- a/h264idct.c Tue Jun 22 21:12:42 2010 +0000 +++ b/h264idct.c Tue Jun 22 23:12:48 2010 +0000 @@ -143,24 +143,24 @@ // 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; } }