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.