forge
Explore
Log in

Don't you dare go Hollow

edith_codecs

Clone
★ 0

0 watching0 forksRust370.3 MiB9b67700Tahinli3 days ago4021 commits

l2.charter.md4.6 KiBHistoryRawDownload

lane-l2 — re-judge LAST2 on the current substrate: the deciding long-GOP gate

GOAL: LAST2 is a second retained past reference (LAST2_FRAME naming its own DPB slot instead of aliasing LAST's). The machinery SHIPS at base a8f2186a from lane-last2 (merge 321b2dc1): EC_AV1_LAST2 knob default OFF (encoder.rs last2() / const LAST2 = false), leaf chain alternating LEAF_SLOTS = [0, 7] with leaf_hist carried across mini-GOPs, ref_frame_idx[1] + per-slot sign_bias/order_hints coding, the 32x32 extra search offer with LAST2's own NEWMV search (EC_AV1_LAST2_NEW=0 = search-free arm), the RD pricer's LAST2 leaf, and the witness a_leaf_predicts_off_last2_when_the_picture_two_back_matches. What lane-last2 NEVER measured: the long-GOP gate (its handover: "No long-GOP arm was run because nothing ships"), and its 12-frame refutation predates lane-intertx / lane-rectres / lane-tplhalf — the RD landscape moved. This lane re-judges the lever on the current substrate, on the gates the keep rule actually reads, and either flips the default or documents the standing refutation with the deciding table filled in.

Work ONLY in this worktree (lane-l2, /home/user/Documents/Code/Rust/edith_codecs-l2). Absolute paths only. Never touch main's checkout, never push, never git checkout <file>, never repo-wide cargo fmt. export CARGO_TARGET_DIR=$HOME/.cache/cargo-target-l2 on every cargo command. Logs under ~/.cache/l2/. Gates on server-1 (user@host-e) per skill://ec-av1-remote-gate-runners: repo /home/user/gates/repo-l2, target /home/user/gates/target-l2, systemd-run --user -p MemoryMax=5G, --ignored --exact FULL test paths, one gate at a time, LOADAVG before AND after, logs tee'd under ~/.cache/l2/. Pins 8291 / 33227. Keep rule: one film row ≥0.5 BD down on a column, the other flat within ±0.3, screen not worse by 0.3, wall ≤+15%. Sign: BD-rate, lower better.

1. Charter / census ground truth

  • Commit this charter first.
  • The stale premise in encode.rs last2_census's doc comment (~L21048, "no block can predict from the picture before LAST ... a week of wall") is OBSOLETE — the machinery exists and is default-off. Refresh it to name what ships and where the lever's measurement lives (clean cutover: no comment claiming a gap the code no longer has).
  • The per-lag SAD census (last2_census, --ignored) is the arm that priced the lever (refs.report.md §1: leaf best-of-two removes 6.99% film A / 7.25% film B of SAD energy; ARF row already banked by arf_altref). Re-run it on the current HEAD if the real films are reachable locally; cite the numbers next to the fire share.
  • The gate census already prints LAST2's real share (references LAST n LAST2 n GOLDEN n ALTREF n of m inter blocks (LAST2 %), encode.rs bd_rate_screen_native, one take_ref_frame_hits() read, no drain-then-read). Keep it; every arm row must show it.

2. Witnesses FIRST (before any BD gate)

  • Re-run encoder::tests::a_leaf_predicts_off_last2_when_the_picture_two_back_matches locally (release): it must show the lever OFF coding 0 LAST2 blocks and ON coding a real count (>0 — the gate-blind-to-feature guard), and both decoders (decode_stream AND ffmpeg) sample-exact.
  • OFF must stay today's behavior bit-exact: the pins test stays green with the knob untouched (8291 / 33227).

If any witness shows an encoder-reconstruction mismatch: STOP, do not gate, report class + path:line, default stays OFF.

3. Measure (server-1, per the skill recipe)

Control = default (knob off), arm = EC_AV1_LAST2=1, same HEAD. Sanity gate FIRST: the control must reproduce the standing table within ±0.2/cell (long-GOP film A +20.9/-9.0, film B +70.4/-2.2; native rows per lanes/rectres.report.md §3b off columns), else STOP and report substrate suspicion.

  • encode::tests::bd_rate_film_long_gop (deciding; both films in one run).
  • encode::tests::bd_rate_screen_native (all five rows).
  • Census share per clip from both arm logs; walls ours off→on; LOADAVG pairs.

4. Keep rule

Met → default ON at the measured presets + pins at default and EC_AV1_SPEED=6 + three-lane lib suite LOCALLY (--skip stream:: / stream:: --skip 10bit / 10bit) + timeout 900 cargo check --workspace --all-targets -j4 (0 ec-av1 warnings). Not met → default stays OFF, document. Mismatch → OFF, report (see §2).

DONE

Commits on lane-l2 (charter, code-if-any, report) + lanes/l2.report.md with EVIDENCE lines (EVIDENCE: <artifact> | <steps> | <measurement>), disposition ships-on | stays-off | stopped, BD tables both gates, LAST2 census share per clip, walls, LOADAVG pairs, pins line. Never merge or push.