R2 report -- uv_mode alphabet root cause, gate blocked on a real intra-128-in-inter block
Browse files at this commitc274a28c8e216561c113c66271c2396868a5b50cParent: e4259c9- docs
- r2 report -- uv_mode alphabet root cause, gate blocked on a real intra-128-in-inter block
1 changed file +76 -0
- lanes/sb128c-r2.report.md +76 -0
lanes/sb128c-r2.report.mdadded+76 -0
| @@ -0,0 +1,76 @@ | |||
| 1 | +# lane-sb128c r2 — the 128 inter NONE desync is a `uv_mode` ALPHABET bug (root cause, cited); gate still RED on a NEW, real blocker | ||
| 2 | + | ||
| 3 | +Branch `lane-sb128c`, tip `edbdd7b` (base r1 `72a93d8`). VERDICT: **RED on the gate, GREEN on the defect**: | ||
| 4 | +the desync r1 chartered is found and fixed at root cause, and the gate now stops on a genuinely | ||
| 5 | +different, unimplemented shape (proved against aomdec, not a self-desync). | ||
| 6 | + | ||
| 7 | +## TASK A — root cause | ||
| 8 | + | ||
| 9 | +`crates/ec-av1/src/decode.rs:18713` (`decode_inter_block`'s intra tail) read | ||
| 10 | +`cdfs.uv_mode_cfl[mode]` **unconditionally**. libaom `read_intra_block_mode_info` calls | ||
| 11 | +`read_intra_mode_uv(ec_ctx, r, is_cfl_allowed(xd), bsize)` and `is_cfl_allowed` | ||
| 12 | +(`~/.cache/aom-oracle/src/av1/common/blockd.h`) is | ||
| 13 | +`block_size_wide[bsize] <= 32 && block_size_high[bsize] <= 32`. So any intra block 64 px or wider | ||
| 14 | +inside an INTER frame must read the 13-symbol `uv_mode_no_cfl` alphabet. Reading the 14-symbol CFL | ||
| 15 | +one yields the same VALUE from a different interval — class `wrong-alphabet-same-value`. Fix: | ||
| 16 | +`let cfl_allowed = write_w.max(write_h) <= 32;` then the two-branch read (the split every other | ||
| 17 | +`uv_mode` reader in the file already makes: `decode.rs:5521`, `6203`, `8500`). | ||
| 18 | + | ||
| 19 | +Method (charter's ladder, RANGE never `tell()`): | ||
| 20 | +1. `EC_TRACE_MODE=1 EC_TRACE=1 aomdec g8.obu` vs ours; `EC_MODE` ranges agree block for block until | ||
| 21 | + the 64x64 block at mi (0,32) of an inter frame. | ||
| 22 | +2. Added the pre-read range to our `partition_w64` trace: entry rng **61470 == aomdec 61470**; the | ||
| 23 | + NEXT partition (mi (0,48)) is **ours 35887 vs aomdec 54271** → the divergence is inside that block. | ||
| 24 | +3. `EC_AV1_TELL` bit ladder: the block spans tell 170→192 in ours, 154→173 in aomdec (same 16-bit | ||
| 25 | + constant offset at entry) → **we over-read ~4 bits**; `is_inter=0 skip=0 side=64` on both sides, | ||
| 26 | + so it is the intra tail, and the only symbol whose alphabet depends on the 64-px size is `uv_mode`. | ||
| 27 | +4. After the fix the ladder tracks through this block and every later one, up to a real new stop. | ||
| 28 | + | ||
| 29 | +EVIDENCE: `$HOME/.cache/sb128c-work/{aomdec.all,ours.trace}` | `EC_TRACE/EC_TRACE_MODE/EC_TRACE_COEFF` aomdec vs `EC_AV1_TRACE/EC_TRACE_MODE/EC_AV1_TELL` decode_probe on `g8.obu`, both under `systemd-run --scope -p MemoryMax=6G` | **partition rng at mi (0,48): 35887 → 54271 (== aomdec) after the fix; refusal moves from "a split intra strip whose transform unit is 32x64" to a shape aomdec confirms exists** | ||
| 30 | + | ||
| 31 | +## TASK A — the gate is still `#[ignore]`d, and why (this is NOT a self-desync) | ||
| 32 | + | ||
| 33 | +`g8.obu` now decodes past every inter 128x128 PARTITION_NONE block (aomdec confirms four of them, | ||
| 34 | +e.g. `EC_PART_VAL mi_row=0 mi_col=32 bsize=15 value=0` + `EC_MODE ... rng=63756`, which our trace | ||
| 35 | +matches exactly: `EC_MODE mi_row=0 mi_col=8 rng=63756 is_inter=1 skip=1 side=128`). It then stops on | ||
| 36 | +`an INTRA-coded 128x128 block inside an inter frame` — and aomdec's own trace shows that block is | ||
| 37 | +real: `EC_PART_VAL mi_row=32 mi_col=32 bsize=15 value=0` with **no** `EC_MODE` line (aomdec only | ||
| 38 | +instruments the inter mode reader), followed by `EC_COEFF plane=0 tx_size=4` / `plane=1 tx_size=3 | ||
| 39 | +ctx=10` per 64x64 mu chunk. Exactly ONE such block exists in the whole 8-frame stream, in the same | ||
| 40 | +frame as the inter 128 NONE blocks, so no `--limit` truncation dodges it. | ||
| 41 | + | ||
| 42 | +Recipe search for a stream carrying the inter 128 NONE without the intra one: seeds 62..67 on the | ||
| 43 | +same recipe all refuse on OTHER lanes' gaps (sub-8 inter leaf ×3, 16-level inter AB/1:4, non-skip | ||
| 44 | +rect strip) or on the same intra-128 (seed 63). Report line, not a claim of impossibility. | ||
| 45 | + | ||
| 46 | +EVIDENCE: `$HOME/.cache/sb128c-work/{s62..s67}.obu` + `seeds.sh` | 6 aomenc encodes (flags spelled once) + `decode_probe` each | **0/6 decode whole; refusal strings listed above** | ||
| 47 | + | ||
| 48 | +## TASK B — film_grain 8-bit gate: pre-existing flake, not lane-caused | ||
| 49 | + | ||
| 50 | +- base `e8e64a6` in a detached worktree, own `CARGO_TARGET_DIR=$HOME/.cache/cargo-target-sb128c-base`: | ||
| 51 | + `a_real_aomenc_stream_with_film_grain_decodes_pixel_exact` → `1 passed; 0 failed` | ||
| 52 | + (`$HOME/.cache/sb128c-base-fg.log`). | ||
| 53 | +- this tree, same test alone → `1 passed; 0 failed`. | ||
| 54 | +So r1's suite red was environmental (10 lanes sharing the box), not a lane regression. It is re-run | ||
| 55 | +in the r2 full suite below. | ||
| 56 | + | ||
| 57 | +## TASK C — not started (turn budget) | ||
| 58 | + | ||
| 59 | +## ReelC re-probe | ||
| 60 | + | ||
| 61 | +`reelc2s.obu` (2 s, 10-bit, `use_128x128_superblock=true`): stop string moved | ||
| 62 | +`a 128x128 superblock HORZ/VERT or AB partition` (r1) → **`a split transform on a 1:4 inter strip | ||
| 63 | +with a 64-px axis`** (another lane's gap). `EC_AV1_FINAL_DUMP` frame count: 1. | ||
| 64 | + | ||
| 65 | +## Suite | ||
| 66 | + | ||
| 67 | +`$HOME/.cache/sb128c-suite-r2.log` — see the tail of this file / the handoff for the final N/0. | ||
| 68 | + | ||
| 69 | +## Residue | ||
| 70 | + | ||
| 71 | +- fix-now(r3): decode an INTRA-coded 128x128 block inside an inter frame — the intra tail of | ||
| 72 | + `decode_inter_block` needs the same 64x64 mu-chunk interleave the inter branch already has | ||
| 73 | + (`decode.rs:17304-17520`): per chunk one TX_64X64 luma unit then that chunk's TX_32X32 U and V | ||
| 74 | + units (aomdec shows chroma `txb_skip` ctx 10). Unblocks the r1 gate. | ||
| 75 | +- deferred: 128-level HORZ/VERT and AB partitions (ReelC's r1 stop) — unblocked by the above. | ||
| 76 | +- accepted: the 8-bit `--enable-tx-size-search=1` arm and a `--tile-columns=1` arm ride the same gate. | ||