forge
Explore
Log in

Don't you dare go Hollow

Lane-gm r5 -- localize (not fix) frame14 multi-slot-rotzoom mismatch

Browse files at this commit

42d6aa0960a465e694bab3bab95f24e040ddd8b7Ahmet Kaan GümüşParent: 384a874
  • docs
    • lane-gm r5 -- localize (not fix) frame14 multi-slot-rotzoom mismatch
Show full message
docs(av1): lane-gm r5 -- localize (not fix) frame14 multi-slot-rotzoom mismatch

Recaptured the lost r4 pin (seed 43, frame 14, row0/col18, determinism-verified
2x). Proved the mismatched pixel comes from a plain NEWMV/GOLDEN translational
block that never enters the new global-warp code path at all (only 7 blocks in
the whole 24-frame stream ever do, and mi=(0,0) isn't one of them) -- ruling out
CDEF/LR/deblock/hidden-frame amplification along the way. Root cause still open:
likely a per-frame mv-stack/NEWMV-predictor value that should vary per ref but
doesn't when GOLDEN+BWDREF are both concurrently ROTZOOM. Range-ladder step needs
an aomdec decodemv.c EC_TRACE patch not built this round. Refusal unchanged.
lanes/gm-r5.report.mdadded+117 -0
@@ -0,0 +1,117 @@
1+VERDICT: NOT FIXED -- localized (not root-caused) within budget. The refusal stays exactly as r4 left it, no code changed on HEAD.
2+
3+## Pin recaptured (r4's pin was lost to a scratchpad; re-derived this round)
4+
5+`gm.model == Affine` refusal path is untouched. Temporarily disabled *only* the "more than
6+one concurrently active ROTZOOM/AFFINE ref slot" refusal (`if false && ...` in
7+`stream.rs`, reverted before commit -- `git diff --stat` against HEAD is empty right now)
8+and re-ran `a_real_aomenc_stream_with_interintra_wedge_decodes_pixel_exact` with
9+`EC_WEDGE_GATE_ATTEMPTS=40 EC_AV1_REQUIRE_AOMENC=1 EC_AV1_GATE_DUMP=/tmp/claude-1000/gm-r5-pin.obu`.
10+Seed 43 mismatched again, dumped to `/tmp/claude-1000/gm-r5-pin.obu` (session scratchpad --
11+not committed; will need recapture next round the same way, `n_attempts=40` reliably reaches
12+seed 43's stream).
13+
14+**Determinism confirmed** (ladder step 1): `scratch_isolate_pinned_mismatch` with
15+`EC_AV1_PIN=/tmp/claude-1000/gm-r5-pin.obu EC_AV1_PIN_N=24`, run twice back-to-back --
16+byte-identical result both times:
17+- frame 13: all 3 planes MATCH.
18+- **frame 14 luma: 441 mismatches (worst delta 7), first at offset 18 (row 0, col 18),
19+ ours=157 theirs=158.** u/v also mismatch (86/109 pixels, delta up to 4).
20+- frame 15: 576 mismatches, same first-offset (row 0, col 18), worst delta grows to 14 --
21+ the error compounds forward through prediction, consistent with r4's finding, not a fresh
22+ independent bug.
23+
24+Same frame index (14), same first-offset (row 0, col 18) as r4's lost pin -- this is the same
25+defect shape, re-confirmed on fresh bytes.
26+
27+## Localization (ladder step 2, done; step 3/4 NOT completed)
28+
29+Frame 14's header: `global_motion = [Identity, Identity, Identity, Rotzoom(GOLDEN, params
30+[132096,137216,61480,56,-56,61480]), Rotzoom(BWDREF, params
31+[258048,268288,57452,-34,34,57452]), Identity, Identity]`, `reference_select = false`,
32+`primary_ref_frame = 3`, `allow_high_precision_mv = false` -- matches r4's shape exactly
33+(GOLDEN + BWDREF concurrently ROTZOOM).
34+
35+Traced (temporary `EC_GM_DEBUG`/`EC_GM_DEBUG2` prints in `decode.rs`, reverted): across the
36+*whole* 24-frame stream only **7 blocks total** ever take the new global-warp branch
37+(`warp_params.is_none() && is_global_mv_block && ...`) -- 4 in frame 1 (the r4-fixed,
38+pin-verified single-ref-LAST case) and 3 in frame 14/15 (`ref_frame=5`/BWDREF only: mi
39+`(0,8)`, `(8,0)`, `(8,8)`, all bw4=bh4=8). **`mi=(0,0)` -- the 32x32 leaf that owns the
40+mismatched pixel at row 0, col 18 -- never appears in that trace at all.**
41+
42+`EC_AV1_TRACE` on that exact block (frame 14, `mi_row=0 mi_col=0`):
43+```
44+skip=0 is_inter=1 mv=(-6,-4) is_new_mv=true bsize=32 ref=4 filter=[0,1]
45+motion_mode_eligible=0 obmc_selected=0 warped=0
46+```
47+i.e. plain **NEWMV** against **GOLDEN_FRAME** (ref=4), `is_globalmv=false` (confirmed via
48+`EC_GM_DEBUG2`: `is_global_mv_block=false` for this block despite `gm_model=Rotzoom` on
49+GOLDEN's slot -- the block chose NEWMV/NEARMV over GLOBALMV, so GOLDEN's own active ROTZOOM
50+model is never read by this block at all). No OBMC (`motion_mode_eligible=0` -- no
51+overlappable neighbours yet, it's the top-left leaf), no warp, no interintra, no compound
52+(`reference_select=false`). Ruled out as amplifiers within budget: CDEF (`y_pri_strength`/
53+`y_sec_strength` all-zero -- CDEF is a no-op this frame), loop restoration (`uses_lr: false`),
54+and deblocking reach (col 18 is 14px from the nearest coding-block boundary at col 32, well
55+outside an 8-bit loop filter's ~3px reach) -- none of the frame's own filter settings can
56+carry a warp-block error from `mi=(0,8)` sideways into `mi=(0,0)`'s interior at col 18.
57+Hidden/no-show alt-ref frames also ruled out: the pin's OBU stream has exactly 24 `Frame` OBUs
58+for 24 output frames -- no hidden-frame class defect here (checked per the ledger's
59+"gate-blind-to-hidden-frames" class before spending more time on it).
60+
61+**What this means:** the mismatched pixel is NOT produced by the new global-warp code path at
62+all -- it comes from an ordinary NEWMV/GOLDEN translational block whose own motion vector
63+(predictor + coded delta) or subpel interpolation is apparently computed fine in isolation
64+(this exact machinery -- `mc::predict_with_filters`, mv-stack NEWMV predictor construction --
65+is exercised pixel-exact by dozens of other passing gates with no active global motion at
66+all). The only property distinguishing this frame from every match-so-far frame is the
67+concurrently-active GOLDEN+BWDREF ROTZOOM pair in the header -- so per the charter's own
68+framing, the defect is most likely a per-frame value that the mv-stack/NEWMV-predictor
69+construction reads from `global_motion`/`GmMvTable` and that should vary per candidate ref but
70+doesn't when two slots are simultaneously non-identity (e.g. the GLOBALMV stack-fill
71+candidates `mvstack.rs` appends per ref, or a `gm_table` lookup keyed wrong when scanning
72+neighbours across two active refs) -- but I did NOT find the exact site. `mvstack.rs`'s own
73+per-ref accessors (`gm_mv(gm, ref_frame)`, `is_global_mv0`/`is_global_mv1` branches at every
74+site grepped) all looked correctly keyed on inspection; nothing jumped out as shared state.
75+
76+**Ladder step 3 (msac RANGE comparison) NOT run**: `~/.cache/aom-oracle/build/aomdec`'s
77+`EC_TRACE` instrumentation (`decodeframe.c:1233`) only covers `read_partition`
78+(`EC_PART`/`EC_PART_VAL`), not the mv-stack/NEWMV-predictor symbols this hypothesis needs --
79+extending it would mean patching+rebuilding `decodemv.c` in the oracle, which did not fit this
80+round's remaining budget. So prediction-vs-entropy is still open: a wrong NEWMV predictor
81+(prediction-side, no bits misread) and a wrong `drl_mode`/`mv_joint` symbol read from a
82+corrupted context (entropy-side) both fit the observed symptom (small, spatially local,
83+propagating-forward error, not catastrophic desync) equally well from what I proved this
84+round.
85+
86+## Refusal count
87+
88+Unchanged: still the two named refusals from r4 (`Affine`, `>1 concurrently active
89+ROTZOOM/AFFINE ref slot`). No code change landed, so the wedge gate's refusal mix is whatever
90+r4 already reported (30/40 named refusals, 10/40 matches, `wii_hits=4` in that round's run;
91+this round's own wedge-gate invocation was run with the multi-slot refusal temporarily
92+disabled specifically to capture the pin, not as a measurement of the gate's normal mix).
93+
94+## Files touched
95+
96+None on HEAD -- `git diff --stat` against `lane-gm2`'s base is empty. All edits this round
97+(the `if false &&` disable of the refusal, `EC_GM_DEBUG`/`EC_GM_DEBUG2` eprintln probes in
98+`decode.rs`, a `global_motion`/`reference_select` eprintln in `stream.rs`'s
99+`scratch_isolate_pinned_mismatch`) were reverted before finishing so as not to ship an
100+unverified decode or dead debug code.
101+
102+## Next round
103+
104+Two ways to close this without guessing:
105+1. Patch the aomdec oracle's `decodemv.c` to `EC_TRACE`-dump `read_drl_idx`/NEWMV predictor
106+ symbols + `r->ec.rng`, range-ladder frame 14's `mi=(0,0)` NEWMV block specifically, and
107+ settle prediction-vs-entropy for real (ladder step 3, this round's actual gap).
108+2. Or, cheaper: hand-compute the expected mv-stack for that exact block (donor neighbours: at
109+ `mi=(0,0)` in the top-left corner of a single-SB 64x64 frame there ARE none -- it's the
110+ very first block decoded, so its only stack contributions are the frame-level
111+ `GLOBAL_GLOBALMV`/zero-mv fallback + `find_mv_stack`'s own extra-search additions) against
112+ spec 7.10.2's `add_extra_mv_candidate`/`setup_ref_mv_list`, since a first-block-in-frame
113+ case has almost no neighbour state to account for -- narrowing the search space
114+ considerably versus a mid-frame block.
115+Re-pin with the same recipe (`EC_WEDGE_GATE_ATTEMPTS=40`, `EC_AV1_GATE_DUMP`) if the
116+scratchpad pin at `/tmp/claude-1000/gm-r5-pin.obu` doesn't survive to next session --
117+recapture reliably reproduces seed 43 / frame 14 / row0-col18.