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

opencv: Use cv::AutoBuffer<>::data()

This commit is contained in:
Alexander Alekhin
2018-06-10 22:42:00 +00:00
committed by Alexander Alekhin
parent 135ea264ef
commit b09a4a98d4
90 changed files with 333 additions and 339 deletions
+3 -3
View File
@@ -104,7 +104,7 @@ void cv::mixChannels( const Mat* src, size_t nsrcs, Mat* dst, size_t ndsts, cons
int depth = dst[0].depth();
AutoBuffer<uchar> buf((nsrcs + ndsts + 1)*(sizeof(Mat*) + sizeof(uchar*)) + npairs*(sizeof(uchar*)*2 + sizeof(int)*6));
const Mat** arrays = (const Mat**)(uchar*)buf;
const Mat** arrays = (const Mat**)(uchar*)buf.data();
uchar** ptrs = (uchar**)(arrays + nsrcs + ndsts);
const uchar** srcs = (const uchar**)(ptrs + nsrcs + ndsts + 1);
uchar** dsts = (uchar**)(srcs + npairs);
@@ -294,7 +294,7 @@ void cv::mixChannels(InputArrayOfArrays src, InputOutputArrayOfArrays dst,
CV_Assert(nsrc > 0 && ndst > 0);
cv::AutoBuffer<Mat> _buf(nsrc + ndst);
Mat* buf = _buf;
Mat* buf = _buf.data();
for( i = 0; i < nsrc; i++ )
buf[i] = src.getMat(src_is_mat ? -1 : i);
for( i = 0; i < ndst; i++ )
@@ -327,7 +327,7 @@ void cv::mixChannels(InputArrayOfArrays src, InputOutputArrayOfArrays dst,
CV_Assert(fromTo.size()%2 == 0 && nsrc > 0 && ndst > 0);
cv::AutoBuffer<Mat> _buf(nsrc + ndst);
Mat* buf = _buf;
Mat* buf = _buf.data();
for( i = 0; i < nsrc; i++ )
buf[i] = src.getMat(src_is_mat ? -1 : i);
for( i = 0; i < ndst; i++ )