nareshmlx/opencv-pr huggingface dataset:
**File:** modules/core/src/copy.cpp
**Change Type:** modified
**Context:** PR #15596: Improve copymask and implement SIMD extensions - ### This pullrequest vectorizes more copyMask variants Improve masked copy performance by ...
**Review Line:** 204

**Code Changes:**
```diff
+                v_uint8 dst2 = vx_load(dst + x + v_uint8::nlanes * 2);
+
+                // Use a permute to "expand" a value of 0 or -1.
+                v_uint8 m24v0 = v_permute(p0, m8v);
+                v_uint8 m24v1 = v_permute(p1, m8v);
+                v_uint8 m24v2 = v_permute(p2, m8v);
+
+                dst0 = v_select(m24v0, dst0, src0);
+                dst1 = v_select(m24v1, dst1, src1);
+                dst2 = v_select(m24v2, dst2, src2);
+                vx_store(dst + x, dst0);
```

Review comment:
> v_memmove_triplet Variant with memory pointers make sense too. For example, skip data loading from source if `v_check_any(mask) == false` or `v_check_all(mask) == true` (blending is not needed). > ntriplets Number of interleaved channels? > composite types (e.g 8u3) don't map onto the HAL Right, there is no dedicated type for that. Interleaved data for 3 channels is stored in 3 vector registers. In case of 128-bit int32: - `{ R1 G1 B1 R2} {G2 B2 R3 G3} {B3 R4 G4 B4}` - see also `v_load_deinterleave()`
**File:** modules/dnn/src/layers/eltwise_layer.cpp
**Change Type:** modified
**Context:** PR #16164: [WIP] cuda4dnn(conv): fuse eltwise with convolutions - ### This pullrequest changes - fuses eltwise with convolution for three topologies <...
**Review Line:** 67

**Code Changes:**
```diff
-        MAX = 2,
-        DIV = 3
-    } op;
-    std::vector<float> coeffs;
-
     enum OutputChannelsMode
     {
         ELTWISE_CHANNNELS_SAME = 0,              //!< number of channels from inputs must be the same and equal to output's number of channels
```

Review comment:
I have moved `EltwiseOp`, `op` and `coeffs` to `EltwiseLayer` (which is a part of the public headers). Should `OutputChannelsMode` be moved out? It's strictly not required as the mode can be inferred from `LayerData` in `fuseLayers`. The convolution layer again performs checks in `tryFuse` but it only checks the `op` and `coeffs` and hopes that `fuseLayer` checks the channel mode before attempting to fuse. These movements affects `all_layers.hpp` which is a public internal (?) header.
**File:** modules/dnn/src/layers/eltwise_layer.cpp
**Change Type:** modified
**Context:** PR #16164: [WIP] cuda4dnn(conv): fuse eltwise with convolutions - ### This pullrequest changes - fuses eltwise with convolution for three topologies <...
**Review Line:** 67

**Code Changes:**
```diff
-        MAX = 2,
-        DIV = 3
-    } op;
-    std::vector<float> coeffs;
-
     enum OutputChannelsMode
     {
         ELTWISE_CHANNNELS_SAME = 0,              //!< number of channels from inputs must be the same and equal to output's number of channels
```

Review comment:
Public API of DNN layers is `LayerParams`.
**File:** modules/dnn/src/layers/eltwise_layer.cpp
**Change Type:** modified
**Context:** PR #16164: [WIP] cuda4dnn(conv): fuse eltwise with convolutions - ### This pullrequest changes - fuses eltwise with convolution for three topologies <...
**Review Line:** 67

**Code Changes:**
```diff
-        MAX = 2,
-        DIV = 3
-    } op;
-    std::vector<float> coeffs;
-
     enum OutputChannelsMode
     {
         ELTWISE_CHANNNELS_SAME = 0,              //!< number of channels from inputs must be the same and equal to output's number of channels
```

Review comment:
> all_layers.hpp Remove changes from there. This header is part of public API. If you need to access to EltwiseLayerImpl, then create internal `modules/dnn/src/layers/eltwise_layer.hpp`
**File:** modules/dnn/src/layers/eltwise_layer.cpp
**Change Type:** modified
**Context:** PR #16164: [WIP] cuda4dnn(conv): fuse eltwise with convolutions - ### This pullrequest changes - fuses eltwise with convolution for three topologies <...
**Review Line:** 67

