Commit 6eb20857 authored by kostya's avatar kostya

Fix overflows in bicubic interpolation.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@5868 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 56e9073c
...@@ -314,7 +314,7 @@ static void vc1_inv_trans_4x4_c(DCTELEM block[64], int n) ...@@ -314,7 +314,7 @@ static void vc1_inv_trans_4x4_c(DCTELEM block[64], int n)
/** Filter used to interpolate fractional pel values /** Filter used to interpolate fractional pel values
*/ */
static always_inline uint8_t vc1_mspel_filter(const uint8_t *src, int stride, int mode, int r) static always_inline int vc1_mspel_filter(const uint8_t *src, int stride, int mode, int r)
{ {
switch(mode){ switch(mode){
case 0: //no shift case 0: //no shift
...@@ -343,7 +343,7 @@ static void vc1_mspel_mc(uint8_t *dst, const uint8_t *src, int stride, int mode, ...@@ -343,7 +343,7 @@ static void vc1_mspel_mc(uint8_t *dst, const uint8_t *src, int stride, int mode,
tptr = tmp; tptr = tmp;
for(j = 0; j < 11; j++) { for(j = 0; j < 11; j++) {
for(i = 0; i < 8; i++) for(i = 0; i < 8; i++)
tptr[i] = vc1_mspel_filter(src + i, 1, m, r); tptr[i] = clip_uint8(vc1_mspel_filter(src + i, 1, m, r));
src += stride; src += stride;
tptr += 8; tptr += 8;
} }
...@@ -353,7 +353,7 @@ static void vc1_mspel_mc(uint8_t *dst, const uint8_t *src, int stride, int mode, ...@@ -353,7 +353,7 @@ static void vc1_mspel_mc(uint8_t *dst, const uint8_t *src, int stride, int mode,
tptr = tmp + 8; tptr = tmp + 8;
for(j = 0; j < 8; j++) { for(j = 0; j < 8; j++) {
for(i = 0; i < 8; i++) for(i = 0; i < 8; i++)
dst[i] = vc1_mspel_filter(tptr + i, 8, m, r); dst[i] = clip_uint8(vc1_mspel_filter(tptr + i, 8, m, r));
dst += stride; dst += stride;
tptr += 8; tptr += 8;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment