nareshmlx/opencv-pr huggingface dataset:
**File:** modules/dnn/src/layers/einsum_layer.cpp
**Change Type:** modified
**Context:** PR #26073: (5.x) Merge 4.x - Contrib: https://github.com/opencv/opencv_contrib/pull/3783 Extra: https://github.com/opencv/opencv_extra/pull/1205 #2327...
**Review Line:** 542

**Code Changes:**
```diff
+        CV_CheckEQ((size_t)inputs_arr.total(), (size_t)numInputs, "Number of inputs in forward and inputs during graph constructions do not match");
 
         if (inputs_arr.depth() == CV_16F)
         {
@@ -541,7 +542,7 @@ class LayerEinsumImpl CV_FINAL : public EinsumLayer
                 // Use either the preprocessed inputs (if it is available) or the corresponding raw inputs
                 result = pairwiseOperandProcess(!result.empty() ? result : rawInputs[0],
                                                 !result.empty() ? tmpResult : homogenizedInputDims[0],
-                                                (!preProcessedInputs.empty() && !preProcessedInputs[input].empty()) ? preProcessedInputs[input] : rawInputs[input],
+                                                (!preProcessedInputs[input].empty()) ? preProcessedInputs[input] : rawInputs[input],
                                                 homogenizedInputDims[input],
```

Review comment:
Lost assertion: https://github.com/opencv/opencv/blame/4.x/modules/dnn/src/layers/einsum_layer.cpp#L462
**File:** modules/dnn/src/layers/einsum_layer.cpp
**Change Type:** modified
**Context:** PR #26073: (5.x) Merge 4.x - Contrib: https://github.com/opencv/opencv_contrib/pull/3783 Extra: https://github.com/opencv/opencv_extra/pull/1205 #2327...
**Review Line:** 545

**Code Changes:**
```diff
@@ -541,7 +542,7 @@ class LayerEinsumImpl CV_FINAL : public EinsumLayer
                 // Use either the preprocessed inputs (if it is available) or the corresponding raw inputs
                 result = pairwiseOperandProcess(!result.empty() ? result : rawInputs[0],
                                                 !result.empty() ? tmpResult : homogenizedInputDims[0],
-                                                (!preProcessedInputs.empty() && !preProcessedInputs[input].empty()) ? preProcessedInputs[input] : rawInputs[input],
+                                                (!preProcessedInputs[input].empty()) ? preProcessedInputs[input] : rawInputs[input],
                                                 homogenizedInputDims[input],
                                                 reducedDims,
                                                 isFinalPair);
@@ -605,8 +606,8 @@ void LayerEinsumImpl::preProcessInputs(InputArrayOfArrays& inputs_arr)
     std::vector<cv::Mat> inputs;
```

Review comment:
After https://github.com/opencv/opencv/pull/26059 the `preProcessedInputs` is resized, but not reserved. As soon as the layer has inputs, the vector is not empty. I just selected 4.x version.
**File:** modules/imgproc/perf/perf_warp.cpp
**Change Type:** modified
**Context:** PR #26054: Extended perf tests for warpPerspective to cover channels too
**Review Line:** 45

**Code Changes:**
```diff
     TEST_CYCLE() warpAffine( src, dst, warpMat, sz, interType, borderMode, borderColor );
 
-#ifdef __ANDROID__
-    SANITY_CHECK(dst, interType==INTER_LINEAR? 5 : 10);
-#else
     SANITY_CHECK(dst, 1);
-#endif
 }
 
 PERF_TEST_P(TestWarpAffine, DISABLED_WarpAffine_ovx,
@@ -72,29 +68,28 @@ PERF_TEST_P(TestWarpAffine, DISABLED_WarpAffine_ovx,
```

Review comment:
Maybe `SANITY_CHECK_NOTHING()`? We're trying to deprecate accuracy checks in perf tests for some time (https://github.com/opencv/opencv/wiki/HowToWritePerfTests#simple-regression-check).
**File:** modules/imgproc/perf/perf_warp.cpp
**Change Type:** modified
**Context:** PR #26054: Extended perf tests for warpPerspective to cover channels too
**Review Line:** 45

