forge
Explore
Log in

Don't you dare go Hollow

R4 report -- merge seam, 128-root gathered-partition fix, suite 366/0, film probe table

Browse files at this commit

9e08aca8a0b3c46f442836a6daac3f9b274d459dAhmet Kaan GümüşParent: 9b30932
  • docs
    • r4 report -- merge seam, 128-root gathered-partition fix, suite 366/0, film probe table
Show full message
docs(sb128): r4 report -- merge seam, 128-root gathered-partition fix, suite 366/0, film probe table
lanes/sb128-r4.report.mdadded+136 -0
@@ -0,0 +1,136 @@
1+# lane-sb128 r4 report
2+
3+Branch `lane-sb128`. Two commits this round:
4+`a599740` (merge of main `b51719f` + merge-seam repair), `e3d32d1` (128-root
5+gathered-partition fix).
6+
7+## 1. Merge of main `b51719f` (`a599740`)
8+
9+`git merge --no-commit main` auto-merged clean (0 conflicted paths, diffstat
10+21 files / +4375 / -293: palette2, sub8, rectsplitx, inter4, refstamp, oddh,
11+band63, angleinter content). No lane-vs-main deletion was restored.
12+
13+Table check the charter asks for (`git show main:crates/ec-av1/src/cdf.rs` vs
14+the merged file): the WHOLE cdf.rs delta is 12 lines and they are this lane's
15+added `PARTITION_W128` constant. `NZ_MAP_CTX_OFFSET_32` / `_32X64` / `_64X32`
16+and `FILTER_INTRA` / `FILTER_INTRA_MODE` are byte-identical to main (only
17+their line numbers shift by 11).
18+
19+MERGE SEAM REPAIRED (predicted by the ledger constraint on `866cbb1`): main
20+carries lane-oddh's refusal *"a sequence using 128x128 superblocks on a frame
21+larger than 64x64"* at `stream.rs` `decode_stream`, which refuses exactly the
22+capability this lane implements, plus its gate at
23+`a_real_aomenc_128x128_superblock_stream_is_refused_by_name`. Both deleted,
24+plus the `refusal_inventory.rs` entry. The gate was NOT dropped: it is now
25+`a_real_aomenc_128x128_superblock_stream_decodes_pixel_exact`, same 64x72
26+`--cpu-used=0 --sb-size=128` aomenc stream, decoded through
27+`decode_all_frames_vs_oracle` (pixel-exact vs aomdec, refusal or mismatch is a
28+hard panic, never a SKIP).
29+
30+## 2. Root-cause fix: the 128 root threw its own partition symbol away (`e3d32d1`)
31+
32+`decode.rs::read_sb128_root`, half-out-of-frame arm: it read the gathered
33+2-symbol `split_or_horz`/`split_or_vert` and returned `PARTITION_SPLIT`
34+unconditionally. Spec 5.11.4 makes that symbol the DECISION (1 = SPLIT,
35+0 = HORZ when only cols are out / VERT when only rows are out). The 64 root
36+`partition_w64` already carries the fixed form -- its own comment records the
37+3840x1608 10-bit head this same defect desynced -- so this is that class
38+(`parsed then discarded`) unported to 128.
39+
40+Consequence before the fix: a 128 root that really codes HORZ/VERT at the
41+frame edge was silently reconstructed as a split instead of reaching the
42+refusal that names it. Found because the converted oddh gate decoded
43+pixel-exact while reading zero 128 partition symbols.
44+
45+New witness counter `part128_gathered_symbols()` (`decode.rs:89`), asserted
46+`> 0` by the oddh gate. Its recipe also gains `--min-partition-size=16`:
47+without it aomenc emits `PARTITION_HORZ_4` below 16x16 (another lane's gap)
48+and the gate measured that refusal instead of the 128 root.
49+
50+`decode_probe` now prints `SEQ: use_128x128_superblock=... bit_depth=...
51+max_frame=WxH` next to its tiling line.
52+
53+## 3. The 128 gates
54+
55+Command (all under `systemd-run --user --unit=... -p MemoryMax=10G`,
56+`EC_AV1_REQUIRE_AOMENC=1`, `CARGO_TARGET_DIR=$HOME/.cache/cargo-target-sb128`):
57+`cargo test -p ec-av1 --lib -j3 -- --nocapture --test-threads=2 128x128`
58+
59+```
60+a_real_aomenc_inter_sequence_with_128x128_superblocks_decodes_pixel_exact (yuv420p): 9 decode-order frames pixel-exact (1 hidden), part128_symbols=18 cdef_idx_hits=12 tmv_hits=103
61+a_real_aomenc_inter_sequence_with_128x128_superblocks_decodes_pixel_exact (yuv420p10le): 9 decode-order frames pixel-exact (1 hidden), part128_symbols=18 cdef_idx_hits=12 tmv_hits=100
62+a_real_aomenc_128x128_superblock_stream_decodes_pixel_exact: 1 frames pixel-exact (0 hidden) at 64x72, part128_symbols=1
63+a_real_aomenc_stream_with_128x128_superblocks_decodes_pixel_exact: 6 pixel-exact, 0 named refusals, part128_symbols=26 part128_split_hits=34
64+test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 395 filtered out; finished in 4.59s
65+```
66+
67+The un-ignored inter gate meets every clause the charter names: real aomenc
68+stream with a knob-arrival assert on the sequence header
69+(`use_128x128_superblock == true` AND the requested bit depth), per-arm
70+counter deltas taken around the decode (`part128`/`cdef_idx`/`tmv`, each
71+hard-asserted), every decode-order frame compared inside
72+`decode_all_frames_vs_oracle` (which panics on a decoder refusal and on any
73+differing byte -- there is no out-of-scope-mismatch tolerance path in it at
74+all, so that count is structurally 0), 8- and 10-bit arms, and a SKIP only
75+when ffmpeg/aomenc are absent, which `EC_AV1_REQUIRE_AOMENC=1` turns into a
76+hard failure.
77+
78+EVIDENCE: `$HOME/.cache/sb128-r4-g128c.log` | `cargo test -p ec-av1 --lib -- --nocapture 128x128` on `e3d32d1` | `test result: ok. 3 passed; 0 failed`.
79+
80+## 4. Full lib suite
81+
82+```
83+test result: ok. 366 passed; 0 failed; 32 ignored; 0 measured; 0 filtered out; finished in 636.94s
84+```
85+
86+`gate_coverage` (10 tests), `refusal_inventory` and
87+`decode::tests::base_ctx_rect_offsets_match_the_transcribed_tables_over_the_whole_domain`
88+all `ok`.
89+
90+EVIDENCE: `$HOME/.cache/sb128-suite-r4.log` | `systemd-run --user --unit=sb128-r4-suite -p MemoryMax=10G ... EC_AV1_REQUIRE_AOMENC=1 cargo test -p ec-av1 --lib -j3` on `e3d32d1` | `366 passed; 0 failed; 32 ignored`.
91+
92+## 5. ReelC probe
93+
94+Stream: `ffmpeg -c:v copy -f obu` extract of
95+`reelc.mkv`, 1175978 bytes,
96+sha256 `bf31d1ba8600a9c26ae12c11cb44435490d48f5316a77cc307d6e5dbb4efac8c`,
97+78 frame headers, 1 tile.
98+
99+```
100+TILING: 78 frame headers parsed
101+SEQ: use_128x128_superblock=true bit_depth=10 max_frame=1920x792
102+REFUSED: unsupported: AV1 tile (a 1:4 partition below 16x16 (PARTITION_HORZ_4/VERT_4, four 16x4/4x16 strips -- this decoder codes NONE, HORZ, VERT, the four AB arms and a clean split at 16x16))
103+```
104+
105+| what | value |
106+| --- | --- |
107+| decode-order frame it stops on | 0 (the first key frame) |
108+| frames compared vs ffmpeg yuv420p10le | 0 -- `decode_stream` returns `Err`, so no plane is produced to compare |
109+| refusal string reached | `a 1:4 partition below 16x16 (PARTITION_HORZ_4/VERT_4, four 16x4/4x16 strips -- this decoder codes NONE, HORZ, VERT, the four AB arms and a clean split at 16x16)` |
110+| block | 16x16 at neighbour index `at16 = (21, 119)` = mi_row 84, mi_col 476, pixel (y=336, x=1904) -- the frame's last 16-pixel column (1904+16 = 1920) |
111+| partition value read | 9 = `PARTITION_VERT_4` |
112+
113+Measured by a temporary `eprintln!` at the refusal site (`decode.rs:12462`),
114+reverted in the same session; the permanent artefact is the `SEQ:` line.
115+
116+REELC DOES NOT STOP ON 128 NONE/HORZ/VERT, and it does not stop on the inter
117+one either: `use_128x128_superblock=true` at 1920x792 is precisely what main
118+`b51719f` refuses outright, and this lane carries ReelC through the 128 root,
119+through 128-level SPLIT and the whole 64/32 tree, down to a 16x16 block that
120+codes `PARTITION_VERT_4`. That gap belongs to the 1:4-below-16x16 lane, not to
121+lane-sb128b's 128 NONE luma + chroma 2x2 TX_32X32 work -- nothing was
122+duplicated.
123+
124+The first ~30 decode-order frames could not be compared: the decode aborts on
125+frame 0. That comparison is `deferred(the 1:4-below-16x16 refusal being
126+lifted)`.
127+
128+## Residue
129+
130+- `deferred(another round)`: the handoff's TASK 3 class sweep -- diffing
131+ `find_mv_stack` against `find_mv_stack_compound` phase by phase beyond the
132+ tpl extension loop r3 already ported. Not started this round.
133+- `deferred(the 1:4-below-16x16 lane)`: ReelC's first ~30-frame pixel compare.
134+- `accepted`: 128-root NONE/HORZ/VERT/AB still refuse by name; with `e3d32d1`
135+ that refusal is now actually reachable at a half-out-of-frame superblock
136+ instead of being silently mis-decoded. lane-sb128b owns lifting it.