Browse Source

Prevent overflows during mpeg->jpeg yuv.

Originally committed as revision 27552 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
tags/v0.5
Michael Niedermayer 16 years ago
parent
commit
aa13b0fc55
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      libswscale/swscale_template.c

+ 3
- 3
libswscale/swscale_template.c View File

@@ -2721,7 +2721,7 @@ FUNNY_Y_CODE
dst[i]= (dst[i]*14071 + 33561947)>>14; dst[i]= (dst[i]*14071 + 33561947)>>14;
}else{ }else{
for (i=0; i<dstWidth; i++) for (i=0; i<dstWidth; i++)
dst[i]= (dst[i]*19077 - 39057361)>>14;
dst[i]= (FFMIN(dst[i],30189)*19077 - 39057361)>>14;
} }
} }
} }
@@ -2986,8 +2986,8 @@ FUNNY_UV_CODE
} }
}else{ }else{
for (i=0; i<dstWidth; i++){ for (i=0; i<dstWidth; i++){
dst[i ]= (dst[i ]*4663 - 9289992)>>12; //-264
dst[i+VOFW]= (dst[i+VOFW]*4663 - 9289992)>>12; //-264
dst[i ]= (FFMIN(dst[i ],30775)*4663 - 9289992)>>12; //-264
dst[i+VOFW]= (FFMIN(dst[i+VOFW],30775)*4663 - 9289992)>>12; //-264
} }
} }
} }


Loading…
Cancel
Save