nareshmlx/opencv-pr huggingface dataset:
**File:** doc/tutorials/app/highgui_wayland_ubuntu.markdown
**Change Type:** added
**Context:** PR #25496: highgui: wayland: show "NO" status if dependency is missing

**Code Changes:**
```diff
@@ -0,0 +1,106 @@
+Using Wayland highgui-backend in Ubuntu {#tutorial_wayland_ubuntu}
+=======================================
+
+@tableofcontents
+
+@prev_tutorial{tutorial_intelperc}
+
+|    |    |
+| -: | :- |
```

Review comment:
`GitHub` https://en.wikipedia.org/wiki/GitHub
**File:** doc/tutorials/app/highgui_wayland_ubuntu.markdown
**Change Type:** added
**Context:** PR #25496: highgui: wayland: show "NO" status if dependency is missing

**Code Changes:**
```diff
@@ -0,0 +1,106 @@
+Using Wayland highgui-backend in Ubuntu {#tutorial_wayland_ubuntu}
+=======================================
+
+@tableofcontents
+
+@prev_tutorial{tutorial_intelperc}
+
+|    |    |
+| -: | :- |
```

Review comment:
typo. Should be `wayland-protocols`
**File:** doc/js_tutorials/js_setup/js_nodejs/js_nodejs.markdown
**Change Type:** modified
**Context:** PR #25324: Fix broken js build after moving HaarCascades to contrib - The HaarCascades related are not completely cleaned up #25311 after #25198, whic...
**Review Line:** 229

**Code Changes:**
```diff
@@ -227,52 +227,128 @@ In the browser, this filesystem is emulated in memory while in Node.js there's a
 
 ### The example ###
 
-The following is an adaptation of @ref tutorial_js_face_detection.
-
 @code{.js}
 const { Canvas, createCanvas, Image, ImageData, loadImage } = require('canvas');
 const { JSDOM } = require('jsdom');
```

Review comment:
The example corresponds to `Dealing with files` chapter. We cannot just remove the code, it should be replaced by something meaningful.
**File:** doc/js_tutorials/js_setup/js_nodejs/js_nodejs.markdown
**Change Type:** modified
**Context:** PR #25324: Fix broken js build after moving HaarCascades to contrib - The HaarCascades related are not completely cleaned up #25311 after #25198, whic...
**Review Line:** 229

**Code Changes:**
```diff
@@ -227,52 +227,128 @@ In the browser, this filesystem is emulated in memory while in Node.js there's a
 
 ### The example ###
 
-The following is an adaptation of @ref tutorial_js_face_detection.
-
 @code{.js}
 const { Canvas, createCanvas, Image, ImageData, loadImage } = require('canvas');
 const { JSDOM } = require('jsdom');
```

Review comment:
Replaced the Haar based face detection example with FaceDetectorYN.
**File:** doc/js_tutorials/js_setup/js_nodejs/js_nodejs.markdown
**Change Type:** modified
**Context:** PR #25324: Fix broken js build after moving HaarCascades to contrib - The HaarCascades related are not completely cleaned up #25311 after #25198, whic...

**Code Changes:**
```diff
@@ -227,52 +227,128 @@ In the browser, this filesystem is emulated in memory while in Node.js there's a
 
 ### The example ###
 
-The following is an adaptation of @ref tutorial_js_face_detection.
-
 @code{.js}
 const { Canvas, createCanvas, Image, ImageData, loadImage } = require('canvas');
 const { JSDOM } = require('jsdom');
 const { writeFileSync, existsSync, mkdirSync } = require('fs');
```

Review comment:
I propose to add download step as in https://github.com/opencv/opencv/pull/25468 and drop the dependency in the description.
**File:** doc/js_tutorials/js_setup/js_nodejs/js_nodejs.markdown
**Change Type:** modified
**Context:** PR #25324: Fix broken js build after moving HaarCascades to contrib - The HaarCascades related are not completely cleaned up #25311 after #25198, whic...

