From dfe5fff2f5bd6d68eb1a912832ed1cb9004e28da Mon Sep 17 00:00:00 2001 From: vbystricky Date: Mon, 11 Aug 2014 15:57:29 +0400 Subject: [PATCH 1/2] Restore OpenCL branch for minmaxLoc on float data --- modules/core/src/stat.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/core/src/stat.cpp b/modules/core/src/stat.cpp index 20e8aa5a7..e42f8224f 100644 --- a/modules/core/src/stat.cpp +++ b/modules/core/src/stat.cpp @@ -1454,7 +1454,7 @@ static bool ocl_minMaxIdx( InputArray _src, double* minVal, double* maxVal, int* CV_Assert(!haveSrc2 || _src2.type() == type); - if (depth == CV_32S || depth == CV_32F) + if (depth == CV_32S) return false; if ((depth == CV_64F || ddepth == CV_64F) && !doubleSupport) From 6fb282aa39ef7d6206662055bf781021fde4e4f5 Mon Sep 17 00:00:00 2001 From: vbystricky Date: Tue, 12 Aug 2014 11:25:23 +0400 Subject: [PATCH 2/2] Remove mul24, for CV8UC3 3840x2160 it generates implementation specific result --- modules/core/src/opencl/minmaxloc.cl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/core/src/opencl/minmaxloc.cl b/modules/core/src/opencl/minmaxloc.cl index 1d84567ef..cb72a4ec1 100644 --- a/modules/core/src/opencl/minmaxloc.cl +++ b/modules/core/src/opencl/minmaxloc.cl @@ -185,7 +185,7 @@ __kernel void minmaxloc(__global const uchar * srcptr, int src_step, int src_off #endif { #ifdef HAVE_SRC_CONT - src_index = mul24(id, srcTSIZE); + src_index = id * srcTSIZE;//mul24(id, srcTSIZE); #else src_index = mad24(id / cols, src_step, mul24(id % cols, srcTSIZE)); #endif