- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Brian,
We'll extend IPP resampling example to stereo data in the next release.
Alexander
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page