Samples for FFT and DFT in IPP library

Samples for FFT and DFT in IPP library

We are evaluating IPP library for audio processing. We could see the FFT functions provided by the this library but didn't find any sample program using those funtions.Could you please point us samples which make use of all the available functions in IPP library.ThanksNavin

3 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Hi Navin,

In general, thereare 3 steps to use IPP FFT or DFT function.
1) Init FFT specification structure
by the functions ippsFFTInitAlloc_R or ippsFTInitAlloc using internalmemory bufferor
the functions ippsFFTInit_R, ippsFFTInit_C. In this case the user must allocate memory for the FFT specification structure
whose size should be computed previously using ippsFFTGetSize_R, ippsFFTGetSize_C functions
2) call FFT function

3) free FFT specification structure.

There are some places you can find IPP sample,
1) IPP manual,

For example,
The code example below shows how to initialize the specification structure and call the function ippsFFTFwd_
IppStatus fft( void ) {
Ipp32f x[8], X[10];
int n;
IppStatus status;
IppsFFTSpec_R_32f* spec;
status = ippsFFTInitAlloc_R_32f(&spec, 3, IPP_FFT_DIV_INV_BY_N,ippAlgHintNone );
for(n=0; n<8; ++n) x[n] = (float)cos(IPP_2PI *n *16/64);
status = ippsFFTFwd_RToCCS_32f( x, X, spec, NULL );
ippsMagnitude_32fc( (Ipp32fc*)X, x, 4 );
ippsFFTFree_R_32f( spec );
printf_32f("fft magn =", x, 4, status );
return status;
fft magn = 0.000000 0.000000 4.000000 0.000000
Matlab* Analog:
>> n=0:7; x=sin(2*pi*n*16/64); X=abs(fft(x)); X(1:4)


3) IPP sample, especially IPP singal processing sample. there you can find almost all FFT/DFT functionsusage sample. Please find more information from Intel IPP sample page.

Best Regards,

Could you show a working example of DFT for 2D images?

The one in the documentation yields wrong results.

Leave a Comment

Please sign in to add a comment. Not a member? Join today