IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
Into which bit should noise be added in order to dither 32bit file to
amiti
post Oct 6 2012, 22:54
Post #1





Group: Members
Posts: 152
Joined: 1-January 05
Member No.: 18746



When adding noise to audio data in order to dither it into lower bit depth, should the noise be added to higher bit than the desired outcome bit depth? For example when 24bit data is meant to be dithered into 16 bit , the white noise should be added between the 17th to the 24th bits of the original file?

I saw this plugin for foobar : foo_dsp_noise. With this plugin foobar can add TPDF noise up into the 24th bit but not higher. Does this mean it is usable only for dithering to 16bit and not to 24bit output?

Go to the top of the page
+Quote Post
Glenn Gundlach
post Oct 7 2012, 01:31
Post #2





Group: Members
Posts: 359
Joined: 19-April 08
From: LA
Member No.: 52914



I think that depending on the current binary value, it could change ALL of them. E.G. $7FFF to $8000

G
Go to the top of the page
+Quote Post
amiti
post Oct 7 2012, 06:12
Post #3





Group: Members
Posts: 152
Joined: 1-January 05
Member No.: 18746



You are correct Glenn but the chosen bit means how strong the noise is. If the noise added is strong enough it will remain exactly the same after reducing bit depth. For example if we take 24 bit file and add noise in its 15th bit , then after reducing bitdepth to 16 the noise added will remain exactly the same and won't create the dither affect. Am I correct?
Go to the top of the page
+Quote Post
punkrockdude
post Oct 7 2012, 13:16
Post #4





Group: Members
Posts: 243
Joined: 21-February 05
Member No.: 20022



Valueable thread! Keep the information coming! The details are somewhat hard to get but not to hard. Regards.
Go to the top of the page
+Quote Post
bandpass
post Oct 7 2012, 13:56
Post #5





Group: Members
Posts: 321
Joined: 3-August 08
From: UK
Member No.: 56644



QUOTE (amiti @ Oct 6 2012, 22:54) *
I saw this plugin for foobar : foo_dsp_noise. With this plugin foobar can add TPDF noise up into the 24th bit but not higher. Does this mean it is usable only for dithering to 16bit and not to 24bit output?

Dithering to 24-bits is considered unnecessary, this resolution being high enough that (with normal levels) it doesn't really matter what's going on in the LSB.
Go to the top of the page
+Quote Post
Nick.C
post Oct 7 2012, 19:18
Post #6


lossyWAV Developer


Group: Developer
Posts: 1772
Joined: 11-April 07
From: Wherever here is
Member No.: 42400



QUOTE (amiti @ Oct 6 2012, 22:54) *
I saw this plugin for foobar : foo_dsp_noise. With this plugin foobar can add TPDF noise up into the 24th bit but not higher. Does this mean it is usable only for dithering to 16bit and not to 24bit output?
You should start counting from the least-significant-bit (lsb), i.e. bit 0. Therefore dither would be applied at the the eighth bit.


--------------------
lossyWAV -q X -a 4 --feedback 4| FLAC -8 ~= 320kbps
Go to the top of the page
+Quote Post
amiti
post Oct 8 2012, 14:04
Post #7





Group: Members
Posts: 152
Joined: 1-January 05
Member No.: 18746



QUOTE
You should start counting from the least-significant-bit (lsb), i.e. bit 0. Therefore dither would be applied at the the eighth bit.


Nick , so you are saying that dither noise should be added at the 17th bit(if counting from the msb side)? Theoretically then , when dithering from 32bit to 24 bits (although some would consider it useless) noise should be added from the 25th bit (when counting from most significant bit side)?
Go to the top of the page
+Quote Post
Arnold B. Kruege...
post Oct 8 2012, 14:51
Post #8





Group: Members
Posts: 3536
Joined: 29-October 08
From: USA, 48236
Member No.: 61311



