2/24/2008 9T6WP
BCM7405
Preliminary Hardware Data Module
Functional Description
06/29/07
Bro a d c o m C o rp o r a ti o n
Page 1-48
Video and Graphics Display
Document
7405-1HDM00-R
Color Keying
One common requirement in any compositor operation is to allow color keying of data. This allows a particular color (or range
of colors) to become transparent.
illustrates the placement of the color keying operation along with the color
conversion. Due to mathematical inaccuracies in the matrix mathematics, some systems may want to perform the color
keying before the matrix conversion is applied. The crossbar switches allow either operation to occur in either order.
Figure 1-12: Color Keying Flow
Compositor Architecture
The compositor core is more complex than a simple alphablender. This document proposes to have the compositor only
work on 32-bit per pixel data (either ARGB8888 or AYCrCb8888). The alpha and color values should have different blend
functions but both are based on the A*B ± C*D ± E formula.
The compositor has three effective inputs for each of the letters (A, B, C, D, and E) in the blending equation. Each component
could come from the scaled source or the destination, or from a constant color loaded into the compositor block.
demonstrates one possible encoding of the components for the equation.
In addition to this table, a bit is required to allow the selection to be bit-wise inverted (effectively one-minus the original value).
Using
as an example, to generate a 1 the user would select index 0 and the invert bit to create the decimal value
255.
Table 1-5: Color and Alpha Selection
Index
Color Selection
Alpha Selection
Function/Comments
0
0
0
–
1
Source Color
Reserved
–
2
Destination Color
Reserved
–
3
Background Color
Reserved
–
4
Half
Half
Used to indicate 128 or 0 x 80
5
Source Alpha
Source Alpha
–
6
Destination Alpha
Destination Alpha
–
7
Background Alpha
Background Alpha
–
Source
X
Output
Color Keying
X
Color
Conversion
M atrix
Scaler