OpenCores
URL https://opencores.org/ocsvn/qaz_libs/qaz_libs/trunk

Subversion Repositories qaz_libs

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /qaz_libs/trunk/BFM/src
    from Rev 42 to Rev 43
    Reverse comparison

Rev 42 → Rev 43

/video_frame/video_frame_pkg.sv
30,16 → 30,20
import logger_pkg::*;
 
typedef struct
{
int pixel[];
} line_s;
{
int pixel[];
} line_s;
 
typedef struct
{
int x;
int y;
} frame_coordinate_t;
typedef struct
{
int x;
int y;
} frame_coordinate_t;
 
typedef int flattened_frame_t[];
typedef int unsigned video_array_t[][];
 
// --------------------------------------------------------------------
class video_frame_class;
logger_class log;
rand int frame_id;
112,6 → 116,8
input frame_coordinate_t coordinate
);
 
extern function flattened_frame_t flatten_frame();
 
extern virtual function void make_constant
(
input int pixel
128,6 → 134,8
 
extern virtual function void make_random();
 
extern virtual function void shift_right(ref line_s column);
 
extern virtual function void copy
(
ref video_frame_class from
190,7 → 198,21
 
endfunction: read_pixel
 
// --------------------------------------------------------------------
//
function flattened_frame_t video_frame_class::flatten_frame();
int i = 0;
log.info($sformatf("%m"));
flatten_frame = new[lines_per_frame*pixels_per_line];
 
foreach(this.lines[l])
foreach(this.lines[l].pixel[p])
begin
flatten_frame[i] = this.lines[l].pixel[p];
i++;
end
endfunction: flatten_frame
 
// --------------------------------------------------------------------
//
function void video_frame_class::make_constant
383,12 → 405,22
 
foreach(tail.lines[l].pixel[p])
catenate_horizontally.lines[l].pixel[p + this.pixels_per_line] = tail.lines[l].pixel[p];
 
end
 
endfunction: catenate_horizontally
 
// --------------------------------------------------------------------
//
function void video_frame_class::shift_right(ref line_s column);
log.info($sformatf("%m"));
 
foreach(this.lines[l])
for(int p = pixels_per_line - 1; p > 0; p--)
this.lines[l].pixel[p] = this.lines[l].pixel[p - 1];
 
foreach(this.lines[l])
this.lines[l].pixel[0] = column.pixel[l];
endfunction: shift_right
 
// --------------------------------------------------------------------
//
function int video_frame_class::compare_line

powered by: WebSVN 2.1.0

© copyright 1999-2020 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.