This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM68A: Values for DISPC Video Port CSC from RGB to YUV

Part Number: AM68A
Other Parts Discussed in Thread: AM68

Tool/software:

Hello experts,

can anyone provide me the correct coefficient values for the DISPC Video Port Color Space Conversion from RGB to YUV?

Thanks in advance,

Frank

  • Your question has been initially assigned to Gang

  • Hi Frank,

    can anyone provide me the correct coefficient values for the DISPC Video Port Color Space Conversion from RGB to YUV?

    AM68 TRM only mentioned the support for "YUV to RGB conversion".

    Those coefficients are provided in driver source code -- mcu_plus_sdk_j722s_10_01_00_22/source/drivers/dss/v0/hw_include/V3/csl_dssVideoPipe.c

    /* Coefficients for BT601-5 YUV to RGB conversion */
    static const CSL_DssCscCoeff gVidCscLimitedRangeCoeff = {
        CSL_DSS_CSC_RANGE_LIMITED,
         298,   409,     0,
         298,  -208,  -100,
         298,     0,   517,
        -256, -2048, -2048,
           0,     0,     0
    };
    
    static const CSL_DssCscCoeff gVidCscFullRangeCoeff = {
        CSL_DSS_CSC_RANGE_FULL,
        256,   351,     0,
        256,  -179,   -86,
        256,     0,   443,
          0, -2048, -2048,
          0,     0,     0
    };
    

  • Hi Gang,

    there is the chapter 12.6.3.11.3 "DISPC VP Color Space Conversion - RGB to YUV" in my TRM for the AM68/J721S2 (SPRUJ28D, page 1661). So I have to assume there is support for RGB to YUV conversion!

    Frank

  • Hi Frank,

    Thanks for the clarification!

    Please refer to the code below from "mcu_plus_sdk_j722s_10_01_00_22/source/drivers/dss/v0/hw_include/V3/csl_dssVide
    oPort.c"

    /* Coefficients for RGB to BT-601 YUV conversion */
    static const CSL_DssCscCoeff gVpCscLimtedRangeCoeff = {
        CSL_DSS_CSC_RANGE_LIMITED,
          77,  150,  29,
         -44,  -87, 131,
         131, -110, -21,
           0,    0,   0,
         256, 2048, 2048
    };
    
    static const CSL_DssCscCoeff gVpCscFullRangeCoeff = {
        CSL_DSS_CSC_RANGE_FULL,
          66,  129,  25,
         -38,  -74, 112,
         112,  -94, -18,
           0,    0,   0,
           0, 2048, 2048
    };