nareshmlx/opencv-pr huggingface dataset:
**File:** modules/objdetect/src/qrcode_encoder.cpp
**Change Type:** added
**Context:** PR #17889: QR code (encoding process) - **Merge with extra**: https://github.com/opencv/opencv_extra/pull/807 [ISO standard](https://github.com/yansik...

**Code Changes:**
```diff
@@ -0,0 +1,1265 @@
+// This file is part of OpenCV project.
+// It is subject to the license terms in the LICENSE file found in the top-level directory
+// of this distribution and at http://opencv.org/license.html.
+//
+// Copyright (C) 2021, Intel Corporation, all rights reserved.
+
+#include "precomp.hpp"
+#include "qrcode_encoder_table.inl.hpp"
+namespace cv
```

Review comment:
> iostream should not be used in OpenCV modules. Use logging instead. Or properly target headers, like `sstream`.
**File:** modules/objdetect/src/qrcode_encoder.cpp
**Change Type:** added
**Context:** PR #17889: QR code (encoding process) - **Merge with extra**: https://github.com/opencv/opencv_extra/pull/807 [ISO standard](https://github.com/yansik...

**Code Changes:**
```diff
@@ -0,0 +1,1265 @@
+// This file is part of OpenCV project.
+// It is subject to the license terms in the LICENSE file found in the top-level directory
+// of this distribution and at http://opencv.org/license.html.
+//
+// Copyright (C) 2021, Intel Corporation, all rights reserved.
+
+#include "precomp.hpp"
+#include "qrcode_encoder_table.inl.hpp"
+namespace cv
```

Review comment:
static to make them local
**File:** modules/objdetect/src/qrcode_encoder.cpp
**Change Type:** added
**Context:** PR #17889: QR code (encoding process) - **Merge with extra**: https://github.com/opencv/opencv_extra/pull/807 [ISO standard](https://github.com/yansik...

**Code Changes:**
```diff
@@ -0,0 +1,1265 @@
+// This file is part of OpenCV project.
+// It is subject to the license terms in the LICENSE file found in the top-level directory
+// of this distribution and at http://opencv.org/license.html.
+//
+// Copyright (C) 2021, Intel Corporation, all rights reserved.
+
+#include "precomp.hpp"
+#include "qrcode_encoder_table.inl.hpp"
+namespace cv
```

Review comment:
such string manipulations are really slow (append to beginning => reverse loop). It makes sense to preallocate buffer. Anyway string manipulations looks strange in the middle of the algorithm. That should be avoided, because often it is unnecessary As we can see this function is commonly used with concatenation of loadString(). So to it better to merge its logic and provide vectors.
**File:** modules/objdetect/src/qrcode_encoder.cpp
**Change Type:** added
**Context:** PR #17889: QR code (encoding process) - **Merge with extra**: https://github.com/opencv/opencv_extra/pull/807 [ISO standard](https://github.com/yansik...

**Code Changes:**
```diff
@@ -0,0 +1,1265 @@
+// This file is part of OpenCV project.
+// It is subject to the license terms in the LICENSE file found in the top-level directory
+// of this distribution and at http://opencv.org/license.html.
+//
+// Copyright (C) 2021, Intel Corporation, all rights reserved.
+
+#include "precomp.hpp"
+#include "qrcode_encoder_table.inl.hpp"
+namespace cv
```

Review comment:
> const int& reference is not needed here.
**File:** modules/objdetect/src/qrcode_encoder.cpp
**Change Type:** added
**Context:** PR #17889: QR code (encoding process) - **Merge with extra**: https://github.com/opencv/opencv_extra/pull/807 [ISO standard](https://github.com/yansik...

**Code Changes:**
```diff
@@ -0,0 +1,1265 @@
+// This file is part of OpenCV project.
+// It is subject to the license terms in the LICENSE file found in the top-level directory
+// of this distribution and at http://opencv.org/license.html.
+//
+// Copyright (C) 2021, Intel Corporation, all rights reserved.
+
+#include "precomp.hpp"
+#include "qrcode_encoder_table.inl.hpp"
+namespace cv
```

