swscale: More accurate rounding in YSCALE_YUV_2_PACKEDX_FULL_C()
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 1 Jun 2011 02:15:13 +0000 (04:15 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 1 Jun 2011 03:01:22 +0000 (05:01 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libswscale/swscale.c

index e7e81d3..6bf7fcf 100644 (file)
@@ -557,9 +557,9 @@ static inline void yuv2nv12XinC(const int16_t *lumFilter, const int16_t **lumSrc
 #define YSCALE_YUV_2_PACKEDX_FULL_C(rnd,alpha) \
     for (i=0; i<dstW; i++) {\
         int j;\
-        int Y = 0;\
-        int U = -128<<19;\
-        int V = -128<<19;\
+        int Y = 1<<9;\
+        int U = (1<<9)-(128<<19);\
+        int V = (1<<9)-(128<<19);\
         int av_unused A;\
         int R,G,B;\
         \