Community
cancel
Showing results for 
Search instead for 
Did you mean: 
navinmath
Beginner
209 Views

Samples for FFT and DFT in IPP library

Hi

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.
Thanks
Navin
0 Kudos
2 Replies
Ying_H_Intel
Employee
209 Views

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_
RToCCS_32f.
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 = (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;
}
Output:
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)

2) http://software.intel.com/en-us/articles/intel-integrated-performance-primitives-intel-ipp-intel-ipp...
DFT.cpp


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,
Ying
Royi
Novice
209 Views

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

The one in the documentation yields wrong results.

Reply