Community
cancel
Showing results for 
Search instead for 
Did you mean: 
daven-hughes
Beginner
47 Views

How to deinterlace complex from real data

I need to apply separate functions to real and complex data like so:
for (int i = 1; i < res / 2 + 1; i++) {
output[2 * i] = magnitudes * cosf(phases);
output[2 * i + 1] = magnitudes * sinf(phases);
}

My IPP code looks like this (+1s are due to CCS format):
ippsCos_32f_A11(phases + 1, phaseCos + 1, res / 2);
ippsSin_32f_A11(phases + 1, phaseSin + 1, res / 2);

// deinterlace CCS format data output into real[] and imag[] arrays (?)
ippsMul_32f_A24(phaseCos + 1, magnitudes + 1, real, res / 2);
ippsMul_32f_A24(phaseSin + 1, magnitudes + 1, imag, res / 2);

To my knowledge there are no FFT formats that pack data into contiguous real and imaginary parts. Thanks
0 Kudos
3 Replies
daven-hughes
Beginner
47 Views

Aha! Just found ippsCplxToReal_32fc. Guess I used poor search keywords.
debasish_deka
Beginner
47 Views

These IPPs are really having bad sense of Grammar. For instance ippsRealToCplx_32f should mean it converts real numbers to complex whereas it does just the opposite - it is converting Complex to real. Just nuts !! what say ?

SergeyKostrov
Valued Contributor II
47 Views

>>...How to deinterlace complex from real data... There are two functions in DSP domain of IPP and here are short descriptions from ipps.h header file: ippsCplxToReal - form the real and imaginary parts of the input complex vector and ippsRealToCplx - form complex vector from the real and imaginary components and, as you can see, ippsRealToCplx needs to be used in your case.
Reply