{
#if (ARITHM_USE_IPP == 1)
fixSteps(sz, sizeof(dst[0]), step1, step2, step);
- if (0 <= ippiAdd_8u_C1RSfs(src1, (int)step1, src2, (int)step2, dst, (int)step, (IppiSize&)sz, 0))
+ if (0 <= ippiAdd_8u_C1RSfs(src1, (int)step1, src2, (int)step2, dst, (int)step, ippiSize(sz), 0))
return;
#endif
(vBinOp<uchar, OpAdd<uchar>, IF_SIMD(VAdd<uchar>)>(src1, step1, src2, step2, dst, step, sz));
{
#if (ARITHM_USE_IPP == 1)
fixSteps(sz, sizeof(dst[0]), step1, step2, step);
- if (0 <= ippiAdd_16u_C1RSfs(src1, (int)step1, src2, (int)step2, dst, (int)step, (IppiSize&)sz, 0))
+ if (0 <= ippiAdd_16u_C1RSfs(src1, (int)step1, src2, (int)step2, dst, (int)step, ippiSize(sz), 0))
return;
#endif
(vBinOp<ushort, OpAdd<ushort>, IF_SIMD(VAdd<ushort>)>(src1, step1, src2, step2, dst, step, sz));
{
#if (ARITHM_USE_IPP == 1)
fixSteps(sz, sizeof(dst[0]), step1, step2, step);
- if (0 <= ippiAdd_16s_C1RSfs(src1, (int)step1, src2, (int)step2, dst, (int)step, (IppiSize&)sz, 0))
+ if (0 <= ippiAdd_16s_C1RSfs(src1, (int)step1, src2, (int)step2, dst, (int)step, ippiSize(sz), 0))
return;
#endif
(vBinOp<short, OpAdd<short>, IF_SIMD(VAdd<short>)>(src1, step1, src2, step2, dst, step, sz));
{
#if (ARITHM_USE_IPP == 1)
fixSteps(sz, sizeof(dst[0]), step1, step2, step);
- if (0 <= ippiAdd_32f_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, (IppiSize&)sz))
+ if (0 <= ippiAdd_32f_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, ippiSize(sz)))
return;
#endif
(vBinOp32<float, OpAdd<float>, IF_SIMD(VAdd<float>)>(src1, step1, src2, step2, dst, step, sz));
{
#if (ARITHM_USE_IPP == 1)
fixSteps(sz, sizeof(dst[0]), step1, step2, step);
- if (0 <= ippiSub_8u_C1RSfs(src2, (int)step2, src1, (int)step1, dst, (int)step, (IppiSize&)sz, 0))
+ if (0 <= ippiSub_8u_C1RSfs(src2, (int)step2, src1, (int)step1, dst, (int)step, ippiSize(sz), 0))
return;
#endif
(vBinOp<uchar, OpSub<uchar>, IF_SIMD(VSub<uchar>)>(src1, step1, src2, step2, dst, step, sz));
{
#if (ARITHM_USE_IPP == 1)
fixSteps(sz, sizeof(dst[0]), step1, step2, step);
- if (0 <= ippiSub_16u_C1RSfs(src2, (int)step2, src1, (int)step1, dst, (int)step, (IppiSize&)sz, 0))
+ if (0 <= ippiSub_16u_C1RSfs(src2, (int)step2, src1, (int)step1, dst, (int)step, ippiSize(sz), 0))
return;
#endif
(vBinOp<ushort, OpSub<ushort>, IF_SIMD(VSub<ushort>)>(src1, step1, src2, step2, dst, step, sz));
{
#if (ARITHM_USE_IPP == 1)
fixSteps(sz, sizeof(dst[0]), step1, step2, step);
- if (0 <= ippiSub_16s_C1RSfs(src2, (int)step2, src1, (int)step1, dst, (int)step, (IppiSize&)sz, 0))
+ if (0 <= ippiSub_16s_C1RSfs(src2, (int)step2, src1, (int)step1, dst, (int)step, ippiSize(sz), 0))
return;
#endif
(vBinOp<short, OpSub<short>, IF_SIMD(VSub<short>)>(src1, step1, src2, step2, dst, step, sz));
{
#if (ARITHM_USE_IPP == 1)
fixSteps(sz, sizeof(dst[0]), step1, step2, step);
- if (0 <= ippiSub_32f_C1R(src2, (int)step2, src1, (int)step1, dst, (int)step, (IppiSize&)sz))
+ if (0 <= ippiSub_32f_C1R(src2, (int)step2, src1, (int)step1, dst, (int)step, ippiSize(sz)))
return;
#endif
(vBinOp32<float, OpSub<float>, IF_SIMD(VSub<float>)>(src1, step1, src2, step2, dst, step, sz));
{
#if (ARITHM_USE_IPP == 1)
fixSteps(sz, sizeof(dst[0]), step1, step2, step);
- if (0 <= ippiAbsDiff_8u_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, (IppiSize&)sz))
+ if (0 <= ippiAbsDiff_8u_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, ippiSize(sz)))
return;
#endif
(vBinOp<uchar, OpAbsDiff<uchar>, IF_SIMD(VAbsDiff<uchar>)>(src1, step1, src2, step2, dst, step, sz));
{
#if (ARITHM_USE_IPP == 1)
fixSteps(sz, sizeof(dst[0]), step1, step2, step);
- if (0 <= ippiAbsDiff_16u_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, (IppiSize&)sz))
+ if (0 <= ippiAbsDiff_16u_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, ippiSize(sz)))
return;
#endif
(vBinOp<ushort, OpAbsDiff<ushort>, IF_SIMD(VAbsDiff<ushort>)>(src1, step1, src2, step2, dst, step, sz));
{
#if (ARITHM_USE_IPP == 1)
fixSteps(sz, sizeof(dst[0]), step1, step2, step);
- if (0 <= ippiAbsDiff_32f_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, (IppiSize&)sz))
+ if (0 <= ippiAbsDiff_32f_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, ippiSize(sz)))
return;
#endif
(vBinOp32<float, OpAbsDiff<float>, IF_SIMD(VAbsDiff<float>)>(src1, step1, src2, step2, dst, step, sz));
{
#if (ARITHM_USE_IPP == 1)
fixSteps(sz, sizeof(dst[0]), step1, step2, step);
- if (0 <= ippiAnd_8u_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, (IppiSize&)sz))
+ if (0 <= ippiAnd_8u_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, ippiSize(sz)))
return;
#endif
(vBinOp<uchar, OpAnd<uchar>, IF_SIMD(VAnd<uchar>)>(src1, step1, src2, step2, dst, step, sz));
{
#if (ARITHM_USE_IPP == 1)
fixSteps(sz, sizeof(dst[0]), step1, step2, step);
- if (0 <= ippiOr_8u_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, (IppiSize&)sz))
+ if (0 <= ippiOr_8u_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, ippiSize(sz)))
return;
#endif
(vBinOp<uchar, OpOr<uchar>, IF_SIMD(VOr<uchar>)>(src1, step1, src2, step2, dst, step, sz));
{
#if (ARITHM_USE_IPP == 1)
fixSteps(sz, sizeof(dst[0]), step1, step2, step);
- if (0 <= ippiXor_8u_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, (IppiSize&)sz))
+ if (0 <= ippiXor_8u_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, ippiSize(sz)))
return;
#endif
(vBinOp<uchar, OpXor<uchar>, IF_SIMD(VXor<uchar>)>(src1, step1, src2, step2, dst, step, sz));
uchar* dst, size_t step, Size sz, void* )
{
#if (ARITHM_USE_IPP == 1)
- fixSteps(sz, sizeof(dst[0]), step1, step2, step); (void *)src2;
- if (0 <= ippiNot_8u_C1R(src1, (int)step1, dst, (int)step, (IppiSize&)sz))
+ fixSteps(sz, sizeof(dst[0]), step1, step2, step); (void)src2;
+ if (0 <= ippiNot_8u_C1R(src1, (int)step1, dst, (int)step, ippiSize(sz)))
return;
#endif
(vBinOp<uchar, OpNot<uchar>, IF_SIMD(VNot<uchar>)>(src1, step1, src2, step2, dst, step, sz));
if( op >= 0 )
{
fixSteps(size, sizeof(dst[0]), step1, step2, step);
- if (0 <= ippiCompare_8u_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, (IppiSize&)size, op))
+ if (0 <= ippiCompare_8u_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, ippiSize(size), op))
return;
}
#endif
if( op >= 0 )
{
fixSteps(size, sizeof(dst[0]), step1, step2, step);
- if (0 <= ippiCompare_16u_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, (IppiSize&)size, op))
+ if (0 <= ippiCompare_16u_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, ippiSize(size), op))
return;
}
#endif
if( op > 0 )
{
fixSteps(size, sizeof(dst[0]), step1, step2, step);
- if (0 <= ippiCompare_16s_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, (IppiSize&)size, op))
+ if (0 <= ippiCompare_16s_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, ippiSize(size), op))
return;
}
#endif
if( op >= 0 )
{
fixSteps(size, sizeof(dst[0]), step1, step2, step);
- if (0 <= ippiCompare_32f_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, (IppiSize&)size, op))
+ if (0 <= ippiCompare_32f_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, ippiSize(size), op))
return;
}
#endif
typedef IppStatus (CV_STDCALL* ippiResizeGetSrcOffset)(void*, IppiPoint, IppiPoint*);
#endif
-#if defined (HAVE_IPP) && (IPP_VERSION_MAJOR >= 7)
+#if defined (HAVE_IPP) && (IPP_VERSION_MAJOR >= 7) && 0
typedef IppStatus (CV_STDCALL* ippiSetFunc)(const void*, void *, int, IppiSize);
typedef IppStatus (CV_STDCALL* ippiWarpPerspectiveFunc)(const void*, IppiSize, int, IppiRect, void *, int, IppiRect, double [3][3], int);
typedef IppStatus (CV_STDCALL* ippiWarpAffineBackFunc)(const void*, IppiSize, int, IppiRect, void *, int, IppiRect, double [2][3], int);
/*
-#if defined (HAVE_IPP) && IPP_VERSION_MAJOR * 10 + IPP_VERSION_MINOR >= 81
+#if defined (HAVE_IPP) && IPP_VERSION_MAJOR * 100 + IPP_VERSION_MINOR >= 801
class IPPWarpAffineInvoker :
public ParallelLoopBody
{
const int AB_SCALE = 1 << AB_BITS;
/*
-#if defined (HAVE_IPP) && IPP_VERSION_MAJOR * 10 + IPP_VERSION_MINOR >= 81
+#if defined (HAVE_IPP) && IPP_VERSION_MAJOR * 100 + IPP_VERSION_MINOR >= 801
int type = src.type(), depth = CV_MAT_DEPTH(type), cn = CV_MAT_CN(type);
if( ( depth == CV_8U || depth == CV_16U || depth == CV_32F ) &&
( cn == 1 || cn == 3 || cn == 4 ) &&
};
/*
-#if defined (HAVE_IPP) && IPP_VERSION_MAJOR * 10 + IPP_VERSION_MINOR >= 81
+#if defined (HAVE_IPP) && IPP_VERSION_MAJOR * 100 + IPP_VERSION_MINOR >= 801
class IPPWarpPerspectiveInvoker :
- public ParallelLoopBody
+ public ParallelLoopBody
{
public:
- IPPWarpPerspectiveInvoker(Mat &_src, Mat &_dst, double (&_coeffs)[3][3], int &_interpolation,
- int &_borderType, const Scalar &_borderValue, ippiWarpPerspectiveFunc _func, bool *_ok) :
- ParallelLoopBody(), src(_src), dst(_dst), mode(_interpolation), coeffs(_coeffs),
- borderType(_borderType), borderValue(_borderValue), func(_func), ok(_ok)
- {
- *ok = true;
- }
-
- virtual void operator() (const Range& range) const
- {
- IppiSize srcsize = {src.cols, src.rows};
- IppiRect srcroi = {0, 0, src.cols, src.rows};
- IppiRect dstroi = {0, range.start, dst.cols, range.end - range.start};
- int cnn = src.channels();
-
- if( borderType == BORDER_CONSTANT )
- {
- IppiSize setSize = {dst.cols, range.end - range.start};
- void *dataPointer = dst.data + dst.step[0] * range.start;
- if( !IPPSet( borderValue, dataPointer, (int)dst.step[0], setSize, cnn, src.depth() ) )
- {
- *ok = false;
- return;
- }
- }
-
- IppStatus status = func(src.data, srcsize, (int)src.step[0], srcroi, dst.data, (int)dst.step[0], dstroi, coeffs, mode);
- printf("%d\n", status);
- if (status != ippStsNoErr)
- *ok = false;
- }
+ IPPWarpPerspectiveInvoker(Mat &_src, Mat &_dst, double (&_coeffs)[3][3], int &_interpolation,
+ int &_borderType, const Scalar &_borderValue, ippiWarpPerspectiveFunc _func, bool *_ok) :
+ ParallelLoopBody(), src(_src), dst(_dst), mode(_interpolation), coeffs(_coeffs),
+ borderType(_borderType), borderValue(_borderValue), func(_func), ok(_ok)
+ {
+ *ok = true;
+ }
+
+ virtual void operator() (const Range& range) const
+ {
+ IppiSize srcsize = {src.cols, src.rows};
+ IppiRect srcroi = {0, 0, src.cols, src.rows};
+ IppiRect dstroi = {0, range.start, dst.cols, range.end - range.start};
+ int cnn = src.channels();
+
+ if( borderType == BORDER_CONSTANT )
+ {
+ IppiSize setSize = {dst.cols, range.end - range.start};
+ void *dataPointer = dst.data + dst.step[0] * range.start;
+ if( !IPPSet( borderValue, dataPointer, (int)dst.step[0], setSize, cnn, src.depth() ) )
+ {
+ *ok = false;
+ return;
+ }
+ }
+
+ IppStatus status = func(src.data, srcsize, (int)src.step[0], srcroi, dst.data, (int)dst.step[0], dstroi, coeffs, mode);
+ if (status != ippStsNoErr)
+ *ok = false;
+ }
private:
- Mat &src;
- Mat &dst;
- int mode;
- double (&coeffs)[3][3];
- int borderType;
- const Scalar borderValue;
- ippiWarpPerspectiveFunc func;
- bool *ok;
-
- const IPPWarpPerspectiveInvoker& operator= (const IPPWarpPerspectiveInvoker&);
+ Mat &src;
+ Mat &dst;
+ int mode;
+ double (&coeffs)[3][3];
+ int borderType;
+ const Scalar borderValue;
+ ippiWarpPerspectiveFunc func;
+ bool *ok;
+
+ const IPPWarpPerspectiveInvoker& operator= (const IPPWarpPerspectiveInvoker&);
};
#endif
*/
#endif
/*
-#if defined (HAVE_IPP) && IPP_VERSION_MAJOR * 10 + IPP_VERSION_MINOR >= 81
+#if defined (HAVE_IPP) && IPP_VERSION_MAJOR * 100 + IPP_VERSION_MINOR >= 801
int type = src.type(), depth = CV_MAT_DEPTH(type), cn = CV_MAT_CN(type);
if( (depth == CV_8U || depth == CV_16U || depth == CV_32F) &&
(cn == 1 || cn == 3 || cn == 4) &&