nareshmlx/opencv-pr huggingface dataset:
**File:** 3rdparty/hal_rvv/hal_rvv_1p0/cart_to_polar.hpp
**Change Type:** added
**Context:** PR #27000: [HAL RVV] reuse atan | impl cart_to_polar | add perf test

**Code Changes:**
```diff
@@ -0,0 +1,48 @@
+// 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.
+
+// Copyright (C) 2025, Institute of Software, Chinese Academy of Sciences.
+
+#ifndef OPENCV_HAL_RVV_CART_TO_POLAR_HPP_INCLUDED
+#define OPENCV_HAL_RVV_CART_TO_POLAR_HPP_INCLUDED
+
```

Review comment:
Use something like below https://github.com/opencv/opencv/blob/12d182bf9e2fa518aafad75dd5b77835c75674b4/3rdparty/hal_rvv/hal_rvv_1p0/merge.hpp#L4-L5
**File:** 3rdparty/hal_rvv/hal_rvv_1p0/cart_to_polar.hpp
**Change Type:** added
**Context:** PR #27000: [HAL RVV] reuse atan | impl cart_to_polar | add perf test

**Code Changes:**
```diff
@@ -0,0 +1,48 @@
+// 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.
+
+// Copyright (C) 2025, Institute of Software, Chinese Academy of Sciences.
+
+#ifndef OPENCV_HAL_RVV_CART_TO_POLAR_HPP_INCLUDED
+#define OPENCV_HAL_RVV_CART_TO_POLAR_HPP_INCLUDED
+
```

Review comment:
If these are shared across different files, it is better to put them in a file like `common.hpp` or `common_utils.hpp`.
**File:** 3rdparty/hal_rvv/hal_rvv_1p0/cart_to_polar.hpp
**Change Type:** added
**Context:** PR #27000: [HAL RVV] reuse atan | impl cart_to_polar | add perf test

**Code Changes:**
```diff
@@ -0,0 +1,48 @@
+// 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.
+
+// Copyright (C) 2025, Institute of Software, Chinese Academy of Sciences.
+
+#ifndef OPENCV_HAL_RVV_CART_TO_POLAR_HPP_INCLUDED
+#define OPENCV_HAL_RVV_CART_TO_POLAR_HPP_INCLUDED
+
```

Review comment:
I'm not sure whether it's better to put it in a common file or keep it separate. A separate file keeps each file smaller and makes the functionality clearer, so I prefer placing it in its own file. Moreover, if we use a common file, I think it would be difficult to determine whether a function should be placed in it.
**File:** 3rdparty/hal_rvv/hal_rvv_1p0/cart_to_polar.hpp
**Change Type:** added
**Context:** PR #27000: [HAL RVV] reuse atan | impl cart_to_polar | add perf test

**Code Changes:**
```diff
@@ -0,0 +1,48 @@
+// 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.
+
+// Copyright (C) 2025, Institute of Software, Chinese Academy of Sciences.
+
+#ifndef OPENCV_HAL_RVV_CART_TO_POLAR_HPP_INCLUDED
+#define OPENCV_HAL_RVV_CART_TO_POLAR_HPP_INCLUDED
+
```

Review comment:
Leave it as-is for now.
**File:** modules/imgcodecs/test/test_animation.cpp
**Change Type:** modified
**Context:** PR #27087: Fixing imread() function 16 bit APNG reading problem
**Review Line:** 659

**Code Changes:**
```diff
+    EXPECT_EQ(65280, img.at<ushort>(0, 2));
+    EXPECT_EQ(65535, img.at<ushort>(0, 3));
+
+    img = imread(filename, IMREAD_GRAYSCALE);
+    ASSERT_FALSE(img.empty());
+    EXPECT_TRUE(img.type() == CV_8UC1);
+    EXPECT_EQ(76, img.at<uchar>(0, 0));
+
+    img = imread(filename, IMREAD_COLOR);
+    ASSERT_FALSE(img.empty());
+    EXPECT_TRUE(img.type() == CV_8UC3);
```

