SPRUIE9D May 2017 – May 2024 DRA74P , DRA75P , DRA76P , DRA77P
CAL supports interleaving at pixel level of data streams received from two cameras that are synchronized. These two cameras are typically CSI-2 cameras attached to the PPI_0 and PPI_1 interfaces.
In order to use the stream interleaving feature, CAL_CTRL1[1:0] PPI_GROUPING register bit-field must be set to PPI_0 or PPI_1.
Figure 10-27 shows a physical view of the interleaving.
The actual interleaving is done after the DPCM decompression stage of the CAL processing pipeline and requires two linked pixel processing contexts. The interleaving feature is controlled by bit-fields [5:4] INTERLEAVE23 and [3:2] INTERLEAVE01 of the CAL_CTRL1 register. CAL supports no interleaving, interleaving with 1 pixel granularity or interleaving with 4 pixel granularity.
Both PPI interfaces must be configured to forward the received bytestream to the internal processing pipeline using two separate CPORT IDs. The bytestream is then converted into words of 4 pixels by the two independent extraction contexts and DPCM decompressed. Up to this stage, the processing is identical to non interleaved mode.
Data generated by the two pixel processing contexts is stored in two small FIFOs when interleaving is enabled (that is, when bit-fields [5:4] INTERLEAVE23 and [3:2] INTERLEAVE01 of the CAL_CTRL1 register are set to a value different than 0x0). Otherwise, the data is directly forwarded to the rest of the pipeline.
Figure 10-28 provides a logical view of a CAL stream interleaving.
The interleaver reads blocks of 2 or 4 pixels from the 2 FIFOs (physically stored in 16-bit containers) and interleaves the data with 1 pixel or 4 pixel granularity. Figure 10-29 below shows when pixels are read from the respective FIFOs (the number in the cell is the pixel position)
Figure 10-30 illustrates the processing applied to a RAW pixel stream.
The datastream uses the pixel processing context #0 and its CPORT ID after interleaving.
Bit-fields [5:4] INTERLEAVE23 and [3:2] INTERLEAVE01 of the CAL_CTRL1 register must not be changed when the pixel processing contexts 0 or 1 are processing data.
Interleaving is not supported for JPEG data. Bit-fields [5:4] INTERLEAVE23 and [3:2] INTERLEAVE01 must be set to 0x0 for JPEG data.
The stream sizes on both PPI_0 and PPI_1 are expected to be equal. However, if they are not, CAL will forward data from the longer stream without interleaving.
The PPI context IDs of interleaved streams must match. Therefore, it is possible to interleave context #0 from PPI_0 with context #0 from PPI_1. But it is not possible to interleave context #0 from PPI_0 with context #1 from PPI_1.