nareshmlx/opencv-pr huggingface dataset:
**File:** modules/dnn/src/layers/einsum_layer.cpp
**Change Type:** modified
**Context:** PR #24830: 1d operation support for einsum layer
**Review Line:** 108

**Code Changes:**
```diff
@@ -105,15 +105,15 @@ static Mat batchwiseMatMul(
 
         // input1 should of size MxK
         // check if input1 needs reshape, if need reshape
-        if (input1.dims > 2 || input1.size[0] != M || input1.size[1] != K)
+        if (input1.dims > 2 || input1.size[0] != M || (input1.dims > 1 && input1.size[1] != K) || input1.dims == 1)
         {
             int shape[] = {static_cast<int>(M), static_cast<int>(K)};
             reshapedInput1 = input1.reshape(1, 2, shape);
         }
 
```

Review comment:
To make 4.x/5.x more compatible, can you propose `einsum_layer.cpp` change to 4.x branch too?
**File:** modules/dnn/src/layers/einsum_layer.cpp
**Change Type:** modified
**Context:** PR #24830: 1d operation support for einsum layer
**Review Line:** 108

**Code Changes:**
```diff
@@ -105,15 +105,15 @@ static Mat batchwiseMatMul(
 
         // input1 should of size MxK
         // check if input1 needs reshape, if need reshape
-        if (input1.dims > 2 || input1.size[0] != M || input1.size[1] != K)
+        if (input1.dims > 2 || input1.size[0] != M || (input1.dims > 1 && input1.size[1] != K) || input1.dims == 1)
         {
             int shape[] = {static_cast<int>(M), static_cast<int>(K)};
             reshapedInput1 = input1.reshape(1, 2, shape);
         }
 
```

Review comment:
Without enabling tests
**File:** modules/video/include/opencv2/video/tracking.hpp
**Change Type:** modified
**Context:** PR #24852: Make \epsilon parameter accessible in VariationalRefinement

**Code Changes:**
```diff
@@ -564,6 +564,12 @@ class CV_EXPORTS_W VariationalRefinement : public DenseOpticalFlow
     /** @copybrief getGamma @see getGamma */
     CV_WRAP virtual void setGamma(float val) = 0;
 
+    /** @brief Norm value shift for robust penalizer
+    @see setEpsilon */
+    CV_WRAP virtual float getEpsilon() const = 0;
+    /** @copybrief getEpsilon @see getEpsilon */
+    CV_WRAP virtual void setEpsilon(float val) = 0;
+
```

Review comment:
"Norm value shift for robust penalizer" sounds better.
**File:** modules/video/include/opencv2/video/tracking.hpp
**Change Type:** modified
**Context:** PR #24852: Make \epsilon parameter accessible in VariationalRefinement

**Code Changes:**
```diff
@@ -564,6 +564,12 @@ class CV_EXPORTS_W VariationalRefinement : public DenseOpticalFlow
     /** @copybrief getGamma @see getGamma */
     CV_WRAP virtual void setGamma(float val) = 0;
 
+    /** @brief Norm value shift for robust penalizer
+    @see setEpsilon */
+    CV_WRAP virtual float getEpsilon() const = 0;
+    /** @copybrief getEpsilon @see getEpsilon */
+    CV_WRAP virtual void setEpsilon(float val) = 0;
+
```

Review comment:
Sounds good, I will update it asap
**File:** modules/dnn/src/layers/einsum_layer.cpp
**Change Type:** modified
**Context:** PR #24812: Replace interactive batched Matrix Multiply.
**Review Line:** 1315

**Code Changes:**
```diff
     int K = input1ShapeOverride[2];
     int N = input2ShapeOverride[2];
 
-    std::vector<Mat> output;
+    Mat reshapedInput1 = input1;
+    Mat reshapedInput2 = input2;
+
+    Mat output;
     if (batches > 1)
     {
-        Mat reshapedInput1 = input1;
```

