ALF — Adaptive Loop Filter — is one of the post-decode cleanup filters that runs inside modern codecs to reduce compression artefacts before each frame is stored as a reference for the next one. It was introduced in VVC (H.266) as the third in-loop filter after deblocking and SAO (Sample Adaptive Offset), and it's the most sophisticated of the three. Instead of using fixed rules to smooth boundaries or shift sample values, ALF uses an adaptive filter trained on each block of the frame to remove statistical noise patterns.
Mechanically, ALF classifies each block by its content (smooth area, edge with this direction, edge with that direction, texture, etc.) and applies a different finely-tuned filter to each class. The filter coefficients are computed by the encoder, included in the bitstream, and applied identically by every decoder. The result is cleaner reference frames, which means subsequent frames predict better from them, which means smaller files for the same quality. It's the most expensive in-loop filter to run, but contributes a meaningful chunk of VVC's compression gains over HEVC.
For a product team, ALF is part of the architectural reason VVC compresses better than HEVC. The downside is that ALF is computationally heavy at both encode and decode time — much more than the simpler SAO and deblocking that HEVC uses. That's one reason VVC hardware decode took years longer to ship than the standard itself: silicon designers had to figure out how to run ALF efficiently at 8K speeds. Once that hardware exists (Intel Lunar Lake, MediaTek Pentonic in 2024–2025), ALF stops being a problem and the compression benefit just falls through.

