Module Documentation
FM4, S6E2DH/S6E2DF/S6E2D5/S6E2D3 Series, 32-Bit Microcontroller, Graphic Driver User Manual, Doc. No. 002-04387 Rev. *A
87
11.4.4.5 enum MML_GDC_SURF_FORMAT
Color format of surface buffer. The syntax for RGBA buffers is the following: R, G, B, A and X stands for red, green,
blue, alpha and unused. The field description(s) is followed by the bit width. For instance R5G6B5 used 5 red, 6
green and 5 blue bits but no alpha.
Note:
Additional formats are supported by the PixEng hardware. They can be defined with the attribute function.
The following examples show the related memory organization:
R8G8B8A8:
Byte
0
1
2
3
4
5
6
7
Color
A0
B0
G0
R0
A1
B1
G1
R1
RGB8A8:
Byte
0
1
2
3
Color
A0
RGB0
A1
RGB1
The memory organisation is described with below.
Enumerator
MML_GDC_SURF_FORMAT_R8G8B8A8
32 bpp RGBA format.
MML_GDC_SURF_FORMAT_A8B8G8R8
32 bpp ABGR format.
MML_GDC_SURF_FORMAT_A8R8G8B8
32 bpp ARGB format.
MML_GDC_SURF_FORMAT_B8G8R8A8
32 bpp BGRA format.
MML_GDC_SURF_FORMAT_R8G8B8X8
32 bpp RGB format.
MML_GDC_SURF_FORMAT_X8B8G8R8
32 bpp BGR format.
MML_GDC_SURF_FORMAT_X8R8G8B8
32 bpp RGB format.
MML_GDC_SURF_FORMAT_R8G8B8
24 bpp RGB format.
MML_GDC_SURF_FORMAT_B8G8R8
24 bpp BGR format.
MML_GDC_SURF_FORMAT_R6G6B6
18 bpp BGR format.
MML_GDC_SURF_FORMAT_R4G4B4A4
16 bpp RGBA format.
MML_GDC_SURF_FORMAT_A4R4G4B4
16 bpp ARGB format.
MML_GDC_SURF_FORMAT_R5G5B5A1
16 bpp RGBA format (5 bit for RGB, 1 bit alpha).
MML_GDC_SURF_FORMAT_A1R5G5B5
16 bpp ARGB format (5 bit for RGB, 1 bit alpha).