Review comment:
Could you elaborate why reshape is needed here? fastGemmBatch can already handle multiplification of n-dimensional matrices.
**File:** modules/dnn/src/layers/einsum_layer.cpp
**Change Type:** modified
**Context:** PR #24812: Replace interactive batched Matrix Multiply.
**Review Line:** 1315

**Code Changes:**
```diff
     int K = input1ShapeOverride[2];
     int N = input2ShapeOverride[2];
 
-    std::vector<Mat> output;
+    Mat reshapedInput1 = input1;
+    Mat reshapedInput2 = input2;
+
+    Mat output;
     if (batches > 1)
     {
-        Mat reshapedInput1 = input1;
```

Review comment:
This is required as some tensors might come in with dummy deletion BxNxMx1. Reshape just removes that dummy dimension.
**File:** modules/dnn/src/layers/einsum_layer.cpp
**Change Type:** modified
**Context:** PR #24812: Replace interactive batched Matrix Multiply.
**Review Line:** 1315

**Code Changes:**
```diff
     int K = input1ShapeOverride[2];
     int N = input2ShapeOverride[2];
 
-    std::vector<Mat> output;
+    Mat reshapedInput1 = input1;
+    Mat reshapedInput2 = input2;
+
+    Mat output;
     if (batches > 1)
     {
-        Mat reshapedInput1 = input1;
```

Review comment:
Could you give a real Einsum example of `dummy deletion BxNxMx1`?
**File:** modules/dnn/src/layers/einsum_layer.cpp
**Change Type:** modified
**Context:** PR #24812: Replace interactive batched Matrix Multiply.
**Review Line:** 1315

**Code Changes:**
```diff
     int K = input1ShapeOverride[2];
     int N = input2ShapeOverride[2];
 
-    std::vector<Mat> output;
+    Mat reshapedInput1 = input1;
+    Mat reshapedInput2 = input2;
+
+    Mat output;
     if (batches > 1)
     {
-        Mat reshapedInput1 = input1;
```

Review comment:
This dummy dimension on` BxNxMx1` appears during pre-processing for some tensors. The reshape is not needed because we want to multiply 2 tenors with dummy dimension.
**File:** modules/dnn/src/layers/einsum_layer.cpp
**Change Type:** modified
**Context:** PR #24812: Replace interactive batched Matrix Multiply.

**Code Changes:**
```diff
@@ -1299,7 +1299,6 @@ Mat LayerEinsumImpl::batchwiseMatMul(
     const Mat& input2,
     const MatShape& input2ShapeOverride)
 {
-
     // Sanity checks before the actual MatMul
     CV_CheckType(input1.type(), input2.type(), "Data types of the inputs must match for MatMul");
     CV_CheckEQ(input1ShapeOverride.size(), (size_t) 3, "Only 1 batch dimension is allowed for MatMul");
@@ -1312,92 +1311,41 @@ Mat LayerEinsumImpl::batchwiseMatMul(
     int K = input1ShapeOverride[2];
```

Review comment:
Why 0 channels? Let's keep 1: ```cpp reshapedInput2 = reshapedInput2.reshape(1, input2ShapeOverride); reshapedInput1 = reshapedInput1.reshape(1, input1ShapeOverride); ```
**File:** modules/python/src2/hdr_parser.py
**Change Type:** modified
**Context:** PR #24773: python: accept path-like objects wherever file names are expected

**Code Changes:**
```diff
@@ -90,6 +90,10 @@ def parse_arg(self, arg_str, argno):
             modlist.append("/IO")
             arg_str = arg_str.replace("CV_IN_OUT", "")
 
+        if "CV_WRAP_FILE_PATH" in arg_str:
+            modlist.append("/PATH")
+            arg_str = arg_str.replace("CV_WRAP_FILE_PATH", "")
+
         isarray = False
         npos = arg_str.find("CV_CARRAY")
```

