SPRUJB3 March 2024 AM67 , AM67A , TDA4AEN-Q1 , TDA4VEN-Q1
The VP supports a look up table to perform the gamma correction on the display output. The look up table consists of 3 separate 256x8-bit memories, which are indexed by R/G/B component data.
When performing gamma correction, the selected encoded pixel values from the video pipeline path are sent by the overlay manager to the gamma curve table. Each R/G/B component of the encoded pixel value is used as a pointer to index 1 out of 256 x 24-bit gamma curve entries in the table. Each 8-bit component is replaced with the 8-bit table value corresponding to R, G, or B component. The table is loaded by software via the DSS0_VP_GAMMA_TABLE_0 through DSS0_VP_GAMMA_TABLE_15 registers. It is possible to load only part of the table. For each access to the table, the 24-bit value is associated with index in the table by concatenating the 24-bit value (LSB of 32-bit access) and the 8-bit index value (MSB of the 32-bit access).
The sequence to load the gamma table is:
Software needs to ensure that there is no visible effect when modifying the table, since it is not under hardware control.
The usage of the gamma table is activated by setting DSS0_VP_CONFIG[2] GAMMAENABLE register bit.
Figure 12-504 describes the format of one of the gamma curve values in the memory.