Review comment:
Is 033.png 16 bit or 8 bit? Asking for grayscale should keep the depth
**File:** modules/imgcodecs/test/test_animation.cpp
**Change Type:** modified
**Context:** PR #27087: Fixing imread() function 16 bit APNG reading problem
**Review Line:** 659

**Code Changes:**
```diff
+    EXPECT_EQ(65280, img.at<ushort>(0, 2));
+    EXPECT_EQ(65535, img.at<ushort>(0, 3));
+
+    img = imread(filename, IMREAD_GRAYSCALE);
+    ASSERT_FALSE(img.empty());
+    EXPECT_TRUE(img.type() == CV_8UC1);
+    EXPECT_EQ(76, img.at<uchar>(0, 0));
+
+    img = imread(filename, IMREAD_COLOR);
+    ASSERT_FALSE(img.empty());
+    EXPECT_TRUE(img.type() == CV_8UC3);
```

Review comment:
033.png is `CV_16UC4` IMREAD_GRAYSCALE converts it to `CV_8UC1` by default. let me check `IMREAD_GRAYSCALE | IMREAD_ANYDEPTH`
**File:** modules/core/src/minmax.dispatch.cpp
**Change Type:** modified
**Context:** PR #26946: Fix HAL dispatch in cv::minMaxIdx

**Code Changes:**
```diff
@@ -314,18 +314,15 @@ void cv::minMaxIdx(InputArray _src, double* minVal,
 
     if (src.dims <= 2)
     {
-        if ((size_t)src.step == (size_t)mask.step)
+        if ((size_t)src.step == (size_t)mask.step || mask.empty())
         {
             CALL_HAL(minMaxIdx, cv_hal_minMaxIdx, src.data, src.step, src.cols*cn, src.rows,
                      src.depth(), minVal, maxVal, minIdx, maxIdx, mask.data);
         }
```

Review comment:
`(mask.isContinuous() || mask.empty())`
**File:** modules/core/src/minmax.dispatch.cpp
**Change Type:** modified
**Context:** PR #26946: Fix HAL dispatch in cv::minMaxIdx

**Code Changes:**
```diff
@@ -314,18 +314,15 @@ void cv::minMaxIdx(InputArray _src, double* minVal,
 
     if (src.dims <= 2)
     {
-        if ((size_t)src.step == (size_t)mask.step)
+        if ((size_t)src.step == (size_t)mask.step || mask.empty())
         {
             CALL_HAL(minMaxIdx, cv_hal_minMaxIdx, src.data, src.step, src.cols*cn, src.rows,
                      src.depth(), minVal, maxVal, minIdx, maxIdx, mask.data);
         }
```

Review comment:
I would rewrite it as following: ``` if ((size_t)src.step == (size_t)mask.step || mask.empty()) { CALL_HAL(minMaxIdx, cv_hal_minMaxIdx, src.data, src.step, src.cols*cn, src.rows, src.depth(), minVal, maxVal, minIdx, maxIdx, mask.data); } CALL_HAL(minMaxIdxMaskStep, cv_hal_minMaxIdxMaskStep, src.data, src.step, src.cols*cn, src.rows, src.depth(), minVal, maxVal, minIdx, maxIdx, mask.data, mask.step); ``` minMaxIdxMaskStep was introduced not so far ago. It allows to use old version without mask step everywhere it's possible. If the some HAL implements new API only, it has a chance too.
**File:** modules/core/src/minmax.dispatch.cpp
**Change Type:** modified
**Context:** PR #26946: Fix HAL dispatch in cv::minMaxIdx
**Review Line:** 322

