]> 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)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 1 Jul 2011 01:07:37 +0000 (03:07 +0200)
(cherry picked from commit 81cc7d0bd1eab0aa782ff8dd49e087025a42cdee)

libswscale/swscale.c

index 644f84858cd498d0bafc7edc731339f76c60d157..06ce8ff41789e68651b047b34405a0a342258e6d 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)
 {