mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 23:33:05 +04:00
Update for IPP for OpenCV 2017u2 integration;
Updated integrations for: cv::split cv::merge cv::insertChannel cv::extractChannel cv::Mat::convertTo - now with scaled conversions support cv::LUT - disabled due to performance issues Mat::copyTo Mat::setTo cv::flip cv::copyMakeBorder - currently disabled cv::polarToCart cv::pow - ipp pow function was removed due to performance issues cv::hal::magnitude32f/64f - disabled for <= SSE42, poor performance cv::countNonZero cv::minMaxIdx cv::norm cv::canny - new integration. Disabled for threaded; cv::cornerHarris cv::boxFilter cv::bilateralFilter cv::integral
This commit is contained in:
+20
-67
@@ -3100,18 +3100,8 @@ dotProd_(const T* src1, const T* src2, int len)
|
||||
static double dotProd_8u(const uchar* src1, const uchar* src2, int len)
|
||||
{
|
||||
double r = 0;
|
||||
#if ARITHM_USE_IPP && IPP_DISABLE_BLOCK
|
||||
CV_IPP_CHECK()
|
||||
{
|
||||
if (0 <= CV_INSTRUMENT_FUN_IPP(ippiDotProd_8u64f_C1R, (src1, (int)(len*sizeof(src1[0])),
|
||||
src2, (int)(len*sizeof(src2[0])),
|
||||
ippiSize(len, 1), &r)))
|
||||
{
|
||||
CV_IMPL_ADD(CV_IMPL_IPP);
|
||||
return r;
|
||||
}
|
||||
setIppErrorStatus();
|
||||
}
|
||||
#if ARITHM_USE_IPP
|
||||
CV_IPP_RUN_FAST(CV_INSTRUMENT_FUN_IPP(ippiDotProd_8u64f_C1R, src1, len*sizeof(uchar), src2, len*sizeof(uchar), ippiSize(len, 1), &r) >= 0, r);
|
||||
#endif
|
||||
int i = 0;
|
||||
|
||||
@@ -3298,51 +3288,27 @@ static double dotProd_8s(const schar* src1, const schar* src2, int len)
|
||||
|
||||
static double dotProd_16u(const ushort* src1, const ushort* src2, int len)
|
||||
{
|
||||
#if (ARITHM_USE_IPP == 1)
|
||||
CV_IPP_CHECK()
|
||||
{
|
||||
double r = 0;
|
||||
if (0 <= CV_INSTRUMENT_FUN_IPP(ippiDotProd_16u64f_C1R, src1, (int)(len*sizeof(src1[0])), src2, (int)(len*sizeof(src2[0])), ippiSize(len, 1), &r))
|
||||
{
|
||||
CV_IMPL_ADD(CV_IMPL_IPP);
|
||||
return r;
|
||||
}
|
||||
setIppErrorStatus();
|
||||
}
|
||||
#if ARITHM_USE_IPP
|
||||
double r = 0;
|
||||
CV_IPP_RUN_FAST(CV_INSTRUMENT_FUN_IPP(ippiDotProd_16u64f_C1R, src1, len*sizeof(ushort), src2, len*sizeof(ushort), ippiSize(len, 1), &r) >= 0, r);
|
||||
#endif
|
||||
return dotProd_(src1, src2, len);
|
||||
}
|
||||
|
||||
static double dotProd_16s(const short* src1, const short* src2, int len)
|
||||
{
|
||||
#if (ARITHM_USE_IPP == 1) && (IPP_VERSION_X100 != 900) // bug in IPP 9.0.0
|
||||
CV_IPP_CHECK()
|
||||
{
|
||||
double r = 0;
|
||||
if (0 <= CV_INSTRUMENT_FUN_IPP(ippiDotProd_16s64f_C1R, src1, (int)(len*sizeof(src1[0])), src2, (int)(len*sizeof(src2[0])), ippiSize(len, 1), &r))
|
||||
{
|
||||
CV_IMPL_ADD(CV_IMPL_IPP);
|
||||
return r;
|
||||
}
|
||||
setIppErrorStatus();
|
||||
}
|
||||
#if ARITHM_USE_IPP && (IPP_VERSION_X100 != 900) // bug in IPP 9.0.0
|
||||
double r = 0;
|
||||
CV_IPP_RUN_FAST(CV_INSTRUMENT_FUN_IPP(ippiDotProd_16s64f_C1R, src1, len*sizeof(short), src2, len*sizeof(short), ippiSize(len, 1), &r) >= 0, r);
|
||||
#endif
|
||||
return dotProd_(src1, src2, len);
|
||||
}
|
||||
|
||||
static double dotProd_32s(const int* src1, const int* src2, int len)
|
||||
{
|
||||
#if (ARITHM_USE_IPP == 1)
|
||||
CV_IPP_CHECK()
|
||||
{
|
||||
double r = 0;
|
||||
if (0 <= CV_INSTRUMENT_FUN_IPP(ippiDotProd_32s64f_C1R, src1, (int)(len*sizeof(src1[0])), src2, (int)(len*sizeof(src2[0])), ippiSize(len, 1), &r))
|
||||
{
|
||||
CV_IMPL_ADD(CV_IMPL_IPP);
|
||||
return r;
|
||||
}
|
||||
setIppErrorStatus();
|
||||
}
|
||||
#if ARITHM_USE_IPP
|
||||
double r = 0;
|
||||
CV_IPP_RUN_FAST(CV_INSTRUMENT_FUN_IPP(ippiDotProd_32s64f_C1R, src1, len*sizeof(int), src2, len*sizeof(int), ippiSize(len, 1), &r) >= 0, r);
|
||||
#endif
|
||||
return dotProd_(src1, src2, len);
|
||||
}
|
||||
@@ -3350,19 +3316,13 @@ static double dotProd_32s(const int* src1, const int* src2, int len)
|
||||
static double dotProd_32f(const float* src1, const float* src2, int len)
|
||||
{
|
||||
double r = 0.0;
|
||||
|
||||
#if ARITHM_USE_IPP
|
||||
CV_IPP_RUN_FAST(CV_INSTRUMENT_FUN_IPP(ippiDotProd_32f64f_C1R, src1, len*sizeof(float), src2, len*sizeof(float), ippiSize(len, 1), &r, ippAlgHintFast) >= 0, r);
|
||||
#endif
|
||||
int i = 0;
|
||||
|
||||
#if (ARITHM_USE_IPP == 1)
|
||||
CV_IPP_CHECK()
|
||||
{
|
||||
if (0 <= CV_INSTRUMENT_FUN_IPP(ippsDotProd_32f64f, src1, src2, len, &r))
|
||||
{
|
||||
CV_IMPL_ADD(CV_IMPL_IPP);
|
||||
return r;
|
||||
}
|
||||
setIppErrorStatus();
|
||||
}
|
||||
#elif CV_NEON
|
||||
#if CV_NEON
|
||||
int len0 = len & -4, blockSize0 = (1 << 13), blockSize;
|
||||
float32x4_t v_zero = vdupq_n_f32(0.0f);
|
||||
CV_DECL_ALIGNED(16) float buf[4];
|
||||
@@ -3389,18 +3349,11 @@ static double dotProd_32f(const float* src1, const float* src2, int len)
|
||||
|
||||
static double dotProd_64f(const double* src1, const double* src2, int len)
|
||||
{
|
||||
#if (ARITHM_USE_IPP == 1)
|
||||
CV_IPP_CHECK()
|
||||
{
|
||||
double r = 0;
|
||||
if (0 <= CV_INSTRUMENT_FUN_IPP(ippsDotProd_64f, src1, src2, len, &r))
|
||||
{
|
||||
CV_IMPL_ADD(CV_IMPL_IPP);
|
||||
return r;
|
||||
}
|
||||
setIppErrorStatus();
|
||||
}
|
||||
#if ARITHM_USE_IPP
|
||||
double r = 0;
|
||||
CV_IPP_RUN_FAST(CV_INSTRUMENT_FUN_IPP(ippsDotProd_64f, src1, src2, len, &r) >= 0, r);
|
||||
#endif
|
||||
|
||||
return dotProd_(src1, src2, len);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user