Thursday, July 8, 2010

Quantization (codec)

A quantiser maps a signal with a range of values X to a quantised signal with a reduced range of values Y. It should be possible to represent the quantised signal with fewer bits than the original since the range of possible values is smaller.

A scalar quantiser maps one sample of the input signal to one quantised output value and a vector quantiser maps a group of input samples (a "vector") to a group of quantised values.

A simple example of scalar quantisation is the process of rounding a fractional number to the nearest integer, i.e. the mapping is from R to Z. The process is lossy (not reversible)

2 types of quantisers are listed here: a linear quantiser (with a linear mapping between input and output values) and a nonlinear quantiser that has a "dead zone" about zero (in which small-valued inputs are mapped to zero).


In image and video compression CODECs, the quantisation operation is usually made up of two parts: a forward quantiser FQ in the encoder and an "inverse quantiser" or (IQ) in the decoder.

A critical parameter is the step size QP between successive re-scaled values. If the step size is large, the range of quantised values is small and can therefore be ef?ciently represented (highly compressed) during transmission, but the re-scaled values are a crude approximation to the original signal.

 The forward quantiser in an image or video encoder is designed to map insignificant coefficient values to zero whilst retaining a reduced number of significant, nonzero coefficients.


Vector Quantisation
A vector quantiser maps a set of input data (such as a block of image samples) to a single value (codeword) and, at the decoder, each codeword maps to an approximation to the original set of input data (a "vector").

A typical application of vector quantisation to image compression [5] is as follows:
1.  Partition the original image into regions (e.g. M × N pixel blocks).
2.  Choose a vector from the codebook that matches the current region as closely as possible.
3.  Transmit an index that identi?es the chosen vector to the decoder.
4.  At the decoder, reconstruct an approximate copy of the region using the selected vector.

No comments: