forge
Explore
Log in

Don't you dare go Hollow

Commits

Commits on 8dbd683068d7f87f21dcc4ed1dfdca786d82c52bFiltered to crates/ec-av1-syntax/src/frame.rsClear filter

2026-08-27

fix(av1): loop filter level must not forward from the primary ref frameAhmet Kaan Gümüş · 3024af4
fix(av1): loop filter level must not forward from the primary ref frame

read_loop_filter_params only re-reads loop_filter_level[2]/[3] (chroma)
when a luma level is nonzero (spec 5.9.11); the whole LoopFilterParams
struct -- including level/sharpness -- was being seeded from the primary
reference frame's saved params before that read, so a frame whose own
luma levels are both 0 kept the PREVIOUS frame's nonzero chroma level
instead of the spec's implicit 0. Spec 7.20's load_previous only
forwards ref_deltas/mode_deltas, never level/sharpness. Isolated with a
pinned mismatching stream (seed 47, frame 1 chroma vs ffmpeg): bisected
pre/post-deblock dumps to prove the loop filter kernel itself untouched
by the bug, then a level sweep on the exact failing pixel's 6-tap window
showed a threshold flip precisely between level<=2 (matches ffmpeg) and
level>=3 (our observed wrong output) -- our decoder computed level=8
(carried from frame 0's key frame header) where the true value is 0.

Adds an env-gated EC_AV1_GATE_DUMP pin to the forwarding gate test plus
an #[ignore]d fast-reproduce test reading that pinned stream.

2026-08-14

feat(vp9,av1): bitstream header parsers for stateless hardware decodeAhmet Kaan Gümüş · ee46976
feat(vp9,av1): bitstream header parsers for stateless hardware decode

ec-vp9-syntax parses the superframe index and the whole uncompressed frame
header (profiles 0-3, colour config, size-from-reference, loop filter,
quantization, segmentation, tile info), carrying the state VP9 spreads across
frames: reference sizes, segmentation data and loop filter deltas. The spec
8.6.1 dequantization tables and the 8.8.1 loop filter level derivation ship
with it, so every field of VADecPictureParameterBufferVP9 and
VASegmentParameterVP9 comes out of the parse.

ec-av1-syntax parses OBU framing, the sequence header and the frame header in
full (superres, reference signalling incl. set_frame_refs, tile info, quant,
segmentation, delta q/lf, loop filter, CDEF, loop restoration, tx mode, skip
mode, global motion, film grain) plus tile group offsets, and derives the warp
shear validity VAWarpedMotionParamsAV1 asks for.

Both are BitReader-based, forbid unsafe, and answer malformed input with a
typed error rather than a panic. Verified against every VP9/AV1 fixture stream
with ffprobe as the oracle: dimensions, profile, bit depth, chroma, per-frame
key flags and shown-frame counts all agree, including 10-bit, 4:4:4,
monochrome, multi-tile, superframes and show_existing_frame.