diff options
author | michael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2008-09-09 03:35:07 +0000 |
---|---|---|
committer | michael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2008-09-09 03:35:07 +0000 |
commit | ca1afd1bb80a5b91345d345a6d4ddec6c144efe9 (patch) | |
tree | 74f970c1a5627c4f00cac4d58870f39ac1592227 /libswscale | |
parent | a4b5780c2f2f69b429d0023eebc9300d27b04627 (diff) | |
download | mpv-ca1afd1bb80a5b91345d345a6d4ddec6c144efe9.tar.bz2 mpv-ca1afd1bb80a5b91345d345a6d4ddec6c144efe9.tar.xz |
Prevent overflows during mpeg->jpeg yuv.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27552 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libswscale')
-rw-r--r-- | libswscale/swscale_template.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libswscale/swscale_template.c b/libswscale/swscale_template.c index ef964ff8ef..be7009c7ce 100644 --- a/libswscale/swscale_template.c +++ b/libswscale/swscale_template.c @@ -2721,7 +2721,7 @@ FUNNY_Y_CODE dst[i]= (dst[i]*14071 + 33561947)>>14; }else{ 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{ 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 } } } |