Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Andrew
Beginner
65 Views

ippiMean_StdDev_8u_C3CMR problem

Hello,

I recently upgraded to 5.3 update 2 version and nowippiMean_StdDev_8u_C3CMR function crashes with access violation.

This happens if the mask image is NOT allocated by ippiMalloc. It is strange since all the other versions of the function work fine with a simple malloc.

Here is the code that crashes:

const

int width = 225;

const int height = 230;

IppiSize roiSize;

roiSize.width = width;

roiSize.height = height;

int maskStep = width;

Ipp8u* pMask = (Ipp8u*)malloc( maskStep * height * sizeof(Ipp8u));

Ipp8u* pImage = (Ipp8u*)malloc( width * height * 3 * sizeof(Ipp8u));

memset ( pMask, 255, maskStep * height );

memset( pImage, 255, width * height * 3);

Ipp64f mean = 0;

Ipp64f std = 0;

ippiMean_StdDev_8u_C3CMR( pImage,3*width, pMask, maskStep, roiSize, 1, &mean, &std);

free( pMask );

free(pImage );

This is the code that works fine:

const int width = 225;

const int height = 230;

IppiSize roiSize;

roiSize.width = width;

roiSize.height = height;

int maskStep = 0;

Ipp8u* pMask = (Ipp8u*) ippiMalloc_8u_C1( width, height, &maskStep );

Ipp8u* pImage = (Ipp8u*)malloc( width * height * 3 * sizeof(Ipp8u));

memset( pMask, 255, maskStep * height );

memset( pImage, 255, width * height * 3);

Ipp64f mean = 0;

Ipp64f std = 0;

ippiMean_StdDev_8u_C3CMR( pImage,3*width, pMask, maskStep, roiSize, 1, &mean, &std);

ippiFree(pMask);

free(pImage);

Is this behavior by design ( must use ippiMalloc ) and if it is why all the other functions are working just fine with malloc?

Thanks,

Mircea Ionescu

Scientific Programmer

Systems Pathology Company, LLC

0 Kudos
2 Replies
Andrew
Beginner
65 Views

I forgot to mention that I use use Microsoft Visual Studio 2005 SP1.

Thanks,

Mircea

Vladimir_Dudnik
Employee
65 Views

Hello Mircea,

thanks for reporting this. We confirm that there is a bug in optimized version of function which will be fixed in IPP 5.3 update 4 coming sometime later in this year.

Regards,
Vladimir

Reply