SPRUIE9D May 2017 – May 2024 DRA74P , DRA75P , DRA76P , DRA77P
Figure 9-105 shows the parameters that are required to set up the circular buffers. As mentioned previously, there can be up to four circular buffers in case the two resizer engines are outputting YUV4:2:0 data.
The circular buffer management requires the following parameters (RSZ-A or RSZ-B A or B,Chroma or Luma Y or C, low or high part of the address, L or H. Sets the base address of the circular buffer):
Circular Buffer Parameter | Register (for RSZ-A and RSZ-B) | Description |
---|---|---|
Baseline address | RZA_SDR_Y_BAD_H RZB_SDR_Y_BAD_H | Sets the base address of the circular buffer |
Start address | RZA_SDR_Y_SAD_H RZB_SDR_Y_SAD_H | Sets the start address of the circular buffer. The first data output is written to this address. If the first line of a frame must be written at the beginning of the circular buffer memory, then SAD = BAD and PTR_S = 0. |
Start pointer | Sets the initial value of the circular buffer internal counter. It must be set up as PTR_S = (SAD – BAD)/OFT. PTR_S is expressed in the number of lines. | |
End pointer | Sets the size of the circular buffer. PTR_E is expressed in the number of lines. The circular buffer can contain up to PTR_E lines. | |
Line offset | This is the offset expressed in bytes between two lines in the circular buffer. Here: Line 0 = SAD, Line 1 = SAD + 1 × OFT, Line 2 = SAD + 2 × OFT, etc. OFT does not necessarily correspond to the size of a line in a frame; it can be bigger. |
More generally, the following equations hold:
Interrupts can be triggered every time a certain number of lines are written to the circular buffer. There are independent settings for each RSZ and for each possible output of each RSZ.
Figure 9-106 shows how the data are stored in the circular buffer over time when vertical flip is disabled. In this example, PTR_S = 5 and PTR_E = 7. There can be up to PTR_E = 7 lines in the circular buffer.
Figure 9-107 shows how the data are stored in the circular buffer over time when vertical flip is enabled. In this example, PTR_S = 5 and PTR_E = 7. There can be up to PTR_E = 7 lines in the circular buffer.