Intel® Integrated Performance Primitives
Community support and discussions relating to developing high-performance vision, signal, security, and storage applications.
6645 Discussions

IPP 9 ippiFFTGetSize_R_32f function fills pSizeInit as 0.

manoj_r_
Beginner
233 Views

Hello,

I am using ippiFFTGetSize_R_32f function from IPP 9 as below in my application

int bufferSize = 0;
int pSizeInit = 0;
int pSizeSpec = 0;
IppStatus ippStat  = ippiFFTGetSize_R_32f( filterOrder(this->width) , filterOrder(this->height), IPP_FFT_DIV_INV_BY_N, ippAlgHintNone, 
&pSizeSpec, &pSizeInit, &bufferSize);
 
Status returned is No error but pSizeInit is 0, for others(pSizeSpec,bufferSize) the values are non-zero.They have valid values.
 
Please let me know if usage is correct and why pSizeInit is 0.  
 
 
 
Thanks,
Manoj
0 Kudos
3 Replies
Jonghak_K_Intel
Employee
233 Views

Hi Manoj,

 

 would you mind following this example ?

 

/// get sizes for required buffers
 ippiFFTGetSize_R_32f( orderX, orderY, IPP_FFT_DIV_INV_BY_N, ippAlgHintNone, &sizeSpec,
&sizeInit, &sizeBuffer );
 /// allocate memory for required buffers
 pMemSpec = (IppiFFTSpec_R_32f*) ippMalloc ( sizeSpec );
 if ( sizeInit > 0 )
 {
 pMemInit = ippMalloc ( sizeInit );
 }
 if ( sizeBuffer > 0 )
 {
 pMemBuffer = ippMalloc ( sizeBuffer );
 }
 /// initialize FFT specification structure
 ippiFFTInit_R_32f( orderX, orderY, IPP_FFT_DIV_INV_BY_N, ippAlgHintNone, pMemSpec, pMemInit );
 /// free initialization buffer
 if ( sizeInit > 0 )
 {
 ippFree( pMemInit );
 }
 /// perform forward FFT to put source data to frequency domain
 ippiFFTFwd_RToPack_32f_C1R( pSrc, srcStep, pDst, dstStep, pMemSpec, pMemBuffer );
 /// ...
 /// free buffers
 if ( sizeBuffer > 0 )
 {
 ippFree( pMemBuffer );
 }
 ippFree( pMemSpec );

 

Igor_A_Intel
Employee
233 Views

Hi Manoj,

for rather small FFT orders the temporal buffer for FFT initialization is not required (static pre-calculated tables are used) - therefore there is some internal criterion for this, that depends on cpu: if(order <= MAX_ORDER_CFFT_CORE) *pSizeInit = 0;

It's normal situation for ippFFT.

regards, Igor.

Jonghak_K_Intel
Employee
233 Views

Hi Manoj,

 

please let us know if you are experiencing any problem.

 

thank you.

Reply