DSPRelated.com
Forums

Dithering for

Started by Yazz December 1, 2006
Steve Underwood wrote:
> John Monro wrote: >> This brings me to my main point. Is dithering have any other use >> apart from improving the test-signal results? It seems to me that >> dithering does not provide any benefit at all when 'real-life' audio >> or video signals are being sampled, and I would be interested if >> anyone disagrees with this. > >> My argument is that real-life signals are neither constant-amplitude >> nor constant-frequency nor repetitive. This should mean that the >> quantisation noise will not be repetitive either. As a result, any >> 'spurs' which occur will be highly transient and are will not be >> perceived as tones in audio signals or patterns in video signals. In >> effect, when real-life signals are sampled, the non-repetitive nature >> of signals should suppress the production of spurs in exactly the same >> way that dithering suppresses spurs when test signals are sampled. > > I think most serious signal processing people would massively disagree > with the notion than dithering only improves artificial things, and it > isn't just about audio or video. > > Sure, dithering gets oversold in a lot of cases. Processing what is > essentially a single shot event isn't going to be improved by dithering. > Most signals are, however, somewhere between single shot and totally > repetitive. The more repetitive they are, the more they gain from > dithering. > > Many real world signals are extremely repetitive. I have greatly > improved performance in energy metering through dithering. Power > waveforms change rather slowly in the real world, and you get almost > 100% of the possible benefit dithering could give.
Years ago, when an 80106 was state of the art, AD built a data acquisition system (programmed in some awful dialect of BASIC) around one. There was one A/D on the board. One could have either fast 12-bit data, or much slower 16-bit data. the 16-bit data were acquired by averaging 256 fast measurements taken in the presence of dither. I was able to demonstrate that the results were accurate. A problem turned up when the 16-bit accuracy deteriorated. A little poking around showed that the dither generator had failed. With dither fixed, accuracy returned. While dither may not help any one reading, it clearly improves the accuracy of an ensemble of them. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Jerry Avins wrote:


> ... The 16-bit data were acquired by > averaging 256 fast measurements taken in the presence of dither. I was > able to demonstrate that the results were accurate. ...
It was an unusual ADC. While it delivered only 12 bits, it had linearity suitable for a 16-bit unit. To be monotonic, a DAC need have a slicing accuracy only slightly better than +/- 1/2 LSB. This one was +/- 1/8th. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Jerry Avins wrote:
> John Monro wrote: > > ... > >> This brings me to my main point. Is dithering have any other use >> apart from improving the test-signal results? It seems to me that >> dithering does not provide any benefit at all when 'real-life' audio >> or video signals are being sampled, and I would be interested if >> anyone disagrees with this. >> >> My argument is that real-life signals are neither constant-amplitude >> nor constant-frequency nor repetitive. This should mean that the >> quantisation noise will not be repetitive either. As a result, any >> 'spurs' which occur will be highly transient and are will not be >> perceived as tones in audio signals or patterns in video signals. In >> effect, when real-life signals are sampled, the non-repetitive nature >> of signals should suppress the production of spurs in exactly the same >> way that dithering suppresses spurs when test signals are sampled. > > Consider a signal (it might as well be repetitive) with a peak-to-peak > amplitude of 1 LSB. (The question of this signal's shape is without > meaning.) This signal is undetectable in the absence of noise and > dither, but with appropriate dither or fortuitous noise, An FT will show > it clearly. Is that counterexample enough? > > Jerry
Thanks for the counterexample Jerry. Dithering clearly makes the signal detectable, and this has advantages for measurement where multi-sample averaging is carried out. You and Steve refer to this in later postings. The question is: in your counterexample, would dithering lead to a perceived improvement to the quality of the audio signal ? I can't see that it would, because the 0.5-bit amplitude signal which was previously undetected in the absence of dithering now gets sampled as a 1-bit noise signal. This is hardly an improvement! Regards, John
John Monro <johnmonro@optusnet.com.au> writes:
> [...] > This brings me to my main point. Is dithering have any other use > apart from improving the test-signal results? It seems to me that > dithering does not provide any benefit at all when 'real-life' audio > or video signals are being sampled, and I would be interested if > anyone disagrees with this.
With such high resolution converters these days for audio, I think for the most part you're right. But there were some old Windows (95? 3.1?) .wav files that were 8 bits, and failure to dither on those suckers was clearly audible. Also, dithering is about more than removing spurs - it also (with the right distribution) removes noise power modulation. I think this can also be audible, but the likelihood with >= 16 bit converters is probably low. I think you actually may hear the "graininess" in undithered CDs that fade to silence if you've got the volume up pretty loud. And I'm not talking about "gain-riding" the volume as the music fades, but listening at a constant, albeit loud, volume. -- % Randy Yates % "How's life on earth? %% Fuquay-Varina, NC % ... What is it worth?" %%% 919-577-9882 % 'Mission (A World Record)', %%%% <yates@ieee.org> % *A New World Record*, ELO http://home.earthlink.net/~yatescr
Steve Underwood wrote:
> John Monro wrote: >> This brings me to my main point. Is dithering have any other use >> apart from improving the test-signal results? It seems to me that >> dithering does not provide any benefit at all when 'real-life' audio >> or video signals are being sampled, and I would be interested if >> anyone disagrees with this. > >> My argument is that real-life signals are neither constant-amplitude >> nor constant-frequency nor repetitive. This should mean that the >> quantisation noise will not be repetitive either. As a result, any >> 'spurs' which occur will be highly transient and are will not be >> perceived as tones in audio signals or patterns in video signals. In >> effect, when real-life signals are sampled, the non-repetitive nature >> of signals should suppress the production of spurs in exactly the same >> way that dithering suppresses spurs when test signals are sampled. > > I think most serious signal processing people would massively disagree > with the notion than dithering only improves artificial things, and it > isn't just about audio or video. > > Sure, dithering gets oversold in a lot of cases. Processing what is > essentially a single shot event isn't going to be improved by dithering. > Most signals are, however, somewhere between single shot and totally > repetitive. The more repetitive they are, the more they gain from > dithering. > > Many real world signals are extremely repetitive. I have greatly > improved performance in energy metering through dithering. Power > waveforms change rather slowly in the real world, and you get almost > 100% of the possible benefit dithering could give. > > Regards, > Steve >
Thanks Steve. I take your point about measuring highly repetitive signals. I was not thinking about this situation, which has some of the characteristics of the 'test-signal' I mentioned but is if course a real-life application. I was thinking more in terms of audio or video signals, and in the perceived quality of the sound or picture. To re-state the question, does anyone disagree with the following statement? "For 'real-life' audio or video signals, adding dithering to the sampling process does not make any perceptible improvement to the quality." I think it is true, and while I can present a theoretical argument, I don't have the equipment or environment to check whether it is true. Regards, John
John Monro wrote:
> Jerry Avins wrote: >> John Monro wrote: >> >> ... >> >>> This brings me to my main point. Is dithering have any other use >>> apart from improving the test-signal results? It seems to me that >>> dithering does not provide any benefit at all when 'real-life' audio >>> or video signals are being sampled, and I would be interested if >>> anyone disagrees with this. >>> >>> My argument is that real-life signals are neither constant-amplitude >>> nor constant-frequency nor repetitive. This should mean that the >>> quantisation noise will not be repetitive either. As a result, any >>> 'spurs' which occur will be highly transient and are will not be >>> perceived as tones in audio signals or patterns in video signals. In >>> effect, when real-life signals are sampled, the non-repetitive nature >>> of signals should suppress the production of spurs in exactly the >>> same way that dithering suppresses spurs when test signals are sampled. >> >> Consider a signal (it might as well be repetitive) with a peak-to-peak >> amplitude of 1 LSB. (The question of this signal's shape is without >> meaning.) This signal is undetectable in the absence of noise and >> dither, but with appropriate dither or fortuitous noise, An FT will >> show it clearly. Is that counterexample enough? >> >> Jerry > > Thanks for the counterexample Jerry. Dithering clearly makes the signal > detectable, and this has advantages for measurement where multi-sample > averaging is carried out. You and Steve refer to this in later postings. > > The question is: in your counterexample, would dithering lead to a > perceived improvement to the quality of the audio signal ? I can't see > that it would, because the 0.5-bit amplitude signal which was previously > undetected in the absence of dithering now gets sampled as a 1-bit noise > signal. This is hardly an improvement!
Noise would not be an improvement. Under conditions where external noise sources don't mask it, the detected 1/5-bit signal can be clearly audible with an evident pitch. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
Randy Yates wrote:
> John Monro <johnmonro@optusnet.com.au> writes: >> [...] >> This brings me to my main point. Is dithering have any other use >> apart from improving the test-signal results? It seems to me that >> dithering does not provide any benefit at all when 'real-life' audio >> or video signals are being sampled, and I would be interested if >> anyone disagrees with this. > > With such high resolution converters these days for audio, I think for > the most part you're right. But there were some old Windows (95? 3.1?) > .wav files that were 8 bits, and failure to dither on those suckers > was clearly audible.
Thanks, that's the sort of evidence I was looking for.
> > Also, dithering is about more than removing spurs - it also (with the > right distribution) removes noise power modulation. I think this > can also be audible, but the likelihood with >= 16 bit converters > is probably low. >
I don't understand this because I can't see that adding more noise to the signal is going to help.
> I think you actually may hear the "graininess" in undithered CDs > that fade to silence if you've got the volume up pretty loud. > And I'm not talking about "gain-riding" the volume as the music > fades, but listening at a constant, albeit loud, volume.
Good point! I can see that in the absence of dither, as the last note fades away there would be a tendency for the sampled signal to jump from one set of quantisation levels to another.
Jerry Avins wrote:

   ...

> Noise would not be an improvement. Under conditions where external noise > sources don't mask it, the detected 1/5-bit signal can be clearly > audible with an evident pitch.
1/5 --> 1/2. As a signal fades to silence, the quantizing becomes evident, and sometimes that is intrusive. Dithering makes it less intrusive. Perhaps because the low-level noise tends to mask some of the artifacts, but also because it suppressed them. If you want to explore the effects of dithering, quantize your audio to five bits or so, with and without dither, and with different depths of dither. I haven't done that myself, but I've heard the results and I'm a believer. It's much harder to hear a good signal made slightly better than it is to hear a bad one edge toward passable. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
John Monro <johnmonro@optusnet.com.au> writes:

> Randy Yates wrote: >> John Monro <johnmonro@optusnet.com.au> writes: >>> [...] >>> This brings me to my main point. Is dithering have any other use >>> apart from improving the test-signal results? It seems to me that >>> dithering does not provide any benefit at all when 'real-life' audio >>> or video signals are being sampled, and I would be interested if >>> anyone disagrees with this. >> With such high resolution converters these days for audio, I think >> for >> the most part you're right. But there were some old Windows (95? >> 3.1?) .wav files that were 8 bits, and failure to dither on those >> suckers >> was clearly audible. > Thanks, that's the sort of evidence I was looking for. >> Also, dithering is about more than removing spurs - it also (with the >> right distribution) removes noise power modulation. I think this >> can also be audible, but the likelihood with >= 16 bit converters >> is probably low. > I don't understand this because I can't see that adding more noise to > the signal is going to help.
Think about what would be less annoying - a constant, relatively low noise level, or a lower noise level that sometimes ballooned quite high.
>> I think you actually may hear the "graininess" in undithered CDs >> that fade to silence if you've got the volume up pretty loud. And >> I'm not talking about "gain-riding" the volume as the music >> fades, but listening at a constant, albeit loud, volume. > > Good point! I can see that in the absence of dither, as the last note > fades away there would be a tendency for the sampled signal to jump > from one set of quantisation levels to another.
Yep, you get that "graininess." Sounds like shit. However, it's not unusual for me to listen at levels >= 110 dB SPL unweighted. -- % Randy Yates % "Remember the good old 1980's, when %% Fuquay-Varina, NC % things were so uncomplicated?" %%% 919-577-9882 % 'Ticket To The Moon' %%%% <yates@ieee.org> % *Time*, Electric Light Orchestra http://home.earthlink.net/~yatescr
Randy Yates <yates@ieee.org> writes:

> Yep, you get that "graininess." Sounds like shit. However, it's > not unusual for me to listen at levels >= 110 dB SPL unweighted.
I should concede that, even at those high levels, the nastiness is only present very briefly. True 16 bit resolution is really quite adequate for all but the most demanding, laboratory-like scenarios. -- % Randy Yates % "I met someone who looks alot like you, %% Fuquay-Varina, NC % she does the things you do, %%% 919-577-9882 % but she is an IBM." %%%% <yates@ieee.org> % 'Yours Truly, 2095', *Time*, ELO http://home.earthlink.net/~yatescr