Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
imagej-elphel
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Elphel
imagej-elphel
Commits
6961660a
Commit
6961660a
authored
Apr 09, 2020
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
increased tp_task size to accomodate target_disparity and disp_dist
parent
524c2e2f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
2 deletions
+13
-2
GPUTileProcessor.java
src/main/java/com/elphel/imagej/gpu/GPUTileProcessor.java
+11
-2
geometry_correction.h
src/main/resources/kernels/geometry_correction.h
+2
-0
No files found.
src/main/java/com/elphel/imagej/gpu/GPUTileProcessor.java
View file @
6961660a
...
@@ -126,7 +126,7 @@ public class GPUTileProcessor {
...
@@ -126,7 +126,7 @@ public class GPUTileProcessor {
static
int
TEXTURE_TILES_PER_BLOCK
=
1
;
static
int
TEXTURE_TILES_PER_BLOCK
=
1
;
static
int
IMCLT_THREADS_PER_TILE
=
16
;
static
int
IMCLT_THREADS_PER_TILE
=
16
;
static
int
IMCLT_TILES_PER_BLOCK
=
4
;
static
int
IMCLT_TILES_PER_BLOCK
=
4
;
static
int
TPTASK_SIZE
=
NUM_CAMS
*
2
+
2
;
static
int
TPTASK_SIZE
=
1
+
1
+
NUM_CAMS
*
2
+
1
+
NUM_CAMS
*
4
;
// tp_task structure size in floats
static
int
CLTEXTRA_SIZE
=
8
;
static
int
CLTEXTRA_SIZE
=
8
;
static
int
KERN_TILES
=
KERNELS_HOR
*
KERNELS_VERT
*
NUM_COLORS
;
static
int
KERN_TILES
=
KERNELS_HOR
*
KERNELS_VERT
*
NUM_COLORS
;
static
int
KERN_SIZE
=
KERN_TILES
*
4
*
64
;
static
int
KERN_SIZE
=
KERN_TILES
*
4
*
64
;
...
@@ -201,6 +201,7 @@ public class GPUTileProcessor {
...
@@ -201,6 +201,7 @@ public class GPUTileProcessor {
public
int
tx
;
public
int
tx
;
public
float
[][]
xy
=
null
;
public
float
[][]
xy
=
null
;
public
float
[][]
xy_aux
=
null
;
public
float
[][]
xy_aux
=
null
;
public
float
[][]
disp_dist
=
null
;
public
TpTask
()
{}
public
TpTask
()
{}
public
TpTask
(
int
tx
,
int
ty
,
float
target_disparity
,
int
task
)
{
public
TpTask
(
int
tx
,
int
ty
,
float
target_disparity
,
int
task
)
{
...
@@ -208,11 +209,12 @@ public class GPUTileProcessor {
...
@@ -208,11 +209,12 @@ public class GPUTileProcessor {
this
.
ty
=
ty
;
this
.
ty
=
ty
;
this
.
target_disparity
=
target_disparity
;
this
.
target_disparity
=
target_disparity
;
this
.
task
=
task
;
this
.
task
=
task
;
this
.
disp_dist
=
new
float
[
NUM_CAMS
][
4
];
}
}
// convert this class instance to float array to match layout of the C struct
// convert this class instance to float array to match layout of the C struct
public
float
[]
asFloatArray
(
boolean
use_aux
)
{
public
float
[]
asFloatArray
(
boolean
use_aux
)
{
float
[]
flt
=
new
float
[
NUM_CAMS
*
2
+
2
];
float
[]
flt
=
new
float
[
TPTASK_SIZE
];
return
asFloatArray
(
flt
,
0
,
use_aux
);
return
asFloatArray
(
flt
,
0
,
use_aux
);
}
}
// convert this class instance to float array to match layout of the C struct,
// convert this class instance to float array to match layout of the C struct,
...
@@ -225,6 +227,13 @@ public class GPUTileProcessor {
...
@@ -225,6 +227,13 @@ public class GPUTileProcessor {
flt
[
indx
++]
=
offsets
[
i
][
0
];
flt
[
indx
++]
=
offsets
[
i
][
0
];
flt
[
indx
++]
=
offsets
[
i
][
1
];
flt
[
indx
++]
=
offsets
[
i
][
1
];
}
}
flt
[
indx
++]
=
this
.
target_disparity
;
for
(
int
i
=
0
;
i
<
NUM_CAMS
;
i
++)
{
// actually disp_dist will be initialized by the GPU
flt
[
indx
++]
=
disp_dist
[
i
][
0
];
flt
[
indx
++]
=
disp_dist
[
i
][
1
];
flt
[
indx
++]
=
disp_dist
[
i
][
2
];
flt
[
indx
++]
=
disp_dist
[
i
][
3
];
}
return
flt
;
return
flt
;
}
}
}
}
...
...
src/main/resources/kernels/geometry_correction.h
View file @
6961660a
...
@@ -48,6 +48,8 @@ struct tp_task {
...
@@ -48,6 +48,8 @@ struct tp_task {
unsigned
short
sxy
[
2
];
unsigned
short
sxy
[
2
];
};
};
float
xy
[
NUM_CAMS
][
2
];
float
xy
[
NUM_CAMS
][
2
];
float
target_disparity
;
float
disp_dist
[
NUM_CAMS
][
4
];
// calculated with getPortsCoordinates()
};
};
struct
corr_vector
{
struct
corr_vector
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment