Preliminary
2D
S3C2451X
RISC MICROPROCESSOR
19-2
Preliminary product information describe products that are in development,
for which full characterization data and associated errata are not yet available.
Specifications and information herein are subject to change without notice.
COLOR FORMAT CONVERSION
2D supports seven color formats: RGB_565, RGBA_5551, ARGB_1555, RGBA_8888, ARGB_8888, XRGB_8888,
and RGBX_8888. The structure of each color format is illustrated in Figure 19-1.
R
G
B
R
G
B
A
15 10 5 0
15 10 6 1 0
R
G
B
A
15 14 10 5 0
G
B
A
R
31 24 16 8 0
R
G
B
A
31 24 16 8 0
R
G
B
0xFF
31 24 16 8 0
G
B
0xFF
R
31 24 16 8 0
RGB_565
RGBA_5551
ARGB_1555
RGBA_8888
ARGB_8888
XRGB_8888
RGBX_8888
Figure 19-1. Color Format
The internal computations use ARGB_8888 format. All data (source, destination, foreground, background, blue-
screen, pattern) are converted to ARGB_8888 format before computation, and the final result are converted to the
color format specified by DEST_COLOR_MODE_REG before writing to frame buffer.
When a 16-bit color data is converted to 32-bit, the data of each field is shifted (8 –
x
) bits to left, where
x
is the
bit-width of the field. The least significant
x
bits of the new field data are padded with the most significant
x
bits of
the original field data. For example, if the R value in RGB_565 format is 5’b11010, it will be converted to
8’b11010110, with three LSBs padded with three MSBs (3’b110) from the original R value. Note that, the A field in
RGBA_5551 and ARGB_1555 only has one bit, so it is converted to either 8’b00000000 or 8’b11111111 (A=1’b1).
When a 32-bit color data is converted to 16-bit, the data of each field is truncated to
x
bits, where
x
is the bit-width
of the field in the new color format. For example, if the R value in RGBA_8888 format is 8’b11001110, it will be
converted to 5’b11001 in the RGB_565 format, with the three LSBs discarded. Note that, if the A field of the 32-bit
color data is not 0, the A field in RGBA_5551 and ARGB_1555 will be 1’b1; otherwise, 1’b0.
2D also supports YUV input (format: YUV422, 2-planar). The memory allocation of a 16-pixel image of YUV422
format is illustrated in Figure 19-2. Note that when YUV format is used, the source image horizontal resolution
must be an even number.