Lane-lr r6 charter -- the one SGR pixel
Browse files at this commit0a1c0e8ab1f487970e4a6ee8e37afed61de86761Parent: bd8da13- docs
- lane-lr r6 charter -- the one SGR pixel
1 changed file +63 -0
- lanes/lr-r6.charter.md +63 -0
lanes/lr-r6.charter.mdadded+63 -0
| @@ -0,0 +1,63 @@ | |||
| 1 | +# lane-lr r6 — one pixel | ||
| 2 | + | ||
| 3 | +At 0f36e31. Read the r5 section of `lanes/lr.report.md`. | ||
| 4 | + | ||
| 5 | +**Correction to the r5 charter, on the record:** it said HEAD had "never been | ||
| 6 | +seen to compile". That was the orchestrator's inference from a cap-time commit, | ||
| 7 | +and it was wrong — r4's work compiles clean and all four charter steps | ||
| 8 | +(Wiener + self-guided at both call sites, the gate widened to assert `Ok` and | ||
| 9 | +pixel-exactness, the `stream.rs` refusal dropped) are genuinely finished. r5 | ||
| 10 | +spent its round diagnosing instead, which was the right call. | ||
| 11 | + | ||
| 12 | +## The defect | ||
| 13 | +`a_real_aomenc_stream_with_restoration_reads_lr_symbols_correctly` fails | ||
| 14 | +deterministically — reproduced identically on every rerun, not a flake: | ||
| 15 | +**one pixel of 6144**, V plane, row 61 col 6, ours 195 vs ffmpeg 194. Seed 46, | ||
| 16 | +filter `Sgrproj { ep: 6, xqd: [-16, -32] }`, inside chroma's last partial | ||
| 17 | +restoration stripe [60, 64) of a 64px plane. Y and U are bit-exact on every | ||
| 18 | +attempt; only this one (plane, pixel, filter) combination diverges. | ||
| 19 | + | ||
| 20 | +## Ruled out by r5, do not redo (class `worker-cap-spent-reading`) | ||
| 21 | +- The stripe-boundary substitution (`lr_sample`), hand-verified line-by-line | ||
| 22 | + against libaom's `setup_processing_stripe_boundary` / | ||
| 23 | + `save_deblock_boundary_lines` for the failing stripe. Matches exactly. | ||
| 24 | +- The dense (`r1 = 1`) SGR arm's A/B grid values and final combine, dumped live | ||
| 25 | + and independently recomputed in Python from the real cdef/deblocked bytes. | ||
| 26 | + Correct. | ||
| 27 | +- Standalone C reimplementations of the box filter (`/tmp/lr_ref.c`, | ||
| 28 | + `/tmp/lr_probe.c`) produced mutually inconsistent numbers across runs of | ||
| 29 | + identical code. Do not trust them or their 194-vs-195 claim; they are not | ||
| 30 | + evidence. If you want C ground truth, call libaom's own exported function | ||
| 31 | + through a harness linked against `~/.cache/aom-oracle/build/libaom.a`, the way | ||
| 32 | + `scripts/superres-pin-harness.c` does — that is the pattern that works here. | ||
| 33 | + | ||
| 34 | +## Start here | ||
| 35 | +The fast (`r0 = 2`) arm's individual neighbour A/B reads at (row 61, col 6), | ||
| 36 | +which r5 ran out of budget to instrument the same way it did the dense arm. | ||
| 37 | +If that also checks out, go upstream to the V-plane CDEF/deblock pixel data | ||
| 38 | +feeding the stripe. | ||
| 39 | + | ||
| 40 | +Sibling lanes built oracle rungs you can use: `EC_AV1_POSTDEBLOCK_DUMP` and | ||
| 41 | +`EC_AV1_PREFILT_WIDE_DUMP` (in `scripts/instrument-aom-oracle.sh`, aomdec | ||
| 42 | +already rebuilt on this box) give libaom's own post-deblock and wide pre-filter | ||
| 43 | +buffers — exactly the upstream check above, without hand-tracing. Note also that | ||
| 44 | +this is a partial stripe at a plane edge and a 1-LSB divergence: rounding in the | ||
| 45 | +partial-stripe height or an edge-clamped neighbour is the shape to suspect. | ||
| 46 | + | ||
| 47 | +## Then | ||
| 48 | +Once green: COMMIT immediately. Then remove any remaining LR refusal, confirm | ||
| 49 | +`gate_coverage.rs`'s `NEVER_EXERCISED` no longer needs `enable-restoration` | ||
| 50 | +(main's copy — you may not have the file), and write the r6 report. | ||
| 51 | + | ||
| 52 | +Merge note: main is at 53f5358 and has moved (multi-tile key frames, chroma | ||
| 53 | +smooth/paeth, CDEF index reads, three reworded refusals, and | ||
| 54 | +`refusal_inventory.rs` which pins every decode-path refusal string). Consider | ||
| 55 | +`git merge main` here and resolving it yourself before the branch is merged | ||
| 56 | +back — you know which side owns each hunk. Report every refusal string you add, | ||
| 57 | +rename or remove, verbatim. | ||
| 58 | + | ||
| 59 | +Hard rules: `CARGO_TARGET_DIR=$HOME/.cache/cargo-target-lr`; foreground | ||
| 60 | +`nice -n 19 cargo ... -j4`; every `cargo test` a timeout >= 600000 ms. Sibling | ||
| 61 | +worktrees have live agents — never build in or edit them. Never push, never | ||
| 62 | +merge into `main`. 75-turn cap, does not reset: COMMIT AT EVERY GREEN STEP. | ||
| 63 | +Update `lanes/lr.report.md` with an r6 section, VERDICT first. | ||