Merge lane-inter8 r3 (89945ba): EC_MODE_VAL leaf instrument, inter_sb_none_gate params, ignored tile-column arm; 10-bit twin pinned to the leaf interp-filter read (lane-gmaffine)
Browse files at this commit1 changed file +138 -0
- lanes/inter8-r3.report.md +138 -0
lanes/inter8-r3.report.mdadded+138 -0
| @@ -0,0 +1,138 @@ | |||
| 1 | +# lane-inter8 r3 -- the 10-bit twin localized, and the mi-band tile audit | ||
| 2 | + | ||
| 3 | +Branch `lane-inter8`, on top of r2's `12809b2`. This report covers r3 only; | ||
| 4 | +`lanes/inter8-r2.report.md` is untouched. | ||
| 5 | + | ||
| 6 | +## 1. Gate state | ||
| 7 | + | ||
| 8 | +- `a_real_aomenc_inter_sequence_with_an_8x8_leaf_split_decodes_pixel_exact` | ||
| 9 | + (8-bit): **GREEN**, un-ignored (r2). Re-run this round, still green. | ||
| 10 | +- `a_real_aomenc_10bit_inter_sequence_with_an_8x8_leaf_split_decodes_pixel_exact`: | ||
| 11 | + **still RED**, stays `#[ignore]`d. Localized this round (section 2); the | ||
| 12 | + root cause is a symbol lane-gmaffine r3 owns, so it is NOT fixed here. | ||
| 13 | +- `a_real_aomenc_inter_sequence_with_an_8x8_leaf_split_across_tile_columns_decodes_pixel_exact`: | ||
| 14 | + NEW this round (`--tile-columns=1`, 128x64). **RED for a reason outside this | ||
| 15 | + lane** and `#[ignore]`d with that reason in the attribute: at 128x64 aomenc | ||
| 16 | + codes an SB-level rect partition on the KEY frame despite | ||
| 17 | + `--enable-rect-partitions=0`, so the stream stops at "a superblock-level | ||
| 18 | + partition type other than NONE or SPLIT" (lane-sbpart's arm) before any 8x8 | ||
| 19 | + leaf is reached. 64x64 -- the only width the recipe decodes -- is one | ||
| 20 | + superblock wide, so two tile columns cannot exist there. | ||
| 21 | + | ||
| 22 | +Gate-helper audit (class *counter-from-refused-stream*): `inter_sb_none_gate` | ||
| 23 | +(`crates/ec-av1/src/stream.rs:2774`) is single-attempt -- `before = hits()` is | ||
| 24 | +taken immediately before the one `decode_stream` call, a refusal panics with a | ||
| 25 | +pinned stream, a pixel mismatch panics. No global-delta-over-many-attempts | ||
| 26 | +shape, nothing to fix. | ||
| 27 | + | ||
| 28 | +## 2. The 10-bit twin: first divergent element | ||
| 29 | + | ||
| 30 | +The refusal ("an INTER 32x32 partition type this decoder does not code | ||
| 31 | +(value=9)") is downstream noise; the real divergence is 15 elements earlier. | ||
| 32 | + | ||
| 33 | +Ladder (ours `EC_TRACE_MODE` via `decode_probe` vs instrumented aomdec | ||
| 34 | +`EC_TRACE_MODE`), 64x64 mandelbrot, cq40 cpu0, `--min-partition-size=8 | ||
| 35 | +--max-partition-size=16`, `--bit-depth=10`: | ||
| 36 | + | ||
| 37 | +- 8-bit stream: **57/57** `EC_MODE` lines agree (r2's claim re-measured). | ||
| 38 | +- 10-bit stream: **41/57**. First divergence at the ENTRY of the next block | ||
| 39 | + after the 8x8 leaf `mi=(4,14)`: ours `rng=57758`, aomdec `rng=52508`. | ||
| 40 | + | ||
| 41 | +Element-level, on leaf `(4,14)` (a compound `NEW_NEARESTMV`, ref0=1 ref1=4): | ||
| 42 | + | ||
| 43 | +| point | ours | aomdec | | ||
| 44 | +|---|---|---| | ||
| 45 | +| entry (`EC_MODE`) | 37004 | 37004 | | ||
| 46 | +| after mode + DRL + mv (`EC_MODE_VAL` ours / `EC_MODE_MV` oracle) | **57308** | **57308** | | ||
| 47 | +| end of mode info (`EC_MODE_VAL` oracle) | -- | 58952 | | ||
| 48 | +| next block entry | 57758 | 52508 | | ||
| 49 | + | ||
| 50 | +Values agree everywhere (mode=20, ref0=1, ref1=4, mv0=(0,-9), mv-stack size 2 | ||
| 51 | +on both sides). So: the mv-stack, the DRL count and the mv reads of the 8x8 | ||
| 52 | +leaf are **exact**; the divergence is entirely in the leaf's **post-mv mode | ||
| 53 | +info**, where aomdec's range moves 57308 -> 58952 and ours does not move the | ||
| 54 | +same way. | ||
| 55 | + | ||
| 56 | +The only symbol aomdec reads there for a compound 8x8 leaf is | ||
| 57 | +`read_mb_interp_filter` (interintra is single-ref-only, motion_mode is not | ||
| 58 | +read for compound). `decode.rs:11181` says it outright: *"`decode_inter_block8` | ||
| 59 | +never resolves a switchable filter"* -- the leaf hardcodes `Regular` and reads | ||
| 60 | +no filter symbol. That is a **symbol-consumption gap** (memory class), and per | ||
| 61 | +the coordinator it is lane-gmaffine r3's to fix (it owns the real leaf interp | ||
| 62 | +read and is merging ae69b25). fix-now, owner lane-gmaffine. | ||
| 63 | + | ||
| 64 | +Two instruments were added to get here and are kept: | ||
| 65 | +- ours: `EC_MODE_VAL` in `decode_inter_block8`'s compound arm (`decode.rs` | ||
| 66 | + ~11049), byte-format-identical to the oracle's rung-4 line. | ||
| 67 | +- oracle: `EC_MODE_MV` in `~/.cache/aom-oracle/src/av1/decoder/decodemv.c` | ||
| 68 | + right after `assign_mv`, plus `stack=%d` (`dcb->ref_mv_count[...]`) on | ||
| 69 | + `EC_MODE_VAL`. **These two oracle patches are NOT in | ||
| 70 | + `scripts/instrument-aom-oracle.sh`** -- a rebuild of the oracle from the | ||
| 71 | + script drops them. deferred(a 3-line append to that script; the aomdec | ||
| 72 | + binary in `~/.cache/aom-oracle/build` currently has them). | ||
| 73 | + | ||
| 74 | +## 3. Tile-relative guard audit (lane-sub8 verifier's class warning) | ||
| 75 | + | ||
| 76 | +Checked every reader/writer of the mi-granular inter bands added in r2 | ||
| 77 | +(`record_inter_rect_mi` `decode.rs:2300`, `record_compound_ctx_rect_mi` | ||
| 78 | +`decode.rs:2389`, and the `above_side_mi`/`left_side_mi`/`above_skip`/ | ||
| 79 | +`left_skip`/`*_inter`/`*_ref`/`*_ref1`/`*_comp_group_idx`/`*_compound_idx` | ||
| 80 | +readers): | ||
| 81 | + | ||
| 82 | +- **Guards are tile-relative.** `grep -n 'mi_r > 0\|mi_c > 0\|leaf_mi.0 > 0\|leaf_mi.1 > 0' decode.rs` | ||
| 83 | + returns **zero hits**; the leaf uses | ||
| 84 | + `leaf_mi.0 > neighbours.tile_row0_mi` / `leaf_mi.1 > neighbours.tile_col0_mi` | ||
| 85 | + (`decode.rs:10908`). | ||
| 86 | +- **Above bands reset per tile.** `start_tile` (`decode.rs:1958`) clears | ||
| 87 | + `above_side_mi` and, from r2, every mi-granular above inter band over | ||
| 88 | + `col0_mi..col1_mi`. | ||
| 89 | +- **Left bands reset per SB row.** `start_row` (`decode.rs:2229`) clears | ||
| 90 | + `left_side_mi`, `left_skip`, `left_skip_mode`, `left_inter`, `left_ref`, | ||
| 91 | + `left_ref1`, `left_comp_group_idx`, ... unconditionally. | ||
| 92 | + | ||
| 93 | +So the lane-sub8 defect shape is not present here. The runtime arm that would | ||
| 94 | +have proven it is the `across_tile_columns` gate above, blocked by an unrelated | ||
| 95 | +refusal -- stated as inspection-only, not claimed as exercised. | ||
| 96 | + | ||
| 97 | +## 4. Remaining alphabet -- named next slices | ||
| 98 | + | ||
| 99 | +- `fix-now (lane-gmaffine r3)`: the 8x8 leaf's switchable interp filter read; | ||
| 100 | + it is the 10-bit twin's first divergent element and un-ignores that gate. | ||
| 101 | +- `deferred(lane-sbpart's SB-level rect arm)`: the `--tile-columns=1` runtime | ||
| 102 | + proof of the mi bands, and with it any multi-tile inter gate. | ||
| 103 | +- `deferred(rect inter MC + rect transforms below 16x16; lane-rectx owns the | ||
| 104 | + transform half)`: 16x8/8x16 rect inter leaves at the 16x16 level -- the | ||
| 105 | + refusal r1 narrowed to ("... other than SPLIT") still stands. | ||
| 106 | +- `deferred(the above)`: 8x8 HORZ/VERT -> 8x4/4x8 leaves. Needs 4x8/8x4 luma | ||
| 107 | + and 4x4 chroma transforms plus a 4-wide MC path; strictly after the 16x8/8x16 | ||
| 108 | + rect leaves. | ||
| 109 | +- `deferred(unstarted)`: AB (HORZ_A/B, VERT_A/B) and 1-to-4 (HORZ_4/VERT_4) | ||
| 110 | + inter arms at 64/32/16. aomenc emits them even with the flags off, so these | ||
| 111 | + are the dominant remaining inter refusals, but each needs its own transform | ||
| 112 | + set (a 64x16 strip needs TX_64X16 -- see the ledger's lane-part32 r5 line). | ||
| 113 | +- `accepted`: the aggregate per-type-per-level inter hit-counter gate. Every | ||
| 114 | + arm above is refused, so the counter would assert nothing new. | ||
| 115 | + | ||
| 116 | +## EVIDENCE | ||
| 117 | + | ||
| 118 | +EVIDENCE: scratchpad s8.obu sha256 344566f8...8802 / s10.obu sha256 f1a53394...20ce | aomenc 64x64 mandelbrot 4f cq40 cpu0 min=8 max=16 (8- and 10-bit), decoded by ours (EC_TRACE_MODE, decode_probe) and by instrumented aomdec (EC_TRACE_MODE) | EC_MODE range ladders: 8-bit 57/57 agree, 10-bit 41/57, first divergence at the block AFTER leaf mi=(4,14) | ||
| 119 | +EVIDENCE: same two traces | aomdec patched with EC_MODE_MV (post-assign_mv) + stack= on EC_MODE_VAL, rebuilt (cmake --build . --target aomdec) | leaf (4,14): entry 37004==37004, post-mv 57308==57308, mode/refs/mv0/stack all equal -- divergence is strictly after the mv, in the post-mv mode info aomdec ends at rng 58952 | ||
| 120 | +EVIDENCE: cargo test -p ec-av1 --lib -- 8x8_leaf_split (EC_AV1_REQUIRE_AOMENC=1) | 8-bit gate re-run | 1 passed, 10-bit + tile-columns ignored with their reasons | ||
| 121 | + | ||
| 122 | +Suite totals, `EC_AV1_REQUIRE_AOMENC=1 cargo test -p ec-av1 --lib` on 889ca3c: | ||
| 123 | +**270 passed, 0 failed, 25 ignored** (r2 was 270/0/24; the +1 ignored is the new | ||
| 124 | +`across_tile_columns` arm). `refusal_inventory` and `gate_coverage` are in that | ||
| 125 | +green set; no refusal was lifted or narrowed this round, so neither needed an | ||
| 126 | +edit. | ||
| 127 | + | ||
| 128 | +## 5. Two candidate causes ABLATED (neither is it) | ||
| 129 | + | ||
| 130 | +- lane-gmaffine `f5e1851` (14 TxbSet arms missing the eob_pt class-1 CDF row): | ||
| 131 | + applied to this branch's `cdf.rs`/`cdf_state.rs` and re-measured -- the 10-bit | ||
| 132 | + ladder stays **41/57**, byte-identical divergence at the same element. Not | ||
| 133 | + this stream's cause; the hunks were reverted so they reach main once through | ||
| 134 | + lane-gmaffine. | ||
| 135 | +- lane-gmaffine `0b8cb54` (leaf single_ref / interp-filter neighbour contexts | ||
| 136 | + still read at SUB indices) cherry-picks with a conflict in `decode.rs`, so it | ||
| 137 | + is left to lane-gmaffine, which already merged `ae69b25`. It touches exactly | ||
| 138 | + the post-mv window this round pinned, and is the standing candidate. | ||