**Code Changes:**
```diff
     TEST_CYCLE() warpAffine( src, dst, warpMat, sz, interType, borderMode, borderColor );
 
-#ifdef __ANDROID__
-    SANITY_CHECK(dst, interType==INTER_LINEAR? 5 : 10);
-#else
     SANITY_CHECK(dst, 1);
-#endif
 }
 
 PERF_TEST_P(TestWarpAffine, DISABLED_WarpAffine_ovx,
@@ -72,29 +68,28 @@ PERF_TEST_P(TestWarpAffine, DISABLED_WarpAffine_ovx,
```

Review comment:
Let's presume the checks, where we have it. No check for new code.
**File:** modules/dnn/misc/python/test/test_dnn.py
**Change Type:** modified
**Context:** PR #26026: Add support for boolan input/outputs in python bindings

**Code Changes:**
```diff
@@ -546,5 +546,24 @@ def test_net_builder(self):
         out = net.forward()
         self.assertEqual(out.shape, (1, 2, 3, 4))
 
+    def test_bool_operator(self):
+        n = self.find_dnn_file('dnn/onnx/models/and_op.onnx')
+
+        x = np.random.randint(0, 2, [5], dtype=np.bool_)
+        y = np.random.randint(0, 2, [5], dtype=np.bool_)
+        o = x & y
```

Review comment:
Can we generate test data in runtime instead?
**File:** modules/dnn/misc/python/test/test_dnn.py
**Change Type:** modified
**Context:** PR #26026: Add support for boolan input/outputs in python bindings

**Code Changes:**
```diff
@@ -546,5 +546,24 @@ def test_net_builder(self):
         out = net.forward()
         self.assertEqual(out.shape, (1, 2, 3, 4))
 
+    def test_bool_operator(self):
+        n = self.find_dnn_file('dnn/onnx/models/and_op.onnx')
+
+        x = np.random.randint(0, 2, [5], dtype=np.bool_)
+        y = np.random.randint(0, 2, [5], dtype=np.bool_)
+        o = x & y
```

Review comment:
Without names it will replace x input
**File:** modules/dnn/misc/python/test/test_dnn.py
**Change Type:** modified
**Context:** PR #26026: Add support for boolan input/outputs in python bindings

**Code Changes:**
```diff
@@ -546,5 +546,24 @@ def test_net_builder(self):
         out = net.forward()
         self.assertEqual(out.shape, (1, 2, 3, 4))
 
+    def test_bool_operator(self):
+        n = self.find_dnn_file('dnn/onnx/models/and_op.onnx')
+
+        x = np.random.randint(0, 2, [5], dtype=np.bool_)
+        y = np.random.randint(0, 2, [5], dtype=np.bool_)
+        o = x & y
```

Review comment:
Technically yes, but how to do that without adding extra funtionality in `modules/dnn/misc/python/test/test_dnn.py` file?
**File:** modules/dnn/misc/python/test/test_dnn.py
**Change Type:** modified
**Context:** PR #26026: Add support for boolan input/outputs in python bindings

**Code Changes:**
```diff
@@ -546,5 +546,24 @@ def test_net_builder(self):
         out = net.forward()
         self.assertEqual(out.shape, (1, 2, 3, 4))
 
+    def test_bool_operator(self):
+        n = self.find_dnn_file('dnn/onnx/models/and_op.onnx')
+
+        x = np.random.randint(0, 2, [5], dtype=np.bool_)
+        y = np.random.randint(0, 2, [5], dtype=np.bool_)
+        o = x & y
```

Review comment:
How would you implement this functionality?
**File:** modules/dnn/misc/python/test/test_dnn.py
**Change Type:** modified
**Context:** PR #26026: Add support for boolan input/outputs in python bindings

