forge
Explore
Log in

Don't you dare go Hollow

Commits

Commits on dfeffbcebd64426ceeebbf03214c8d6fe57282d6Filtered to crates/ec-vp9/src/lib.rsClear filter

2026-09-19

vp9444: decode profiles 1/3 (4:4:4/4:2:2/4:4:0) and 12-bitAhmet Kaan Gümüş · f81eeb9
vp9444: decode profiles 1/3 (4:4:4/4:2:2/4:4:0) and 12-bit

Thread the frame's subsampling through plane geometry, n4 counts, uv
transform size, crop extents and the loop-filter plane dispatch; add the
non420 loop filter, the uv_txsize_lookup table and the 18-bit CAT6 token
for 12-bit. Byte-exact vs a libvpx 1.15.0 oracle across the full corpus.
vp9: decode profile 2 (10-bit 4:2:0) byte-exact vs libvpx 1.15Ahmet Kaan Gümüş · 9025ed3
vp9: decode profile 2 (10-bit 4:2:0) byte-exact vs libvpx 1.15

Store every plane as u16 and thread the frame's bd through the pixel
kernels (clip_pixel_bd, bd-scaled loop-filter thresholds, base =
128 << (bd-8) intra fills, highbd idct guard), so one decode walk serves
8- and 10-bit. The one depth-dependent bitstream element is the CAT6
coefficient token: 14 bits/vp9_cat6_prob at 8-bit, 16 bits/
vp9_cat6_prob_high12 + 2 at 10/12-bit -- ported.

Profile gate now accepts 0 and 2; profiles 1/3 and 12-bit are refused
by name; non-4:2:0 subsampling stays refused.

Byte-exact vs libvpx 1.15 on both 10-bit corpus streams (48 and 120
frames) and the whole 8-bit regression corpus. cargo test -p ec-vp9
green; warning parity (the 5 pre-existing). See lanes/vp9hbd.report.md.

2026-09-18

vp9: decode inter-frame pixels byte-exactly (MC, residual, loop filter, ref slots)Ahmet Kaan Gümüş · 83125b4
vp9: decode inter-frame pixels byte-exactly (MC, residual, loop filter, ref slots)

decode() no longer refuses inter frames. New mc.rs ports libvpx's inter
predictor: umv-border MV clamping, per-block reference border extension
(build_mc_border), the direct path window read, the four 8-tap/bilinear
convolve kernels, compound averaging and average_split_mvs. decode.rs gains
the prediction/residual/reconstruction driver, an 8-slot reference DPB that
stores each frame at its 64-aligned extent after the loop filter, and the
skip/skip_inter loop-filter mask rules.

Byte-exact against a locally built libvpx 1.15 oracle: the 1080p single-tile
inter stream (3/3 frames), both static fixture GOPs (48 frames at 1080p and
2160p), the altref stream (60/60) and a two-tile-column stream (3/3). Loop
filter verified separately by per-superblock mask identity (0 of 510 SBs
differ) and by edge-set containment. A 120-frame 60fps stream decodes
identically through frame 71 and hits an open entropy desync at frame 72,
filed in lanes/vp9pix.report.md with its disposition.

Also fixes a two-entry mv_ref_list overflow in the merged inter syntax path:
the successful second candidate add inside the different-reference loop is a
goto Done in libvpx and must leave the loop; without the break a later
candidate wrote past the list (the altref fixture panicked at frame 14).

Refusals kept/added by name: intra-only, other profiles, other subsamplings,
a reference whose coded size differs from the current frame, odd dimensions.

2026-09-17

vp9kf: VP9 inter-frame syntax parses block-for-block identical to libvpxAhmet Kaan Gümüş · 834983e
vp9kf: VP9 inter-frame syntax parses block-for-block identical to libvpx

Slice 1 of inter-frame support: an inter frame is now parsed end to end
(compressed header, mode info, MVs, references) and every block matches
libvpx 1.15's own instrumented decoder on the test stream - frame 1
1213/1213, frame 2 1851/1851 on row/col/bsize/tx/mode/skip/seg/ref0/ref1/
interp/MV - with the frame-1 compressed header bit-identical (1200/1200
bools) and frame 2 likewise.

Causes closed while getting there, each ported from libvpx with its line:
update_mv_probs is MV_UPDATE_PROB + seven literal bits + (lit<<1)|1, NOT
diff_update_prob; keyframe partition probs are a const selected by
get_partition_probs and must never be stored in a FrameContext (stored
contexts are new(false), the active keyframe copy new(true) + a
reset_inter_partition before the save); vp9_switchable_interp_tree is
{0,2,-1,-2} (libvpx's EIGHTTAP/EIGHTTAP_SMOOTH/EIGHTTAP_SHARP #defines,
not the spec's naming order); mv_ref_blocks' POSITION is {row,col} and one
accessor added .0 to the column; clamp_mv_ref's edge arithmetic is signed
(usize underflowed on a frame's partial last row) and clamps the COLUMN
with the left/right edges and the ROW with the top/bottom ones; and the
mode-derived candidate-count override sits AFTER libvpx's Done: label, so
an early exit skips it - reproduced bug-for-bug.

This slice is SYNTAX ONLY: decode() still refuses inter frames by name and
no inter pixel is produced. The keyframe path still decodes to pixels and
keyframe_exact is green.

Verified by an independent reviewer in three passes (structural claims
re-derived from libvpx source, the identity comparison re-implemented
independently, a dropped-field audit of the two stale fields, and
delta re-verification of the clamp/error-propagation/gate fixes).

2026-09-14