Commit bd695969 authored by Andrey Filippov's avatar Andrey Filippov

increased tp_task size to accomodate target_disparity and disp_dist

parent 173909c8
......@@ -48,6 +48,8 @@ struct tp_task {
unsigned short sxy[2];
};
float xy[NUM_CAMS][2];
float target_disparity;
float disp_dist[NUM_CAMS][4]; // calculated with getPortsCoordinates()
};
struct corr_vector{
......
......@@ -293,6 +293,18 @@ int main(int argc, char **argv)
short tx;
float xy[NUM_CAMS][2];
} ;
struct tp_task {
int task;
union {
int txy;
unsigned short sxy[2];
};
float xy[NUM_CAMS][2];
float target_disparity;
float disp_dist[NUM_CAMS][4]; // calculated with getPortsCoordinates()
};
*/
int KERN_TILES = KERNELS_HOR * KERNELS_VERT * NUM_COLORS;
int KERN_SIZE = KERN_TILES * 4 * 64;
......@@ -303,8 +315,8 @@ int main(int argc, char **argv)
float * host_kern_buf = (float *)malloc(KERN_SIZE * sizeof(float));
struct tp_task task_data [TILESX*TILESY]; // maximal length - each tile
// static - see https://stackoverflow.com/questions/20253267/segmentation-fault-before-main
static struct tp_task task_data [TILESX*TILESY]; // maximal length - each tile
int corr_indices [NUM_PAIRS*TILESX*TILESY];
// int texture_indices [TILESX*TILESY];
int texture_indices [TILESX*TILESYA];
......@@ -422,6 +434,7 @@ int main(int argc, char **argv)
for (int ncam = 0; ncam < NUM_CAMS; ncam++) {
task_data[nt].xy[ncam][0] = tile_coords_h[ncam][nt][0];
task_data[nt].xy[ncam][1] = tile_coords_h[ncam][nt][1];
task_data[nt].target_disparity = DBG_DISPARITY;
}
}
}
......
......@@ -71,6 +71,7 @@
#define THREADS_DYNAMIC_BITS 5 // treads in block for CDP creation of the texture list
#define DBG_DISPARITY 32.0 // disparity for which to calculate offsets (not needed in Java)
//#undef HAS_PRINTF
#define HAS_PRINTF
//7
......
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