Commit 7ccf095c authored by Andrey Filippov's avatar Andrey Filippov

working on textures to look behind on BG using only subset of cameras

parent f6006466
......@@ -2290,10 +2290,10 @@ public class GpuQuad{ // quad camera description
int [] cpu_num_texture_tiles = new int[8];
// cuMemcpyDtoH(Pointer.to(cpu_woi), gpu_woi, cpu_woi.length * Sizeof.INT); // hope that Float.floatToIntBits(fcorr_indices[i]) is not needed
cpu_woi[0] = width;
cpu_woi[1] = height;
cpu_woi[2] = 0;
cpu_woi[3] = 0;
cpu_woi[0] = width; // larger than any x
cpu_woi[1] = height; // larger than any y
cpu_woi[2] = 0; // smaller or equal than any x
cpu_woi[3] = 0; // smaller or equal than any y
cuMemcpyHtoD(gpu_woi, Pointer.to(cpu_woi), cpu_woi.length * Sizeof.INT);
// cuMemcpyDtoH(Pointer.to(cpu_woi), gpu_woi, cpu_woi.length * Sizeof.INT); //just for testing
......@@ -2395,6 +2395,9 @@ public class GpuQuad{ // quad camera description
int texture_width = (cpu_woi[2] + 1) * GPUTileProcessor.DTT_SIZE;
int texture_tiles_height = (cpu_woi[3] + 1) * GPUTileProcessor.DTT_SIZE;
int texture_slices = num_colors + 1;
if ((keep_weights & 2) != 0) {
texture_slices += num_colors * num_cams;
}
int blocks_x2 = ((texture_width +
((1 << (GPUTileProcessor.THREADS_DYNAMIC_BITS + GPUTileProcessor.DTT_SIZE_LOG2 )) - 1)) >>
......@@ -3382,6 +3385,7 @@ public class GpuQuad{ // quad camera description
return textures;
}
/*
public static double [][][][] doubleTextures( // not used
Rectangle woi,
int [] indices,
......@@ -3407,7 +3411,7 @@ public class GpuQuad{ // quad camera description
}
return textures;
}
*/
public static double [][][][] doubleTextures( // may be accelerated with multithreading if needed.
Rectangle woi, // null or width and height match texture_tiles
double [][][][] texture_tiles, // null or [tilesY][tilesX]
......
......@@ -692,12 +692,14 @@ public class ImageDtt extends ImageDttCPU {
true, // boolean calc_textures,
false, // boolean calc_extra
false); // boolean linescan_order)
int num_src_slices = numcol + 1; // + (clt_parameters.keep_weights?(ports + numcol + 1):0); // 12 ; // calculate
// int num_src_slices = numcol + 1; // + (clt_parameters.keep_weights?(ports + numcol + 1):0); // 12 ; // calculate
int num_src_slices = numcol + 1 + ((keep_weights!=0)?(getNumSensors() + numcol + 1):0);
int num_out_slices = numcol + 1 + ((keep_weights!=0)?(getNumSensors()):0); // 18
int [] texture_indices = gpuQuad.getTextureIndices();
float [] flat_textures = gpuQuad.getFlatTextures(
texture_indices.length,
numcol, // int num_colors,
false); // clt_parameters.keep_weights); // boolean keep_weights);
numcol, // int num_colors,
(keep_weights != 0)); // clt_parameters.keep_weights); // boolean keep_weights);
int tilesX = gpuQuad.img_width / GPUTileProcessor.DTT_SIZE;
int tilesY = gpuQuad.img_height / GPUTileProcessor.DTT_SIZE;
double [][][][] texture_tiles = new double [tilesY][tilesX][][];
......@@ -707,7 +709,7 @@ public class ImageDtt extends ImageDttCPU {
texture_indices, // int [] indices,
flat_textures, // float [][][] ftextures,
tilesX, // int full_width,
isMonochrome()? 2: 4, // rbga only /int num_slices Same number
num_out_slices, // isMonochrome()? 2: 4, // rbga only /int num_slices Same number
num_src_slices // int num_src_slices
);
return texture_tiles;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment