nareshmlx/opencv-pr huggingface dataset:
**File:** modules/ml/src/svm.cpp
**Change Type:** modified
**Context:** PR #26587: Fix #25812: Add error handling for invalid nu parameter in SVM NU_SVC
**Review Line:** 1462

**Code Changes:**
```diff
                                 COPYRIGHT NOTICE
                                 ----------------
@@ -1458,9 +1460,10 @@ class SVMImpl CV_FINAL : public SVM
                     for( j = i+1; j< class_count; j++ )
                     {
                         int cj = class_ranges[j+1] - class_ranges[j];
-                        if( nu*(ci + cj)*0.5 > std::min( ci, cj ) )
-                            // TODO: add some diagnostic
+                        if( nu*(ci + cj)*0.5 > std::min( ci, cj ) ) {
+                            CV_LOG_ERROR(NULL, "Training cases incompatible with nu parameter—try a lower value.");
                             return false;
```

Review comment:
CV_Error raises exception. The method would interrupt execution here instead of false result. Alternative solution is just log message like ``` CV_LOG_ERROR(NULL, "Training cases incompatible with nu parameter—try a lower value."); ```
**File:** modules/core/misc/objc/common/CvTypeExt.swift
**Change Type:** modified
**Context:** PR #26559: Fixed cv::Mat type constants in ObjC and Swift.
**Review Line:** 55

**Code Changes:**
```diff
@@ -53,7 +53,7 @@ public extension CvType {
     static let CV_16FC4: Int32 = CV_16FC(4)
 
     static let CV_CN_MAX = 512
-    static let CV_CN_SHIFT = 3
+    static let CV_CN_SHIFT = 5
     static let CV_DEPTH_MAX = 1 << CV_CN_SHIFT
 
     static func CV_8UC(_ channels:Int32) -> Int32 {
```

Review comment:
Still wrong outdated value.
**File:** modules/highgui/CMakeLists.txt
**Change Type:** modified
**Context:** PR #26563: Missing include directories needed for wayland-util and xkbcommon

**Code Changes:**
```diff
@@ -83,6 +83,7 @@ if(WITH_WAYLAND AND HAVE_WAYLAND)
     endif()
   endif()
 
+  ocv_module_include_directories(${WAYLAND_CLIENT_INCLUDE_DIRS} ${XKBCOMMON_INCLUDE_DIRS})
 elseif(HAVE_QT)
   set(OPENCV_HIGHGUI_BUILTIN_BACKEND "QT${QT_VERSION_MAJOR}")
   add_definitions(-DHAVE_QT)
```

Review comment:
I propose to add includes to line 85 into `if(WITH_WAYLAND AND HAVE_WAYLAND)` condition scope. and stay the line as is.
**File:** modules/imgproc/src/drawing.cpp
**Change Type:** modified
**Context:** PR #26513: Fix for issue 26264

**Code Changes:**
```diff
@@ -2477,21 +2477,70 @@ void cv::drawContours( InputOutputArray _image, InputArrayOfArrays _contours,
     CV_Assert(ncontours <= (size_t)std::numeric_limits<int>::max());
     if (lineType == cv::LINE_AA && _image.depth() != CV_8U)
         lineType = 8;
-    Mat image = _image.getMat(), hierarchy = _hierarchy.getMat();
+    Mat image = _image.getMat();
+    Mat_<Vec4i> hierarchy = _hierarchy.getMat();
 
-    if (thickness >= 0) // contour lines
+    int i = 0, end = (int)ncontours;
```

Review comment:
Most likely faster because there is no dynamic re-allocation ```cpp indexesToFill.resize(end-i); indexesToFill = iota<int>(indexesToFill.begin(), indexesToFill.end(), i); ```
**File:** modules/imgproc/src/drawing.cpp
**Change Type:** modified
**Context:** PR #26513: Fix for issue 26264

**Code Changes:**
```diff
@@ -2477,21 +2477,70 @@ void cv::drawContours( InputOutputArray _image, InputArrayOfArrays _contours,
     CV_Assert(ncontours <= (size_t)std::numeric_limits<int>::max());
     if (lineType == cv::LINE_AA && _image.depth() != CV_8U)
         lineType = 8;
-    Mat image = _image.getMat(), hierarchy = _hierarchy.getMat();
+    Mat image = _image.getMat();
+    Mat_<Vec4i> hierarchy = _hierarchy.getMat();
 
-    if (thickness >= 0) // contour lines
+    int i = 0, end = (int)ncontours;
```

Review comment:
Maybe initialize hierarchy as ```cpp Mat_<Vec4i> hierarchy = _hierarchy.getMat(); ``` so that you do not type `.at<Vec4i>` every time
**File:** modules/imgproc/src/drawing.cpp
**Change Type:** modified
**Context:** PR #26513: Fix for issue 26264
**Review Line:** 2531

**Code Changes:**
```diff
+                next = hierarchy(next)[0]; // next sibling
+            }
         }
-        for (; i < end; ++i)
+    }
+    std::vector<Mat> contoursToFill;
+    contoursToFill.reserve(indexesToFill.size());
+    for (const int& idx : indexesToFill)
+        contoursToFill.emplace_back(_contours.getMat(idx));
+
+    if (thickness < 0)
```

Review comment:
```cpp contoursToFill.reserve(indexesToFill.size()); ```
**File:** modules/imgproc/test/test_contours.cpp
**Change Type:** modified
**Context:** PR #26513: Fix for issue 26264

**Code Changes:**
```diff
@@ -446,9 +446,9 @@ static void d2xy(int n, int d, int *x, int *y)
     }
 }
 
-TEST(Imgproc_FindContours, hilbert)
+static Mat draw_hilbert(int n = 64, int scale = 10)
 {
-    int n = 64, n2 = n*n, scale = 10, w = (n + 2)*scale;
+    int n2 = n*n, w = (n + 2)*scale;
     Point ofs(scale, scale);
```

Review comment:
why not put it into for loop?
**File:** modules/stitching/include/opencv2/stitching.hpp
**Change Type:** modified
**Context:** PR #26516: Document some stitching methods and enable bindings for them.
**Review Line:** 308

**Code Changes:**
```diff
+     */
+    CV_WRAP std::vector<int> component() const { return indices_; }
+
+    /** Returns estimated camera parameters for all stitched images
+     */
+    CV_WRAP std::vector<cv::detail::CameraParams> cameras() const { return cameras_; }
     CV_WRAP double workScale() const { return work_scale_; }
 
     /** @brief Return the mask of the panorama.
```

Review comment:
As I can see `setTransform` method is not wrapped, it seems that is not possible to set `cameras_` from Python.
**File:** modules/stitching/include/opencv2/stitching.hpp
**Change Type:** modified
**Context:** PR #26516: Document some stitching methods and enable bindings for them.
**Review Line:** 308

**Code Changes:**
```diff
+     */
+    CV_WRAP std::vector<int> component() const { return indices_; }
+
+    /** Returns estimated camera parameters for all stitched images
+     */
+    CV_WRAP std::vector<cv::detail::CameraParams> cameras() const { return cameras_; }
     CV_WRAP double workScale() const { return work_scale_; }
 
     /** @brief Return the mask of the panorama.
```

Review comment:
There is issue in current generator implementation: ``` In file included from /mnt/Projects/Projects/opencv/modules/python/src2/cv2.cpp:88: /mnt/Projects/Projects/opencv-build/modules/python_bindings_generator/pyopencv_generated_types_content.h: In function ‘PyObject* pyopencv_cv_Stitcher_setTransform(PyObject*, PyObject*, PyObject*)’: /mnt/Projects/Projects/opencv-build/modules/python_bindings_generator/pyopencv_generated_types_content.h:21351:5: error: ‘vector_detail_CameraParams’ was not declared in this scope; did you mean ‘vector_CameraParams’? 21351 | vector_detail_CameraParams cameras; ``` Let's handle it separately.
**File:** modules/dnn/src/tensorflow/tf_importer.cpp
**Change Type:** modified
**Context:** PR #26394: Modified tensorflow parser for the new dnn engine
**Review Line:** 636

**Code Changes:**
```diff
     friend class TFLayerHandler;
@@ -603,6 +633,80 @@ class TFImporter
     void parseCustomLayer        (tensorflow::GraphDef& net, const tensorflow::NodeDef& layer, LayerParams& layerParams);
 };
 
+void TFImporter::addLayer(const std::string& name, const std::string& type, LayerParams& layerParams, std::vector<std::string> inputs, int numOutputs, int repeatInputs)
+{
+    if (repeatInputs != 0)
+    {
+        CV_CheckEQ(inputs.size(), 1u, "");
+        for (int i = 0; i < repeatInputs; i++)
```

Review comment:
const std::vector<std::string>&
**File:** modules/dnn/src/tensorflow/tf_importer.cpp
**Change Type:** modified
**Context:** PR #26394: Modified tensorflow parser for the new dnn engine

**Code Changes:**
```diff
@@ -10,9 +10,11 @@ Implementation of Tensorflow models parser
 */
 
 #include "../precomp.hpp"
+#include "../net_impl.hpp"
 
 #include <opencv2/core/utils/fp_control_utils.hpp>
 
+#include <opencv2/core/utils/configuration.private.hpp>
 #include <opencv2/core/utils/logger.defines.hpp>
```

Review comment:
Please add meaningful error message.
**File:** 3rdparty/clapack/runtime/cblas_wrap.c
**Change Type:** added
**Context:** PR #18571: Added clapack
**Review Line:** 286

**Code Changes:**
```diff
+   }
+   if (info)
+      fprintf(stderr, "Parameter %d to routine %s was incorrect\n", info, rout);
+   vfprintf(stderr, form, argptr);
+   va_end(argptr);
+   if (info && !info)
+      xerbla_(empty, &info); /* Force link of our F77 error handler */
+   exit(-1);
+}
```

Review comment:
Looks like a bug: #26528 --- > `exit(-1)` Should not have that.
**File:** modules/dnn/test/test_layers.cpp
**Change Type:** modified
**Context:** PR #26503: Fixed test LSTM warning.
**Review Line:** 2745

**Code Changes:**
```diff
@@ -2742,7 +2742,7 @@ INSTANTIATE_TEST_CASE_P(TestLayerFusion, ConvolutionActivationEltwiseFusion, Com
 
 TEST(Layer_LSTM, repeatedInference)
 {
-    std::string onnx_file_path = findDataFile("dnn/onnx/models/onnxscript_lstm.onnx", false);
+    std::string onnx_file_path = findDataFile("dnn/onnx/models/onnxscript_lstm.onnx", true);
 
     // Test parameters
     const int batch_size = 1;
```

Review comment:
`true` value is a default, so it could be removed. Reproduce with `OPENCV_TEST_CHECK_OPTIONAL_DATA=1` environment variable.
**File:** modules/dnn/test/test_layers.cpp
**Change Type:** modified
**Context:** PR #26503: Fixed test LSTM warning.
**Review Line:** 2745

**Code Changes:**
```diff
@@ -2742,7 +2742,7 @@ INSTANTIATE_TEST_CASE_P(TestLayerFusion, ConvolutionActivationEltwiseFusion, Com
 
 TEST(Layer_LSTM, repeatedInference)
 {
-    std::string onnx_file_path = findDataFile("dnn/onnx/models/onnxscript_lstm.onnx", false);
+    std::string onnx_file_path = findDataFile("dnn/onnx/models/onnxscript_lstm.onnx", true);
 
     // Test parameters
     const int batch_size = 1;
```

Review comment:
Addressed in https://github.com/opencv/ci-gha-workflow/pull/198
**File:** modules/core/src/hal_replacement.hpp
**Change Type:** modified
**Context:** PR #26459: HAL added for absdiff(array, scalar) + related fixes

**Code Changes:**
```diff
@@ -109,9 +109,10 @@ Add scalar: _dst[i] = src[i] + scalar
 @param width width of the images
 @param height height of the images
 @param scalar_data pointer to scalar value
+@param nChannels number of channels per element
 */
-inline int hal_ni_addScalar32f32f(const float *src_data, size_t src_step, float *dst_data, size_t dst_step, int width, int height, const float* scalar_data) { return CV_HAL_ERROR_NOT_IMPLEMENTED; }
-inline int hal_ni_addScalar16s16s(const int16_t *src_data, size_t src_step, int16_t *dst_data, size_t dst_step, int width, int height, const int16_t* scalar_data) { return CV_HAL_ERROR_NOT_IMPLEMENTED; }
+inline int hal_ni_addScalar32f32f(const float*   src_data, size_t src_step, float*   dst_data, size_t dst_step, int width, int height, const float*   scalar_data, int nChannels) { return CV_HAL_ERROR_NOT_IMPLEMENTED; }
+inline int hal_ni_addScalar16s16s(const int16_t* src_data, size_t src_step, int16_t* dst_data, size_t dst_step, int width, int height, const int16_t* scalar_data, int nChannels) { return CV_HAL_ERROR_NOT_IMPLEMENTED; }
```

Review comment:
shall it be unsigned/uint32_t type for the output array?
**File:** modules/core/src/hal_replacement.hpp
**Change Type:** modified
**Context:** PR #26459: HAL added for absdiff(array, scalar) + related fixes

**Code Changes:**
```diff
@@ -109,9 +109,10 @@ Add scalar: _dst[i] = src[i] + scalar
 @param width width of the images
 @param height height of the images
 @param scalar_data pointer to scalar value
+@param nChannels number of channels per element
 */
-inline int hal_ni_addScalar32f32f(const float *src_data, size_t src_step, float *dst_data, size_t dst_step, int width, int height, const float* scalar_data) { return CV_HAL_ERROR_NOT_IMPLEMENTED; }
-inline int hal_ni_addScalar16s16s(const int16_t *src_data, size_t src_step, int16_t *dst_data, size_t dst_step, int width, int height, const int16_t* scalar_data) { return CV_HAL_ERROR_NOT_IMPLEMENTED; }
+inline int hal_ni_addScalar32f32f(const float*   src_data, size_t src_step, float*   dst_data, size_t dst_step, int width, int height, const float*   scalar_data, int nChannels) { return CV_HAL_ERROR_NOT_IMPLEMENTED; }
+inline int hal_ni_addScalar16s16s(const int16_t* src_data, size_t src_step, int16_t* dst_data, size_t dst_step, int width, int height, const int16_t* scalar_data, int nChannels) { return CV_HAL_ERROR_NOT_IMPLEMENTED; }
```

Review comment:
discussed, fixed
**File:** modules/dnn/src/layers/recurrent2_layers.cpp
**Change Type:** added
**Context:** PR #26391: LSTM layer for new graph engine.

**Code Changes:**
```diff
@@ -0,0 +1,605 @@
+// This file is part of OpenCV project.
+// It is subject to the license terms in the LICENSE file found in the top-level directory
+// of this distribution and at http://opencv.org/license.html.
+
+#include "../precomp.hpp"
+#include <iostream>
+#include <cmath>
+#include <opencv2/dnn/shape_utils.hpp>
+#include "layers_common.hpp"
```

Review comment:
Please use modern license header, e.g. https://github.com/opencv/opencv/blob/4.x/modules/dnn/src/backend.cpp
**File:** modules/dnn/src/layers/recurrent2_layers.cpp
**Change Type:** added
**Context:** PR #26391: LSTM layer for new graph engine.

**Code Changes:**
```diff
@@ -0,0 +1,605 @@
+// This file is part of OpenCV project.
+// It is subject to the license terms in the LICENSE file found in the top-level directory
+// of this distribution and at http://opencv.org/license.html.
+
+#include "../precomp.hpp"
+#include <iostream>
+#include <cmath>
+#include <opencv2/dnn/shape_utils.hpp>
+#include "layers_common.hpp"
```

Review comment:
Please remove if not relevant.
**File:** modules/dnn/test/test_onnx_importer.cpp
**Change Type:** modified
**Context:** PR #26391: LSTM layer for new graph engine.
**Review Line:** 1331

**Code Changes:**
```diff
 #endif
     testONNXModels("split_max");
 }
-
+// Fails with the new engine. Output shape [?, N, OutputSize] not supported by new graph engine
 TEST_P(Test_ONNX_layers, LSTM_Activations)
 {
     if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH)
@@ -1497,15 +1497,21 @@ TEST_P(Test_ONNX_layers, LSTM_init_h0_c0)
         applyTestTag(CV_TEST_TAG_DNN_SKIP_CUDA);
     testONNXModels("lstm_init_h0_c0", npy, 0, 0, false, false, 3);
```

Review comment:
Please add note why the test is disabled. Here and bellow.
**File:** modules/dnn/src/layers/recurrent2_layers.cpp
**Change Type:** added
**Context:** PR #26391: LSTM layer for new graph engine.
**Review Line:** 194

**Code Changes:**
```diff
+                      std::vector<MatType>& outputs,
+                      std::vector<MatType>& internals) const CV_OVERRIDE
+        {
+            CV_Assert(inputs[0] == CV_32F || inputs[0] == CV_64F);  // Only floating-point types are supported currently
+            outputs.assign(requiredOutputs, inputs[0]);
+            internals.assign(4, inputs[0]);
+        }
+
+
+        void forward(InputArrayOfArrays inputs_arr,
+                     OutputArrayOfArrays outputs_arr,
```

Review comment:
According to implementation, only fp32 and m.b. fp64 are supported. Need ti add check/assert here.
**File:** modules/dnn/src/layers/recurrent2_layers.cpp
**Change Type:** added
**Context:** PR #26391: LSTM layer for new graph engine.

**Code Changes:**
```diff
@@ -0,0 +1,605 @@
+// This file is part of OpenCV project.
+// It is subject to the license terms in the LICENSE file found in the top-level directory
+// of this distribution and at http://opencv.org/license.html.
+
+#include "../precomp.hpp"
+#include <iostream>
+#include <cmath>
+#include <opencv2/dnn/shape_utils.hpp>
+#include "layers_common.hpp"
```

Review comment:
Please add check that the layer got enough inputs.
**File:** modules/dnn/src/layers/recurrent2_layers.cpp
**Change Type:** added
**Context:** PR #26391: LSTM layer for new graph engine.
**Review Line:** 467

**Code Changes:**
```diff
+
+                vconcat(part1, part2, dst);
+
+                int finalShape[] = {2, batchSize, numHidden};
+                dst = dst.reshape(1, sizeof(finalShape)/sizeof(finalShape[0]), finalShape);
+
+                if (layout == BATCH_SEQ_HID){
+                    cv::transposeND(dst, {1, 0, 2}, dst);
+                }
+            }
+        }
```

Review comment:
redundant space line.
**File:** modules/dnn/src/init.cpp
**Change Type:** modified
**Context:** PR #26391: LSTM layer for new graph engine.
**Review Line:** 212

**Code Changes:**
```diff
@@ -209,6 +209,7 @@ void initializeLayerFactory()
     CV_DNN_REGISTER_LAYER_CLASS(FlowWarp,       FlowWarpLayer);
 
     CV_DNN_REGISTER_LAYER_CLASS(LSTM,           LSTMLayer);
+    CV_DNN_REGISTER_LAYER_CLASS(LSTM2,          LSTM2Layer);
     CV_DNN_REGISTER_LAYER_CLASS(GRU,            GRULayer);
     CV_DNN_REGISTER_LAYER_CLASS(CumSum,         CumSumLayer);
     CV_DNN_REGISTER_LAYER_CLASS(Einsum,         EinsumLayer);
```

Review comment:
That is the first layer named in such a way. I think that layer name should remain the same while `Impl` class should be different for different versions of the engine
**File:** modules/dnn/src/init.cpp
**Change Type:** modified
**Context:** PR #26391: LSTM layer for new graph engine.
**Review Line:** 212

