SPRUI30H November 2015 – May 2024 DRA744 , DRA745 , DRA746 , DRA750 , DRA756
Bits 31-26 indicate the type of data that is to be transferred. This value is used to compute the number of bytes per pixel so that transactions may be made for the appropriate amount of data. The types of data are dependent on the type of channel. The VPDMA descriptor data types RGB or YUV are defined associated with the VPDMA channel assignment. This helps the engine to distinguish between the overlapping values of the descriptor data types for RGB and YUV data.
VPDMA defines the component ordering for its RGB data types in the opposite direction of what commonly used image identifiers expect. To avoid color component swapping in the display and/or in the video/image data written out to the memory, the proper Data Type settings for both RGB and YUV data types must be made. The following paragraphs provide more details on how to set Data Type correctly, in order to match the data stored or expected in the memory.
Setting RGB Data Types
The commonly used RGB format identifiers require the color components to be stored in a little-endian style, where the left most component is the LSB component.
Addr (LSB) | Addr + 1 | Addr + 2 | Addr + 3 (MSB) |
---|---|---|---|
A | R | G | B |
Bit 31 | Bit 23 | Bit 15 | Bit 7 |
---|---|---|---|
B | G | R | A |
VPDMA specifies its component ordering in the big‐endian style, which requires the data to be stored in the reversed order. Example with ARGB data type is shown in Table 10-24 and Table 10-25. The VPDMA ordering for ARGB data type matches the common BGRA data format.
Addr (LSB) | Addr + 1 | Addr + 2 | Addr + 3 (MSB) |
---|---|---|---|
B | G | R | A |
Bit 31 | Bit 23 | Bit 15 | Bit 7 |
---|---|---|---|
A | R | G | B |
In order color components to be mapped correctly and to avoid swapping, the reversal must be taken into consideration when configuring the Data Type in the VPDMA transfer descriptor.
Table 10-26 shows the proper settings required for RGB data types for both storage schemes.
Destination Image | VPDMA Data Type Mapping Value | ||
---|---|---|---|
RGB Component order | Common Image Format Names | Column A Data stored in the VPDMA defined order | Column B Data stored in the opposite of VPDMA defined order |
RGB | RGB16-565 | 0x0 | 0x10 |
ARGB-1555 | 0x1 | 0x13 | |
ARGB-4444 | 0x2 | 0x14 | |
RGBA-5551 | 0x3 | 0x11 | |
RGBA-4444 | 0x4 | 0x12 | |
ARGB24-6666 | 0x5 | 0x18 | |
RGB24-888 | 0x6 | 0x16 | |
ARGB32-8888 | 0x7 | 0x19 | |
RGBA24-6666 | 0x8 | 0x15 | |
RGBA32-8888 | 0x9 | 0x17 | |
BGR | BGR16-565 | 0x10 | 0x0 |
ABGR-1555 | 0x11 | 0x3 | |
ABGR-4444 | 0x12 | 0x4 | |
BGRA-5551 | 0x13 | 0x1 | |
BGRA-4444 | 0x14 | 0x2 | |
ABGR24-6666 | 0x15 | 0x8 | |
BGR24-888 | 0x16 | 0x6 | |
ABGR32-8888 | 0x17 | 0x7 | |
BGRA24-6666 | 0x18 | 0x5 | |
BGRA32-8888 | 0x19 | 0x9 |
In Table 10-26, if the application uses the same data type definition as the VPDMA (that is, RGB24 refers to the B in the LSB), the data types in Column A should be used. But, if the application expects the common data type component order for RGB data type names, the VPDMA data types in Column B should be used.
For example:
Setting YUV Data Types
There is no component order reversal for YUV data types. The VPDMA uses generic data type names to specify the memory storage format and the application simply needs to follow the VPDMA defined ordering.
Table 10-27 shows how common YUV data types map to the VPDMA YUV data types in order to clarify the YUV data type configuration.
Source YUV Image Types | VPDMA Data Type Mapping (Value) | ||||
---|---|---|---|---|---|
Chroma Sub-sample | Common YUV Image Format Type Names | Memory Packed Order [MSB - LSB] | Luma/Chroma Interleaved Channel | Luma-only Channel | Chroma-only Channel |
444 | YUV | V U Y | YC 4:4:4 (0x8) | ||
UVY | Y V U | Cb 4:4:4 (0x14) | |||
422 | NV16 (YUV422SP_UV) | V U | Y 4:2:2 (0x1) | C 4:2:2 (0x5) | |
NV16 (YUV422SP_VU) | U V | Y 4:2:2 (0x1) | Cb 4:2:2 (0x15) | ||
YUV2/YUYV/V422 (YUV422I_YUYV) | V Y U Y | YC 4:2:2 (0x7) | |||
YUV422I_YVYU | U Y V Y | CbY 4:2:2 (0x17) | |||
Y422/UYVY (YUV422I_UYVY) | Y V Y U | YC 4:2:2 (0x27) | |||
YUV422I_VYUY | Y U Y V | YCb 4:2:2 (0x37) | |||
420 | NV12 (YUV420SP_UV) | V U | Y 4:2:0 (0x2) YC 4:2:2 (0x7) (see (1)) | C 4:2:0 (0x6) YC 4:2:2 (0x7) (see (1)) | |
NV21 (YUV420SP_VU) | U V | Y 4:2:0 (0x2) YC 4:2:2 (0x7) (see (1)) | Cb 4:2:0 (0x16) YC 4:2:2 (0x7) (see (1)) |
For further details on the data formats, refer to Section 10.3.9.8, VPDMA Data Formats.