nareshmlx/opencv-pr huggingface dataset:
**File:** modules/imgcodecs/include/opencv2/imgcodecs.hpp
**Change Type:** modified
**Context:** PR #26849: APNG encoding optimization
**Review Line:** 99

**Code Changes:**
```diff
@@ -96,6 +96,7 @@ enum ImwriteFlags {
        IMWRITE_PNG_COMPRESSION     = 16, //!< For PNG, it can be the compression level from 0 to 9. A higher value means a smaller size and longer compression time. If specified, strategy is changed to IMWRITE_PNG_STRATEGY_DEFAULT (Z_DEFAULT_STRATEGY). Default value is 1 (best speed setting).
        IMWRITE_PNG_STRATEGY        = 17, //!< One of cv::ImwritePNGFlags, default is IMWRITE_PNG_STRATEGY_RLE.
        IMWRITE_PNG_BILEVEL         = 18, //!< Binary level PNG, 0 or 1, default is 0.
+       IMWRITE_PNG_FILTER          = 19, //!< One of cv::ImwritePNGFilterFlags, default is IMWRITE_PNG_FILTER_SUB.
        IMWRITE_PXM_BINARY          = 32, //!< For PPM, PGM, or PBM, it can be a binary format flag, 0 or 1. Default value is 1.
        IMWRITE_EXR_TYPE            = (3 << 4) + 0 /* 48 */, //!< override EXR storage type (FLOAT (FP32) is default)
        IMWRITE_EXR_COMPRESSION     = (3 << 4) + 1 /* 49 */, //!< override EXR compression type (ZIP_COMPRESSION = 3 is default)
@@ -211,6 +212,17 @@ enum ImwritePNGFlags {
        IMWRITE_PNG_STRATEGY_FIXED        = 4  //!< Using this value prevents the use of dynamic Huffman codes, allowing for a simpler decoder for special applications.
```

Review comment:
Let's compare fast/best compression to ensure best is smaller the fast, for example.
**File:** modules/imgcodecs/include/opencv2/imgcodecs.hpp
**Change Type:** modified
**Context:** PR #26849: APNG encoding optimization

**Code Changes:**
```diff
@@ -96,6 +96,7 @@ enum ImwriteFlags {
        IMWRITE_PNG_COMPRESSION     = 16, //!< For PNG, it can be the compression level from 0 to 9. A higher value means a smaller size and longer compression time. If specified, strategy is changed to IMWRITE_PNG_STRATEGY_DEFAULT (Z_DEFAULT_STRATEGY). Default value is 1 (best speed setting).
        IMWRITE_PNG_STRATEGY        = 17, //!< One of cv::ImwritePNGFlags, default is IMWRITE_PNG_STRATEGY_RLE.
        IMWRITE_PNG_BILEVEL         = 18, //!< Binary level PNG, 0 or 1, default is 0.
+       IMWRITE_PNG_FILTER          = 19, //!< One of cv::ImwritePNGFilterFlags, default is IMWRITE_PNG_FILTER_SUB.
        IMWRITE_PXM_BINARY          = 32, //!< For PPM, PGM, or PBM, it can be a binary format flag, 0 or 1. Default value is 1.
        IMWRITE_EXR_TYPE            = (3 << 4) + 0 /* 48 */, //!< override EXR storage type (FLOAT (FP32) is default)
        IMWRITE_EXR_COMPRESSION     = (3 << 4) + 1 /* 49 */, //!< override EXR compression type (ZIP_COMPRESSION = 3 is default)
@@ -211,6 +212,17 @@ enum ImwritePNGFlags {
        IMWRITE_PNG_STRATEGY_FIXED        = 4  //!< Using this value prevents the use of dynamic Huffman codes, allowing for a simpler decoder for special applications.
```

Review comment:
they produces different sized outputs
**File:** modules/imgcodecs/include/opencv2/imgcodecs.hpp
**Change Type:** modified
**Context:** PR #26849: APNG encoding optimization
**Review Line:** 99

