Skip to content

Quantisation Parameter (QP)

Definition

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 more data loss. Re-encoding a video that was already compressed at a given QP leaves a characteristic distribution in the second-generation residuals that differs from compressing raw content.

Applies to
H.264 and H.265 video codecs
Controls
Coarseness of DCT coefficient rounding
Direction
Higher QP means more compression, more data loss
Forensic use
Detecting re-encoding via second-generation residual patterns
Sub-field
Digital and multimedia forensics, video authentication

Common questions

Why does re-encoding leave a detectable trace in the residuals?+

When already-compressed video is decoded and re-encoded, the new rounding step interacts with quantisation artefacts left by the first pass, producing statistical irregularities in coefficient distributions that differ from footage compressed only once.

Can QP values vary within a single video file?+

Yes, encoders commonly adjust QP per block or per slice to allocate bits adaptively, spending less on flat regions and more on detailed or fast-moving ones, so a file rarely has one uniform QP throughout.

Does knowing the QP alone prove a video was manipulated?+

No, QP analysis identifies compression history and re-encoding, which is consistent with editing but can also result from innocent actions such as platform transcoding, so it is one indicator combined with other evidence.

Related terms

DCT Coefficient Histogram
A histogram of the discrete cosine transform coefficients across macroblocks or coding units in a frame or clip. After a single encode,...
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 Compression
The condition in which a video has been encoded at least twice through a lossy codec. The term is also used loosely...
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...
Group of Pictures (GOP)
The periodic structure of I-frames, P-frames, and B-frames in a compressed video stream. Each encoding generation imposes its own GOP structure. When...
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...
Intra-Refresh Artefact
The elevated count of intra-coded macroblocks or CTUs at frame positions that correspond to the I-frame interval of a previous encoding generation....
Macroblock
The fundamental coding unit in most video codecs: a 16x16 pixel block in luma (brightness) and the corresponding chroma samples. Macroblocks are...
Macroblock (MB) / Coding Tree Unit (CTU)
The basic spatial coding unit: 16x16 pixels in H.264 (macroblock) and up to 64x64 pixels in H.265 (CTU). Each unit is classified...
Quantisation
The step in lossy compression where DCT coefficients are divided by a quantisation parameter and rounded to integers. Higher quantisation parameters produce...

Explained in these topics

Your journey to becoming a forensic professional starts here.

Practice with mock tests, learn from structured notes, and get your questions answered by a global forensic community, all in one place.