forge
Explore
Log in

Don't you dare go Hollow

R2 report -- stale-base finding, the 2 real failures + fixes, ReelC's new stop, 32-level handoff

Browse files at this commit

b583cf24674b7ac4d973bb9bc2aebc5057554043Ahmet Kaan GümüşParent: 7820978
  • docs
    • r2 report -- stale-base finding, the 2 real failures + fixes, ReelC's new stop, 32-level handoff
Show full message
docs(tx64x16): r2 report -- stale-base finding, the 2 real failures + fixes, ReelC's new stop, 32-level handoff
lanes/tx64x16-r2.report.mdadded+113 -0
@@ -0,0 +1,113 @@
1+# lane-tx64x16 r2 — the SB-level 1:4 pair is GREEN; r1's "17 failures" were a stale base
2+
3+Branch `lane-tx64x16`, rebased dc5553f -> `5811ec5` -> **`6d86d3a`** (current main
4+at the time of writing). Commits: `3435835` (r1 wiring, replayed), `23aa4b3`
5+(r1 report), `d1f71b6` (this round).
6+
7+## Headline
8+
9+**r1's red gate was a STALE BASE, not a defect.** Nothing in the 1:4 wiring
10+changed this round. Rebasing onto main turns
11+`a_real_aomenc_stream_with_a_superblock_level_1to4_partition_decodes_pixel_exact`
12+GREEN (both arms hard-asserted, 40 aomenc attempts), and the r1 suite's
13+"17 failed" collapses to 2 — neither of them reachable by this lane's diff.
14+
15+Class for the ledger: **stale-premise lane** (5th instance) — a lane whose gate
16+is red against a base that is 20 merges behind measures the base, not its own
17+change. Re-measure the premise on today's main BEFORE bisecting your own diff.
18+
19+## The 17, enumerated (charter's first job)
20+
21+They do not exist on the rebased branch. Full `cargo test -p ec-av1 --lib`
22+(`EC_AV1_REQUIRE_AOMENC=1`) on the rebase-onto-5811ec5 tree, before any fix of
23+mine: **290 passed, 2 failed, 27 ignored**, the two being
24+
25+1. `decode::tests::nz_map_ctx_offset_tables_match_the_rect_rule` — **RED ON
26+ MAIN**, not caused by this branch (`git diff --stat main..HEAD` touches
27+ `decode.rs` (partition arms + counters + scans), `refusal_inventory.rs`,
28+ `stream.rs` only; the table, its consumer and this test are all main's).
29+ Root cause: the test read `NZ_MAP_CTX_OFFSET_32X64`/`_64X32` as
30+ `table[col][row]` — lane-rectsplit r2's column-major premise, which r3
31+ disproved and reverted in the *tables* without reverting the *test*. The
32+ tables as they stand are display-major and satisfy libaom's generating rule
33+ (`txb_common.h:199-209`) read `[row][col]`, which is exactly how the only
34+ real consumer reads them (`base_ctx`, `TxClass::TwoD` arm,
35+ `crates/ec-av1/src/decode.rs:1829`) and the reading every merged rect gate
36+ is green under. FIX: read the test in the consumer's order. Table content
37+ untouched — zero risk to the 64x32/32x64 path.
38+ Verification of the direction: for `TX_32X64` (w<h) libaom's rule gives
39+ `11+ctx` for every `row < 2`; our const's row 0 is `[0,11,11,11,11]` and row
40+ 2 is `[6,6,21,21,21]` = `row+col<4 -> 6`, i.e. display-major and correct.
41+2. `gate_coverage::tests::never_exercised_8bit_matches_the_gate_recipes` —
42+ caused by this branch, and by design: this lane's gate is the first to pass
43+ `--enable-1to4-partitions=1` at 8 bit, so the 8-bit coverage hole is retired.
44+ FIX: entry deleted from `NEVER_EXERCISED_8BIT`; the 10-bit entry stays and
45+ now says "10-bit hole only".
46+
47+Bisecting the corner generalisation vs the scan additions (the charter's plan)
48+was therefore not needed and not run — the premise it rested on ("a change that
49+breaks 17 gates") was false.
50+
51+## Rebase conflict resolutions (main had moved onto the same lines)
52+
53+- `decode.rs` SB partition dispatch: BOTH arms kept — main's
54+ `PARTITION_HORZ_A/_B/VERT_A/_B` (part32 r4) and this lane's
55+ `PARTITION_HORZ_4/VERT_4`; `reduced_tx_set` (new on main) threaded into the
56+ 1:4 `decode_block_rect64` calls.
57+- `decode.rs` counters: both `SB_AB_HITS` and `SB_RECT4_{HORZ,VERT}_HITS` kept.
58+- The `_` arm of the SB partition match is now unreachable (all ten partition
59+ values are coded at 64x64); it refuses "a superblock-level partition value
60+ outside PARTITION_NONE..PARTITION_VERT_4" and `refusal_inventory` lists that
61+ string instead of the retired 1:4 one.
62+- `stream.rs`: git had spliced this lane's gate INTO main's AB gate. Resolved by
63+ taking main's file whole and re-appending the 1:4 gate function verbatim.
64+
65+## Refusal lifted
66+
67+`"a superblock-level 1:4 partition (PARTITION_HORZ_4/VERT_4 at 64x64, four
68+64x16/16x64 strips)"` — gone from `decode.rs` and `refusal_inventory.rs`, with
69+the gate above green. `refusal_inventory` + all five `gate_coverage` tests green.
70+
71+## EVIDENCE
72+
73+EVIDENCE: ~/.cache/tx64-sb-gates.log | `cargo test -p ec-av1 --lib -- superblock_level` with EC_AV1_REQUIRE_AOMENC=1 on d1f71b6 | 3 passed, 0 failed, 1 ignored (rect64q drift gate, ignored on main): the 1:4 gate AND both sibling SB gates (horz_vert, ab) green — SIBLING GATES rule satisfied
74+EVIDENCE: ~/.cache/tx64-suite-r2.log | full `cargo test -p ec-av1 --lib`, rebase onto 5811ec5, before my fixes | 290 passed / 2 failed / 27 ignored — the two named above, replacing r1's unenumerated 17
75+EVIDENCE: /tmp/claude-1000/-home-user-Documents-Code-Rust-edith-codecs/b6d8a07f-96a4-4bbb-b378-af9ae25cf7c9/scratchpad/reelc.obu (sha256 32e0619ca9fd9ae0e16072c66013757aa7abfedccc99bc6d3509f6e213195226, `ffmpeg -ss 300 -t 0.4 -c:v copy -f obu`) | `cargo run -p ec-av1 --example decode_probe` on d1f71b6 | ReelC no longer stops at the 1:4 refusal; new stop is "a superblock-level HORZ/VERT strip with a split transform (per-unit rect prediction is not ported)" — the refusal lane-rectsplit r4 (7b55227) lifts
76+EVIDENCE: ~/.cache/tx64-suite-r2b.log | full `cargo test -p ec-av1 --lib` on d1f71b6 (rebased onto 6d86d3a, both fixes in) | see "Suite totals" below
77+
78+## Open, with dispositions
79+
80+- **fix-now, NEXT ROUND (ReelB critical path)**: the **32x32-level**
81+ `PARTITION_HORZ_4/VERT_4` (`decode.rs:9384`, refusal "a 32x32 partition type
82+ this decoder does not code (value={part32})", value 8 = HORZ_4). Shape of the
83+ work, already scouted: four `decode_block_rect(at32, 32, 8)` /
84+ `(8, 32)` strips at `quarter_step` = 1 mi-pair, same `i > 0` frame-edge break
85+ as the 64-level arm. Luma TX_32X8/TX_8X32 are their own adjusted size
86+ (`av1_get_adjusted_tx_size` leaves them alone), entropy ctx = TX_16X16 and
87+ `txsize_log2_minus4` = 4 (256 positions) => `TxbSet::Luma16` exactly, and the
88+ scans **already exist** in this branch: `SCAN_32X8` / `SCAN_8X32`
89+ (`decode.rs:1952`/`1969`). What is genuinely missing is CHROMA 16x4 / 4x16:
90+ `TxbSet::Chroma8` (ctx TX_8X8, 64 positions) plus two new scans
91+ `default_scan_16x4` / `default_scan_4x16`, transcribed with this repo's
92+ column-major -> row-major rule (`row*w+col = (p % h)*w + (p / h)`; validate
93+ the rule by regenerating an existing scan first — a naive copy installs the
94+ transpose).
95+- **deferred(the 32-level arms above)**: a 10-bit twin of the 1:4 gate. The
96+ `NEVER_EXERCISED_10BIT` entry for `enable-1to4-partitions` is still live and
97+ now says so explicitly.
98+- **flagged, resolved**: r1's "pre-existing seed-55 defect (3944 wrong luma,
99+ zero 1:4 blocks)" did not reproduce on the rebased tree — the 1:4 gate runs
100+ all 40 seeds of that same recipe (seeds 42..81, `--min-partition-size=16`) and
101+ every decoded attempt now compares pixel-exact, including seed 55. It was
102+ another symptom of the stale base (main has since landed inter8/rectsplit/
103+ txselect/seg fixes). No separate pin is owed.
104+- **accepted**: `main` moved again during the round (rectsplit r4 `7b55227` is
105+ not yet merged). If it lands first, its `base_ctx` rewrite may delete
106+ `NZ_MAP_CTX_OFFSET_32X64/_64X32` outright and conflict with my one-line test
107+ fix — resolve by taking r4's version, the defect is the same one.
108+
109+## Suite totals
110+
111+`cargo test -p ec-av1 --lib` with `EC_AV1_REQUIRE_AOMENC=1`, on `d1f71b6`:
112+**295 passed, 0 failed, 27 ignored, 0 filtered out** (1234s under concurrent lane load).
113+Both failures above are fixed; no new failure introduced. r1's 256/17/22 is superseded.