**Code Changes:**
```diff
@@ -96,6 +96,7 @@ enum ImwriteFlags {
        IMWRITE_PNG_COMPRESSION     = 16, //!< For PNG, it can be the compression level from 0 to 9. A higher value means a smaller size and longer compression time. If specified, strategy is changed to IMWRITE_PNG_STRATEGY_DEFAULT (Z_DEFAULT_STRATEGY). Default value is 1 (best speed setting).
        IMWRITE_PNG_STRATEGY        = 17, //!< One of cv::ImwritePNGFlags, default is IMWRITE_PNG_STRATEGY_RLE.
        IMWRITE_PNG_BILEVEL         = 18, //!< Binary level PNG, 0 or 1, default is 0.
+       IMWRITE_PNG_FILTER          = 19, //!< One of cv::ImwritePNGFilterFlags, default is IMWRITE_PNG_FILTER_SUB.
        IMWRITE_PXM_BINARY          = 32, //!< For PPM, PGM, or PBM, it can be a binary format flag, 0 or 1. Default value is 1.
        IMWRITE_EXR_TYPE            = (3 << 4) + 0 /* 48 */, //!< override EXR storage type (FLOAT (FP32) is default)
        IMWRITE_EXR_COMPRESSION     = (3 << 4) + 1 /* 49 */, //!< override EXR compression type (ZIP_COMPRESSION = 3 is default)
@@ -211,6 +212,17 @@ enum ImwritePNGFlags {
        IMWRITE_PNG_STRATEGY_FIXED        = 4  //!< Using this value prevents the use of dynamic Huffman codes, allowing for a simpler decoder for special applications.
```

Review comment:
> Are there any changes against 4.11 (APNG support) and 4.10 (old style PNG)? default values are same as 4.10
**File:** modules/imgcodecs/perf/perf_png.cpp
**Change Type:** modified
**Context:** PR #26849: APNG encoding optimization

**Code Changes:**
```diff
@@ -11,7 +11,10 @@ namespace opencv_test
 
 using namespace perf;
 
-typedef perf::TestBaseWithParam<std::string> PNG;
+CV_ENUM(PNGStrategy, IMWRITE_PNG_STRATEGY_DEFAULT, IMWRITE_PNG_STRATEGY_FILTERED, IMWRITE_PNG_STRATEGY_HUFFMAN_ONLY, IMWRITE_PNG_STRATEGY_RLE, IMWRITE_PNG_STRATEGY_FIXED);
+CV_ENUM(PNGFilters, IMWRITE_PNG_FILTER_NONE, IMWRITE_PNG_FILTER_SUB, IMWRITE_PNG_FILTER_UP, IMWRITE_PNG_FILTER_AVG, IMWRITE_PNG_FILTER_PAETH, IMWRITE_PNG_FAST_FILTERS, IMWRITE_PNG_ALL_FILTERS);
+
+typedef perf::TestBaseWithParam<testing::tuple<PNGStrategy, PNGFilters, int>> PNG;
 
```

Review comment:
when a common user run it takes so long time ( --perf_force_samples default value is 100 )
**File:** modules/imgcodecs/include/opencv2/imgcodecs.hpp
**Change Type:** modified
**Context:** PR #26849: APNG encoding optimization

**Code Changes:**
```diff
@@ -96,6 +96,7 @@ enum ImwriteFlags {
        IMWRITE_PNG_COMPRESSION     = 16, //!< For PNG, it can be the compression level from 0 to 9. A higher value means a smaller size and longer compression time. If specified, strategy is changed to IMWRITE_PNG_STRATEGY_DEFAULT (Z_DEFAULT_STRATEGY). Default value is 1 (best speed setting).
        IMWRITE_PNG_STRATEGY        = 17, //!< One of cv::ImwritePNGFlags, default is IMWRITE_PNG_STRATEGY_RLE.
        IMWRITE_PNG_BILEVEL         = 18, //!< Binary level PNG, 0 or 1, default is 0.
+       IMWRITE_PNG_FILTER          = 19, //!< One of cv::ImwritePNGFilterFlags, default is IMWRITE_PNG_FILTER_SUB.
        IMWRITE_PXM_BINARY          = 32, //!< For PPM, PGM, or PBM, it can be a binary format flag, 0 or 1. Default value is 1.
        IMWRITE_EXR_TYPE            = (3 << 4) + 0 /* 48 */, //!< override EXR storage type (FLOAT (FP32) is default)
        IMWRITE_EXR_COMPRESSION     = (3 << 4) + 1 /* 49 */, //!< override EXR compression type (ZIP_COMPRESSION = 3 is default)
@@ -211,6 +212,17 @@ enum ImwritePNGFlags {
        IMWRITE_PNG_STRATEGY_FIXED        = 4  //!< Using this value prevents the use of dynamic Huffman codes, allowing for a simpler decoder for special applications.
```

