double _maxDiff, InputOutputArray __buf )
{
Mat img = _img.getMat();
- int type = img.type(), cn = CV_MAT_CN(type);
+ int type = img.type();
Mat temp, &_buf = __buf.needed() ? __buf.getMatRef() : temp;
CV_Assert( type == CV_8UC1 || type == CV_16SC1 );
IppiSize roisize = { img.cols, img.rows };
IppDataType datatype = type == CV_8UC1 ? ipp8u : ipp16s;
- if (!__buf.needed() && ippiMarkSpecklesGetBufferSize(roisize, datatype, cn, &bufsize))
+ if (!__buf.needed() && ippiMarkSpecklesGetBufferSize(roisize, datatype, CV_MAT_CN(type), &bufsize))
{
Ipp8u * buffer = ippsMalloc_8u(bufsize);
IppStatus status = (IppStatus)-1;
status = ippiMarkSpeckles_16s_C1IR((Ipp16s *)img.data, (int)img.step, roisize,
(Ipp16s)newVal, maxSpeckleSize, maxDiff, ippiNormL1, buffer);
- printf("%s\n", ippGetStatusString(status));
if (status >= 0)
return;
}
SANITY_CHECK(src);
}
+///////////// SetTo with mask ////////////////////////
+
+typedef Size_MatType SetToFixture;
+
+OCL_PERF_TEST_P(SetToFixture, SetToWithMask,
+ ::testing::Combine(OCL_TEST_SIZES, OCL_TEST_TYPES))
+{
+ const Size_MatType_t params = GetParam();
+ const Size srcSize = get<0>(params);
+ const int type = get<1>(params);
+ const Scalar s = Scalar::all(17);
+
+ checkDeviceMaxMemoryAllocSize(srcSize, type);
+
+ UMat src(srcSize, type), mask(srcSize, CV_8UC1);
+ declare.in(src, mask, WARMUP_RNG).out(src);
+
+ OCL_TEST_CYCLE() src.setTo(s, mask);
+
+ SANITY_CHECK(src);
+}
+
///////////// ConvertTo ////////////////////////
typedef Size_MatType ConvertToFixture;
SANITY_CHECK(dst);
}
+///////////// CopyTo with mask ////////////////////////
+
+typedef Size_MatType CopyToFixture;
+
+OCL_PERF_TEST_P(CopyToFixture, CopyToWithMask,
+ ::testing::Combine(OCL_TEST_SIZES, OCL_TEST_TYPES))
+{
+ const Size_MatType_t params = GetParam();
+ const Size srcSize = get<0>(params);
+ const int type = get<1>(params);
+
+ checkDeviceMaxMemoryAllocSize(srcSize, type);
+
+ UMat src(srcSize, type), dst(srcSize, type), mask(srcSize, CV_8UC1);
+ declare.in(src, mask, WARMUP_RNG).out(dst);
+
+ OCL_TEST_CYCLE() src.copyTo(dst, mask);
+
+ SANITY_CHECK(dst);
+}
+
} } // namespace cvtest::ocl
#endif // HAVE_OPENCL
static void mul8u( const uchar* src1, size_t step1, const uchar* src2, size_t step2,
uchar* dst, size_t step, Size sz, void* scale)
{
- mul_(src1, step1, src2, step2, dst, step, sz, (float)*(const double*)scale);
+ float fscale = (float)*(const double*)scale;
+ mul_(src1, step1, src2, step2, dst, step, sz, fscale);
}
static void mul8s( const schar* src1, size_t step1, const schar* src2, size_t step2,
if (mask.empty())
{
+ CV_SUPPRESS_DEPRECATED_START
ippFunc = sdepth == CV_8U && ddepth == CV_32F ? (ippiAdd)ippiAdd_8u32f_C1IR :
sdepth == CV_16U && ddepth == CV_32F ? (ippiAdd)ippiAdd_16u32f_C1IR :
sdepth == CV_32F && ddepth == CV_32F ? (ippiAdd)ippiAdd_32f_C1IR : 0;
+ CV_SUPPRESS_DEPRECATED_END
}
else if (scn == 1)
{
_dst.create( src.size(), CV_32FC1 );
Mat dst = _dst.getMat();
-#if defined HAVE_IPP && !defined HAVE_IPP_ICV_ONLY
+#if IPP_VERSION_X100 >= 801 && !defined HAVE_IPP_ICV_ONLY
int type = src.type(), depth = CV_MAT_DEPTH(type), cn = CV_MAT_CN(type);
int borderTypeNI = borderType & ~BORDER_ISOLATED;
bool isolated = (borderType & BORDER_ISOLATED) != 0;