• WANTED: Happy members who like to discuss audio and other topics related to our interest. Desire to learn and share knowledge of science required. There are many reviews of audio hardware and expert members to help answer your questions. Click here to have your audio equipment measured for free!

16-bit... It really is enough!

Raindog123

Major Contributor
Joined
Oct 23, 2020
Messages
1,599
Likes
3,555
Location
Melbourne, FL, USA
but here is the problem with saving 24-bit PCM audio with lossless compression: at 24 bits, the file is going to include content below the analog noise floor. Noise is not susceptible to compression.

Can you please elaborate on the above? You've lost me there... Thanks!
 

Dialectic

Major Contributor
Forum Donor
Joined
Sep 26, 2017
Messages
1,772
Likes
3,215
Location
a fortified compound
Can you please elaborate on the above? You've lost me there... Thanks!
24 bits is 144 dB of dynamic range. There is practically no analog equipment that quiet and no recording that is noiseless down to that level. Consequently, when you move from the 96 dB dynamic range of CD quality audio (above the noise floor of good analog devices) to the 144 dB dynamic range of 24 bits, a lot of the added low-level content is noise.

From my nutty perspective, 20 bits would be the sweet spot, but I have only ever been able to use 20-bit files on portable flash recorders. DAW software almost always requires the user to select among 16-bit, 24-bit, or 32-bit float.
 

Raindog123

Major Contributor
Joined
Oct 23, 2020
Messages
1,599
Likes
3,555
Location
Melbourne, FL, USA
lot of the added low-level content is noise

That's the part I do not quite understand. What is the structure/format of the digital representation of this 'added noise' that modern compressors would not handle? I've heard a number of times "a bit or two of added noise dither". I understand the anti-aliasing sample dither concept, but would appreciate to dig into the PCM resampling details, including why a simple sample bit-depth change would introduce additional random noise to the data... Can it be illustrated/explained here, or alternatively is there a reference to read?
 
Last edited:

Dialectic

Major Contributor
Forum Donor
Joined
Sep 26, 2017
Messages
1,772
Likes
3,215
Location
a fortified compound
That's the part I do not quite understand. What is the structure/format of the digital representation of this 'added noise' that modern compressors would not handle? I've heard a number of times "a bit or two of added noise dither". I understand the anti-aliasing sample dither concept, but would appreciate to dig into the PCM resampling details... Can it be illustrated/explained here, or alternatively is there a reference to read?
Apologies, I shouldn't have said that the noise in 24-bit files is "added". It's very low-level noise in the original recording from the analog recording chain. Lossless data compression techniques generally don't work on noisy data because noise is random. Whenever audio data is converted from 24 bits to 16 bits (irrespective of dithering), some low-level information--including low-level noise--is lost. In general, 16-bit files contain less noise than 24-bit files and have better compression ratios as a result.

EDIT: Though I used to do some recording work, I'm not an engineer or a compression theorist, and I'm almost certainly oversimplifying above. There are folks with expertise in those fields on ASR. I welcome any corrections.
 
Last edited:

Raindog123

Major Contributor
Joined
Oct 23, 2020
Messages
1,599
Likes
3,555
Location
Melbourne, FL, USA
Gotcha! Still, I would like to understand this (doubling in compressed size going from 16 to 24 bits):
A CD of classical music ripped and converted to FLAC 6 often compress to 250 MB. Going up to 24 bits without changing the sampling rates usually doubles the size (or more)

Anyone?
 

ebslo

Senior Member
Forum Donor
Joined
Jan 27, 2021
Messages
324
Likes
413
Gotcha! Still, I would like to understand this (doubling in compressed size going from 16 to 24 bits):


Anyone?
My guess is the extra 8 low-order bits are all uncorrelated noise which doesn't compress. FLAC on 16-bit content usually gets 2:1 compression ratio so add an extra byte per sample that doesn't compress at all doubles the compressed size.

Edit: Reading more prior posts I see this is what @Dialectic was saying to begin with.
 
Last edited:

Dialectic

Major Contributor
Forum Donor
Joined
Sep 26, 2017
Messages
1,772
Likes
3,215
Location
a fortified compound
Gotcha! Still, I would like to understand this (doubling in compressed size going from 16 to 24 bits):


Anyone?
This is not exactly high-level compression theory, so I will try to answer. A relatively large proportion of the low-level information in bits 17 through 24 is noise. Because of its random nature, noise does not compress as easily as signal (there are lots of papers on this subject), and I suspect that with common lossless audio compression codecs, noise doesn't compress at all (I welcome correction on that point if it's wrong). The information in bits 1 through 16 has a smaller proportion of noise and is easier to compress. The difference is observable in FLAC/APE/Apple lossless file sizes.
 