**Code Changes:**
```diff
@@ -546,5 +546,24 @@ def test_net_builder(self):
         out = net.forward()
         self.assertEqual(out.shape, (1, 2, 3, 4))
 
+    def test_bool_operator(self):
+        n = self.find_dnn_file('dnn/onnx/models/and_op.onnx')
+
+        x = np.random.randint(0, 2, [5], dtype=np.bool_)
+        y = np.random.randint(0, 2, [5], dtype=np.bool_)
+        o = x & y
```

Review comment:
There is no generic testing method in test_dnn.py - you can create input/output in runtime as numpy array
**File:** modules/dnn/misc/python/test/test_dnn.py
**Change Type:** modified
**Context:** PR #26026: Add support for boolan input/outputs in python bindings

**Code Changes:**
```diff
@@ -546,5 +546,24 @@ def test_net_builder(self):
         out = net.forward()
         self.assertEqual(out.shape, (1, 2, 3, 4))
 
+    def test_bool_operator(self):
+        n = self.find_dnn_file('dnn/onnx/models/and_op.onnx')
+
+        x = np.random.randint(0, 2, [5], dtype=np.bool_)
+        y = np.random.randint(0, 2, [5], dtype=np.bool_)
+        o = x & y
```

Review comment:
Alternatively, let's make input data more complex - initialize them randomly instead of zeros/ones https://github.com/opencv/opencv_extra/pull/1201/files#diff-066596aee5ba198740fae15d7e39dd3c0bebcec5c6d5faab96a61c2c5de97863R404
**File:** modules/core/include/opencv2/core/types.hpp
**Change Type:** modified
**Context:** PR #26022: imgproc: use double to determine whether the corners points are within src
**Review Line:** 475

**Code Changes:**
```diff
@@ -475,7 +475,14 @@ template<typename _Tp> class Rect_
     template<typename _Tp2> operator Rect_<_Tp2>() const;
 
     //! checks whether the rectangle contains the point
-    bool contains(const Point_<_Tp>& pt) const;
+    /*! @warning After OpenCV 4.11.0, when calling Rect.contains() with cv::Point2f / cv::Point2d point, point should not convert/round to int.
+     * ```
```

Review comment:
Did you try `explicit` for conversion operator instead? (to avoid unexpected conversions) (since C++11: https://en.cppreference.com/w/cpp/language/cast_operator )
**File:** modules/core/include/opencv2/core/types.hpp
**Change Type:** modified
**Context:** PR #26022: imgproc: use double to determine whether the corners points are within src
**Review Line:** 475

**Code Changes:**
```diff
@@ -475,7 +475,14 @@ template<typename _Tp> class Rect_
     template<typename _Tp2> operator Rect_<_Tp2>() const;
 
     //! checks whether the rectangle contains the point
