> Date: Sun, 02 Apr 2000 18:23:32 +0100
> From: Scott Manley <[EMAIL PROTECTED]>
> 
> OK.. having found a load of mp3's that sound bad when I conveted the sample 
> rate from 44100 -> 16000 (the artifacts were like scratches and clicks... not 
> nice) I' took a look at the way lame is downsampling.
> 
> In fill_buffer_resample() it's basically interpolating using either a linear 
> or cubic polynomial, this is fine for going from a low frequency to a high 
> frequency. Of course... I could b completely mistaken - feel free to call me 
> an idiot if that's not what's happening.  Anyway - the problem with this is 
> that the algorithm is reflecting high frequencies into the audible spectrum, 
> if you downsample using interpolation then you need to do the lowpass filter 
> *before* you resample, since you can't remove the reflected frequencies once 
> they've been bounced into the Low frequency regime.
> 
> OK.. I'm too lazy to do this... so here';s my quick hack which sounds a lot 
> better - but will probably have teh DSP people up in arms at how stupid it is.
> 

After talking to Scott quite a bit about this in #mp3encoder, (and not
wanting to upset the DSP people out there) - I have finally added a
not-terrible resample routine to LAME.  Each output sample is the result of
convolution of the original data with a 19 points Blackman window FIR
filter.  It's in CVS now.  

If the resample rate is exactly 1/2 or 1/4 of the input rate, it is
not so slow, but for arbritrary resampling it is very slow.  Quality
is much better for cases with low mp3 compresson (where lame
does not do any lowpass filtering) like 32kbs/16khz.  
Quality not much improved for cases like 24kbs/24khz, where lame
does a lot of lowpass filtering which removes most of the aliasing
caused by bad resampling)

Mark







--
MP3 ENCODER mailing list ( http://geek.rcc.se/mp3encoder/ )

Reply via email to