Review comment:
IMWRITE_PNG_NO_FILTERS removed. with libpng IMWRITE_PNG_NO_FILTERS and IMWRITE_PNG_ALL_FILTERS gives same results. with libspng IMWRITE_PNG_NO_FILTERS and IMWRITE_PNG_FILTER_NONE gives same results.
**File:** modules/imgcodecs/src/grfmt_spng.cpp
**Change Type:** modified
**Context:** PR #26849: APNG encoding optimization

**Code Changes:**
```diff
@@ -535,9 +535,12 @@ bool SPngEncoder::write(const Mat &img, const std::vector<int> &params)
         struct spng_ihdr ihdr = {};
         ihdr.height = height;
         ihdr.width = width;
-        int compression_level = -1;                          // Invalid value to allow setting 0-9 as valid
+        int compression_level = Z_BEST_SPEED;
         int compression_strategy = IMWRITE_PNG_STRATEGY_RLE; // Default strategy
+        int filter = IMWRITE_PNG_FILTER_SUB; // Default filter
         bool isBilevel = false;
+        bool set_compression_level = false;
```

Review comment:
those two should not be outside `if (ctx)` below right? I guess they should be kept right after `ihdr.width = width;` no ?
**File:** modules/imgcodecs/src/grfmt_png.cpp
**Change Type:** modified
**Context:** PR #26849: APNG encoding optimization

**Code Changes:**
```diff
@@ -814,6 +814,10 @@ PngEncoder::PngEncoder()
     next_seq_num = 0;
     trnssize = 0;
     palsize = 0;
+    m_compression_level = Z_BEST_SPEED;
+    m_compression_strategy = IMWRITE_PNG_STRATEGY_RLE; // Default strategy
+    m_filter = IMWRITE_PNG_FILTER_SUB; // Default filter
+    m_isBilevel = false;
     memset(palette, 0, sizeof(palette));
     memset(trns, 0, sizeof(trns));
```

Review comment:
shouldn't that be in `if( setjmp( png_jmpbuf ( png_ptr ) ) == 0 )` below ?
**File:** 3rdparty/hal_rvv/hal_rvv_1p0/filter.hpp
**Change Type:** added
**Context:** PR #27045: 5.x merge 4.x - No related changes in extra and contrib #26441 from sturkmen72:upd_tutorials #26849 from sturkmen72:apng-writeanimation #26...
**Review Line:** 7

**Code Changes:**
```diff
+// 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.
+#ifndef OPENCV_HAL_RVV_FILTER_HPP_INCLUDED
+#define OPENCV_HAL_RVV_FILTER_HPP_INCLUDED
+
+#include "../../imgproc/include/opencv2/imgproc/hal/interface.h"
+#include <riscv_vector.h>
+
+struct cvhalFilter2D;
+
+namespace cv { namespace cv_hal_rvv {
```

Review comment:
I noticed this in PR #27026, but that PR has already been closed. I'm not sure whether I should create a separate issue for such a small problem or mention it somewhere and address it in a larger update. So, I’m bringing it up here. I think it should be added in `hal_rvv.hpp` like [this](https://github.com/opencv/opencv/blob/656038346b77eea03b54ae4d15bbc8caf2b52235/3rdparty/hal_rvv/hal_rvv.hpp#L8).
**File:** 3rdparty/hal_rvv/hal_rvv_1p0/filter.hpp
**Change Type:** added
**Context:** PR #27045: 5.x merge 4.x - No related changes in extra and contrib #26441 from sturkmen72:upd_tutorials #26849 from sturkmen72:apng-writeanimation #26...
**Review Line:** 7