-    bool contains(const Point_<_Tp>& pt) const;
+    /*! @warning After OpenCV 4.11.0, when calling Rect.contains() with cv::Point2f / cv::Point2d point, point should not convert/round to int.
+     * ```
```

Review comment:
>Did you try explicit for conversion operator instead? (to avoid unexpected conversions) I think it is not easy, because `cv::Point` and `cv::Rect` is used for drawing functions in `imgproc`, so there are many side-effetcs not only OpenCV library but also user-applications. (I would like to do that if possible...) Following are trial codes, but it doesn't include some modules (cuda*, hdf, ...). - https://github.com/Kumataro/opencv/commit/ec08b3788139c0c29e3819cd2e4131f4596a6d4c - https://github.com/Kumataro/opencv_contrib/commit/a0c3467826c2b988c20f7251106f2ebe5683ee41
**File:** modules/imgproc/test/test_color.cpp
**Change Type:** modified
**Context:** PR #25981: imgproc: add specific error code when cvtColor is used on an image with an invalid number of channels

**Code Changes:**
```diff
@@ -3203,4 +3203,20 @@ TEST(ImgProc_RGB2Lab, NaN_21111)
 #endif
 }
 
+// See https://github.com/opencv/opencv/issues/25971
+// If num of channels is not suitable for selected cv::ColorConversionCodes,
+// e.code must be cv::Error::BadNumChannels.
+TEST(ImgProc_cvtColor_InvalidNumOfChannels, regression_25971)
+{
+    try {
```

Review comment:
> Chennels typo
**File:** modules/imgproc/src/hal_replacement.hpp
**Change Type:** modified
**Context:** PR #25932: Added xxxApprox overloads for YUV color conversions in HAL and AlgorithmHint to cvtColor
**Review Line:** 466

**Code Changes:**
```diff
+   @param scn source image channels (3 or 4)
+   @param swapBlue if set to true B and R source channels will be swapped (treat as RGB)
+   @param isCbCr if set to true write output in YCbCr format
+   Convert from BGR, RGB, BGRA or RGBA to YUV or YCbCr.
+ */
+inline int hal_ni_cvtBGRtoYUVApprox(const uchar * src_data, size_t src_step, uchar * dst_data, size_t dst_step, int width, int height, int depth, int scn, bool swapBlue, bool isCbCr) { return CV_HAL_ERROR_NOT_IMPLEMENTED; }
+
+
 /**
    @brief hal_cvtYUVtoBGR
    @param src_data source image data
```

Review comment:
why 'Approx' is in the function name? Why not pass algorithm hint as a parameter?
**File:** modules/imgproc/src/hal_replacement.hpp
**Change Type:** modified
**Context:** PR #25932: Added xxxApprox overloads for YUV color conversions in HAL and AlgorithmHint to cvtColor
**Review Line:** 466

**Code Changes:**
```diff
+   @param scn source image channels (3 or 4)
+   @param swapBlue if set to true B and R source channels will be swapped (treat as RGB)
+   @param isCbCr if set to true write output in YCbCr format
+   Convert from BGR, RGB, BGRA or RGBA to YUV or YCbCr.
+ */
+inline int hal_ni_cvtBGRtoYUVApprox(const uchar * src_data, size_t src_step, uchar * dst_data, size_t dst_step, int width, int height, int depth, int scn, bool swapBlue, bool isCbCr) { return CV_HAL_ERROR_NOT_IMPLEMENTED; }
+
+
 /**
    @brief hal_cvtYUVtoBGR
    @param src_data source image data
```

Review comment:
The existing API is already used in 3rd party HAL like Carotene, KleidiCV and some other. So we need to in introduce new API anyway. The solution just follows current HAL design.
**File:** CMakeLists.txt
**Change Type:** modified
**Context:** PR #25832: Add support for QNX

**Code Changes:**
```diff
@@ -767,7 +767,7 @@ if(UNIX OR MINGW)
     elseif(EMSCRIPTEN)
       # no need to link to system libs with emscripten
     elseif(QNXNTO)
-      set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} m)
+      set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} m regex)
     elseif(MINGW)
       set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} pthread)
     else()
```

Review comment:
It doesn't look correct. Why do we need that?
**File:** cmake/OpenCVFindLibsGrfmt.cmake
**Change Type:** modified
**Context:** PR #25832: Add support for QNX
**Review Line:** 30

**Code Changes:**
```diff
   endif()
-  find_package(ZLIB "${MIN_VER_ZLIB}")
+  if(QNX)
+    set(ZLIB_FOUND TRUE)
+    set(ZLIB_LIBRARY z)
+    set(ZLIB_LIBRARIES z)
+  else()
+    find_package(ZLIB "${MIN_VER_ZLIB}")
+  endif()
   if(ANDROID)
     set(CMAKE_FIND_LIBRARY_SUFFIXES ${_zlib_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
```

Review comment:
Why different names?
**File:** cmake/OpenCVInstallLayout.cmake
**Change Type:** modified
**Context:** PR #25832: Add support for QNX

**Code Changes:**
```diff
@@ -56,6 +56,24 @@ elseif(WIN32 AND CMAKE_HOST_SYSTEM_NAME MATCHES Windows)
   ocv_update(OPENCV_JNI_INSTALL_PATH           "java${_jni_suffix}")
   ocv_update(OPENCV_JNI_BIN_INSTALL_PATH       "${OPENCV_JNI_INSTALL_PATH}")
 
+elseif(QNX)
+  ocv_update(OPENCV_BIN_INSTALL_PATH         "${CPUVARDIR}/usr/bin")
+  ocv_update(OPENCV_TEST_INSTALL_PATH        "${OPENCV_BIN_INSTALL_PATH}")
+  ocv_update(OPENCV_SAMPLES_BIN_INSTALL_PATH "${OPENCV_BIN_INSTALL_PATH}")
+  ocv_update(OPENCV_LIB_INSTALL_PATH         "${CPUVARDIR}/usr/lib")
+  ocv_update(OPENCV_LIB_ARCHIVE_INSTALL_PATH "${OPENCV_LIB_INSTALL_PATH}")
```

Review comment:
> OPENCV_VERSION_PLAIN and > opencv4 below. It makes sense to avoid such mess.
**File:** cmake/OpenCVUtils.cmake
**Change Type:** modified
**Context:** PR #25832: Add support for QNX
**Review Line:** 315

**Code Changes:**
```diff
     else()
-      include_directories(AFTER SYSTEM "${dir}")
+      if(${CMAKE_SYSTEM_NAME} MATCHES QNX)
+        include_directories(AFTER "${dir}")
+      else()
+        include_directories(AFTER SYSTEM "${dir}")
+      endif()
     endif()
   endforeach()
   include_directories(BEFORE ${__add_before})
```

Review comment:
What is the problem? message? If there is no SYSTEM headers support then it should be disabled on CMake level.
**File:** modules/core/include/opencv2/core/utils/filesystem.private.hpp
**Change Type:** modified
**Context:** PR #25832: Add support for QNX

**Code Changes:**
```diff
@@ -13,7 +13,7 @@
      /* not supported */
 #  elif defined __ANDROID__ || defined __linux__ || defined _WIN32 || \
         defined __FreeBSD__ || defined __bsdi__ || defined __HAIKU__ || \
