]> git.sesse.net Git - ffmpeg/commitdiff
swscale: fix another yuv range conversion overflow in 16bit scaling.
authorRonald S. Bultje <rsbultje@gmail.com>
Thu, 30 Jun 2011 14:05:52 +0000 (07:05 -0700)
committerRonald S. Bultje <rsbultje@gmail.com>
Thu, 30 Jun 2011 14:05:52 +0000 (07:05 -0700)
libswscale/swscale.c

index 1e4994ca6b10ab8cc29094274da125624041ffac..ef8fc39c48dfba4bac9f45f7e336b69a7ab43f6a 100644 (file)
@@ -2001,7 +2001,7 @@ static void lumRangeToJpeg16_c(int16_t *_dst, int width)
     int i;
     int32_t *dst = (int32_t *) _dst;
     for (i = 0; i < width; i++)
-        dst[i] = (FFMIN(dst[i],30189<<4)*19077 - (39057361<<4))>>14;
+        dst[i] = (FFMIN(dst[i],30189<<4)*4769 - (39057361<<2))>>12;
 }
 static void lumRangeFromJpeg16_c(int16_t *_dst, int width)
 {