forge
Explore
Log in

Don't you dare go Hollow

Lane-palette r2 charter -- type in r1's plan

Browse files at this commit

eb2d62103df6e425140400ab780e2eecaa22e7f0Ahmet Kaan GümüşParent: e76206d
  • docs
    • lane-palette r2 charter -- type in r1's plan
Show full message
docs(av1): lane-palette r2 charter -- type in r1's plan
lanes/palette-r2.charter.mdadded+64 -0
@@ -0,0 +1,64 @@
1+# lane-palette r2 — type in the plan
2+
3+Worktree `/home/user/Documents/Code/Rust/edith_codecs-palette`, branch
4+`lane-palette`, at 6ffa519.
5+
6+## Your round is TYPING, not derivation
7+r1 spent its entire budget deriving a complete, line-referenced stage-1 plan
8+against the real libaom source and wrote it to `lanes/palette.report.md`. It
9+covers: the CDF table contents and shapes, the four-site `cdf_state.rs` wiring,
10+the `Neighbours` additions plus a new `record_palette_y`, the
11+`palette_mode_ctx` / `palette_uv_mode_ctx` fix (the charter's named trap), the
12+colour-cache merge and delta-colour reads, the wavefront colour-index-map decode
13+with its context function, and the decision to wire palette prediction into
14+`PlaneBuf::reconstruct` through a new `PALETTE_PRED` thread-local (the existing
15+`ENABLE_EDGE_FILTER` idiom) rather than threading a parameter through 32 call
16+sites.
17+
18+**Do not re-derive any of it. Do not re-read libaom for anything the report
19+already states.** Three lanes in a row have now burned a full round on recon
20+(class `worker-cap-spent-reading`). Start at the report's section 1 and type
21+your way down, compiling as you go.
22+
23+`lanes/palette.charter.md` (r1's) still governs the staging, the gate rules and
24+the hard rules — read it once, briefly.
25+
26+## Order — COMMIT AFTER EVERY GREEN STEP, and commit early
27+1. Sections 1-2 (CDF tables + `cdf_state.rs` wiring). `cargo check`. COMMIT —
28+ inert additions, but they are the four-site wiring and they are worth having
29+ on the branch.
30+2. Sections 3-5 (Neighbours, contexts, colour cache, delta colours, index map).
31+ COMMIT when it compiles.
32+3. Section 6 (reconstruction through `PALETTE_PRED`) + remove the two Y
33+ refusals. Full suite. COMMIT.
34+4. The gate. Palette is a screen-content tool: aomenc only picks it on flat,
35+ few-colour, repetitive content, so the fixture likely needs a synthetic
36+ few-colour pattern rather than a gradient — and whatever you use must be
37+ deterministic, so hash it twice and prove it. `--enable-palette=1`, probably
38+ `--tune-content=screen`. HARD-assert a thread-local `Cell<usize>` count of
39+ palette blocks reconstructed. COMMIT.
40+
41+r1 flagged one open judgment call: split-luma-TU palette blocks — support them
42+via per-TU prediction slicing, or refuse by name if that proves error-prone.
43+Decide it by testing against a real `--enable-palette=1` stream, not by guessing.
44+A named refusal there is an acceptable outcome for this round.
45+
46+A sizing lesson from a sibling lane, which applies to your gate: a per-superblock
47+symbol cannot fire in a single-superblock fixture. Size the frame so the encoder
48+has something to choose between.
49+
50+## Note for the merge
51+Main carries two guards you do not have: `gate_coverage.rs`, which pins the
52+aomenc tools no gate exercises (`enable-palette` and `enable-intrabc` are both
53+on that list, and your gate deletes the palette entry), and
54+`refusal_inventory.rs`, which pins every decode-path refusal string so adding or
55+removing one fails until the list is updated. Report the refusal strings you add
56+or remove, verbatim.
57+
58+## Hard rules
59+`export CARGO_TARGET_DIR=$HOME/.cache/cargo-target-palette`; foreground builds
60+`nice -n 19 cargo ... -j4`; every `cargo test` a timeout >= 600000 ms. Sibling
61+worktrees (edith_codecs, -chroma, -realworld, -lr, -superres, -tiles) have live
62+agents — never build in or edit them. Never push, never merge, never touch
63+`main`. 75-turn cap, does not reset. End with `lanes/palette-r2.report.md`,
64+VERDICT on line 1.