fix threshold HAL
authorelenagvo <elena.gvozdeva@intel.com>
Tue, 28 Nov 2017 14:42:29 +0000 (17:42 +0300)
committerelenagvo <elena.gvozdeva@intel.com>
Tue, 28 Nov 2017 14:42:29 +0000 (17:42 +0300)
modules/imgproc/src/hal_replacement.hpp
modules/imgproc/src/thresh.cpp

index b585566..be05644 100644 (file)
@@ -652,14 +652,16 @@ inline int hal_ni_adaptiveThreshold(const uchar* src_data, size_t src_step, ucha
    @param src_data,src_step Source image
    @param dst_data,dst_step Destination image
    @param width,height Source image dimensions
+   @param depth Depths of source and destination image
+   @param cn Number of channels
    @param thresh Threshold value
    @param maxValue Value assigned to the pixels for which the condition is satisfied
    @param thresholdType Thresholding type
 */
-inline int hal_ni_thresholdBin8u(const uchar* src_data, size_t src_step, uchar* dst_data, size_t dst_step, int width, int height, double thresh, double maxValue, int thresholdType) { return CV_HAL_ERROR_NOT_IMPLEMENTED; }
+inline int hal_ni_threshold(const uchar* src_data, size_t src_step, uchar* dst_data, size_t dst_step, int width, int height, int depth, int cn, double thresh, double maxValue, int thresholdType) { return CV_HAL_ERROR_NOT_IMPLEMENTED; }
 
 //! @cond IGNORED
-#define cv_hal_thresholdBin8u hal_ni_thresholdBin8u
+#define cv_hal_threshold hal_ni_threshold
 //! @endcond
 
 //! @}
index b87f48e..8cf17ae 100644 (file)
@@ -141,9 +141,6 @@ thresh_8u( const Mat& _src, Mat& _dst, uchar thresh, uchar maxval, int type )
         return;
 #endif
 
-    CALL_HAL(thresholdBin, cv_hal_thresholdBin8u, _src.data, src_step, _dst.data, dst_step, roi.width, roi.height,
-             thresh, maxval, type);
-
 #if defined(HAVE_IPP)
     CV_IPP_CHECK()
     {
@@ -1217,6 +1214,10 @@ public:
         Mat srcStripe = src.rowRange(row0, row1);
         Mat dstStripe = dst.rowRange(row0, row1);
 
+        CALL_HAL(threshold, cv_hal_threshold, srcStripe.data, srcStripe.step, dstStripe.data, dstStripe.step,
+                 srcStripe.cols, srcStripe.rows, srcStripe.depth(), srcStripe.channels(),
+                 thresh, maxval, thresholdType);
+
         if (srcStripe.depth() == CV_8U)
         {
             thresh_8u( srcStripe, dstStripe, (uchar)thresh, (uchar)maxval, thresholdType );