2D
S3C2416X
RISC MICROPROCESSOR
18-2
2 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 18-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 18-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 18-2. Note that when YUV format is used, the source image horizontal resolution
must be an even number.
Summary of Contents for S3C2416
Page 122: ...BUS MATRIX EBI S3C2416X RISC MICROPROCESSOR 3 4 NOTES ...
Page 204: ...DMA CONTROLLER S3C2416X RISC MICROPROCESSOR 8 18 NOTES ...
Page 284: ...WATCHDOG TIMER S3C2416X RISC MICROPROCESSOR 11 6 NOTES ...
Page 320: ...REAL TIME CLOCK S3C2416X RISC MICROPROCESSOR 13 16 NOTES ...
Page 344: ...UART S3C2416X RISC MICROPROCESSOR 14 24 NOTES ...
Page 380: ...USB2 0 DEVICE S3C2416X RISC MICROPROCESSOR 16 34 NOTES ...
Page 432: ...2D S3C2416X RISC MICROPROCESSOR 18 38 NOTES ...
Page 446: ...HS_SPI CONTROLLER S3C2416X RISC MICROPROCESSOR 19 14 NOTES ...
Page 604: ...S3C2416X RISC MICROPROCESSOR S3C2416X RISC MICROPROCESSOR 23 22 NOTES ...
Page 638: ...PCM AUDIO INTERFACE S3C2416X RISC MICROPROCESSOR 25 18 NOTES ...
Page 670: ...ELECTRICAL DATA S3C2416X RISC MICROPROCESSOR 26 32 NOTES ...