fix an overflow in vc1 intra overlap filter

Originally committed as revision 16845 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Loren Merritt 2009-01-28 11:12:19 +00:00
parent b69201a82c
commit 5a446bc88e
1 changed files with 4 additions and 4 deletions

View File

@ -45,8 +45,8 @@ static void vc1_v_overlap_c(uint8_t* src, int stride)
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 @@ static void vc1_h_overlap_c(uint8_t* src, int stride)
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;