]> Dirac: Quantisation
Dirac Home
Navigation item arrowHome
Navigation item arrowDocumentation
Navigation item arrowDirac Algorithm
Navigation item arrowContents
Navigation item arrowIntroduction
Navigation item arrowArchitecture
Navigation item arrowRDO
Navigation item arrowTransform coding
Navigation item arrowMotion estimation
Navigation item arrowMacroblocks
Navigation item arrowMotion vector coding

SourceForge.net Logo
Valid XHTML 1.1!
Quantisation

Previous: Parent-Child relationships
Next: RDO selection of subband quantisers

Dead-zone quantisation

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

[ ( N 1 2 ) Q f , ( N + 1 2 ) Q f ]

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.

Downloading a GIF rendering as your browser doesn't support SVG. Please ignore the "install additional plugins" message if you see it. More details Sorry, your browser can't connect to the server to download a GIF substitute.
        Either install an SVG-enabled browser or connect to the internet to download the diagram.

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

[ N Q f , ( N + 1 ) Q f ]

for N>0 and

[ ( N 1 ) Q f , N Q f ]

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.

N=Q(v)= | v | Q f  if v0 N=Q(v)= | v | Q f  otherwise

where the braces ⌊⌋ mean that the remainder is to be discarded. The corresponding reconstructed value v ˜ is given by (an integer approximation to):

v ˜ =0 if N=0 v ˜ =(N+X) Q f  if N>0 v ˜ =(NX) Q f  if N<0

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.

Previous: Parent-Child relationships
Next: RDO selection of subband quantisers