What is a Macroblock?
A macroblock is a rectangular group of luma and chroma samples processed as a unit in older block-based codecs such as MPEG-2 and H.264. A typical macroblock covers 16×16 luma samples.
How Macroblocks work
A macroblock groups neighboring samples so a codec can choose prediction, transform, quantization, and signaling decisions over a manageable region. The luma area is commonly divided into smaller prediction or transform blocks, and associated chroma coverage depends on the sampling format. Encoders compare coding modes and spend more bits where prediction is weak or detail is important. Decoders reconstruct the same regions and may filter their boundaries to reduce visible discontinuities.
Key facts
- 1In H.264, one macroblock spans 16×16 luma samples but may use smaller motion-prediction partitions; its associated chroma sample count varies with chroma subsampling.
- 2Block boundaries can become conspicuous after coarse quantization because neighboring regions are reconstructed independently. In-loop deblocking reduces this artifact and affects later references.
- 3HEVC replaced the macroblock-centered design with coding tree units that can split recursively. Diagnostic tools must use the terminology and partition model of the actual codec.
When Macroblocks matter
Macroblock analysis helps diagnose motion prediction, bitrate allocation, and block-shaped compression artifacts. Newer codecs may use different coding units, so tools must match the encoded format.