Intel® Integrated Performance Primitives
Community support and discussions relating to developing high-performance vision, signal, security, and storage applications.
Announcements
This community is designed for sharing of public information. Please do not share Intel or third-party confidential information here.

## How to deinterlace complex from real data

Beginner
103 Views
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
3 Replies
Beginner
103 Views
Aha! Just found ippsCplxToReal_32fc. Guess I used poor search keywords.
Beginner
103 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 ?

Valued Contributor II
103 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.