Samples for FFT and DFT in IPP library

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.ThanksNavin

2 posts / novo 0
Último post
Para obter mais informações sobre otimizações de compiladores, consulte Aviso sobre otimizações.

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[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;
}
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-source-code-examples/
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

Faça login para deixar um comentário.