SPRUIE9D May 2017 – May 2024 DRA74P , DRA75P , DRA76P , DRA77P
For the memory access locations of the 2D-LSC table, see Section 9.3.3.11, ISS ISP Memory Mapping.
Lens shading correction (LSC) is useful for correcting optical artifacts that cause image brightness to decrease starting at the center of the image and going to the edges.
The LSC implements a per-pixel offset and gain adjustment in the RAW Bayer domain (2 × 2 color pattern).
The offset and gains are stored in a LUT, which is stored in SDRAM and is loaded in real time. The submodule prefetches the data from SDRAM such that no underflow occurs. Underflow occurs when the offset and gain data required for the current pixel are not available.
The data stored in the LUT is downsampled; that is, there is no gain or offset per pixel. The downsampling factor is programmable. High downsampling ratios lead to a smaller LUT, lower accuracy, and lower memory bandwidth. A low downsampling ratio leads to a bigger LUT, higher accuracy, and higher memory bandwidth.
When the offset and gain values are loaded, they are upscaled to the incoming image resolution. The missing table values are computed through bilinear interpolation.
To enable the 2D-LSC module, set the ISIF_2DLSCCFG[0] ENABLE bit to 1.