mirror of
https://github.com/opencv/opencv.git
synced 2026-07-31 08:13:04 +04:00
Merge remote-tracking branch 'upstream/3.4' into merge-3.4
This commit is contained in:
@@ -389,7 +389,7 @@ Ptr<FilterEngine> createBoxFilter(int srcType, int dstType, Size ksize,
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_IPP)
|
||||
#if 0 //defined(HAVE_IPP)
|
||||
static bool ipp_boxfilter(Mat &src, Mat &dst, Size ksize, Point anchor, bool normalize, int borderType)
|
||||
{
|
||||
#ifdef HAVE_IPP_IW
|
||||
@@ -476,7 +476,7 @@ void boxFilter(InputArray _src, OutputArray _dst, int ddepth,
|
||||
CV_OVX_RUN(true,
|
||||
openvx_boxfilter(src, dst, ddepth, ksize, anchor, normalize, borderType))
|
||||
|
||||
CV_IPP_RUN_FAST(ipp_boxfilter(src, dst, ksize, anchor, normalize, borderType));
|
||||
//CV_IPP_RUN_FAST(ipp_boxfilter(src, dst, ksize, anchor, normalize, borderType));
|
||||
|
||||
borderType = (borderType&~BORDER_ISOLATED);
|
||||
|
||||
|
||||
@@ -1153,14 +1153,14 @@ static void Bayer2RGB_VNG_8u( const Mat& srcmat, Mat& dstmat, int code )
|
||||
{
|
||||
Rs += srow[-bstep*2-2] + srow[0];
|
||||
Gs += brow0[N6-1];
|
||||
Bs += srow[-bstep+1]*2;
|
||||
Bs += srow[-bstep-1]*2;
|
||||
ng++;
|
||||
}
|
||||
if( gradSE < T )
|
||||
{
|
||||
Rs += srow[bstep*2+2] + srow[0];
|
||||
Gs += brow2[N6+1];
|
||||
Bs += srow[-bstep+1]*2;
|
||||
Bs += srow[bstep+1]*2;
|
||||
ng++;
|
||||
}
|
||||
R = srow[0];
|
||||
@@ -1394,8 +1394,8 @@ static void Bayer2RGB_VNG_8u( const Mat& srcmat, Mat& dstmat, int code )
|
||||
RGs = _mm_adds_epi16(RGs, _mm_and_si128(_mm_merge_epi16(t1, t0), mask));
|
||||
// GRs += {brow2[N6+1]; (srow[1]+srow[bstep*2+1])} * (T>gradSE)
|
||||
GRs = _mm_adds_epi16(GRs, _mm_and_si128(_mm_merge_epi16(_mm_loadu_si128((__m128i*)(brow2+N6+1)), _mm_adds_epi16(x7,x10)), mask));
|
||||
// Bs += {srow[-bstep+1]*2; (srow[bstep+2]+srow[bstep])} * (T>gradSE)
|
||||
Bs = _mm_adds_epi16(Bs, _mm_and_si128(_mm_merge_epi16(_mm_slli_epi16(x5, 1), _mm_adds_epi16(x8,x11)), mask));
|
||||
// Bs += {srow[bstep+1]*2; (srow[bstep+2]+srow[bstep])} * (T>gradSE)
|
||||
Bs = _mm_adds_epi16(Bs, _mm_and_si128(_mm_merge_epi16(_mm_slli_epi16(x9, 1), _mm_adds_epi16(x8,x11)), mask));
|
||||
|
||||
// gradS ***********************************************
|
||||
mask = _mm_cmpgt_epi16(T, gradS); // mask = T>gradS
|
||||
@@ -1451,7 +1451,7 @@ static void Bayer2RGB_VNG_8u( const Mat& srcmat, Mat& dstmat, int code )
|
||||
// GRs += {brow0[N6-1]; (srow[-bstep*2-1]+srow[-1])} * (T>gradNW)
|
||||
GRs = _mm_adds_epi16(GRs, _mm_and_si128(_mm_merge_epi16(_mm_loadu_si128((__m128i*)(brow0+N6-1)), _mm_adds_epi16(x2,x15)), mask));
|
||||
// Bs += {srow[-bstep-1]*2; (srow[-bstep]+srow[-bstep-2])} * (T>gradNW)
|
||||
Bs = _mm_adds_epi16(Bs, _mm_and_si128(_mm_merge_epi16(_mm_slli_epi16(x5, 1),_mm_adds_epi16(x3,x16)), mask));
|
||||
Bs = _mm_adds_epi16(Bs, _mm_and_si128(_mm_merge_epi16(_mm_slli_epi16(x1, 1),_mm_adds_epi16(x3,x16)), mask));
|
||||
|
||||
__m128 ngf0 = _mm_div_ps(_0_5, _mm_cvtloepi16_ps(ng));
|
||||
__m128 ngf1 = _mm_div_ps(_0_5, _mm_cvthiepi16_ps(ng));
|
||||
|
||||
@@ -1022,7 +1022,7 @@ static bool replacementFilter2D(int stype, int dtype, int kernel_type,
|
||||
return success;
|
||||
}
|
||||
|
||||
#ifdef HAVE_IPP
|
||||
#if 0 //defined HAVE_IPP
|
||||
static bool ippFilter2D(int stype, int dtype, int kernel_type,
|
||||
uchar * src_data, size_t src_step,
|
||||
uchar * dst_data, size_t dst_step,
|
||||
@@ -1286,7 +1286,7 @@ void filter2D(int stype, int dtype, int kernel_type,
|
||||
if (res)
|
||||
return;
|
||||
|
||||
CV_IPP_RUN_FAST(ippFilter2D(stype, dtype, kernel_type,
|
||||
/*CV_IPP_RUN_FAST(ippFilter2D(stype, dtype, kernel_type,
|
||||
src_data, src_step,
|
||||
dst_data, dst_step,
|
||||
width, height,
|
||||
@@ -1295,7 +1295,7 @@ void filter2D(int stype, int dtype, int kernel_type,
|
||||
kernel_data, kernel_step,
|
||||
kernel_width, kernel_height,
|
||||
anchor_x, anchor_y,
|
||||
delta, borderType, isSubmatrix))
|
||||
delta, borderType, isSubmatrix))*/
|
||||
|
||||
res = dftFilter2D(stype, dtype, kernel_type,
|
||||
src_data, src_step,
|
||||
|
||||
@@ -203,7 +203,7 @@ static bool openvx_medianFilter(InputArray _src, OutputArray _dst, int ksize)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_IPP
|
||||
#if 0 //defined HAVE_IPP
|
||||
static bool ipp_medianFilter(Mat &src0, Mat &dst, int ksize)
|
||||
{
|
||||
CV_INSTRUMENT_REGION_IPP();
|
||||
@@ -301,7 +301,7 @@ void medianBlur( InputArray _src0, OutputArray _dst, int ksize )
|
||||
CV_OVX_RUN(true,
|
||||
openvx_medianFilter(_src0, _dst, ksize))
|
||||
|
||||
CV_IPP_RUN_FAST(ipp_medianFilter(src0, dst, ksize));
|
||||
//CV_IPP_RUN_FAST(ipp_medianFilter(src0, dst, ksize));
|
||||
|
||||
#ifdef HAVE_TEGRA_OPTIMIZATION
|
||||
if (tegra::useTegra() && tegra::medianBlur(src0, dst, ksize))
|
||||
|
||||
@@ -363,7 +363,7 @@ static bool openvx_gaussianBlur(InputArray _src, OutputArray _dst, Size ksize,
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_IPP
|
||||
#if 0 //defined HAVE_IPP
|
||||
// IW 2017u2 has bug which doesn't allow use of partial inMem with tiling
|
||||
#if IPP_DISABLE_GAUSSIANBLUR_PARALLEL
|
||||
#define IPP_GAUSSIANBLUR_PARALLEL 0
|
||||
@@ -533,7 +533,7 @@ void GaussianBlur(InputArray _src, OutputArray _dst, Size ksize,
|
||||
CV_OVX_RUN(true,
|
||||
openvx_gaussianBlur(src, dst, ksize, sigma1, sigma2, borderType))
|
||||
|
||||
CV_IPP_RUN_FAST(ipp_GaussianBlur(src, dst, ksize, sigma1, sigma2, borderType));
|
||||
//CV_IPP_RUN_FAST(ipp_GaussianBlur(src, dst, ksize, sigma1, sigma2, borderType));
|
||||
|
||||
if(sdepth == CV_8U && ((borderType & BORDER_ISOLATED) || !_src.getMat().isSubmatrix()))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user