diff options
author | Peter Ross <pross@xvid.org> | 2014-02-25 21:02:56 +1100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-02-25 12:49:35 +0100 |
commit | bef6b27f106f9ef67fff1f8fc2ceb5dc3deb51f2 (patch) | |
tree | 8e0f89d646851961c0eef68cab6b97634fa736be /libavcodec/vp8dsp.c | |
parent | a8ad7e47fb59d386e8672e38305cbe94138dabd1 (diff) | |
download | ffmpeg-bef6b27f106f9ef67fff1f8fc2ceb5dc3deb51f2.tar.gz |
avcodec/vp8dsp: use AV_ZERO64 to clear idct coefficient rows
Signed-off-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/vp8dsp.c')
-rw-r--r-- | libavcodec/vp8dsp.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/libavcodec/vp8dsp.c b/libavcodec/vp8dsp.c index 8759943cdc..00b4118b57 100644 --- a/libavcodec/vp8dsp.c +++ b/libavcodec/vp8dsp.c @@ -68,10 +68,7 @@ static void vp7_luma_dc_wht_c(int16_t block[4][4][16], int16_t dc[16]) b1 = (tmp[i + 0] - tmp[i + 8]) * 23170; c1 = tmp[i + 4] * 12540 - tmp[i + 12] * 30274; d1 = tmp[i + 4] * 30274 + tmp[i + 12] * 12540; - dc[i*4+0] = 0; - dc[i*4+1] = 0; - dc[i*4+2] = 0; - dc[i*4+3] = 0; + AV_ZERO64(dc + i*4); block[0][i][0] = (a1 + d1 + 0x20000) >> 18; block[3][i][0] = (a1 - d1 + 0x20000) >> 18; block[1][i][0] = (b1 + c1 + 0x20000) >> 18; @@ -102,10 +99,7 @@ static void vp7_idct_add_c(uint8_t *dst, int16_t block[16], ptrdiff_t stride) b1 = (block[i*4+0] - block[i*4+2]) * 23170; c1 = block[i*4+1] * 12540 - block[i*4+3] * 30274; d1 = block[i*4+1] * 30274 + block[i*4+3] * 12540; - block[i*4+0] = 0; - block[i*4+1] = 0; - block[i*4+2] = 0; - block[i*4+3] = 0; + AV_ZERO64(block + i*4); tmp[i*4+0] = (a1 + d1) >> 14; tmp[i*4+3] = (a1 - d1) >> 14; tmp[i*4+1] = (b1 + c1) >> 14; @@ -164,10 +158,7 @@ static void vp8_luma_dc_wht_c(int16_t block[4][4][16], int16_t dc[16]) t1 = dc[i*4+1] + dc[i*4+2]; t2 = dc[i*4+1] - dc[i*4+2]; t3 = dc[i*4+0] - dc[i*4+3] + 3; // rounding - dc[i*4+0] = 0; - dc[i*4+1] = 0; - dc[i*4+2] = 0; - dc[i*4+3] = 0; + AV_ZERO64(dc + i*4); block[i][0][0] = (t0 + t1) >> 3; block[i][1][0] = (t3 + t2) >> 3; |