stv014
Headphoneus Supremus
- Joined
- Jul 17, 2011
- Posts
- 3,493
- Likes
- 273
Quote:
I think the problem may be that I tested with a stereo track, and Audacity (at least in the version I have) reuses the same Dither object for both channels. This is not an issue for the simple uniform dither, but in the triangle mode makes the colored noise white (because each channel has only the even or odd samples of the same differentiated noise signal), and it completely breaks the noise shaping mode. With a mono test track, it works correctly.
@germanium: here is a short summary of why TPDF has an unweighted SNR of 93.3 dB relative to a 0 dBFS sine wave:
- TPDF dithering adds triangular distribution noise of a peak to peak amplitude of 2 (-1 to +1) to the signal before quantization
- this is sufficient to make the quantization error uncorrelated to the original signal (i.e. only noise, no distortion)
- with triangular distribution, there is 25% chance that the random value is in the range 0.5 to 1, and 75% that it is in the range 0 to 0.5. Therefore, with no input signal, on average 6 out of 8 output samples will be zero, one +1, and one -1
- the RMS of the quantization noise is sqrt(1 / 4) = 0.5
- the RMS of a full scale sine wave is 32767 / sqrt(2)
- the SNR is (32767 / sqrt(2)) / 0.5 = 65534 / sqrt(2) = 46339.54 = 93.32 dB
With A weighting, it is better by a few dB, depending on how the noise is generated (see above).
Originally Posted by jcx /img/forum/go_quote.gif
code snippet - though I'm not certain which version: http://code.google.com/p/audacity/source/browse/audacity-src/trunk/src/Dither.cpp?spec=svn11480&r=11480
I think the problem may be that I tested with a stereo track, and Audacity (at least in the version I have) reuses the same Dither object for both channels. This is not an issue for the simple uniform dither, but in the triangle mode makes the colored noise white (because each channel has only the even or odd samples of the same differentiated noise signal), and it completely breaks the noise shaping mode. With a mono test track, it works correctly.
@germanium: here is a short summary of why TPDF has an unweighted SNR of 93.3 dB relative to a 0 dBFS sine wave:
- TPDF dithering adds triangular distribution noise of a peak to peak amplitude of 2 (-1 to +1) to the signal before quantization
- this is sufficient to make the quantization error uncorrelated to the original signal (i.e. only noise, no distortion)
- with triangular distribution, there is 25% chance that the random value is in the range 0.5 to 1, and 75% that it is in the range 0 to 0.5. Therefore, with no input signal, on average 6 out of 8 output samples will be zero, one +1, and one -1
- the RMS of the quantization noise is sqrt(1 / 4) = 0.5
- the RMS of a full scale sine wave is 32767 / sqrt(2)
- the SNR is (32767 / sqrt(2)) / 0.5 = 65534 / sqrt(2) = 46339.54 = 93.32 dB
With A weighting, it is better by a few dB, depending on how the noise is generated (see above).