Review comment:
constants should be in UPPER CASE. https://github.com/opencv/opencv/wiki/Coding_Style_Guide#naming-conventions
**File:** modules/objdetect/src/qrcode_encoder.cpp
**Change Type:** added
**Context:** PR #17889: QR code (encoding process) - **Merge with extra**: https://github.com/opencv/opencv_extra/pull/807 [ISO standard](https://github.com/yansik...

**Code Changes:**
```diff
@@ -0,0 +1,1265 @@
+// This file is part of OpenCV project.
+// It is subject to the license terms in the LICENSE file found in the top-level directory
+// of this distribution and at http://opencv.org/license.html.
+//
+// Copyright (C) 2021, Intel Corporation, all rights reserved.
+
+#include "precomp.hpp"
+#include "qrcode_encoder_table.inl.hpp"
+namespace cv
```

Review comment:
Do we really need to use array here? What is the problem to use properly named fields?
**File:** modules/objdetect/src/qrcode_encoder.cpp
**Change Type:** added
**Context:** PR #17889: QR code (encoding process) - **Merge with extra**: https://github.com/opencv/opencv_extra/pull/807 [ISO standard](https://github.com/yansik...

**Code Changes:**
```diff
@@ -0,0 +1,1265 @@
+// This file is part of OpenCV project.
+// It is subject to the license terms in the LICENSE file found in the top-level directory
+// of this distribution and at http://opencv.org/license.html.
+//
+// Copyright (C) 2021, Intel Corporation, all rights reserved.
+
+#include "precomp.hpp"
+#include "qrcode_encoder_table.inl.hpp"
+namespace cv
```

Review comment:
It makes sense to put large tables content in a separate file and include them directly (e.g., `qrcode_encoder_table.inl.hpp` - not a standalone header)
**File:** modules/objdetect/src/qrcode_encoder.cpp
**Change Type:** added
**Context:** PR #17889: QR code (encoding process) - **Merge with extra**: https://github.com/opencv/opencv_extra/pull/807 [ISO standard](https://github.com/yansik...

**Code Changes:**
```diff
@@ -0,0 +1,1265 @@
+// This file is part of OpenCV project.
+// It is subject to the license terms in the LICENSE file found in the top-level directory
+// of this distribution and at http://opencv.org/license.html.
+//
+// Copyright (C) 2021, Intel Corporation, all rights reserved.
+
+#include "precomp.hpp"
+#include "qrcode_encoder_table.inl.hpp"
+namespace cv
```

Review comment:
> ` << ` avoid using of MatCommaInitializer
**File:** modules/objdetect/src/qrcode_encoder.cpp
**Change Type:** added
**Context:** PR #17889: QR code (encoding process) - **Merge with extra**: https://github.com/opencv/opencv_extra/pull/807 [ISO standard](https://github.com/yansik...

**Code Changes:**
```diff
@@ -0,0 +1,1265 @@
+// This file is part of OpenCV project.
+// It is subject to the license terms in the LICENSE file found in the top-level directory
+// of this distribution and at http://opencv.org/license.html.
+//
+// Copyright (C) 2021, Intel Corporation, all rights reserved.
+
+#include "precomp.hpp"
+#include "qrcode_encoder_table.inl.hpp"
+namespace cv
```

Review comment:
> `q.at<uint8_t>(0, j)` > `p.at<uint8_t>(0, i)` Expressions are used multiple times in this scope. The first one in a loop.
**File:** modules/objdetect/src/qrcode_encoder.cpp
**Change Type:** added
**Context:** PR #17889: QR code (encoding process) - **Merge with extra**: https://github.com/opencv/opencv_extra/pull/807 [ISO standard](https://github.com/yansik...

**Code Changes:**
```diff
@@ -0,0 +1,1265 @@
+// This file is part of OpenCV project.
+// It is subject to the license terms in the LICENSE file found in the top-level directory
+// of this distribution and at http://opencv.org/license.html.
+//
+// Copyright (C) 2021, Intel Corporation, all rights reserved.
+
+#include "precomp.hpp"
+#include "qrcode_encoder_table.inl.hpp"
+namespace cv
```

Review comment:
variables names should start with lower case letter.
**File:** modules/objdetect/src/qrcode_encoder.cpp
**Change Type:** added
**Context:** PR #17889: QR code (encoding process) - **Merge with extra**: https://github.com/opencv/opencv_extra/pull/807 [ISO standard](https://github.com/yansik...

**Code Changes:**
```diff
@@ -0,0 +1,1265 @@
+// This file is part of OpenCV project.
+// It is subject to the license terms in the LICENSE file found in the top-level directory
+// of this distribution and at http://opencv.org/license.html.
+//
+// Copyright (C) 2021, Intel Corporation, all rights reserved.
+
+#include "precomp.hpp"
+#include "qrcode_encoder_table.inl.hpp"
+namespace cv
```

Review comment:
> Mat Polynomial = Mat(...) Remove unnecessary assignment from variables declarations (there are a lot of such cases)
**File:** modules/objdetect/include/opencv2/objdetect.hpp
**Change Type:** modified
**Context:** PR #17889: QR code (encoding process) - **Merge with extra**: https://github.com/opencv/opencv_extra/pull/807 [ISO standard](https://github.com/yansik...

**Code Changes:**
```diff
@@ -670,6 +670,69 @@ struct CV_EXPORTS_W HOGDescriptor
     void groupRectangles(std::vector<cv::Rect>& rectList, std::vector<double>& weights, int groupThreshold, double eps) const;
 };
 
+class CV_EXPORTS_W QRCodeEncoder {
+protected:
+    QRCodeEncoder();  // use ::create()
+public:
+    virtual ~QRCodeEncoder();
+
```

Review comment:
> ascii ASCII What is about UTF-8? AFAIK, the current QRCodeDecoder provides UTF-8 output.
**File:** modules/objdetect/src/qrcode_encoder.cpp
**Change Type:** added
**Context:** PR #17889: QR code (encoding process) - **Merge with extra**: https://github.com/opencv/opencv_extra/pull/807 [ISO standard](https://github.com/yansik...

**Code Changes:**
```diff
@@ -0,0 +1,1265 @@
+// This file is part of OpenCV project.
+// It is subject to the license terms in the LICENSE file found in the top-level directory
+// of this distribution and at http://opencv.org/license.html.
+//
+// Copyright (C) 2021, Intel Corporation, all rights reserved.
+
+#include "precomp.hpp"
+#include "qrcode_encoder_table.inl.hpp"
+namespace cv
```

Review comment:
Use `Mat` for suitable tasks only. It looks really strange then it is used as replacement of `std::vector`.
**File:** modules/objdetect/src/qrcode_encoder.cpp
**Change Type:** added
**Context:** PR #17889: QR code (encoding process) - **Merge with extra**: https://github.com/opencv/opencv_extra/pull/807 [ISO standard](https://github.com/yansik...

**Code Changes:**
```diff
@@ -0,0 +1,1265 @@
+// This file is part of OpenCV project.
+// It is subject to the license terms in the LICENSE file found in the top-level directory
+// of this distribution and at http://opencv.org/license.html.
+//
+// Copyright (C) 2021, Intel Corporation, all rights reserved.
+
+#include "precomp.hpp"
+#include "qrcode_encoder_table.inl.hpp"
+namespace cv
```

Review comment:
Invalid usage of `PImpl` pattern. Public class should be thin wrapper over `Impl`. `QRCodeEncoder::generate` currently provides logic inside.
**File:** modules/objdetect/src/qrcode_encoder.cpp
**Change Type:** added
**Context:** PR #17889: QR code (encoding process) - **Merge with extra**: https://github.com/opencv/opencv_extra/pull/807 [ISO standard](https://github.com/yansik...

**Code Changes:**
```diff
@@ -0,0 +1,1265 @@
+// This file is part of OpenCV project.
+// It is subject to the license terms in the LICENSE file found in the top-level directory
+// of this distribution and at http://opencv.org/license.html.
+//
+// Copyright (C) 2021, Intel Corporation, all rights reserved.
+
+#include "precomp.hpp"
+#include "qrcode_encoder_table.inl.hpp"
+namespace cv
```

Review comment:
`OutputArray` should not accept "array of arrays" (bindings are unable to use that properly). Perhaps dedicated methods are required.
**File:** modules/objdetect/src/qrcode_encoder.cpp
**Change Type:** added
**Context:** PR #17889: QR code (encoding process) - **Merge with extra**: https://github.com/opencv/opencv_extra/pull/807 [ISO standard](https://github.com/yansik...

