SPRUHZ7K August 2015 – April 2024 AM5706 , AM5708 , AM5716 , AM5718 , AM5718-HIREL
The Color Phase Rotation block can be used to perform color space conversion. Table 11-83 lists the associated coefficients with their respective register bit-fields. The Color Space Conversion logic uses the CPR registers for the coefficients. The Color Space Conversion processing is enabled by setting the DISPC_CONFIGo[24] COLORCONVENABLE register bit to 0x1.
The color space conversion on the LCD output can be selected in order to convert from 24-bit RGB to YUV444. The matrix is programmed through a set of nine 10-bit signed coefficients. The result is clipped to [16:235] for the luminance and [16:240] for the chrominance, when full-range equals zero (DISPC_CONFIGo[25] FULLRANGE = 0).
If the programmed active range for the luminance samples (Y) and chrominance samples (Cb and Cr) is [0:255], the values Y, Cb, and Cr are clipped to the range [0:255]. The following equation gives the 11-bit coefficients of the RGB to YUV color space conversion, for full-range (DISPC_CONFIGo[25] FULLRANGE = 1)
In order to provide YUV422 data to the BT-656 or BT-1120 blocks, the YUV444 format is converted to YUV422 by sub-sampling the chrominance values. The hardware does this by averaging two-by-two the chrominance samples. The conversion from YUV444 to YUV422 is performed when the color space conversion is enabled. Thus, the output of the CPR unit is always YUV422 after color space conversion.