**Code Changes:**
```diff
@@ -227,52 +227,128 @@ In the browser, this filesystem is emulated in memory while in Node.js there's a
 
 ### The example ###
 
-The following is an adaptation of @ref tutorial_js_face_detection.
-
 @code{.js}
 const { Canvas, createCanvas, Image, ImageData, loadImage } = require('canvas');
 const { JSDOM } = require('jsdom');
 const { writeFileSync, existsSync, mkdirSync } = require('fs');
```

Review comment:
please use 5.x branch, but not master. master is shadow copy of 4.x and may be removed soon.
**File:** doc/js_tutorials/js_setup/js_nodejs/js_nodejs.markdown
**Change Type:** modified
**Context:** PR #25324: Fix broken js build after moving HaarCascades to contrib - The HaarCascades related are not completely cleaned up #25311 after #25198, whic...

**Code Changes:**
```diff
@@ -227,52 +227,128 @@ In the browser, this filesystem is emulated in memory while in Node.js there's a
 
 ### The example ###
 
-The following is an adaptation of @ref tutorial_js_face_detection.
-
 @code{.js}
 const { Canvas, createCanvas, Image, ImageData, loadImage } = require('canvas');
 const { JSDOM } = require('jsdom');
 const { writeFileSync, existsSync, mkdirSync } = require('fs');
```

Review comment:
m.b. `writeFileSync`?
**File:** doc/js_tutorials/js_setup/js_nodejs/js_nodejs.markdown
**Change Type:** modified
**Context:** PR #25324: Fix broken js build after moving HaarCascades to contrib - The HaarCascades related are not completely cleaned up #25311 after #25198, whic...
**Review Line:** 349

**Code Changes:**
```diff
+    cv.circle(src, {x: rect.x5, y: rect.y5}, 2, [0, 255, 255, 255], 2)
+});
+
+const canvas = createCanvas(image.width, image.height);
+cv.imshow(canvas, src);
+writeFileSync('output3.jpg', canvas.toBuffer('image/jpeg'));
+console.log('The result is saved.')
+src.delete(); srcBGR.delete();
 })();
 
 /**
```

Review comment:
> m.b. writeFileSync?
**File:** doc/js_tutorials/js_setup/js_nodejs/js_nodejs.markdown
**Change Type:** modified
**Context:** PR #25324: Fix broken js build after moving HaarCascades to contrib - The HaarCascades related are not completely cleaned up #25311 after #25198, whic...
**Review Line:** 349

**Code Changes:**
```diff
+    cv.circle(src, {x: rect.x5, y: rect.y5}, 2, [0, 255, 255, 255], 2)
+});
+
+const canvas = createCanvas(image.width, image.height);
+cv.imshow(canvas, src);
+writeFileSync('output3.jpg', canvas.toBuffer('image/jpeg'));
+console.log('The result is saved.')
+src.delete(); srcBGR.delete();
 })();
 
 /**
```

Review comment:
Sorry for typo. I mean print log after write when it's complete.
**File:** modules/core/src/norm.cpp
**Change Type:** modified
**Context:** PR #25491: HAL for Hamming norm added
**Review Line:** 56

**Code Changes:**
```diff
@@ -52,6 +52,9 @@ static const uchar popCountTable4[] =
 
 int normHamming(const uchar* a, int n, int cellSize)
 {
+    int output;
+    CALL_HAL_RET(normHamming8u, cv_hal_normHamming8u, output, a, n, cellSize);
+
     if( cellSize == 1 )
         return normHamming(a, n);
     const uchar* tab = 0;
@@ -98,6 +101,9 @@ int normHamming(const uchar* a, int n, int cellSize)
```

Review comment:
It should be just CAL_HALL, if you do not use output status.
**File:** modules/core/src/norm.cpp
**Change Type:** modified
**Context:** PR #25491: HAL for Hamming norm added
**Review Line:** 56

