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

IPP 9 ippiFFTGetSize_R_32f function fills pSizeInit as 0.

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
Highlighted
26 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 );

 

0 Kudos
Highlighted
Employee
26 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.

0 Kudos
Highlighted
26 Views

Hi Manoj,

 

please let us know if you are experiencing any problem.

 

thank you.

0 Kudos