IiĀ·
Trio64V+ Integrated
Graphics/Video
Accelerator
53
Incorporated
10.3.3
Color/Chroma
Keying
These modes are items 5 and 6 in the compose
modes list. Keying is a
way
of
selecting on a pixel
by
pixel basis which stream
will
be displayed.
Color keying is used when the stream source is
in
RGB
format
(graphics). This is always the case
for
the primary stream. Chroma keying is used
when
the stream source is YUV
or
YCbCr (video).
The
secondary
stream source can be either
graphics
or
video, so either color
or
chroma key-
ing
might
be used.
If
81AO_26-24 (compose
mode)
= 101b and MM8184_28 =
1,
the color key
is compared
with
the
primary stream pixel. If
there is a match, the corresponding secondary
stream pixel
is
displayed.
If
81AO_26-24 = 110b
and MM8184_28 =
1,
the color
or
chroma key
is
compared
with
the secondary stream pixel. If
there is a match, the corresponding
primary
stream pixel is displayed.
If
the
input
format
is KRGB-16 (1.5.5.5), selected
when
MM8180_26-24 or MM8190_26_24 = 011b,
the
most
significant
bit
of
each pixel value is used
as
a color key
as
long
as
MM8184_28 is cleared
to
O.
When the
most
significant pixel
bit
is a
0,
the
other stream pixel is displayed.
For
other
RGB
input
types (as specified
by
MM8180_26-24), a color key
must
be
defined.
This is done
by
programming
MM8184_23-0
with
a specific
RGB
8.8.8 color value. MM8184_28
must
be
set
to
1 to enable use
of
this value. The
number
of
bits
to
compare
for
each color is
specified in MM8184_26-24.
If
there is a color
match
with
the keyed stream pixel, the corre-
sponding other stream pixel is displayed.
If
the secondary stream
input
format
is YUV
or
YCbCr, the chroma key is specified
as
a range
of
color values. The
lower
bound value
is
defined in
MM8184_23-16. The upper bound
value is de-
fined in MM8194_23-0.
If
the secondary stream
pixel color value falls
within
this range (inclusive
of
the
lower
and upper bounds), the Streams
Processor displays the corresponding pixel
from
the
primary
stream.lfthe
secondary stream pixel
color
is outside this range, the secondary stream
pixel is displayed.
10-8 STREAMS
PROCESSOR
10.3.4
Window
Location
The starting X,Y coordinates and
window
size
for
the primary stream are specified in MM81FO and
MM81
F4
respectively. The starting X,Y coordi-
nates and
window
size
for
the secondary stream
are specified in MM81F8 and MM81FC respec-
tively.
10.4 STREAMS
FIFO
CONTROL
The streams
FIFO
can be reconfigured
to
opti-
mize performance
for
various operating modes.
The
FIFO
is 24 8-byte slots deep. By program-
ming
MM81EC_ 4-0, the
FIFO
can
be
reconfigured
to assign
all 24 slots
to
either the primary
or
secondary stream. Allocations
of
16-8 and 12-12
slots between the
two
streams are also possible.
As
an
example,
if
only
a
primary
stream is being
displayed, optimal performance is generated
by
assigning all 24
FIFO
slots to the
primary
stream.
No matter
what
the allocation,
FIFO
thresholds
must
be
specified
for
the
primary
and secondary
streams. This is done via MM81EC_16-12
for
the
primary stream and MM81EC_10-6
forthe
secon-
dary stream.
When
the
FIFO
empties
to
the
threshold level,
an
internal signal is generated
requesting the
memory
controller to begin refill-
ing the
FIFO.
The programmed threshold levels
must
never
exceed
the
corresponding
FIFO
depths. The optimal settings
for
the threshold
levels will
be
system and operating mode de-
pendent and
will
have
to
be determined by trial
and error.