From: Alexander Alekhin Date: Thu, 1 Apr 2021 02:26:59 +0000 (+0000) Subject: cuda: fix inplace condition in cv::cuda::flip X-Git-Tag: submit/tizen/20220120.021815~1^2~1^2~78^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e4b0251e9d1885e2f6665643a8dbc1346ce34327;p=platform%2Fupstream%2Fopencv.git cuda: fix inplace condition in cv::cuda::flip --- diff --git a/modules/cudaarithm/src/core.cpp b/modules/cudaarithm/src/core.cpp index 368c2fcc41..223929881f 100644 --- a/modules/cudaarithm/src/core.cpp +++ b/modules/cudaarithm/src/core.cpp @@ -163,7 +163,7 @@ void cv::cuda::flip(InputArray _src, OutputArray _dst, int flipCode, Stream& str _dst.create(src.size(), src.type()); GpuMat dst = getOutputMat(_dst, src.size(), src.type(), stream); - bool isInplace = (src.data == dst.data) || (src.refcount == dst.refcount); + bool isInplace = (src.data == dst.data); bool isSizeOdd = (src.cols & 1) == 1 || (src.rows & 1) == 1; if (isInplace && isSizeOdd) CV_Error(Error::BadROISize, "In-place version of flip only accepts even width/height");