[FFmpeg-cvslog] avcodec/vp8dsp: zeroise input coefficient array after use in vp7 idct functions

Clément Bœsch u at pkh.me
Mon Feb 17 07:32:40 CET 2014


On Mon, Feb 17, 2014 at 03:39:15AM +0100, Peter Ross wrote:
> ffmpeg | branch: master | Peter Ross <pross at xvid.org> | Sun Feb 16 15:32:59 2014 +1100| [a707d18a48898342046014f41a030b82bf1be0b3] | committer: Michael Niedermayer
> 
> avcodec/vp8dsp: zeroise input coefficient array after use in vp7 idct functions
> 
> Signed-off-by: Peter Ross <pross at xvid.org>
> Reviewed-by: "Ronald S. Bultje" <rsbultje at gmail.com>
> Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> 
> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a707d18a48898342046014f41a030b82bf1be0b3
> ---
> 
>  libavcodec/vp8dsp.c |    8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/libavcodec/vp8dsp.c b/libavcodec/vp8dsp.c
> index 6c8aea7..bb6b1f5 100644
> --- a/libavcodec/vp8dsp.c
> +++ b/libavcodec/vp8dsp.c
> @@ -50,6 +50,10 @@ 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;
>          block[0][i][0] = (a1 + d1 + 0x20000) >> 18;
>          block[3][i][0] = (a1 - d1 + 0x20000) >> 18;
>          block[1][i][0] = (b1 + c1 + 0x20000) >> 18;
> @@ -80,6 +84,10 @@ 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;
>          tmp[i*4+0] = (a1 + d1) >> 14;
>          tmp[i*4+3] = (a1 - d1) >> 14;
>          tmp[i*4+1] = (b1 + c1) >> 14;

Can't use AV_ZERO64?

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-cvslog/attachments/20140217/6f94838f/attachment.asc>


More information about the ffmpeg-cvslog mailing list