**Code Changes:**
```diff
@@ -0,0 +1,1265 @@
+// This file is part of OpenCV project.
+// It is subject to the license terms in the LICENSE file found in the top-level directory
+// of this distribution and at http://opencv.org/license.html.
+//
+// Copyright (C) 2021, Intel Corporation, all rights reserved.
+
+#include "precomp.hpp"
+#include "qrcode_encoder_table.inl.hpp"
+namespace cv
```

Review comment:
`CV_Error()` must be raised for unsupported parameter types.
**File:** modules/objdetect/src/qrcode_encoder.cpp
**Change Type:** added
**Context:** PR #17889: QR code (encoding process) - **Merge with extra**: https://github.com/opencv/opencv_extra/pull/807 [ISO standard](https://github.com/yansik...

**Code Changes:**
```diff
@@ -0,0 +1,1265 @@
+// This file is part of OpenCV project.
+// It is subject to the license terms in the LICENSE file found in the top-level directory
+// of this distribution and at http://opencv.org/license.html.
+//
+// Copyright (C) 2021, Intel Corporation, all rights reserved.
+
+#include "precomp.hpp"
+#include "qrcode_encoder_table.inl.hpp"
+namespace cv
```

Review comment:
`bool` result is not informative from the user perspective. How to troubleshot the `false` result?
**File:** modules/objdetect/src/qrcode_encoder.cpp
**Change Type:** added
**Context:** PR #17889: QR code (encoding process) - **Merge with extra**: https://github.com/opencv/opencv_extra/pull/807 [ISO standard](https://github.com/yansik...

**Code Changes:**
```diff
@@ -0,0 +1,1265 @@
+// This file is part of OpenCV project.
+// It is subject to the license terms in the LICENSE file found in the top-level directory
+// of this distribution and at http://opencv.org/license.html.
+//
+// Copyright (C) 2021, Intel Corporation, all rights reserved.
+
+#include "precomp.hpp"
+#include "qrcode_encoder_table.inl.hpp"
+namespace cv
```

Review comment:
> `cv::` should be removed.
**File:** modules/objdetect/test/test_qrcode_encode.cpp
**Change Type:** added
**Context:** PR #17889: QR code (encoding process) - **Merge with extra**: https://github.com/opencv/opencv_extra/pull/807 [ISO standard](https://github.com/yansik...

**Code Changes:**
```diff
@@ -0,0 +1,433 @@
+// 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 "test_precomp.hpp"
+namespace opencv_test { namespace {
+
+std::string encode_qrcode_images_name[] = {
+        "version1_mode1.png", "version1_mode2.png", "version1_mode4.png",
```

Review comment:
`FAIL() <<`
**File:** modules/objdetect/test/test_qrcode_encode.cpp
**Change Type:** added
**Context:** PR #17889: QR code (encoding process) - **Merge with extra**: https://github.com/opencv/opencv_extra/pull/807 [ISO standard](https://github.com/yansik...

**Code Changes:**
```diff
@@ -0,0 +1,433 @@
+// 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 "test_precomp.hpp"
+namespace opencv_test { namespace {
+
+std::string encode_qrcode_images_name[] = {
+        "version1_mode1.png", "version1_mode2.png", "version1_mode4.png",
```

Review comment:
> `<< name_test_image` not necessary as this is a test parameter.
**File:** modules/objdetect/test/test_qrcode_encode.cpp
**Change Type:** added
**Context:** PR #17889: QR code (encoding process) - **Merge with extra**: https://github.com/opencv/opencv_extra/pull/807 [ISO standard](https://github.com/yansik...

**Code Changes:**
```diff
@@ -0,0 +1,433 @@
+// 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 "test_precomp.hpp"
+namespace opencv_test { namespace {
+
+std::string encode_qrcode_images_name[] = {
+        "version1_mode1.png", "version1_mode2.png", "version1_mode4.png",
```

Review comment:
NORM_L1 or _INF
**File:** modules/objdetect/include/opencv2/objdetect.hpp
**Change Type:** modified
**Context:** PR #17889: QR code (encoding process) - **Merge with extra**: https://github.com/opencv/opencv_extra/pull/807 [ISO standard](https://github.com/yansik...

