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 47 to Rev 49
    Reverse comparison

Rev 47 → Rev 49

/video_frame_class.svh
97,19 → 97,21
 
// --------------------------------------------------------------------
function flattened_frame_t 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
flatten_frame[(l*pixels_per_line)+p] = this.lines[l].pixel[p];
endfunction: flatten_frame
 
// --------------------------------------------------------------------
function void load_flatten_frame(flattened_frame_t a);
make_constant(0);
foreach(lines[l])
foreach(lines[l].pixel[p])
lines[l].pixel[p] = a[(l*pixels_per_line)+p];
endfunction: load_flatten_frame
 
// --------------------------------------------------------------------
function void make_constant(int pixel);
log.info($sformatf("%m"));
this.lines = new[lines_per_frame];
347,14 → 349,19
endfunction: print_config
 
// --------------------------------------------------------------------
function string convert2string();
function string convert2string(int grid=8);
string s;
string f ="";
string fs = $sformatf("%%s%%%0d.h" , (bits_per_pixel % 4 == 0)
? bits_per_pixel / 4
: (bits_per_pixel / 4) + 1
);
foreach(this.lines[l])
begin
s = $sformatf("[%4.d]", l);
foreach(this.lines[l].pixel[p])
s = {s, $sformatf("|%4.h", this.lines[l].pixel[p])};
s = {s, $sformatf(fs, (p % grid == 0) ? "!" : "|", this.lines[l].pixel[p])};
 
f = {f, s, "|\n"};
end
return f;

powered by: WebSVN 2.1.0

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