User guide
Table Of Contents
- Contents
- 1. About This MegaCore Function Suite
- Release Information
- Device Family Support
- Features
- Design Example
- Performance and Resource Utilization
- 2D FIR Filter
- 2D Median Filter
- Alpha Blending Mixer
- Avalon-ST Video Monitor
- Chroma Resampler
- Clipper
- Clocked Video Input
- Clocked Video Output
- Color Plane Sequencer
- Color Space Converter
- Control Synchronizer
- Deinterlacer
- Deinterlacer II
- Frame Buffer
- Gamma Corrector
- Interlacer
- Scaler
- Scaler II
- Switch
- Test Pattern Generator
- Trace System
- 2. Getting Started with Altera IP Cores
- 3. Interfaces
- Interface Types
- Avalon-ST Video Protocol
- Avalon-MM Slave Interfaces
- Avalon-MM Master Interfaces
- Buffering of Non-Image Data Packets in Memory
- 4. 2D FIR Filter MegaCore Function
- 5. 2D Median Filter MegaCore Function
- 6. Alpha Blending MegaCore Function
- 7. Avalon-ST Video Monitor MegaCore Function
- 8. Chroma Resampler MegaCore Function
- 9. Clipper MegaCore Function
- 10. Clocked Video Input MegaCore Function
- 11. Clocked Video Output MegaCore Function
- 12. Color Plane Sequencer MegaCore Function
- 13. Color Space Converter MegaCore Function
- 14. Control Synchronizer MegaCore Function
- 15. Deinterlacer MegaCore Function
- Core Overview
- Functional Description
- Parameter Settings
- Signals
- Control Register Maps
- 16. Deinterlacer II MegaCore Function
- 17. Frame Reader MegaCore Function
- 18. Frame Buffer MegaCore Function
- 19. Gamma Corrector MegaCore Function
- 20. Interlacer MegaCore Function
- 21. Scaler MegaCore Function
- 22. Scaler II MegaCore Function
- 23. Switch MegaCore Function
- 24. Test Pattern Generator MegaCore Function
- 25. Trace System MegaCore Function
- A. Avalon-ST Video Verification IP Suite
- B. Choosing the Correct Deinterlacer
- Additional Information

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