summaryrefslogtreecommitdiffstats
path: root/libswscale
diff options
context:
space:
mode:
authormichael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-09-11 01:49:35 +0000
committermichael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-09-11 01:49:35 +0000
commit4abaf837d95ec7c4b4667424f427994d5879cb08 (patch)
treebb55ed10f92838e3e3b1edb01da1b3c69b16a404 /libswscale
parentfd6cd1c95cb22124e0c812e9af44a62525891693 (diff)
downloadmpv-4abaf837d95ec7c4b4667424f427994d5879cb08.tar.bz2
mpv-4abaf837d95ec7c4b4667424f427994d5879cb08.tar.xz
Set rgb2yuv constants more accurately, makes no real difference though.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27577 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libswscale')
-rw-r--r--libswscale/swscale.c18
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];