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

Merge pull request #9580 from mshabunin:fix-static-6

This commit is contained in:
Alexander Alekhin
2017-09-09 19:31:21 +00:00
41 changed files with 252 additions and 218 deletions
+23 -32
View File
@@ -374,7 +374,7 @@ cvGetMatND( const CvArr* arr, CvMatND* matnd, int* coi )
// returns number of dimensions to iterate.
/*
Checks whether <count> arrays have equal type, sizes (mask is optional array
that needs to have the same size, but 8uC1 or 8sC1 type).
that needs to have the same size, but 8uC1 or 8sC1 type - feature has been disabled).
Returns number of dimensions to iterate through:
0 means that all arrays are continuous,
1 means that all arrays are vectors of continuous arrays etc.
@@ -399,17 +399,16 @@ cvInitNArrayIterator( int count, CvArr** arrs,
if( !iterator )
CV_Error( CV_StsNullPtr, "Iterator pointer is NULL" );
for( i = 0; i <= count; i++ )
if (mask)
CV_Error( CV_StsBadArg, "Iterator with mask is not supported" );
for( i = 0; i < count; i++ )
{
const CvArr* arr = i < count ? arrs[i] : mask;
const CvArr* arr = arrs[i];
CvMatND* hdr;
if( !arr )
{
if( i < count )
CV_Error( CV_StsNullPtr, "Some of required array pointers is NULL" );
break;
}
CV_Error( CV_StsNullPtr, "Some of required array pointers is NULL" );
if( CV_IS_MATND( arr ))
hdr = (CvMatND*)arr;
@@ -429,31 +428,23 @@ cvInitNArrayIterator( int count, CvArr** arrs,
CV_Error( CV_StsUnmatchedSizes,
"Number of dimensions is the same for all arrays" );
if( i < count )
switch( flags & (CV_NO_DEPTH_CHECK|CV_NO_CN_CHECK))
{
switch( flags & (CV_NO_DEPTH_CHECK|CV_NO_CN_CHECK))
{
case 0:
if( !CV_ARE_TYPES_EQ( hdr, hdr0 ))
CV_Error( CV_StsUnmatchedFormats,
"Data type is not the same for all arrays" );
break;
case CV_NO_DEPTH_CHECK:
if( !CV_ARE_CNS_EQ( hdr, hdr0 ))
CV_Error( CV_StsUnmatchedFormats,
"Number of channels is not the same for all arrays" );
break;
case CV_NO_CN_CHECK:
if( !CV_ARE_CNS_EQ( hdr, hdr0 ))
CV_Error( CV_StsUnmatchedFormats,
"Depth is not the same for all arrays" );
break;
}
}
else
{
if( !CV_IS_MASK_ARR( hdr ))
CV_Error( CV_StsBadMask, "Mask should have 8uC1 or 8sC1 data type" );
case 0:
if( !CV_ARE_TYPES_EQ( hdr, hdr0 ))
CV_Error( CV_StsUnmatchedFormats,
"Data type is not the same for all arrays" );
break;
case CV_NO_DEPTH_CHECK:
if( !CV_ARE_CNS_EQ( hdr, hdr0 ))
CV_Error( CV_StsUnmatchedFormats,
"Number of channels is not the same for all arrays" );
break;
case CV_NO_CN_CHECK:
if( !CV_ARE_CNS_EQ( hdr, hdr0 ))
CV_Error( CV_StsUnmatchedFormats,
"Depth is not the same for all arrays" );
break;
}
if( !(flags & CV_NO_SIZE_CHECK) )
+1 -1
View File
@@ -2165,7 +2165,7 @@ bool _InputArray::isContinuous(int i) const
if( k == STD_ARRAY_MAT )
{
const Mat* vv = (const Mat*)obj;
CV_Assert(i < sz.height);
CV_Assert(i > 0 && i < sz.height);
return vv[i].isContinuous();
}
+1 -1
View File
@@ -675,7 +675,7 @@ void RNG::fill( InputOutputArray _mat, int disttype,
const Mat* arrays[] = {&mat, 0};
uchar* ptr;
NAryMatIterator it(arrays, &ptr);
NAryMatIterator it(arrays, &ptr, 1);
int total = (int)it.size, blockSize = std::min((BLOCK_SIZE + cn - 1)/cn, total);
size_t esz = mat.elemSize();
AutoBuffer<double> buf;
+1 -1
View File
@@ -1976,7 +1976,7 @@ public:
// Disable AVX1 since we don't track regressions for it. SSE42 will be used instead
if(cpuFeatures&ippCPUID_AVX && !(cpuFeatures&ippCPUID_AVX2))
ippFeatures &= ~ippCPUID_AVX;
ippFeatures &= ~((Ipp64u)ippCPUID_AVX);
// IPP integrations in OpenCV support only SSE4.2, AVX2 and AVX-512 optimizations.
if(!(