**Code Changes:**
```diff
+// 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.
+#ifndef OPENCV_HAL_RVV_FILTER_HPP_INCLUDED
+#define OPENCV_HAL_RVV_FILTER_HPP_INCLUDED
+
+#include "../../imgproc/include/opencv2/imgproc/hal/interface.h"
+#include <riscv_vector.h>
+
+struct cvhalFilter2D;
+
+namespace cv { namespace cv_hal_rvv {
```

Review comment:
Feel free to resolve it in 4.x.
**File:** 3rdparty/hal_rvv/hal_rvv_1p0/filter.hpp
**Change Type:** added
**Context:** PR #27045: 5.x merge 4.x - No related changes in extra and contrib #26441 from sturkmen72:upd_tutorials #26849 from sturkmen72:apng-writeanimation #26...
**Review Line:** 7

**Code Changes:**
```diff
+// 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.
+#ifndef OPENCV_HAL_RVV_FILTER_HPP_INCLUDED
+#define OPENCV_HAL_RVV_FILTER_HPP_INCLUDED
+
+#include "../../imgproc/include/opencv2/imgproc/hal/interface.h"
+#include <riscv_vector.h>
+
+struct cvhalFilter2D;
+
+namespace cv { namespace cv_hal_rvv {
```

Review comment:
I will resolve it later.
**File:** modules/calib3d/src/stereosgbm.cpp
**Change Type:** modified
**Context:** PR #26996: fix Logical defect in FilterSpecklesImpl

**Code Changes:**
```diff
@@ -2345,21 +2345,33 @@ void filterSpecklesImpl(cv::Mat& img, int newVal, int maxSpeckleSize, int maxDif
     using namespace cv;
 
     int width = img.cols, height = img.rows, npixels = width*height;
-    size_t bufSize = npixels*(int)(sizeof(Point2s) + sizeof(int) + sizeof(uchar));
+    // space allocation for:
+    // labels : npixels * sizeof(int)
+    // wbuf   : npixels * sizeof(Point2s)
+    // rtype  : (npixels + 1) * sizeof(uchar)
+    size_t bufSize = npixels * sizeof(int)            // for labels
```

Review comment:
I propose to get rid of braces in the first case, and add a comment to each sum part to mark corresponding buffer name.
**File:** 3rdparty/hal_rvv/hal_rvv_1p0/pyramids.hpp
**Change Type:** added
**Context:** PR #26958: Add RISC-V HAL implementation for cv::pyrDown and cv::pyrUp

**Code Changes:**
```diff
@@ -0,0 +1,719 @@
+// 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.
+#ifndef OPENCV_HAL_RVV_PYRAMIDS_HPP_INCLUDED
+#define OPENCV_HAL_RVV_PYRAMIDS_HPP_INCLUDED
+
+#include <riscv_vector.h>
+
+namespace cv { namespace cv_hal_rvv { namespace pyramids {
```

Review comment:
Let's avoid `CV_Assert` too. Just return NOT_IMPLEMENTED in this case. Here and in other places.
**File:** 3rdparty/hal_rvv/hal_rvv_1p0/pyramids.hpp
**Change Type:** added
**Context:** PR #26958: Add RISC-V HAL implementation for cv::pyrDown and cv::pyrUp
**Review Line:** 515

**Code Changes:**
```diff
+    }
+    int width0 = std::min((src_width-PD_SZ/2-1)/2 + 1, dst_width);
+
+    for (int x = 0; x <= PD_SZ+1; x++)
+    {
+        int sx0 = borderInterpolate(x - PD_SZ/2, src_width, borderType)*cn;
+        int sx1 = borderInterpolate(x + width0*2 - PD_SZ/2, src_width, borderType)*cn;
+        for (int k = 0; k < cn; k++)
+        {
+            tabL[x*cn + k] = sx0 + k;
+            tabR[x*cn + k] = sx1 + k;
```