Review comment:
There are other cases: - read/write methods with parameter `fileName` or type `char*` - `filepath` parameter name - a lot of methods in DNN with several parameters with path semantic like https://docs.opencv.org/4.x/d6/d0f/group__dnn.html#ga29d0ea5e52b1d1a6c2681e3f7d68473a or https://docs.opencv.org/4.x/db/d30/classcv_1_1dnn_1_1Net.html#a327720af187378a58e0a48feb0b5ef89
**File:** modules/python/src2/hdr_parser.py
**Change Type:** modified
**Context:** PR #24773: python: accept path-like objects wherever file names are expected

**Code Changes:**
```diff
@@ -90,6 +90,10 @@ def parse_arg(self, arg_str, argno):
             modlist.append("/IO")
             arg_str = arg_str.replace("CV_IN_OUT", "")
 
+        if "CV_WRAP_FILE_PATH" in arg_str:
+            modlist.append("/PATH")
+            arg_str = arg_str.replace("CV_WRAP_FILE_PATH", "")
+
         isarray = False
         npos = arg_str.find("CV_CARRAY")
```

Review comment:
OK, then it makes sense to go with the idea from the original issue to be able to label parameters as paths (e.g. `CV_WRAP_FILE_PATH`), in addition to the rules in the if.
**File:** modules/python/src2/hdr_parser.py
**Change Type:** modified
**Context:** PR #24773: python: accept path-like objects wherever file names are expected

**Code Changes:**
```diff
@@ -90,6 +90,10 @@ def parse_arg(self, arg_str, argno):
             modlist.append("/IO")
             arg_str = arg_str.replace("CV_IN_OUT", "")
 
+        if "CV_WRAP_FILE_PATH" in arg_str:
+            modlist.append("/PATH")
+            arg_str = arg_str.replace("CV_WRAP_FILE_PATH", "")
+
         isarray = False
         npos = arg_str.find("CV_CARRAY")
```

Review comment:
Pushed. The rule now is: Any argument named filename or filepath, case-insensitive, or annotated with CV_WRAP_FILE_PATH.
**File:** modules/python/src2/cv2_convert.cpp
**Change Type:** modified
**Context:** PR #24773: python: accept path-like objects wherever file names are expected
**Review Line:** 705

**Code Changes:**
```diff
@@ -701,6 +701,18 @@ bool pyopencv_to(PyObject* obj, String &value, const ArgInfo& info)
         return true;
     }
     std::string str;
+
+#if ((PY_VERSION_HEX >= 0x03060000) && !defined(Py_LIMITED_API)) || (Py_LIMITED_API >= 0x03060000)
+    if (info.pathlike)
+    {
+        obj = PyOS_FSPath(obj);
+        if (PyErr_Occurred())
+        {
```

Review comment:
Need to update this check, because compilation fails in this configuration: ``` -- Python 3: -- Interpreter: C:/utils/soft/python35-x64/python.exe (ver 3.5.4) -- Libraries: C:/utils/soft/python35-x64/Libs/python35.lib (ver 3.5.4) -- Limited API: YES (ver 0x03060000) -- numpy: C:/utils/soft/python35-x64/lib/site-packages/numpy/core/include (ver 1.12.1) -- install path: python/cv2/python-3 ``` https://pullrequest.opencv.org/buildbot/builders/precommit_opencl/builds/100307
**File:** modules/dnn/include/opencv2/dnn/all_layers.hpp
**Change Type:** modified
**Context:** PR #24610: dnn onnx: add group norm layer

**Code Changes:**
```diff
@@ -1183,6 +1183,11 @@ CV__DNN_INLINE_NS_BEGIN
         static Ptr<AttentionLayer> create(const LayerParams &params);
     };
 
+    class CV_EXPORTS GroupNormLayer : public Layer {
+    public:
+        static Ptr<GroupNormLayer> create(const LayerParams &params);
+    };
+
 //! @}
```

Review comment:
Please fields to implementation
**File:** modules/dnn/src/layers/group_norm_layer.cpp
**Change Type:** added
**Context:** PR #24610: dnn onnx: add group norm layer