-        defined __GNU__
+        defined __GNU__ || defined __QNX__
 #      define OPENCV_HAVE_FILESYSTEM_SUPPORT 1
 #  elif defined(__APPLE__)
 #    include <TargetConditionals.h>
```

Review comment:
Keep the first free lines of the license header unchanged. Put this after 3 lines.
**File:** modules/ts/src/ts.cpp
**Change Type:** modified
**Context:** PR #25832: Add support for QNX

**Code Changes:**
```diff
@@ -1035,7 +1035,8 @@ static std::string findData(const std::string& relative_path, bool required, boo
         }
     }
 #ifdef OPENCV_TEST_DATA_INSTALL_PATH
-    datapath = path_join("./", OPENCV_TEST_DATA_INSTALL_PATH);
+    datapath = OPENCV_TEST_DATA_INSTALL_PATH;
+
     if (isDirectory(datapath))
     {
         for(size_t i = search_subdir.size(); i > 0; i--)
```

Review comment:
It is a validation of input parameters. No sense to make them conditional.
**File:** modules/ts/src/ts.cpp
**Change Type:** modified
**Context:** PR #25832: Add support for QNX

**Code Changes:**
```diff
@@ -1035,7 +1035,8 @@ static std::string findData(const std::string& relative_path, bool required, boo
         }
     }
 #ifdef OPENCV_TEST_DATA_INSTALL_PATH