**Code Changes:**
```diff
-        MAX = 2,
-        DIV = 3
-    } op;
-    std::vector<float> coeffs;
-
     enum OutputChannelsMode
     {
         ELTWISE_CHANNNELS_SAME = 0,              //!< number of channels from inputs must be the same and equal to output's number of channels
```

Review comment:
I need access to just `op` and `coeffs`. The CUDA backend can fuse eltwise if: - the operation is `SUM` - has no coefficients - no variable channels The variable channels is easy to check as the input shapes are available in `fuseLayers()`. I moved `op` and `coeffs` to `EltwiseLayer` (which is in `all_layers.hpp`) so that they are accessible in `fuseLayers`. I tried to see what the OCL code was doing to check the conditions but I couldn't find any such checks. Maybe I can use the same technique as OCL code to get those properties.
**File:** modules/dnn/include/opencv2/dnn/dnn.hpp
**Change Type:** modified
**Context:** PR #14325: DNN: Optimization fuse: Conv -> Eltwise -> BatchNorm
**Review Line:** 332

**Code Changes:**
```diff
+         * @param[in] bottoms Previous layers to be fused.
          * @param[in] top Next layer to be fused.
          * @returns True if fusion was performed.
          */
-        virtual bool tryFuse(Ptr<Layer>& top);
+        virtual bool tryFuse(std::vector< Ptr<Layer> >& bottoms, Ptr<Layer>& top);
 
         /**
          * @brief Returns parameters of layers with channel-wise multiplication and addition.
```

Review comment:
I believe "layer" should know own inputs ("bottoms") - directly or via `Network`.
**File:** modules/dnn/src/layers/eltwise_layer.cpp
**Change Type:** modified
**Context:** PR #14325: DNN: Optimization fuse: Conv -> Eltwise -> BatchNorm

**Code Changes:**
```diff
@@ -210,6 +210,45 @@ class EltwiseLayerImpl CV_FINAL : public EltwiseLayer
         return false;
     }
 
+    virtual bool tryFuse(std::vector< Ptr<dnn::Layer> >& bottoms, Ptr<dnn::Layer>& top) CV_OVERRIDE
+    {
+        // Either all input layers are fusing or nothing.
+        for (int i = 1; i < bottoms.size(); i++)
+        {
+            if (bottoms[0]->type != bottoms[i]->type)
```

Review comment:
Can we emit cloning?
**File:** modules/dnn/test/test_layers.cpp
**Change Type:** modified
**Context:** PR #14325: DNN: Optimization fuse: Conv -> Eltwise -> BatchNorm

**Code Changes:**
```diff
@@ -1583,6 +1583,129 @@ TEST(Layer_Test_Convolution, relu_fusion)
     normAssert(input, output);
 }
 
+// Check fuse convolution and relu wherein skip eltwise
+typedef testing::TestWithParam< tuple<Backend, Target> > Layers_Test_Subnet;
+TEST_P(Layers_Test_Subnet, convolutionx2_eltwise_scalex2_relu)
+{
+    Net net, net_wo_fuse;
+    int id_conv[2], id_conv_wo_fuse[2];
```

Review comment:
Please initialize a reference `cv::Mat` and compare with it by `normAssert`.
**File:** modules/dnn/test/test_layers.cpp
**Change Type:** modified
**Context:** PR #14325: DNN: Optimization fuse: Conv -> Eltwise -> BatchNorm

**Code Changes:**
```diff
@@ -1583,6 +1583,129 @@ TEST(Layer_Test_Convolution, relu_fusion)
     normAssert(input, output);
 }
 
+// Check fuse convolution and relu wherein skip eltwise
+typedef testing::TestWithParam< tuple<Backend, Target> > Layers_Test_Subnet;
+TEST_P(Layers_Test_Subnet, convolutionx2_eltwise_scalex2_relu)
+{
+    Net net, net_wo_fuse;
+    int id_conv[2], id_conv_wo_fuse[2];
```

Review comment:
Inputs are too weak, so testing coverage is very low.
**File:** modules/dnn/src/layers/eltwise_layer.cpp
**Change Type:** modified
**Context:** PR #14325: DNN: Optimization fuse: Conv -> Eltwise -> BatchNorm

**Code Changes:**
```diff
@@ -210,6 +210,45 @@ class EltwiseLayerImpl CV_FINAL : public EltwiseLayer
         return false;
     }
 
+    virtual bool tryFuse(std::vector< Ptr<dnn::Layer> >& bottoms, Ptr<dnn::Layer>& top) CV_OVERRIDE
+    {
+        // Either all input layers are fusing or nothing.
+        for (int i = 1; i < bottoms.size(); i++)
+        {
+            if (bottoms[0]->type != bottoms[i]->type)
```

