Skip to content

Commit ce65975

Browse files
author
elenagvo
committed
call HAL for GaussianBlur is fixed
1 parent a25c443 commit ce65975

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

modules/imgproc/src/hal_replacement.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -670,12 +670,12 @@ inline int hal_ni_threshold(const uchar* src_data, size_t src_step, uchar* dst_d
670670
@param src_data,src_step Source image
671671
@param dst_data,dst_step Destination image
672672
@param width,height Source image dimensions
673+
@param cn Number of channels
673674
@param margins Margins for source image
674675
@param ksize Size of kernel
675676
@param anchor Anchor point
676677
@param normalize If true then result is normalized
677678
@param border_type Border type
678-
@param cn Number of channels
679679
*/
680680
inline int hal_ni_boxFilter(int src_depth, int dst_depth, const uchar* src_data, size_t src_step, uchar* dst_data, size_t dst_step, int width, int height, int cn, CvRect margins, CvSize ksize, CvPoint anchor, bool normalize, int border_type) { return CV_HAL_ERROR_NOT_IMPLEMENTED; }
681681

@@ -685,15 +685,15 @@ inline int hal_ni_boxFilter(int src_depth, int dst_depth, const uchar* src_data,
685685

686686
/**
687687
@brief Blurs an image using a Gaussian filter.
688-
@param src_depth,dst_depth Depths of source and destination image
688+
@param depth Depth of source and destination image
689689
@param src_data,src_step Source image
690690
@param dst_data,dst_step Destination image
691691
@param width,height Source image dimensions
692+
@param cn Number of channels
692693
@param margins Margins for source image
693694
@param ksize Size of kernel
694695
@param sigmaX,sigmaY Gaussian kernel standard deviation.
695696
@param border_type Border type
696-
@param cn Number of channels
697697
*/
698698
inline int hal_ni_gaussianBlur(int depth, const uchar* src_data, size_t src_step, uchar* dst_data, size_t dst_step, int width, int height, int cn, CvRect margins, CvSize ksize, double sigmaX, double sigmaY, int border_type) { return CV_HAL_ERROR_NOT_IMPLEMENTED; }
699699

modules/imgproc/src/smooth.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2102,9 +2102,10 @@ void cv::GaussianBlur( InputArray _src, OutputArray _dst, Size ksize,
21022102
CV_OVX_RUN(true,
21032103
openvx_gaussianBlur(_src, _dst, ksize, sigma1, sigma2, borderType))
21042104

2105-
#ifdef HAVE_TEGRA_OPTIMIZATION
21062105
Mat src = _src.getMat();
21072106
Mat dst = _dst.getMat();
2107+
2108+
#ifdef HAVE_TEGRA_OPTIMIZATION
21082109
if(sigma1 == 0 && sigma2 == 0 && tegra::useTegra() && tegra::gaussian(src, dst, ksize, borderType))
21092110
return;
21102111
#endif
@@ -2114,9 +2115,6 @@ void cv::GaussianBlur( InputArray _src, OutputArray _dst, Size ksize,
21142115
_src.rows() > ksize.height && _src.cols() > ksize.width);
21152116
(void)useOpenCL;
21162117

2117-
Mat src = _src.getMat();
2118-
Mat dst = _dst.getMat();
2119-
21202118
int sdepth = CV_MAT_DEPTH(type), cn = CV_MAT_CN(type);
21212119

21222120
Point ofs;
@@ -2130,6 +2128,9 @@ void cv::GaussianBlur( InputArray _src, OutputArray _dst, Size ksize,
21302128
CALL_HAL(gaussianBlur, cv_hal_gaussianBlur, sdepth, src.ptr(), src.step, dst.ptr(), dst.step, src.cols, src.rows, cn,
21312129
margin, (CvSize)(ksize), sigma1, sigma2, borderType);
21322130

2131+
src.release();
2132+
dst.release();
2133+
21332134
CV_IPP_RUN(!useOpenCL, ipp_GaussianBlur( _src, _dst, ksize, sigma1, sigma2, borderType));
21342135

21352136
Mat kx, ky;

0 commit comments

Comments
 (0)