Input and output data types, Color space conversion, Input and output data types -2 – Altera Video and Image Processing Suite User Manual

Page 142: Color space conversion -2

Advertising
background image

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 inputs and outputs of the Color Space Conversion IP cores support signed or unsigned data and 4 to

20 bits per pixel per color plane. The IP cores also support minimum and maximum guard bands.
The guard bands specify ranges of values that must never be received by, or transmitted from the IP cores.

Using output guard bands allows the output to be constrained, such that it does not enter the guard

bands.

Color Space Conversion

You convert between color spaces by providing an array of nine coefficients and three summands that

relate the color spaces.
• Color Space Converter (CSC) IP core: You can set these coefficients and summands at compile time,

or at runtime using the Avalon-MM slave interface.

• Color Space Converter II IP core: You can set these coefficients and summands at compile time.
Given a set of nine coefficients [

A0

,

A1

,

A2

,

B0

,

B1

,

B2

,

C0

,

C1

,

C2

] and a set of three summands [

S0

,

S1

,

S2

],

the IP cores calculate the output values on channels 0, 1, and 2 (denoted

dout_0

,

dout_1

, and

dout_2

):

dout_0 = (A0 × din_0) + (B0 × din_1) + (C0 × din_2) + S0
dout_1 = (A1 × din_0) + (B1 × din_1) + (C1 × din_2) + S1
dout_2 = (A2 × din_0) + (din_0B2 × din_1) + (C2 × din_2) + S2

Note:

din_0

,

din_1

, and

din_2

are inputs read from channels 0, 1, and 2.

The Color Space Converter (CSC) IP core supports user-specified custom constants and the following

predefined conversions:
• Computer B’G’R’ to CbCrY’: SDTV

• CbCrY’: SDTV to Computer B’G’R’

• Computer B’G’R’ to CbCrY’: HDTV

• CbCrY’: HDTV to Computer B’G’R’

• Studio B’G’R’ to CbCrY’: SDTV

• CbCrY’: SDTV to Studio B’G’R’

• Studio B’G’R’ to CbCrY’: HDTV

• CbCrY’: HDTV to Studio B’G’R’

• IQY' to Computer B'G'R'

• Computer B'G'R' to IQY'

• UVY' to Computer B'G'R'

• Computer B'G'R' to UVY'
The values are assigned in the order indicated by the conversion name. For example, if you select

Computer B’G’R’ to CbCrY’: SDTV,

din_0

= B’,

din_1

= G’,

din_2

= R’,

dout_0

= Cb’,

dout_1

= Cr, and

dout_2

= Y’.

10-2

Input and Output Data Types

UG-VIPSUITE

2015.05.04

Altera Corporation

Color Space Conversion IP Cores

Send Feedback

Advertising