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/video_frame
    from Rev 43 to Rev 34
    Reverse comparison

Rev 43 → Rev 34

/video_frame_pkg.sv
30,20 → 30,16
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;
116,8 → 112,6
input frame_coordinate_t coordinate
);
 
extern function flattened_frame_t flatten_frame();
 
extern virtual function void make_constant
(
input int pixel
134,8 → 128,6
 
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
198,21 → 190,7
 
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
405,22 → 383,12
 
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-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.