SPRUJB3C March 2024 – November 2025 AM67 , AM67A , TDA4AEN-Q1 , TDA4VEN-Q1
The Color Space Conversion (CSC) unit converts the video-encoded pixel values from YUV444 format into ARGB48 format (12-bit value per component A, R, G, and B, with A fixed at 0xFFF).
In case of YUV420 or YUV422 formats, a chrominance resampling to YUV444 is performed before converting the YUV into RGB values (see Section 12.9.1.4.1.8.4, DISPC VID Chrominance Resampling). The YUV422/YUV420 to YUV444 chrominance resampling is a pre-processing to the color space conversion.
Figure 12-540 and Figure 12-541 show the 3 × 3 11-bit coefficients used to convert from YUV444 into ARGB48. The value of A component is fixed at 0xFFF in the output. The coefficients are set according to the standard used to encode the pixel data in YUV color space. Table 12-477 summarizes the coefficients with their respective register bit fields.
| Coefficients | Register Fields |
|---|---|
| RY | DSS_VID_CSC_COEF0[10-0] C00 |
| RCr | DSS_VID_CSC_COEF0[26-16] C01 |
| RCb | DSS_VID_CSC_COEF1[10-0] C02 |
| GY | DSS_VID_CSC_COEF1[26-16] C10 |
| GCr | DSS_VID_CSC_COEF2[10-0] C11 |
| GCb | DSS_VID_CSC_COEF2[26-16] C12 |
| BY | DSS_VID_CSC_COEF3[10-0] C20 |
| BCr | DSS_VID_CSC_COEF3[26-16] C21 |
| BCb | DSS_VID_CSC_COEF4[10-0] C22 |
| Y offset | DSS_VID_CSC_COEF5[15-3] PREOFFSET1 |
| Cr offset | DSS_VID_CSC_COEF5[31-19] PREOFFSET2 |
| Cb offset | DSS_VID_CSC_COEF6[15-3] PREOFFSET3 |
If the active range for the luminance samples (Y) is [256:3760] and for the chrominance samples (Cb and Cr) is [256:3840], the following equation in Figure 12-540 (based on 11-bit coefficients) must be used to convert the YUV to RGB. To clip the values of R, G, and B output components to the full output data range [0:4095], set the DSS_VID_ATTRIBUTES[11] FULLRANGE bit to 0x1.
Figure 12-540 DISPC VID CSC YCbCr to RGB Equation (Limited Video Range), 12-Bit
OutputsIn Figure 12-540, the offset values (-256, -2048, -2048) are also programmed via corresponding register bit-fields shown in Table 12-477, DISPC VID CSC - YUV to RGB Register Settings).
If the active range for the luminance samples (Y) and chrominance samples (Cb and Cr) is [0:4095], the following equation in Figure 12-541 (based on 11-bit coefficients) must be used to convert the YUV to RGB. To clip the values of R, G, and B output components to the full output data range [0:4095], set the DSS_VID_ATTRIBUTES[11] FULLRANGE bit to 0x1.
Figure 12-541 DISPC VID CSC YCbCr to RGB Equation (Full Video Range), 12-Bit
OutputsIn Figure 12-541, the offset values (0, -2048, -2048) are also programmed via corresponding register bit-fields shown in Table 12-477, DISPC VID CSC - YUV to RGB Register Settings).
In case of YUV420-NV21 data, the coefficients for Cr and Cb must be swapped in order to correctly support YUV420-NV21 format.
The scaling and CSC clipping is set by the same bit, DSS_VID_ATTRIBUTES[11] FULLRANGE.