**Code Changes:**
```diff
@@ -0,0 +1,190 @@
+// 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"
+#include <opencv2/dnn/shape_utils.hpp>
+#include "./cpu_kernels/fast_norm.hpp"
+
+// CUDA backend
```

Review comment:
One more mean-variance normalization. Please reuse implementation from https://github.com/opencv/opencv/pull/24409, https://github.com/opencv/opencv/pull/24378
**File:** modules/dnn/src/layers/group_norm_layer.cpp
**Change Type:** added
**Context:** PR #24610: dnn onnx: add group norm layer

**Code Changes:**
```diff
@@ -0,0 +1,190 @@
+// 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"
+#include <opencv2/dnn/shape_utils.hpp>
+#include "./cpu_kernels/fast_norm.hpp"
+
+// CUDA backend
```

Review comment:
Put an empty line before the file ends.
**File:** modules/dnn/src/onnx/onnx_importer.cpp
**Change Type:** modified
**Context:** PR #24610: dnn onnx: add group norm layer

**Code Changes:**
```diff
@@ -3978,6 +3978,7 @@ void ONNXImporter::buildDispatchMap_ONNX_AI(int opset_version)
     dispatch["ScatterElements"] = dispatch["Scatter"] = dispatch["ScatterND"] = &ONNXImporter::parseScatter;
     dispatch["Tile"] = &ONNXImporter::parseTile;
     dispatch["LayerNormalization"] = &ONNXImporter::parseLayerNorm;
+    dispatch["GroupNormalization"] = &ONNXImporter::parseInstanceNormalization;
 
     dispatch["Equal"] = dispatch["Greater"] = dispatch["Less"] = dispatch["Pow"] = dispatch["Add"] =
             dispatch["Sub"] = dispatch["Mul"] = dispatch["Div"] = dispatch["GreaterOrEqual"] =
```

Review comment:
Is it possible to reuse `parseInstanceNormalization`? This funcion looks the same as `parseInstanceNormalization`.
**File:** modules/dnn/include/opencv2/dnn/all_layers.hpp
**Change Type:** modified
**Context:** PR #24610: dnn onnx: add group norm layer

**Code Changes:**
```diff
@@ -1183,6 +1183,11 @@ CV__DNN_INLINE_NS_BEGIN
         static Ptr<AttentionLayer> create(const LayerParams &params);
     };
 
+    class CV_EXPORTS GroupNormLayer : public Layer {
+    public:
+        static Ptr<GroupNormLayer> create(const LayerParams &params);
+    };
+
 //! @}
```

Review comment:
``` modules/dnn/include/opencv2/dnn/all_layers.hpp:1185: trailing whitespace. ``` Trailing whitespaces are not allowed.
**File:** modules/dnn/src/layers/group_norm_layer.cpp
**Change Type:** added
**Context:** PR #24610: dnn onnx: add group norm layer

**Code Changes:**
```diff
@@ -0,0 +1,190 @@
+// 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"
+#include <opencv2/dnn/shape_utils.hpp>
+#include "./cpu_kernels/fast_norm.hpp"
+
+// CUDA backend
```

Review comment:
``` /home/ci/opencv/modules/dnn/src/layers/group_norm_layer.cpp:102:100: warning: format '%d' expects argument of type 'int', but argument 2 has type 'size_t' {aka 'long unsigned int'} [-Wformat=] /home/ci/opencv/modules/dnn/src/layers/group_norm_layer.cpp:102:124: warning: format '%d' expects argument of type 'int', but argument 3 has type 'size_t' {aka 'long unsigned int'} [-Wformat=] ``` You should use `%zu` for `size_t` type.
**File:** modules/dnn/src/opencl/mvn.cl
**Change Type:** modified
**Context:** PR #24610: dnn onnx: add group norm layer

**Code Changes:**
```diff
@@ -54,6 +54,7 @@
     #define vec_type Dtype8
     #define CALC_MEAN calc_mean8
     #define MVN mvn8
+    #define MVN_GROUP mvn_group8
     #define MEAN_FUSE mean_fuse8
     #define MVN_FUSE mvn_fuse8
 #elif NUM == 4
@@ -62,6 +63,7 @@
     #define vec_type Dtype4
```

