Quantisation
Definition
The step in lossy compression where DCT coefficients are divided by a quantisation parameter and rounded to integers. Higher quantisation parameters produce smaller files but lower quality. The rounding is irreversible: the original coefficient values cannot be recovered exactly.
- Occurs during
- Lossy compression, after DCT
- Mechanism
- Coefficients divided by parameter and rounded
- Reversibility
- Irreversible, rounding loses exact original values
- Effect of higher parameter
- Smaller file, lower quality
Common questions
Why does quantisation leave detectable traces useful for double-compression detection?+
Each round of quantisation forces DCT coefficients toward multiples of the quantisation step, and when a video or image is re-encoded with a different quantisation parameter, the coefficient histogram shows periodic peaks and gaps that a statistical analysis can detect as evidence of prior compression.
Can the exact original DCT coefficients be recovered after quantisation?+
No. Because rounding discards the fractional part of each coefficient, the exact pre-quantisation values cannot be reconstructed; only an approximation is recoverable, which is why lossy compression is called lossy.
Related terms
- Discrete Cosine Transform (DCT)
- A mathematical transform that expresses a block of pixel values as a sum of cosine functions at different frequencies. JPEG applies the...
- Double Quantisation Effect
- The statistical artefact that appears in DCT coefficient histograms when a video or image is quantised twice with different step sizes. The...
- Intra-Frame vs Inter-Frame Coding
- Intra-frame (I-frame) coding compresses each frame independently using DCT quantisation, like a JPEG image. Inter-frame (P-frame or B-frame) coding stores only the...
- Macroblock
- The fundamental coding unit in most video codecs: a 16x16 pixel block in luma (brightness) and the corresponding chroma samples. Macroblocks are...
- Quantisation Parameter (QP)
- A per-block or per-slice value that controls the coarseness of the DCT coefficient rounding step in H.264 and H.265. Higher QP means...