Alpha blending, Alpha blending -2 – Altera Video and Image Processing Suite User Manual

Page 113

Advertising
background image

background layer. The IP core treats the non-image data packets from the foreground layers differently

depending on their type.
• Control packets (type 15)— processed to extract the width and height of each layer and are discarded

on the fly.

• Other/user packets (types 1–14)—propagated unchanged.
The second step corresponds to the usual behavior of other Video and Image Processing IP cores that

have an Avalon-MM slave interface. After the IP core has processed and/or propagated the non-image

data packets from the background layer and the foreground layers, it waits for the

Go

bit to be set to 1

before reading the top left position of each layer.
Consequently, the behavior of the Alpha Blending Mixer and Mixer II IP cores differ slightly from the

other Video and Image Processing IP cores. The behavior of the Video Mixing IP cores is illustrated by

the following pseudo-code:

go = 0;
while (true)
{
status = 0;
read_non_image_data_packet_from background_layer();
read_control_first_pass(); // Check layer status
(disable/displayed/consumed)
for_each_layer layer_id
{
// process non-image data packets for displayed or consumed
layers
if (layer_id is not disabled)
{

handle_non_image_packet_from_foreground_layer(layer_id);
}
}
while (go != 1)
wait;
status = 1;
read_control_second_pass(); // Copies top-left coordinates to
internal registers
send_image_data_header();
process_frame();
}

Alpha Blending

The alpha frames contain a single color plane and are transmitted in video data packets.
When you turn on Alpha blending in the Alpha Blending Mixer parameter editor, the Avalon-ST input

ports for the alpha channels expect a video stream compliant with the Avalon-ST Video protocol. The

first value in each packet, transmitted while the

startofpacket

signal is high, contains the packet type

identifier 0. This condition holds true even when the width of the alpha channels data ports is less than 4

bits wide. The last alpha value for the bottom-right pixel is transmitted while the

endofpacket

signal is

high.
It is not necessary to send control packets to the ports of the alpha channels. The width and height of each

alpha layer are assumed to match with the dimensions of the corresponding foreground layer. The Alpha

Blending Mixer IP core recovers cleanly if there is a mismatch, although there may be throughput issues

6-2

Alpha Blending

UG-VIPSUITE

2015.05.04

Altera Corporation

Video Mixing IP Cores

Send Feedback

Advertising