nareshmlx/opencv-pr huggingface dataset:
**File:** 3rdparty/hal_rvv/hal_rvv_1p0/color.hpp
**Change Type:** modified
**Context:** PR #27046: Fix RISC-V HAL solve/SVD and BGRtoLab
**Review Line:** 2320

**Code Changes:**
```diff
+            static constexpr float BGR2XYZ[] =
+            {
+                0.180423f / 0.950456f, 0.357580f / 0.950456f, 0.412453f / 0.950456f,
+                0.072169f            , 0.715160f            , 0.212671f            ,
+                0.950227f / 1.088754f, 0.119193f / 1.088754f, 0.019334f / 1.088754f
+            };
             static constexpr float BGR2XYZ_D65[] =
             {
                 0.180423f, 0.357580f, 0.412453f,
                 0.072169f, 0.715160f, 0.212671f,
                 0.950227f, 0.119193f, 0.019334f
```

Review comment:
All floating point values are copied from the cv::cvtColor series. The comments before each converting function describes it.
**File:** 3rdparty/hal_rvv/hal_rvv_1p0/color.hpp
**Change Type:** modified
**Context:** PR #27046: Fix RISC-V HAL solve/SVD and BGRtoLab

**Code Changes:**
```diff
@@ -36,6 +36,11 @@ namespace color {
         cv::parallel_for_(Range(1, height), ColorInvoker(func, std::forward<Args>(args)...), (width - 1) * height / static_cast<double>(1 << 15));
         return func(0, 1, std::forward<Args>(args)...);
     }
+
+    template<typename T> T rint(T val)
+    {
+        return val - std::remainder(val, 1.0);
+    }
 } // cv::cv_hal_rvv::color
```

Review comment:
I will add a wrapper for this.
**File:** 3rdparty/hal_rvv/hal_rvv_1p0/color.hpp
**Change Type:** modified
**Context:** PR #27046: Fix RISC-V HAL solve/SVD and BGRtoLab

**Code Changes:**
```diff
@@ -36,6 +36,11 @@ namespace color {
         cv::parallel_for_(Range(1, height), ColorInvoker(func, std::forward<Args>(args)...), (width - 1) * height / static_cast<double>(1 << 15));
         return func(0, 1, std::forward<Args>(args)...);
     }
+
+    template<typename T> T rint(T val)
+    {
+        return val - std::remainder(val, 1.0);
+    }
 } // cv::cv_hal_rvv::color
```

Review comment:
The function is called in a loop many times and modifies global state. It may be slow and affect other parallel threads. I propose to revert to the original rint and add a note to header(s) and documentation about it. Also as alternative cvRound/cvFloor may be used or some other stateless function.
**File:** 3rdparty/hal_rvv/hal_rvv_1p0/color.hpp
**Change Type:** modified
**Context:** PR #27046: Fix RISC-V HAL solve/SVD and BGRtoLab

**Code Changes:**
```diff
@@ -36,6 +36,11 @@ namespace color {
         cv::parallel_for_(Range(1, height), ColorInvoker(func, std::forward<Args>(args)...), (width - 1) * height / static_cast<double>(1 << 15));
         return func(0, 1, std::forward<Args>(args)...);
     }
+
+    template<typename T> T rint(T val)
+    {
+        return val - std::remainder(val, 1.0);
+    }
 } // cv::cv_hal_rvv::color
```

Review comment:
All calls to `rint` are made within the singleton initialization or static variables initialization, which has no performance penalty or thread safety issues.
**File:** 3rdparty/hal_rvv/hal_rvv_1p0/color.hpp
**Change Type:** modified
**Context:** PR #27046: Fix RISC-V HAL solve/SVD and BGRtoLab

**Code Changes:**
```diff
@@ -36,6 +36,11 @@ namespace color {
         cv::parallel_for_(Range(1, height), ColorInvoker(func, std::forward<Args>(args)...), (width - 1) * height / static_cast<double>(1 << 15));
         return func(0, 1, std::forward<Args>(args)...);
     }
+
+    template<typename T> T rint(T val)
+    {
+        return val - std::remainder(val, 1.0);
+    }
 } // cv::cv_hal_rvv::color
```

