1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 15:23:05 +04:00

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

This commit is contained in:
Alexander Alekhin
2018-05-21 16:20:14 +03:00
117 changed files with 4451 additions and 1135 deletions
@@ -305,6 +305,9 @@ public:
//! returns true if GpuMat data is NULL
bool empty() const;
//! internal use method: updates the continuity flag
void updateContinuityFlag();
/*! includes several bit-fields:
- the magic signature
- continuity flag
@@ -2084,6 +2084,9 @@ public:
static MatAllocator* getDefaultAllocator();
static void setDefaultAllocator(MatAllocator* allocator);
//! internal use method: updates the continuity flag
void updateContinuityFlag();
//! interaction with UMat
UMatData* u;
@@ -2551,6 +2554,9 @@ public:
//! and the standard allocator
static MatAllocator* getStdAllocator();
//! internal use method: updates the continuity flag
void updateContinuityFlag();
// black-box container of UMat data
UMatData* u;
@@ -495,24 +495,20 @@ Mat::Mat(int _rows, int _cols, int _type, void* _data, size_t _step)
if( _step == AUTO_STEP )
{
_step = minstep;
flags |= CONTINUOUS_FLAG;
}
else
{
CV_DbgAssert( _step >= minstep );
if (_step % esz1 != 0)
{
CV_Error(Error::BadStep, "Step must be a multiple of esz1");
}
if (_step == minstep || rows == 1)
flags |= CONTINUOUS_FLAG;
}
step[0] = _step;
step[1] = esz;
datalimit = datastart + _step * rows;
dataend = datalimit - _step + minstep;
updateContinuityFlag();
}
inline
@@ -528,7 +524,6 @@ Mat::Mat(Size _sz, int _type, void* _data, size_t _step)
if( _step == AUTO_STEP )
{
_step = minstep;
flags |= CONTINUOUS_FLAG;
}
else
{
@@ -538,14 +533,12 @@ Mat::Mat(Size _sz, int _type, void* _data, size_t _step)
{
CV_Error(Error::BadStep, "Step must be a multiple of esz1");
}
if (_step == minstep || rows == 1)
flags |= CONTINUOUS_FLAG;
}
step[0] = _step;
step[1] = esz;
datalimit = datastart + _step*rows;
dataend = datalimit - _step + minstep;
updateContinuityFlag();
}
template<typename _Tp> inline
@@ -152,7 +152,7 @@ namespace cv { namespace cuda
inline ~NppStreamHandler()
{
nppSetStream(oldStream);
cudaStreamSynchronize(oldStream);
}
private: