SPRUIE9D May 2017 – May 2024 DRA74P , DRA75P , DRA76P , DRA77P
To better enable slice-based processing with a random access algorithm such as LDC/perspective warp, LDC module must be able to read its input image data from a circular buffer. The amount of data needed by LDC module depends on the configuration and the warp factors, so there is a variable rate of input data consumed by LDC during processing of an entire frame.
The LDC_RD_OFST[29:16] MOD parameter controls the size of the circular buffer (in number of rows, must be even). The user sets the size of the circular buffer and the absolute address for the input data is then computed by:
Address = base + (row % LDC_RD_OFST[29:16] MOD) * line_offset + column
NV12 or NV21 Modes In NV12 or NV21, the image data is split between two buffers, the luma plane and the interleaved chroma plane. The LDC_RD_OFST[29:16] MOD register computes the size of the luma plane. By definition, the chroma plane is half the height of the luma plane. The modulo operation for the chroma plane uses LDC_RD_OFST[29:16] MOD/2 as the divisor.
UYVY and Bayer Modes In UYVY mode, the image data is in a single buffer. Therefore, the LDC_RD_OFST[29:16] MOD register directly gives the height (in rows) of the buffer.
In Bayer mode, the image data is also in a single buffer, so the circular buffer height can be directly set by LDC_RD_OFST[29:16] MOD register.
To enable circular addressing mode, the firmware must configure LDC_PCR[9] CIRCEN = 1. It is the responsibility of the firmware to ensure that the circular buffer size is sized appropriately for the given LDC configuration. If the buffer size is set too small, incorrect data output is expected.
Circular buffering is only supported for the input image data. Mesh table data is not read through a circular buffer.