SPRUIL1D May 2019 – December 2024 DRA829J , DRA829J-Q1 , DRA829V , DRA829V-Q1 , TDA4VM , TDA4VM-Q1
In the final step the generated saturation value (12 bit) or the incoming RGB values (12 bit) needs to be scaled down to 8 bits using the linear LUT with 513 entries.
Figure 6-89 is a high level block diagram of the LUT block. It shows the weight calculation for the LUT assuming the incoming data can be of any bit depth between 8 and 12 bits.
The LUTs are sized to provide 513 locations of data, to enable linear interpolation for all locations. The internal weights are sized as 3 bits since the maximum delta between 2 steps is only 4095/512 = 8.
Figure 6-90 shows the high level block diagram of the interpolation process. The logic is designed to scale for bit width and can support anything from 8 to 12 bits of input to support different usecases. However, since the step size is different depending on the input bit width, the bit selection and weight calculation logic is designed to account for that.
A shift operation can be performed instead of LUT to reduce bitwidth from 12 down to 8 bits.
The code below shows the addressing for the LUT as well as the weight calculation logic for supporting multiple bit widths at the input from 8 – 12 bits.
12-8 Bit LUT Curve
CASE BIT_SEL
12 (12 bit data): Addr = Inp[3:11]; Wt1 = Inp[2:0]
11 (11 bit data): Addr = Inp[2:10]; Wt1 = Inp[1:0] & '0'
10 (10 bit data): Addr = Inp[1:9]; Wt1 = Inp[0] & '00'
9 (9 bit data): Addr = Inp[0:8]; Wt1 = '000'
8 (8 bit data): Addr = Inp[0:7]; Wt1 = '000';
//Wt0 is always calculated at 8 - Wt1
Wt0 = 8 - Wt1
The input bit width (BIT_SEL) is specified using a dedicated register for generating Y8 output. However for other paths (RGB/UV/Sat) the 8 bit conversion is done using either 12 bits (if data is tapped prior to contrast block) as the bitwidth or the clipping value after contrast block (VISS_FCP_FCC_CFG_2[12-9] CONTRASTBITCLIP, if data is tapped after contrast block).