Review comment:
I think that ```cpp // Either all input layers are fusing or nothing. for (int i = 1; i < bottoms.size(); i++) { if (bottoms[0]->type != bottoms[i]->type) return false; } ``` it more convenient.
**File:** modules/dnn/test/test_layers.cpp
**Change Type:** modified
**Context:** PR #14325: DNN: Optimization fuse: Conv -> Eltwise -> BatchNorm

**Code Changes:**
```diff
@@ -1583,6 +1583,129 @@ TEST(Layer_Test_Convolution, relu_fusion)
     normAssert(input, output);
 }
 
+// Check fuse convolution and relu wherein skip eltwise
+typedef testing::TestWithParam< tuple<Backend, Target> > Layers_Test_Subnet;
+TEST_P(Layers_Test_Subnet, convolutionx2_eltwise_scalex2_relu)
+{
+    Net net, net_wo_fuse;
+    int id_conv[2], id_conv_wo_fuse[2];
```

Review comment:
I think we also need to check other backends and targets.
**File:** modules/dnn/test/test_layers.cpp
**Change Type:** modified
**Context:** PR #14325: DNN: Optimization fuse: Conv -> Eltwise -> BatchNorm

**Code Changes:**
```diff
@@ -1583,6 +1583,129 @@ TEST(Layer_Test_Convolution, relu_fusion)
     normAssert(input, output);
 }
 
+// Check fuse convolution and relu wherein skip eltwise
+typedef testing::TestWithParam< tuple<Backend, Target> > Layers_Test_Subnet;
+TEST_P(Layers_Test_Subnet, convolutionx2_eltwise_scalex2_relu)
+{
+    Net net, net_wo_fuse;
+    int id_conv[2], id_conv_wo_fuse[2];
```

Review comment:
Let's do layers different. It's OK to initialize weights by constant number but choose different values.
**File:** modules/dnn/test/test_layers.cpp
**Change Type:** modified
**Context:** PR #14325: DNN: Optimization fuse: Conv -> Eltwise -> BatchNorm

**Code Changes:**
```diff
@@ -1583,6 +1583,129 @@ TEST(Layer_Test_Convolution, relu_fusion)
     normAssert(input, output);
 }
 
+// Check fuse convolution and relu wherein skip eltwise
+typedef testing::TestWithParam< tuple<Backend, Target> > Layers_Test_Subnet;
+TEST_P(Layers_Test_Subnet, convolutionx2_eltwise_scalex2_relu)
+{
+    Net net, net_wo_fuse;
+    int id_conv[2], id_conv_wo_fuse[2];
```

Review comment:
The same. Please initialize them differently.
**File:** modules/dnn/test/test_layers.cpp
**Change Type:** modified
**Context:** PR #14325: DNN: Optimization fuse: Conv -> Eltwise -> BatchNorm

**Code Changes:**
```diff
@@ -1583,6 +1583,129 @@ TEST(Layer_Test_Convolution, relu_fusion)
     normAssert(input, output);
 }
 
+// Check fuse convolution and relu wherein skip eltwise
+typedef testing::TestWithParam< tuple<Backend, Target> > Layers_Test_Subnet;
+TEST_P(Layers_Test_Subnet, convolutionx2_eltwise_scalex2_relu)
+{
+    Net net, net_wo_fuse;
+    int id_conv[2], id_conv_wo_fuse[2];
```

Review comment:
`bias` Mat is unused.
**File:** modules/dnn/test/test_layers.cpp
**Change Type:** modified
**Context:** PR #14325: DNN: Optimization fuse: Conv -> Eltwise -> BatchNorm

**Code Changes:**
```diff
@@ -1583,6 +1583,129 @@ TEST(Layer_Test_Convolution, relu_fusion)
     normAssert(input, output);
 }
 
+// Check fuse convolution and relu wherein skip eltwise
+typedef testing::TestWithParam< tuple<Backend, Target> > Layers_Test_Subnet;
+TEST_P(Layers_Test_Subnet, convolutionx2_eltwise_scalex2_relu)
+{
+    Net net, net_wo_fuse;
+    int id_conv[2], id_conv_wo_fuse[2];
```

Review comment:
I think it's better to use constant initializers rather random ones. Just different ones.
**File:** modules/dnn/test/test_layers.cpp
**Change Type:** modified
**Context:** PR #14325: DNN: Optimization fuse: Conv -> Eltwise -> BatchNorm

