forge
Explore
Log in

Don't you dare go Hollow

Lane-l2 charter -- re-judge LAST2 on the current substrate with the deciding long-GOP gate lane-last2 never ran

Browse files at this commit

b3c6361a3cbbdaef8bac381cb5dd4fb4babd761dAhmet Kaan GümüşParent: 3a3d412
  • docs
    • lane-l2 charter -- re-judge LAST2 on the current substrate with the deciding long-GOP gate lane-last2 never ran
Show full message
docs(av1): lane-l2 charter -- re-judge LAST2 on the current substrate with the deciding long-GOP gate lane-last2 never ran
lanes/l2.charter.mdadded+88 -0
@@ -0,0 +1,88 @@
1+# lane-l2 — re-judge LAST2 on the current substrate: the deciding long-GOP gate
2+
3+GOAL: LAST2 is a second retained past reference (`LAST2_FRAME` naming its own
4+DPB slot instead of aliasing `LAST`'s). The machinery SHIPS at base `a8f2186a`
5+from lane-last2 (merge `321b2dc1`): `EC_AV1_LAST2` knob default OFF
6+(`encoder.rs` `last2()` / `const LAST2 = false`), leaf chain alternating
7+`LEAF_SLOTS = [0, 7]` with `leaf_hist` carried across mini-GOPs,
8+`ref_frame_idx[1]` + per-slot `sign_bias`/`order_hints` coding, the 32x32
9+`extra` search offer with LAST2's own `NEWMV` search
10+(`EC_AV1_LAST2_NEW=0` = search-free arm), the RD pricer's LAST2 leaf, and the
11+witness `a_leaf_predicts_off_last2_when_the_picture_two_back_matches`. What
12+lane-last2 NEVER measured: the long-GOP gate (its handover: "No long-GOP arm
13+was run because nothing ships"), and its 12-frame refutation predates
14+lane-intertx / lane-rectres / lane-tplhalf — the RD landscape moved. This lane
15+re-judges the lever on the current substrate, on the gates the keep rule
16+actually reads, and either flips the default or documents the standing
17+refutation with the deciding table filled in.
18+
19+Work ONLY in this worktree (`lane-l2`,
20+`/home/user/Documents/Code/Rust/edith_codecs-l2`). Absolute paths only.
21+Never touch main's checkout, never push, never `git checkout <file>`, never
22+repo-wide `cargo fmt`. `export
23+CARGO_TARGET_DIR=$HOME/.cache/cargo-target-l2` on every cargo command. Logs
24+under `~/.cache/l2/`. Gates on server-1 (`user@host-e`) per
25+`skill://ec-av1-remote-gate-runners`: repo `/home/user/gates/repo-l2`, target
26+`/home/user/gates/target-l2`, `systemd-run --user -p MemoryMax=5G`,
27+`--ignored --exact` FULL test paths, one gate at a time, LOADAVG before AND
28+after, logs tee'd under `~/.cache/l2/`. Pins 8291 / 33227. Keep rule: one film
29+row ≥0.5 BD down on a column, the other flat within ±0.3, screen not worse by
30+0.3, wall ≤+15%. Sign: BD-rate, lower better.
31+
32+## 1. Charter / census ground truth
33+
34+- Commit this charter first.
35+- The stale premise in `encode.rs` `last2_census`'s doc comment (~L21048,
36+ "no block can predict from the picture before LAST ... a week of wall") is
37+ OBSOLETE — the machinery exists and is default-off. Refresh it to name what
38+ ships and where the lever's measurement lives (clean cutover: no comment
39+ claiming a gap the code no longer has).
40+- The per-lag SAD census (`last2_census`, `--ignored`) is the arm that priced
41+ the lever (`refs.report.md` §1: leaf best-of-two removes 6.99% film A /
42+ 7.25% film B of SAD energy; ARF row already banked by `arf_altref`). Re-run
43+ it on the current HEAD if the real films are reachable locally; cite the
44+ numbers next to the fire share.
45+- The gate census already prints LAST2's real share
46+ (`references LAST n LAST2 n GOLDEN n ALTREF n of m inter blocks (LAST2 %)`,
47+ `encode.rs` `bd_rate_screen_native`, one `take_ref_frame_hits()` read, no
48+ drain-then-read). Keep it; every arm row must show it.
49+
50+## 2. Witnesses FIRST (before any BD gate)
51+
52+- Re-run `encoder::tests::a_leaf_predicts_off_last2_when_the_picture_two_back_matches`
53+ locally (release): it must show the lever OFF coding 0 LAST2 blocks and ON
54+ coding a real count (>0 — the `gate-blind-to-feature` guard), and both
55+ decoders (`decode_stream` AND ffmpeg) sample-exact.
56+- OFF must stay today's behavior bit-exact: the pins test stays green with
57+ the knob untouched (8291 / 33227).
58+
59+If any witness shows an encoder-reconstruction mismatch: STOP, do not gate,
60+report class + path:line, default stays OFF.
61+
62+## 3. Measure (server-1, per the skill recipe)
63+
64+Control = default (knob off), arm = `EC_AV1_LAST2=1`, same HEAD. Sanity gate
65+FIRST: the control must reproduce the standing table within ±0.2/cell
66+(long-GOP film A +20.9/-9.0, film B +70.4/-2.2; native rows per
67+`lanes/rectres.report.md` §3b off columns), else STOP and report substrate
68+suspicion.
69+
70+- `encode::tests::bd_rate_film_long_gop` (deciding; both films in one run).
71+- `encode::tests::bd_rate_screen_native` (all five rows).
72+- Census share per clip from both arm logs; walls ours off→on; LOADAVG pairs.
73+
74+## 4. Keep rule
75+
76+Met → default ON at the measured presets + pins at default and
77+`EC_AV1_SPEED=6` + three-lane lib suite LOCALLY
78+(`--skip stream::` / `stream:: --skip 10bit` / `10bit`) +
79+`timeout 900 cargo check --workspace --all-targets -j4` (0 ec-av1 warnings).
80+Not met → default stays OFF, document. Mismatch → OFF, report (see §2).
81+
82+## DONE
83+
84+Commits on `lane-l2` (charter, code-if-any, report) +
85+`lanes/l2.report.md` with EVIDENCE lines
86+(`EVIDENCE: <artifact> | <steps> | <measurement>`), disposition
87+`ships-on | stays-off | stopped`, BD tables both gates, LAST2 census share per
88+clip, walls, LOADAVG pairs, pins line. Never merge or push.