User guide

Table Of Contents
January 2013 Altera Corporation Video and Image Processing Suite
User Guide
17. Frame Reader MegaCore Function
Core Overview
The Frame Reader MegaCore function reads video frames stored in external memory
and outputs them as a video stream. You can configure the MegaCore function to read
multiple video frames using an Avalon-MM slave interface.
Functional Description
The Frame Reader reads video frames stored in external memory and outputs them
using the Avalon-ST Video protocol.
The Frame Reader has an Avalon-MM read master port that reads data from an
external memory. The Frame Reader has an Avalon-ST source on which it streams
video data using the Avalon-ST Video protocol. The Frame Reader also has an Avalon
slave port, which provides the MegaCore function with configuration data.
Video frames are stored in external memory as raw video data (pixel values only).
Immediately before the Frame Reader MegaCore function reads video data from
external memory it generates a control packet and the header of a video data packet
on its Avalon-ST source. The video data from external memory is then streamed as the
payload of the video data packet. The content of the control data packet is set via the
Avalon Slave port. This process is repeated for every video frame read from external
memory.
The Frame Reader is configured during compilation to output a fixed number of color
planes in parallel, and a fixed number of bits per pixel per color plane. In terms of
Avalon-ST Video, these parameters describe the structure of one cycle of a color
pattern, also known as the single-cycle color pattern.
1 The Frame Reader is also configured with the number of channels in sequence, this
parameter does not contribute to the definition of the single-cycle color pattern.
To configure the Frame Reader to read a frame from memory, the Frame Reader must
know how many single-cycle color patterns make up the frame. If each single-cycle
color pattern represents a pixel, then the quantity is simply the number of pixels in the
frame. Otherwise, the quantity is the number of pixels in the frame, multiplied by the
number of single-cycle color patterns required to represent a pixel.
You must also specify the number of words the Frame Reader must read from
memory. The width of the word is the same as the Avalon-MM read Master port
width parameter. This width is configured during compilation. Each word can only
contain whole single-cycle color patterns. The words cannot contain partial single-
cycle color patterns. Any bits of the word that cannot fit another whole single-cycle
color pattern are not used.
Also, the Frame Reader must be configured with the starting address of the video
frame in memory, and the width, height, and interlaced values of the control data
packet to output before each video data packet.