Review comment:
I have changed to `roundeven`.
**File:** modules/imgcodecs/src/grfmt_gif.cpp
**Change Type:** modified
**Context:** PR #27081: GIF: Make sure to resize lzwExtraTable before each block

**Code Changes:**
```diff
@@ -320,11 +320,18 @@ bool GifDecoder::lzwDecode() {
     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;
+    const int clearCode = 1 << lzwMinCodeSize;
+    const int exitCode = clearCode + 1;
     std::vector<lzwNodeD> lzwExtraTable(lzwMaxSize + 1);
-    int colorTableSize = clearCode;
```

Review comment:
Why do you remove `lzwMaxSize+1` here? If I understand correctly the issue is related to exitCode state. It clears the vector and it's used after .clear() call. the vector may be used becore clearCode and it's not allocated properly.
**File:** modules/imgcodecs/src/grfmt_gif.cpp
**Change Type:** modified
**Context:** PR #27081: GIF: Make sure to resize lzwExtraTable before each block

**Code Changes:**
```diff
@@ -320,11 +320,18 @@ bool GifDecoder::lzwDecode() {
     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;
+    const int clearCode = 1 << lzwMinCodeSize;
+    const int exitCode = clearCode + 1;
     std::vector<lzwNodeD> lzwExtraTable(lzwMaxSize + 1);
-    int colorTableSize = clearCode;
```

Review comment:
I removed it in case blockLen is 0 in the first place (not sure if that can happen), this way we have one allocation less. `clear()` is always called before using `lzwExtraTable`, at the beginning of the while loop. You are right about the issue
**File:** modules/imgcodecs/include/opencv2/imgcodecs.hpp
**Change Type:** modified
**Context:** PR #27013: Test for in-memory animation encoding and decoding
**Review Line:** 436

**Code Changes:**
```diff
+specify additional options for the encoding process. Refer to `cv::ImwriteFlags`
+for details on possible parameters.
+
+@return Returns true if the animation was successfully encoded; returns false otherwise.
+*/
+CV_EXPORTS_W bool imencodeanimation(const String& ext, const Animation& animation, CV_OUT std::vector<uchar>& buf, const std::vector<int>& params = std::vector<int>());
+
 /** @brief Returns the number of images inside the given file
 
 The function imcount returns the number of pages in a multi-page image (e.g. TIFF), the number of frames in an animation (e.g. AVIF), and 1 otherwise.
```

Review comment:
I believe `buf` should be of type `OutputArray`. Or not?
**File:** modules/imgcodecs/src/loadsave.cpp
**Change Type:** modified
**Context:** PR #27013: Test for in-memory animation encoding and decoding

**Code Changes:**
```diff
@@ -811,6 +811,116 @@ bool imreadanimation(const String& filename, CV_OUT Animation& animation, int st
     return imreadanimation_(filename, IMREAD_UNCHANGED, start, count, animation);
 }
 
+static bool imdecodeanimation_(InputArray buf, int flags, int start, int count, Animation& animation)
+{
+    bool success = false;
+    if (start < 0) {
+        start = 0;
+    }
```

Review comment:
i think no need `CV_OUT` in .cpp file bool imdecodeanimation(InputArray buf, Animation& animation, int start, int count)
**File:** modules/imgcodecs/src/loadsave.cpp
**Change Type:** modified
**Context:** PR #27013: Test for in-memory animation encoding and decoding

**Code Changes:**
```diff
@@ -811,6 +811,116 @@ bool imreadanimation(const String& filename, CV_OUT Animation& animation, int st
     return imreadanimation_(filename, IMREAD_UNCHANGED, start, count, animation);
 }
 
+static bool imdecodeanimation_(InputArray buf, int flags, int start, int count, Animation& animation)
+{
+    bool success = false;
+    if (start < 0) {
+        start = 0;
+    }
```

