Dear All,
Hello.
Refer to DP_CSC_A8_SYNC [10 bit] in IPUx_DP_SCS_SYNC_0 register.
[Q1]
Could you tell me the plus/minus sign, integer part and decimal part in this bits?
9~10 --> plus/minus sign? Please explain the detail.
7~8 --> integer part?
0~6 --> decimal part?
The register detail description wasn't found.
[Q2]
Which is the right calculation round-up or round-off for 4th decimal place?
[Q3] (Confirming)
In case of DP_CSC_A8_SYNC = 0x3EB(0b1111101011), what is the result value at decimal value?
Best Regards,
Keita
Solved! Go to Solution.
For better understanding, refer to the following thread:
Changing IPU Color Space Conversion parameters
and follow the code, referenced there. Also, refer to the whole Section 37.4.9.5 "Color Space Conversion unit - CSC" of the i.MX6DQ Reference Manual Rev.3 document. The descriptions, given there, are correct. All coefficient numbers are represented using two's complement format.
Artur
A1. The Section 37.4.9.5 "Color Space Conversion unit - CSC" of the i.MX6DQ Reference Manual Rev.3 document says that each color space conversion A coefficient is "10-bit signed number with 8 fractional digits". So, the upper bit (bit 9) is a sign, next bit (bit 8) is the integer part and the bits 7 to 0 are the fractional part.
A2. The right decimal rounding rule is round to nearest.
A3. According to the Point 1 above, the coefficient value of 0x3EB is equal to -1.235 decimal number.
Have a great day,
Artur
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Dear Artur,
Thank you for your quick reply.
Please check below question again.
>A1. The Section 37.4.9.5 "Color Space Conversion unit - CSC" of the i.MX6DQ Reference Manual Rev.3 document
> says that each color space conversion A coefficient is "10-bit signed number with 8 fractional digits".
> So, the upper bit (bit 9) is a sign, next bit (bit 8) is the integer part and the bits 7 to 0 are the fractional part.
I got the below information from Qiang Li. (https://community.freescale.com/docs/DOC-94019#start=100 )
For example,
0x96 --> 2.343
0x80 --> 2.000
These looks integer part (bit 8 & 9).
How do you think in this case?
=======
You can find it in drivers/mxc/ipu3/ipu_disp.c
/* Y = R * 1.200 + G * 2.343 + B * .453 + 0.250;
U = R * -.672 + G * -1.328 + B * 2.000 + 512.250.;
V = R * 2.000 + G * -1.672 + B * -.328 + 512.250.;*/
static const int rgb2ycbcr_coeff[5][3] = {
{0x4D, 0x96, 0x1D},
{-0x2B, -0x55, 0x80},
{0x80, -0x6B, -0x15},
{0x0000, 0x0200, 0x0200}, /* B0, B1, B2 */
{0x2, 0x2, 0x2}, /* S0, S1, S2 */
};
=======
Best Regards,
Keita
Looks strange. Let me investigate the case.
Artur
Hi Artur,
Please follow-up the this question.
I can't close it.
Best Regards,
Keita
For better understanding, refer to the following thread:
Changing IPU Color Space Conversion parameters
and follow the code, referenced there. Also, refer to the whole Section 37.4.9.5 "Color Space Conversion unit - CSC" of the i.MX6DQ Reference Manual Rev.3 document. The descriptions, given there, are correct. All coefficient numbers are represented using two's complement format.
Artur
Hi Artur,
Did you find the right description?
Best Regards,
Keita
Hi Artur,
Do you have any update?
When can you answer to me?
Best Regards,
Keita
Hi Artur,
Do you have any update?
Best Regards,
Keita
Hi Artur,
This register looks below.
bit 9--> plus/minus sign
bit [6~8] --> integer part
bit [0~5] --> decimal part
So, the description of "10-bit signed number with 8 fractional digits" looks typo.
Please check again.
Best Regards,
Keita