forge
Explore
Log in

Don't you dare go Hollow

Commits

Commits on 8dbd683068d7f87f21dcc4ed1dfdca786d82c52bFiltered to crates/ec-h265/src/deblock.rsClear filter

2026-08-26

feat(h265): in-loop deblocking filter, on by defaultAhmet Kaan Gümüş · 96b7b12
feat(h265): in-loop deblocking filter, on by default

Spec 8.7.2, written from the text. An intra-only stream simplifies it
twice over: intra prediction reads unfiltered reconstruction, so the
filter is a post-pass over the finished picture and the picture-hash SEI
stays honest; and every edge has bS = 2, so the whole strength
derivation reduces to finding the transform-block boundaries.

TuMap carries one byte per 4x4 unit -- log2 of the transform covering
it. Transform blocks of side S are aligned to multiples of S, so an edge
at x is a boundary exactly when x % S == 0, and no edge list is needed.
Each wavefront worker publishes its band; the encoder stitches them,
filters every vertical edge, then every horizontal one over the result.

Writing the filter exposed an encoder bug: the RQT split trial marks
four child transform blocks, and when the nosplit trial won nothing
rewrote those cells, so the map reported a boundary inside a 32x32
transform. Reconstruction and coefficients were restored between trials;
the side map was not. The nosplit branch now marks its own transform,
and tu_log2 rides the CU-depth meta snapshot.

ffmpeg decodes every shape bit-exactly with the filter on. BD-PSNR
against a deblocking x265, our filter off then on: film -0.197 ->
+0.063 dB, screen capture +0.606 -> +0.693, web clip +0.567 -> +0.686,
phone clip +0.113 -> +0.162, synthetic +8.781 -> +8.796. Every clip
improves, so it defaults on.