summaryrefslogtreecommitdiff
path: root/drivers/mxc/ipu3/ipu_ic.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mxc/ipu3/ipu_ic.c')
-rw-r--r--drivers/mxc/ipu3/ipu_ic.c17
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