Review comment:
Not sure what to do with `borderInterpolate`. Perhaps it should be implemented here as well (maybe in limited version only for acceptable border modes).
**File:** 3rdparty/hal_rvv/hal_rvv_1p0/pyramids.hpp
**Change Type:** added
**Context:** PR #26958: Add RISC-V HAL implementation for cv::pyrDown and cv::pyrUp
**Review Line:** 515

**Code Changes:**
```diff
+    }
+    int width0 = std::min((src_width-PD_SZ/2-1)/2 + 1, dst_width);
+
+    for (int x = 0; x <= PD_SZ+1; x++)
+    {
+        int sx0 = borderInterpolate(x - PD_SZ/2, src_width, borderType)*cn;
+        int sx1 = borderInterpolate(x + width0*2 - PD_SZ/2, src_width, borderType)*cn;
+        for (int k = 0; k < cn; k++)
+        {
+            tabL[x*cn + k] = sx0 + k;
+            tabR[x*cn + k] = sx1 + k;
```

Review comment:
Carotene(ARM HAL) copied this function from ::cv into its self namespace, I will follow this.
**File:** modules/core/src/norm.simd.hpp
**Change Type:** added
**Context:** PR #26885: core: vectorize cv::normalize / cv::norm

**Code Changes:**
```diff
@@ -0,0 +1,676 @@
+// 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"
+
+#if CV_RVV
+#include "norm.rvv1p0.hpp"
+#endif
```

Review comment:
This is introduced to workaround failed tests on ci of rvv node. The RVV CI node is getting some accuracy issues on the normL2 with double only. But it works fine on real hardware. Could it be some qemu bugs?
**File:** modules/core/src/norm.simd.hpp
**Change Type:** added
**Context:** PR #26885: core: vectorize cv::normalize / cv::norm

**Code Changes:**
```diff
@@ -0,0 +1,676 @@
+// 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"
+
+#if CV_RVV
+#include "norm.rvv1p0.hpp"
+#endif
```

Review comment:
This is introduce to workaround failed tests on ci of rvv node. The RVV CI node is getting some accuracy issues on the normL1 with double only. But it works fine on real hardware. Could it be some qemu bugs?
**File:** modules/core/src/norm.simd.hpp
**Change Type:** added
**Context:** PR #26885: core: vectorize cv::normalize / cv::norm

**Code Changes:**
```diff
@@ -0,0 +1,676 @@
+// 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"
+
+#if CV_RVV
+#include "norm.rvv1p0.hpp"
+#endif
```

Review comment:
This is introduced to workaround failed tests on ci of rvv node. The RVV CI node is getting weird some accuracy issues on the normL2 with double. But it works fine on real hardware. Could it be some qemu bugs?
**File:** modules/core/src/norm.simd.hpp
**Change Type:** added
**Context:** PR #26885: core: vectorize cv::normalize / cv::norm

**Code Changes:**
```diff
@@ -0,0 +1,676 @@
+// 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"
+
+#if CV_RVV
+#include "norm.rvv1p0.hpp"
+#endif
```

Review comment:
This is introduced to workaround failed tests on ci of rvv node. The RVV CI node is getting weird some accuracy issues on the normL1 with double. But it works fine on real hardware. Could it be some qemu bugs?
**File:** modules/core/src/norm.dispatch.cpp
**Change Type:** renamed
**Context:** PR #26885: core: vectorize cv::normalize / cv::norm

**Code Changes:**
```diff
@@ -7,6 +7,9 @@
 #include "opencl_kernels_core.hpp"
 #include "stat.hpp"
 
+#include "norm.simd.hpp"
+#include "norm.simd_declarations.hpp"
+
 /****************************************************************************************\
 *                                         norm                                           *
 \****************************************************************************************/
```

Review comment:
All ifs may be squeezed to single call. `if( normType == NORM_L2 )` is needed for sqrt only.
**File:** modules/core/src/norm.dispatch.cpp
**Change Type:** renamed
**Context:** PR #26885: core: vectorize cv::normalize / cv::norm

