CDEF — Constrained Directional Enhancement Filter — is AV1's directional in-loop cleanup filter, applied during decode to reduce ringing and blurring artefacts near high-contrast edges before the frame is used as a reference for the next one. It's the AV1 equivalent of HEVC's SAO (Sample Adaptive Offset) and VVC's ALF, but uses a fundamentally different approach: instead of statistical smoothing, CDEF detects the dominant direction of edges in each block and filters along that direction, preserving the edge while cleaning the noise alongside it.

Why this matters: aggressive compression of high-contrast edges produces visible "ringing" — faint repeated lines parallel to the edge — and the deblocking filter alone doesn't catch these because they're not at block boundaries. CDEF specifically targets that ringing, especially around text, hard graphic edges, and the line where a bright object meets a dark background. The result is noticeably cleaner-looking edges at the same bitrate, which matters for streaming services delivering animation, screencasts, and graphics-heavy news content.

For a product team, CDEF is invisible technology that shows up in the AV1 quality advantage on certain content types. Sports and natural footage compress similarly in AV1 and HEVC; animation, anime, screencasts and slide-heavy content compress notably better in AV1, and CDEF is a big reason why. Like other in-loop filters, CDEF runs identically in every compliant AV1 decoder — there's nothing to tune from the encoder side except whether to enable it (which you always do). It's just part of what AV1 brings to the table compared to older codecs.