QUOTE (amiti @ Oct 6 2012, 17:54) *
When adding noise to audio data in order to dither it into lower bit depth, should the noise be added to higher bit than the desired outcome bit depth? For example when 24bit data is meant to be dithered into 16 bit , the white noise should be added between the 17th to the 24th bits of the original file?

I saw this plugin for foobar : foo_dsp_noise. With this plugin foobar can add TPDF noise up into the 24th bit but not higher. Does this mean it is usable only for dithering to 16bit and not to 24bit output?


The usual terminology that is used to characterize the amplitude of the dither signal, is given in bits, whose lowest order value is the same as the LSB.

The amount of dither that is required to randomize the quantization error depends on the PDF of the dither signal. The usual criteria for randomzing the quantization error is the highest order of moment that is randomized.
Go to the top of the page
+Quote Post
2Bdecided
post Oct 8 2012, 17:39
Post #9


ReplayGain developer


Group: Developer
Posts: 4945
Joined: 5-November 01
From: Yorkshire, UK
Member No.: 409



You add as many bits of dither as you are removing bits from the signal. So 16>8, 24>16 and 32>24 all require dither noise added to the 8LSBs, because you are chopping 8-bits off. 32>8 would require 24-bits of dither!

If you add an 8-bit pseudo random number generator, you'll get flat rectangular dither. Add two (or add one then subtract another) and you'll get flat triangular dither (which, because you're adding two 8-bit numbers, will often fill the 9 LSBs).

Of course by adding a number to the 8 LSBs, you may change the value of any or all bits. Just like adding 1 to 899 changes all the decimal numbers, even though it is a single digit.

Cheers,
David.

This post has been edited by 2Bdecided: Oct 8 2012, 17:40
Go to the top of the page
+Quote Post
amiti
post Oct 9 2012, 20:33
Post #10





Group: Members
Posts: 152
Joined: 1-January 05
Member No.: 18746



Thank you, Arnold and David.

So if I understand correctly , using the usual terminology , for a target of 16 bit I would need to add noise of 16th bit order? That would mean 17-24 bits (or more if original is in higher resolution) of the original data would be added with noise?
Go to the top of the page
+Quote Post
2Bdecided
post Oct 10 2012, 09:59
Post #11


ReplayGain developer


Group: Developer
Posts: 4945
Joined: 5-November 01
From: Yorkshire, UK
Member No.: 409



Yes. Exactly.

But that's only true for rectangular PDF dither. Which you would never use.

So, no.

This is the classic paper on the subject...
http://www.drewdaniels.com/dither.pdf

There are others. See the AES library links from the (mediocre) wikipedia article.

Cheers,
David.
Go to the top of the page
+Quote Post
krabapple
post Oct 27 2012, 20:26
Post #12





Group: Members
Posts: 2159
Joined: 18-December 03
Member No.: 10538



QUOTE (2Bdecided @ Oct 8 2012, 12:39) *
You add as many bits of dither as you are removing bits from the signal. So 16>8, 24>16 and 32>24 all require dither noise added to the 8LSBs, because you are chopping 8-bits off. 32>8 would require 24-bits of dither!


Is truncation from 32 to 24 bits generally thought to be audible?

This post has been edited by krabapple: Oct 27 2012, 20:27
Go to the top of the page
+Quote Post
Arnold B. Kruege...
post Oct 27 2012, 20:29
Post #13





Group: Members
Posts: 3536
Joined: 29-October 08
From: USA, 48236
Member No.: 61311



QUOTE (krabapple @ Oct 27 2012, 15:26) *
QUOTE (2Bdecided @ Oct 8 2012, 12:39) *
You add as many bits of dither as you are removing bits from the signal. So 16>8, 24>16 and 32>24 all require dither noise added to the 8LSBs, because you are chopping 8-bits off. 32>8 would require 24-bits of dither!


Is truncation from 32 to 24 bits generally thought to be audible?


No, and in general with real-world recordings truncation from 24->16 isn't audible either.
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 19th April 2014 - 18:45