[FFmpeg-cvslog] r28916 - trunk/libswscale/swscale_template.c
kostya
subversion
Mon Mar 9 18:25:44 CET 2009
Author: kostya
Date: Mon Mar 9 18:25:43 2009
New Revision: 28916
Log:
Mask all unused bits for packed pixel format instead of green and alpha mask only.
That fixes the case when converting 15-bit RGB/BGR to YUV and high bit is set
for input value(s).
Modified:
trunk/libswscale/swscale_template.c
Modified: trunk/libswscale/swscale_template.c
==============================================================================
--- trunk/libswscale/swscale_template.c Mon Mar 9 16:01:53 2009 (r28915)
+++ trunk/libswscale/swscale_template.c Mon Mar 9 18:25:43 2009 (r28916)
@@ -1663,7 +1663,7 @@ static inline void RENAME(name ## _half)
{\
int pix0= ((type*)src)[2*i+0];\
int pix1= ((type*)src)[2*i+1];\
- int g= (pix0&(maskg|maska))+(pix1&(maskg|maska));\
+ int g= (pix0&~(maskr|maskb))+(pix1&~(maskr|maskb));\
int b= ((pix0+pix1-g)&(maskb|(2*maskb)))>>shb;\
int r= ((pix0+pix1-g)&(maskr|(2*maskr)))>>shr;\
g&= maskg|(2*maskg);\
More information about the ffmpeg-cvslog
mailing list