- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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 );
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Manoj,
please let us know if you are experiencing any problem.
thank you.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page