User guide

Table Of Contents
January 2013 Altera Corporation Video and Image Processing Suite
User Guide
18. Frame Buffer MegaCore Function
Core Overview
The Frame Buffer MegaCore function buffers video frames into external RAM. The
Frame Buffer supports double or triple buffering with a range of options for frame
dropping and repeating.
Functional Description
The Frame Buffer MegaCore function buffers progressive or interlaced video fields in
external RAM. When frame dropping and frame repeating are not allowed, the Frame
Buffer provides a double-buffering function that can be useful to solve throughput
issues in the data path. When frame dropping and/or frame repeating are allowed,
the Frame Buffer provides a triple-buffering function and can be used to perform
simple frame rate conversion.
The Frame Buffer is built with two basic blocks: a writer which stores input pixels in
memory and a reader which retrieves video frames from the memory and outputs
them.
Figure 18–1 shows a simple block diagram of the Frame Buffer MegaCore function.
When double-buffering is in use, two frame buffers are used in external RAM. At any
time, one buffer is used by the writer component to store input pixels, while the
second buffer is locked by the reader component that reads the output pixels from the
memory.
When both the writer and the reader components have finished processing a frame,
the buffers are exchanged. The frame that has just been input can then be read back
from the memory and sent to the output, while the buffer that has just been used to
create the output can be overwritten with fresh input.
Figure 18–1. Frame Buffer Block Diagram
Memory
Writer
Memory
Reader
Avalon-ST Input
(din)
Avalon-ST Output
(dout)
DDR2
Arbitration Logic
Avalon-MM Master
(read_master)
Avalon-MM Master
(write_master)