forge
Explore
Log in

Don't you dare go Hollow

Commits

Commits on mainFiltered to crates/ec-vp9/src/modes.rsClear filter

2026-10-23

Restore edith_codecs after local data loss (2026-10-23)Ahmet Kaan Gümüş · b7434a2
Restore edith_codecs after local data loss (2026-10-23)

On 2026-10-23 an automated agent ran `rm -rf $HOME` and deleted the local
repository with all of its history. This commit restores the working tree
from the newest surviving copy, the host-c server lane mirror. That mirror
matches local main as of the testcut Phase 2 reports, including the tool
cache, the nextest fast profile and changed-crates.sh. The history before
this commit was not recovered.

2026-09-17

Merge lane-vp9-inter: VP9 inter syntax next to tile-row byte-exactnessAhmet Kaan Gümüş · 9f13c77
Merge lane-vp9-inter: VP9 inter syntax next to tile-row byte-exactness

Both sides descend from 43c9c913 and both touched the tile/context setup, so
decode.rs and modes.rs conflicted. Resolved by combining:

- decode.rs keeps the tile-row work's signatures: decode_block and
  decode_partition no longer carry tile_row_start, so the inter lane's
  read_inter_block_info and its own tile walk thread tile_col_start alone,
  and decode_block's keyframe call passes the whole FrameContext (&self.ctx)
  as the tile-row revision does. The inter parse path is semantically
  unchanged: it allocates a fresh MiState per tile, so a frame-scoped
  above-availability gate sees no decoded cell above that tile's own
  row_lo, exactly what the dropped tile_row_start gate saw.
- modes.rs keeps the tile-row frame-scoped MiState::above_mi (mi_row != 0)
  AND the inter lane's new MiState::at() helper.
- The inter walk's tile loop drops the tile_row_start argument it passed to
  decode_partition; inter.rs's InterBlockCtx loses its tile_row_start field.

Folded in (verifier policy finding): scratch_interdump.rs FAILS when
INTER_IVF is explicitly set to a file that does not exist; the loud SKIP is
kept only for the unset default.

Evidence on the merged tree: cargo test -p ec-vp9 green (18 suites, 27
passed, keyframe_exact 4/4 incl. inter_is_named_unsupported); cargo check
--all-targets adds no warning beyond the 5 baseline ones; inter gate
1213/1851 blocks; tr/tr2/w1366/h242 sweeps each "RESULT 3 of 3 frames
byte-exact"; explicit-missing-fixture run fails as required.
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).
vp9kf: tile-ROW streams decode byte-exact -- MI-aligned extents, frame-scoped contextsAhmet Kaan Gümüş · 332f251
vp9kf: tile-ROW streams decode byte-exact -- MI-aligned extents, frame-scoped contexts

Tile-row streams (log2_tile_rows > 0) now decode byte-exact: tr.ivf and
tr2.ivf 3 of 3 frames, previously 0 of 3. Seven fixes, each ported from
libvpx with its line:

1. tx probabilities come from the frame's FrameContext tables
   (get_tx_probs, vp9_pred_common.h:173), not the TX_* const defaults.
2. the tx-size context carries libvpx's "if (!has_above) above_ctx =
   left_ctx" fallback (vp9_pred_common.h:156-170).
3. above availability is gated on the FRAME (mi_row != 0, set_mi_row_col
   vp9_onyxc_int.h:430), not on the tile-row start; tile_row_start is gone
   from the decode chain.
4. ectx/mi are frame-scoped: allocated once per frame, above cleared once,
   left per SB row (vp9_decodeframe.c:2079-2083 / :2260-2261).
5. the above entropy/partition arrays are sized mi_cols_aligned_to_sb,
   closing a pre-existing OOB panic at widths not a multiple of 8
   (decode.rs:767 on a 1366-wide frame; the baseline panicked too).
