# lane-sb128 r4 report Branch `lane-sb128`. Two commits this round: `a599740` (merge of main `b51719f` + merge-seam repair), `e3d32d1` (128-root gathered-partition fix). ## 1. Merge of main `b51719f` (`a599740`) `git merge --no-commit main` auto-merged clean (0 conflicted paths, diffstat 21 files / +4375 / -293: palette2, sub8, rectsplitx, inter4, refstamp, oddh, band63, angleinter content). No lane-vs-main deletion was restored. Table check the charter asks for (`git show main:crates/ec-av1/src/cdf.rs` vs the merged file): the WHOLE cdf.rs delta is 12 lines and they are this lane's added `PARTITION_W128` constant. `NZ_MAP_CTX_OFFSET_32` / `_32X64` / `_64X32` and `FILTER_INTRA` / `FILTER_INTRA_MODE` are byte-identical to main (only their line numbers shift by 11). MERGE SEAM REPAIRED (predicted by the ledger constraint on `866cbb1`): main carries lane-oddh's refusal *"a sequence using 128x128 superblocks on a frame larger than 64x64"* at `stream.rs` `decode_stream`, which refuses exactly the capability this lane implements, plus its gate at `a_real_aomenc_128x128_superblock_stream_is_refused_by_name`. Both deleted, plus the `refusal_inventory.rs` entry. The gate was NOT dropped: it is now `a_real_aomenc_128x128_superblock_stream_decodes_pixel_exact`, same 64x72 `--cpu-used=0 --sb-size=128` aomenc stream, decoded through `decode_all_frames_vs_oracle` (pixel-exact vs aomdec, refusal or mismatch is a hard panic, never a SKIP). ## 2. Root-cause fix: the 128 root threw its own partition symbol away (`e3d32d1`) `decode.rs::read_sb128_root`, half-out-of-frame arm: it read the gathered 2-symbol `split_or_horz`/`split_or_vert` and returned `PARTITION_SPLIT` unconditionally. Spec 5.11.4 makes that symbol the DECISION (1 = SPLIT, 0 = HORZ when only cols are out / VERT when only rows are out). The 64 root `partition_w64` already carries the fixed form -- its own comment records the 3840x1608 10-bit head this same defect desynced -- so this is that class (`parsed then discarded`) unported to 128. Consequence before the fix: a 128 root that really codes HORZ/VERT at the frame edge was silently reconstructed as a split instead of reaching the refusal that names it. Found because the converted oddh gate decoded pixel-exact while reading zero 128 partition symbols. New witness counter `part128_gathered_symbols()` (`decode.rs:89`), asserted `> 0` by the oddh gate. Its recipe also gains `--min-partition-size=16`: without it aomenc emits `PARTITION_HORZ_4` below 16x16 (another lane's gap) and the gate measured that refusal instead of the 128 root. `decode_probe` now prints `SEQ: use_128x128_superblock=... bit_depth=... max_frame=WxH` next to its tiling line. ## 3. The 128 gates Command (all under `systemd-run --user --unit=... -p MemoryMax=10G`, `EC_AV1_REQUIRE_AOMENC=1`, `CARGO_TARGET_DIR=$HOME/.cache/cargo-target-sb128`): `cargo test -p ec-av1 --lib -j3 -- --nocapture --test-threads=2 128x128` ``` 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 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 a_real_aomenc_128x128_superblock_stream_decodes_pixel_exact: 1 frames pixel-exact (0 hidden) at 64x72, part128_symbols=1 a_real_aomenc_stream_with_128x128_superblocks_decodes_pixel_exact: 6 pixel-exact, 0 named refusals, part128_symbols=26 part128_split_hits=34 test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 395 filtered out; finished in 4.59s ``` The un-ignored inter gate meets every clause the charter names: real aomenc stream with a knob-arrival assert on the sequence header (`use_128x128_superblock == true` AND the requested bit depth), per-arm counter deltas taken around the decode (`part128`/`cdef_idx`/`tmv`, each hard-asserted), every decode-order frame compared inside `decode_all_frames_vs_oracle` (which panics on a decoder refusal and on any differing byte -- there is no out-of-scope-mismatch tolerance path in it at all, so that count is structurally 0), 8- and 10-bit arms, and a SKIP only when ffmpeg/aomenc are absent, which `EC_AV1_REQUIRE_AOMENC=1` turns into a hard failure. EVIDENCE: `$HOME/.cache/sb128-r4-g128c.log` | `cargo test -p ec-av1 --lib -- --nocapture 128x128` on `e3d32d1` | `test result: ok. 3 passed; 0 failed`. ## 4. Full lib suite ``` test result: ok. 366 passed; 0 failed; 32 ignored; 0 measured; 0 filtered out; finished in 636.94s ``` `gate_coverage` (10 tests), `refusal_inventory` and `decode::tests::base_ctx_rect_offsets_match_the_transcribed_tables_over_the_whole_domain` all `ok`. 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`. ## 5. ReelC probe Stream: `ffmpeg -c:v copy -f obu` extract of `reelc.mkv`, 1175978 bytes, sha256 `bf31d1ba8600a9c26ae12c11cb44435490d48f5316a77cc307d6e5dbb4efac8c`, 78 frame headers, 1 tile. ``` TILING: 78 frame headers parsed SEQ: use_128x128_superblock=true bit_depth=10 max_frame=1920x792 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)) ``` | what | value | | --- | --- | | decode-order frame it stops on | 0 (the first key frame) | | frames compared vs ffmpeg yuv420p10le | 0 -- `decode_stream` returns `Err`, so no plane is produced to compare | | 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)` | | 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) | | partition value read | 9 = `PARTITION_VERT_4` | Measured by a temporary `eprintln!` at the refusal site (`decode.rs:12462`), reverted in the same session; the permanent artefact is the `SEQ:` line. REELC DOES NOT STOP ON 128 NONE/HORZ/VERT, and it does not stop on the inter one either: `use_128x128_superblock=true` at 1920x792 is precisely what main `b51719f` refuses outright, and this lane carries ReelC through the 128 root, through 128-level SPLIT and the whole 64/32 tree, down to a 16x16 block that codes `PARTITION_VERT_4`. That gap belongs to the 1:4-below-16x16 lane, not to lane-sb128b's 128 NONE luma + chroma 2x2 TX_32X32 work -- nothing was duplicated. The first ~30 decode-order frames could not be compared: the decode aborts on frame 0. That comparison is `deferred(the 1:4-below-16x16 refusal being lifted)`. ## Residue - `deferred(another round)`: the handoff's TASK 3 class sweep -- diffing `find_mv_stack` against `find_mv_stack_compound` phase by phase beyond the tpl extension loop r3 already ported. Not started this round. - `deferred(the 1:4-below-16x16 lane)`: ReelC's first ~30-frame pixel compare. - `accepted`: 128-root NONE/HORZ/VERT/AB still refuse by name; with `e3d32d1` that refusal is now actually reachable at a half-out-of-frame superblock instead of being silently mis-decoded. lane-sb128b owns lifting it.