[]
This abstract class provides the general interface for quantizers. The input of a quantizer is the output of a wavelet transform. The output of the quantizer is the set of quantized wavelet coefficients represented in sign-magnitude notation (see below).
<p>This class provides default implementation for most of the methods
(wherever it makes sense), under the assumption that the image, component
dimensions, and the tiles, are not modifed by the quantizer. If it is not
the case for a particular implementation, then the methods should be
overriden.</p><p>Sign magnitude representation is used (instead of two's complement) for
the output data. The most significant bit is used for the sign (0 if
positive, 1 if negative). Then the magnitude of the quantized coefficient
is stored in the next M most significat bits. The rest of the bits (least
significant bits) can contain a fractional value of the quantized
coefficient. This fractional value is not to be coded by the entropy
coder. However, it can be used to compute rate-distortion measures with
greater precision.</p><p>The value of M is determined for each subband as the sum of the number
of guard bits G and the nominal range of quantized wavelet coefficients in
the corresponding subband (Rq), minus 1:</p><p>M = G + Rq -1</p><p>The value of G should be the same for all subbands. The value of Rq
depends on the quantization step size, the nominal range of the component
before the wavelet transform and the analysis gain of the subband (see
Subband).</p><p>The blocks of data that are requested should not cross subband
boundaries.</p><p>NOTE: At the moment only quantizers that implement the
'CBlkQuantDataSrcEnc' interface are supported.</p>
This class implements scalar quantization of integer or floating-point valued source data. The source data is the wavelet transformed image data and the output is the quantized wavelet coefficients represented in sign-magnitude (see below).
<p>Sign magnitude representation is used (instead of two's complement) for
the output data. The most significant bit is used for the sign (0 if
positive, 1 if negative). Then the magnitude of the quantized coefficient
is stored in the next M most significat bits. The rest of the bits (least
significant bits) can contain a fractional value of the quantized
coefficient. This fractional value is not to be coded by the entropy
coder. However, it can be used to compute rate-distortion measures with
greater precision.</p><p>The value of M is determined for each subband as the sum of the number
of guard bits G and the nominal range of quantized wavelet coefficients in
the corresponding subband (Rq), minus 1:</p><p>M = G + Rq -1</p><p>The value of G should be the same for all subbands. The value of Rq
depends on the quantization step size, the nominal range of the component
before the wavelet transform and the analysis gain of the subband (see
Subband).</p><p>The blocks of data that are requested should not cross subband
boundaries.</p>
This interface defines a source of quantized wavelet coefficients and methods to transfer them in a code-block by code-block basis. In each call to 'getNextCodeBlock()' or 'getNextInternCodeBlock()' a new code-block is returned. The code-blocks are returned in no specific order.
<p>This class is the source of data for the entropy coder. See the
'EntropyCoder' class.</p><p>Code-block data is returned in sign-magnitude representation, instead of
the normal two's complement one. Only integral types are used. The sign
magnitude representation is more adequate for entropy coding. In sign
magnitude representation, the most significant bit is used for the sign (0
if positive, 1 if negative) and the magnitude of the coefficient is stored
in the next M most significant bits. The rest of the bits (least
significant bits) can contain a fractional value of the quantized
coefficient. The number 'M' of magnitude bits is communicated in the
'magbits' member variable of the 'CBlkWTData'.</p><p>Note that no more of one object may request data, otherwise one object
would get some of the data and another one another part, in no defined
manner.</p>