Review comment:
i think no need `CV_OUT` in .cpp file static bool imencodeanimation_(const String& ext, const Animation& animation, std::vector<uchar>& buf, const std::vector<int>& params)
**File:** modules/imgcodecs/src/loadsave.cpp
**Change Type:** modified
**Context:** PR #27013: Test for in-memory animation encoding and decoding

**Code Changes:**
```diff
@@ -811,6 +811,116 @@ bool imreadanimation(const String& filename, CV_OUT Animation& animation, int st
     return imreadanimation_(filename, IMREAD_UNCHANGED, start, count, animation);
 }
 
+static bool imdecodeanimation_(InputArray buf, int flags, int start, int count, Animation& animation)
+{
+    bool success = false;
+    if (start < 0) {
+        start = 0;
+    }
```

Review comment:
bool imencodeanimation(const String& ext, const Animation& animation, std::vector<uchar>& buf, const std::vector<int>& params)
**File:** modules/imgcodecs/include/opencv2/imgcodecs.hpp
**Change Type:** modified
**Context:** PR #27013: Test for in-memory animation encoding and decoding
**Review Line:** 436

**Code Changes:**
```diff
+specify additional options for the encoding process. Refer to `cv::ImwriteFlags`
+for details on possible parameters.
+
+@return Returns true if the animation was successfully encoded; returns false otherwise.
+*/
+CV_EXPORTS_W bool imencodeanimation(const String& ext, const Animation& animation, CV_OUT std::vector<uchar>& buf, const std::vector<int>& params = std::vector<int>());
+
 /** @brief Returns the number of images inside the given file
 
 The function imcount returns the number of pages in a multi-page image (e.g. TIFF), the number of frames in an animation (e.g. AVIF), and 1 otherwise.
```

Review comment:
All analogs use std::vector: - imdecode: https://docs.opencv.org/4.x/d4/da8/group__imgcodecs.html#ga4e9883ae1f619bcbe875b7038520ea78 - indecodemulti: https://docs.opencv.org/4.x/d4/da8/group__imgcodecs.html#ga913e55d27f30e7b56f40eddc09fccb76 Most probably, they call std::vector::resize() to fit encoded size. It's not available throw OutputArray interface.
**File:** modules/imgcodecs/src/grfmt_gif.cpp
**Change Type:** modified
**Context:** PR #27138: Fix heap buffer overflow and use after free in imgcodecs

**Code Changes:**
```diff
@@ -392,6 +392,8 @@ bool GifDecoder::lzwDecode() {
             if (code < colorTableSize) {
                 imgCodeStream[idx++] = (uchar)code;
             } else {
+                CV_LOG_WARNING(NULL, "Too long LZW length in GIF.");
+                CV_Assert(idx + lzwExtraTable[code].length <= width * height);
                 for (int i = 0; i < lzwExtraTable[code].length - 1; i++) {
                     imgCodeStream[idx++] = lzwExtraTable[code].prefix[i];
                 }
```

Review comment:
I would say that it should be just assert like: ``` CV_Assert(idx + lzwExtraTable[code].length <= width * height); ``` The caller side has `try/catch` to handle it. But it's could be caught by debugger. Some warning about broken gif is useful too.
**File:** modules/imgcodecs/src/grfmt_png.cpp
**Change Type:** modified
**Context:** PR #27138: Fix heap buffer overflow and use after free in imgcodecs

**Code Changes:**
```diff
@@ -401,7 +401,7 @@ bool  PngDecoder::readData( Mat& img )
         Mat mat_cur = Mat::zeros(img.rows, img.cols, m_type);
         uint32_t id = 0;
         uint32_t j = 0;
-        uint32_t imagesize = m_width * m_height * mat_cur.channels();
+        uint32_t imagesize = m_width * m_height * (uint32_t)mat_cur.elemSize();
         m_is_IDAT_loaded = false;
 
         if (m_frame_no == 0)
@@ -451,15 +451,26 @@ bool  PngDecoder::readData( Mat& img )
```

