R/E/P Community

Please login or register.

Login with username, password and session length
Advanced search  

Pages: 1 ... 3 4 [5]   Go Down

Author Topic: Dithering?  (Read 5994 times)

Ronny

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 2739
Re: Dithering?
« Reply #60 on: August 17, 2005, 05:38:34 pm »

chrisj wrote on Wed, 17 August 2005 12:52

Ronny wrote on Wed, 17 August 2005 12:42


I've heard this many times and it implies that the noise is applied to the LSB and than truncated, meaning if we are going from 24 to 16 bit, it's applied before the quantizer at the LSB of 24 bit. What LSB are you talking about Chris, the LSB when the dither noise is applied or the final depth after the quantization? Do you see the conflict of what you are saying and the noise being applied at the 16th bit as DC and Brad are saying? 9 bits of noise if the signal is 24 bit before the quantizer when the noise is applied, noise would than be +51dB, if the dither was +3dB like I've also heard many times, than if it's applied in the 24 bit depth, it would be around -141dB. I don't get the EXACTLY one significant bit, it it's applied at exactly one bit, which is what I've thought before this discussion, how can it be applied at the 16th bit, 16th bit is not the LSB until after the quantization and the dither is applied before quantization. One thing that I do know, if you apply a 3dB signal to 24 bit and quantize to 16 bit, there will be 3dB signal in the final depth.


*head-explody*  Shocked

No no no, slow down.

Dither (flat) or dither+dither (tpdf) is applied at a level equal to the LSB of the OUTPUT TRUNCATED VERSION.

I have never, ever, heard of anyone calculating it by how many LSBs of the high resolution file it would occupy. What if you were at 64 bit floating point? Totally different answer- measuring it by the 16 bit truncated output, simple and direct answer.

The dither level does not RELATE to the high resolution's data storage format, at all. Not the slightest amount. It relates only and solely to the LSB of what you are going to end up with. (I'm also not used to looking at it in db terms, because it's so intimately bound up with the LSB of the output truncated format)



9 bits of dither, we are talking only 24 to 16 bit word reduction. If 9 bits of dither are applied to the pre-truncated signal at 24 bit, than it seems obvious that if you are reducing from 64 to 16 than it would be 47 bits of dither added. I'm only repeating 9 bits as relative to the 24-16 reduction, not saying or asking if 9 bits of dither is applied to 32, 48 or 64 bit reductions to 16 bit. To reduce confusion, why say that dither is noise applied to the LSB. I've never heard this said, but what it sounds like you should be saying is that dither is added to the original depth before the quantizer so that noise resides in the LSB "of the final depth". Can you not see the conflict when you say that dither is applied to the LSB, when it is applied before the quantization process? That implies the 24th bit, not the 16th bit after the quantization.
Logged
------Ronny Morris - Digitak Mastering------
---------http://digitakmastering.com---------
----------Powered By Experience-------------
-------------Driven To Perfection---------------

Paul Frindle

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 380
Re: Dithering?
« Reply #61 on: August 17, 2005, 07:27:51 pm »

chrisj wrote on Wed, 17 August 2005 16:55

*whew* no wonder you're having trouble. Some of that is nonsense.

Truth:

Flat dither is random noise applied so its maximum possible peak range covers a space equal to EXACTLY one least significant bit- whatever that may be, be it 24, 16 or 8 bit. It is applied first, and then you just truncate.

TPDF is random noise applied so its maximum possible peak range covers a space equal to EXACTLY one least significant bit- twice. You use two separate noise sources, not one at twice the loudness, and it results in a dither where the combined maximum peak can go as high as two least significant bits- whatever those may be. Then you truncate. Because it's two sources, the randomness results in a statistical distribution where it's less likely for the peak to be that high. If you plotted the distribution, it would be triangular in shape, hence the name Triangular Probability Density Function.

Nonsense: (from each source in turn)

The amplitude isn't 'less than' one quantization level unless you mean 'usually less'. When you say correlated it actually doesn't mean the noise source you're using, it means that the RESULTING noise floor should not fluctuate with the music.

