Merge remote-tracking branch 'upstream/3.4' into merge-3.4

pull/17875/head
Alexander Alekhin 4 years ago
commit a199d7adf1
  1. 2
      modules/imgproc/src/color_yuv.dispatch.cpp
  2. 17
      modules/imgproc/test/test_color.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();

@ -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<uchar> y_data(700 * 480);
std::vector<uchar> 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

Loading…
Cancel
Save