Merge pull request #2839 from ilya-lavrenov:tapi_fix
This commit is contained in:
commit
071daa1d8f
@ -3436,8 +3436,13 @@ static bool ocl_equalizeHist(InputArray _src, OutputArray _dst)
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
UMat lut(1, 256, CV_8UC1);
|
UMat lut(1, 256, CV_8UC1);
|
||||||
ocl::Kernel k("calcLUT", ocl::imgproc::histogram_oclsrc, format("-D BINS=%d -D HISTS_COUNT=1 -D WGS=%d", BINS, (int)wgs));
|
ocl::Kernel k("calcLUT", ocl::imgproc::histogram_oclsrc,
|
||||||
k.args(ocl::KernelArg::PtrWriteOnly(lut), ocl::KernelArg::PtrReadOnly(hist), (int)_src.total());
|
format("-D BINS=%d -D HISTS_COUNT=1 -D WGS=%d", BINS, (int)wgs));
|
||||||
|
if (k.empty())
|
||||||
|
return false;
|
||||||
|
|
||||||
|
k.args(ocl::KernelArg::PtrWriteOnly(lut),
|
||||||
|
ocl::KernelArg::PtrReadOnly(hist), (int)_src.total());
|
||||||
|
|
||||||
// calculation of LUT
|
// calculation of LUT
|
||||||
if (!k.run(1, &wgs, &wgs, false))
|
if (!k.run(1, &wgs, &wgs, false))
|
||||||
|
@ -704,6 +704,8 @@ static bool ocl_boxFilter( InputArray _src, OutputArray _dst, int ddepth,
|
|||||||
globalsize[1] = DIVUP(size.height, BLOCK_SIZE_Y);
|
globalsize[1] = DIVUP(size.height, BLOCK_SIZE_Y);
|
||||||
|
|
||||||
kernel.create("boxFilter", cv::ocl::imgproc::boxFilter_oclsrc, opts);
|
kernel.create("boxFilter", cv::ocl::imgproc::boxFilter_oclsrc, opts);
|
||||||
|
if (kernel.empty())
|
||||||
|
return false;
|
||||||
|
|
||||||
size_t kernelWorkGroupSize = kernel.workGroupSize();
|
size_t kernelWorkGroupSize = kernel.workGroupSize();
|
||||||
if (localsize[0] <= kernelWorkGroupSize)
|
if (localsize[0] <= kernelWorkGroupSize)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user