Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Are quantization steps equal in size & evenly distributed in the dynamic range? (Read 6758 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

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



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…

--- Would it be accurate to say that in a 16-bit quantizer, each bit is represented by 2048 uniform quantization steps? Would each of the 16 bits have 6.02 dB of range represented by 2048 steps?
(my reasoning is that there are 65,563 steps in a 16 bit quantizer. Then I must divide them by 2 because one half are to represent positive values of a signal and the other for negative values, so I simply divide the 32,768 actual steps by 16 to get the number of quantization steps per bit? Did I get this right?) 

--- 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?


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

Thank you for any comments.

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

Reply #1
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.

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

Reply #2


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 precision, the signals would be equally  “pure”,  actually identical, yes?

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)>



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!

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

Reply #3
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 precision, the signals would be equally  “pure”,  actually identical, yes?
Yes, the quantization noise is the same.

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

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

Reply #4
Quote from: lvqcl
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

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

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 really understand this...

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?

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

Reply #5
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.

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

Reply #6
Excellent. That will definitely help.

Thank you very much, lvqcl !

This is such a great forum!

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

Reply #7
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.

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

Reply #8
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 .

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

Reply #9
@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
In the beginning there was ONLY noise, then came the signal.

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

Reply #10
Since this topic is still alive...

CDs, WAV files, and uncompressed DVD audio is PCM (pulse code modulation).    On DVDs you'll see LPCM 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.



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

Reply #11
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.