1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 15:53:03 +04:00

Fix GpuMat to correctly calculate dataend when using GpuMat::create().

Add output to createMat() to be used by locateROI test cases.
This commit is contained in:
cudawarped
2022-02-02 14:25:46 +00:00
parent 415a42f327
commit f66a2ffa1e
3 changed files with 13 additions and 8 deletions
+1 -4
View File
@@ -184,11 +184,8 @@ void cv::cuda::GpuMat::create(int _rows, int _cols, int _type)
if (esz * cols == step)
flags |= Mat::CONTINUOUS_FLAG;
int64 _nettosize = static_cast<int64>(step) * rows;
size_t nettosize = static_cast<size_t>(_nettosize);
datastart = data;
dataend = data + nettosize;
dataend = data + step * (rows - 1) + cols * esz;
if (refcount)
*refcount = 1;