Wes

Major Contributor
Forum Donor
Joined
Dec 5, 2019
Messages
3,843
Likes
3,790
I have spent a lot of money, and continue to use a lot of storage, on high-res files, but here is the problem with saving 24-bit PCM audio with lossless compression: at 24 bits, the file is going to include content below the analog noise floor. Noise is not susceptible to compression. A CD of classical music ripped and converted to FLAC 6 often compress to 250 MB. Going up to 24 bits without changing the sampling rates usually doubles the size (or more). Sure, space is cheap, but I'm nearly at the limit of my 8TB drive. At least with me, it's getting ridiculous.

20 bits (120 dB of dynamic range) would be the sweet spot from my OCD/audiophile point of view. But for music listening, it just doesn't matter.


Why do you have so many HiRes recordings? I ripped my CD collection and have < 20 in HiRes. If the mastering is the same as Redbook, just buy that.
 

Dialectic

Major Contributor
Forum Donor
Joined
Sep 26, 2017
Messages
1,772
Likes
3,215
Location
a fortified compound
Why do you have so many HiRes recordings? I ripped my CD collection and have < 20 in HiRes. If the mastering is the same as Redbook, just buy that.
Good question! Because my views were formerly different. The old jangling keys test on WBF convinced me for a while. (I was very much in the anti-Arny Krueger crowd until I joined this forum and found I largely agreed with him until he passed away--RIP.)

Also loved stocking up on high-res files from, e.g., the Berlin Philharmonic online store when they had sales. Still have piles of SACDs in the basement.
 

Raindog123

Major Contributor
Joined
Oct 23, 2020
Messages
1,599
Likes
3,555
Location
Melbourne, FL, USA
A relatively large proportion of the low-level information in bits 17 through 24 is noise. Because of its random nature, noise does not compress as easily as signal

I’ve programmed quite a few DACs in my life, and In my field, the bits in question are not ‘random noise’, but rather zeros. Or your waveform would look rather funny, and nothing like the original… All I am asking is after one converts a train of PCM samples from 16 bits to 24 bits for DAC’s let’s say NRZ or RZ mode, why would this conversion be anything but zeros? What am I missing?

How is the signal amplitude represented in each sample, without hands waiving?
 
Last edited:

Wes

Major Contributor
Forum Donor
Joined
Dec 5, 2019
Messages
3,843
Likes
3,790
ok, I don't advise downsampling everything - just buy more storage as it becomes cheaper and cheaper over time
 

Raindog123

Major Contributor
Joined
Oct 23, 2020
Messages
1,599
Likes
3,555
Location
Melbourne, FL, USA
We're talking about converting a 24 bit original to 16 bit. Conversion never goes the other way

Well, I guess I’ve misinterpreted (and still do) this statement of yours:

A CD of classical music ripped and converted to FLAC 6 often compress to 250 MB. Going up to 24 bits without changing the sampling rates usually doubles the size (or more).


But it’s ok. All I am really curious about is if one would resample their ripped CD collection (16/44.1) to 24/44.1, would any information be added to the samples at all? Or whether each sample would just get appended with an extra byte of zeros?
 

Dialectic

Major Contributor
Forum Donor
Joined
Sep 26, 2017
Messages
1,772
Likes
3,215
Location
a fortified compound
Well, I guess I’ve misinterpreted (and still do) this statement of yours:




But it’s ok. All I am really curious about is if one would resample their ripped CD collection (16/44.1) to 24/44.1, would any information be added to the samples at all? Or whether each sample would just get appended with an extra byte of zeros?
Sorry that my post was confusing. I suspect that would be the case, yes, and that the losslessly compressed filesize would be the same, but I have never tried it. There's no reason to turn a 16 bit file into a 24 bit file, except temporarily if you are loading 16 bit samples into a DAW.
 

Blumlein 88

Grand Contributor
Forum Donor
Joined
Feb 23, 2016
Messages
20,766
Likes
37,625
I’ve programmed quite a few DACs in my life, and In my field, the bits in question are not ‘random noise’, but rather zeros. Or your waveform would look rather funny, and nothing like the original… All I am asking is after one converts a train of PCM samples from 16 bits to 24 bits for DAC’s let’s say NRZ or RZ mode, why would this conversion be anything but zeros? What am I missing? (How is the signal amplitude is represented in each sample, without hands waiving?)
Depends upon the software. Much software will dither going from 16 bit to 24 bit and of course dither is shaped noise. So it will cause exactly the problem described where the extra 8 bits in each sample are pretty much noise and noise doesn't compress. So you've increased file size by 50% and 1/3 or it is not going to compress. Hence the much larger file size.
 

