[MPlayer-dev-eng] Resampling

Anders Johansson ajh at atri.curtin.edu.au
Mon Oct 29 14:15:32 CET 2001


Hi,

I get to flame my self. I found a bug (kind of) in the re-sampling
example I submitted. The code can only do up-sampling - I have started
to work on a version that can do both up and down sampling. I will
publish it when it works, so I guess the ones stuck with old sound
cards that only can do 44.1kHz will have to wait... sorry. The bug is
mathematical- the code actually does a pitch shift when it does
up-sampling (it also creates a lot of aliasing), kind of funny I
guess.

I have also started to look at different methods to design the filter
parameters. If you have been playing around with my example you might
have noticed that it reduces the amplitude by 2. This is necessary in
order to deal with impulsive sounds (they cause overshoot). I will try
to design filters that don't have this drawback. Fixing this will also
reduce the quantisation error caused by the fix-point implementation,
and hence the noise in the filters. I will also try to optimise the
filter length such that the output frequency comes closer to it's
optimum for the most common input-output frequency pairs.

I will be more careful in the future,
//Anders

> > > Here it comes, have a look and flame me :)
> > 
> > THanks, i had a quick look at it.
> > Using a FIR is an intresting idea. Adding this to
> > mplayer shouldnt be that hard, biggest prob is that
> > your code expects to be able to read when ever it
> > needs new data, but mplayer pushes new data into the
> > audio subsystem when it gets it.
> 
> I'll ad dit to mplayer. It needs a big rewrite anyway, but
> I see how it works and I'll use your tables.
> 
> 
> A'rpi / Astral & ESP-team
> 



More information about the MPlayer-dev-eng mailing list