summaryrefslogtreecommitdiffstats
path: root/libswscale
diff options
context:
space:
mode:
authormichael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-09-09 18:01:25 +0000
committermichael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-09-09 18:01:25 +0000
commitc3c284f8d2c0d343fb4363f401b36391e99ad8b2 (patch)
tree380e40260859012fa5727216dbfbedd269ed09d2 /libswscale
parent877f8300fb79d7a83805eca1a98500c4ec3e94e9 (diff)
downloadmpv-c3c284f8d2c0d343fb4363f401b36391e99ad8b2.tar.bz2
mpv-c3c284f8d2c0d343fb4363f401b36391e99ad8b2.tar.xz
Add table of rgb->yuv conversion coefficients.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27558 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libswscale')
-rw-r--r--libswscale/swscale.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/libswscale/swscale.c b/libswscale/swscale.c
index 0b9bb1e63f..44069cd408 100644
--- a/libswscale/swscale.c
+++ b/libswscale/swscale.c
@@ -165,6 +165,17 @@ unsigned swscale_version(void)
extern const int32_t Inverse_Table_6_9[8][4];
+static const double rgb2yuv_table[8][9]={
+ {0.7152, 0.0722, 0.2126, -0.386, 0.5, -0.115, -0.454, -0.046, 0.5},
+ {0.7152, 0.0722, 0.2126, -0.386, 0.5, -0.115, -0.454, -0.046, 0.5},
+ {0.587 , 0.114 , 0.299 , -0.331, 0.5, -0.169, -0.419, -0.081, 0.5},
+ {0.587 , 0.114 , 0.299 , -0.331, 0.5, -0.169, -0.419, -0.081, 0.5},
+ {0.59 , 0.11 , 0.30 , -0.331, 0.5, -0.169, -0.421, -0.079, 0.5}, //FCC
+ {0.587 , 0.114 , 0.299 , -0.331, 0.5, -0.169, -0.419, -0.081, 0.5},
+ {0.587 , 0.114 , 0.299 , -0.331, 0.5, -0.169, -0.419, -0.081, 0.5}, //SMPTE 170M
+ {0.701 , 0.087 , 0.212 , -0.384, 0.5 -0.116, -0.445, -0.055, 0.5}, //SMPTE 240M
+};
+
/*
NOTES
Special versions: fast Y 1:1 scaling (no interpolation in y direction)