Merge pull request #3094 from Adil-Ibragimov:minor_fixes_in_Mat-data

This commit is contained in:
Vadim Pisarevsky
2014-08-13 18:28:51 +00:00
134 changed files with 988 additions and 986 deletions

View File

@@ -741,25 +741,25 @@ void flip( InputArray _src, OutputArray _dst, int flip_mode )
if (ippFunc != 0)
{
if (ippFunc(src.data, (int)src.step, dst.data, (int)dst.step, ippiSize(src.cols, src.rows), axis) >= 0)
if (ippFunc(src.ptr(), (int)src.step, dst.ptr(), (int)dst.step, ippiSize(src.cols, src.rows), axis) >= 0)
return;
setIppErrorStatus();
}
else if (ippFuncI != 0)
{
if (ippFuncI(dst.data, (int)dst.step, roisize, axis) >= 0)
if (ippFuncI(dst.ptr(), (int)dst.step, roisize, axis) >= 0)
return;
setIppErrorStatus();
}
#endif
if( flip_mode <= 0 )
flipVert( src.data, src.step, dst.data, dst.step, src.size(), esz );
flipVert( src.ptr(), src.step, dst.ptr(), dst.step, src.size(), esz );
else
flipHoriz( src.data, src.step, dst.data, dst.step, src.size(), esz );
flipHoriz( src.ptr(), src.step, dst.ptr(), dst.step, src.size(), esz );
if( flip_mode < 0 )
flipHoriz( dst.data, dst.step, dst.data, dst.step, dst.size(), esz );
flipHoriz( dst.ptr(), dst.step, dst.ptr(), dst.step, dst.size(), esz );
}
#if defined HAVE_OPENCL && !defined __APPLE__
@@ -814,11 +814,11 @@ void repeat(InputArray _src, int ny, int nx, OutputArray _dst)
for( y = 0; y < ssize.height; y++ )
{
for( x = 0; x < dsize.width; x += ssize.width )
memcpy( dst.data + y*dst.step + x, src.data + y*src.step, ssize.width );
memcpy( dst.ptr(y) + x, src.ptr(y), ssize.width );
}
for( ; y < dsize.height; y++ )
memcpy( dst.data + y*dst.step, dst.data + (y - ssize.height)*dst.step, dsize.width );
memcpy( dst.ptr(y), dst.ptr(y - ssize.height), dsize.width );
}
Mat repeat(const Mat& src, int ny, int nx)
@@ -1220,8 +1220,8 @@ void cv::copyMakeBorder( InputArray _src, OutputArray _dst, int top, int bottom,
#endif
if( borderType != BORDER_CONSTANT )
copyMakeBorder_8u( src.data, src.step, src.size(),
dst.data, dst.step, dst.size(),
copyMakeBorder_8u( src.ptr(), src.step, src.size(),
dst.ptr(), dst.step, dst.size(),
top, left, (int)src.elemSize(), borderType );
else
{
@@ -1233,8 +1233,8 @@ void cv::copyMakeBorder( InputArray _src, OutputArray _dst, int top, int bottom,
cn1 = 1;
}
scalarToRawData(value, buf, CV_MAKETYPE(src.depth(), cn1), cn);
copyMakeConstBorder_8u( src.data, src.step, src.size(),
dst.data, dst.step, dst.size(),
copyMakeConstBorder_8u( src.ptr(), src.step, src.size(),
dst.ptr(), dst.step, dst.size(),
top, left, (int)src.elemSize(), (uchar*)(double*)buf );
}
}