forge
Explore
Log in

Don't you dare go Hollow

R3 report -- lane-inter8 merged, SUB-vs-mi context index fixed, next divergent leaf named

Browse files at this commit

154097beb28ba80ba1ef26b0eb31f1a0f8a598ceAhmet Kaan GümüşParent: 7250c10
  • docs
    • r3 report -- lane-inter8 merged, SUB-vs-mi context index fixed, next divergent leaf named
Show full message
docs(gmaffine): r3 report -- lane-inter8 merged, SUB-vs-mi context index fixed, next divergent leaf named
lanes/gmaffine-r3.report.mdadded+84 -0
@@ -0,0 +1,84 @@
1+# lane-gmaffine r3 — lane-inter8 merged, one real 8x8-leaf desync fixed, two gates still RED
2+
3+Commits on `lane-gmaffine`: `0d56f26` (merge of lane-inter8 `ae69b25`) and `0b8cb54`
4+(the context-index fix). Not rebased onto main (charter order).
5+
6+Suite: **271 passed, 2 failed, 24 ignored** (`EC_AV1_REQUIRE_AOMENC=1 cargo test -p ec-av1
7+--release --lib -j3`, 571 s). r2 was 268/2/23; the deltas are lane-inter8's gates arriving.
8+The two failures are the same two 8x8-leaf motion gates, still red.
9+
10+## STEP 1 — merge (13 conflicts, all in `decode.rs` + 1 in `refusal_inventory.rs`)
11+Resolution, per the charter's "keep both, unify duplicates" (full list in `0d56f26`'s message):
12+- OBMC chroma-above skip: kept **lane-inter8's** explicit `BLOCK_4X4/4X8/8X4` match. r2's
13+ `write_w >= 16 && write_h >= 16` is wrong for 8x32/32x8, where libaom's chroma plane is
14+ 4x16/16x4 and the above pass DOES blend chroma.
15+- OBMC neighbour filter: read from lane-inter8's now mi-granular `Neighbours::above_filter`
16+ /`left_filter`. r2's `MiGrid::filters` + `set_filter`/`filter`/`grid_or_slot` recorded the
17+ SAME field per mi and are deleted (`mvstack.rs`, `decode.rs`).
18+- `decode_inter_block8`: one `global_motion` param (r1's), plus lane-inter8's
19+ `sign_bias_table` and `tpl_frame`; one `gm_table` build at the top; returns
20+ `(skip, is_inter, skip_mode, compound_ctx8, leaf_filter_syms, leaf_refs)`.
21+- The leaf's temporal-mv `cur_offset_0` now keys on the leaf's OWN reference — lane-inter8
22+ hardcoded `LAST_FRAME` there because its leaf refused every other ref, which r1 lifted.
23+- Per-leaf `record_inter_rect_mi` keeps r2's REAL filter symbols instead of lane-inter8's
24+ `[3, 3]` intra sentinel (that sentinel is what panicked `neighbour_filter`); the coarse
25+ whole-16x16 `record_inter` and its `last_filter`/`last_ref` bookkeeping are gone.
26+- Interior 16x16 SPLIT: lane-inter8's restructure (one `part16` read, one shared leaf loop);
27+ refusal strings follow it.
28+
29+## STEP 3 — first divergent element found and fixed (class: unit mismatch after a granularity change)
30+`crates/ec-av1/src/decode.rs:11504,11700-11716` — `decode_inter_block8` still indexed
31+`neighbours.above_ref/above_ref1/above_filter` with `c` and the `left_*` twins with `r`,
32+i.e. `outer_at`, the enclosing 16x16's **SUB(16px)** coordinates, while every other read in
33+the same function uses `cmi`/`rmi` (**mi**, 4px) since lane-inter8 r2 made those bands
34+mi-granular. So a leaf's `read_single_ref` p1..p6 contexts and its `switchable_interp`
35+neighbour rows came from an unrelated 16px column/row. Now `cmi`/`rmi`.
36+
37+EVIDENCE: `/tmp/.../scratchpad/{ref-mode.txt,o3.txt}` (aomdec `EC_TRACE_MODE` ladder vs ours)
38+| stream `none-8-32.obu` = the gate recipe with gm and warp both off, 8-bit cq32,
39+`--min/--max-partition-size=8`, decoded by instrumented aomdec and by
40+`cargo run --example decode_probe` with `EC_TRACE_MODE=1`
41+| first inter frame, first 32x32: before the fix leaf mi=(6,6) had identical mode/mv/stack
42+(NEWMV, mv (0,-7), stack 5) but post-mode-info range **41953 vs aomdec 38345**; after the
43+fix that leaf and the following 15 agree to the range (38345, 51367, 58585, 58652, 54339,
44+37583 …). The stream's refusal moved from "an INTER 32x32 partition type … (value=8)" (a
45+bogus symbol from the desync) to a later block.
46+
47+Instrument added and kept: `EC_MODE_VAL8` under `EC_TRACE_MODE`
48+(`crates/ec-av1/src/decode.rs:11731`), one line per 8x8 leaf
49+(`newmv/globalmv/ref0/mv0/stack/rng`), diffable line-for-line against aomdec's
50+`EC_MODE_VAL`. Reproduce script: `scratchpad/enc.sh <cq> <depth> <gm> <out.obu>`.
51+
52+## STEP 2 — gate results
53+EVIDENCE: `EC_AV1_REQUIRE_AOMENC=1 cargo test -p ec-av1 --release --lib -j3 -- obmc_8x8 globalmv_8x8_leaf warped_causal_8x8_leaf 8x8_leaf_split --nocapture`
54+| the merged tree, real aomenc streams | `a_real_aomenc_stream_with_obmc_8x8_decodes_pixel_exact` **ok**
55+(FIRING seed 53, 8x8 obmc hits 4), `a_real_aomenc_inter_sequence_with_an_8x8_leaf_split_decodes_pixel_exact`
56+**ok**, both motion gates **FAILED** with named refusals (never a SKIP).
57+
58+## Still RED — the next divergent element (for r4)
59+Same instrument, same stream: first inter frame, leaf **mi=(0,14)** — aomdec reads
60+`mode=16` (NEWMV) `mv0=(0,-12)` from a 3-entry stack; we read not-new, `mv0=(0,-11)`, also
61+3 entries. Stack SIZE agrees, so the suspect is the mode context itself
62+(`stack.new_mv_ctx`, i.e. `find_mv_stack_with_sign_bias`'s weight/context computation for a
63+2x2-mi block at the right frame edge with no above row), not the stack contents. Every leaf
64+before it in that frame matches to the range.
65+Note the gate recipe is `--max-partition-size=8`, i.e. EVERY block is an 8x8 leaf; the
66+lane-inter8 gate that is green uses `--max-partition-size=16`, so this is the harder
67+all-leaf case, and it fails identically with gm off, gm on and warp on (three encodes) —
68+**the remaining desync is not global-motion or warp specific**.
69+
70+## Refusals / inventory
71+No refusal string changed this round; `refusal_inventory` and `gate_coverage` are green
72+(they are part of the 271). r1's GLOBALMV/WARPED_CAUSAL 8x8 lifts stay lifted, restating
73+r2's named DEVIATION from the charter fallback: restoring them would put a refusal BEFORE
74+the code it guards (class `refusal-short-circuits-its-own-code`), the two gates never reach
75+the motion code (they die on partition refusals from the desync above), and a GLOBALMV-at-8x8
76+refusal would turn the GREEN obmc_8x8 gate red. The lift is not mergeable to main until a
77+gate proves it; the merge + context fix in this round are.
78+
79+## Residue
80+- fix-now (r4), deferred(nothing — it is the next step): leaf mi=(0,14) `new_mv_ctx` above.
81+- deferred(lane-hbdinter): `warp::warp_affine` hardcodes `const BD: i32 = 8;`.
82+- deferred(own lane): compound `GLOBAL_GLOBALMV` never warps, and no refusal names it.
83+- accepted: `EC_MODE_VAL8` prints only on the single-ref leaf path (the compound arm returns
84+ earlier); enough for these gates, whose leaves are single-ref.