**Code Changes:**
```diff
@@ -52,6 +52,9 @@ static const uchar popCountTable4[] =
 
 int normHamming(const uchar* a, int n, int cellSize)
 {
+    int output;
+    CALL_HAL_RET(normHamming8u, cv_hal_normHamming8u, output, a, n, cellSize);
+
     if( cellSize == 1 )
         return normHamming(a, n);
     const uchar* tab = 0;
@@ -98,6 +101,9 @@ int normHamming(const uchar* a, int n, int cellSize)
```

Review comment:
CALL_HAL does not work with functions returning some value, looks like CALL_HAL_RET was made specially for that case
**File:** modules/python/src2/cv2_numpy.hpp
**Change Type:** modified
**Context:** PR #25493: Replace static numpy allocator by function containing static.
**Review Line:** 21

**Code Changes:**
```diff
@@ -18,7 +18,7 @@ class NumpyAllocator : public cv::MatAllocator
     const cv::MatAllocator* stdAllocator;
 };
 
-extern NumpyAllocator g_numpyAllocator;
+inline NumpyAllocator& GetNumpyAllocator() {static NumpyAllocator gNumpyAllocator;return gNumpyAllocator;}
 
 //======================================================================================================================
 
```

Review comment:
Why is implementation here and not in .cpp file? Not sure if we want multiple instances of this object. --- > GetNumpyAllocator OpenCV function names start with lowercase.
**File:** modules/python/src2/cv2_numpy.hpp
**Change Type:** modified
**Context:** PR #25493: Replace static numpy allocator by function containing static.
**Review Line:** 21

**Code Changes:**
```diff
@@ -18,7 +18,7 @@ class NumpyAllocator : public cv::MatAllocator
     const cv::MatAllocator* stdAllocator;
 };
 
-extern NumpyAllocator g_numpyAllocator;
+inline NumpyAllocator& GetNumpyAllocator() {static NumpyAllocator gNumpyAllocator;return gNumpyAllocator;}
 
 //======================================================================================================================
 
```

Review comment:
There won't be multiple allocator instances, because function is not marked as `static`, so linker should strip its all internal `static` variables to 1
**File:** modules/core/perf/perf_math.cpp
**Change Type:** modified
**Context:** PR #25450: Perf tests for SVD and solve() created

**Code Changes:**
```diff
@@ -36,6 +36,234 @@ PERF_TEST_P(VectorLength, phase64f, testing::Values(128, 1000, 128*1024, 512*102
     SANITY_CHECK(angle, 5e-5);
 }
 
+// generates random vectors, performs Gram-Schmidt orthogonalization on them
+Mat randomOrtho(int rows, int ftype, RNG& rng)
+{
+    Mat result(rows, rows, ftype);
+    rng.fill(result, RNG::UNIFORM, cv::Scalar(-1), cv::Scalar(1));
+
```

Review comment:
cv::Mat::diag does the same: https://docs.opencv.org/4.x/d3/d63/classcv_1_1Mat.html#ae22383dd8cc054d6f47a672821309391
**File:** modules/core/perf/perf_math.cpp
**Change Type:** modified
**Context:** PR #25450: Perf tests for SVD and solve() created

**Code Changes:**
```diff
@@ -36,6 +36,234 @@ PERF_TEST_P(VectorLength, phase64f, testing::Values(128, 1000, 128*1024, 512*102
     SANITY_CHECK(angle, 5e-5);
 }
 
+// generates random vectors, performs Gram-Schmidt orthogonalization on them
+Mat randomOrtho(int rows, int ftype, RNG& rng)
+{
+    Mat result(rows, rows, ftype);
+    rng.fill(result, RNG::UNIFORM, cv::Scalar(-1), cv::Scalar(1));
+
```

Review comment:
`Mat::diag()` is similar but not that flexible. I want singular values to be sorted in descending order and make the code independent of their actual amount (which is not always equal to matrix size) which is not what `Mat::diag()` does.
**File:** modules/core/perf/perf_math.cpp
**Change Type:** modified
**Context:** PR #25450: Perf tests for SVD and solve() created

