Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Video and Image Processing Suite User Guide Avalon st video.pdf
Скачиваний:
81
Добавлен:
11.06.2015
Размер:
2.64 Mб
Скачать

Gamma Corrector IP Core 15

2015.01.23

UG-VIPSUITE

Subscribe

Send Feedback

The Gamma Corrector IP core corrects video streams for the physical properties of display devices.

The Gamma Corrector IP core 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 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.

Gamma Corrector Parameter Settings

Table 15-1: Gamma Corrector Parameter Settings

You program the actual gamma corrected intensity values at run time using the Avalon-MM slave interface.

Parameter

 

 

Value

 

Description

 

 

 

 

 

Bits per pixel per color plane

 

4–16, Default = 8

 

Select the number of bits per pixel (per color

 

 

 

 

 

plane).

 

 

 

 

 

Number of color planes

 

1–3, Default = 3

 

Select the number of color planes that are

 

 

 

 

 

sent in sequence or parallel over one data

 

 

 

 

 

connection.

Color plane transmission format

 

Color planes in

 

Select whether to transmit the specified

 

 

 

sequence

 

number of color planes in sequence or in

 

 

Color planes in

 

parallel. For example, a value of 3 planes in

 

 

 

sequence for R'G'B' R'G'B' R'G'B'.

 

 

 

parallel

 

 

 

 

 

 

 

 

 

 

 

 

© 2015 Altera Corporation. All rights reserved. ALTERA, ARRIA, CYCLONE, ENPIRION, MAX, MEGACORE, NIOS, QUARTUS and STRATIX words and logos are trademarks of Altera Corporation and registered in the U.S. Patent and Trademark Office and in other countries. All other words and logos identified as trademarks or service marks are the property of their respective holders as described at www.altera.com/common/legal.html. Altera warrants performance of its semiconductor products to current specifications in accordance with Altera's standard warranty, but reserves the right to make changes to any products and services at any time without notice. Altera assumes no responsibility or liability arising out of the application or use of any information, product, or service described herein except as expressly agreed to in writing by Altera. Altera customers are advised to obtain the latest version of device specifications before relying on any published information and before placing orders for products or services.

ISO 9001:2008 Registered

www.altera.com

101 Innovation Drive, San Jose, CA 95134

15-2

Gamma Corrector Signals

UG-VIPSUITE

2015.01.23

 

 

Gamma Corrector Signals

Table 15-2: Gamma Corrector Signals

Signal

 

Directio

 

Description

 

 

n

 

 

 

 

 

 

 

clock

 

Input

 

The main system clock. The IP core operates on the

 

 

 

 

rising edge of this signal.

 

 

 

 

 

reset

 

Input

 

The IP core asynchronously resets when this signal is

 

 

 

 

high. You must deassert this signal synchronously to the

 

 

 

 

rising edge of the clock signal.

din_data

 

Input

 

din port Avalon-ST data bus. This bus enables the

 

 

 

 

transfer of pixel data into the IP core.

 

 

 

 

 

din_endofpacket

 

Input

 

din port Avalon-ST endofpacket signal. This signal

 

 

 

 

marks the end of an Avalon-ST packet.

din_ready

 

Output

 

din port Avalon-ST ready signal. This signal indicates

 

 

 

 

when the IP core is ready to receive data.

 

 

 

 

 

din_startofpacket

 

Input

 

din port Avalon-ST startofpacket signal. This signal

 

 

 

 

marks the start of an Avalon-ST packet.

din_valid

 

Input

 

din port Avalon-ST valid signal. This signal identifies

 

 

 

 

the cycles when the port must enter data.

 

 

 

 

 

dout_data

 

Output

 

dout port Avalon-ST data bus. This bus enables the

 

 

 

 

transfer of pixel data out of the IP core.

dout_endofpacket

 

Output

 

dout port Avalon-ST endofpacket signal. This signal

 

 

 

 

marks the end of an Avalon-ST packet.

 

 

 

 

 

dout_ready

 

Input

 

dout port Avalon-ST ready signal. The downstream

 

 

 

 

device asserts this signal when it is able to receive data.

dout_startofpacket

 

Output

 

dout port Avalon-ST startofpacket signal. This signal

 

 

 

 

marks the start of an Avalon-ST packet.

 

 

 

 

 

dout_valid

 

Output

 

dout port Avalon-ST valid signal. The IP core asserts

 

 

 

 

this signal when it produces data.

gamma_lut_av_address

 

Input

 

gamma_lut port Avalon-MM address bus. This bus

 

 

 

 

specifies a word offset into the slave address space.

 

 

 

 

 

gamma_lut_av_chipselect

 

Input

 

gamma_lut slave port Avalon-MM chipselect signal.

 

 

 

 

The gamma_lut port ignores all other signals unless you

 

 

 

 

assert this signal.

gamma_lut_av_readdata

 

Output

 

gamma_lut slave port Avalon-MM readdata bus. The IP

 

 

 

 

core uses these output lines for read transfers.

 

 

 

 

 

