diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2008-09-11 01:49:35 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2008-09-11 01:49:35 +0000 |
commit | 7b5d7b9e85bc96ba77315d730f9351bc23dfdb71 (patch) | |
tree | 2bbf9e642ba4956be070c7c26f92b8d2d3d4ea24 /libswscale/swscale.c | |
parent | febcbd65fa3d00cfdfbfabd1c2a8fb8e659e1ca1 (diff) | |
download | ffmpeg-7b5d7b9e85bc96ba77315d730f9351bc23dfdb71.tar.gz |
Set rgb2yuv constants more accurately, makes no real difference though.
Originally committed as revision 27577 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
Diffstat (limited to 'libswscale/swscale.c')
-rw-r--r-- | libswscale/swscale.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/libswscale/swscale.c b/libswscale/swscale.c index b55d4d21bb..646885d5bd 100644 --- a/libswscale/swscale.c +++ b/libswscale/swscale.c @@ -153,15 +153,15 @@ unsigned swscale_version(void) ) #define RGB2YUV_SHIFT 15 -#define BY ((int)( 0.098*(1<<RGB2YUV_SHIFT)+0.5)) -#define BV ((int)(-0.071*(1<<RGB2YUV_SHIFT)+0.5)) -#define BU ((int)( 0.439*(1<<RGB2YUV_SHIFT)+0.5)) -#define GY ((int)( 0.504*(1<<RGB2YUV_SHIFT)+0.5)) -#define GV ((int)(-0.368*(1<<RGB2YUV_SHIFT)+0.5)) -#define GU ((int)(-0.291*(1<<RGB2YUV_SHIFT)+0.5)) -#define RY ((int)( 0.257*(1<<RGB2YUV_SHIFT)+0.5)) -#define RV ((int)( 0.439*(1<<RGB2YUV_SHIFT)+0.5)) -#define RU ((int)(-0.148*(1<<RGB2YUV_SHIFT)+0.5)) +#define BY ( (int)(0.114*219/255*(1<<RGB2YUV_SHIFT)+0.5)) +#define BV (-(int)(0.081*224/255*(1<<RGB2YUV_SHIFT)+0.5)) +#define BU ( (int)(0.500*224/255*(1<<RGB2YUV_SHIFT)+0.5)) +#define GY ( (int)(0.587*219/255*(1<<RGB2YUV_SHIFT)+0.5)) +#define GV (-(int)(0.419*224/255*(1<<RGB2YUV_SHIFT)+0.5)) +#define GU (-(int)(0.331*224/255*(1<<RGB2YUV_SHIFT)+0.5)) +#define RY ( (int)(0.299*219/255*(1<<RGB2YUV_SHIFT)+0.5)) +#define RV ( (int)(0.500*224/255*(1<<RGB2YUV_SHIFT)+0.5)) +#define RU (-(int)(0.169*224/255*(1<<RGB2YUV_SHIFT)+0.5)) extern const int32_t Inverse_Table_6_9[8][4]; |