[FFmpeg-cvslog] r32051 - trunk/libswscale/swscale.c
ramiro
subversion
Mon Sep 6 04:02:53 CEST 2010
Author: ramiro
Date: Mon Sep 6 04:02:53 2010
New Revision: 32051
Log:
swscale: fix internal rgb->yv12 chroma conversion used by the main scaler path
The shift must be applied before the masking.
Modified:
trunk/libswscale/swscale.c
Modified: trunk/libswscale/swscale.c
==============================================================================
--- trunk/libswscale/swscale.c Sun Sep 5 11:41:24 2010 (r32050)
+++ trunk/libswscale/swscale.c Mon Sep 6 04:02:53 2010 (r32051)
@@ -1069,9 +1069,9 @@ static inline void name(uint8_t *dstU, u
{\
int i;\
for (i=0; i<width; i++) {\
- int b= (((const type*)src)[i]&maskb)>>(shb+shp);\
- int g= (((const type*)src)[i]&maskg)>>(shg+shp);\
- int r= (((const type*)src)[i]&maskr)>>(shr+shp);\
+ int b= ((((const type*)src)[i]>>shp)&maskb)>>shb;\
+ int g= ((((const type*)src)[i]>>shp)&maskg)>>shg;\
+ int r= ((((const type*)src)[i]>>shp)&maskr)>>shr;\
\
dstU[i]= ((RU)*r + (GU)*g + (BU)*b + (257<<((S)-1)))>>(S);\
dstV[i]= ((RV)*r + (GV)*g + (BV)*b + (257<<((S)-1)))>>(S);\
More information about the ffmpeg-cvslog
mailing list