Altera Corporation

Gamma Corrector IP Core

 

 

Send Feedback

UG-VIPSUITE

 

 

 

Gamma Corrector Control Registers

15-3

2015.01.23

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Signal

 

Directio

 

Description

 

 

 

 

n

 

 

 

 

 

 

 

 

 

 

 

gamma_lut_av_write

 

Input

 

gamma_lut slave port Avalon-MM write signal. When

 

 

 

 

 

 

you assert this signal, the reader control port accepts

 

 

 

 

 

new data from the writedata bus.

 

 

gamma_lut_av_writedata

 

Input

 

gamma_lutslave port Avalon-MM writedata bus. The IP

 

 

 

 

 

core uses these input lines for write transfers.

 

 

 

 

 

 

 

 

Gamma Corrector Control Registers

The Gamma Corrector can have up to three Avalon-MM slave interfaces. There is a separate slave interface for each channel in parallel.

The control registers are read continuously during the operation of the IP core, so making a change to part of the Gamma look-up table during the processing of a frame always has immediate effect.

Note: The width of each register in the Gamma Corrector control register map is always equal to the value of the Bits per pixel per color plane parameter selected in the parameter editor.

When dealing with image data with N bits per pixel per color plane, the address space of the Avalon-MM slave port spans 2N + 2 registers where each register is N bits wide. Registers 2 to 2N + 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.

Table 15-3: Gamma Corrector Control Register Map for Interface 0

 

Address

 

Register

 

Description

 

 

 

 

 

 

 

 

 

0

 

Control

 

Bit 0 of this register is the Go bit, all other bits are unused.

 

 

 

 

 

Setting this bit to 0 causes the IP core to stop the next time

 

 

 

 

 

control information is read.

 

 

 

 

 

 

 

1

 

Status

 

Bit 0 of this register is the Status bit, all other bits are unused.

 

 

 

 

 

 

 

 

 

 

2 to 2N +1

 

Gamma Look-Up Table

 

These registers contain a look-up table that is used to apply

 

where N is the

 

 

 

gamma correction to video data. An input intensity value of x

 

number of bits

 

 

 

is gamma corrected by replacing it with the contents of the (x

 

per color

 

 

 

+1)th entry in the look-up table. Changing the values of these

 

plane.

 

 

 

registers has an immediate effect on the behavior of the IP

 

 

 

 

 

core. To ensure that gamma look-up values do not change

 

 

 

 

 

during processing of a video frame, use the Go bit to stop the

 

 

 

 

 

IP core while the table is changed.

 

Table 15-4: Gamma Corrector Control Register Map for Interface 1

 

 

 

 

 

 

 

 

 

Address

 

Register

 

Description

 

 

 

 

 

 

 

 

 

0

 

Unused

 

This register is not used.

 

 

 

 

 

 

 

1

 

Unused

 

This register is not used.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Gamma Corrector IP Core

 

 

 

 

Altera Corporation

 

Send Feedback

 

 

 

 

 

 

15-4

Gamma Corrector Control Registers

 

UG-VIPSUITE

2015.01.23

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Address

 

Register

 

Description

 

 

 

 

 

 

 

 

 

 

 

2 to 2N +1

 

Gamma Look-Up Table

 

These registers contain a look-up table that is used to apply

 

 

where N is the

 

 

 

gamma correction to video data. An input intensity value of x

 

 

number of bits

 

 

 

is gamma corrected by replacing it with the contents of the (x

 

 

per color

 

 

 

+1)th entry in the look-up table. Changing the values of these

 

 

plane.

 

 

 

registers has an immediate effect on the behavior of the IP

 

 

 

 

 

 

core. To ensure that gamma look-up values do not change

 

 

 

 

 

 

during processing of a video frame, use the Go bit in Interface

 

 

 

 

 

 

0 to stop the IP core while the table is changed.

 

Table 15-5: Gamma Corrector Control Register Map for Interface 2

 

 

 

 

 

 

 

 

 

 

Address

 

Register

 

Description

 

 

 

 

 

 

 

 

 

 

 

0

 

Unused

 

This register is not used.

 

 

 

 

 

 

 

 

 

1

 

Unused

 

This register is not used.

 

 

 

 

 

 

 

 

 

 

 

2 to 2N +1

 

Gamma Look-Up Table

 

These registers contain a look-up table that is used to apply

 

 

where N is the

 

 

 

gamma correction to video data. An input intensity value of x

 

 

number of bits

 

 

 

is gamma corrected by replacing it with the contents of the (x

 

 

per color

 

 

 

+1)th entry in the look-up table. Changing the values of these

 

 

plane.

 

 

 

registers has an immediate effect on the behavior of the IP

 

 

 

 

 

 

core. To ensure that gamma look-up values do not change

 

 

 

 

 

 

during processing of a video frame, use the Go bit in Interface

 

 

 

 

 

 

0 to stop the IP core while the table is changed.

 

 

 

 

 

 

 

 

Altera Corporation

Gamma Corrector IP Core

 

 

Send Feedback

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]