User guide

Table Of Contents
Appendix A: Avalon-ST Video Verification IP Suite A–27
Complete Class Reference
January 2013 Altera Corporation Video and Image Processing Suite
User Guide
function void set_video_data_type(string s);
Sets the
fourcc[3]
code associated with the raw video
data. The following are the supported four character code
(FOURCC) codes:
RGB32
IYU2
YUY2
Y410
A2R10GB10
Y210
function string get_video_data_type();
Returns the FOURCC code (for example,
RGB32
) being used
for the raw video data.
function int get_video_packets_handled();
function int get_control_packets_handled();
function int get_user_packets_handled();
function new(mailbox
#(c_av_st_video_item)m_vid_out);
Constructor. The mailbox is used to pass all packets in and
out of the file I/O object.
function void open_file(string fname, t_rwrw);
Files are opened using this method. For example:
video_file_reader.open_file
(‘’
vip_car_0.bin
”,
read);
t_rw
is an enumerated type with values read or write.
NB. The read fails if there is no associated .spc file, for
example, vip_car_o.spc).
function void close_file();
For example,
video_file_reader.close_file()
;
task read_file();
Read_file()
optionally calls
send_user_packet()
and
send_control_packet()
, then calls
read_video_packet()
.
task send_control_packet();
The control packet sent is derived from the image height,
width, and interlace fields as provided by
open_file()
.
task send_user_packet();
The user packet sent is always comprised of random data
and had a maximum length hard-coded to 33 data items.
task_generate_spc_file();
When writing a file, this call creates the necessary
associated .spc file.
task read_video_packet();
The main file reading method call. Binary data is read from
the file and packed into pixel objects according to the
settings of
ycbr_pixel_order
and endianism. Pixel
objects are packed into a video data object, with some pixels
optionally added or discarded if late/early EOP is being
applied. When one complete field of video has been read (as
determined by the height and width controls), the
video_data
object is put in the mailbox.
task wait_for_and_write_video_packet_to_file();
When called, this method waits for an object to be put in the
mailbox (usually from a sink BFM). When a control or a user
packet object arrives, this call is reported and ignored. When
a video packet arrives, the video data is written to the open
file in little endianism format.
Table A–7. Method Calls for the c_av_st_video_file_io Class (Part 3 of 3)
Method Call Description