Blocking artifacts are visible discontinuities along the boundaries of coding blocks in compressed video, which make the picture look as if it were assembled from small square tiles. In video quality assessment, they are the classic sign of block-based compression pushed beyond its bitrate budget, and they are one of the most recognizable impairments in streaming and broadcast delivery.
The effect is also called macroblocking or pixelation, although pixelation more correctly describes a resolution loss. Blocking appears most often in flat gradients, dark scenes, fast motion and after a transmission error, and it is especially noticeable because the human visual system is highly sensitive to straight edges that do not belong to the scene.
Why block-based codecs produce blocking
Codecs such as MPEG-2, H.264, HEVC and AV1 divide each frame into blocks and code each block separately. The residual of every block is converted with a discrete cosine transform or a related integer transform, and the resulting frequency coefficients are quantized, which means rounded to a coarser set of values to save bits.
At low bitrates, the encoder raises the quantization parameter so far that most high-frequency coefficients become zero and sometimes only the average value of a block survives. Each block is then reconstructed independently, so neighboring blocks no longer agree at their shared edge. The result is a step in brightness or color at every block boundary, forming a regular grid.
Motion compensation spreads the problem in time. When a blocky reference frame is used to predict later frames, the errors propagate until the next intra-coded frame refreshes the image, which explains why blocking sometimes builds up through a group of pictures and then suddenly disappears.
Visibility also depends on content and viewing conditions. Blocks are most obvious in smooth, low-texture regions such as skies, skin and dark walls, because there is no surrounding detail to mask the edges. Busy textures hide them better, while large screens and upscaling magnify the grid. Chroma blocks are usually less noticeable than luminance blocks, since the eye resolves color detail far less sharply than brightness detail.
Block sizes and deblocking in common codecs
The visibility of blocking depends strongly on the transform block sizes a codec can use and on whether it applies an in-loop deblocking filter, which smooths block edges inside the prediction loop so that cleaner frames are used as references.
| Codec | Transform block sizes | In-loop deblocking | Typical blocking behavior |
|---|---|---|---|
| MPEG-2 | Fixed 8×8 | No | Clear 8×8 grid at low bitrates |
| H.264/AVC | 4×4 and 8×8 | Yes, adaptive | Softer edges, smearing under stress |
| HEVC/H.265 | 4×4 up to 32×32 | Yes, plus sample adaptive offset | Large flat patches rather than a fine grid |
| AV1 | 4×4 up to 64×64, rectangular shapes | Yes, plus further loop filters | Blur and detail loss before visible edges |
Modern codecs therefore rarely show the sharp 8×8 grid typical of older broadcasts. Instead, deblocking trades edges for blur: the impairment is converted into smoothed, plastic-looking regions, which many viewers find less objectionable but which still represent lost detail.
Blocking compared with other compression artifacts
Blocking is one member of a family of coding impairments, and correct identification matters because each one has a different cause and remedy. Several of them often appear together in the same frame.
| Artifact | Appearance | Main cause |
|---|---|---|
| Blocking | Square tiles and grid edges | Coarse quantization of independent blocks |
| Banding | Stepped bands in smooth gradients | Insufficient bit depth or quantized flat areas |
| Ringing | Halos next to sharp edges | Truncated high-frequency coefficients |
| Mosquito noise | Shimmering noise around moving edges | Quantization errors that vary frame to frame |
| Chroma bleeding | Color spreading past object outlines | Chroma subsampling combined with quantization |
Banding and blocking are often confused in dark scenes, because both create visible steps. A useful test is geometry: banding follows the gradient of the image, while blocking follows the coding grid and produces horizontal and vertical lines regardless of content.
How blocking is measured
Full-reference metrics capture blocking only indirectly. PSNR treats a block edge like any other error and correlates poorly with how annoying the grid looks, while SSIM reacts more strongly because blocking changes local structure. VMAF, trained on subjective scores, generally penalizes visible blocking more consistently than either.
Dedicated no-reference blockiness metrics inspect the decoded picture alone. They compare luminance differences across known block boundaries with differences inside blocks; a ratio well above one indicates a grid. Such metrics are useful in monitoring systems for broadcast and streaming, where the original source is not available at the measurement point.
Preventing and reducing blocking artifacts
The most effective cure is to give the encoder enough bits for the content, but bitrate is not the only lever. The table below links typical situations with practical remedies.
| Situation | Underlying cause | Recommended remedy |
|---|---|---|
| Fast sports or confetti | Bit starvation in complex motion | Raise peak bitrate or use content-aware encoding |
| Dark, noisy footage | Encoder spends bits on noise | Denoise before encoding |
| Low-bitrate ladder rungs | Resolution too high for the bitrate | Lower the resolution of that rung |
| Sudden blocks after dropouts | Packet loss and lost reference data | Forward error correction or retransmission |
| Old archive transcodes | Blocking baked into the source | Post-process deblocking before re-encoding |
Encoder settings matter as well. Two-pass or constant-quality modes distribute bits according to difficulty, adaptive quantization protects flat regions, and a sufficient keyframe interval limits how long errors propagate. Transcoding an already blocky file at a higher bitrate preserves the blocks faithfully but cannot restore detail.
A non-technical view
To make video small enough to stream, the picture is cut into many small squares that are compressed one by one. When the connection is slow, each square gets very little information. It ends up as a flat patch of color.
Neighboring patches no longer match at their edges. The image then looks like a mosaic of tiles, especially in dark scenes or fast action. More data, or a smaller picture size, makes the squares disappear.
A concrete example
A streaming engineer reviews viewer complaints about a nighttime football match. The lowest rungs of the bitrate ladder showed heavy blocking on the grass whenever the camera panned quickly, because a 720p rung at 1.5 Mbit/s could not keep up with the moving texture under floodlights.
The engineer lowers that rung to 540p at the same bitrate, enables adaptive quantization and adds light denoising before encoding. In repeat tests, VMAF for the rung rises by several points and the grid is no longer visible during pans. Viewers on weak connections see a slightly softer but clean, stable picture instead of tiles.