Skip to content

Commit

Permalink
fixed umat access
Browse files Browse the repository at this point in the history
  • Loading branch information
ilya-lavrenov committed Dec 30, 2013
1 parent 4a6c2ce commit a2e683d
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions modules/core/src/convert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@ static bool ocl_mixChannels(InputArrayOfArrays _src, InputOutputArrayOfArrays _d
for (size_t i = 0; i < npairs; ++i)
argindex = k.set(argindex, ocl::KernelArg::ReadOnlyNoSize(srcargs[i]));
for (size_t i = 0; i < npairs; ++i)
argindex = k.set(argindex, ocl::KernelArg::ReadOnlyNoSize(dstargs[i]));
argindex = k.set(argindex, ocl::KernelArg::WriteOnlyNoSize(dstargs[i]));
k.set(k.set(argindex, size.height), size.width);

size_t globalsize[2] = { size.width, size.height };
Expand Down Expand Up @@ -737,12 +737,9 @@ void cv::mixChannels(InputArrayOfArrays src, InputOutputArrayOfArrays dst,
if (fromTo.empty())
return;

if (ocl::useOpenCL() && src.isUMatVector() && dst.isUMatVector() /*&&
ocl_mixChannels(src, dst, &fromTo[0], fromTo.size()>>1)*/)
{
CV_Assert(ocl_mixChannels(src, dst, &fromTo[0], fromTo.size()>>1));
if (ocl::useOpenCL() && src.isUMatVector() && dst.isUMatVector() &&
ocl_mixChannels(src, dst, &fromTo[0], fromTo.size()>>1))
return;
}

bool src_is_mat = src.kind() != _InputArray::STD_VECTOR_MAT &&
src.kind() != _InputArray::STD_VECTOR_VECTOR &&
Expand Down

0 comments on commit a2e683d

Please sign in to comment.