SPRUJ28E November 2021 – September 2024 AM68 , AM68A , TDA4AL-Q1 , TDA4VE-Q1 , TDA4VL-Q1
The brightness/contrast/saturation controls are implemented in the same Color Space Conversion (CSC) block by making adjustments to the conversion coefficients and input/output offset values as shown in Figure 12-90:
In Figure 12-346 the following terminology is used:
The hue adjustment can also be built into the above equation (Figure 12-346) to comprehend the following Cb/Cr hue angle adjustments:
Cb_hue_adj = (Cb*cosØ + Cr* sinØ)
Cr_hue_adj = (Cr*cosØ - Cb* sinØ), where Ø is the desired hue angle (with Ø=0 meaning hue adjustment bypass)
The final combined matrix equation for controlling brightness/contrast/saturation/hue (BCSH) during YUV to RGB conversion is shown in Figure 12-347
Gain and offset terms in the above equation (Figure 12-347) are programmed in the hardware registers as adjusted CSC coefficients (11-bit signed) and offset values (13-bit signed) to control the brightness, contrast, saturation and hue. Mapping of the coefficients and offsets to register fields is provided in Table 12-344. Outputs are clipped to keep the output values in the proper range.
Coefficients | Register Fields |
---|---|
A0 | DSS0_VID_CSC_COEF0[10-0] C00 |
B0 | DSS0_VID_CSC_COEF0[26-16] C01 |
C0 | DSS0_VID_CSC_COEF1[10-0] C02 |
A1 | DSS0_VID_CSC_COEF1[26-16] C10 |
B1 | DSS0_VID_CSC_COEF2[10-0] C11 |
C1 | DSS0_VID_CSC_COEF2[26-16] C12 |
A2 | DSS0_VID_CSC_COEF3[10-0] C20 |
B2 | DSS0_VID_CSC_COEF3[26-16] C21 |
C2 | DSS0_VID_CSC_COEF4[10-0] C22 |
Y offset | DSS0_VID_CSC_COEF5[15-3] PREOFFSET1 |
Cr offset | DSS0_VID_CSC_COEF5[31-19] PREOFFSET2 |
Cb offset | DSS0_VID_CSC_COEF6[15-3] PREOFFSET3 |
R offset | DSS0_VID_CSC_COEF6[31-19] POSTOFFSET1 |
G offset | DSS0_VID_CSC_COEF7[15-3] POSTOFFSET2 |
B offset | DSS0_VID_CSC_COEF7[31-19] POSTOFFSET3 |
For RGB input formats, the same CSC block can be used to adjust contrast, brightness, saturation, and hue using the matrix equation from Figure 12-348.
In Figure 12-348 the following specifics apply:
Outputs are clipped to keep the output values in the proper range.