**Code Changes:**
```diff
-        else
-        {
-            CALL_HAL(minMaxIdxMaskStep, cv_hal_minMaxIdxMaskStep, src.data, src.step, src.cols*cn, src.rows,
-                     src.depth(), minVal, maxVal, minIdx, maxIdx, mask.data, mask.step);
-        }
+        CALL_HAL(minMaxIdxMaskStep, cv_hal_minMaxIdxMaskStep, src.data, src.step, src.cols*cn, src.rows,
+                 src.depth(), minVal, maxVal, minIdx, maxIdx, mask.data, mask.step);
     }
-    else if (src.isContinuous() && mask.isContinuous())
+    else if (src.isContinuous() && (mask.isContinuous() || mask.empty()))
     {
```

Review comment:
I'm wondering why are HAL integrations for 4.x and 5.x are so different? Theoretically they should look the same.
**File:** modules/core/src/minmax.dispatch.cpp
**Change Type:** modified
**Context:** PR #26946: Fix HAL dispatch in cv::minMaxIdx
**Review Line:** 322

**Code Changes:**
```diff
-        else
-        {
-            CALL_HAL(minMaxIdxMaskStep, cv_hal_minMaxIdxMaskStep, src.data, src.step, src.cols*cn, src.rows,
-                     src.depth(), minVal, maxVal, minIdx, maxIdx, mask.data, mask.step);
-        }
+        CALL_HAL(minMaxIdxMaskStep, cv_hal_minMaxIdxMaskStep, src.data, src.step, src.cols*cn, src.rows,
+                 src.depth(), minVal, maxVal, minIdx, maxIdx, mask.data, mask.step);
     }
-    else if (src.isContinuous() && mask.isContinuous())
+    else if (src.isContinuous() && (mask.isContinuous() || mask.empty()))
     {
```

Review comment:
`Mat1D` and `Core_Array` tests are disabled in 4.x so all tests passed. This patch should also be applied to 4.x. These two failures are not specific to RISC-V or my implementation of HAL. Without this fix, existing HALs will also fail these two tests.
**File:** modules/core/src/minmax.dispatch.cpp
**Change Type:** modified
**Context:** PR #26946: Fix HAL dispatch in cv::minMaxIdx

**Code Changes:**
```diff
@@ -314,18 +314,15 @@ void cv::minMaxIdx(InputArray _src, double* minVal,
 
     if (src.dims <= 2)
     {
-        if ((size_t)src.step == (size_t)mask.step)
+        if ((size_t)src.step == (size_t)mask.step || mask.empty())
         {
             CALL_HAL(minMaxIdx, cv_hal_minMaxIdx, src.data, src.step, src.cols*cn, src.rows,
                      src.depth(), minVal, maxVal, minIdx, maxIdx, mask.data);
         }
```

Review comment:
Why do you need `ofs2idx` for the case `dims < 2`. For 1d array the second index will be just zero. Right?
**File:** modules/core/src/minmax.dispatch.cpp
**Change Type:** modified
**Context:** PR #26946: Fix HAL dispatch in cv::minMaxIdx

**Code Changes:**
```diff
@@ -314,18 +314,15 @@ void cv::minMaxIdx(InputArray _src, double* minVal,
 
     if (src.dims <= 2)
     {
-        if ((size_t)src.step == (size_t)mask.step)
+        if ((size_t)src.step == (size_t)mask.step || mask.empty())
         {
             CALL_HAL(minMaxIdx, cv_hal_minMaxIdx, src.data, src.step, src.cols*cn, src.rows,
                      src.depth(), minVal, maxVal, minIdx, maxIdx, mask.data);
         }
```

Review comment:
Just tried KleidiCV HAL for ARM and it handles 1d case correctly, but it does not support masks.
**File:** modules/core/src/minmax.dispatch.cpp
**Change Type:** modified
**Context:** PR #26946: Fix HAL dispatch in cv::minMaxIdx