Review comment:
i am not sure `mat_cur.convertTo(mat_cur, CV_8U, 1. / 255);` problematic but if extra Mat needed here please do same changes at line 523
**File:** modules/imgcodecs/src/grfmt_png.cpp
**Change Type:** modified
**Context:** PR #27138: Fix heap buffer overflow and use after free in imgcodecs

**Code Changes:**
```diff
@@ -401,7 +401,7 @@ bool  PngDecoder::readData( Mat& img )
         Mat mat_cur = Mat::zeros(img.rows, img.cols, m_type);
         uint32_t id = 0;
         uint32_t j = 0;
-        uint32_t imagesize = m_width * m_height * mat_cur.channels();
+        uint32_t imagesize = m_width * m_height * (uint32_t)mat_cur.elemSize();
         m_is_IDAT_loaded = false;
 
         if (m_frame_no == 0)
@@ -451,15 +451,26 @@ bool  PngDecoder::readData( Mat& img )
```

Review comment:
The problem is that mat_cur is modified while frameCur is defined using it and it can be used in the memcpy right after. mat_cur cannot be modified. I added the optimization you propose.
**File:** modules/imgcodecs/src/grfmt_png.cpp
**Change Type:** modified
**Context:** PR #27138: Fix heap buffer overflow and use after free in imgcodecs

**Code Changes:**
```diff
@@ -401,7 +401,7 @@ bool  PngDecoder::readData( Mat& img )
         Mat mat_cur = Mat::zeros(img.rows, img.cols, m_type);
         uint32_t id = 0;
         uint32_t j = 0;
-        uint32_t imagesize = m_width * m_height * mat_cur.channels();
+        uint32_t imagesize = m_width * m_height * (uint32_t)mat_cur.elemSize();
         m_is_IDAT_loaded = false;
 
         if (m_frame_no == 0)
@@ -451,15 +451,26 @@ bool  PngDecoder::readData( Mat& img )
```

Review comment:
i see. wonderful!!
**File:** modules/imgproc/src/imgwarp.cpp
**Change Type:** modified
**Context:** PR #27108: When WARP_INVERSE_MAP is used, accelerate the calculation with multi-threading

**Code Changes:**
```diff
@@ -3737,41 +3737,46 @@ void cv::warpPolar(InputArray _src, OutputArray _dst, Size dsize,
         else
             Kmag = maxRadius / ssize.width;
 
-        int x, y;
         Mat bufx, bufy, bufp, bufa;
 
         bufx = Mat(1, dsize.width, CV_32F);
         bufy = Mat(1, dsize.width, CV_32F);
         bufp = Mat(1, dsize.width, CV_32F);
```

Review comment:
I do not think that it's efficient parallel_for_. The thread function is too lightweight.
**File:** modules/imgcodecs/test/test_gif.cpp
**Change Type:** modified
**Context:** PR #26971: imgcodecs: gif: support animated gif without loop

**Code Changes:**
```diff
@@ -414,6 +414,110 @@ TEST(Imgcodecs_Gif, decode_disposal_method)
     }
 }
 
+// See https://github.com/opencv/opencv/issues/26970
+typedef testing::TestWithParam<int> Imgcodecs_Gif_loop_count;
+TEST_P(Imgcodecs_Gif_loop_count, imwriteanimation)
+{
+    const string gif_filename = cv::tempfile(".gif");
+
```

Review comment:
Netscape Application
**File:** modules/imgcodecs/include/opencv2/imgcodecs.hpp
**Change Type:** modified
**Context:** PR #26971: imgcodecs: gif: support animated gif without loop
**Review Line:** 272

**Code Changes:**
```diff
+     */
     CV_PROP_RW int loop_count;
     //! Background color of the animation in BGRA format.
     CV_PROP_RW Scalar bgcolor;
     //! Duration for each frame in milliseconds.
+    /*! @note (GIF) Due to file format limitation
+     *  - Durations must be multiples of 10 milliseconds. Any provided value will be rounded down to the nearest 10ms (e.g., 88ms → 80ms).
+     *  - 0ms(or smaller than expected in user application) duration may cause undefined behavior, e.g. it is handled with default duration.
+     *  - Over 65535 * 10 milliseconds duration is not supported.
+     */
     CV_PROP_RW std::vector<int> durations;
```

