User guide

Table Of Contents
January 2013 Altera Corporation Video and Image Processing Suite
User Guide
13. Color Space Converter MegaCore
Function
Core Overview
The Color Space Converter MegaCore function transforms video data between color
spaces. The color spaces allow you to specify colors using three coordinate values. The
Color Space Converter supports a number of predefined conversions between
standard color spaces, and allows the entry of custom coefficients to translate between
any two three-valued color spaces. You can configure the Color Space Converter to
change conversion values at run time using an Avalon-MM slave interface.
Functional Description
The Color Space Converter MegaCore function provides a flexible and efficient means
to convert image data from one color space to another.
A color space is a method for precisely specifying the display of color using a
three-dimensional coordinate system. Different color spaces are best for different
devices, such as R'G'B' (red-green-blue) for computer monitors or Y'CbCr
(luminance-chrominance) for digital television.
Color space conversion is often necessary when transferring data between devices
that use different color space models. For example, to transfer a television image to a
computer monitor, you are required to convert the image from the Y'CbCr color space
to the R'G'B' color space. Conversely, transferring an image from a computer display
to a television may require a transformation from the R'G'B' color space to Y'CbCr.
Different conversions may be required for standard definition television (SDTV) and
high definition television (HDTV). You may also want to convert to or from the Y'IQ
(luminance-color) color model for National Television System Committee (NTSC)
systems or the Y'UV (luminance-bandwidth-chrominance) color model for Phase
Alternation Line (PAL) systems.
Input and Output Data Types
The Color Space Converter MegaCore function inputs and outputs support signed or
unsigned data and 4 to 20 bits per pixel per color plane. Minimum and maximum
guard bands are also supported. The guard bands specify ranges of values that must
never be received by, or transmitted from the MegaCore function. Using output guard
bands allows the output to be constrained, such that it does not enter the guard bands.
Color Space Conversion
Conversions between color spaces are achieved by providing an array of nine
coefficients and three summands that relate the color spaces. These can be set at
compile time, or at run time using the Avalon-MM slave interface.