SPRUJ28F November 2021 – August 2025 AM68 , AM68A , TDA4AL-Q1 , TDA4VE-Q1 , TDA4VL-Q1
The logic of the Contrast/Gamma unit is based on the same as that of the 12-8 bit conversion LUTs. There are 3 copies of the logic, one for each color channel. The standard data flow allows for a 12 bit input and 12 bit unsigned output, however different bit width combinations are possible using the select bit of the LUT and the clip value. Each entry of the LUT table is 12 bits.
Figure 6-109 and Figure 6-110 show the block diagram and implementation of linear interpolation for the Contrast Stretch/Gamma module.
Figure 6-109 Contrast Enhancement Module
Figure 6-110 Contrast Enhancement Linera InterpolationThe code below shows the LUT addressing scheme which is similar to the 12-8 bit conversion module. The configurable clip at the end of processing allows for less than 12 bit output to be supported directly from the module.
Contrast Enhancement, LUT Addressing
CASE BIT_SEL
0 (12 bit data): Addr = Inp[3:11]; Wt1 = Inp[2:0]
1 (11 bit data): Addr = Inp[2:10]; Wt1 = Inp[1:0] & '0'
2 (10 bit data): Addr = Inp[1:9]; Wt1 = Inp[0] & '00'
3 (9 bit data): Addr = Inp[0:8]; Wt1 = '000'
4 (8 bit data): Addr = Inp[0:7]; Wt1 = '000';
//Wt0 is always calculated at 8 - Wt1
Wt0 = 8 - Wt1