提交 9cc80a68 编写于 作者: I Ilya Lavrenov

fixed warnings

上级 76c415ff
......@@ -1078,7 +1078,7 @@ void cv::filterSpeckles( InputOutputArray _img, double _newval, int maxSpeckleSi
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 );
......@@ -1089,7 +1089,7 @@ void cv::filterSpeckles( InputOutputArray _img, double _newval, int maxSpeckleSi
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;
......@@ -1101,7 +1101,6 @@ void cv::filterSpeckles( InputOutputArray _img, double _newval, int maxSpeckleSi
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;
}
......
......@@ -35,6 +35,28 @@ OCL_PERF_TEST_P(SetToFixture, SetTo,
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;
......@@ -79,6 +101,27 @@ OCL_PERF_TEST_P(CopyToFixture, CopyTo,
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
......@@ -2011,7 +2011,8 @@ recip_( const T*, size_t, const T* src2, size_t step2,
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,
......
......@@ -442,9 +442,11 @@ void cv::accumulate( InputArray _src, InputOutputArray _dst, InputArray _mask )
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)
{
......
......@@ -473,7 +473,7 @@ void cv::cornerHarris( InputArray _src, OutputArray _dst, int blockSize, int ksi
_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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册