Review comment:
Seems like you wanted to fuse a batch norm, not group norm?
**File:** modules/dnn/src/opencl/mvn.cl
**Change Type:** modified
**Context:** PR #24610: dnn onnx: add group norm layer

**Code Changes:**
```diff
@@ -54,6 +54,7 @@
     #define vec_type Dtype8
     #define CALC_MEAN calc_mean8
     #define MVN mvn8
+    #define MVN_GROUP mvn_group8
     #define MEAN_FUSE mean_fuse8
     #define MVN_FUSE mvn_fuse8
 #elif NUM == 4
@@ -62,6 +63,7 @@
     #define vec_type Dtype4
```

Review comment:
Actually, I created the MVN_GROUP function to accommodate group normalization. This is because, according to the latest ONNX definition, the shapes of mean and variance are different from the shapes of scale and bias. Hence, group normalization requires two integer parameters (channel and num_groups) to execute the MVN calculation. The original MVN function probably isn't up to this task. I wrote #ifdef FUSE_GROUP_NORM in reference to the previous MVN function, but if this new function is only used by group norm, I think I can remove the macro definition. Batch norm can just use the previous MVN function.
**File:** modules/dnn/src/layers/group_norm_layer.cpp
**Change Type:** added
**Context:** PR #24610: dnn onnx: add group norm layer

**Code Changes:**
```diff
@@ -0,0 +1,190 @@
+// 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"
+#include <opencv2/dnn/shape_utils.hpp>
+#include "./cpu_kernels/fast_norm.hpp"
+
+// CUDA backend
```

Review comment:
`-DFUSE_GROUP_NORM` needs to be deleted as well.
**File:** modules/dnn/src/opencl/mvn.cl
**Change Type:** modified
**Context:** PR #24610: dnn onnx: add group norm layer

**Code Changes:**
```diff
@@ -54,6 +54,7 @@
     #define vec_type Dtype8
     #define CALC_MEAN calc_mean8
     #define MVN mvn8
+    #define MVN_GROUP mvn_group8
     #define MEAN_FUSE mean_fuse8
     #define MVN_FUSE mvn_fuse8
 #elif NUM == 4
@@ -62,6 +63,7 @@
     #define vec_type Dtype4
```

Review comment:
This is a dedicated function that comes with scale and bias, so we don't need `FUSE_BNORM` nor `FUSE_GROUP_NORM`. In this case, names of parameters can be changed to `weight` or `scale` without the `bnorm` prefix.
**File:** modules/dnn/test/test_onnx_conformance.cpp
**Change Type:** modified
**Context:** PR #24610: dnn onnx: add group norm layer
**Review Line:** 315

**Code Changes:**
```diff
@@ -311,6 +311,8 @@ static const TestCase testConformanceConfig[] = {
     {"test_gridsample_nearest", 2, 1},
     {"test_gridsample_reflection_padding", 2, 1},
     {"test_gridsample_zeros_padding", 2, 1},
+    {"test_group_normalization_epsilon", 3, 1},
+    {"test_group_normalization_example", 3, 1},
     {"test_gru_batchwise", 3, 2},
     {"test_gru_defaults", 3, 1},
     {"test_gru_seq_length", 4, 1},
```

Review comment:
https://github.com/opencv/opencv/blob/4.x/modules/dnn/test/test_onnx_conformance_layer_filter__openvino.inl.hpp should be updated to fix failed CI job: https://github.com/opencv/opencv/actions/runs/7337585388/job/19981699558?pr=24610
**File:** cmake/OpenCVDetectPython.cmake
**Change Type:** modified
**Context:** PR #24837: Manage Python Limited API version externally