**Code Changes:**
```diff
@@ -1583,6 +1583,129 @@ TEST(Layer_Test_Convolution, relu_fusion)
     normAssert(input, output);
 }
 
+// Check fuse convolution and relu wherein skip eltwise
+typedef testing::TestWithParam< tuple<Backend, Target> > Layers_Test_Subnet;
+TEST_P(Layers_Test_Subnet, convolutionx2_eltwise_scalex2_relu)
+{
+    Net net, net_wo_fuse;
+    int id_conv[2], id_conv_wo_fuse[2];
```

Review comment:
If we have ReLU I think we can face situations with zeroed values. So please initialize input positively and all the scales as well.
**File:** modules/dnn/test/test_layers.cpp
**Change Type:** modified
**Context:** PR #14325: DNN: Optimization fuse: Conv -> Eltwise -> BatchNorm

**Code Changes:**
```diff
@@ -1583,6 +1583,129 @@ TEST(Layer_Test_Convolution, relu_fusion)
     normAssert(input, output);
 }
 
+// Check fuse convolution and relu wherein skip eltwise
+typedef testing::TestWithParam< tuple<Backend, Target> > Layers_Test_Subnet;
+TEST_P(Layers_Test_Subnet, convolutionx2_eltwise_scalex2_relu)
+{
+    Net net, net_wo_fuse;
+    int id_conv[2], id_conv_wo_fuse[2];
```

Review comment:
No. Each value of passed Mat should be different. Test must be reliable. Including inputs. Swapping of any of two different values on input should change result.
**File:** modules/dnn/src/layers/eltwise_layer.cpp
**Change Type:** modified
**Context:** PR #14325: DNN: Optimization fuse: Conv -> Eltwise -> BatchNorm

**Code Changes:**
```diff
@@ -210,6 +210,45 @@ class EltwiseLayerImpl CV_FINAL : public EltwiseLayer
         return false;
     }
 
+    virtual bool tryFuse(std::vector< Ptr<dnn::Layer> >& bottoms, Ptr<dnn::Layer>& top) CV_OVERRIDE
+    {
+        // Either all input layers are fusing or nothing.
+        for (int i = 1; i < bottoms.size(); i++)
+        {
+            if (bottoms[0]->type != bottoms[i]->type)
```

Review comment:
unused variable?
**File:** modules/dnn/src/layers/eltwise_layer.cpp
**Change Type:** modified
**Context:** PR #14325: DNN: Optimization fuse: Conv -> Eltwise -> BatchNorm
**Review Line:** 246

**Code Changes:**
```diff
+                //                fuse layer
+                //  We need to check that every layer will be fused
+                for (size_t i = 1; i < bottoms.size(); i++)
+                {
+                    CV_Assert(bottoms[i]->tryFuse(bottoms, weightsLayer));
+                }
+            }
+            return true;
+        }
+        return false;
+    }
```

Review comment:
Please add a comment why we added this part of fusion. I remember that there was a case but it'd be useful to provide here an example in comments.
**File:** modules/dnn/test/test_layers.cpp
**Change Type:** modified
**Context:** PR #14325: DNN: Optimization fuse: Conv -> Eltwise -> BatchNorm

**Code Changes:**
```diff
@@ -1583,6 +1583,129 @@ TEST(Layer_Test_Convolution, relu_fusion)
     normAssert(input, output);
 }
 
+// Check fuse convolution and relu wherein skip eltwise
+typedef testing::TestWithParam< tuple<Backend, Target> > Layers_Test_Subnet;
+TEST_P(Layers_Test_Subnet, convolutionx2_eltwise_scalex2_relu)
+{
+    Net net, net_wo_fuse;
+    int id_conv[2], id_conv_wo_fuse[2];
```

Review comment:
Why not `randu`?
**File:** modules/dnn/test/test_layers.cpp
**Change Type:** modified
**Context:** PR #14325: DNN: Optimization fuse: Conv -> Eltwise -> BatchNorm

**Code Changes:**
```diff
@@ -1583,6 +1583,129 @@ TEST(Layer_Test_Convolution, relu_fusion)
     normAssert(input, output);
 }
 
+// Check fuse convolution and relu wherein skip eltwise
+typedef testing::TestWithParam< tuple<Backend, Target> > Layers_Test_Subnet;
+TEST_P(Layers_Test_Subnet, convolutionx2_eltwise_scalex2_relu)
+{
+    Net net, net_wo_fuse;
+    int id_conv[2], id_conv_wo_fuse[2];
```

