Commit 7fe6a37e authored by michael's avatar michael

Prevent overflows during mpeg->jpeg yuv.


git-svn-id: file:///var/local/repositories/mplayer/trunk/libswscale@27552 b3059339-0415-0410-9bf9-f77b7e298cf2
parent 8d5c58b3
......@@ -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
}
}
}
......
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