**Code Changes:**
```diff
@@ -314,18 +314,15 @@ void cv::minMaxIdx(InputArray _src, double* minVal,
 
     if (src.dims <= 2)
     {
-        if ((size_t)src.step == (size_t)mask.step)
+        if ((size_t)src.step == (size_t)mask.step || mask.empty())
         {
             CALL_HAL(minMaxIdx, cv_hal_minMaxIdx, src.data, src.step, src.cols*cn, src.rows,
                      src.depth(), minVal, maxVal, minIdx, maxIdx, mask.data);
         }
```

Review comment:
> Why do you need `ofs2idx` for the case `dims < 2`. For 1d array the second index will be just zero. Right? The HAL can not distinguish 1D `a[n]` between 2D `a[1][n]`. It will treat 1D array as `1xn` 2D array, and then the first index will be zero. HAL interface: ```cpp inline int hal_ni_minMaxIdx(const uchar* src_data, size_t src_step, int width, int height, int depth, double* minVal, double* maxVal, int* minIdx, int* maxIdx, uchar* mask) { return CV_HAL_ERROR_NOT_IMPLEMENTED; } ``` `a[n]` and `a[1][n]` both will pass `src_step=sizeof(T)*width, width=n, height=1`. Please let me know if there is a more elegant solution to this.
**File:** modules/imgcodecs/src/grfmt_gif.cpp
**Change Type:** modified
**Context:** PR #27047: Move the CV_Assert above the << operation to not trigger the fuzzer

**Code Changes:**
```diff
@@ -319,9 +319,9 @@ bool GifDecoder::lzwDecode() {
     lzwMinCodeSize = m_strm.getByte();
     const int lzwMaxSize = (1 << 12); // 4096 is the maximum size of the LZW table (12 bits)
     int lzwCodeSize = lzwMinCodeSize + 1;
+    CV_Assert(lzwCodeSize > 2 && lzwCodeSize <= 12);
     int clearCode = 1 << lzwMinCodeSize;
     int exitCode = clearCode + 1;
-    CV_Assert(lzwCodeSize > 2 && lzwCodeSize <= 12);
     std::vector<lzwNodeD> lzwExtraTable(lzwMaxSize + 1);
     int colorTableSize = clearCode;
```

Review comment:
`int lzwCodeSize = lzwMinCodeSize + 1;` Why the following `CV_Assert(lzwCodeSize > 2 && lzwCodeSize <= 12);` is not enough?
**File:** modules/imgcodecs/src/grfmt_gif.cpp
**Change Type:** modified
**Context:** PR #27047: Move the CV_Assert above the << operation to not trigger the fuzzer

**Code Changes:**
```diff
@@ -319,9 +319,9 @@ bool GifDecoder::lzwDecode() {
     lzwMinCodeSize = m_strm.getByte();
     const int lzwMaxSize = (1 << 12); // 4096 is the maximum size of the LZW table (12 bits)
     int lzwCodeSize = lzwMinCodeSize + 1;
+    CV_Assert(lzwCodeSize > 2 && lzwCodeSize <= 12);
     int clearCode = 1 << lzwMinCodeSize;
     int exitCode = clearCode + 1;
-    CV_Assert(lzwCodeSize > 2 && lzwCodeSize <= 12);
     std::vector<lzwNodeD> lzwExtraTable(lzwMaxSize + 1);
     int colorTableSize = clearCode;
```

Review comment:
I propose to use CV_Assert, if the value is not expected in correct gif.
**File:** modules/imgcodecs/src/grfmt_gif.cpp
**Change Type:** modified
**Context:** PR #27047: Move the CV_Assert above the << operation to not trigger the fuzzer