**Code Changes:**
```diff
@@ -291,6 +291,12 @@ find_python("${OPENCV_PYTHON3_VERSION}" "${MIN_VER_PYTHON3}" PYTHON3_LIBRARY PYT
     PYTHON3_INCLUDE_DIR PYTHON3_INCLUDE_DIR2 PYTHON3_PACKAGES_PATH
     PYTHON3_NUMPY_INCLUDE_DIRS PYTHON3_NUMPY_VERSION)
 
+# Problem in numpy >=1.15 <1.17
+OCV_OPTION(PYTHON3_LIMITED_API "Build with Python Limited API (not available with numpy >=1.15 <1.17)" NO
+           VISIBLE_IF PYTHON3_NUMPY_VERSION VERSION_LESS "1.15" OR NOT PYTHON3_NUMPY_VERSION VERSION_LESS "1.17")
+if(PYTHON3_LIMITED_API)
+  set(PYTHON3_LIMITED_API_VERSION "0x03060000" CACHE STRING "Minimal Python version for Limited API")
+endif()
```

Review comment:
Perhaps bad NumPy version handling should be moved here too somehow: https://github.com/opencv/opencv/blob/75dc334d39cba41b236116991243ae195ba85c4d/modules/python/python3/CMakeLists.txt#L5-L12 Otherwise we might get two different cmake variables (local, cache) with the same name.
**File:** modules/videoio/test/test_ffmpeg.cpp
**Change Type:** modified
**Context:** PR #24828: videoio: fix 24774 incorrect timestamps returned by VideoCapture when CAP_PROP_FORMAT == -1
**Review Line:** 278

**Code Changes:**
```diff
+    while (container.grab()) {
+        displayTimeMs.push_back(static_cast<int>(container.get(CAP_PROP_POS_MSEC)));
+        const int iFrameProp = static_cast<int>(container.get(CAP_PROP_POS_FRAMES));
+        ASSERT_EQ(iFrame++, iFrameProp);
+    }
+    sort(displayTimeMs.begin(), displayTimeMs.end());
+    vector<int> displayTimeDiffMs(displayTimeMs.size());
+    std::adjacent_difference(displayTimeMs.begin(), displayTimeMs.end(), displayTimeDiffMs.begin());
+    auto minTimeMsIt = min_element(displayTimeDiffMs.begin() + 1, displayTimeDiffMs.end());
+    auto maxTimeMsIt = max_element(displayTimeDiffMs.begin() + 1, displayTimeDiffMs.end());
+    const int frameTimeMs = static_cast<int>(1000.0 / fps);
```

Review comment:
looks wired. `displayTimeMs` are timestamps from video and they should be sorted by design as you read video sequentially. I propose to remove the sorting.
**File:** modules/videoio/test/test_ffmpeg.cpp
**Change Type:** modified
**Context:** PR #24828: videoio: fix 24774 incorrect timestamps returned by VideoCapture when CAP_PROP_FORMAT == -1
**Review Line:** 291

**Code Changes:**
```diff
+#endif
+}
+
+const videoio_container_get_params_t videoio_container_get_params[] =
+{
+    videoio_container_get_params_t(CAP_FFMPEG, "video/big_buck_bunny.mp4", 384, 672, 125, 483, 24),
+    videoio_container_get_params_t(CAP_FFMPEG, "video/big_buck_bunny.mjpg.avi", 384, 672, 125, 2713, 24),
+    videoio_container_get_params_t(CAP_FFMPEG, "video/sample_322x242_15frames.yuv420p.libx264.mp4", 242, 322, 15, 542, 25)
+};
+
+INSTANTIATE_TEST_CASE_P(/**/, videoio_container_get, testing::ValuesIn(videoio_container_get_params));
```

Review comment:
It'll be great to cover more containers like mkv and avi and also at least mpeg4 codec.
**File:** modules/videoio/test/test_ffmpeg.cpp
**Change Type:** modified
**Context:** PR #24828: videoio: fix 24774 incorrect timestamps returned by VideoCapture when CAP_PROP_FORMAT == -1
**Review Line:** 278

