projects
/
profile
/
ivi
/
opencv.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
124ceb9
)
applied patch #1734
author
Vladislav Vinogradov
<no@email>
Sat, 31 Mar 2012 17:05:33 +0000
(17:05 +0000)
committer
Vladislav Vinogradov
<no@email>
Sat, 31 Mar 2012 17:05:33 +0000
(17:05 +0000)
modules/gpu/src/nvidia/NCVBroxOpticalFlow.cu
patch
|
blob
|
history
diff --git
a/modules/gpu/src/nvidia/NCVBroxOpticalFlow.cu
b/modules/gpu/src/nvidia/NCVBroxOpticalFlow.cu
index
9efb80d
..
44e6fde
100644
(file)
--- a/
modules/gpu/src/nvidia/NCVBroxOpticalFlow.cu
+++ b/
modules/gpu/src/nvidia/NCVBroxOpticalFlow.cu
@@
-551,10
+551,10
@@
template<int isBlack> __global__ void sor_pass(float *new_du,
return;
\r
\r
const int pos = j * stride + i;
\r
- const int pos_r =
pos + 1
;
\r
- const int pos_u =
pos + stride
;
\r
- const int pos_d =
pos - stride
;
\r
- const int pos_l =
pos - 1
;
\r
+ const int pos_r =
i < width - 1 ? pos + 1 : pos
;
\r
+ const int pos_u =
j < height - 1 ? pos + stride : pos
;
\r
+ const int pos_d =
j > 0 ? pos - stride : pos
;
\r
+ const int pos_l =
i > 0 ? pos - 1 : pos
;
\r
\r
//load smooth term
\r
float s_up, s_left, s_right, s_down;
\r