SPRUIE9D May 2017 – May 2024 DRA74P , DRA75P , DRA76P , DRA77P
VTNF input YUV420 data complies to the NV12 or NV21 format
VTNFoutput YUV420 data can be either NV12 or NV21 or YV12. For YV12 format output, input should be NV12
U and V processing is symmetrical, so current frame input, previous frame input, and current frame output should be either all NV12, or all NV21, and not mix between the two.
All combinations of YUV420 formats and whether each is supported is shown in the Table 9-2680
Previous frame output = current frame output | ||||
---|---|---|---|---|
NV12 | NV21 | YV12 | ||
Current frame input | NV12 | x | x | |
NV21 | x | |||
YV12 |
YUV420 NV12 data format has the luma (Y) of one entire frame stored together, and the chroma components (U and V) interleaved pixel-by-pixel, and stored separately. NV21 is the same, except with U and V exchanged in the interleaving order.
YUV420 YV12 data format has the luma (Y) of one entire frame stored together, followed by the V component for entire frame (half width and half and Y), then followed by the U component for entire frame (same size as V).
As VTNF processes one block at a time, each pointer (current frame input/output, previous frame output) points to Y for one block, followed by the U/V data, interleaved for NV12/NV21, separate arrays for YV12.
The line offset parameter VTNF_LOFST[15:4] LOFST is used for line offset for luma array and for NV12/NV21 interleaved UV array, and can be any multiple of 16 greater than or equal to block width.
For the YV12 separate U and V arrays, as the data width is half of luma array, line offset of LOFST/2 is used. In this case, LOFST must be a multiple of 32, to avoid straddling 128-bit memory words. Block width is also a multiple of 32.