Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.

ippsResamplePolyphase

brian_barber
Beginner
521 Views
Hi,
The samples focus on using ippsResamplePolyphase with mono audio. How do you use it with stereo? A snippet would be great.
Thanks,
Brian
0 Kudos
8 Replies
Intel_C_Intel
Employee
521 Views
Hi, Brian,
You can nowapply polyphase resampling channel-wise (create two ResamplePolyphase structures, split stereo signal to two mono signals, resample them separately and then combine results to the stereo signal)
If the need in stereo resampling and performance requirements are important you can submit IPP feature request to premier.intel.com site.
Thanks,
Alexander
0 Kudos
brian_barber
Beginner
521 Views
Are there intel primitive functions that would be more efficient in separating the stereo? This is what I have now.

int separateStereo(short *inputData, int length, short *left, short *right)
{
short* p = (short*) inputData;
if( length <= 0 || length % 2 != 0 || left == NULL || right == NULL || inputData == NULL)
{
return -1;
}

int numSamplesOut = length/2;
int i = 0;
for (int sample = 0; sample < numSamplesOut; ++sample)
{
left[sample] = *p++;
right[sample] = *p++;
}
return numSamplesOut;
}

thanks

0 Kudos
Intel_C_Intel
Employee
521 Views

Brian,

We'll extend IPP resampling example to stereo data in the next release.

Alexander

0 Kudos
Vladimir_Dudnik
Employee
521 Views

Hello,

please take a look on ippsDeinterleave_16s (counterpart is ippsInterleave) function. It is defined in ippac.h file (ippac library - audio coding domain)

Regards,
Vladimir

0 Kudos
brian_barber
Beginner
521 Views

Hi,

Thanks for the tip. I replaced my routines with ippsDeinterleave_16s and ippsInterleave_16s. I found ippsDeinterleave_16s to be very slow. It's about 3 times slower than the separateStereo routine I posted and more than 10x slower than ippsInterleave_16s. Have you seen this? Any ideas?

My test program just interleaves/deinterleaves blank memory allocated using ippsMalloc_16s.

I'm using Package ID: w_ipp_ia32_p_5.0.023

Brian

0 Kudos
klend
Beginner
521 Views
Brian,

It's not uncommon -though a bit incorrect- to treat an interleaved stereo signal as a mono signal of twice the frequency and resample that. This might help you in speed and maybe in a signal that is accoustically acceptible for your use.

Hope this helps
Hendrik
0 Kudos
Vladimir_Dudnik
Employee
521 Views

Hello Brian,

when you are talking about performance it is also important to notice what operating system and hardware platform was used. Well, I've looked at performance data we provide with IPP (please find them in IPP oolsperfsysdata folder) and found that there was a performance issue in IPP v5.0 for T7 libraries (P4 SSE3specific code). As you can see, ippsDeinterleave_16sW7 code (P4, SSE2 specific code) takes 1.4 cpu clock per element for 2048 elements array but T7 code take 12 clock per element. This issue was fixed in IPP v5.1 (0.99 clock per element for T7 code) so I recommend you to renew IPP libraries. We are constantly work on improvement of both functionality and performance.

Regards,
Vladimir

0 Kudos
brian_barber
Beginner
521 Views
I'll give it a shot.
Thanks
0 Kudos
Reply