Review comment:
>>Both 65535ms(about 1min) and 655350ms(about 11min) are a very long durations as animation frames. >>So this restriction is not expected to affect user experience. >>To make compatibility with other codecs, should I limit with CV_CheckLE(frameDelay, 65535, "Unsupported duration") >>? i think the PR as is good. up to you using in documentation `- Durations must be multiples of 10 milliseconds. Any provided value will be rounded down to the nearest 10ms (e.g., 88ms → 80ms).`
**File:** modules/imgcodecs/src/grfmt_gif.cpp
**Change Type:** modified
**Context:** PR #26971: imgcodecs: gif: support animated gif without loop

**Code Changes:**
```diff
@@ -47,8 +47,8 @@ bool GifDecoder::readHeader() {
         return false;
     }
 
-    String signature(6, ' ');
-    m_strm.getBytes((uchar*)signature.data(), 6);
+    std::string signature(6, ' ');
+    m_strm.getBytes((uchar*)signature.c_str(), 6);
     CV_Assert(signature == R"(GIF87a)" || signature == R"(GIF89a)");
 
```

Review comment:
Please use C++: ``` std::string app_auth_code(len); m_strm.getBytes(const_cast<void*>(static_cast<const void*>(app_auth_code.c_str())), len); isFoundNetscape = (app_auth_code == "NETSCAPE2.0"); ```
**File:** modules/imgcodecs/include/opencv2/imgcodecs.hpp
**Change Type:** modified
**Context:** PR #26971: imgcodecs: gif: support animated gif without loop

**Code Changes:**
```diff
@@ -118,8 +118,8 @@ enum ImwriteFlags {
        IMWRITE_JPEGXL_EFFORT       = 641,//!< For JPEG XL, encoder effort/speed level without affecting decoding speed; it is between 1 (fastest) and 10 (slowest). Default is 7.
        IMWRITE_JPEGXL_DISTANCE     = 642,//!< For JPEG XL, distance level for lossy compression: target max butteraugli distance, lower = higher quality, 0 = lossless; range: 0 .. 25. Default is 1.
        IMWRITE_JPEGXL_DECODING_SPEED = 643,//!< For JPEG XL, decoding speed tier for the provided options; minimum is 0 (slowest to decode, best quality/density), and maximum is 4 (fastest to decode, at the cost of some quality/density). Default is 0.
-       IMWRITE_GIF_LOOP            = 1024,//!< For GIF, it can be a loop flag from 0 to 65535. Default is 0 - loop forever.
-       IMWRITE_GIF_SPEED           = 1025,//!< For GIF, it is between 1 (slowest) and 100 (fastest). Default is 96.
+       IMWRITE_GIF_LOOP            = 1024, //!< Not functional since 4.12.0. Replaced by cv::Animation::loop_count.
+       IMWRITE_GIF_SPEED           = 1025, //!< Not functional since 4.12.0. Replaced by cv::Animation::durations.
        IMWRITE_GIF_QUALITY         = 1026, //!< For GIF, it can be a quality from 1 to 8. Default is 2. See cv::ImwriteGifCompressionFlags.
        IMWRITE_GIF_DITHER          = 1027, //!< For GIF, it can be a quality from -1(most dither) to 3(no dither). Default is 0.
```

Review comment:
For more context: https://issues.chromium.org/issues/40459899 . WebP had the same problem where 1 loop coould not happen: https://groups.google.com/a/webmproject.org/g/webp-discuss/c/rJ2a0j1BNQI/m/XXqK918ZEQAJ
**File:** modules/imgcodecs/src/grfmt_gif.cpp
**Change Type:** modified
**Context:** PR #26971: imgcodecs: gif: support animated gif without loop

