[MPlayer-dev-eng] New resampler implementations?

Ivan Kalvachev ivan at cacad.com
Mon Nov 8 02:47:25 CET 2004


On Fri, 5 Nov 2004 01:03:19 +0100
Dominik 'Rathann' Mierzejewski <dominik at rangers.eu.org> wrote:

> On Thursday, 04 November 2004 at 23:40, Svante Signell wrote:
> > Thank you very much for your input and interest. I was just about to
> > assign this subject to a MSc student and maybe even doing some hacking
> > myself. Of course there are other applications in need for good
> > resampler implementations, both in software and hardware. Lets allocate
> > the resources where interest is.
> 
> Cut the irony level, please. With so much going on lately, the developers
> are up to their necks working (not only on MPlayer). It may take more than
> a week to answer such mails. This one might also have been overlooked,
> given the volume of traffic in this mailing list. I'm no expert on this,
> but I'll try to answer as best as I can.
> 
> > On Fri, 2004-10-29 at 08:05 +0200, Svante Signell wrote:
> > > Hello,
> > > 
> > > Seing the thread '[PATCH] fix for -srate bug' and jumping into that
> > > discussion was maybe not a good idea. Now I'm starting a new thread. 
> 
> BTW: you didn't start a new thread. You just replied within the old one.
> It got lost.
> 
> > > Q1) Is there any interest in alternate implementations of resamplers for
> > > mplayer? If so I would like to try some ideas I have.
> 
> You're of course welcome to submit a patch implementing a new audio filter.
> 
> > > Q2) How does the interface look like in mplayer? Any code example?
> 
> Take a look at any audio filter code. There are some docs in DOCS/tech,
> too.
> 
> > > Q3) Which rate conversions? 44.1kHz to 48 kHz and vice versa?
> 
> Actually any rates should be supported.

It would be even better if you implement and runtime rate change.
currently we do reinitialization of the whole audio system to change
the sample rate (the speed hack).

> 
> > > Q4) Has anybody made an exact, i.e. a rational number conversion?
> 
> Not that I know of.
> 
> > > Q5) Which algorithms are used in libsamplerate, mplayer, lame etc?
> 
> Lavc resampler uses sinc with a Blackman-Nuttall window. MPlayer's - I
> don't know, but look at the code or wait for someone else to answer. Also
> see the recent discussion.
> 


I still haven't read the whole "-srate" thread (threading mail client have its disadvantages too).
Some time ago I wanted to fix the broken af_resample (volume decrease) so I googled for resamplers.

This paper http://www-ccrma.stanford.edu/~jos/resample/ was good one and I think this is the sinc
implementation some people are talking about. The think I liked most are that it also does and 
necessary calculation for optimal quality (aka quantization noise).

I really have no idea have Michael read that paper and does he have create lavc resample with it
in mind. I didn't saw comments about it in the resample2.c source.
I think that he might have read it, as libresample is used as implementation of that thesis.

Oh, why i haven't done it for myself? I'm not really good in audio. If you have an 
descent book about it, with less theory and more practise - I would like to get a copy of it.
(well I could say the same for video processing ...)



Wish You Best
   Ivan Kalvachev
  iive

P.S.

I've reconsidered threatening Michael with shotgun until he documents all the stuff he wrote.
But I still have no idea what to do if he refuse, even then :))




More information about the MPlayer-dev-eng mailing list