**Code Changes:**
```diff
@@ -7,6 +7,9 @@
 #include "opencl_kernels_core.hpp"
 #include "stat.hpp"
 
+#include "norm.simd.hpp"
+#include "norm.simd_declarations.hpp"
+
 /****************************************************************************************\
 *                                         norm                                           *
 \****************************************************************************************/
```

Review comment:
For norm inf, `result` needs to be `float` while others are `double`. Fixed in the latest commit.
**File:** modules/core/test/test_hal_core.cpp
**Change Type:** modified
**Context:** PR #26887: invSqrt SIMD_SCALABLE implementation & HAL tests refactoring - Enable CV_SIMD_SCALABLE for invSqrt. * Banana Pi BF3 (SpacemiT K1) RISC-V * ...

**Code Changes:**
```diff
@@ -42,168 +42,163 @@
 
 namespace opencv_test { namespace {
 
-enum
+enum HALFunc
 {
     HAL_EXP = 0,
     HAL_LOG = 1,
-    HAL_SQRT = 2
```

Review comment:
I propose to refactor the test to parameterized test. The loop is not needed and GTest names them in logs and highlights failures.
**File:** modules/core/test/test_hal_core.cpp
**Change Type:** modified
**Context:** PR #26887: invSqrt SIMD_SCALABLE implementation & HAL tests refactoring - Enable CV_SIMD_SCALABLE for invSqrt. * Banana Pi BF3 (SpacemiT K1) RISC-V * ...

**Code Changes:**
```diff
@@ -42,168 +42,163 @@
 
 namespace opencv_test { namespace {
 
-enum
+enum HALFunc
 {
     HAL_EXP = 0,
     HAL_LOG = 1,
-    HAL_SQRT = 2
```

Review comment:
This test is weak because it tests explicit HAL call and the same HAL call at https://github.com/opencv/opencv/blob/8e65075c1e6810c3ffbf38093f4e5fc167d76ea7/modules/core/src/matrix_decomp.cpp#L187
**File:** modules/core/test/test_hal_core.cpp
**Change Type:** modified
**Context:** PR #26887: invSqrt SIMD_SCALABLE implementation & HAL tests refactoring - Enable CV_SIMD_SCALABLE for invSqrt. * Banana Pi BF3 (SpacemiT K1) RISC-V * ...

**Code Changes:**
```diff
@@ -42,168 +42,163 @@
 
 namespace opencv_test { namespace {
 
-enum
+enum HALFunc
 {
     HAL_EXP = 0,
     HAL_LOG = 1,
-    HAL_SQRT = 2
```

Review comment:
typo? `std::get<2>(GetParam());`
**File:** modules/core/test/test_hal_core.cpp
**Change Type:** modified
**Context:** PR #26887: invSqrt SIMD_SCALABLE implementation & HAL tests refactoring - Enable CV_SIMD_SCALABLE for invSqrt. * Banana Pi BF3 (SpacemiT K1) RISC-V * ...

**Code Changes:**
```diff
@@ -42,168 +42,163 @@
 
 namespace opencv_test { namespace {
 
-enum
+enum HALFunc
 {
     HAL_EXP = 0,
     HAL_LOG = 1,
-    HAL_SQRT = 2
```

Review comment:
`throw SkipTestException("message");` It's equivalent to your code, but marks the test as skipped in report and logs.
**File:** modules/core/test/test_hal_core.cpp
**Change Type:** modified
**Context:** PR #26887: invSqrt SIMD_SCALABLE implementation & HAL tests refactoring - Enable CV_SIMD_SCALABLE for invSqrt. * Banana Pi BF3 (SpacemiT K1) RISC-V * ...

**Code Changes:**
```diff
@@ -42,168 +42,163 @@
 
 namespace opencv_test { namespace {
 
-enum
+enum HALFunc
 {
     HAL_EXP = 0,
     HAL_LOG = 1,
-    HAL_SQRT = 2
```

Review comment:
I propose to invert the ground truth calculation: generate A and x with randu, calculate b with multiplication, use A and b for test and x as ground truth.
**File:** modules/core/test/test_hal_core.cpp
**Change Type:** modified
**Context:** PR #26887: invSqrt SIMD_SCALABLE implementation & HAL tests refactoring - Enable CV_SIMD_SCALABLE for invSqrt. * Banana Pi BF3 (SpacemiT K1) RISC-V * ...