-    datapath = path_join("./", OPENCV_TEST_DATA_INSTALL_PATH);
+    datapath = OPENCV_TEST_DATA_INSTALL_PATH;
+
     if (isDirectory(datapath))
     {
         for(size_t i = search_subdir.size(); i > 0; i--)
```

Review comment:
Looks like a bug for all platforms.
**File:** CMakeLists.txt
**Change Type:** modified
**Context:** PR #25832: Add support for QNX

**Code Changes:**
```diff
@@ -767,7 +767,7 @@ if(UNIX OR MINGW)
     elseif(EMSCRIPTEN)
       # no need to link to system libs with emscripten
     elseif(QNXNTO)
-      set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} m)
+      set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} m regex)
     elseif(MINGW)
       set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} pthread)
     else()
```

Review comment:
https://github.com/opencv/opencv/blob/4.10.0/CMakeLists.txt#L534
**File:** CMakeLists.txt
**Change Type:** modified
**Context:** PR #25832: Add support for QNX

**Code Changes:**
```diff
@@ -767,7 +767,7 @@ if(UNIX OR MINGW)
     elseif(EMSCRIPTEN)
       # no need to link to system libs with emscripten
     elseif(QNXNTO)
-      set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} m)
+      set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} m regex)
     elseif(MINGW)
       set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} pthread)
     else()
```

Review comment:
without `${}`
**File:** CMakeLists.txt
**Change Type:** modified
**Context:** PR #25832: Add support for QNX

**Code Changes:**
```diff
@@ -767,7 +767,7 @@ if(UNIX OR MINGW)
     elseif(EMSCRIPTEN)
       # no need to link to system libs with emscripten
     elseif(QNXNTO)
-      set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} m)
+      set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} m regex)
     elseif(MINGW)
       set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} pthread)
     else()
```

Review comment:
Problem is still here.
**File:** cmake/OpenCVFindLibsGrfmt.cmake
**Change Type:** modified
**Context:** PR #25832: Add support for QNX
**Review Line:** 30

**Code Changes:**
```diff
   endif()
-  find_package(ZLIB "${MIN_VER_ZLIB}")
+  if(QNX)
+    set(ZLIB_FOUND TRUE)
+    set(ZLIB_LIBRARY z)
+    set(ZLIB_LIBRARIES z)
+  else()
+    find_package(ZLIB "${MIN_VER_ZLIB}")
+  endif()
   if(ANDROID)
     set(CMAKE_FIND_LIBRARY_SUFFIXES ${_zlib_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
```

Review comment:
Problem is still here.
**File:** cmake/OpenCVFindLibsGrfmt.cmake
**Change Type:** modified
**Context:** PR #25832: Add support for QNX
**Review Line:** 30

**Code Changes:**
```diff
   endif()
-  find_package(ZLIB "${MIN_VER_ZLIB}")
+  if(QNX)
+    set(ZLIB_FOUND TRUE)
+    set(ZLIB_LIBRARY z)
+    set(ZLIB_LIBRARIES z)
+  else()
+    find_package(ZLIB "${MIN_VER_ZLIB}")
+  endif()
   if(ANDROID)
     set(CMAKE_FIND_LIBRARY_SUFFIXES ${_zlib_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
```

Review comment:
There are 2 same cases below.
**File:** CMakeLists.txt
**Change Type:** modified
**Context:** PR #25832: Add support for QNX

**Code Changes:**
```diff
@@ -767,7 +767,7 @@ if(UNIX OR MINGW)
     elseif(EMSCRIPTEN)
       # no need to link to system libs with emscripten
     elseif(QNXNTO)
-      set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} m)
+      set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} m regex)
     elseif(MINGW)
       set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} pthread)
     else()
```

Review comment:
We don't need to introduce `QNX_PYTHON_INSTALL_PATH` (google doesn't know that anyway). Just specify `OPENCV_PYTHON_INSTALL_PATH` value to CMake thorugh command-line or via `cmake/OpenCVInstallLayout.cmake`
**File:** modules/imgproc/src/pyramids.cpp
**Change Type:** modified
**Context:** PR #25970: pyrDown: offset HAL added, IPP removed

**Code Changes:**
```diff
@@ -1266,69 +1266,6 @@ static bool ocl_pyrUp( InputArray _src, OutputArray _dst, const Size& _dsz, int
 
 }
 
