Video and Image Processing Suite User Guide

ID 683416
Date 4/04/2022
Public
Document Table of Contents

A.3.2. c_av_st_video_data

The declaration for the c_av_st_video_data class:
class c_av_st_video_data#(parameter BITS_PER_CHANNEL = 8,
CHANNELS_PER_PIXEL = 3) extends c_av_st_video_item;
Table 93.  Method Calls for c_av_st_video_data Class
Method Call Description
function new(); Constructor
function void copy (c_av_st_video_data c); Copies object c into this object.
function bit compare (c_av_st_video_data r); Compares this instance to object r. Returns 1 if identical, 0 if otherwise.
function bit silent_compare (c_av_st_video_data #(BITS_PER_CHANNEL,CHANNELS_PER_PIXEL) r); Identical to compare, but creates no output messages.
function bit is_same_size (c_av_st_video_data #(BITS_PER_CHANNEL,CHANNELS_PER_PIXEL) r); Returns 1 if two video packets are the same length, 0 if otherwise.
function bit visualise (int height, int width); For small frames (<100x100) a table of hex values is produced.
function bit make_test_pattern (int height, int width, int spacing); Populates the pixels in a frame with a color-bars style test pattern (3 color planes only)
function bit make_random_field (int height, int width); Populates the pixels in a frame with random colors.
function void set_height(int h);
function int get_height();
function void set_width(int w);
function int get_width();
function void set_min_length(int length);
function int get_length();
function void set_line_length(int line_length); Line length is used to split the frame into lines for transmission.
function int get_line_length();
function void set_max_length(int length);
function int get_length();
function c_pixel #(BITS_PER_CHANNEL,CHANNELS_PER_PIXEL) pop_pixel(); Returns a pixel object from the packet in first in first out (FIFO) order.
function c_pixel #(BITS_PER_CHANNEL,CHANNELS_PER_PIXEL) query_pixel(int i); Returns a pixel object from the packet at index i, without removing the pixel.
function void unpopulate(bit display); Pops all pixels from the packet, displaying them if display = 1.
function void delete_pixel(int index); Removes pixel "index" from the frame.
function void push_pixel(c_pixel #(BITS_PER_CHANNEL, CHANNELS_PER_PEXEL)pixel); Pushes a pixel into the packet.
Table 94.  Members of c_av_st_video_data Class
Member Description
c_pixel #(BITS_PER_CHANNEL,CHANNELS_PER_PIXEL)pixels [$]; The video data is held in a queue of pixel objects.
c_pixel #(BITS_PER_CHANNEL,CHANNELS_PER_PIXEL) pixel, new_pixel, r_pixel; Pixel objects used for storing intermediate data.
rand int video_length; The length of the video packet (used for constrained random generation only).
int video_max_length = 10; Maximum length of video packet (used for constrained random generation only).
int video_min_length = 5; Minimum length of video packet (used for constrained random generation only).