[Speex-dev] Resampler

Jean-Marc Valin jean-marc.valin at usherbrooke.ca
Wed Mar 14 15:32:12 PDT 2007



Daniel Schmidt a écrit :
> Hello Jean-Marc,
> 
> thank you for your answer!
> 
>> I'll look into this. There's basically no overflow prevention for now.
>> I'll think about how to add that without affecting performance too much
>> (on CPUs that don't have hardware saturation). I'm  open to
>> suggestions :-)
> 
> I'm not sure if I can really help, but I did a few more tests.
> Reducing the volume of the input signal by 6 dB and increasing it
> again afterwards with saturation seems to avoid the overflow even with
> heavy clipping. So using 14 fractional bits internally instead of 15
> and doing the saturation right before converting to the 16 bit output
> sample value could help. But certainly there are more sophisticated
> solutions to this problem. :-)

I'm not too keen on doing that because Q15 is already at the limit of
what I can tolerate in terms of noise.

> During the tests I encountered another problem. While upsampling a
> continuous –6 dB sine from 8000 Hz to 11025 Hz I heard that the
> resampler produces a click every 5 seconds. After changing the output
> sample rate to 11000 Hz the clicking disappeared.

Hmm, interesting. Do you have the sample? Is that only in fixed-point or
in floating-point as well?

	Jean-Marc


More information about the Speex-dev mailing list