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

From: Stefan Westerfeld <stefan@email-addr-hidden>
Date: Thu Mar 30 2006 - 14:51:26 EEST

   Hi!

On Thu, Mar 30, 2006 at 04:34:43PM +1000, Erik de Castro Lopo wrote:
> torbenh@email-addr-hidden wrote:
>
> > On Wed, Mar 29, 2006 at 11:47:30PM +1000, Erik de Castro Lopo wrote:
> > > Tobias Scharnberg wrote:
> > >
> > > However, please do not use linear resampling; its just too crappy.
> >
> > urgh... i just switched my local copies of alsa_in and _out to linear
> > resampling, because SRC_SINC_FASTEST was eating CPU juice.
>
> Just out of curiosity, what kind of hardware are you running this
> on and what sort of performance would you find acceptable for your
> application. An estimate that provides:
>
> - input and output sample rates
> - samples per second per channel throughput wrt the output rate
>
> would give me the best idea of what you are after.

By the way, if you have a clear idea how to constrain the resampling
process, it should be possible to be quite fast (well, of course it
depends on what fast is) while maintaining good quality. From my recent
work on SSE based resampling code for BEAST:

performance test for factor 2 upsampling using SSE instructions
  (performance will be normalized to upsampler input samples)
  total samples processed = 64000000
  processing_time = 1.268400
  samples / second = 50457270.836486
  which means the resampler can process 1144.16 44100 Hz streams simultaneusly
  or one 44100 Hz stream takes 0.087401 % CPU usage

Note that it is normalized to input rate, not output rate. It would
perform twice as good when normalized to output rate. But it is not an
arbitary-rate upsampler but factor 2 upsampling, and values were
measured on a fast processor (AMD64, 2200 MHz).

Details: http://mail.gnome.org/archives/beast/2006-March/msg00001.html

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.

   Cu... Stefan

-- 
Stefan Westerfeld, Hamburg/Germany, http://space.twc.de/~stefan
Received on Thu Mar 30 16:15:08 2006

This archive was generated by hypermail 2.1.8 : Thu Mar 30 2006 - 16:15:08 EEST