uchar* dst, size_t step, Size sz, void* )
{
IF_IPP(fixSteps(sz, sizeof(dst[0]), step1, step2, step);
- ippiAdd_8u_C1RSfs(src1, (int)step1, src2, (int)step2, dst, (int)step, (IppiSize&)sz, 0),
+ ippiAdd_8u_C1RSfs(src1, (int)step1, src2, (int)step2, dst, (int)step, ippiSize(sz), 0),
(vBinOp8<uchar, OpAdd<uchar>, IF_SIMD(_VAdd8u)>(src1, step1, src2, step2, dst, step, sz)));
}
ushort* dst, size_t step, Size sz, void* )
{
IF_IPP(fixSteps(sz, sizeof(dst[0]), step1, step2, step);
- ippiAdd_16u_C1RSfs(src1, (int)step1, src2, (int)step2, dst, (int)step, (IppiSize&)sz, 0),
+ ippiAdd_16u_C1RSfs(src1, (int)step1, src2, (int)step2, dst, (int)step, ippiSize(sz), 0),
(vBinOp16<ushort, OpAdd<ushort>, IF_SIMD(_VAdd16u)>(src1, step1, src2, step2, dst, step, sz)));
}
short* dst, size_t step, Size sz, void* )
{
IF_IPP(fixSteps(sz, sizeof(dst[0]), step1, step2, step);
- ippiAdd_16s_C1RSfs(src1, (int)step1, src2, (int)step2, dst, (int)step, (IppiSize&)sz, 0),
+ ippiAdd_16s_C1RSfs(src1, (int)step1, src2, (int)step2, dst, (int)step, ippiSize(sz), 0),
(vBinOp16<short, OpAdd<short>, IF_SIMD(_VAdd16s)>(src1, step1, src2, step2, dst, step, sz)));
}
float* dst, size_t step, Size sz, void* )
{
IF_IPP(fixSteps(sz, sizeof(dst[0]), step1, step2, step);
- ippiAdd_32f_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, (IppiSize&)sz),
+ ippiAdd_32f_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, ippiSize(sz)),
(vBinOp32f<OpAdd<float>, IF_SIMD(_VAdd32f)>(src1, step1, src2, step2, dst, step, sz)));
}
uchar* dst, size_t step, Size sz, void* )
{
IF_IPP(fixSteps(sz, sizeof(dst[0]), step1, step2, step);
- ippiSub_8u_C1RSfs(src2, (int)step2, src1, (int)step1, dst, (int)step, (IppiSize&)sz, 0),
+ ippiSub_8u_C1RSfs(src2, (int)step2, src1, (int)step1, dst, (int)step, ippiSize(sz), 0),
(vBinOp8<uchar, OpSub<uchar>, IF_SIMD(_VSub8u)>(src1, step1, src2, step2, dst, step, sz)));
}
ushort* dst, size_t step, Size sz, void* )
{
IF_IPP(fixSteps(sz, sizeof(dst[0]), step1, step2, step);
- ippiSub_16u_C1RSfs(src2, (int)step2, src1, (int)step1, dst, (int)step, (IppiSize&)sz, 0),
+ ippiSub_16u_C1RSfs(src2, (int)step2, src1, (int)step1, dst, (int)step, ippiSize(sz), 0),
(vBinOp16<ushort, OpSub<ushort>, IF_SIMD(_VSub16u)>(src1, step1, src2, step2, dst, step, sz)));
}
short* dst, size_t step, Size sz, void* )
{
IF_IPP(fixSteps(sz, sizeof(dst[0]), step1, step2, step);
- ippiSub_16s_C1RSfs(src2, (int)step2, src1, (int)step1, dst, (int)step, (IppiSize&)sz, 0),
+ ippiSub_16s_C1RSfs(src2, (int)step2, src1, (int)step1, dst, (int)step, ippiSize(sz), 0),
(vBinOp16<short, OpSub<short>, IF_SIMD(_VSub16s)>(src1, step1, src2, step2, dst, step, sz)));
}
float* dst, size_t step, Size sz, void* )
{
IF_IPP(fixSteps(sz, sizeof(dst[0]), step1, step2, step);
- ippiSub_32f_C1R(src2, (int)step2, src1, (int)step1, dst, (int)step, (IppiSize&)sz),
+ ippiSub_32f_C1R(src2, (int)step2, src1, (int)step1, dst, (int)step, ippiSize(sz)),
(vBinOp32f<OpSub<float>, IF_SIMD(_VSub32f)>(src1, step1, src2, step2, dst, step, sz)));
}
#endif
// IF_IPP(fixSteps(sz, sizeof(dst[0]), step1, step2, step);
-// ippiMaxEvery_8u_C1R(src1, (int)step1, src2, (int)step2, dst, (IppiSize&)sz),
+// ippiMaxEvery_8u_C1R(src1, (int)step1, src2, (int)step2, dst, ippiSize(sz)),
// (vBinOp8<uchar, OpMax<uchar>, IF_SIMD(_VMax8u)>(src1, step1, src2, step2, dst, step, sz)));
}
#endif
// IF_IPP(fixSteps(sz, sizeof(dst[0]), step1, step2, step);
-// ippiMaxEvery_16u_C1R(src1, (int)step1, src2, (int)step2, dst, (IppiSize&)sz),
+// ippiMaxEvery_16u_C1R(src1, (int)step1, src2, (int)step2, dst, ippiSize(sz)),
// (vBinOp16<ushort, OpMax<ushort>, IF_SIMD(_VMax16u)>(src1, step1, src2, step2, dst, step, sz)));
}
vBinOp32f<OpMax<float>, IF_SIMD(_VMax32f)>(src1, step1, src2, step2, dst, step, sz);
#endif
// IF_IPP(fixSteps(sz, sizeof(dst[0]), step1, step2, step);
-// ippiMaxEvery_32f_C1R(src1, (int)step1, src2, (int)step2, dst, (IppiSize&)sz),
+// ippiMaxEvery_32f_C1R(src1, (int)step1, src2, (int)step2, dst, ippiSize(sz)),
// (vBinOp32f<OpMax<float>, IF_SIMD(_VMax32f)>(src1, step1, src2, step2, dst, step, sz)));
}
#endif
// IF_IPP(fixSteps(sz, sizeof(dst[0]), step1, step2, step);
-// ippiMinEvery_8u_C1R(src1, (int)step1, src2, (int)step2, dst, (IppiSize&)sz),
+// ippiMinEvery_8u_C1R(src1, (int)step1, src2, (int)step2, dst, ippiSize(sz)),
// (vBinOp8<uchar, OpMin<uchar>, IF_SIMD(_VMin8u)>(src1, step1, src2, step2, dst, step, sz)));
}
#endif
// IF_IPP(fixSteps(sz, sizeof(dst[0]), step1, step2, step);
-// ippiMinEvery_16u_C1R(src1, (int)step1, src2, (int)step2, dst, (IppiSize&)sz),
+// ippiMinEvery_16u_C1R(src1, (int)step1, src2, (int)step2, dst, ippiSize(sz)),
// (vBinOp16<ushort, OpMin<ushort>, IF_SIMD(_VMin16u)>(src1, step1, src2, step2, dst, step, sz)));
}
vBinOp32f<OpMin<float>, IF_SIMD(_VMin32f)>(src1, step1, src2, step2, dst, step, sz);
#endif
// IF_IPP(fixSteps(sz, sizeof(dst[0]), step1, step2, step);
-// ippiMinEvery_32f_C1R(src1, (int)step1, src2, (int)step2, dst, (IppiSize&)sz),
+// ippiMinEvery_32f_C1R(src1, (int)step1, src2, (int)step2, dst, ippiSize(sz)),
// (vBinOp32f<OpMin<float>, IF_SIMD(_VMin32f)>(src1, step1, src2, step2, dst, step, sz)));
}
uchar* dst, size_t step, Size sz, void* )
{
IF_IPP(fixSteps(sz, sizeof(dst[0]), step1, step2, step);
- ippiAbsDiff_8u_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, (IppiSize&)sz),
+ ippiAbsDiff_8u_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, ippiSize(sz)),
(vBinOp8<uchar, OpAbsDiff<uchar>, IF_SIMD(_VAbsDiff8u)>(src1, step1, src2, step2, dst, step, sz)));
}
ushort* dst, size_t step, Size sz, void* )
{
IF_IPP(fixSteps(sz, sizeof(dst[0]), step1, step2, step);
- ippiAbsDiff_16u_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, (IppiSize&)sz),
+ ippiAbsDiff_16u_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, ippiSize(sz)),
(vBinOp16<ushort, OpAbsDiff<ushort>, IF_SIMD(_VAbsDiff16u)>(src1, step1, src2, step2, dst, step, sz)));
}
float* dst, size_t step, Size sz, void* )
{
IF_IPP(fixSteps(sz, sizeof(dst[0]), step1, step2, step);
- ippiAbsDiff_32f_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, (IppiSize&)sz),
+ ippiAbsDiff_32f_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, ippiSize(sz)),
(vBinOp32f<OpAbsDiff<float>, IF_SIMD(_VAbsDiff32f)>(src1, step1, src2, step2, dst, step, sz)));
}
uchar* dst, size_t step, Size sz, void* )
{
IF_IPP(fixSteps(sz, sizeof(dst[0]), step1, step2, step);
- ippiAnd_8u_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, (IppiSize&)sz),
+ ippiAnd_8u_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, ippiSize(sz)),
(vBinOp8<uchar, OpAnd<uchar>, IF_SIMD(_VAnd8u)>(src1, step1, src2, step2, dst, step, sz)));
}
uchar* dst, size_t step, Size sz, void* )
{
IF_IPP(fixSteps(sz, sizeof(dst[0]), step1, step2, step);
- ippiOr_8u_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, (IppiSize&)sz),
+ ippiOr_8u_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, ippiSize(sz)),
(vBinOp8<uchar, OpOr<uchar>, IF_SIMD(_VOr8u)>(src1, step1, src2, step2, dst, step, sz)));
}
uchar* dst, size_t step, Size sz, void* )
{
IF_IPP(fixSteps(sz, sizeof(dst[0]), step1, step2, step);
- ippiXor_8u_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, (IppiSize&)sz),
+ ippiXor_8u_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, ippiSize(sz)),
(vBinOp8<uchar, OpXor<uchar>, IF_SIMD(_VXor8u)>(src1, step1, src2, step2, dst, step, sz)));
}
const uchar* src2, size_t step2,
uchar* dst, size_t step, Size sz, void* )
{
- IF_IPP(fixSteps(sz, sizeof(dst[0]), step1, step2, step); (void *)src2;
- ippiNot_8u_C1R(src1, (int)step1, dst, (int)step, (IppiSize&)sz),
+ IF_IPP(fixSteps(sz, sizeof(dst[0]), step1, step2, step); (void)src2;
+ ippiNot_8u_C1R(src1, (int)step1, dst, (int)step, ippiSize(sz)),
(vBinOp8<uchar, OpNot<uchar>, IF_SIMD(_VNot8u)>(src1, step1, src2, step2, dst, step, sz)));
}
if( op >= 0 )
{
fixSteps(size, sizeof(dst[0]), step1, step2, step);
- if( ippiCompare_8u_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, (IppiSize&)size, op) >= 0 )
+ if( ippiCompare_8u_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, ippiSize(size), op) >= 0 )
return;
}
#endif
if( op >= 0 )
{
fixSteps(size, sizeof(dst[0]), step1, step2, step);
- if( ippiCompare_16u_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, (IppiSize&)size, op) >= 0 )
+ if( ippiCompare_16u_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, ippiSize(size), op) >= 0 )
return;
}
#endif
if( op > 0 )
{
fixSteps(size, sizeof(dst[0]), step1, step2, step);
- if( ippiCompare_16s_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, (IppiSize&)size, op) >= 0 )
+ if( ippiCompare_16s_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, ippiSize(size), op) >= 0 )
return;
}
#endif
if( op >= 0 )
{
fixSteps(size, sizeof(dst[0]), step1, step2, step);
- if( ippiCompare_32f_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, (IppiSize&)size, op) >= 0 )
+ if( ippiCompare_32f_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, ippiSize(size), op) >= 0 )
return;
}
#endif
return func(values, dataPointer, step, size) >= 0;
}
- bool IPPSet(const cv::Scalar &value, void *dataPointer, int step, IppiSize &size, int channels, int depth)
+ static bool IPPSet(const cv::Scalar &value, void *dataPointer, int step, IppiSize &size, int channels, int depth)
{
if( channels == 1 )
{
public ParallelLoopBody
{
public:
- IPPwarpAffineInvoker(Mat &_src, Mat &_dst, double (&_coeffs)[2][3], int &_interpolation, int &_borderType, const Scalar &_borderValue, ippiWarpAffineBackFunc _func, bool *_ok) :
- ParallelLoopBody(), src(_src), dst(_dst), mode(_interpolation), coeffs(_coeffs), borderType(_borderType), borderValue(_borderValue), func(_func), ok(_ok)
- {
- *ok = true;
- }
+ IPPwarpAffineInvoker(Mat &_src, Mat &_dst, double (&_coeffs)[2][3], int &_interpolation, int &_borderType,
+ const Scalar &_borderValue, ippiWarpAffineBackFunc _func, bool *_ok) :
+ ParallelLoopBody(), src(_src), dst(_dst), coeffs(_coeffs), mode(_interpolation), 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;
- }
- }
- if( func( src.data, srcsize, (int)src.step[0], srcroi, dst.data, (int)dst.step[0], dstroi, coeffs, mode ) < 0) ////Aug 2013: problem in IPP 7.1, 8.0 : sometimes function return ippStsCoeffErr
- *ok = false;
- }
+ 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;
+ }
+ }
+ if( func( src.data, srcsize, (int)src.step[0], srcroi, dst.data, (int)dst.step[0], dstroi, coeffs, mode ) < 0) ////Aug 2013: problem in IPP 7.1, 8.0 : sometimes function return ippStsCoeffErr
+ *ok = false;
+ }
private:
Mat &src;
Mat &dst;
public ParallelLoopBody
{
public:
-
warpPerspectiveInvoker(const Mat &_src, Mat &_dst, double *_M, int _interpolation,
int _borderType, const Scalar &_borderValue) :
ParallelLoopBody(), src(_src), dst(_dst), M(_M), interpolation(_interpolation),
public ParallelLoopBody
{
public:
- IPPwarpPerspectiveInvoker(Mat &_src, Mat &_dst, double (&_coeffs)[3][3], int &_interpolation, int &_borderType, const Scalar &_borderValue, ippiWarpPerspectiveBackFunc _func, bool *_ok) :
- ParallelLoopBody(), src(_src), dst(_dst), mode(_interpolation), coeffs(_coeffs), borderType(_borderType), borderValue(_borderValue), func(_func), ok(_ok)
- {
- *ok = true;
- }
+ IPPwarpPerspectiveInvoker(Mat &_src, Mat &_dst, double (&_coeffs)[3][3], int &_interpolation,
+ int &_borderType, const Scalar &_borderValue, ippiWarpPerspectiveBackFunc _func, bool *_ok) :
+ ParallelLoopBody(), src(_src), dst(_dst), coeffs(_coeffs), mode(_interpolation),
+ 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;
- }
- }
- if( func(src.data, srcsize, (int)src.step[0], srcroi, dst.data, (int)dst.step[0], dstroi, coeffs, mode) < 0)
- *ok = false;
- }
+ 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;
+ }
+ }
+ if( func(src.data, srcsize, (int)src.step[0], srcroi, dst.data, (int)dst.step[0], dstroi, coeffs, mode) < 0)
+ *ok = false;
+ }
private:
Mat &src;
Mat &dst;