From 939ea4ba30b27541049a182e1fc5e54e07299d1a Mon Sep 17 00:00:00 2001 From: smirnov-alexey Date: Wed, 27 Feb 2019 14:21:11 +0300 Subject: [PATCH] Remove incorrect asserts in NV12 to RGB/BGR kernels --- modules/gapi/include/opencv2/gapi/imgproc.hpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/modules/gapi/include/opencv2/gapi/imgproc.hpp b/modules/gapi/include/opencv2/gapi/imgproc.hpp index 43665ba3ae..db9ac4632c 100644 --- a/modules/gapi/include/opencv2/gapi/imgproc.hpp +++ b/modules/gapi/include/opencv2/gapi/imgproc.hpp @@ -120,8 +120,7 @@ namespace imgproc { GAPI_Assert(in_uv.chan == 2); GAPI_Assert(in_y.depth == CV_8U); GAPI_Assert(in_uv.depth == CV_8U); - GAPI_Assert(in_uv.size.width % 2 == 0); - GAPI_Assert(in_uv.size.height % 2 == 0); + // UV size should be aligned with Y GAPI_Assert(in_y.size.width == 2 * in_uv.size.width); GAPI_Assert(in_y.size.height == 2 * in_uv.size.height); return in_y.withType(CV_8U, 3); // type will be CV_8UC3; @@ -134,8 +133,7 @@ namespace imgproc { GAPI_Assert(in_uv.chan == 2); GAPI_Assert(in_y.depth == CV_8U); GAPI_Assert(in_uv.depth == CV_8U); - GAPI_Assert(in_uv.size.width % 2 == 0); - GAPI_Assert(in_uv.size.height % 2 == 0); + // UV size should be aligned with Y GAPI_Assert(in_y.size.width == 2 * in_uv.size.width); GAPI_Assert(in_y.size.height == 2 * in_uv.size.height); return in_y.withType(CV_8U, 3); // type will be CV_8UC3;