**Code Changes:**
```diff
@@ -209,6 +209,7 @@ void initializeLayerFactory()
     CV_DNN_REGISTER_LAYER_CLASS(FlowWarp,       FlowWarpLayer);
 
     CV_DNN_REGISTER_LAYER_CLASS(LSTM,           LSTMLayer);
+    CV_DNN_REGISTER_LAYER_CLASS(LSTM2,          LSTM2Layer);
     CV_DNN_REGISTER_LAYER_CLASS(GRU,            GRULayer);
     CV_DNN_REGISTER_LAYER_CLASS(CumSum,         CumSumLayer);
     CV_DNN_REGISTER_LAYER_CLASS(Einsum,         EinsumLayer);
```

Review comment:
Not first. Here are some examples [[1](https://github.com/opencv/opencv/blob/979428d5908b5396237b18cbd50d0b18265e2463/modules/dnn/src/init.cpp#L92)], [[2](https://github.com/opencv/opencv/blob/979428d5908b5396237b18cbd50d0b18265e2463/modules/dnn/src/init.cpp#L88)], [[3](https://github.com/opencv/opencv/blob/979428d5908b5396237b18cbd50d0b18265e2463/modules/dnn/src/init.cpp#L107)]
**File:** modules/dnn/test/test_onnx_importer.cpp
**Change Type:** modified
**Context:** PR #26391: LSTM layer for new graph engine.
**Review Line:** 1331

**Code Changes:**
```diff
 #endif
     testONNXModels("split_max");
 }
-
+// Fails with the new engine. Output shape [?, N, OutputSize] not supported by new graph engine
 TEST_P(Test_ONNX_layers, LSTM_Activations)
 {
     if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH)
@@ -1497,15 +1497,21 @@ TEST_P(Test_ONNX_layers, LSTM_init_h0_c0)
         applyTestTag(CV_TEST_TAG_DNN_SKIP_CUDA);
     testONNXModels("lstm_init_h0_c0", npy, 0, 0, false, false, 3);
```

Review comment:
Is that comment still actual? To understand why working tests have been disabled and no new alternatives added.
**File:** modules/dnn/test/test_layers.cpp
**Change Type:** modified
**Context:** PR #26391: LSTM layer for new graph engine.
**Review Line:** 2745

**Code Changes:**
```diff
                         TestLayerFusion::dnnBackendsAndTargetsForFusionTests()
 ));
 
+TEST(Layer_LSTM, repeatedInference)
+{
+    std::string onnx_file_path = findDataFile("dnn/onnx/models/onnxscript_lstm.onnx", false);
+
+    // Test parameters
+    const int batch_size = 1;
+    const int seq_length = 5;
+    const int input_size = 6;
```

Review comment:
Merged against RED CI: ``` [----------] 1 test from Layer_LSTM [ RUN ] Layer_LSTM.repeatedInference TEST ERROR: Don't use 'optional' findData() for dnn/onnx/models/onnxscript_lstm.onnx unknown file: Failure C++ exception with description "OpenCV(5.0.0-pre) /build/precommit_linux64/5.x/opencv/modules/ts/src/ts.cpp:969: error: (-215:Assertion failed) required || result_.empty() in function 'findData' " thrown in the test body. [ FAILED ] Layer_LSTM.repeatedInference (0 ms) ```
**File:** modules/core/include/opencv2/core/hal/intrin_rvv_scalable.hpp
**Change Type:** modified
**Context:** PR #26454: imgproc: fix perf regressions on the c4 kernels of warpAffine / warpPerspective / remap

**Code Changes:**
```diff
@@ -543,6 +543,40 @@ OPENCV_HAL_IMPL_RVV_LOADSTORE_OP(v_float32, vfloat32m2_t, float, VTraits<v_float
 OPENCV_HAL_IMPL_RVV_LOADSTORE_OP(v_float64, vfloat64m2_t, double, VTraits<v_float64>::vlanes() / 2, VTraits<v_float64>::vlanes(), 64, f64)
 #endif
 
+template <int N = VTraits<v_uint16>::max_nlanes>
+inline void v_store(ushort* ptr, const v_uint16& a)
+{
+    ushort buf[VTraits<v_uint16>::max_nlanes];
+    v_store(buf, a);
+    for (int i = 0; i < N; i++) {
```

Review comment:
why `n` parameter is passed? Let's get rid of it.
**File:** modules/core/include/opencv2/core/hal/intrin_rvv_scalable.hpp
**Change Type:** modified
**Context:** PR #26454: imgproc: fix perf regressions on the c4 kernels of warpAffine / warpPerspective / remap

**Code Changes:**
```diff
@@ -543,6 +543,40 @@ OPENCV_HAL_IMPL_RVV_LOADSTORE_OP(v_float32, vfloat32m2_t, float, VTraits<v_float
 OPENCV_HAL_IMPL_RVV_LOADSTORE_OP(v_float64, vfloat64m2_t, double, VTraits<v_float64>::vlanes() / 2, VTraits<v_float64>::vlanes(), 64, f64)
 #endif
 
+template <int N = VTraits<v_uint16>::max_nlanes>
+inline void v_store(ushort* ptr, const v_uint16& a)
+{
+    ushort buf[VTraits<v_uint16>::max_nlanes];
+    v_store(buf, a);
+    for (int i = 0; i < N; i++) {
```

Review comment:
let's get rid of 'n' parameter in the newly added intrinsics.
**File:** modules/core/include/opencv2/core/hal/intrin_rvv_scalable.hpp
**Change Type:** modified
**Context:** PR #26454: imgproc: fix perf regressions on the c4 kernels of warpAffine / warpPerspective / remap

**Code Changes:**
```diff
@@ -543,6 +543,40 @@ OPENCV_HAL_IMPL_RVV_LOADSTORE_OP(v_float32, vfloat32m2_t, float, VTraits<v_float
 OPENCV_HAL_IMPL_RVV_LOADSTORE_OP(v_float64, vfloat64m2_t, double, VTraits<v_float64>::vlanes() / 2, VTraits<v_float64>::vlanes(), 64, f64)
 #endif
 
+template <int N = VTraits<v_uint16>::max_nlanes>
+inline void v_store(ushort* ptr, const v_uint16& a)
+{
+    ushort buf[VTraits<v_uint16>::max_nlanes];
+    v_store(buf, a);
+    for (int i = 0; i < N; i++) {
```

Review comment:
~I am afraid that we cannot, since `v_store` is already defined.~ Ok, never mind. Tested and it can work without `n`.
**File:** modules/core/include/opencv2/core/hal/intrin_rvv_scalable.hpp
**Change Type:** modified
**Context:** PR #26454: imgproc: fix perf regressions on the c4 kernels of warpAffine / warpPerspective / remap

**Code Changes:**
```diff
@@ -543,6 +543,40 @@ OPENCV_HAL_IMPL_RVV_LOADSTORE_OP(v_float32, vfloat32m2_t, float, VTraits<v_float
 OPENCV_HAL_IMPL_RVV_LOADSTORE_OP(v_float64, vfloat64m2_t, double, VTraits<v_float64>::vlanes() / 2, VTraits<v_float64>::vlanes(), 64, f64)
 #endif
 
+template <int N = VTraits<v_uint16>::max_nlanes>
+inline void v_store(ushort* ptr, const v_uint16& a)
+{
+    ushort buf[VTraits<v_uint16>::max_nlanes];
+    v_store(buf, a);
+    for (int i = 0; i < N; i++) {
```

Review comment:
Done. Also removed `n` parameter from last PR.
**File:** modules/core/src/arithm.cpp
**Change Type:** modified
**Context:** PR #25624: HAL added for add(array, scalar)
**Review Line:** 590

**Code Changes:**
```diff
 
 #endif
 
+typedef int (*ScalarFunc)(const uchar* src, size_t step_src,
+                          uchar* dst, size_t step_dst, int width, int height,
+                          void* scalar, bool scalarIsFirst);
+
 typedef int (*ExtendedTypeFunc)(const uchar* src1, size_t step1,
                                 const uchar* src2, size_t step2,
                                 uchar* dst, size_t step, int width, int height,
                                 void*);
```

Review comment:
`usrdata` is not supported, this should be fixed for more common cases