Graphics Programming
TVP4020
Programmers Reference Manual
118
5.13
Color Format Unit
The Color Format unit converts from P
ERMEDIA
's internal color
representation to a format suitable to be written into the framebuffer.
This process may optionally include dithering of the color values. If the
unit is disabled then the color is not modified in any way.
5.13.1
Color Formats
The framebuffer may be configured to be RGBA or Color Index (CI).
Table 4.1 shows the full list of color modes supported by P
ERMEDIA
. The
R, G, B and A columns show the width of each color component. The
least significant bit position is 0. For the Front and Back Modes the value
is repeated in both buffers, and writemasks may be used to update only
one buffer. In CI mode, the index is repeated in all streams.
5.13.2
Color Dithering
P
ERMEDIA
uses an ordered dither algorithm to implement color dithering.
It also has a line dither mode which uses a different algorithm which will
generally give better results for lines because it is independent of
orientation. This mode is not available for trapezoids.
If the Color Format unit is disabled, the color components RGBA are not
modified and will be truncated when placed in the framebuffer. In CI
mode, the value is truncated to the nearest integer. In both cases the
result is clamped to a maximum value to prevent overflow.
P
ERMEDIA
supports 8888 RGBA format for 2d operations only. If this
mode is selected and dithering is enabled, it will result in 5551RGBA
quality for each 32 bit pixel. This can be used when the window manager
needs to be set-up for true color at the same time as 3D windows are
required.
In some situations only screen coordinates are available, but window
relative dithering is required. This can be resolved by setting up the
optional X and Y offsets which get added to the coordinates before the
dither tables are indexed. Each offset is a two bit number which is
supplied for each coordinate. The XOffset and YOffset fields in the
DitherMode register control this operation and should be set to zero if
window relative coordinates are used.
5.13.3
ForceAlpha
The Color Format unit can force the alpha value to be either 0x0 or the
maximum 0xFF, or leave it unchanged. This can be used to implement
overlays. See section §7.6 for a detailed description.
Summary of Contents for TVP4020 PERMEDIA 2
Page 1: ...Texas Instruments TVP4020 PERMEDIA 2 Programmer s Reference Manual Issue 4 ...
Page 284: ...TVP4020 Programmers Reference Manual A Gouraud Shaded Triangle 275 ...
Page 292: ...TVP4020 Programmers Reference Manual Register Tables 283 ...
Page 314: ...TVP4020 Programmers Reference Manual Index 305 ...
Page 315: ...Index TVP4020 Programmers Reference Manual 306 Index ...
Page 323: ...Index TVP4020 Programmers Reference Manual 314 ...