User guide

Table Of Contents
January 2013 Altera Corporation Video and Image Processing Suite
User Guide
19. Gamma Corrector MegaCore Function
Core Overview
The Gamma Corrector MegaCore function corrects video streams for the physical
properties of display devices. For example, the brightness displayed by a cathode-ray
tube monitor has a nonlinear response to the voltage of a video signal. You can
configure the Gamma Corrector with a look-up table that models the nonlinear
function to compensate for the non linearity. The look-up table can then transform the
video data and give the best image on the display.
Functional Description
The Gamma Corrector MegaCore function provides a look-up table (LUT) accessed
through an Avalon-MM slave port. The gamma values can be entered in the LUT by
external hardware using this interface.
For information about using Avalon-MM slave interfaces for run-time control in the
Video and Image Processing Suite, refer to “Avalon-MM Slave Interfaces” on
page 3–17.
When dealing with image data with N bits per pixel per color plane, the address space
of the Avalon-MM slave port spans 2
N
+ 2 registers where each register is N bits wide.
Registers 2 to 2
N
+ 1 are the look-up values for the gamma correction function. Image
data with a value x will be mapped to whatever value is in the LUT at address x + 2.
Avalon-ST Video Protocol Parameters
The Gamma Corrector MegaCore function can process streams of pixel data of the
types listed in Table 19–1.
Stall Behavior and Error Recovery
In all parameterizations, the Gamma Corrector stalls only between frames and not
between rows. It has no internal buffering aside from the registers of its processing
pipeline so there are only a few clock cycles of latency.
Table 19–1. Gamma Corrector Avalon-ST Video Protocol Parameters
Parameter Value
Frame Width Read from control packets at run time.
Frame Height Read from control packets at run time.
Interlaced /
Progressive
Either.
Bits per Color Sample Number of bits per color sample selected in the parameter editor.
Color Pattern
One, two or three channels in sequence or parallel. For example, if three channels
in sequence is selected where ,  and can be any color plane:
γβα