Title: **Are quantization steps equal in size & evenly distributed in the dynamic range?**

Post by:**FMiguelez** on **2018-08-05 13:45:04**

Post by:

Hello.

I’ve been doing some reading about the Sampling Theorem, and I find it all fascinating.

I think I understand it enough now to rid myself of the typical DSP myths. However, I still have questions about some details.

For instance, I want to be able to relate the 24 and 16 bit dynamic range to their respective quantization step size and distribution.

When I’m working with my DAW, can I think of the quantization steps as having the same size and being evenly distributed throughout the entire dynamic range? Or do they have uneven sizes/distribution?

I understand there’s Uniform Quantization (Mid-rise and mid-tread) and Non-Uniform Quantization. So which type do we use in our typical ADCs? I’m hoping it’s the former…

I’m hoping it’s not, but something tells me things are a bit more complicated than that?

Thank you for any comments.

Title: **Re: Are quantization steps equal in size & evenly distributed in the dynamic range?**

Post by:**saratoga** on **2018-08-05 14:22:38**

Post by:

Quote

When I’m working with my DAW, can I think of the quantization steps as having the same size and being evenly distributed throughout the entire dynamic range? Or do they have uneven sizes/distribution?

I understand there’s Uniform Quantization (Mid-rise and mid-tread) and Non-Uniform Quantization. So which type do we use in our typical ADCs? I’m hoping it’s the former…

Almost all ADCs use uniform steps. Intger PCM is almost always uniform. Your DAW probably uses floating point which is not uniform, but the steps are so small you can think of them as uniform.

Quote

Would it be accurate to say that in a 16-bit quantizer, each bit is represented by 2048 uniform quantization steps?

Bits are not represented by steps, and there I no number of steps defined per bit. Every time you add a bit the number of steps doubles, so going from 15 to 16 gives you 2^16-2^15 additional steps (32768).

Quote

Could I say that in a 16 bit signal, the LSB is represented by quantization steps 1 through 2,048 and its MSB by steps 30,721 through 32,768?

In binary (like in normal decimal numbers) all bits determine the value of a number. The least significant bit determines if a number is even or odd, while the most significant bit decides if a value is greater or less than zero.

Title: **Re: Are quantization steps equal in size & evenly distributed in the dynamic range?**

Post by:**FMiguelez** on **2018-08-05 16:41:16**

Post by:

Thank you for your answers, saratoga.

Quote from: saratoga

Almost all ADCs use uniform steps. Intger PCM is almost always uniform.Ok. I’m glad you clear that up for me, because I was reading contradicting information that was confusing.

So based on that fact, can I then say accurately that, given a bit depth (for instance 16 bits), the precision of a signal is always the same, whether it’s captured peaking at -6 dbFS or -50 dBFs, correct?

The only difference would be that the latter is much closer to the noise floor (which would be obvious if one increases the gain back up), but other than that, in terms of

Quote from: saratoga

Your DAW probably uses floating point which is not uniform, but the steps are so small you can think of them as uniform.Yes. It uses 32 bit floating point.

So they are not uniform because of how the exponent part of the number works in floating point?

I just read that in FP there’s a trade-off between range and precision. Is this the reason why?

Is it true that 32 bFP represents lower values with less precision than larger values?

Quote from: saratoga

Bits are not represented by steps, and there I no number of steps defined per bit.Maybe I mis-explained myself.

I meant represented as in “covered by”, as you would see them represented in a graph.

I thought one could relate signal level to bit number/quantization step/dBFS value, all three being equivalent in the Y axis, like this (please excuse my crude graphic)>

(https://flic.kr/p/28JHbU5)

But perhaps I’m looking at this all wrong and I still have some misconception lingering around?

Quote from: saratoga

In binary (like in normal decimal numbers) all bits determine the value of a number. The least significant bit determines if a number is even or odd, while the most significant bit decides if a value is greater or less than zero.Ok, I see.

Is it futile then to try to relate dynamic range to quantization steps?

So what I’m trying to do doesn’t make much sense? Or is there some other way to relate them? I thought the graph above made sense!

Title: **Re: Are quantization steps equal in size & evenly distributed in the dynamic range?**

Post by:**lvqcl** on **2018-08-05 17:20:28**

Post by:

The only difference would be that the latter is much closer to the noise floor (which would be obvious if one increases the gain back up), but other than that, in terms ofYes, the quantization noise is the same.precision, the signals would be equally “pure”, actually identical, yes?

Is it true that 32 bFP represents lower values with less precision than larger values?No. The relative precision is the same.

I thought the graph above made sense!Sorry, but it doesn't. Also IIUC, what you call "quantization step" is called a value (a signal value).

For 16 bit signal:

Maximum positive value : 32767, it's -0.000265... dBFS, and you need all 16 bits to represent it

Some small positive value: 123, it's -48.23... dBFS, and you need 7 bits to represent it

Minimum positive value : 1, it's -90.3... dBFS, and you need 2 bits to represent it

Zero value : 0, it's -infinity dBFS, and you need 1 bit to represent it

Minimum negative value : -1, it's -90.3... dBFS, and you need 1 bit to represent it

Some small negative value: -14, it's -67.38... dBFS, and you need 4 bits to represent it

Maximum negative value : -32768, it's 0 dBFS, and you need all 16 bits to represent it

Title: **Re: Are quantization steps equal in size & evenly distributed in the dynamic range?**

Post by:**FMiguelez** on **2018-08-05 17:46:55**

Post by:

Quote from: lvqcl

For 16 bit signal:Thank you so much for that, lvqcl!! That’s EXACTLY what I wanted to know :)

