An in-loop filter is a cleanup pass that runs inside the decoder as part of decoding each frame — not on the final picture sent to the screen, but before the frame is stored as a reference for predicting future frames. The "loop" in the name is the decoding loop: every decoded frame becomes a building block for the next one, and the in-loop filter makes sure each building block is as clean as possible before it gets reused.
Why this distinction matters: a regular post-processing filter just makes the displayed picture prettier. An in-loop filter improves compression too — because cleaner reference frames produce cleaner predictions, which produce smaller residuals, which compress to smaller files. The same in-loop filter must run identically in every compliant decoder (including the one inside the encoder during encoding), so the encoder and decoder agree exactly on what every reference frame looks like. If they disagreed, predictions would drift and the video would visibly fall apart over time.
Modern codecs stack multiple in-loop filters. HEVC has deblocking + SAO. AV1 has deblocking + CDEF + Loop Restoration. VVC has deblocking + SAO + ALF. Each filter targets specific artefacts: deblocking smooths block boundaries, SAO reduces edge/banding errors, CDEF preserves edges while removing ringing, ALF applies content-adaptive denoising. For a product team, in-loop filters are invisible plumbing — there's nothing to configure — but they explain why each codec generation needs more compute and produces noticeably cleaner-looking video at the same bitrate than the previous one.
The book · Volume 1 of 7
Video Encoding: A Complete Guide to Video Compression — From Pixels and Color to H.264, HEVC, AV1, Quality Metrics, and AI
An in-loop filter cleans each frame before it becomes a reference, so it improves both what viewers see and every prediction that follows. Volume 1 covers in-loop filters in detail: deblocking, SAO, ALF and CDEF, how H.264, HEVC and AV1 use them, and how they affect decode cost and quality metrics. Written by Nikolay Sapunov, CEO at Fora Soft.
Tuning in-loop filter settings for sharper encodes at low bitrate?
Send us sample encodes and settings: we test in-loop filter options on your content and give you settings with VMAF gains and decode cost measured. 250+ video products shipped since 2005.