Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
42 Views

ippiMalloc_8u_C1 returning wrong dstStep?

Im using ->

ippCore 2019.0.0 Gold (r59881)

On a mac

IppiSize dstSize = { 480, 270 };

Ipp8u* pDst = ippiMalloc_8u_C1(dstSize.width, dstSize.height, &dstStep);

ippiMalloc_8u_C1 returns dstStep=512 resulting in a 32 pixel black border on the right side of the picture.

However 480 is integer dividable by 32 (if that is a requirement to be 32 bytes aligned in the line by line stepping) and forcing dstStep to 480 works for all following processes I use and the black border is gone.

I use the example code ->

https://software.intel.com/en-us/ipp-dev-reference-resizeantialiasing-sample

Am I doing something wrong or is it a bug?

Thanks for helping.

 

/Anders 

0 Kudos
1 Reply
Highlighted
Employee
42 Views

Hi Anders.

IPP functions process images line by line using special SIMD instructions. Unfortunately these instructions have performance penalty when they load block of bytes that cross cache line.  Cache line is 64 byte length. So to try to achieve the better performance it is preferable to align lines of image on 64 byte. Also you can allocate memory using ippsMalloc_8u(dstSize.width*dstSize.height). 

Thanks for your feedback. 

 

0 Kudos