topic Are csc coefficients in the imx6 IPU v3 properly computed? in i.MX Processors
https://community.nxp.com/t5/i-MX-Processors/Are-csc-coefficients-in-the-imx6-IPU-v3-properly-computed/m-p/271253#M29313
<HTML><HEAD></HEAD><BODY><P style="text-align: left;">This is Android code 13.4.1.04 for imx6 quad core chip. Funtion is _init_csc in kernel_imx/drivers/imx/ipu3. Matrix rgb2rgb_coeff has diagonal elements 0x80 and according to the code scale value is 2. Comparing with the chip spec chapter 37.4.5.6. IC Task Parameter Memory, scale value 2 means that 1/2 is applied to the coefficient. Therefore the final value is (0x80 * 1/2) / 256 = 0x40 / 256 = 0.25. I think that the intent was to apply 1 so the coefficient should be 0x80 but scaling should b be 0 which means that 2 is applied: (0x80 * 2) / 256 = 0x100 / 256 = 1.</P><P style="text-align: left;"></P><P style="text-align: left;">Am I missing something?</P><P style="text-align: left;"></P><P style="text-align: left;">Also, I'm not clear why are A1 and A2 in rgb2ycbcr_coeff coded as 0x0200 to get 128 as per the formula given in the code. Can you please explain me how we get 128 fro 0x200?</P><P style="text-align: left;"></P><P style="text-align: left;">Thanks.</P></BODY></HTML>Mon, 03 Jun 2013 19:51:37 GMTDraganOstojic2013-06-03T19:51:37ZAre csc coefficients in the imx6 IPU v3 properly computed?
https://community.nxp.com/t5/i-MX-Processors/Are-csc-coefficients-in-the-imx6-IPU-v3-properly-computed/m-p/271253#M29313
<HTML><HEAD></HEAD><BODY><P style="text-align: left;">This is Android code 13.4.1.04 for imx6 quad core chip. Funtion is _init_csc in kernel_imx/drivers/imx/ipu3. Matrix rgb2rgb_coeff has diagonal elements 0x80 and according to the code scale value is 2. Comparing with the chip spec chapter 37.4.5.6. IC Task Parameter Memory, scale value 2 means that 1/2 is applied to the coefficient. Therefore the final value is (0x80 * 1/2) / 256 = 0x40 / 256 = 0.25. I think that the intent was to apply 1 so the coefficient should be 0x80 but scaling should b be 0 which means that 2 is applied: (0x80 * 2) / 256 = 0x100 / 256 = 1.</P><P style="text-align: left;"></P><P style="text-align: left;">Am I missing something?</P><P style="text-align: left;"></P><P style="text-align: left;">Also, I'm not clear why are A1 and A2 in rgb2ycbcr_coeff coded as 0x0200 to get 128 as per the formula given in the code. Can you please explain me how we get 128 fro 0x200?</P><P style="text-align: left;"></P><P style="text-align: left;">Thanks.</P></BODY></HTML>Mon, 03 Jun 2013 19:51:37 GMThttps://community.nxp.com/t5/i-MX-Processors/Are-csc-coefficients-in-the-imx6-IPU-v3-properly-computed/m-p/271253#M29313DraganOstojic2013-06-03T19:51:37ZRe: Are csc coefficients in the imx6 IPU v3 properly computed?
https://community.nxp.com/t5/i-MX-Processors/Are-csc-coefficients-in-the-imx6-IPU-v3-properly-computed/m-p/271254#M29314
<HTML><HEAD></HEAD><BODY><P>Hi Dragan,</P><P></P><P></P><P>Question 1:</P><P>The scale for rgb2rgb is = 2, it means that the coeficient will be = 2 (as in manual formula: coeficient=2^(scale-1))</P><P></P><P></P><P>The final value will be: 0x80*2/256 = 1</P><P></P><P></P><P>Question 2:</P><P></P><P></P><P>The offset format is: sxxxxxxxxxx.xx -> where s = signal and x = binary number</P><P>on code, A = 0x0200 = 0000 0010 0000 0000</P><P>applying the format: 000s00 (10000000).00</P><P>The number between () will be 0x80 = 128d</P><P></P><P></P><P>Rgds</P><P>Rogerio</P><P><SPAN class="mce_paste_marker"></SPAN></P></BODY></HTML>Thu, 18 Jul 2013 17:22:43 GMThttps://community.nxp.com/t5/i-MX-Processors/Are-csc-coefficients-in-the-imx6-IPU-v3-properly-computed/m-p/271254#M29314rogerio_silva2013-07-18T17:22:43ZRe: Are csc coefficients in the imx6 IPU v3 properly computed?
https://community.nxp.com/t5/i-MX-Processors/Are-csc-coefficients-in-the-imx6-IPU-v3-properly-computed/m-p/271255#M29315
<HTML><HEAD></HEAD><BODY><P>Thanks Rogerio, now it's clear. Much appreciated for the answer.</P></BODY></HTML>Mon, 22 Jul 2013 17:23:33 GMThttps://community.nxp.com/t5/i-MX-Processors/Are-csc-coefficients-in-the-imx6-IPU-v3-properly-computed/m-p/271255#M29315DraganOstojic2013-07-22T17:23:33Z