The LUT based compression is used for addressing multiple use cases.
- The primary function of the LUT is to take the PWL decompounded data (up to 24 bits and after DC subtraction) and compress it using an x^n curve to a bitwidth of 16 bits. This is required since the downstream path is only capable of supporting up to 16 bits of data.
- It can be used to decompand data when the compression curve cannot be addressed using 3 knee points or if the compression is true curve instead of PWL. In this scenario the DC subtraction IP is disabled and the LUT is used to implement both the decompression as well as the DC subtraction functionality.
The LUT compression is modified from the implementation in previous generation ISPs. The previous LUTs had 512 entries leading to a step size of 2^20/512 = 2048. As such there were only 2 LUT points in the critical low range (0-4095) of the image. The LUT implementation is optimized for a 20-bit decompounded data and allows for a step size of 32 in the critical range (lower 12 bits) and a step size of 2048 in the successive ranges.
The Non Linear LUT implementation supports 3 zones for the input range
- For bitWidth < 12 bits, the LUT offers a linear range with a step size of 32. (Only the first 128 locations (plus 129th location for supporting interpolation) are utilized in this mode
- For bitWidths between 13 and 20: This is the most common operating zone for the LUT. In this mode, the range between 0 and 4k is split in 128 locations with a step size of 32. Beyond 4k range, the step is variable and is set to 2k for the highest bit width of 20 and subsequently reduces by half as the bitwidth is reduced (E.g. 1k for 19 bits etc)
- For bitwidths between 21 and 24: In this operation zone, the first 128 locations are used with a varying step size based on bit width such that the step size is 64 for 21 bits of data and doubles with increase in bitWidth. (E.g. 128 for 22 bits etc). The remaining locations implement a varying step size between 4k (for 21 bits) and 32k (for 24 bits).
- Example-1: Bitwidth=21 bits:
- Range 0-8k-> Step size = 64;
- Range 8k- 2^21 -> Step Size = 4096
- Example-2: Bitwidth = 22 bits
- Range 0 -16k -> Step Size = 128
- Range 16k – 2^22 -> Step_Size = 8192
- Example 3: Bitwidth = 24 bits
- Range 0 – 64K -> Step Size = 512
- Range 64K - 2^24 -> Step Size = 32k
The LUT logic provides a generic table which can support any bit width and can be used in different regions in the RAWFE as well as other modules.
The LUT3 supports shadowing for very short frame only. If the MMR shadow enable is set then the LUT2 is used on the LUT3 data.