Maximum positive value : 32767, it's -0.000265... dBFS, and you need all 16 bits to represent it

Some small positive value: 123, it's -48.23... dBFS, and you need 7 bits to represent it

Minimum positive value : 1, it's -90.3... dBFS, and you need 2 bits to represent it

Zero value : 0, it's -infinity dBFS, and you need 1 bit to represent it

Minimum negative value : -1, it's -90.3... dBFS, and you need 1 bit to represent it

Some small negative value: -14, it's -67.38... dBFS, and you need 4 bits to represent it

Maximum negative value : -32768, it's 0 dBFS, and you need all 16 bits to represent it

Now I see why my graph is totally off!

I’m trying to digest your numbers and figure out how you got them now.

Is there a formula I should know to get those relationships? I'd love to know, even if the math is over my head. I suppose that's the only way to

Oh, and thanks for the correction about it not being "quantization steps" but signal values. I'm thinking of the quantization steps as a "grid" that determines the precision and range of possible values. Does that make sense?

Title: **Re: Are quantization steps equal in size & evenly distributed in the dynamic range?**

Post by:**lvqcl** on **2018-08-05 18:17:56**

Post by:

value: N

relative value: N / 32768

value in decibels: 20 * log10( N / 32768 )

for example: value = 16384; relative value = 0.5; decibels = 20 * log10 (0.5) = -6.02 dBFS.

relative value: N / 32768

value in decibels: 20 * log10( N / 32768 )

for example: value = 16384; relative value = 0.5; decibels = 20 * log10 (0.5) = -6.02 dBFS.

Title: **Re: Are quantization steps equal in size & evenly distributed in the dynamic range?**

Post by:**FMiguelez** on **2018-08-07 18:27:59**

Post by:

Excellent. That will definitely help.

Thank you very much, lvqcl !

This is such a great forum!

Thank you very much, lvqcl !

This is such a great forum!

Title: **Re: Are quantization steps equal in size & evenly distributed in the dynamic range?**

Post by:**pelmazo** on **2018-08-08 18:37:46**

Post by:

I'm thinking of the quantization steps as a "grid" that determines the precision and range of possible values. Does that make sense?

Yes, it makes sense and is correct as long as there's no noise entering the picture. The quantization steps are like the tick marks on a ruler.

In a real system, there will be noise, because that's physically unavoidable. The ADC itself, for example will suffer from noise, which means that the ruler itself shakes and dithers a bit, so that there will be a small insecurity in quantization. The analog signal that is going to be quantized is also noisy. If you have enough noise, it will blur the quantization to such an extent, that the resolution limit of the quantization effectively disappears, and the whole thing is limited by the noise.

In practice, you end up balancing noises, and rather than looking at bits and quantization steps, you look at noise levels and signal-to-noise ratios, which happen to be and mean the exact same thing as in analog audio.

Title: **Re: Are quantization steps equal in size & evenly distributed in the dynamic range?**

Post by:**KMD** on **2018-08-21 15:01:13**

Post by:

Considering the size of the quantization step, to the size of the signals large and small, the quantization step is a greater proportion of the small signal. However this relationship between noise and signal size also exists in an analogue system and by using dither the effect is manipulated to have the same effect as noise in an analogue system .

Title: **Re: Are quantization steps equal in size & evenly distributed in the dynamic range?**

Post by:**Stacker** on **2018-08-24 06:10:40**

Post by:

@Fmiguelez - It seems to me that your original question is indicating that you may have misunderstanding of the binary number system. Perhaps a study into the binary number system will give the enlightenment you are seeking.

All the best

Stacker

All the best

Stacker

Title: **Re: Are quantization steps equal in size & evenly distributed in the dynamic range?**

Post by:**DVDdoug** on **2018-08-24 18:59:25**

Post by:

Since this topic is still alive...

CDs, WAV files, and uncompressed DVD audio is PCM (pulse code modulation). On DVDs you'll see**L**PCM which means **linear** PCM.

That means linear quantization (all of the "steps" are the same amplitude). CDs and WAV files are also linear PCM but for some (marketing?) reason they add the "L" when talking about DVDs.

CDs, WAV files, and uncompressed DVD audio is PCM (pulse code modulation). On DVDs you'll see

That means linear quantization (all of the "steps" are the same amplitude). CDs and WAV files are also linear PCM but for some (marketing?) reason they add the "L" when talking about DVDs.

Title: **Re: Are quantization steps equal in size & evenly distributed in the dynamic range?**

Post by:**pelmazo** on **2018-08-25 12:15:33**

Post by:

CDs and WAV files are also linear PCM but for some (marketing?) reason they add the "L" when talking about DVDs.I don't think it had anything to do with marketing. It is just to distinguish it from nonlinear forms of PCM which have also found occasional use. For example, the long-play mode of DAT used a non-linear form of PCM to increase signal-to-noise ratio of a 12-bit wordlength. Those variants have not achieved much prominence in professional or consumer audio, so it is usually safe to assume that PCM actually means LPCM. The telecom folks, however, have used nonlinear PCM very widely.