It doesn't 'confuse' the quantizer, just sort of statistically averages it out. Your idea that dither only diminishes the quantization error isn't really correct- what happens is that you get a blast of noise that really, truly, is indistinguishable from hi-res noise. I didn't believe this myself until I tried it with really correct dithering. If you just truncate loud white noise you can hear a difference. If you dither the loud white noise and truncate THAT, suddenly you can't hear a difference anymore. It's a hell of a neat trick, honestly.

The bits have a perfectly easy time 'deciding' whether to switch on and off- the trouble is that very gradual signal changes get encoded as stretches of no change interspersed with abrupt jumps! This is no strain on the quantizer. It's happy to dump inharmonic grunge into the sound Wink

It depends how you look at it, whether it 'removes' quantization errors. We mean 'to the ear', we mean 'the sound of truncation'. You must remember that even so, quantization is happening. It's just happening in such a way that information is allowed to get through. You can say 'dither does not prevent the quantization error' but it still prevents the EFFECT of the quantization error, by turning it into a result indistinguishable from the high-res sound with simultaneous noise.

The guy from Berklee is being unhelpful- for some reason he's saying, add dither, and then depend on the process of saving to 16 bit which will automatically truncate the resolution. This is dumb: suppose some future 'save as 16 bit' dithered a 24 bit signal, as it should be doing in the first place? Ignore him.

Benchmark Media must be doing some kind of noise shaper. That's different. There might be a penalty- they're talking about 'at some particular frequency', and other frequencies like highs might be 24 db worse for all you know.

Is that any help? As far as the 'level' question- use one or two noise sources, each peak at EXACTLY one LSB, if you used two you have TPDF and peak at one-plus-one LSB.


Dear Chrisj.

Just seen this post on dither - nothing more I could add as you have described the issues well and I totally agree with your explanation.

This comes at an interesting time for me cos I have been making a limiter application recently which has dither and noise shaping. I included a noise shaping depth control so that the energy could be varied from TPDF to full noise shape.

I also wrote a section in the manual with plots to describe dither, noise shaping and warn of the myths and dangers.

You might like to look at this stuff, it's short and to the point with some plots included of real responses.



http://www.sonyoxford.co.uk/pub/plugins-sony/products/limite r-Tech_Detail.htm#dither

Logged

bblackwood

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 7036
Re: Dithering?
« Reply #62 on: August 17, 2005, 07:41:28 pm »

Ronny, it seems some fundamentals are missing. Why not buy (or check out from the local library) Pohlmann's 'Principles of Digital Audio'? That will surely clear things up so we're on the same page...
Logged
Brad Blackwood
euphonic masters

TotalSonic

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 3728
Re: Dithering?
« Reply #63 on: August 17, 2005, 07:45:29 pm »

bblackwood wrote on Thu, 18 August 2005 00:41

Ronny, it seems some fundamentals are missing. Why not buy (or check out from the local library) Pohlmann's 'Principles of Digital Audio'? That will surely clear things up so we're on the same page...


For the sake of other here like me that haven't read it yet and want to pick up a copy -

http://www.amazon.com/exec/obidos/tg/detail/-/0071348190/002 -8336874-8351255?v=glance

Best regards,
Steve Berson

jfrigo

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 1029
Re: Dithering?
« Reply #64 on: August 17, 2005, 08:00:44 pm »

Oliver wrote on Wed, 17 August 2005 08:42

This is a great discussion for someone like me, who knows very little about the ins and outs of dither. So, I've read BK's book, I'm in the middle of Nika's, and I plan on buying Pohlman's next time it's convenient. Are there any other must-reads? I'd google stuff but I don't feel comfortable enough with this stuff to judge what's valid and what's poo-poo.
Thanks,
Oliver.




The other "bible" is Watkinson's "The Art of Digital Audio." It would be a good "part II" after reading some of the smaller volumes. Pohlman and Watkinson are the biggies.
Logged

Ronny

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 2739
Re: Dithering?
« Reply #65 on: August 17, 2005, 08:21:09 pm »

bblackwood wrote on Wed, 17 August 2005 19:41

Ronny, it seems some fundamentals are missing. Why not buy (or check out from the local library) Pohlmann's 'Principles of Digital Audio'? That will surely clear things up so we're on the same page...



Yes, I plan to do just that.
Logged
------Ronny Morris - Digitak Mastering------
---------http://digitakmastering.com---------
----------Powered By Experience-------------
-------------Driven To Perfection---------------

Paul Frindle

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 380
Re: Dithering?
« Reply #66 on: August 18, 2005, 04:40:13 am »

Ronny wrote on Wed, 17 August 2005 22:38

To reduce confusion, why say that dither is noise applied to the LSB. I've never heard this said, but what it sounds like you should be saying is that dither is added to the original depth before the quantizer so that noise resides in the LSB "of the final depth". Can you not see the conflict when you say that dither is applied to the LSB, when it is applied before the quantization process? That implies the 24th bit, not the 16th bit after the quantization.



This is totally correct - we cannot add dither to just the LSB as this would cause an error and do virtually nothing to help.

The dither is added to the WHOLE signal at the equivalent level of the LSB (for triangular PDF this means an average level 1 LSB - and a peak level 2 LSB).

The whole signal at every level therefore has the random element present - which turns the quantised transfer into a statistically linear one with added noise over all of its range - just like all signals in the real world Smile

What you and up with is a signal to noise ratio - not quantisation distortion.
Logged

Ronny

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 2739
Re: Dithering?
« Reply #67 on: August 18, 2005, 08:03:41 am »

Paul Frindle wrote on Thu, 18 August 2005 04:40

Ronny wrote on Wed, 17 August 2005 22:38

To reduce confusion, why say that dither is noise applied to the LSB. I've never heard this said, but what it sounds like you should be saying is that dither is added to the original depth before the quantizer so that noise resides in the LSB "of the final depth". Can you not see the conflict when you say that dither is applied to the LSB, when it is applied before the quantization process? That implies the 24th bit, not the 16th bit after the quantization.



This is totally correct - we cannot add dither to just the LSB as this would cause an error and do virtually nothing to help.

The dither is added to the WHOLE signal at the equivalent level of the LSB (for triangular PDF this means an average level 1 LSB - and a peak level 2 LSB).

The whole signal at every level therefore has the random element present - which turns the quantised transfer into a statistically linear one with added noise over all of its range - just like all signals in the real world Smile

What you and up with is a signal to noise ratio - not quantisation distortion.



Thanks Chris and Paul for your explanations.
Logged
------Ronny Morris - Digitak Mastering------
---------http://digitakmastering.com---------
----------Powered By Experience-------------
-------------Driven To Perfection---------------

Paul Frindle

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 380
Re: Dithering?
« Reply #68 on: August 18, 2005, 08:17:20 am »

Ronny wrote on Thu, 18 August 2005 13:03

Paul Frindle wrote on Thu, 18 August 2005 04:40

Ronny wrote on Wed, 17 August 2005 22:38

To reduce confusion, why say that dither is noise applied to the LSB. I've never heard this said, but what it sounds like you should be saying is that dither is added to the original depth before the quantizer so that noise resides in the LSB "of the final depth". Can you not see the conflict when you say that dither is applied to the LSB, when it is applied before the quantization process? That implies the 24th bit, not the 16th bit after the quantization.



This is totally correct - we cannot add dither to just the LSB as this would cause an error and do virtually nothing to help.

The dither is added to the WHOLE signal at the equivalent level of the LSB (for triangular PDF this means an average level 1 LSB - and a peak level 2 LSB).

The whole signal at every level therefore has the random element present - which turns the quantised transfer into a statistically linear one with added noise over all of its range - just like all signals in the real world Smile

What you and up with is a signal to noise ratio - not quantisation distortion.



Thanks Chris and Paul for your explanations.



You're very welcome and I'm glad I can help Smile
This sort of discussion is pretty common and I have had quite a few - because it IS something that's difficult to get one's head around when thinking about it in the cold light of day. But it is immediately obvious if you get to design any digital audio applications or processing. I have been doing this stuff for more than 2 decades now and very occasionally I still get a brief moment of double take when I have to remind myself what's really happening!
Logged
Pages: 1 ... 3 4 [5]   Go Up