**Code Changes:**
```diff
@@ -36,6 +36,234 @@ PERF_TEST_P(VectorLength, phase64f, testing::Values(128, 1000, 128*1024, 512*102
     SANITY_CHECK(angle, 5e-5);
 }
 
+// generates random vectors, performs Gram-Schmidt orthogonalization on them
+Mat randomOrtho(int rows, int ftype, RNG& rng)
+{
+    Mat result(rows, rows, ftype);
+    rng.fill(result, RNG::UNIFORM, cv::Scalar(-1), cv::Scalar(1));
+
```

Review comment:
In case of duplication in singVals (it's possible with rng) we get out-of-bound access in std::set or exception. I propose simpler solution: ``` std::vector<FType> singVals(rank); rng.fill(singVals, RNG::UNIFORM, Scalar(0), Scalar(10)); std::sort(singVals.begin(), singVals.end()); std::Mat s = cv::Mat::diag(singVals); ```
**File:** modules/core/perf/perf_math.cpp
**Change Type:** modified
**Context:** PR #25450: Perf tests for SVD and solve() created

**Code Changes:**
```diff
@@ -36,6 +36,234 @@ PERF_TEST_P(VectorLength, phase64f, testing::Values(128, 1000, 128*1024, 512*102
     SANITY_CHECK(angle, 5e-5);
 }
 
+// generates random vectors, performs Gram-Schmidt orthogonalization on them
+Mat randomOrtho(int rows, int ftype, RNG& rng)
+{
+    Mat result(rows, rows, ftype);
+    rng.fill(result, RNG::UNIFORM, cv::Scalar(-1), cv::Scalar(1));
+
```

Review comment:
I propose to restore if and add else with exception/error.
**File:** modules/core/perf/perf_math.cpp
**Change Type:** modified
**Context:** PR #25450: Perf tests for SVD and solve() created
**Review Line:** 40

**Code Changes:**
```diff
@@ -36,6 +36,234 @@ PERF_TEST_P(VectorLength, phase64f, testing::Values(128, 1000, 128*1024, 512*102
     SANITY_CHECK(angle, 5e-5);
 }
 
+// generates random vectors, performs Gram-Schmidt orthogonalization on them
+Mat randomOrtho(int rows, int ftype, RNG& rng)
+{
+    Mat result(rows, rows, ftype);
+    rng.fill(result, RNG::UNIFORM, cv::Scalar(-1), cv::Scalar(1));
+
+    for (int i = 0; i < rows; i++)
```

Review comment:
Gram-Schmidt is known to produce huge rounding errors. Use QR decomposition instead and remove the 'R' part.
**File:** modules/core/perf/perf_math.cpp
**Change Type:** modified
**Context:** PR #25450: Perf tests for SVD and solve() created

**Code Changes:**
```diff
@@ -36,6 +36,234 @@ PERF_TEST_P(VectorLength, phase64f, testing::Values(128, 1000, 128*1024, 512*102
     SANITY_CHECK(angle, 5e-5);
 }
 
+// generates random vectors, performs Gram-Schmidt orthogonalization on them
+Mat randomOrtho(int rows, int ftype, RNG& rng)
+{
+    Mat result(rows, rows, ftype);
+    rng.fill(result, RNG::UNIFORM, cv::Scalar(-1), cv::Scalar(1));
+
```

Review comment:
Sure, segfault has to be fixed But using `Mat::diag()` is still not an option because: * s matrix is not necessarily square * `rank` can be less than any of matrix dimensions
**File:** modules/core/perf/perf_math.cpp
**Change Type:** modified
**Context:** PR #25450: Perf tests for SVD and solve() created

**Code Changes:**
```diff
@@ -36,6 +36,234 @@ PERF_TEST_P(VectorLength, phase64f, testing::Values(128, 1000, 128*1024, 512*102
     SANITY_CHECK(angle, 5e-5);
 }
 
+// generates random vectors, performs Gram-Schmidt orthogonalization on them
+Mat randomOrtho(int rows, int ftype, RNG& rng)
+{
+    Mat result(rows, rows, ftype);
+    rng.fill(result, RNG::UNIFORM, cv::Scalar(-1), cv::Scalar(1));
+
```

Review comment:
Input test data must be fixed between samples measurement. Input test data must be prepared outside of the main loop.
**File:** modules/core/perf/perf_math.cpp
**Change Type:** modified
**Context:** PR #25450: Perf tests for SVD and solve() created
**Review Line:** 40

**Code Changes:**
```diff
@@ -36,6 +36,234 @@ PERF_TEST_P(VectorLength, phase64f, testing::Values(128, 1000, 128*1024, 512*102
     SANITY_CHECK(angle, 5e-5);
 }
 
+// generates random vectors, performs Gram-Schmidt orthogonalization on them
+Mat randomOrtho(int rows, int ftype, RNG& rng)
+{
+    Mat result(rows, rows, ftype);
+    rng.fill(result, RNG::UNIFORM, cv::Scalar(-1), cv::Scalar(1));
+
+    for (int i = 0; i < rows; i++)
```

Review comment:
1. We don't need exact orhogonalization, just some random orthogonal matrix 2. I've checked its orthogonality (`A^T*A-I`as well as `A*A^T-I`) and its in acceptable epsilon bounds 3. The only QR decomposition we have is in `cv::hal` namespace, I'm not sure whether it's OK to use it in test even if it's exposed to public API
**File:** modules/dnn/src/layers/batch_norm_layer.cpp
**Change Type:** modified
**Context:** PR #25420: 0/1D test for `BatchNorm` layer

**Code Changes:**
```diff
@@ -163,6 +163,11 @@ class BatchNormLayerImpl CV_FINAL : public BatchNormLayer
                          std::vector<MatShape> &outputs,
                          std::vector<MatShape> &internals) const CV_OVERRIDE
     {
+        if (inputs[0].empty()) { // Support for 0D input
+            outputs.push_back(MatShape()); // Output is also a scalar.
+            return true;
+        }
+
         dims = inputs[0].size();
```

Review comment:
you can use cv::multiply and cv::add instead of loop. Or, even simpler outBlob = inpBlob * weights_ + bias_, if they have the same type and compatible shapes.
**File:** modules/dnn/test/test_layers_1d.cpp
**Change Type:** modified
**Context:** PR #25420: 0/1D test for `BatchNorm` layer

**Code Changes:**
```diff
@@ -603,6 +603,55 @@ INSTANTIATE_TEST_CASE_P(/*nothting*/, Layer_FullyConnected_Test,
                             std::vector<int>({4})
 ));
 
+typedef testing::TestWithParam<std::vector<int>> Layer_BatchNorm_Test;
+TEST_P(Layer_BatchNorm_Test, Accuracy_01D)
+{
+    std::vector<int> input_shape = GetParam();
+
+    // Layer parameters
```

Review comment:
`tuple` is redundant.
**File:** modules/dnn/test/test_layers_1d.cpp
**Change Type:** modified
**Context:** PR #25420: 0/1D test for `BatchNorm` layer

**Code Changes:**
```diff
@@ -603,6 +603,55 @@ INSTANTIATE_TEST_CASE_P(/*nothting*/, Layer_FullyConnected_Test,
                             std::vector<int>({4})
 ));
 
+typedef testing::TestWithParam<std::vector<int>> Layer_BatchNorm_Test;
+TEST_P(Layer_BatchNorm_Test, Accuracy_01D)
+{
+    std::vector<int> input_shape = GetParam();
+
+    // Layer parameters
```

Review comment:
variables are not used besides lp.set. It means that they may be removed.
**File:** modules/dnn/src/layers/batch_norm_layer.cpp
**Change Type:** modified
**Context:** PR #25420: 0/1D test for `BatchNorm` layer
**Review Line:** 287

**Code Changes:**
```diff
+            Mat &outBlob = outputs[0];
+            CV_Assert(inpBlob.total() == weights_.total());
+            cv::multiply(inpBlob, weights_, outBlob);
+            cv::add(outBlob, bias_, outBlob);
+            return;
+        }
+
         CV_Assert(blobs.size() >= 2);
         CV_Assert(inputs.size() == 1);
 
@@ -284,7 +298,6 @@ class BatchNormLayerImpl CV_FINAL : public BatchNormLayer
```

Review comment:
Does OpenCL backend supports 1D?
**File:** modules/dnn/test/test_layers_1d.cpp
**Change Type:** modified
**Context:** PR #25420: 0/1D test for `BatchNorm` layer

**Code Changes:**
```diff
@@ -603,6 +603,55 @@ INSTANTIATE_TEST_CASE_P(/*nothting*/, Layer_FullyConnected_Test,
                             std::vector<int>({4})
 ));
 
+typedef testing::TestWithParam<std::vector<int>> Layer_BatchNorm_Test;
+TEST_P(Layer_BatchNorm_Test, Accuracy_01D)
+{
+    std::vector<int> input_shape = GetParam();
+
+    // Layer parameters
```

Review comment:
randu is more prefererable
**File:** modules/dnn/src/layers/batch_norm_layer.cpp
**Change Type:** modified
**Context:** PR #25420: 0/1D test for `BatchNorm` layer
**Review Line:** 287

**Code Changes:**
```diff
+            Mat &outBlob = outputs[0];
+            CV_Assert(inpBlob.total() == weights_.total());
+            cv::multiply(inpBlob, weights_, outBlob);
+            cv::add(outBlob, bias_, outBlob);
+            return;
+        }
+
         CV_Assert(blobs.size() >= 2);
         CV_Assert(inputs.size() == 1);
 
@@ -284,7 +298,6 @@ class BatchNormLayerImpl CV_FINAL : public BatchNormLayer
```

Review comment:
I do not think it does. On CI, I can not find any information related to OCV. I did not change anything in `#HAVE_OPENCL` part
**File:** modules/dnn/src/onnx/onnx_importer.cpp
**Change Type:** modified
**Context:** PR #25492: Fixed ONNX Range layer to support any input type
**Review Line:** 3001

**Code Changes:**
```diff
@@ -2997,6 +2997,34 @@ void ONNXImporter::parseDepthToSpace(LayerParams& layerParams, const opencv_onnx
     addLayer(layerParams, node_proto);
 }
 
+template<typename T>
+Mat runRangeLayer(const Mat& startMat, const Mat& limitMat, const Mat& deltaMat)
+{
+    T start = startMat.at<T>(0);
+    T limit = limitMat.at<T>(0);
+    T delta = deltaMat.at<T>(0);
+
```

Review comment:
`parseRangeLayer`?
**File:** modules/dnn/src/onnx/onnx_importer.cpp
**Change Type:** modified
**Context:** PR #25492: Fixed ONNX Range layer to support any input type
**Review Line:** 3001

**Code Changes:**
```diff
@@ -2997,6 +2997,34 @@ void ONNXImporter::parseDepthToSpace(LayerParams& layerParams, const opencv_onnx
     addLayer(layerParams, node_proto);
 }
 
+template<typename T>
+Mat runRangeLayer(const Mat& startMat, const Mat& limitMat, const Mat& deltaMat)
+{
+    T start = startMat.at<T>(0);
+    T limit = limitMat.at<T>(0);
+    T delta = deltaMat.at<T>(0);
+
```

Review comment:
Why parse? There is a parseRange function below. This function runs the layer, not just parse
**File:** modules/core/include/opencv2/core/hal/intrin.hpp
**Change Type:** modified
**Context:** PR #22179: [GSoC] New universal intrinsic backend for RVV

**Code Changes:**
```diff
@@ -200,7 +200,7 @@ using namespace CV_CPU_OPTIMIZATION_HAL_NAMESPACE;
 #   undef CV_RVV
 #endif
 
-#if (CV_SSE2 || CV_NEON || CV_VSX || CV_MSA || CV_WASM_SIMD || CV_RVV071 || CV_RVV) && !defined(CV_FORCE_SIMD128_CPP)
+#if (CV_SSE2 || CV_NEON || CV_VSX || CV_MSA || CV_WASM_SIMD || CV_RVV071) && !defined(CV_FORCE_SIMD128_CPP)
 #define CV__SIMD_FORWARD 128
 #include "opencv2/core/hal/intrin_forward.hpp"
 #endif
@@ -229,9 +229,10 @@ using namespace CV_CPU_OPTIMIZATION_HAL_NAMESPACE;
```

Review comment:
on real SIMD platforms nlanes should be defined as enumeration constant, not as a static class member
**File:** modules/imgproc/src/median_blur.simd.hpp
**Change Type:** modified
**Context:** PR #22179: [GSoC] New universal intrinsic backend for RVV

**Code Changes:**
```diff
@@ -497,7 +497,6 @@ struct MinMax8u
 {
     typedef uchar value_type;
     typedef int arg_type;
-    enum { SIZE = 1 };
     arg_type load(const uchar* ptr) { return *ptr; }
     void store(uchar* ptr, arg_type val) { *ptr = (uchar)val; }
     void operator()(arg_type& a, arg_type& b) const
@@ -511,7 +510,6 @@ struct MinMax16u
 {
```

Review comment:
store VTraits<typename VecOp::arg_type>::vlanes() into local variable and use it
**File:** modules/core/include/opencv2/core/hal/intrin.hpp
**Change Type:** modified
**Context:** PR #22179: [GSoC] New universal intrinsic backend for RVV

**Code Changes:**
```diff
@@ -200,7 +200,7 @@ using namespace CV_CPU_OPTIMIZATION_HAL_NAMESPACE;
 #   undef CV_RVV
 #endif
 
-#if (CV_SSE2 || CV_NEON || CV_VSX || CV_MSA || CV_WASM_SIMD || CV_RVV071 || CV_RVV) && !defined(CV_FORCE_SIMD128_CPP)
+#if (CV_SSE2 || CV_NEON || CV_VSX || CV_MSA || CV_WASM_SIMD || CV_RVV071) && !defined(CV_FORCE_SIMD128_CPP)
 #define CV__SIMD_FORWARD 128
 #include "opencv2/core/hal/intrin_forward.hpp"
 #endif
@@ -229,9 +229,10 @@ using namespace CV_CPU_OPTIMIZATION_HAL_NAMESPACE;
```

Review comment:
In my opinion, if you switch from enumeration constants to static members, that will make things worse, not better. Of course, if your code is compiled as SSE code, the intrinsic to initialize vector with 32 bytes should not be available, and this is what compiler tells you. I think, it just reveals the problem. We should be very careful with tests that use such intrinsic, it should be surrounded by proper conditional compilation macros
**File:** modules/core/test/test_intrin_utils.hpp
**Change Type:** modified
**Context:** PR #22179: [GSoC] New universal intrinsic backend for RVV
**Review Line:** 1648

**Code Changes:**
```diff
         // check if addresses are aligned and unaligned respectively
-        EXPECT_EQ((size_t)0, (size_t)&data.a.d % CV_SIMD_WIDTH);
-        EXPECT_NE((size_t)0, (size_t)&data.u.d % CV_SIMD_WIDTH);
-        EXPECT_EQ((size_t)0, (size_t)&out.a.d % CV_SIMD_WIDTH);
-        EXPECT_NE((size_t)0, (size_t)&out.u.d % CV_SIMD_WIDTH);
+        EXPECT_EQ((size_t)0, (size_t)&data.a.d % VTraits<R>::max_nlanes);
+        EXPECT_NE((size_t)0, (size_t)&data.u.d % VTraits<R>::max_nlanes);
+        EXPECT_EQ((size_t)0, (size_t)&out.a.d % VTraits<R>::max_nlanes);
+        EXPECT_NE((size_t)0, (size_t)&out.u.d % VTraits<R>::max_nlanes);
 
         // check some initialization methods
```

Review comment:
Looks like a wrong change. `CV_SIMD_WIDTH` was replaced with `sizeof(typename VTraits<R>::lane_type) * VTraits<R>::vlanes()` in other places but not these four lines. Details see https://github.com/opencv/opencv/pull/25196#discussion_r1575812246.