Review comment:
Maybe it's easier to create two networks but for one of them set `enableFusion(false)`?
**File:** modules/dnn/src/layers/eltwise_layer.cpp
**Change Type:** modified
**Context:** PR #14325: DNN: Optimization fuse: Conv -> Eltwise -> BatchNorm
**Review Line:** 245

**Code Changes:**
```diff
+                //                \   |   X
+                //                fuse layer
+                //  We need to check that every layer will be fused
+                for (size_t i = 1; i < bottoms.size(); i++)
+                {
+                    CV_Assert(bottoms[i]->tryFuse(bottoms, weightsLayer));
+                }
+            }
+            return true;
+        }
+        return false;
```

Review comment:
Do we really need `CV_Assert()` here? This is "try" function, not validation. In case of assertion (non-supported case) network is left in non-consistent (broken) state. Some transaction-based fusing should be implemented instead.
**File:** modules/dnn/src/layers/eltwise_layer.cpp
**Change Type:** modified
**Context:** PR #14325: DNN: Optimization fuse: Conv -> Eltwise -> BatchNorm
**Review Line:** 245

**Code Changes:**
```diff
+                //                \   |   X
+                //                fuse layer
+                //  We need to check that every layer will be fused
+                for (size_t i = 1; i < bottoms.size(); i++)
+                {
+                    CV_Assert(bottoms[i]->tryFuse(bottoms, weightsLayer));
+                }
+            }
+            return true;
+        }
+        return false;
```

Review comment:
> bottoms[i]->tryFuse(bottoms, weightsLayer) > bottoms[i] > bottoms Refer to documentation of `tryFuse()` method. You passing array including layer itself as layer's inputs. Do you see logic error with recursion here? Related comment is still [here](https://github.com/opencv/opencv/pull/14325/files#r275332184).
**File:** modules/dnn/src/layers/eltwise_layer.cpp
**Change Type:** modified
**Context:** PR #14325: DNN: Optimization fuse: Conv -> Eltwise -> BatchNorm
**Review Line:** 245

**Code Changes:**
```diff
+                //                \   |   X
+                //                fuse layer
+                //  We need to check that every layer will be fused
+                for (size_t i = 1; i < bottoms.size(); i++)
+                {
+                    CV_Assert(bottoms[i]->tryFuse(bottoms, weightsLayer));
+                }
+            }
+            return true;
+        }
+        return false;
```

Review comment:
I don't know how used without change API, thats why we need to close PR, maybe.
**File:** modules/core/src/arithm.cpp
**Change Type:** modified
**Context:** PR #13570: Fix bugs in arithm_op() for InputArray (src == dst) case. - #### Fix bugs in ```arithm_op()``` for ```InputArray``` ```(src == dst)``` case...

**Code Changes:**
```diff
@@ -603,7 +603,40 @@ static void arithm_op(InputArray _src1, InputArray _src2, OutputArray _dst,
                       InputArray _mask, int dtype, BinaryFuncC* tab, bool muldiv=false,
                       void* usrdata=0, int oclop=-1 )
 {
-    const _InputArray *psrc1 = &_src1, *psrc2 = &_src2;
+    struct InputArray_backup
+    {
+        InputArray_backup(InputArray src, OutputArray dst)
+        {
+            if (src.getObj() == dst.getObj())
```

Review comment:
Use this method of `InputArray`: ``` bool isUMat() const ```
**File:** modules/videoio/src/cap_ffmpeg_impl.hpp
**Change Type:** modified
**Context:** PR #9192: Add ability to control bitrate of the video produced by VideoWriter w… - …ith FFMEG resolves #8961 ### This pullrequest changes  Add support...
**Review Line:** 1492

**Code Changes:**
```diff
@@ -1489,7 +1489,6 @@ static AVStream *icv_add_video_stream_FFMPEG(AVFormatContext *oc,
 
     /* put sample parameters */
     int64_t lbit_rate = (int64_t)bitrate;
-    lbit_rate += (bitrate / 2);
     lbit_rate = std::min(lbit_rate, (int64_t)INT_MAX);
     c->bit_rate = lbit_rate;
 
@@ -1560,9 +1559,6 @@ static AVStream *icv_add_video_stream_FFMPEG(AVFormatContext *oc,
     if (c->codec_id == AV_CODEC_ID_H264) {
       c->gop_size = -1;
```