**Code Changes:**
```diff
@@ -670,6 +670,69 @@ struct CV_EXPORTS_W HOGDescriptor
     void groupRectangles(std::vector<cv::Rect>& rectList, std::vector<double>& weights, int groupThreshold, double eps) const;
 };
 
+class CV_EXPORTS_W QRCodeEncoder {
+protected:
+    QRCodeEncoder();  // use ::create()
+public:
+    virtual ~QRCodeEncoder();
+
```

Review comment:
> String "const reference"
**File:** modules/objdetect/src/qrcode_encoder.cpp
**Change Type:** added
**Context:** PR #17889: QR code (encoding process) - **Merge with extra**: https://github.com/opencv/opencv_extra/pull/807 [ISO standard](https://github.com/yansik...

**Code Changes:**
```diff
@@ -0,0 +1,1265 @@
+// This file is part of OpenCV project.
+// It is subject to the license terms in the LICENSE file found in the top-level directory
+// of this distribution and at http://opencv.org/license.html.
+//
+// Copyright (C) 2021, Intel Corporation, all rights reserved.
+
+#include "precomp.hpp"
+#include "qrcode_encoder_table.inl.hpp"
+namespace cv
```

Review comment:
int => `QRCodeCorrectionLevel`
**File:** modules/objdetect/test/test_qrcode_encode.cpp
**Change Type:** added
**Context:** PR #17889: QR code (encoding process) - **Merge with extra**: https://github.com/opencv/opencv_extra/pull/807 [ISO standard](https://github.com/yansik...

**Code Changes:**
```diff
@@ -0,0 +1,433 @@
+// 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 "test_precomp.hpp"
+namespace opencv_test { namespace {
+
+std::string encode_qrcode_images_name[] = {
+        "version1_mode1.png", "version1_mode2.png", "version1_mode4.png",
```

Review comment:
magic numbers or `QREncodeMode`?
**File:** modules/objdetect/include/opencv2/objdetect.hpp
**Change Type:** modified
**Context:** PR #17889: QR code (encoding process) - **Merge with extra**: https://github.com/opencv/opencv_extra/pull/807 [ISO standard](https://github.com/yansik...

**Code Changes:**
```diff
@@ -670,6 +670,69 @@ struct CV_EXPORTS_W HOGDescriptor
     void groupRectangles(std::vector<cv::Rect>& rectList, std::vector<double>& weights, int groupThreshold, double eps) const;
 };
 
+class CV_EXPORTS_W QRCodeEncoder {
+protected:
+    QRCodeEncoder();  // use ::create()
+public:
+    virtual ~QRCodeEncoder();
+
```

Review comment:
> int correction_level > int mode Can we use enums here?
**File:** modules/objdetect/test/test_qrcode_encode.cpp
**Change Type:** added
**Context:** PR #17889: QR code (encoding process) - **Merge with extra**: https://github.com/opencv/opencv_extra/pull/807 [ISO standard](https://github.com/yansik...

**Code Changes:**
```diff
@@ -0,0 +1,433 @@
+// 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 "test_precomp.hpp"
+namespace opencv_test { namespace {
+
+std::string encode_qrcode_images_name[] = {
+        "version1_mode1.png", "version1_mode2.png", "version1_mode4.png",
```

Review comment:
> int mode Please use enum type
**File:** modules/objdetect/src/qrcode_encoder.cpp
**Change Type:** added
**Context:** PR #17889: QR code (encoding process) - **Merge with extra**: https://github.com/opencv/opencv_extra/pull/807 [ISO standard](https://github.com/yansik...

**Code Changes:**
```diff
@@ -0,0 +1,1265 @@
+// This file is part of OpenCV project.
+// It is subject to the license terms in the LICENSE file found in the top-level directory
+// of this distribution and at http://opencv.org/license.html.
+//
+// Copyright (C) 2021, Intel Corporation, all rights reserved.
+
+#include "precomp.hpp"
+#include "qrcode_encoder_table.inl.hpp"
+namespace cv
```

Review comment:
`i + 1 >= str_len` should be tested before .find() calls (especially the second call) Anyway `for` condition forces this to always false.
**File:** modules/objdetect/src/qrcode_encoder.cpp
**Change Type:** added
**Context:** PR #17889: QR code (encoding process) - **Merge with extra**: https://github.com/opencv/opencv_extra/pull/807 [ISO standard](https://github.com/yansik...

