Merge branch 'lane-tplfut-arf' (93966dfb): docs-only -- the tpl-future-map-at-the-ARF lever already shipped across tplfut/tplhalf (the arffilt reconciliation's deferred line was a stale pointer); contribution re-measured on server-3 at d27a904d: EC_AV1_TPL_FUT=0 control +21.2/-8.9,+71.4/-1.6 vs shipped default +20.9/-9.0,+70.4/-2.2 (standing table to the digit), so the lever is currently worth film B -1.0/-0.6 and stays ON; witnesses re-proven incl. the [8,3] truncation engagement probe; pins 8291/33227
Browse files at this commit2 changed files +227 -0
- lanes/tplfutarf.charter.md +102 -0
- lanes/tplfutarf.report.md +125 -0
lanes/tplfutarf.charter.mdadded+102 -0
| @@ -0,0 +1,102 @@ | |||
| 1 | +# lane-tplfut-arf — charter: the tpl future map at the ARF (recon: the argument already changed) | ||
| 2 | + | ||
| 3 | +`edith_codecs-tplfut`, branch `lane-tplfut-arf`, base `d27a904d`. | ||
| 4 | +The lane-arffilt reconciliation (`lanes/arffilt.report.md`, merged `b95763a8`) | ||
| 5 | +names as its third open lever: "the tpl future map at the ARF (the buffered | ||
| 6 | +future pictures reach the source filter only, not the temporal lambda map) — | ||
| 7 | +now a one-argument change per lane-lookahead §5". | ||
| 8 | + | ||
| 9 | +## 1. Recon verdict — the lever SHIPPED before that line was written | ||
| 10 | + | ||
| 11 | +`lane-lookahead` §5's deferred item ("encode_pyramid_inter still gets | ||
| 12 | +`tpl_window(pos, true)`, the display-past leaves ... now a one-argument change | ||
| 13 | +(pass the same future slice as lookahead)") was implemented and tuned by two | ||
| 14 | +lanes that both merged BEFORE lane-arffilt's base `7db5094a`: | ||
| 15 | + | ||
| 16 | +| prior lane | commits | merged | what it shipped | | ||
| 17 | +|---|---|---|---| | ||
| 18 | +| lane-tplfut | `9ed92a1d`, `112893ff` | `daed0265` | `code_group` builds the top ARF's tpl lambda window from the buffered next group (`arf_tpl`, modes 0/1/2/3, `EC_AV1_TPL_FUT`); mode 2 (past then future, nearest-first) ships default ON: `speed::TPL_FUT = [2; 11]` | | ||
| 19 | +| lane-tplhalf | `0c8d5778`, `600dfa34` | `aab48896` | mode 2's split (`TPL_FUT_HALF = [2,2,2,1; 1…]`) and budget (`TPL_FUT_WIN = [11,11,11,0; 0…]`) — 2 past + every buffered future picture, saturating the one-group lookahead | | ||
| 20 | + | ||
| 21 | +`git merge-base --is-ancestor daed0265 7db5094a` and `aab48896 7db5094a` both | ||
| 22 | +hold: **the arffilt deferred line is a stale pointer** — it quotes | ||
| 23 | +lane-lookahead §5 verbatim but was written at a base that already contains the | ||
| 24 | +change it asks for. Class: `stale-deferred-pointer` (an open-levers list | ||
| 25 | +reconciled against one lane's §5 instead of the current tree). | ||
| 26 | + | ||
| 27 | +## 2. The exact one-argument change, as it exists at `d27a904d` | ||
| 28 | + | ||
| 29 | +`encoder.rs::Av1Encoder::code_group(group, future)` — `future` is the next | ||
| 30 | +group's sources buffered by lane-lookahead's `ready` slot: | ||
| 31 | + | ||
| 32 | +* pre-tplfut, the top ARF's `encode_pyramid_inter` lookahead argument was | ||
| 33 | + `tpl_window(group.len() - 1, true)`: the group's own display-past sources | ||
| 34 | + reversed (the top ARF is its group's LAST picture in display order); | ||
| 35 | +* now (`encoder.rs`, the `arf_tpl` block closing at the `encode_pyramid_inter` | ||
| 36 | + call for `group.last()`): mode 0 / empty-future keeps exactly that past | ||
| 37 | + window; mode 2 (shipped) takes `past()` truncated to `tpl_fut_half()` (= 2) | ||
| 38 | + and extends it with `arf_tpl_future(budget − past_len)` off the buffered | ||
| 39 | + future, budget `tpl_fut_win(depth)` (= 11) — i.e. 2 past + every available | ||
| 40 | + future picture of the next group, nearest-first. | ||
| 41 | + | ||
| 42 | +Shipped constants (`speed.rs`): `TPL_FUT = [2; 11]`, `TPL_FUT_HALF = | ||
| 43 | +[2, 2, 2, 1, …]`, `TPL_FUT_WIN = [11, 11, 11, 0, …]` (presets 0..=2 carry the | ||
| 44 | +swept values; 3..=6 keep `TPL_DEPTH=4`-era 1/0, unswept there). | ||
| 45 | + | ||
| 46 | +The OFF state of this lever is `EC_AV1_TPL_FUT=0` and it is bit-exact BY | ||
| 47 | +CONSTRUCTION: mode 0's arm is the literal pre-lever expression | ||
| 48 | +(`(0, _, _) | (_, true, _) => past()`), and with no buffered future every mode | ||
| 49 | +falls back to it. A second, default-OFF `EC_AV1_TPLFUT_ARF` knob beside the | ||
| 50 | +shipped `EC_AV1_TPL_FUT` would be a second convention beside an existing one | ||
| 51 | +— refused on the lane-arffilt precedent (its merge message records the same | ||
| 52 | +refusal for `EC_AV1_ARFFILT`). | ||
| 53 | + | ||
| 54 | +## 3. Prior art's gate evidence (controls RUN, not quoted, in those lanes) | ||
| 55 | + | ||
| 56 | +48-picture `bd_rate_film_long_gop`, BD vs libaom cpu-used 6 / rav1e speed 6: | ||
| 57 | + | ||
| 58 | +| arm | film A | film B | | ||
| 59 | +|---|---|---| | ||
| 60 | +| mode 0, past-only (tplfut control) | +21.3 / −8.8 | +72.1 / −1.2 | | ||
| 61 | +| mode 2, 3 past + 4 future (tplfut ships) | +21.2 / −8.8 | +71.6 / −1.5 | | ||
| 62 | +| mode 2, 2 past + 5 future (tplhalf) | +20.9 / −9.0 | +71.0 / −1.8 | | ||
| 63 | +| mode 2, budget 11 (tplhalf ships = standing) | **+20.9 / −9.0** | **+70.4 / −2.2** | | ||
| 64 | + | ||
| 65 | +lane-l2's control at `7db5094a` re-read **+20.9/−9.0 / +70.4/−2.2 to the | ||
| 66 | +digit** — the standing table IS this lever's shipped state. Cumulative lever | ||
| 67 | +delta (mode 0 → shipped): film B −1.7/−1.0, film A −0.4/−0.2, i.e. the keep | ||
| 68 | +rule (one film row ≥0.5 down, the other not worse than +0.3) cleared on the | ||
| 69 | +merged evidence. | ||
| 70 | + | ||
| 71 | +`bd_rate_screen_native` is STRUCTURALLY BLIND to this lever at 12 pictures: | ||
| 72 | +`group_target` absorbs the tail into ONE group of 11, no next group is ever | ||
| 73 | +buffered, `future` is empty, every mode takes the past window — proven by | ||
| 74 | +lane-lookahead §3 ("byte-identical to its control on every row") and | ||
| 75 | +lane-tplfut §4, and re-proven on THIS base by this lane's local probe | ||
| 76 | +(report §2). | ||
| 77 | + | ||
| 78 | +## 4. What THIS lane therefore does (and refuses) | ||
| 79 | + | ||
| 80 | +1. Records this reconciliation (this charter) so nobody rebuilds the shipped | ||
| 81 | + lever or re-opens its swept axes (mode, split, budget — all bracketed). | ||
| 82 | +2. Re-proves the witnesses on THIS base at `d27a904d` (five merges past the | ||
| 83 | + last direct measurement): byte pins `(150, 8291, 0x1f00bb0eb099a27f)` / | ||
| 84 | + `(60, 33227, 0x57ee6b1f8eacd881)` at the default and at `EC_AV1_SPEED=6`; | ||
| 85 | + `the_future_tpl_window_still_codes_every_picture_and_moves_the_stream` | ||
| 86 | + (stream MOVES when the window engages, every picture coded, sample-exact | ||
| 87 | + through `decode_stream` AND ffmpeg); the 12-picture blindness probe. | ||
| 88 | +3. Measures the lever's CURRENT contribution on server-3 (`user@host-b`, | ||
| 89 | + unused so far), one gate at a time per the managed skill: | ||
| 90 | + `bd_rate_film_long_gop` control (`EC_AV1_TPL_FUT=0`) vs arm (the shipped | ||
| 91 | + default — the decisive pair on a base that has moved), and | ||
| 92 | + `bd_rate_screen_native` control at the default for the five standing rows | ||
| 93 | + (the arm there is byte-identical by construction — the probe stands in for | ||
| 94 | + a fourth gate). LOADAVG pairs per gate. | ||
| 95 | +4. Keep rule on the fresh pair: one film row ≥0.5 down, the other not worse | ||
| 96 | + than +0.3, screen not worse 0.3, wall ≤+15%. Met → disposition "stays | ||
| 97 | + default ON" (already shipped) + pins at default and `EC_AV1_SPEED=6` + | ||
| 98 | + three-lane lib suite (fixtures symlinked) + `cargo check --workspace | ||
| 99 | + --all-targets -j4`. Not met → flip `TPL_FUT` to 0 at presets 0..=2 with the | ||
| 100 | + evidence, document. | ||
| 101 | + | ||
| 102 | +No merge, no push. | ||
lanes/tplfutarf.report.mdadded+125 -0
| @@ -0,0 +1,125 @@ | |||
| 1 | +# lane-tplfut-arf — RECONCILED: the tpl future map at the ARF was already shipped; this lane re-proves it and re-measures it on the current base | ||
| 2 | + | ||
| 3 | +Worktree `edith_codecs-tplfut`, branch `lane-tplfut-arf`, base `d27a904d`. | ||
| 4 | +The assignment named lane-arffilt's deferred lever ("the tpl future map at | ||
| 5 | +the ARF ... now a one-argument change per lane-lookahead §5") and asked for | ||
| 6 | +it behind a new default-OFF `EC_AV1_TPLFUT_ARF` knob. | ||
| 7 | + | ||
| 8 | +**Recon verdict (charter, `lanes/tplfutarf.charter.md`, commit `f606fb57`): | ||
| 9 | +no code change exists to make.** The exact one-argument change — pass the | ||
| 10 | +buffered next group to the top ARF's temporal-lambda window instead of the | ||
| 11 | +past-only `tpl_window(group.len()-1, true)` — was implemented by | ||
| 12 | +lane-tplfut (`9ed92a1d`, `code_group`'s `arf_tpl` block, | ||
| 13 | +`encoder.rs` ~L2257-2291 at this base) and tuned by lane-tplhalf | ||
| 14 | +(`0c8d5778`), both merged ancestors of lane-arffilt's OWN base `7db5094a` | ||
| 15 | +(`git merge-base --is-ancestor daed0265/aab48896 7db5094a` holds): | ||
| 16 | +arffilt's deferred line is a stale pointer (`stale-deferred-pointer`), and | ||
| 17 | +a second default-OFF knob beside the shipped `EC_AV1_TPL_FUT` is refused on | ||
| 18 | +the lane-arffilt precedent — mode 0 IS the bit-exact off | ||
| 19 | +(`(0, _, _) | (_, true, _) => past()` is the literal pre-lever expression). | ||
| 20 | +Shipped constants at this base: `TPL_FUT = [2; 11]`, | ||
| 21 | +`TPL_FUT_HALF = [2, 2, 2, 1; 1…]`, `TPL_FUT_WIN = [11, 11, 11, 0; 0…]` | ||
| 22 | +(2 past + every buffered future picture; saturates the one-group lookahead). | ||
| 23 | + | ||
| 24 | +What the lane therefore shipped is this reconciliation plus a decisive | ||
| 25 | +re-measurement of the lever's CURRENT contribution on a base that has moved | ||
| 26 | +five merges past lane-l2's last confirming control, on server-3 | ||
| 27 | +(`user@host-b`, first use by any lane) per the managed skill | ||
| 28 | +`ec-av1-remote-gate-runners`. Unknobbed, per the assignment's own escape hatch, | ||
| 29 | +with the measurement made decisive. | ||
| 30 | + | ||
| 31 | +## 1. Witnesses, re-proven on THIS worktree at `d27a904d` (tree byte-identical to HEAD; probe added and removed) | ||
| 32 | + | ||
| 33 | +| witness | result | | ||
| 34 | +|---|---| | ||
| 35 | +| `encode::tests::the_encoders_own_streams_are_byte_identical_to_their_pins` | PASS — pins `(150, 8291, 0x1f00bb0eb099a27f)`, `(60, 33227, 0x57ee6b1f8eacd881)` hold | | ||
| 36 | +| same at `EC_AV1_SPEED=6` | PASS (8.6 s) | | ||
| 37 | +| `encoder::tests::the_future_tpl_window_still_codes_every_picture_and_moves_the_stream` | PASS (52.2 s) — the stream MOVES when the window engages (modes 1/3 vs 0 at 17 pictures), coding order/levels unchanged, every picture decoded sample-exact through `decode_stream` AND ffmpeg (the engagement + both-decoder guard) | | ||
| 38 | +| `encoder::tests::the_lookahead_holds_one_group_and_still_codes_every_picture` | PASS (16.2 s) | | ||
| 39 | +| `encoder::tests::every_speed_preset_decodes_sample_exact_through_both_decoders` (`--ignored`) | PASS (18.4 s) | | ||
| 40 | +| THROWAWAY `tplfut_twelve_picture_blindness_probe` (run once, then CUT) | PASS — at the native gate's shape (12 frames, `gop = 12`) modes 0/1/2/3 produce BYTE-IDENTICAL streams | | ||
| 41 | + | ||
| 42 | +## 2. The 12-frame native gate is structurally blind — the arm gate is its control, and was not run | ||
| 43 | + | ||
| 44 | +`native_bd_arm` sets the sequence's `gop = frame count`: at 12 frames the | ||
| 45 | +gopad tail rule forms ONE group of 11, no next group is ever buffered, | ||
| 46 | +`future` is empty, and every `TPL_FUT` mode takes the past window. Proven | ||
| 47 | +before by lane-lookahead §3 and lane-tplfut §4 and re-proven here by the | ||
| 48 | +probe above. The probe's first run was a FALSE RED — 12 frames at | ||
| 49 | +`gop 32` truncates mid-GOP into `[8, 3]`, the first group's ARF DOES get a | ||
| 50 | +buffered future, and modes 1-3 really do move that stream (class: | ||
| 51 | +`gate-shape-mismatched-probe`; the gate never runs that shape). Conclusion: | ||
| 52 | +`bd_rate_screen_native` needs only the CONTROL run; its five rows are the | ||
| 53 | +arm's rows byte for byte. | ||
| 54 | + | ||
| 55 | +## 3. Gates on server-3 — the deciding pair, control vs arm on the current base | ||
| 56 | + | ||
| 57 | +One gate at a time, sequential chain (`tplfut-chain` user unit, per-gate | ||
| 58 | +logs `~gates/tplfut-{lgc,lga,nat}.log`, chain log `~gates/chain-tplfut.log`), | ||
| 59 | +warm-compiled `target-tplfut`, `fixtures` symlink, `.git` stub `git init`-ed. | ||
| 60 | +All three gates EXIT=0. `bd_rate_film_long_gop`: 48 pictures, gop 48, | ||
| 61 | +BD-rate vs libaom cpu-used 6 / vs rav1e speed 6, lower is better. | ||
| 62 | + | ||
| 63 | +| gate | film A | film B | wall A (ours) | wall B (ours) | LOADAVG before → after | | ||
| 64 | +|---|---|---|---|---|---| | ||
| 65 | +| control `EC_AV1_TPL_FUT=0` | +21.2% / −8.9% | +71.4% / −1.6% | 1197.1s | 940.0s | 0.10 0.29 0.36 → 1.06 1.07 1.01 | | ||
| 66 | +| arm (shipped default, mode 2) | **+20.9% / −9.0%** | **+70.4% / −2.2%** | 1193.3s | 933.0s | 1.06 1.07 1.01 → 1.26 1.17 1.13 | | ||
| 67 | +| **Δ = the lever's current contribution** | **−0.3 / −0.1** | **−1.0 / −0.6** | −0.3% | −0.7% | | | ||
| 68 | + | ||
| 69 | +The arm reproduces the standing table (lane-tplhalf's +20.9/−9.0, | ||
| 70 | ++70.4/−2.2; re-read at +20.9/−9.0, +70.4/−2.2 by lane-l2's control on | ||
| 71 | +`7db5094a`) TO THE DIGIT on server-3. The control reproduces lane-tplfut's | ||
| 72 | +mode-0 row (+21.3/−8.8, +72.1/−1.2) to within 0.1-0.7 — the residual is the | ||
| 73 | +five merged encoder waves since, direction favourable. | ||
| 74 | + | ||
| 75 | +`bd_rate_screen_native` control (12 pictures, all five rows) — the arm is | ||
| 76 | +byte-identical by §2, so these ARE the arm rows: | ||
| 77 | + | ||
| 78 | +| row | BD vs libaom | BD vs rav1e | wall ours | standing | | ||
| 79 | +|---|---|---|---|---| | ||
| 80 | +| bars 1080p | −3.3% | −19.0% | 360.6s | −3.3 / −19.0 | | ||
| 81 | +| bars 2160p | +8.4% | −13.9% | 306.5s | +8.4 / −13.9 | | ||
| 82 | +| film A | +17.9% | −6.3% | 318.3s | +17.9 / −6.3 | | ||
| 83 | +| film B | +22.6% | −3.8% | 272.4s | +22.6 / −3.8 | | ||
| 84 | +| screen capture | +13.7% | −33.6% | 205.8s | +13.7 / −33.6 (intertx's documented delta) | | ||
| 85 | + | ||
| 86 | +All five rows to the digit. Gate walls: lgc 44m25s, lga 44m09s, nat 29m44s; | ||
| 87 | +no sibling load on the box (idle before each gate; the box's one prior | ||
| 88 | +incident — the whole user manager dying with the launch ssh session at | ||
| 89 | +6m38s, killing chain+gate cleanly — is a provisioning lesson now in the | ||
| 90 | +managed skill: `loginctl enable-linger`). | ||
| 91 | + | ||
| 92 | +## 4. Keep rule and disposition | ||
| 93 | + | ||
| 94 | +Keep rule (arm vs control): one film row ≥0.5 down — film B −1.0/−0.6 on | ||
| 95 | +both columns ✓; other flat — film A −0.3/−0.1, not worse ✓; screen not worse | ||
| 96 | +0.3 — 0.0 by construction (§2) and the five control rows stand ✓; wall ≤+15% | ||
| 97 | +— −0.3%/−0.7% ✓. **MET.** | ||
| 98 | + | ||
| 99 | +**Disposition: the lever STAYS default ON** (`TPL_FUT=2` with | ||
| 100 | +`HALF=2`/`WIN=11` at presets 0..=2), exactly as lane-tplfut + lane-tplhalf | ||
| 101 | +shipped it. No knob is added; no code changes; the lane's commits are | ||
| 102 | +docs-only (charter + this report). Met-branch actions, all run: | ||
| 103 | + | ||
| 104 | +* pins re-run at the default AND at `EC_AV1_SPEED=6`: hold (8291 / 33227); | ||
| 105 | +* three-lane `ec-av1` lib suite off one release binary (fixtures symlinked): | ||
| 106 | + **348 + 202 + 42 = 592 passed / 0 failed** (44 / 15 / 1 ignored — the | ||
| 107 | + ignored count grew 56 → 60 across lanes intertx..vp8, no failures); | ||
| 108 | +* `cargo check --workspace --all-targets -j4`: 0 errors, 0 `ec-av1` | ||
| 109 | + warnings; two pre-existing `ec-vorbis` oracle warnings at this base (the | ||
| 110 | + known oracle doc-warning plus its dead `decode_capture` wrapper in | ||
| 111 | + `tests/oracle.rs` — untouched by this lane, named here so it is not | ||
| 112 | + rediscovered). | ||
| 113 | + | ||
| 114 | +## 5. What this lane did NOT do | ||
| 115 | + | ||
| 116 | +* No encoder change (reconciliation; see the charter for the refusal). | ||
| 117 | +* `deferred: TPL_FUT/HALF/WIN at presets 3..=6` — unswept by lane-tplhalf, | ||
| 118 | + untouched here (long-GOP arms would be needed). | ||
| 119 | +* `deferred: per-block weight refinement in arf_temporal_filter` and the | ||
| 120 | + `deferred: top-ARF mode/partition gap` and `deferred: two-pass-like | ||
| 121 | + allocation over the buffered group` — the other open levers the arffilt | ||
| 122 | + reconciliation names; none of them is this lever. | ||
| 123 | + | ||
| 124 | +Pins: `(150, 8291)`, `(60, 33227)` — confirmed on this worktree. | ||
| 125 | +No merge, no push. | ||