Samsung S5PC110 Manual page 1771

Risc microprocessor
Table of Contents

Advertisement

S5PC110_UM
13 12BG2D
13.3 COLOR FORMAT CONVERSION
FIMG-2D V3.0 supports eight color formats: XRGB_8888, ARGB_8888, RGB_565, XRGB_1555, ARGB_1555,
XRGB_4444, ARGB_4444, and PACKED_RGB_888. The structure of each color format is illustrated in the figure
below. FIMG-2D V3.0 supports four channel orders: ARGB, RGBA, ABGR, and BGRA.
Figure 13-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 DST_COLOR_MODE_REG before writing to frame buffer.
When a 16-bit color data is converted to 32-bit, the expanded color data is made by the following rule: 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 ARGB_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 ARGB_1555 will be 1'b1; otherwise, 1'b0.
13-2

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents