Skip to contentSkip to conversation

alsa-lib "convert" basic OPs (lack rounding and dithering)

DISCUSSION Matthias Andree 1 participant 1 message Sep 26, 2005

lore
Share & tools
lore
#0 lore raw

Hi,

I don't have much time (maintaining other open source software, real life work and all that you are familiar with), but I recently found out Alsa has not managed to deal with proper quantization over the past four years.

My complaint at that time was that Alsa-lib wasn't even rounding, just truncating (>> 8 or & 0xff), let alone dithering.

Rounding is simple to implement (just add 1/2 LSB before truncating) and increases the SNR by roughly 6 dB - which already makes a difference for 8bit output from 16bit input.

Rounding doesn't fix the other problem however: quantization noise correlation to the signal and non-linearity of the truncation.

Dithering, that is, adding a specially shaped low "noise" signal, decorrelates the quantization noise, making it much more unobtrusive, and also makes the whole process linear. No more chirping and sharp clicking interspersed with blackouts of near-silent signals.

This is also filed as alsa - lib bug 001454, the bug report has two book recommendations, for a quick introduction into dithering.

I don't offer to take this project for reasons given in the first paragraph, but I will try to answer questions in this regard.

HTH,

Signature · 8 lines
Matthias Andree


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. 
Download it for free - -and be entered to win a 42" plasma tv or your very
own Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php