Mercurial > libavcodec.hg
changeset 8686:674acd1e7e18 libavcodec
fix an overflow in vc1 intra overlap filter
author | lorenm |
---|---|
date | Wed, 28 Jan 2009 11:12:19 +0000 |
parents | ed386fa1399e |
children | 04200b454f3f |
files | vc1dsp.c |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/vc1dsp.c Wed Jan 28 07:16:52 2009 +0000 +++ b/vc1dsp.c Wed Jan 28 11:12:19 2009 +0000 @@ -45,8 +45,8 @@ d2 = (a - d + b - c + 4 - rnd) >> 3; src[-2*stride] = a - d1; - src[-stride] = b - d2; - src[0] = c + d2; + src[-stride] = av_clip_uint8(b - d2); + src[0] = av_clip_uint8(c + d2); src[stride] = d + d1; src++; rnd = !rnd; @@ -70,8 +70,8 @@ d2 = (a - d + b - c + 4 - rnd) >> 3; src[-2] = a - d1; - src[-1] = b - d2; - src[0] = c + d2; + src[-1] = av_clip_uint8(b - d2); + src[0] = av_clip_uint8(c + d2); src[1] = d + d1; src += stride; rnd = !rnd;