[linux-audio-dev] linear resampling is crap ? (was: fast linear resampling on ARM - suggestions?)

Stefan Westerfeld stefan at space.twc.de
Thu Mar 30 16:16:16 UTC 2006


   Hi!

On Thu, Mar 30, 2006 at 07:48:02PM +1000, Erik de Castro Lopo wrote:
> Stefan Westerfeld wrote:
> 
> > Measuring the same example with libsamplerate with SRC_SINC_FASTEST
> > gives a throughput of 1233140 samples/second, which means that my code
> > is about 41 times faster.
> 
> Are you comparing apples to apples here?

No, I am not. I just wanted to say that if you can constrain your
resampler and need not to be as generic as libsamplerate, then you can
be a lot faster.

> What is the bandwidth of your resampler?

I think its hard to compare my filter directly to one of your quality
settings (or bandwidth). The reason is that I am using a halfband
filter, which means that the filter is at -6dB at the nyquist frequency,
so it produces some aliasing for very high frequencies, which I assumed
to be not or barely audible.

But here are a few numbers, which are - if I understood your comments in
the source right - normalized to your normalization (0..2):

 -3dB attenuation at 0.975
-96dB attenuation at 1.184

And here is a frequency plot of the filter made with gnuplot:

http://space.twc.de/~stefan/kde/download/us32_resample_filter.png

> From the comments in the code it seems that your resampler is not an 
> abritrary resampler like mine but an 2 times upsampler. Its not really
> a fair comparison to compare a general time varying resampler like
> mine to a 2 times upsampler.

Yes. And the results don't mean that libsamplerate performs bad for what
it does. They just mean that if you don't need a general time varying
resampler, you can produce a more efficient implementation.

   Cu... Stefan
-- 
Stefan Westerfeld, Hamburg/Germany, http://space.twc.de/~stefan



More information about the Linux-audio-dev mailing list