C_pixel, Raw video data format – Altera Video and Image Processing Suite User Manual

Page 299

Advertising
background image

Table A-17: Members of c_av_st_video_user_packet Class

Member

Description

rand bit[BITS_PER_CHANNEL*CHANNELS_PER_PIXEL-

1:0]data[$]

User data is stored as a queue of words.

rand bit[3:0] identifier;

constraint c2 {identifier inside

{[4:14]};}

int max_length = 10;

constraint c1 {data.size() inside

{[1:max_length]};}

c_pixel

The declaration for the c_pixel class:

class c_pixel#(parameters BITS_PER_CHANNEL=8, CHANNELS_PER_PIXEL=3);

Table A-18: Method Calls for c_pixel Class

Method Call

Description

function new();

Constructor.

function void copy(c_pixel #(BITS_PER_CHANNEL,

CHANNELS_PER_PIXEL) pix);

Copies object pixel into this object.

function bit[BITS_PER_CHANNEL-1:0] get_

data(int id);

Returns pixel data for channel id.

function void set_data(int id, bit [BITS_PER_

CHANNEL-1:0] data);

Sets pixel data for channel id.

Raw Video Data Format

Altera provides and recommends two Microsoft Windows utilities for translating between

.avi

and

.raw

file formats.
You can use the following examples to translate file formats.
Convert

.raw

to

.avi

files.

>avi2raw.exe vip_car_0.avi vip_car_0.raw

"dshow" decoder created
Information on the input file:
filename: vip_car_0.avi
fourcc = ARGB32
width = 160
height = 120
stride = 640
inversed = yes
endianness = little_endian
frame_rate = 25
Choose output dimensions, 0 to keep original values (this will apply a crop/pad,
not a scaling):

UG-VIPSUITE

2015.05.04

c_pixel

A-31

Avalon-ST Video Verification IP Suite

Altera Corporation

Send Feedback

Advertising