{"id":1963,"date":"2013-11-13T14:53:14","date_gmt":"2013-11-13T22:53:14","guid":{"rendered":"http:\/\/www.realhd-audio.com\/?p=1963"},"modified":"2013-11-13T14:53:14","modified_gmt":"2013-11-13T22:53:14","slug":"dither-is-it-still-needed","status":"publish","type":"post","link":"https:\/\/www.realhd-audio.com\/?p=1963","title":{"rendered":"Dither: Is It Still Needed?"},"content":{"rendered":"<p>In the world of PCM digital audio, we have sampling rates and word lengths. The sampling rate establishes the highest recordable frequency thanks to the Nyquist Theorem and greater work lengths provide increased dynamic range. Then there&#8217;s this problem called quantization noise, which happens when the amplitude of the incoming analog signal doesn&#8217;t land on one of the discrete digital amplitudes that are part of the &#8220;battleship&#8221; grid of samples and amplitude (see Figure 1 below). The digitization process must look for the closest digital amplitude to the actual analog value. This inexactness produces low-level noise called quantization noise.<\/p>\n<p><a href=\"http:\/\/www.realhd-audio.com\/wp-content\/uploads\/2013\/11\/quantization_noise.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.realhd-audio.com\/wp-content\/uploads\/2013\/11\/quantization_noise.jpg\" alt=\"quantization_noise\" width=\"600\" height=\"300\" class=\"alignnone size-full wp-image-1964\" \/><\/a><\/p>\n<p>Figure 1 &#8211; Quantization Noise [click to enlarge]<\/p>\n<p>What does this do to the sound of a PCM digital recording? It produces a very low level and randomly shifting noise.  When something is random as opposed to continuous and predictable, our ear are drawn to it and we &#8220;hear&#8221; the problem. The early designer of PCM digital audio knew about the problems of quantization noise. One of the obvious solutions is to increase the length of the words. Moving from 8-bits to 16-bits increased the potential dynamic range of PCM encoding by providing many more horizontal lines on our diagram. The chart below will show you the dramatic increases that happen when you add bits to the words.<\/p>\n<p><a href=\"http:\/\/www.realhd-audio.com\/wp-content\/uploads\/2013\/11\/word_length_bits.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.realhd-audio.com\/wp-content\/uploads\/2013\/11\/word_length_bits.jpg\" alt=\"word_length_bits\" width=\"620\" height=\"250\" class=\"alignnone size-full wp-image-1965\" \/><\/a><\/p>\n<p>Figure 2 &#8211; A chart showing the number of bits in a digital word and the available values that can be used. [Click to enlarge]<\/p>\n<p>The reality is that no matter how many discrete values to have along the horizontal axis of the &#8220;battleship graph&#8221;, the analog amplitudes will never match up, so there will also be some quantization noise. Thankfully, it is quite low.<\/p>\n<p>The other remedy is to modify the randomness of the noise and turn it into a steady state type of noise. This makes the sound much less obtrusive. This method is accomplished by adding dither to the stream of digital words as they are output.<\/p>\n<p>Dither happens on the &#8220;least significant bits&#8221; [LSB] of a data word&#8230;the ones on the extreme right. If you take a couple of the ones and zeros that make up the LSBs and randomly switch them over time, the output is a steady state low-level noise. Obviously the lose of even a couple of bits degrades the potential signal to noise ratio of the system but the addition of dither improves the quality of the listening.<\/p>\n<p>There are different types of dither [from Wikipedia]:<\/p>\n<p>RPDF stands for &#8220;Rectangular Probability Density Function,&#8221; equivalent to a roll of a die. Any number has the same random probability of surfacing.<\/p>\n<p>TPDF stands for &#8220;Triangular Probability Density Function,&#8221; equivalent to a roll of two dice (the sum of two independent samples of RPDF).<\/p>\n<p>Gaussian PDF is equivalent to a roll of a large number of dice. The relationship of probabilities of results follows a bell-shaped, or Gaussian curve, typical of dither generated by analog sources such as microphone preamplifiers. If the bit depth of a recording is sufficiently great, that preamp noise will be sufficient to dither the recording.<\/p>\n<p>Colored Dither is sometimes mentioned as dither that has been filtered to be different from white noise. Some dither algorithms use noise that has more energy in the higher frequencies so as to lower the energy in the critical audio band.<\/p>\n<p>Noise shaping is a filtering process that shapes the spectral energy of quantization error, typically to either de-emphasize frequencies to which the ear is most sensitive or separate the signal and noise bands completely. If dither is used, its final spectrum depends on whether it is added inside or outside the feedback loop of the noise shaper: if inside, the dither is treated as part of the error signal and shaped along with actual quantization error; if outside, the dither is treated as part of the original signal and linearizes quantization without being shaped itself. In this case, the final noise floor is the sum of the flat dither spectrum and the shaped quantization noise. While real-world noise shaping usually includes in-loop dithering, it is also possible to use it without adding dither at all, in which case the usual harmonic-distortion effects still appear at low signal levels.<\/p>\n<p>So is Dither a good thing or a bad thing? Its value was more important in the days of CD resolution digital audio but it is still a valuable tool in these days of longer word lengths. The use of noise shaping is extremely important in the world of DSD because without it, DSD could only realize 6 dB of dynamic range from 1-100 kHz. As it is, by pushing the noise out past the &#8220;audio band&#8221; of 20-20 kHz, DSD manages to do a pretty good job of providing standard resolution&#8230;somewhat better than a CD.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the world of PCM digital audio, we have sampling rates and word lengths. The sampling rate establishes the highest<\/p>\n","protected":false},"author":2,"featured_media":1968,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"colormag_page_container_layout":"default_layout","colormag_page_sidebar_layout":"default_layout","_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"categories":[45],"tags":[50,362,17,26,42,251,227,169],"class_list":["post-1963","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-dr_aixs_posts","tag-aix-records","tag-dither","tag-dsd","tag-hd-audio","tag-high-resolution-audio","tag-high-resolution","tag-hra","tag-mark-waldrep"],"_links":{"self":[{"href":"https:\/\/www.realhd-audio.com\/index.php?rest_route=\/wp\/v2\/posts\/1963","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.realhd-audio.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.realhd-audio.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.realhd-audio.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.realhd-audio.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1963"}],"version-history":[{"count":3,"href":"https:\/\/www.realhd-audio.com\/index.php?rest_route=\/wp\/v2\/posts\/1963\/revisions"}],"predecessor-version":[{"id":1969,"href":"https:\/\/www.realhd-audio.com\/index.php?rest_route=\/wp\/v2\/posts\/1963\/revisions\/1969"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.realhd-audio.com\/index.php?rest_route=\/wp\/v2\/media\/1968"}],"wp:attachment":[{"href":"https:\/\/www.realhd-audio.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1963"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.realhd-audio.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1963"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.realhd-audio.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1963"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}