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:
69a0b5d
)
fix a crash on CPU OCL for some specified image sizes
author
yao
<bitwangyaoyao@gmail.com>
Wed, 24 Apr 2013 06:12:41 +0000
(14:12 +0800)
committer
yao
<bitwangyaoyao@gmail.com>
Wed, 24 Apr 2013 06:12:41 +0000
(14:12 +0800)
modules/ocl/src/opencl/haarobjectdetect.cl
patch
|
blob
|
history
diff --git
a/modules/ocl/src/opencl/haarobjectdetect.cl
b/modules/ocl/src/opencl/haarobjectdetect.cl
index
c7ed96a
..
e0ab860
100644
(file)
--- a/
modules/ocl/src/opencl/haarobjectdetect.cl
+++ b/
modules/ocl/src/opencl/haarobjectdetect.cl
@@
-194,7
+194,7
@@
__kernel void __attribute__((reqd_work_group_size(8,8,1)))gpuRunHaarClassifierCa
int glb_x = grpoffx + (lcl_x<<2);
int glb_y = grpoffy + lcl_y;
- int glb_off = mad24(
glb_y
,pixelstep,glb_x);
+ int glb_off = mad24(
min(glb_y, height - 1)
,pixelstep,glb_x);
int4 data = *(__global int4*)&sum[glb_off];
int lcl_off = mad24(lcl_y, readwidth, lcl_x<<2);