I begin to study how codec works, and I found a "summary-diagram" for DCT-codec (DCT stands for Discrete Cosine Transform). On this diagram, there are of course two steps: the encoding step and the decoding one. I try to make a reproduction of this diagram herebelow:

ENCODING STEP Image (8*8 blocks) -->| FDCT |-->| Quantizer |-->| Entropy Encoder |--> Compressed data

DECODING STEP Compressed data -->| Entropy Decoder |-->| Dequantizer |-->| IDCT |--> Image (8*8 blocks)

The diagram seems clear to me, except the "Dequantizer". I don't understand how the quantification step can be reversed, since it is this step that causes information loss. What does this "block" do? Can someone give me more precisions?



Formally, the quantization is a mapping from a partitioned interval $[-A, A] = \cup_{k=1}^N I_k$ to the set of integers $\{1, \ldots, k\}$. The dequantization is the mapping from the quantization indices to a set of values $x_k$ chosen from each $I_k$.

When the quantizer used is uniform without any scaling (that is to say, when it is a simple rounding), the dequantizer is the identity. But when the quantizer is non-uniform, the integer passed into the entropy coder is not just a "rounded" value of the coefficient - an exponent, scaling factor, or any other monotonous transformation might have been applied to it. The dequantizer will have to reverse all the reversible steps in the quantification operation.

For example, in the AAC codec, the quantized value sent to the entropy coder is:

$$Q(x_i) = \text{sgn}(x) \left[\left(\frac{|x_i|}{s_i}\right)^\frac{3}{4} + 0.4054\right]$$

So the dequantizer will have to apply a $\frac{4}{3}$ exponent and multiply by the scale factor $s_i$ to recover the value.

| improve this answer | |
  • $\begingroup$ Great answer! Indeed I thought every quantization step was uniform, that is why dequantization had no real mean... One more question, chat is the aim of a non-uniform quantization step such as in your example for the AAC codec? $\endgroup$ – MarAja Jul 29 '13 at 9:52
  • $\begingroup$ Compared to a uniform quantizer, this quantization rule gives more resolution to the higher values. This is important for audio coding applications since the spectral components with the highest energy will be the most salient perceptually. A quantization rule is often selected empirically (using perceptual test as a guide), but in theory it could have been selected by taking into account: a/ the distribution of the input values (more resolution should be allocated to the most common values) and b/ a cost function penalizing certain types of errors. $\endgroup$ – pichenettes Jul 29 '13 at 10:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.