R7 report -- gathered frame-edge 128x64/64x128 on the inter path, film head bit-exact
Browse files at this commitbd2a883e31df4719be61bad772cf75543bf9aaccParent: de75d08- docs
- r7 report -- gathered frame-edge 128x64/64x128 on the inter path, film head bit-exact
1 changed file +94 -0
- lanes/sb128c-r7.report.md +94 -0
lanes/sb128c-r7.report.mdadded+94 -0
| @@ -0,0 +1,94 @@ | ||
| 1 | +# lane-sb128c r7 report -- the 128 root's gathered frame-edge HORZ/VERT arm | |
| 2 | + | |
| 3 | +Branch `lane-sb128c`, worktree `edith_codecs-sb128c`, | |
| 4 | +`CARGO_TARGET_DIR=$HOME/.cache/cargo-target-sb128c`. | |
| 5 | +Commits this round: `d10a641` (the interrupted r7 builder's partial, committed as | |
| 6 | +wip), `52e4458` (feature + gate), `5bd4556` (inventory). | |
| 7 | + | |
| 8 | +## What changed | |
| 9 | + | |
| 10 | +- `crates/ec-av1/src/decode.rs:13446` `read_sb128_root`: HORZ/VERT are no longer | |
| 11 | + refused there; they are counted (`PART128_HORZ_HITS`, `PART128_VERT_HITS`, and | |
| 12 | + the gathered-edge pair `PART128_EDGE_HORZ_HITS`/`PART128_EDGE_VERT_HITS`) and | |
| 13 | + only the four AB shapes still refuse, by their own name. | |
| 14 | +- `crates/ec-av1/src/decode.rs:21881` inter tile path: a 128 root that resolves | |
| 15 | + to HORZ/VERT decodes two `inter_piece!` blocks of 128x64 / 64x128 (the second | |
| 16 | + skipped when its origin is outside the frame, libaom `decode_partition`'s | |
| 17 | + `if (mi_row + hbs < mi_rows)`), then fans one `cdef_idx` out over the 64x64 | |
| 18 | + CDEF units the block covers. | |
| 19 | +- `crates/ec-av1/src/decode.rs:12029` `read_block_tx_size_rect`: `bw.max(bh) > 64` | |
| 20 | + reads TWO square TX_64X64 top-level units (libaom `read_block_tx_size`'s | |
| 21 | + `idy/idx` loop), each with its own `txfm_partition` symbol at depth 0. | |
| 22 | +- `crates/ec-av1/src/decode.rs:11897` `rect_inter_residual_supported`: (128,64) | |
| 23 | + and (64,128) admitted. | |
| 24 | +- `crates/ec-av1/src/decode.rs:18008` / `:19109`: the `side > 64` mu-chunk chroma | |
| 25 | + branch now precedes the `rect_tu` one -- at the 128 root a rect block's chroma | |
| 26 | + is per mu chunk, not one unit for the block. | |
| 27 | +- `crates/ec-av1/src/decode.rs:16891`: the `whole_sb` test that gates delta-q / | |
| 28 | + delta-lf reads is against `sb_mi_cur() * 4`, not a hardcoded 64. | |
| 29 | +- `crates/ec-av1/src/decode.rs:3948` `Neighbours::new`: the per-mi side arrays are | |
| 30 | + padded to a superblock multiple. ROOT CAUSE of two index-out-of-bounds panics | |
| 31 | + (`decode.rs:5018`, `:4537`, len 200 index 200) on the 1080p film: a 128x64 at | |
| 32 | + the bottom edge records neighbour state for its whole 64-row extent, past the | |
| 33 | + frame's last mi row -- libaom's own context buffers are `MAX_MIB_SIZE`-aligned | |
| 34 | + for exactly that reason. The two `get_mut` guards in `record_mi_rect` are the | |
| 35 | + belt; the padding is the fix. | |
| 36 | +- `crates/ec-av1/src/decode.rs:13700` key-frame path: HORZ/VERT at the 128 root | |
| 37 | + now REFUSE by name. Before this round they fell through into the four-quadrant | |
| 38 | + SPLIT visit and silently decoded wrong pixels (the first version of the gate | |
| 39 | + caught it as a frame-0 mismatch on a `gradients` source). | |
| 40 | +- `crates/ec-av1/src/stream.rs:18957` new gate; `:84` `sb128_rect_counters()`; | |
| 41 | + `crates/ec-av1/examples/decode_probe.rs:40` prints them. | |
| 42 | +- `crates/ec-av1/src/refusal_inventory.rs:46`: the old | |
| 43 | + "a 128x128 superblock HORZ/VERT or AB partition" line is REPLACED by | |
| 44 | + "a 128x128 superblock AB partition (HORZ_A/HORZ_B/VERT_A/VERT_B at the 128 root)" | |
| 45 | + plus the new intra-frame one and the var-tx >64 leaf guard. | |
| 46 | + | |
| 47 | +## Gate (GREEN) | |
| 48 | + | |
| 49 | +`cargo test -p ec-av1 --lib gathered_edge_horz -- --nocapture` | |
| 50 | +(`a_real_aomenc_sb128_gathered_edge_horz_partition_decodes_pixel_exact`): | |
| 51 | +4 real `aomenc --sb-size=128 --cpu-used=0 --min-partition-size=64 | |
| 52 | +--enable-rect-partitions=1` streams, 5 frames each, every decode-order frame | |
| 53 | +(hidden alt-ref included) compared against the instrumented aomdec through | |
| 54 | +`decode_all_frames_vs_oracle`; hard asserts the gathered-edge counter and the | |
| 55 | +inter 128x64/64x128 block counter. | |
| 56 | + | |
| 57 | + seed 42 cq55 384x320 8bit HORZ: 6 frames pixel-exact (1 hidden), edge +2 inter_128rect +2 | |
| 58 | + seed 43 cq55 384x320 10bit HORZ: 6 frames pixel-exact (1 hidden), edge +24 inter_128rect +24 | |
| 59 | + seed 44 cq32 192x256 8bit VERT: 6 frames pixel-exact (1 hidden), edge +2 inter_128rect +2 | |
| 60 | + seed 45 cq45 192x256 10bit VERT: 6 frames pixel-exact (1 hidden), edge +2 inter_128rect +2 | |
| 61 | + test result: ok. 1 passed; 0 failed | |
| 62 | + | |
| 63 | +EVIDENCE: $HOME/.cache/sb128c-gate3-r7.log | cargo test -p ec-av1 --lib gathered_edge_horz --nocapture | 4/4 arms pixel-exact vs aomdec, edge counters +2/+24/+2/+2 | |
| 64 | + | |
| 65 | +## Film (1080p 10-bit AV1, 4 extracts) | |
| 66 | + | |
| 67 | +| extract | before r7 | after r7 | edge_horz | inter_128x64 | | |
| 68 | +|---|---|---|---|---| | |
| 69 | +| 2 s head (1920x792) | stopped: 128 HORZ/VERT/AB | **OK: 48/48 frames, 49/49 dumps bit-exact vs aomdec** | 720 | 720 | | |
| 70 | +| `~/.cache/reelc-head.obu` | stopped: 128 HORZ/VERT/AB | **OK: 48/48 frames, 49/49 dumps bit-exact** | 720 | 720 | | |
| 71 | +| `-ss 8100` 2 s | stopped: 128 HORZ/VERT/AB | stops at another lane: "a split intra strip whose transform unit is 32x64" | 1 | 0 | | |
| 72 | +| `-ss 9000` 2 s | stopped: 128 HORZ/VERT/AB | stops at another lane: "a non-skip rectangular (HORZ/VERT/HORZ_B) strip needs rectangular residual coding" | 12 | 0 | | |
| 73 | + | |
| 74 | +EVIDENCE: $HOME/.cache/sb128c-r7/d2 vs $HOME/.cache/sb128c-r7/o2 | EC_AV1_FINAL_DUMP on decode_probe head2s.obu and on aomdec head2s.obu, cmp per frame | frames=49 frames_differing=0 | |
| 75 | + | |
| 76 | +The 128-partition wall is gone from all four extracts; two of them now decode | |
| 77 | +their whole 2 s window bit-exact, the other two stop at OTHER lanes' refusals. | |
| 78 | + | |
| 79 | +## Residue | |
| 80 | + | |
| 81 | +- deferred: the INTRA (key-frame) 128x64/64x128 block -- refused by name, was a | |
| 82 | + silent wrong decode before this round. Unblocked by a rect-capable | |
| 83 | + `decode_block` at 128 (`decode_block_rect64` is corner-cropped for a 32x32 | |
| 84 | + transform and does not generalise). A smooth `gradients` source at | |
| 85 | + `--min-partition-size=64` reaches it in one encode, so a gate is one recipe away. | |
| 86 | +- deferred: the four AB shapes at the 128 root (HORZ_A/HORZ_B/VERT_A/VERT_B), | |
| 87 | + still refused by name. Unblocked by the intra rect block above plus the | |
| 88 | + libaom visit order recorded in `lanes/sb128c-r6.handoff.md`. Whether aomenc | |
| 89 | + ever picks them is still unmeasured -- our decoder used to stop at the first | |
| 90 | + refusing root, so the r6 sweeps could not observe past it; the 512x512 | |
| 91 | + abshape source now decodes further and the sweep can be re-run. | |
| 92 | +- accepted: `PART128_HORZ_HITS`/`PART128_VERT_HITS` (the non-gathered, | |
| 93 | + full-alphabet arms) are counted but were 0 in every stream measured this | |
| 94 | + round; the gate asserts the gathered pair only. |