Lane-superres r8 charter -- inter-frame superres, scaled-reference MC
Browse files at this commit899b5fafa2202f0735cfe8c12d140debe1333c5bParent: 0642e9c- docs
- lane-superres r8 charter -- inter-frame superres, scaled-reference MC
1 changed file +46 -0
- lanes/superres-r8.charter.md +46 -0
lanes/superres-r8.charter.mdadded+46 -0
| @@ -0,0 +1,46 @@ | |||
| 1 | +# lane-superres r8 — inter-frame superres | ||
| 2 | + | ||
| 3 | +At 8346976, MERGED into main (3019019). Key-frame superres is closed: 3/3 frames | ||
| 4 | +pixel-exact, `superres_hits=3`. Read `lanes/superres-r7.report.md`. | ||
| 5 | + | ||
| 6 | +Start with `git merge main` (main is a8724cb — tile rows, delta_q/delta_lf, | ||
| 7 | +palette-Y, a `bit_depth != 8` refusal, three guard tests), resolve, suite green, | ||
| 8 | +commit. | ||
| 9 | + | ||
| 10 | +## The round | ||
| 11 | +`decode_stream` refuses `"an inter frame with use_superres set (this decoder | ||
| 12 | +never scales its motion-compensated reference to match the current frame's | ||
| 13 | +downscaled size, spec 7.11.3.3)"`. Implement it. | ||
| 14 | + | ||
| 15 | +The real work is scaled-reference motion compensation: when a reference frame's | ||
| 16 | +dimensions differ from the current frame's downscaled size, the predictor is | ||
| 17 | +sampled with a per-block step derived from the scale factors, not a plain copy. | ||
| 18 | +libaom's `av1_setup_scale_factors_for_frame` and `av1_convolve_2d_scale` are the | ||
| 19 | +reference; spec 7.11.3.3 gives the same in `xStep`/`yStep` terms. Expect the | ||
| 20 | +filter selection and the subpel precision to differ from the unscaled path. | ||
| 21 | + | ||
| 22 | +Order, each committed: | ||
| 23 | +1. A gate FIRST that produces a real inter frame with `use_superres`. | ||
| 24 | + `--superres-denominator` controls NON-key frames (`--superres-kf-denominator` | ||
| 25 | + is the key-frame one — this lane learned that the hard way), so the recipe is | ||
| 26 | + within reach. Drive the tile decode BELOW `decode_stream` so the refusal | ||
| 27 | + cannot short-circuit the code you are measuring | ||
| 28 | + ([[refusal-short-circuits-its-own-code]]). | ||
| 29 | +2. Then the scaled MC path, bisected against the oracle with a range/pixel | ||
| 30 | + ladder rather than by inspection. | ||
| 31 | +3. Then, and only with the gate pixel-exact, lift the refusal and update | ||
| 32 | + `refusal_inventory.rs` in the same commit. | ||
| 33 | + | ||
| 34 | +Instrument, do not hand-trace: r6 burned a round hand-tracing what r7 closed in | ||
| 35 | +one look at libaom's `set_lpf_parameters` early return. Rung numbers 6, 7, 8, 8b | ||
| 36 | +are taken in `scripts/instrument-aom-oracle.sh` on main — take 9. The oracle at | ||
| 37 | +`~/.cache/aom-oracle` is SHARED with five sibling lanes: env-gated rungs only, | ||
| 38 | +silent when unset, idempotent, never a throwaway patch left in the tree. | ||
| 39 | + | ||
| 40 | +Hard rules: `CARGO_TARGET_DIR=$HOME/.cache/cargo-target-superres`; foreground | ||
| 41 | +`nice -n 19 cargo ... -j4`; every `cargo test` a timeout >= 600000 ms; fixtures | ||
| 42 | +through `gradients_source(seed, w, h, tail)`; ffmpeg generates bounded with `-t`; | ||
| 43 | +`EC_AV1_REQUIRE_AOMENC=1`; aomenc `--threads=1 --row-mt=0 --sb-size=64`. Sibling | ||
| 44 | +worktrees have live agents — never build in or edit them. Never push, never merge | ||
| 45 | +into main. 75-turn cap, does not reset: COMMIT AT EVERY GREEN STEP. End with | ||
| 46 | +`lanes/superres-r8.report.md`, VERDICT on line 1. | ||