From 83e681334598087e60e34e4278e375010d2a3eb5 Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Thu, 16 Jul 2020 20:01:44 +0000 Subject: [PATCH 1/2] imgproc: add missing check into cvtColorTwoPlane() --- modules/imgproc/src/color_yuv.dispatch.cpp | 2 ++ modules/imgproc/test/test_color.cpp | 17 +++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/modules/imgproc/src/color_yuv.dispatch.cpp b/modules/imgproc/src/color_yuv.dispatch.cpp index 6cb508f980..18b2096680 100644 --- a/modules/imgproc/src/color_yuv.dispatch.cpp +++ b/modules/imgproc/src/color_yuv.dispatch.cpp @@ -406,6 +406,8 @@ void cvtColorTwoPlaneYUV2BGRpair( InputArray _ysrc, InputArray _uvsrc, OutputArr Mat ysrc = _ysrc.getMat(), uvsrc = _uvsrc.getMat(); + CV_CheckEQ(ysrc.step, uvsrc.step, ""); + _dst.create( ysz, CV_MAKETYPE(depth, dcn)); Mat dst = _dst.getMat(); diff --git a/modules/imgproc/test/test_color.cpp b/modules/imgproc/test/test_color.cpp index e1fb21bd40..450cf57923 100644 --- a/modules/imgproc/test/test_color.cpp +++ b/modules/imgproc/test/test_color.cpp @@ -3072,4 +3072,21 @@ TEST(ImgProc_RGB2YUV, regression_13668) EXPECT_EQ(res, ref); } +TEST(ImgProc_cvtColorTwoPlane, missing_check_17036) // test can be removed if required feature is implemented +{ + std::vector y_data(700 * 480); + std::vector uv_data(640 * 240); + + Mat y_plane_padding(480, 640, CV_8UC1, y_data.data(), 700); // with stride + Mat uv_plane(240, 320, CV_8UC2, uv_data.data()); + + Mat result; + + EXPECT_THROW( + cvtColorTwoPlane(y_plane_padding, uv_plane, result, COLOR_YUV2RGB_NV21); + , cv::Exception + ); +} + + }} // namespace From e8d4259f9ab787b512b9aa1203fc816fb9f19231 Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Fri, 17 Jul 2020 00:34:46 +0000 Subject: [PATCH 2/2] release: OpenCV 3.4.11 --- modules/core/include/opencv2/core/version.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/core/include/opencv2/core/version.hpp b/modules/core/include/opencv2/core/version.hpp index e577fab5bc..81d0f3c443 100644 --- a/modules/core/include/opencv2/core/version.hpp +++ b/modules/core/include/opencv2/core/version.hpp @@ -8,7 +8,7 @@ #define CV_VERSION_MAJOR 3 #define CV_VERSION_MINOR 4 #define CV_VERSION_REVISION 11 -#define CV_VERSION_STATUS "-pre" +#define CV_VERSION_STATUS "" #define CVAUX_STR_EXP(__A) #__A #define CVAUX_STR(__A) CVAUX_STR_EXP(__A)