diff options
author | Liu Ying <Ying.Liu@freescale.com> | 2013-08-28 11:07:52 +0800 |
---|---|---|
committer | Liu Ying <Ying.Liu@freescale.com> | 2013-08-28 22:29:51 +0800 |
commit | 7234e97450710108ab2289259cef78f3126223d6 (patch) | |
tree | 09bd3a554f89e330436c4bbc4e43ebf17f83cc25 | |
parent | 675284a72cfd15868f39fdc99039b043cf14d760 (diff) |
ENGR00277003 IPUv3: Update IC RGB2YUV CSC matrix parameters
This patch updates IPUv3 IC RGB to YUV color space conversion
matrix's parameters to align with the default VIV GPU CSC
implementation so that we may pass relevant Android CTS test
cases.
Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
(cherry picked from commit 17b6dbef8eea2051a6c3819f3690c21948bd0e93)
-rw-r--r-- | drivers/mxc/ipu3/ipu_ic.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/mxc/ipu3/ipu_ic.c b/drivers/mxc/ipu3/ipu_ic.c index 0f528d078b32..4a9c24dc1115 100644 --- a/drivers/mxc/ipu3/ipu_ic.c +++ b/drivers/mxc/ipu3/ipu_ic.c @@ -698,15 +698,16 @@ int _ipu_ic_idma_init(struct ipu_soc *ipu, int dma_chan, static void _init_csc(struct ipu_soc *ipu, uint8_t ic_task, ipu_color_space_t in_format, ipu_color_space_t out_format, int csc_index) { - -/* Y = R * .299 + G * .587 + B * .114; - U = R * -.169 + G * -.332 + B * .500 + 128.; - V = R * .500 + G * -.419 + B * -.0813 + 128.;*/ + /* + * Y = 0.257 * R + 0.504 * G + 0.098 * B + 16; + * U = -0.148 * R - 0.291 * G + 0.439 * B + 128; + * V = 0.439 * R - 0.368 * G - 0.071 * B + 128; + */ static const uint32_t rgb2ycbcr_coeff[4][3] = { - {0x004D, 0x0096, 0x001D}, - {0x01D5, 0x01AB, 0x0080}, - {0x0080, 0x0195, 0x01EB}, - {0x0000, 0x0200, 0x0200}, /* A0, A1, A2 */ + {0x0042, 0x0081, 0x0019}, + {0x01DA, 0x01B6, 0x0070}, + {0x0070, 0x01A2, 0x01EE}, + {0x0040, 0x0200, 0x0200}, /* A0, A1, A2 */ }; /* transparent RGB->RGB matrix for combining |