Apéndice 38
The scalar quantization operator

A quantizer is a function that applied to a digital signal produces other digital signal of the same size, but where the number of possible sample values (representation levels) is reduced. This process generates an irreversible loss of information in the signal. The difference between the original samples Si and its quantized version QN(S) is named the quantization error. A well designed quantizer should minminze this error signal.

When the quantization is scalar, this correspondence can be done using only an input sample for each output sample. A scalar quantizer with N representation levels is defined by

         (
         || x0     if Si < d1
         |{ x1     if d1 ≤ Si < d2
QN (Si) = | ..     ..
         ||( .      .
           xN -1  if Si > dN-1

where

          Z-
di = xi- 1 + 2

are the decision levels and where

Z = xi+1 - xi

is the quantization step size.