@@ -4384,11 +4384,10 @@ static bool ipp_sortIdx( const Mat& src, Mat& dst, int flags )
4384
4384
{
4385
4385
CV_INSTRUMENT_REGION_IPP ()
4386
4386
4387
- bool sortRows = (flags & 1 ) == CV_SORT_EVERY_ROW ;
4388
- bool sortDescending = (flags & CV_SORT_DESCENDING ) != 0 ;
4387
+ bool sortRows = (flags & 1 ) == SORT_EVERY_ROW ;
4388
+ bool sortDescending = (flags & SORT_DESCENDING ) != 0 ;
4389
4389
int depth = src.depth ();
4390
4390
IppDataType type = ippiGetDataType (depth);
4391
- Ipp32s elemSize = (Ipp32s)src.elemSize1 ();
4392
4391
4393
4392
IppSortIndexFunc ippsSortRadixIndex = getSortIndexFunc (depth, sortDescending);
4394
4393
if (!ippsSortRadixIndex)
@@ -4405,7 +4404,7 @@ static bool ipp_sortIdx( const Mat& src, Mat& dst, int flags )
4405
4404
4406
4405
for (int i = 0 ; i < src.rows ; i++)
4407
4406
{
4408
- if (CV_INSTRUMENT_FUN_IPP (ippsSortRadixIndex, (void *)src.ptr (i), elemSize , (Ipp32s*)dst.ptr (i), src.cols , buffer) < 0 )
4407
+ if (CV_INSTRUMENT_FUN_IPP (ippsSortRadixIndex, (const void *)src.ptr (i), (Ipp32s)src. step [ 1 ] , (Ipp32s*)dst.ptr (i), src.cols , buffer) < 0 )
4409
4408
return false ;
4410
4409
}
4411
4410
}
@@ -4422,13 +4421,13 @@ static bool ipp_sortIdx( const Mat& src, Mat& dst, int flags )
4422
4421
4423
4422
buffer.allocate (bufferSize);
4424
4423
4425
- Ipp32s pixStride = elemSize*dst. cols ;
4424
+ Ipp32s srcStep = (Ipp32s)src. step [ 0 ] ;
4426
4425
for (int i = 0 ; i < src.cols ; i++)
4427
4426
{
4428
4427
subRect.x = i;
4429
4428
dstSub = Mat (dst, subRect);
4430
4429
4431
- if (CV_INSTRUMENT_FUN_IPP (ippsSortRadixIndex, (void *)src.ptr (0 , i), pixStride , (Ipp32s*)dstRow.ptr (), src.rows , buffer) < 0 )
4430
+ if (CV_INSTRUMENT_FUN_IPP (ippsSortRadixIndex, (const void *)src.ptr (0 , i), srcStep , (Ipp32s*)dstRow.ptr (), src.rows , buffer) < 0 )
4432
4431
return false ;
4433
4432
4434
4433
dstRow = dstRow.reshape (1 , dstSub.rows );
0 commit comments