Raindog123

Major Contributor
Joined
Oct 23, 2020
Messages
1,599
Likes
3,555
Location
Melbourne, FL, USA
Much software will dither going from 16 bit to 24 bit

Why would it do it? Dither is applied to minimize quantization artifacts of digitizing (and resampling). But I do not see how simple bit-depth of samples would change anything. Unless maybe it changes/recalculates signal levels, relative to something...
 

Blumlein 88

Grand Contributor
Forum Donor
Joined
Feb 23, 2016
Messages
20,766
Likes
37,625
Why would it do it?
Because in the settings you can choose to dither when bit depth changes or not. Even say Audacity can save with or without dither. If by default you have dither engaged then that is what will happen.
 

dc655321

Major Contributor
Joined
Mar 4, 2018
Messages
1,597
Likes
2,235
Because in the settings you can choose to dither when bit depth changes or not.

I guess some software is not intelligent enough to only dither on bit-depth decreases?
I suppose if a process's internal representation of the PCM integers is as (normalized) floating point, then it may dither indiscriminately when converting back to integer representations.

But... 8 bits of dither? Ick...
 

bennetng

Major Contributor
Joined
Nov 15, 2017
Messages
1,634
Likes
1,693
In typical usage, if DAWs simply dither and no extra parameters are specified, the dither should only occupy +/-1 LSB. But even +/-1 LSB will significantly reduce the effectiveness of lossless compression. The tool oldsCool I wrote can show the LSBs utilization of different dithering algorithms. For example, it showed something like this in the attached .wav files.

Code:
----------------------------------------------------
E:\download\dither\24 dither.wav
00:00:06 = 288000 samples / 1-ch @ 48000Hz
24-bit fixed point
Bit     Count         Percent
0       36007        12.50243
1       35993        12.49757
20      162035       56.26215
21      53965        18.73785
----------------------------------------------------
E:\download\dither\24 pad.wav
00:00:06 = 288000 samples / 1-ch @ 48000Hz
24-bit fixed point
Bit     Count         Percent
0       72000              25
20      144000             50
21      72000              25
----------------------------------------------------
E:\download\dither\original.wav
00:00:06 = 288000 samples / 1-ch @ 48000Hz
16-bit fixed point
Bit     Count         Percent
0       72000              25
12      144000             50
13      72000              25
----------------------------------------------------
.WAV file(s) processed: 3
Press ENTER to view log file, other keys to quit.
oldsCool can be downloaded here:
https://www.audiosciencereview.com/...he-obsession-with-dr-meters.11297/post-649576

Unlike archive formats like zip 7z rar etc, lossless codecs must maintain a balance between compression ratio and decoding speed, and must be seekable without decoding the whole thing into RAM or temp files. This will save the batteries of DAPs and other portable devices. This will also benefits some processes on desktop PCs, for example ReplayGain scan with a lot of files.

That doesn’t mean you can’t use it to compare files. You just should not use it for security applications. Reason is that you can doctor a hash. So you can alter a file to get a specific hash. Since you generate the hashes on your own file, there is no issue. Chance of getting the same hash are next to nothing. Doing a bit for bit compare is therefore not needed (would need less computing resources though ;) ).
Now you can see how handy this bit compare tool is apart from security reasons. One needs to decode the files to compare the bits. Hashes at file level can't do this.
hash.png
 

Attachments

  • dither.zip
    278.9 KB · Views: 73
Last edited:

bennetng

Major Contributor
Joined
Nov 15, 2017
Messages
1,634
Likes
1,693
That may explain it then. My faulty memory was they used Izotope which is one of the very best resamplers.
Here is the Pyramix vs one of the Izotopes of which several versions produce excellent results. Quite a few DAW's have built resampling which is not very good. Which is surprising and unnecessary this late in the game.

I know I could hear a difference using ABX on Arny's jangling keys with his original files. I resampled his file with Sox and I could no longer hear a difference. So whichever resampler Arny used may have also had some artifacts. Sox was clean to my ears.
View attachment 131983
...as well as frequency response
pyramix.png


There is no ripple on a Realtek ALC892 and a 16 years old PCI soundcard with Cirrus Logic CS4382 even when zoomed to 0.1dB scale, and at analog output rather than digital.
Spectrum.png
 

FrantzM

Major Contributor
Forum Donor
Joined
Mar 12, 2016
Messages
4,377
Likes
7,877
Hi

Followed this learned discussion and .. a stupid request:

Can someone point me toward a single piece of recorded music , encompassing 90 dB of Dynamic Range?
 
Top Bottom