Lane-superres r9 charter -- implement r8's derived scaled-reference MC
Browse files at this commitd780b9b2897a83ec8c20ce58d938b087af163665Parent: d0bcea1- docs
- lane-superres r9 charter -- implement r8's derived scaled-reference MC
1 changed file +44 -0
- lanes/superres-r9.charter.md +44 -0
lanes/superres-r9.charter.mdadded+44 -0
| @@ -0,0 +1,44 @@ | |||
| 1 | +# lane-superres r9 — implement the scaled-reference MC r8 derived | ||
| 2 | + | ||
| 3 | +At 67f5097, clean, suite green. Read `lanes/superres-r8.report.md` — it is a | ||
| 4 | +finished implementation plan, not a status note. r8 traced spec 7.11.3.3 through | ||
| 5 | +libaom's `scale.c`/`decodeframe.c`/`convolve.c` and proved algebraically that | ||
| 6 | +the algorithm reduces to this crate's existing rounding chain with only the | ||
| 7 | +horizontal-pass sampling grid changing (AV1 superres never scales height, so the | ||
| 8 | +vertical pass is untouched). **No further libaom reading should be needed.** | ||
| 9 | + | ||
| 10 | +Its own next-round TODO, in order: | ||
| 11 | +1. The bypass gate FIRST — a real inter frame with `use_superres`, driven below | ||
| 12 | + `decode_stream` so the refusal cannot short-circuit the code you are | ||
| 13 | + measuring ([[refusal-short-circuits-its-own-code]]). | ||
| 14 | + `--superres-denominator` controls non-key frames. | ||
| 15 | +2. `mc::predict_scaled` plus `mc::scale_factor`/`REF_NO_SCALE` per the report's | ||
| 16 | + pseudocode. | ||
| 17 | +3. Thread `frame_width: usize` through `decode_inter_block`'s 19 call sites — | ||
| 18 | + r8 confirmed 18 end in `allow_screen_content_tools,` and one at | ||
| 19 | + `decode.rs:12528` ends in `false,`; check that one first. | ||
| 20 | +4. Scoped refusals at the compound (~7994) and warp/OBMC/interintra (~8670) | ||
| 21 | + branches, so an unimplemented combination refuses by name rather than | ||
| 22 | + producing wrong pixels. | ||
| 23 | +5. Only with the gate pixel-exact: lift `stream.rs:217`'s refusal and update | ||
| 24 | + `refusal_inventory.rs` in the same commit. | ||
| 25 | + | ||
| 26 | +Merge `main` (913df61 — loop restoration filters landed since your merge) before | ||
| 27 | +you start, and compile immediately after: three merges in this batch were | ||
| 28 | +text-clean and compile-broken because a newer gate called a decoder whose | ||
| 29 | +signature a lane had changed. | ||
| 30 | + | ||
| 31 | +## Budget discipline (I am serious about this) | ||
| 32 | +You have 75 turns and they do NOT reset if you are resumed. At roughly turn 55, | ||
| 33 | +STOP starting new work: commit what is green, and write your report. Five rounds | ||
| 34 | +in the last batch died mid-edit with nothing reported, and each cost a whole | ||
| 35 | +round to recover. A round that ends with an honest report beats one that ends | ||
| 36 | +five turns deeper into an edit. | ||
| 37 | + | ||
| 38 | +Hard rules: `CARGO_TARGET_DIR=$HOME/.cache/cargo-target-superres`; foreground | ||
| 39 | +`nice -n 19 cargo ... -j4`; every `cargo test` a timeout >= 600000 ms; fixtures | ||
| 40 | +through `gradients_source(seed, w, h, tail)`; ffmpeg generates bounded with `-t`; | ||
| 41 | +`EC_AV1_REQUIRE_AOMENC=1`; aomenc `--threads=1 --row-mt=0 --sb-size=64`. Oracle | ||
| 42 | +rungs 6, 7, 8, 8b are taken — take 9; env-gated rungs only, the oracle is SHARED. | ||
| 43 | +Sibling worktrees have live agents — never build in or edit them. Never push, | ||
| 44 | +never merge into main. End with `lanes/superres-r9.report.md`, VERDICT on line 1. | ||