SPRUIE9D May 2017 – May 2024 DRA74P , DRA75P , DRA76P , DRA77P
For the memory access locations of the sensor linearization table, see Section 9.3.3.11, ISS ISP Memory Mapping.
The sensor linearization module can correct for the nonlinear response of image sensors. A LUT is programmed with an offset value to add to the original pixel value based on the original pixel value.
The LUT is a sampling of the linearization correction curve based on calibration of the image sensor. Intermediate values between sampling points are computed using linear interpolation. The entire correction curve is divided into seven regions, as listed in Table 9-206. The regions for the darkest part and the brightest part of the response curve have dense sampling. The linearization mode can be a uniform or a nonuniform sampling and can be set through the ISIF_LINCFG0[1] LINMD bit.
Region | Number of Sample Points | LUT Address |
---|---|---|
table_in[15:11] == 00000 | 32 | table_in[10:6] |
table_in[15:11] == 00001 | 4 | table_in[10:9] + 32 |
table_in[15:12] == 0001 | 4 | table_in[11:10] + 36 |
table_in[15:13] == 001 | 4 | table_in[12:11] + 40 |
table_in[15:14] == 01 | 4 | table_in[13:12] + 44 |
table_in[15:14] == 10 | 16 | table_in[13:10] + 48 |
table_in[15:14] == 01 | 128 | table_in[13:7] + 64 |
The LUT has 192 entries and is split into two 96 × 10-bit memories, as shown in Figure 9-125. Table 9-207 is mapped in the memory map. The LUT entries are interleaved between memory 0 and memory 1.
Memory Region | Address Range | Description |
---|---|---|
Memory 0 | 0xC000 – 0xC17F | ISIF linearity compensation LUT 0 |
Memory 1 | 0xC400 – C57F | ISIF linearity compensation LUT 1 |
A scale factor is applied to the input before lookup through the ISIF_LINCFG1[10:0] LUTSCL bit field. The LUT entries are signed 10-bit data (u16). After linear interpolation, the correction value is left-shifted by a programmable amount (the ISIF_LINCFG0[6:4] CORRSFT bit field), and then added to the input. This is then converted to unsigned 12-bit by right shift, followed by clipping.
To enable the linearization module, set the ISIF_LINCFG0[0] LINEN bit to 1.
If the linearization module is disabled (ISIF_LINCFG0[0] LINEN = 0x0), a 16- to-12-bit transformation is done, and the upper 12 bits of U16 input are sent to the next block.