**Code Changes:**
```diff
@@ -47,8 +47,8 @@ bool GifDecoder::readHeader() {
         return false;
     }
 
-    String signature(6, ' ');
-    m_strm.getBytes((uchar*)signature.data(), 6);
+    std::string signature(6, ' ');
+    m_strm.getBytes((uchar*)signature.c_str(), 6);
     CV_Assert(signature == R"(GIF87a)" || signature == R"(GIF89a)");
 
```

Review comment:
Shouldn't there be an interpretation if `!isFoundNetscape` too ?
**File:** modules/dnn/src/layers/nary_eltwise_layers.cpp
**Change Type:** modified
**Context:** PR #24768: Vulkan backend for NaryEltwiseLayer in DNN module

**Code Changes:**
```diff
@@ -7,6 +7,7 @@
 #include "../op_cuda.hpp"
 #include "../op_cann.hpp"
 #include "../ie_ngraph.hpp"
+#include "../op_vkcom.hpp"
 
 #include <opencv2/dnn/shape_utils.hpp>
 
@@ -34,8 +35,141 @@ static int _mod(int x, int y) {
 }
```

Review comment:
Please use `makePtr` here and other places instead of new.
**File:** modules/dnn/src/vkcom/shader/nary_eltwise_binary_forward.comp
**Change Type:** added
**Context:** PR #24768: Vulkan backend for NaryEltwiseLayer in DNN module

**Code Changes:**
```diff
@@ -0,0 +1,116 @@
+#version 450
+// #extension GL_EXT_debug_printf : enable
+#define ALL_THREAD 1024
+// #define ALL_THREAD 128 // Experimental batched operation
+#define STEP_SIZE 65536
+
+layout(binding = 0) readonly buffer Input1{
+    float matA[];
+};
```

Review comment:
Please remove dead code.
**File:** modules/dnn/src/vkcom/shader/nary_eltwise_binary_forward.comp
**Change Type:** added
**Context:** PR #24768: Vulkan backend for NaryEltwiseLayer in DNN module

**Code Changes:**
```diff
@@ -0,0 +1,116 @@
+#version 450
+// #extension GL_EXT_debug_printf : enable
+#define ALL_THREAD 1024
+// #define ALL_THREAD 128 // Experimental batched operation
+#define STEP_SIZE 65536
+
+layout(binding = 0) readonly buffer Input1{
+    float matA[];
+};
```

Review comment:
Please remove dead code, or guard it with macro, if you want to use it later.
**File:** modules/dnn/src/layers/nary_eltwise_layers.cpp
**Change Type:** modified
**Context:** PR #24768: Vulkan backend for NaryEltwiseLayer in DNN module

**Code Changes:**
```diff
@@ -7,6 +7,7 @@
 #include "../op_cuda.hpp"
 #include "../op_cann.hpp"
 #include "../ie_ngraph.hpp"
+#include "../op_vkcom.hpp"
 
 #include <opencv2/dnn/shape_utils.hpp>
 
@@ -34,8 +35,141 @@ static int _mod(int x, int y) {
 }
```

Review comment:
> //TODO(VK) remember to add implemented operations Is this comment out-of-date?
**File:** modules/dnn/src/layers/nary_eltwise_layers.cpp
**Change Type:** modified
**Context:** PR #24768: Vulkan backend for NaryEltwiseLayer in DNN module

**Code Changes:**
```diff
@@ -7,6 +7,7 @@
 #include "../op_cuda.hpp"
 #include "../op_cann.hpp"
 #include "../ie_ngraph.hpp"
+#include "../op_vkcom.hpp"
 
 #include <opencv2/dnn/shape_utils.hpp>
 
@@ -34,8 +35,141 @@ static int _mod(int x, int y) {
 }
```

Review comment:
> // TODO(vk) what unclear meaning comment
**File:** modules/dnn/src/layers/nary_eltwise_layers.cpp
**Change Type:** modified
**Context:** PR #24768: Vulkan backend for NaryEltwiseLayer in DNN module

**Code Changes:**
```diff
@@ -7,6 +7,7 @@
 #include "../op_cuda.hpp"
 #include "../op_cann.hpp"
 #include "../ie_ngraph.hpp"
+#include "../op_vkcom.hpp"
 
 #include <opencv2/dnn/shape_utils.hpp>
 
@@ -34,8 +35,141 @@ static int _mod(int x, int y) {
 }
```

Review comment:
Since they share the same code with CPU implementation, could you extract and make it a function to call to reduce duplicate code?
**File:** modules/dnn/src/layers/nary_eltwise_layers.cpp
**Change Type:** modified
**Context:** PR #24768: Vulkan backend for NaryEltwiseLayer in DNN module

**Code Changes:**
```diff
@@ -7,6 +7,7 @@
 #include "../op_cuda.hpp"
 #include "../op_cann.hpp"
 #include "../ie_ngraph.hpp"
+#include "../op_vkcom.hpp"
 
 #include <opencv2/dnn/shape_utils.hpp>
 
@@ -34,8 +35,141 @@ static int _mod(int x, int y) {
 }
```

Review comment:
I've checked `convolution_layer.cpp`, `gemm_layer.cpp`, and other layers and found out that those existing implementations all use `new vkcom::OpNary`. Should we change all of them to `makePtr`?
**File:** modules/dnn/src/layers/nary_eltwise_layers.cpp
**Change Type:** modified
**Context:** PR #24768: Vulkan backend for NaryEltwiseLayer in DNN module

**Code Changes:**
```diff
@@ -7,6 +7,7 @@
 #include "../op_cuda.hpp"
 #include "../op_cann.hpp"
 #include "../ie_ngraph.hpp"
+#include "../op_vkcom.hpp"
 
 #include <opencv2/dnn/shape_utils.hpp>
 
@@ -34,8 +35,141 @@ static int _mod(int x, int y) {
 }
```

Review comment:
Can this be a member function in helper class?
**File:** modules/dnn/src/layers/nary_eltwise_layers.cpp
**Change Type:** modified
**Context:** PR #24768: Vulkan backend for NaryEltwiseLayer in DNN module

**Code Changes:**
```diff
@@ -7,6 +7,7 @@
 #include "../op_cuda.hpp"
 #include "../op_cann.hpp"
 #include "../ie_ngraph.hpp"
+#include "../op_vkcom.hpp"
 
 #include <opencv2/dnn/shape_utils.hpp>
 
@@ -34,8 +35,141 @@ static int _mod(int x, int y) {
 }
```

Review comment:
Are these variables `InputWrappers`, `inputShapes`, `outputWrapper`, `outputShape` and `vkBlobs` used anywhere?
**File:** modules/dnn/src/layers/nary_eltwise_layers.cpp
**Change Type:** modified
**Context:** PR #24768: Vulkan backend for NaryEltwiseLayer in DNN module

**Code Changes:**
```diff
@@ -7,6 +7,7 @@
 #include "../op_cuda.hpp"
 #include "../op_cann.hpp"
 #include "../ie_ngraph.hpp"
+#include "../op_vkcom.hpp"
 
 #include <opencv2/dnn/shape_utils.hpp>
 
@@ -34,8 +35,141 @@ static int _mod(int x, int y) {
 }
```

Review comment:
Seems useless. These are remaining codes from a previous version in which `NaryEltwiseHelper` is not introduced.
**File:** modules/dnn/src/layers/nary_eltwise_layers.cpp
**Change Type:** modified
**Context:** PR #24768: Vulkan backend for NaryEltwiseLayer in DNN module

**Code Changes:**
```diff
@@ -7,6 +7,7 @@
 #include "../op_cuda.hpp"
 #include "../op_cann.hpp"
 #include "../ie_ngraph.hpp"
+#include "../op_vkcom.hpp"
 
 #include <opencv2/dnn/shape_utils.hpp>
 
@@ -34,8 +35,141 @@ static int _mod(int x, int y) {
 }
```

Review comment:
Friendly reminder on this item.