Having transformed the component data, each subband's coefficients
are quantised by Dirac using so-called uniform dead-zone quantisers. A
simple uniform quantiser is a division of the real line into
equal-width bins, of size equal to the quantisation factor Qf:
the bins are numbered and a reconstruction value is selected
for each bin. So the bins consist of the intervals
for integers N, which are also the labels for the bin, and
it is the labels that are subsequently encoded. The
reconstruction value used in the decoder (and for local
decoding in the encoder) can be any value in each of the bins.
The obvious, but not necessarily the best, reconstruction value
is the midpoint NQf. See the diagram, part a, below.
Figure: Uniform and dead-zone quantisers, with mid
point reconstruction values.
A uniform dead-zone quantiser is slightly different in that
the bin containing zero is twice as wide. So the bins consist
of [-Qf,Qf], with a reconstruction value of 0, together with
other bins of the form
for N>0 and
for N<0, with reconstruction points somewhere in the
intervals. The bin structure is shown in part b above with
mid-point reconstruction points.
The advantage of the dead-zone quantiser is two-fold.
Firstly, it applies more severe quantisation of the smallest
values, which acts as a simple but effective de-noising
operation. Secondly, it admits a very simple and efficient
implementation: simply divide by the quantisation factor and
round towards zero. In Dirac, this process is approximated
by a multiplication and a bitshift.
where the braces mean that the
remainder is to be discarded. The corresponding reconstructed
value
is given by (an integer approximation to):
for a reconstruction point X between 0 and 1.
A value of X=0.5, giving the mid-point of the interval might
be the obvious reconstruction point, giving as it does the
mid-point of the bin. This is indeed what we use for intra pictures.
For inter pictures (motion-compensated prediction residues) the values of
transformed coefficients in a wavelet subband have a
distribution with mean very near zero and which decays pretty
rapidly and uniformly for larger values. Values are therefore
more likely to occur in the first half of a bin than in the
second half and the smaller value of X=0.375 reflects this bias,
and gives better performance in practice.
This reconstructed value is used by the encoder to produce the
locally decoded component data, which is identical to what the
decoder would produce, after decoding the quantised value N.