User guide

Table Of Contents
6–4 Chapter 6: Alpha Blending MegaCore Function
Functional Description
Video and Image Processing Suite January 2013 Altera Corporation
User Guide
During the mixing of a frame, the Alpha Blending Mixer reads from the background
input for each non-stalled cycle. The Alpha Blending Mixer also reads from the input
ports associated with layers that currently cover the background image. Because of
pipelining, the foreground pixel of layer N is read approximately N active cycles after
the corresponding background pixel has been read. If the output is applying
backpressure or if one input is stalling, the pipeline stalls and the backpressure
propagates to all active inputs. When alpha blending is enabled, one data sample is
read from each alpha port once each time that a whole pixel of data is read from the
corresponding input port.
There is no internal buffering in the Alpha Blending Mixer MegaCore function, so the
delay from input to output is just a few clock cycles and increases linearly with the
number of inputs.
Error Recovery
The Alpha Blending Mixer MegaCore function processes video packets from the
background layer until the end of packet is received. If an
endofpacket
signal is
received too early for the background layer, the Alpha Blending Mixer enters error
mode and continues writing data until it has reached the end of the current line. The
endofpacket
signal is then set with the last pixel sent. If an
endofpacket
signal is
received early for one of the foreground layers or for one of the alpha layers, the
Alpha Blending Mixer stops pulling data out of the corresponding input and pads the
incomplete frame with undefined samples. If an
endofpacket
signal is received late
for the background layer, one or more foreground layers, or one or more alpha layers,
the Alpha Blending Mixer enters error mode.
When the Alpha Blending Mixer MegaCore function enters error mode (because of an
early
endofpacket
for the background layer or a late
endofpacket
for any layer), it has
to discard data until the
endofpacket
has been reached for all input layers.
This error recovery process maintains the synchronization between all the inputs and
is started once the output frame is completed. A large number of samples may have to
be discarded during the operation and backpressure can be applied for a long time on
most input layers. Consequently, this error recovery mechanism could trigger an
overflow at the input of the system.
1 For more information about the stall behavior and error recovery, refer to “Stall
Behavior and Error Recovery” on page 1–3.
Latency
Table 62 lists the approximate latency from the video data input to the video data
output for typical usage modes of the Alpha Blending Mixer MegaCore function. You
can use this table to predict the approximate latency between the input and the output
of your video processing pipeline.
The latency is described using one or more of the following measures:
the number of progressive frames
the number of interlaced fields
the number of lines when less than a field of latency
a small number of cycles O (cycles)