I found in the example of Floodfill_Grad page: http://software.intel.com/sites/products/documentation/hpc/ipp/ippi/ippi_ch14/functn_FloodFill_Grad.html
ippiFloodFillGetSize_Grad ( roiSize, &pBufSize ); Ipp8u* pBuffer = ippiMalloc_8u_C1 ( 8, 8, &pBufSize ); ippiFloodFill_Grad4Con_8u_C1IR ( pImage, 8, roiSize, seed, newVal, minDelta, maxDelta, &pRegion, pBuffer );
The pBufSize is calculated by GetSize() function, however it is updated in ippiMalloc function without any use.
From the manual description, the temporary buffer size should be calculated by GetSize and we only need to create a char buff with that size and pass the buff to flood fill function. However, as the example shows, the size returned by GetSize is not used at all. Or I guess the pBufSize is both \param[in, out] for ippiMalloc?
I have tried both ways: 1. the same way as the example shows. 2. I get size with GetSize() and new a char array with this size, and use this char array in Floodfill. It turns out that the 2nd way is about 3 times slower than the 1st way.
Is there any explanation? Or should the manual be updated to reflect about this difference?