**Code Changes:**
```diff
@@ -42,168 +42,163 @@
 
 namespace opencv_test { namespace {
 
-enum
+enum HALFunc
 {
     HAL_EXP = 0,
     HAL_LOG = 1,
-    HAL_SQRT = 2
```

Review comment:
Please remove commented code.
**File:** modules/core/test/test_hal_core.cpp
**Change Type:** modified
**Context:** PR #26887: invSqrt SIMD_SCALABLE implementation & HAL tests refactoring - Enable CV_SIMD_SCALABLE for invSqrt. * Banana Pi BF3 (SpacemiT K1) RISC-V * ...

**Code Changes:**
```diff
@@ -42,168 +42,163 @@
 
 namespace opencv_test { namespace {
 
-enum
+enum HALFunc
 {
     HAL_EXP = 0,
     HAL_LOG = 1,
-    HAL_SQRT = 2
```

Review comment:
I've inverted the test but keep comparison between `A * x` and `A * x0` because test `x` vs `x0` gives bigger error on `size=15`: ``` [ RUN ] Core_HAL/mat_decomp.accuracy/7, where GetParam() = (5, Cholesky, 15) /home/d.kurtaev/opencv/modules/core/test/test_hal_core.cpp:189: Failure Expected: (cvtest::norm(x, x0, NORM_INF | NORM_RELATIVE)) <= (eps), actual: 0.03707 vs 1e-05 ```
**File:** modules/core/test/test_hal_core.cpp
**Change Type:** modified
**Context:** PR #26887: invSqrt SIMD_SCALABLE implementation & HAL tests refactoring - Enable CV_SIMD_SCALABLE for invSqrt. * Banana Pi BF3 (SpacemiT K1) RISC-V * ...

**Code Changes:**
```diff
@@ -42,168 +42,163 @@
 
 namespace opencv_test { namespace {
 
-enum
+enum HALFunc
 {
     HAL_EXP = 0,
     HAL_LOG = 1,
-    HAL_SQRT = 2
```

Review comment:
`a0 * x0` is `b` otherwise `b` is not used.
**File:** modules/imgcodecs/src/grfmt_png.cpp
**Change Type:** modified
**Context:** PR #26915: imgcodecs: fix PNG read on BE platforms (s390x) - Resolves #26913 Related(?): #25715 #26832

**Code Changes:**
```diff
@@ -121,16 +121,16 @@
 namespace cv
 {
 
-const uint32_t id_IHDR = 0x52444849; // PNG header
-const uint32_t id_acTL = 0x4C546361; // Animation control chunk
-const uint32_t id_fcTL = 0x4C546366; // Frame control chunk
-const uint32_t id_IDAT = 0x54414449; // first frame and/or default image
-const uint32_t id_fdAT = 0x54416466; // Frame data chunk
-const uint32_t id_PLTE = 0x45544C50; // The PLTE chunk contains a color palette for indexed-color images
```

Review comment:
since we just made `id` correct in both cases, why change the return here? wouldn't just `return id;` now be ok for both?
**File:** modules/imgcodecs/src/grfmt_png.cpp
**Change Type:** modified
**Context:** PR #26915: imgcodecs: fix PNG read on BE platforms (s390x) - Resolves #26913 Related(?): #25715 #26832

**Code Changes:**
```diff
@@ -121,16 +121,16 @@
 namespace cv
 {
 
-const uint32_t id_IHDR = 0x52444849; // PNG header
-const uint32_t id_acTL = 0x4C546361; // Animation control chunk
-const uint32_t id_fcTL = 0x4C546366; // Frame control chunk
-const uint32_t id_IDAT = 0x54414449; // first frame and/or default image
-const uint32_t id_fdAT = 0x54416466; // Frame data chunk
-const uint32_t id_PLTE = 0x45544C50; // The PLTE chunk contains a color palette for indexed-color images
```

Review comment:
Yes, it needs further investigation - tests on other platforms fail with other PNG files.