**Code Changes:**
```diff
+    while (container.grab()) {
+        displayTimeMs.push_back(static_cast<int>(container.get(CAP_PROP_POS_MSEC)));
+        const int iFrameProp = static_cast<int>(container.get(CAP_PROP_POS_FRAMES));
+        ASSERT_EQ(iFrame++, iFrameProp);
+    }
+    sort(displayTimeMs.begin(), displayTimeMs.end());
+    vector<int> displayTimeDiffMs(displayTimeMs.size());
+    std::adjacent_difference(displayTimeMs.begin(), displayTimeMs.end(), displayTimeDiffMs.begin());
+    auto minTimeMsIt = min_element(displayTimeDiffMs.begin() + 1, displayTimeDiffMs.end());
+    auto maxTimeMsIt = max_element(displayTimeDiffMs.begin() + 1, displayTimeDiffMs.end());
+    const int frameTimeMs = static_cast<int>(1000.0 / fps);
```

Review comment:
When using `VideoCapture` to demux the packets are not necessarily in display order and as a result the timestamp relates to the [decompression ](https://ffmpeg.org/doxygen/3.1/structAVPacket.html) not presentation time. The original issue hints at this because the second I-Frame was 246 (file order) and not 250 (display order). > 242 10.135 False (1, 64) > 243 10.052 False (1, 62) > 244 10.093 False (1, 62) > 245 10.177 False (1, 62) > 246 10.427 True (1, 3377) > 247 10.344 False (1, 62) > 248 10.260 False (1, 62) > 249 10.302 False (1, 62) > 250 10.385 False (1, 62)
**File:** modules/videoio/test/test_ffmpeg.cpp
**Change Type:** modified
**Context:** PR #24828: videoio: fix 24774 incorrect timestamps returned by VideoCapture when CAP_PROP_FORMAT == -1
**Review Line:** 291

**Code Changes:**
```diff
+#endif
+}
+
+const videoio_container_get_params_t videoio_container_get_params[] =
+{
+    videoio_container_get_params_t(CAP_FFMPEG, "video/big_buck_bunny.mp4", 384, 672, 125, 483, 24),
+    videoio_container_get_params_t(CAP_FFMPEG, "video/big_buck_bunny.mjpg.avi", 384, 672, 125, 2713, 24),
+    videoio_container_get_params_t(CAP_FFMPEG, "video/sample_322x242_15frames.yuv420p.libx264.mp4", 242, 322, 15, 542, 25)
+};
+
+INSTANTIATE_TEST_CASE_P(/**/, videoio_container_get, testing::ValuesIn(videoio_container_get_params));
```

Review comment:
I just checked _big_buck_bunny.mp4_ uses **mpeg4**, _video/big_buck_bunny.mjpg.avi_ is **avi** and I can't find any **mkv** files in the extra repo. I can add a few more formats from the extra repo, do you want me to create an **mkv** and add it as well?
**File:** modules/videoio/test/test_ffmpeg.cpp
**Change Type:** modified
**Context:** PR #24828: videoio: fix 24774 incorrect timestamps returned by VideoCapture when CAP_PROP_FORMAT == -1
**Review Line:** 291

**Code Changes:**
```diff
+#endif
+}
+
+const videoio_container_get_params_t videoio_container_get_params[] =
+{
+    videoio_container_get_params_t(CAP_FFMPEG, "video/big_buck_bunny.mp4", 384, 672, 125, 483, 24),
+    videoio_container_get_params_t(CAP_FFMPEG, "video/big_buck_bunny.mjpg.avi", 384, 672, 125, 2713, 24),
+    videoio_container_get_params_t(CAP_FFMPEG, "video/sample_322x242_15frames.yuv420p.libx264.mp4", 242, 322, 15, 542, 25)
+};
+
+INSTANTIATE_TEST_CASE_P(/**/, videoio_container_get, testing::ValuesIn(videoio_container_get_params));
```

Review comment:
MJPEG is easy case, because the frames are encoded independently. I checked opencv_extra and realized, that the other formats are encoded on the go. Let's stay it as is.