6. intra edge extension is a branch-for-branch port of
   vp9_reconintra.c:300-394: the extend-vs-direct decision comes from
   mb_to_bottom_edge/mb_to_right_edge, the extension length from the
   MI-ALIGNED buffer extent (vp9_alloc_frame_buffer sets y_width =
   (width+7)&~7 -- yv12config.c:173-174,250-251), and the arithmetic is
   isize, closing an "attempt to subtract with overflow" at intra.rs:72 on
   320x242.
7. the chroma loop filter takes no plane-width bound: all five uv_w column
   clamps are gone, matching vp9_filter_block_plane_ss11's unclamped
   MI_BLOCK_SIZE>>1 groups (vp9_loopfilter.c:1394, :313-399) which write
   into the padded plane. At 1366 wide the last chroma group overhangs the
   visible plane by 4, so every clamped edge was dropped: luma stayed
   byte-exact while chroma was off by one (U 4/5/6, V 37/33/16).

Matrix (scratch_realsweep, 3 frames each): h242, h1082, h1082tr, h1082trc,
tr, tr2, t1080, t1080-single, single1080, w1366, w1366tc and the 320x240
tile0 sweep are all byte-exact. Still unexercised: odd width x odd height x
tile ROWS -- the encoder declines -tile-rows at those heights.

Verified by an independent reviewer with revert-alone discrimination: a
visible-length extent fails h242/h1082, a 64-aligned extent fails the 1080p
fixtures, the MI-aligned extent passes all; restoring the uv_w clamps
reproduces the chroma-only residue exactly. cargo test -p ec-vp9 is green
and cargo check prints the 5 baseline warnings.

2026-09-14

vp9kf: d153 row, idct32 stage 8, flat2 q0, chroma tx-grid — Y byte-exactAhmet Kaan Gümüş · 82ca712
vp9kf: d153 row, idct32 stage 8, flat2 q0, chroma tx-grid — Y byte-exact

generic d153 no longer skips row 1; idct32 runs vpx stage 8; flat_mask5
compares q4..q7 to q0 (not p0). Pre-LF Y matches libvpx; post-LF Y matches
ffmpeg. Chroma still 16 U + 20 V off (HANDOFF #6). Not pushed.
vp9kf: entropy round 2 — trees, kf partition probs, 8x8 partition symbol, tile-info boundsAhmet Kaan Gümüş · c445467
vp9kf: entropy round 2 — trees, kf partition probs, 8x8 partition symbol, tile-info bounds

- INTRA_MODE_TREE leaf order fixed to libvpx vp9_intra_mode_tree; the invented
  spec-doc chain UV_MODE_TREE deleted (v1.15 decodes uv with the same tree,
  decodemv.c:232). SEGMENT_TREE corrected to vp9_seg_common.c:58 balanced form.
- Keyframes now code partitions with vp9_kf_partition_probs (added; spec 7.2),
  not the inter defaults. FrameContext::new(key_frame).
- The 8x8-level partition symbol is read (decodeframe.c:1188 runs before the
  !hbs branch); sub-8x8 shapes occupy the full 8x8 mi area (luma 2x2 4x4 TUs,
  chroma 4x4 once per 8x8). bsize_of_n4 mapping fixed (2->16x16, 1->8x8).
  Duplicate kf_uv_probs removed from modes.rs (kept in tables).
- ec-vp9-syntax DEVIATION (flagged for merge review): tile_cols_log2_bounds
  returned max-1, skipping the terminating tile-cols increment bit; bounds are
  now inclusive and rows mirrors vp9_get_tile_n_bits. Test re-pinned to
  libvpx/spec values (1920 -> (0,3), 3840 -> (0,4), 1 -> (0,1)).
- keyframes_match_ffmpeg still FAILING (ours 120 vs 72 at pixel (0,0); was 133).
  inter_is_named_unsupported PASSES as a named Error. Debug traces (TILE/B/C/RC,
  EC_VP9_FORCE_TAIL) and scratch_* harnesses kept for the next round; see
  lanes/vp9kf.report.md HANDOFF #2.