**Code Changes:**
```diff
@@ -319,9 +319,9 @@ bool GifDecoder::lzwDecode() {
     lzwMinCodeSize = m_strm.getByte();
     const int lzwMaxSize = (1 << 12); // 4096 is the maximum size of the LZW table (12 bits)
     int lzwCodeSize = lzwMinCodeSize + 1;
+    CV_Assert(lzwCodeSize > 2 && lzwCodeSize <= 12);
     int clearCode = 1 << lzwMinCodeSize;
     int exitCode = clearCode + 1;
-    CV_Assert(lzwCodeSize > 2 && lzwCodeSize <= 12);
     std::vector<lzwNodeD> lzwExtraTable(lzwMaxSize + 1);
     int colorTableSize = clearCode;
```

Review comment:
Ah indeed, thx, I missed that. I am moving it above the << operation which triggered the fuzzer
**File:** modules/core/src/norm.simd.hpp
**Change Type:** modified
**Context:** PR #26991: core: improve norm of hal rvv
**Review Line:** 8

**Code Changes:**
```diff
-#if CV_RVV
-#include "norm.rvv1p0.hpp"
-#endif
-
 namespace cv {
 
 using NormFunc = int (*)(const uchar*, const uchar*, uchar*, int, int);
@@ -181,9 +177,6 @@ struct NormInf_SIMD<int, int> {
     int operator() (const int* src, int n) const {
         int j = 0;
         int s = 0;
```

