AnsweredAssumed Answered

About color conversion in i.MX6DQ.

Question asked by Keita Nagashima on Jan 18, 2016
Latest reply on Jan 19, 2016 by Keita Nagashima

Dear All,

 

Hello. I have a question about color conversion in IPU of i.MX6DQ.

 

Refer to attached code (ipu_ic.c) from Platform SDK.

The coefficient which converts a color space from YCbCr to RGB is defined below.

 

//L347 in ipu_ic.c

unsigned int ycbcr2rgb_coeff[4][3] = {

        {0x95, 0x0, 0xCC},

        {0x95, 0x1CE, 0x198},

        {0x95, 0xFF, 0x0},

        {0x1E42, 0x10A, 0x1DD6},    // A0, A1, A2

 

[Q1]

When converting the inputted YCbCr data from CSI to RGB, Is the IC (IPU) converting a color space using this coefficient (=ycbcr2rgb_coeff[4][3] )?

 

[Q2]

What kind of YCbCr format (BT.656? BT.601? BT.709?) above defined ycbcr2rgb_coeff[4][3]?

 

[Q3]

We couldn't understand relation ycbcr2rgb_coeff[4][3] and the comment (L354~L358).

//L354~L358 comments

/*

       R = (1.164 * alpha *  (Y - 16)) + (1.596 * (Cr - 128));

       G = (1.164 * alpha * (Y - 16)) - (0.392 * (Cb - 128)) - (0.813 * (Cr - 128));

       B = (1.164 * alpha * (Y - 16)) + (2.017 * (Cb - 128);

*/

 

Is source code and comment the following relation?

0x95 : 1.164

0xCC : 1.596

0x1CE : -0.392

 

We consider that the comment doesn't correspond to source code.

 

Best Regards,

Keita

Outcomes