-#if defined(HAVE_IPP)
-namespace cv
-{
-static bool ipp_pyrdown( InputArray _src, OutputArray _dst, const Size& _dsz, int borderType )
-{
-    CV_INSTRUMENT_REGION_IPP();
```

Review comment:
Need to describe the issue, or, better, create a ticket and add link here.
**File:** modules/imgproc/src/pyramids.cpp
**Change Type:** modified
**Context:** PR #25970: pyrDown: offset HAL added, IPP removed

**Code Changes:**
```diff
@@ -1266,69 +1266,6 @@ static bool ocl_pyrUp( InputArray _src, OutputArray _dst, const Size& _dsz, int
 
 }
 
-#if defined(HAVE_IPP)
-namespace cv
-{
-static bool ipp_pyrdown( InputArray _src, OutputArray _dst, const Size& _dsz, int borderType )
-{
-    CV_INSTRUMENT_REGION_IPP();
```

Review comment:
It's already disabled. modules/core/include/opencv2/core/private.hpp:198:#define IPP_DISABLE_PYRAMIDS_DOWN 1 // Different results
**File:** modules/imgproc/src/pyramids.cpp
**Change Type:** modified
**Context:** PR #25970: pyrDown: offset HAL added, IPP removed

**Code Changes:**
```diff
@@ -1266,69 +1266,6 @@ static bool ocl_pyrUp( InputArray _src, OutputArray _dst, const Size& _dsz, int
 
 }
 
-#if defined(HAVE_IPP)
-namespace cv
-{
-static bool ipp_pyrdown( InputArray _src, OutputArray _dst, const Size& _dsz, int borderType )
-{
-    CV_INSTRUMENT_REGION_IPP();
```

Review comment:
Opened an issue: #25976 Since there's no corresponding functions in ippicv, I propose to remove this implementation. It's easier to write it from scratch than fixing this code that looks like it's in a middle of refactoring.
**File:** modules/imgproc/src/pyramids.cpp
**Change Type:** modified
**Context:** PR #25970: pyrDown: offset HAL added, IPP removed

**Code Changes:**
```diff
@@ -1266,69 +1266,6 @@ static bool ocl_pyrUp( InputArray _src, OutputArray _dst, const Size& _dsz, int
 
 }
 
-#if defined(HAVE_IPP)
-namespace cv
-{
-static bool ipp_pyrdown( InputArray _src, OutputArray _dst, const Size& _dsz, int borderType )
-{
-    CV_INSTRUMENT_REGION_IPP();
```

Review comment:
submat check should be used too.
**File:** modules/imgproc/src/pyramids.cpp
**Change Type:** modified
**Context:** PR #25970: pyrDown: offset HAL added, IPP removed

**Code Changes:**
```diff
@@ -1266,69 +1266,6 @@ static bool ocl_pyrUp( InputArray _src, OutputArray _dst, const Size& _dsz, int
 
 }
 
-#if defined(HAVE_IPP)
-namespace cv
-{
-static bool ipp_pyrdown( InputArray _src, OutputArray _dst, const Size& _dsz, int borderType )
-{
-    CV_INSTRUMENT_REGION_IPP();
```

Review comment:
Please remove the comment too. It's not relevant any more.
**File:** modules/imgproc/src/pyramids.cpp
**Change Type:** modified
**Context:** PR #25970: pyrDown: offset HAL added, IPP removed

**Code Changes:**
```diff
@@ -1266,69 +1266,6 @@ static bool ocl_pyrUp( InputArray _src, OutputArray _dst, const Size& _dsz, int
 
 }
 
-#if defined(HAVE_IPP)
-namespace cv
-{
-static bool ipp_pyrdown( InputArray _src, OutputArray _dst, const Size& _dsz, int borderType )
-{
-    CV_INSTRUMENT_REGION_IPP();
```

Review comment:
Scope of this variable could be reduced.