Review comment:
this seems was some hack
**File:** modules/core/include/opencv2/core/hal/intrin.hpp
**Change Type:** modified
**Context:** PR #14331: core:unv add compatibility with avx512 - WIP relates #13891, #14210 Merge with opencv_contrib: opencv/opencv_contrib#2099 ### This pullrequ...
**Review Line:** 304

**Code Changes:**
```diff
     typedef v_int64x4    v_int64;
     typedef v_float32x8  v_float32;
+    typedef v_mask8x32   v_mask8;
+    typedef v_mask16x16  v_mask16;
+    typedef v_mask32x8   v_mask32;
+    typedef v_maskf32x8  v_maskf32;
+    typedef v_mask64x4   v_mask64;
     CV_INTRIN_DEFINE_WIDE_INTRIN_ALL_TYPES(v256)
     #if CV_SIMD256_64F
     typedef v_float64x4  v_float64;
+    typedef v_maskf64x4  v_maskf64;
```

Review comment:
Is it necessary to retain special mask types for floating point types? AFAIK for x86 and NEON integers and floats use the same registers so type casting is used for syntactic reasons only.
**File:** modules/core/include/opencv2/core/hal/intrin.hpp
**Change Type:** modified
**Context:** PR #14331: core:unv add compatibility with avx512 - WIP relates #13891, #14210 Merge with opencv_contrib: opencv/opencv_contrib#2099 ### This pullrequ...
**Review Line:** 304

**Code Changes:**
```diff
     typedef v_int64x4    v_int64;
     typedef v_float32x8  v_float32;
+    typedef v_mask8x32   v_mask8;
+    typedef v_mask16x16  v_mask16;
+    typedef v_mask32x8   v_mask32;
+    typedef v_maskf32x8  v_maskf32;
+    typedef v_mask64x4   v_mask64;
     CV_INTRIN_DEFINE_WIDE_INTRIN_ALL_TYPES(v256)
     #if CV_SIMD256_64F
     typedef v_float64x4  v_float64;
+    typedef v_maskf64x4  v_maskf64;
```

Review comment:
No not necessary, actually the reason behind these special types is just because I was worried too much about the plenty of switching between integer and floating-point unit domains in old x86 processors which may occur delays but I guess compilers can handle it, so I think we can just reinterpreting the return of float-point comparisons to integer types.
**File:** modules/core/include/opencv2/core/hal/intrin_cpp.hpp
**Change Type:** modified
**Context:** PR #14331: core:unv add compatibility with avx512 - WIP relates #13891, #14210 Merge with opencv_contrib: opencv/opencv_contrib#2099 ### This pullrequ...
**Review Line:** 328

**Code Changes:**
```diff
 
@@ -318,6 +325,31 @@ template<typename _Tp, int n> struct v_reg
     */
     _Tp get0() const { return s[0]; }
 
+    static v_reg<_Tp, n> fromMask(const v_reg<bool, n>& mask)
+    {
+        v_reg<_Tp, n> c;
+        for( int i = 0; i < n; ++i )
+        {
+            c.s[i] = (_Tp)-(int)mask.s[i];
```

Review comment:
I don't think so, that will break the type-safety, but I prefer to use converting constructors and operators together for each vector type only so we can avoid the use of sub access to 'val', it silly to keep typing ".val" in every single line. for example, take a look at the defined types in #14261.
**File:** modules/calib3d/src/stereosgbm.cpp
**Change Type:** modified
**Context:** PR #14261: core:unv improve and split SSE into multiple files - - [x] types - [x] memory - [x] operators - [x] arithmetic - [x] math - [x] reorder - [...
**Review Line:** 708

**Code Changes:**
```diff
@@ -705,7 +705,7 @@ static void computeDisparitySGBM( const Mat& img1, const Mat& img2,
                                 L0 = L0 + v_load(Sp + d);
                                 v_store(Sp + d, L0);
 
-                                v_int16x8 mask = _minS > L0;
+                                v_int16x8 mask = v_int16x8::fromMask(_minS > L0);
                                 _minS = v_min(_minS, L0);
                                 _bestDisp = _bestDisp ^ ((_bestDisp ^ _d8) & mask);
                                 _d8 += _8;
@@ -721,7 +721,7 @@ static void computeDisparitySGBM( const Mat& img1, const Mat& img2,
                             minS = std::min(v_reduce_min(min32L), v_reduce_min(min32H));
```

Review comment:
Can we keep this code "as is" at least for SIMD128 (with the same performance)? (make it backward compatible, see opencv_contrib) SIMD256/SIMD512/wide universal intrinsics and tests - via new "mask" type.