From a92e68d5a87dacda88a2510997988974d82c48a8 Mon Sep 17 00:00:00 2001 From: michael Date: Wed, 10 Sep 2008 16:39:56 +0000 Subject: Change RGB2YUV_SHIFT from 16 to 15 to make it able to work with 16bit signed constants (like SIMD might use). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27568 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libswscale/swscale.c | 2 +- libswscale/swscale_template.c | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) (limited to 'libswscale') diff --git a/libswscale/swscale.c b/libswscale/swscale.c index 72ba001d50..52d235960b 100644 --- a/libswscale/swscale.c +++ b/libswscale/swscale.c @@ -152,7 +152,7 @@ unsigned swscale_version(void) || isBGR(x) \ ) -#define RGB2YUV_SHIFT 16 +#define RGB2YUV_SHIFT 15 #define BY ((int)( 0.098*(1<>=shg;\ \ - dstU[i]= (((RU)>>1)*r + ((GU)>>1)*g + ((BU)>>1)*b + (257<<((S)-1)))>>(S);\ - dstV[i]= (((RV)>>1)*r + ((GV)>>1)*g + ((BV)>>1)*b + (257<<((S)-1)))>>(S);\ -/* dstU[i]= ((RU)*r + (GU)*g + (BU)*b + (257<<(S)))>>((S)+1);\ - dstV[i]= ((RV)*r + (GV)*g + (BV)*b + (257<<(S)))>>((S)+1);*/\ + dstU[i]= ((RU)*r + (GU)*g + (BU)*b + (257<<(S)))>>((S)+1);\ + dstV[i]= ((RV)*r + (GV)*g + (BV)*b + (257<<(S)))>>((S)+1);\ }\ } -- cgit v1.2.3