Review comment:
Where is replacement for these removed optimizations? (added by #26885)
**File:** modules/core/src/norm.simd.hpp
**Change Type:** modified
**Context:** PR #26991: core: improve norm of hal rvv
**Review Line:** 8

**Code Changes:**
```diff
-#if CV_RVV
-#include "norm.rvv1p0.hpp"
-#endif
-
 namespace cv {
 
 using NormFunc = int (*)(const uchar*, const uchar*, uchar*, int, int);
@@ -181,9 +177,6 @@ struct NormInf_SIMD<int, int> {
     int operator() (const int* src, int n) const {
         int j = 0;
         int s = 0;
```

Review comment:
All moved to hal rvv.
**File:** modules/highgui/src/window_QT.cpp
**Change Type:** modified
**Context:** PR #27082: displayOverlay doesn't disappear after timeout

**Code Changes:**
```diff
@@ -2949,6 +2949,7 @@ void DefaultViewPort::stopDisplayInfo()
 {
     timerDisplay->stop();
     drawInfo = false;
+    viewport()->update();
 }
 
 
```

Review comment:
What if just add "update" to the end of `DefaultViewPort::stopDisplayInfo()`? The method is involed by existing timer. No need to create a new one.
**File:** modules/highgui/src/window_QT.cpp
**Change Type:** modified
**Context:** PR #27082: displayOverlay doesn't disappear after timeout

**Code Changes:**
```diff
@@ -2949,6 +2949,7 @@ void DefaultViewPort::stopDisplayInfo()
 {
     timerDisplay->stop();
     drawInfo = false;
+    viewport()->update();
 }
 
 
```

Review comment:
Actually yeah, i just tested and i think it's working. Let me just check again.
**File:** 3rdparty/hal_rvv/hal_rvv_1p0/polar_to_cart.hpp
**Change Type:** added
**Context:** PR #26999: [HAL RVV] unify and impl polar_to_cart | add perf test

**Code Changes:**
```diff
@@ -0,0 +1,53 @@
+// 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.
+
+// Copyright (C) 2025, Institute of Software, Chinese Academy of Sciences.
+
+#ifndef OPENCV_HAL_RVV_POLAR_TO_CART_HPP_INCLUDED
+#define OPENCV_HAL_RVV_POLAR_TO_CART_HPP_INCLUDED
+
```

Review comment:
nit: Use something like below https://github.com/opencv/opencv/blob/12d182bf9e2fa518aafad75dd5b77835c75674b4/3rdparty/hal_rvv/hal_rvv_1p0/merge.hpp#L4-L5
**File:** 3rdparty/hal_rvv/hal_rvv_1p0/sincos.hpp
**Change Type:** added
**Context:** PR #26999: [HAL RVV] unify and impl polar_to_cart | add perf test
**Review Line:** 1

**Code Changes:**
```diff
@@ -0,0 +1,72 @@
+// 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.
+
+// Copyright (C) 2025, Institute of Software, Chinese Academy of Sciences.
+
```

Review comment:
Better to move the content of this file to `common.hpp` or `common_utils.hpp` when we have such files.
**File:** modules/core/src/mathfuncs_core.simd.hpp
**Change Type:** modified
**Context:** PR #26999: [HAL RVV] unify and impl polar_to_cart | add perf test
**Review Line:** 14

**Code Changes:**
```diff
@@ -11,6 +11,8 @@ CV_CPU_OPTIMIZATION_NAMESPACE_BEGIN
 // forward declarations
 void cartToPolar32f(const float *X, const float *Y, float* mag, float *angle, int len, bool angleInDegrees);
 void cartToPolar64f(const double *X, const double *Y, double* mag, double *angle, int len, bool angleInDegrees);
+void polarToCart32f(const float *mag, const float *angle, float *X, float *Y, int len, bool angleInDegrees);
+void polarToCart64f(const double *mag, const double *angle, double *X, double *Y, int len, bool angleInDegrees);
 void fastAtan32f(const float *Y, const float *X, float *angle, int len, bool angleInDegrees);
 void fastAtan64f(const double *Y, const double *X, double *angle, int len, bool angleInDegrees);
 void fastAtan2(const float *Y, const float *X, float *angle, int len, bool angleInDegrees);
@@ -178,6 +180,167 @@ void cartToPolar64f(const double *X, const double *Y, double *mag, double *angle
```

Review comment:
Why is `isInPlace` dropped?
**File:** modules/core/src/mathfuncs_core.simd.hpp
**Change Type:** modified
**Context:** PR #26999: [HAL RVV] unify and impl polar_to_cart | add perf test
**Review Line:** 185

**Code Changes:**
```diff
     }
 }
 
+namespace {
+
+static inline void SinCos_32f(const float* mag, const float* angle, float* cosval, float* sinval, int len, int angle_in_degrees)
+{
+    const int N = 64;
+
+    static const double sin_table[] =
+    {
```

Review comment:
It would be nice if you can refactor this function with v_sincos from https://github.com/opencv/opencv/pull/25892.
**File:** 3rdparty/hal_rvv/hal_rvv_1p0/sincos.hpp
**Change Type:** added
**Context:** PR #26999: [HAL RVV] unify and impl polar_to_cart | add perf test
**Review Line:** 1

**Code Changes:**
```diff
@@ -0,0 +1,72 @@
+// 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.
+
+// Copyright (C) 2025, Institute of Software, Chinese Academy of Sciences.
+
```

Review comment:
In fact, this function is currently only used by `polar_to_cart` in `core`, so it’s not really "common." I split it into a separate file because it represents a standalone, reusable functionality. If I just put it in `polar_to_cart.hpp`, it may also be confusing why the seemingly standalone function `sin_cos` is there.
**File:** modules/core/src/mathfuncs_core.simd.hpp
**Change Type:** modified
**Context:** PR #26999: [HAL RVV] unify and impl polar_to_cart | add perf test
**Review Line:** 14

**Code Changes:**
```diff
@@ -11,6 +11,8 @@ CV_CPU_OPTIMIZATION_NAMESPACE_BEGIN
 // forward declarations
 void cartToPolar32f(const float *X, const float *Y, float* mag, float *angle, int len, bool angleInDegrees);
 void cartToPolar64f(const double *X, const double *Y, double* mag, double *angle, int len, bool angleInDegrees);
+void polarToCart32f(const float *mag, const float *angle, float *X, float *Y, int len, bool angleInDegrees);
+void polarToCart64f(const double *mag, const double *angle, double *X, double *Y, int len, bool angleInDegrees);
 void fastAtan32f(const float *Y, const float *X, float *angle, int len, bool angleInDegrees);
 void fastAtan64f(const double *Y, const double *X, double *angle, int len, bool angleInDegrees);
 void fastAtan2(const float *Y, const float *X, float *angle, int len, bool angleInDegrees);
@@ -178,6 +180,167 @@ void cartToPolar64f(const double *X, const double *Y, double *mag, double *angle
```

Review comment:
Because it looks quite different from cartToPolar and is inconsistent with the current HAL interface. And it is no longer necessary in the current approach. You can see the detail in this part of the first comment: > ### Effect of Point 4
**File:** modules/core/src/mathfuncs_core.simd.hpp
**Change Type:** modified
**Context:** PR #26999: [HAL RVV] unify and impl polar_to_cart | add perf test
**Review Line:** 185

**Code Changes:**
```diff
     }
 }
 
+namespace {
+
+static inline void SinCos_32f(const float* mag, const float* angle, float* cosval, float* sinval, int len, int angle_in_degrees)
+{
+    const int N = 64;
+
+    static const double sin_table[] =
+    {
```

Review comment:
I will give it a try. However, `SinCos_32f` has specific optimizations for AVX2. Where should I place it? Should I leave it here or put it in `intrin_avx.hpp`? I'm not familiar with the UI conventions.
**File:** modules/core/src/mathfuncs_core.simd.hpp
**Change Type:** modified
**Context:** PR #26999: [HAL RVV] unify and impl polar_to_cart | add perf test
**Review Line:** 185

**Code Changes:**
```diff
     }
 }
 
+namespace {
+
+static inline void SinCos_32f(const float* mag, const float* angle, float* cosval, float* sinval, int len, int angle_in_degrees)
+{
+    const int N = 64;
+
+    static const double sin_table[] =
+    {
```

Review comment:
If you implement UI version and find out that it is much faster, then just drop it. Otherwise, preserve it somehow.
**File:** 3rdparty/hal_rvv/hal_rvv_1p0/sincos.hpp
**Change Type:** added
**Context:** PR #26999: [HAL RVV] unify and impl polar_to_cart | add perf test
**Review Line:** 1

**Code Changes:**
```diff
@@ -0,0 +1,72 @@
+// 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.
+
+// Copyright (C) 2025, Institute of Software, Chinese Academy of Sciences.
+
```

Review comment:
We can leave it as-is.
**File:** modules/core/perf/perf_flip.cpp
**Change Type:** added
**Context:** PR #26943: Impl RISC-V HAL for cv::flip | Add perf test for flip
**Review Line:** 5

**Code Changes:**
```diff
@@ -0,0 +1,45 @@
+// 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 "perf_precomp.hpp"
+
+namespace opencv_test { namespace {
+using namespace perf;
+
+enum
```

Review comment:
License header is missing.
**File:** 3rdparty/hal_rvv/hal_rvv_1p0/types.hpp
**Change Type:** added
**Context:** PR #26977: [Refactor](HAL RVV): Consolidate Helpers for Code Reusability

**Code Changes:**
```diff
@@ -0,0 +1,485 @@
+// 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.
+#pragma once
+
+#include <riscv_vector.h>
+#include <type_traits>
+
+namespace cv { namespace cv_hal_rvv {
```

Review comment:
Maybe split names for better readability? `RVV_##TYPE_NAME##M1`?
**File:** 3rdparty/hal_rvv/hal_rvv_1p0/types.hpp
**Change Type:** added
**Context:** PR #26977: [Refactor](HAL RVV): Consolidate Helpers for Code Reusability

**Code Changes:**
```diff
@@ -0,0 +1,485 @@
+// 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.
+#pragma once
+
+#include <riscv_vector.h>
+#include <type_traits>
+
+namespace cv { namespace cv_hal_rvv {
```

Review comment:
I meant adding an underscore between `RVV` and type, e.g. `RVV_U8M1`