**Code Changes:**
```diff
@@ -0,0 +1,1265 @@
+// This file is part of OpenCV project.
+// It is subject to the license terms in the LICENSE file found in the top-level directory
+// of this distribution and at http://opencv.org/license.html.
+//
+// Copyright (C) 2021, Intel Corporation, all rights reserved.
+
+#include "precomp.hpp"
+#include "qrcode_encoder_table.inl.hpp"
+namespace cv
```

Review comment:
Please write optimized function instead of using `.find()` here. ``` static int mapSymbol(char c) { if (c >= '0' && c <= '9') return (int)(c - '0'); if (c >= 'A' && c <= 'Z') return (int)(c - 'A') + 10; switch (c) { case ' ': return 36 + 0; case '$': return 36 + 1; case '*': return 36 + 2; ... case ':': return 36 + 8; } return -1; } ``` --- According to `mode_char_set` below we need also numeric variant too: ``` static inline int mapNumber(char c) { if (c >= '0' && c <= '9') return (int)(c - '0'); return -1; } ```
**File:** modules/objdetect/src/qrcode_encoder.cpp
**Change Type:** added
**Context:** PR #17889: QR code (encoding process) - **Merge with extra**: https://github.com/opencv/opencv_extra/pull/807 [ISO standard](https://github.com/yansik...

**Code Changes:**
```diff
@@ -0,0 +1,1265 @@
+// This file is part of OpenCV project.
+// It is subject to the license terms in the LICENSE file found in the top-level directory
+// of this distribution and at http://opencv.org/license.html.
+//
+// Copyright (C) 2021, Intel Corporation, all rights reserved.
+
+#include "precomp.hpp"
+#include "qrcode_encoder_table.inl.hpp"
+namespace cv
```

Review comment:
99999 => INT_MAX
**File:** modules/objdetect/src/qrcode_encoder.cpp
**Change Type:** added
**Context:** PR #17889: QR code (encoding process) - **Merge with extra**: https://github.com/opencv/opencv_extra/pull/807 [ISO standard](https://github.com/yansik...

**Code Changes:**
```diff
@@ -0,0 +1,1265 @@
+// This file is part of OpenCV project.
+// It is subject to the license terms in the LICENSE file found in the top-level directory
+// of this distribution and at http://opencv.org/license.html.
+//
+// Copyright (C) 2021, Intel Corporation, all rights reserved.
+
+#include "precomp.hpp"
+#include "qrcode_encoder_table.inl.hpp"
+namespace cv
```

Review comment:
> EncodingMethods result > AutoEncodePerBlock result_block reference or const reference
**File:** modules/objdetect/src/qrcode_encoder.cpp
**Change Type:** added
**Context:** PR #17889: QR code (encoding process) - **Merge with extra**: https://github.com/opencv/opencv_extra/pull/807 [ISO standard](https://github.com/yansik...

**Code Changes:**
```diff
@@ -0,0 +1,1265 @@
+// This file is part of OpenCV project.
+// It is subject to the license terms in the LICENSE file found in the top-level directory
+// of this distribution and at http://opencv.org/license.html.
+//
+// Copyright (C) 2021, Intel Corporation, all rights reserved.
+
+#include "precomp.hpp"
+#include "qrcode_encoder_table.inl.hpp"
+namespace cv
```

Review comment:
> .substr(j, str_len - j) The second argument is not needed here: https://en.cppreference.com/w/cpp/string/basic_string/substr
**File:** modules/objdetect/src/qrcode_encoder.cpp
**Change Type:** added
**Context:** PR #17889: QR code (encoding process) - **Merge with extra**: https://github.com/opencv/opencv_extra/pull/807 [ISO standard](https://github.com/yansik...

**Code Changes:**
```diff
@@ -0,0 +1,1265 @@
+// This file is part of OpenCV project.
+// It is subject to the license terms in the LICENSE file found in the top-level directory
+// of this distribution and at http://opencv.org/license.html.
+//
+// Copyright (C) 2021, Intel Corporation, all rights reserved.
+
+#include "precomp.hpp"
+#include "qrcode_encoder_table.inl.hpp"
+namespace cv
```

Review comment:
> EncodingMethods previous; Not used outside of `for` body, so it should be declated inside.