forge
Explore
Log in

Don't you dare go Hollow

Lane-lr r4 charter -- Wiener then self-guided

Browse files at this commit

65d1211a289ba6947b37d09756729a48764b27c0Ahmet Kaan GümüşParent: f9cac18
  • docs
    • lane-lr r4 charter -- Wiener then self-guided
Show full message
docs(av1): lane-lr r4 charter -- Wiener then self-guided
lanes/lr-r4.charter.mdadded+46 -0
@@ -0,0 +1,46 @@
1+# lane-lr r4 — the Wiener and self-guided filters
2+
3+At ebac7a0. Read `lanes/lr.report.md`'s r3 section only.
4+
5+## State — the symbols are read AND proven
6+r3's gate `a_real_aomenc_stream_with_restoration_reads_lr_symbols_correctly`
7+runs a real `--enable-restoration=1` stream: 39/40 attempts reach the LR
8+refusal with zero other refusals, `wiener_hits=19`, `sgrproj_hits=72`.
9+`RestorationGrid` and the per-plane `(WienerInfo, SgrprojInfo)` are populated
10+correctly. Suite 236/0.
11+
12+r3 also found and fixed a real bug r2's report had claimed away: the `uses_lr`
13+refusal ran BEFORE the tile decode, so `read_lr` was never invoked through
14+`decode_stream` at all — 40/40 attempts had zero `read_lr_unit` hits until the
15+check moved after the tile decode.
16+
17+Two gate facts r3 paid for: `--enable-restoration=1` only actually lands
18+`uses_lr = true` on this fixture at `cq-level <= 20` (the sibling gates' usual
19+45 never fires it), and `--sb-size=64` is required or aomenc's default 128px
20+superblock lands in a dead-ended partition gap and eats the attempt window.
21+And a dead end: do NOT hard-require `switchable_hits() > 0` — aomenc's RD may
22+pick a frame-level fixed Wiener or Sgrproj type instead. Assert the SUM.
23+
24+## Your job
25+1. **Wiener.** `apply_loop_restoration` after `apply_cdef` in `decode.rs` (two
26+ call sites, ~4983 key-frame and ~10502 inter-frame), driven by
27+ `RestorationGrid`. The 3-pixel stripe boundary save/restore (libaom's
28+ `rlbs`) is the trap: 64-row stripes, and the filter reads rows the next
29+ stripe has already overwritten unless you save them first. COMMIT.
30+2. **Self-guided**, incl. the box-sum radii and `SGR_PARAMS`. COMMIT.
31+3. Widen r3's gate to assert `Ok` and pixel-exactness instead of the named
32+ refusal, then drop the `stream.rs` refusal. COMMIT.
33+
34+Ordering fact from a sibling lane: libaom runs `superres_post_decode()` between
35+`av1_cdef_frame` and `av1_loop_restoration_filter_frame` — superres before LR.
36+
37+Merge note: main is at 06d29ee with `gate_coverage.rs` (pins the aomenc tools no
38+gate exercises — `enable-restoration` is one gate from that list) and
39+`refusal_inventory.rs` (pins every decode-path refusal string). Report every
40+refusal string you add, rename or remove, verbatim.
41+
42+Hard rules: `CARGO_TARGET_DIR=$HOME/.cache/cargo-target-lr`; foreground
43+`nice -n 19 cargo ... -j4`; every `cargo test` a timeout >= 600000 ms. Sibling
44+worktrees have live agents — never build in or edit them. Never push, never
45+merge, never touch `main`. 75-turn cap, does not reset: COMMIT AT EVERY GREEN
46+STEP. Update `lanes/lr.report.md` with an r4 section, VERDICT first.