A deblocking filter is the cleanup step every modern video codec runs to hide the squares. Codecs compress video by breaking each frame into small blocks (16×16, 32×32, 64×64 pixels) and processing each block somewhat independently. When compression gets aggressive, the boundaries between those blocks start to show — you see a faint grid pattern across the picture, especially on smooth surfaces like skin, sky or walls. That visible grid is called "blocking", and it's the most common compression artefact in cheap or over-squeezed video.

The deblocking filter looks at every block boundary and gently smooths it out — softening the difference between adjacent blocks just enough to make the seam invisible without blurring the actual image content. The smoothing strength is adaptive: stronger on flat areas where the seam would stand out, lighter on textured or detailed areas where over-smoothing would erase real detail.

What makes deblocking special is that it runs inside the decoding loop, before the frame is used as a reference for predicting later frames. Cleaner reference frames mean cleaner predictions, which means smaller files. The filter is mandatory in H.264, HEVC, VP9 and AV1; turning it off in test encodes drops both visual quality and compression efficiency by several percent. For a product team, deblocking is one of those invisible features you only notice if it's missing: when you see videos with a visible "checkerboard" pattern on calm scenes, that's a sign the codec or encoder skipped or weakened the deblocking stage.