diff --git a/lanes/sb128-r3.handoff.md b/lanes/sb128-r3.handoff.md new file mode 100644 index 00000000..5d1a8375 --- /dev/null +++ b/lanes/sb128-r3.handoff.md @@ -0,0 +1,94 @@ +# lane-sb128 r3 handoff (turn cap) + +Branch `lane-sb128`, worktree `edith_codecs-sb128`. Two commits this round: +`dbf15a4` (TASK 1 fix), `d6cca7d` (TASK 2 fix + refusal lift, WIP: suite not run). + +## TASK 1 -- the 7 rect/AB firing-counter reds: ATTRIBUTED AND FIXED (`dbf15a4`) + +Attribution table (same 7 gate names, run by name, own `CARGO_TARGET_DIR`): + +| tree | result | log | +| --- | --- | --- | +| main `0df090a` (detached worktree) | 7 passed | `$HOME/.cache/sb128-verify7.log` | +| lane r1 `5e5f113` | 7 passed | `$HOME/.cache/sb128-verify-r1.log` | +| lane merge `63890cb` | 7 passed | `$HOME/.cache/sb128-verify-merge.log` | +| lane r2 `807c110` | 7 FAILED | `$HOME/.cache/sb128-lane7.log` | +| lane r3 `dbf15a4` | 7 passed | `$HOME/.cache/sb128-lane7b.log` | + +LANE-CAUSED, and not a merge residue: r2 blanket-rewrote every +`"--min-partition-size=16"` in `stream.rs`'s aomenc recipes to `=32` while writing +its own 128 gate -- 13 lines across 13 gates, 7 of which assert a firing counter. +With min-partition 32 aomenc never emits a 16-level partition, so those streams +still decoded PIXEL-EXACT while `HORZ_A_32` / `rect_partition_hits` / the 1:4 and +strip counters read 0 and the "never fired" guard red-lined them. Fix = revert +exactly those 13 lines (diff-matched old-vs-new, not a sed); no counter bump site +was lost in the merge, that hypothesis is DISPROVED. + +EVIDENCE: `$HOME/.cache/sb128-lane7b.log` | `cargo test -p ec-av1 --lib -- <7 names>` +on `dbf15a4` | `test result: ok. 7 passed; 0 failed`. + +## TASK 2 -- inter frames at 128, frame 6: ROOT-CAUSED AND FIXED (`d6cca7d`) + +Stream re-pinned (sha256 twice, identical): +`.../scratchpad/sb128-inter8.obu` = `3e991db7aa7f6d6f70b91b41417b7741d0468343ee4e19e1adf7db066e3c8981` + +Ladder actually walked: +1. `EC_AV1_PREFILT_DUMP` both sides -> decode-order frame 6 differs PRE-FILTER, + 957 bytes, all inside luma y=96..127 x=0..31, i.e. ONE 32x32 block at mi(24,0). + So it is reconstruction, not deblock/CDEF/LR. +2. `EC_OBMC=1` on aomdec: 0 lines on this stream -- OBMC EXONERATED. +3. Ablation `set_reach_superblock_px(64)` (r1's sb-aware intra `Reach`): frame 6 + still 957 bytes wrong -- Reach EXONERATED. +4. Mode info EQUAL: located the oracle's line by matching `mi_row/mi_col` AND the + pre-mode `rng` (entropy in sync, so ranges match block for block): + both sides `mode=24 (NEW_NEWMV) ref0=3 ref1=5 stack=3`. Ours resolved + `mv0=(847,-105)`, oracle `mv0=(792,-245)`. +5. The MV STACK ORDER differed, from ONE missing weight-2 vote: + oracle `(569,-380) w=6 / (624,-240) w=6 / (802,-381) w=4` + ours `(624,-240) w=6 / (802,-381) w=4 / (569,-380) w=4`. + Spatial scans found NOTHING for this block (mi_col=0, no left; row scan empty), + so every candidate is TEMPORAL. + +ROOT CAUSE: `mvstack.rs::find_mv_stack_compound` never ported libaom's three +`tpl_sample_pos` EXTENSION samples (`mvref_common.c:591`, gated by `allow_extension` ++ `check_sb_border`). The SINGLE-ref twin `find_mv_stack` has them (mvstack.rs ~900); +the compound twin stopped after the main `blk_row/blk_col` loop. Class: +`neighbour-votes-all-its-fields` / asymmetric port -- a compound twin missing a +whole scan phase of its single-ref sibling. NOT sb128-specific: `check_sb_border` +masks with libaom's hardcoded `mi_size_wide[BLOCK_64X64]` (16), never `seq.sb_size`. +sb128 only made aomenc pick the compound NEW_NEWMV block that exposed it. + +Fix (`d6cca7d`): the extension loop added to the compound path, both sides +projected through `motion_field::add_tpl_ref_mv`, `add_compound_candidate(..., 2)`. + +EVIDENCE: `.../scratchpad/pf/{aom,ours}.f0..f8` | `decode_probe` + instrumented +`aomdec`, both under `EC_AV1_PREFILT_DUMP`, on the pinned obu | +all 9 decode-order frames 0 differing bytes (was: frame 6, 957 bytes). + +Also in `d6cca7d`: inter-at-128 refusal DELETED from `stream.rs` and from +`refusal_inventory.rs`; the reproducer gate `a_real_aomenc_inter_sequence_with_ +128x128_superblocks_decodes_pixel_exact` UN-`#[ignore]`d; debug scaffolding removed +(`EC_ABL_REACH64`, `EC_TRACE_MV`); an `EC_MODE_VAL`/`EC_STACK` trace kept on the +compound path under `EC_TRACE_MODE`, byte-format-identical to the oracle's rung-4. + +## NOT DONE -- exact next steps for r4 + +1. RUN THE UN-IGNORED GATE (both bit depths; only the 8-bit arm was proven, via + `decode_probe` on the pinned obu, not through the gate): + `cargo test -p ec-av1 --lib -- --nocapture inter_sequence_with_128x128` +2. Siblings, then the full suite -> `$HOME/.cache/sb128-suite-r3.log`, expect 0 + failed: `128x128` gates, `inter_sequence*`, `obmc`, `temporal_mv_candidates`, + `superblock_level_*`, the 7 rect/AB names above, `refusal_inventory`, + `gate_coverage`. The compound-tpl fix touches EVERY compound inter block in the + crate, so treat any red as this fix, not as flake. +3. SWEEP THE CLASS: diff `find_mv_stack` against `find_mv_stack_compound` phase by + phase (only the extension loop was checked); the same "compound twin dropped a + phase" shape may sit in the outer row/col scans or the extra-search fill. +4. Verifier note still owed: cdef/LR/delta_q arms with noise (`cdef_bits>0`) on the + 128 gate, and the r1 gate's content-free arms. +5. Film: `reelc-head.obu` through `decode_probe` -- expect the 128-root + NONE/HORZ/VERT/AB refusal (sibling lane `lane-sb128b` owns it), NOT the inter one. + +HANDOFF: d6cca7d -- TASK 1 fixed and proven by attribution table; TASK 2 root-caused +(compound MV stack was missing libaom's three tpl extension samples) and fixed with +all 9 frames prefilt-exact, refusal lifted and gate un-ignored, but NO suite run yet.