Lane-superres r5 charter -- build the post-deblock oracle rung
Browse files at this commit92a3a37cbaebc1439d6ed428e44bb283fd01a95dParent: 461c34f- docs
- lane-superres r5 charter -- build the post-deblock oracle rung
1 changed file +50 -0
- lanes/superres-r5.charter.md +50 -0
lanes/superres-r5.charter.mdadded+50 -0
| @@ -0,0 +1,50 @@ | |||
| 1 | +# lane-superres r5 — build the instrument, then close the 2-pixel residue | ||
| 2 | + | ||
| 3 | +At 48ba479. Read `lanes/superres-r4.report.md`. | ||
| 4 | + | ||
| 5 | +## State | ||
| 6 | +Everything but the last two pixels. The refusal-by-name, the spec 7.16 upscaler | ||
| 7 | +pinned against real libaom, the stage-3 wiring, the `--superres-kf-denominator` | ||
| 8 | +flag, the chroma-crop `ROUND_POWER_OF_TWO` fix and the margin threading are all | ||
| 9 | +committed and verified: 237 passed, 1 failed — only | ||
| 10 | +`a_real_aomenc_superres_key_frame_sequence_decodes_pixel_exact`, now **2 of 4096 | ||
| 11 | +luma pixels off by 1** (frame 2, rows 17-18, output column 62), down from 5. | ||
| 12 | + | ||
| 13 | +r4 ruled out, by hand-verifying against the spec: the `filter8`/`filter14` tap | ||
| 14 | +arithmetic, CDEF (forced off in this fixture), intra-prediction edge | ||
| 15 | +availability using the wrong width, and a "row-swap" lead it debunked as a | ||
| 16 | +numerical coincidence in smooth-gradient content. Its live suspect is the | ||
| 17 | +deblock LEVEL decision (`edge_params`) for the edge whose transform straddles | ||
| 18 | +the `frame_width` -> `true_width` margin. | ||
| 19 | + | ||
| 20 | +## Your job is to stop hand-tracing and build the instrument | ||
| 21 | +r4's own conclusion: hand-tracing our arithmetic cannot separate "our deblock | ||
| 22 | +level or mask is wrong" from "our pre-deblock reconstruction is wrong", because | ||
| 23 | +both are consistent with our own output. The only thing that can is libaom's | ||
| 24 | +ground truth for that row. | ||
| 25 | + | ||
| 26 | +`scripts/instrument-aom-oracle.sh` already carries env-gated rungs in exactly | ||
| 27 | +the shape you need — `EC_TRACE=1` (partitions), `EC_TRACE_COEFF=1`, | ||
| 28 | +`EC_TRACE_MODE=1`, and `EC_AV1_PREFILT_DUMP=<prefix>` (per-frame PRE-filter | ||
| 29 | +recon). Add a rung that dumps the **post-deblock, pre-superres** row content | ||
| 30 | +over `frame_width..true_width`, following the existing rungs exactly: | ||
| 31 | +env-gated, silent when unset, idempotent, wrapper-around-impl. Rebuild with | ||
| 32 | +`scripts/build-aom-oracle.sh`. Then diff it against `decode.rs`'s stashed | ||
| 33 | +margin at the failing row. | ||
| 34 | + | ||
| 35 | +Building that rung IS the deliverable of this round if it takes the whole | ||
| 36 | +budget. Commit the script change as soon as it builds — it is reusable by every | ||
| 37 | +lane, and instrument-building is a first-class subtask here, never an excuse. | ||
| 38 | + | ||
| 39 | +Then: fix what it localises, get the gate green, and only after that start | ||
| 40 | +stage 4 (inter-frame superres, spec 7.11.3.3 scaled-reference MC). | ||
| 41 | + | ||
| 42 | +Merge note: main is at 53b319b with `gate_coverage.rs` and | ||
| 43 | +`refusal_inventory.rs`. Report every refusal string you add or remove, verbatim. | ||
| 44 | + | ||
| 45 | +Hard rules: `CARGO_TARGET_DIR=$HOME/.cache/cargo-target-superres`; foreground | ||
| 46 | +`nice -n 19 cargo ... -j4`; every `cargo test` a timeout >= 600000 ms. Sibling | ||
| 47 | +worktrees (edith_codecs, -realworld, -lr, -tiles, -palette) have live agents — | ||
| 48 | +never build in or edit them. Never push, never merge, never touch `main`. | ||
| 49 | +75-turn cap, does not reset: COMMIT AT EVERY GREEN STEP. End with | ||
| 50 | +`lanes/superres-r5.report.md`, VERDICT on line 1. | ||