Merge branch 'lane-dq2' (8bc9fb13): delta_q re-measured with the tpl window: a film win at preset 6 on both gates, blocked by the screen row; long-GOP tpl depth flat at preset 0 (report only)
Browse files at this commit1 changed file +117 -0
- lanes/dq2.report.md +117 -0
lanes/dq2.report.mdadded+117 -0
| @@ -0,0 +1,117 @@ | |||
| 1 | +# lane-dq2 — delta_q at presets 3/6 with a real tpl window, and tpl depth at the long GOP | ||
| 2 | + | ||
| 3 | +Scope: measurement + `speed.rs` constants (`DELTAQ_RES`, `TPL_DEPTH`) only. | ||
| 4 | + | ||
| 5 | +Env forms in use: `EC_AV1_SPEED=<n>`, `EC_AV1_DELTAQ=2` (delta_q_res log2, `4`/absent = off), | ||
| 6 | +`EC_AV1_TPL_D=<pictures>` (encode.rs:9371 `tpl_depth()` — the depth override exists, spelled | ||
| 7 | +`EC_AV1_TPL_D`, not `EC_AV1_TPL_DEPTH`). | ||
| 8 | + | ||
| 9 | +## 1. delta_q vs control, 12-frame `bd_rate_screen_native` (BD vs libaom / vs rav1e) | ||
| 10 | + | ||
| 11 | +All arms: `bd_rate_screen_native` on the prebuilt release binary, 12 frames, gop 12, | ||
| 12 | +1 tile, native crops. Rows keyed by the log's own header line. | ||
| 13 | + | ||
| 14 | +### preset 3 (`EC_AV1_SPEED=3`, tpl depth 4) | ||
| 15 | + | ||
| 16 | +| arm | bars 1080p | bars 2160p | film A | film B | screen | | ||
| 17 | +|---|---|---|---|---|---| | ||
| 18 | +| control | +43.1 / +20.4 | +49.2 / +19.0 | +22.3 / -4.1 | +27.3 / -0.3 | +33.4 / -23.2 | | ||
| 19 | +| `EC_AV1_DELTAQ=2` | +40.2 / +18.8 | +49.5 / +19.6 | +22.0 / -4.1 | +27.9 / +0.4 | +33.8 / -23.1 | | ||
| 20 | + | ||
| 21 | +Control reproduces lane-tplwin's preset-3 row to the digit on all three real-content rows. | ||
| 22 | +VERDICT preset 3: **reject**. Film A moves -0.3 / 0.0 (below the 0.5 the keep rule wants from a | ||
| 23 | +single row), film B moves +0.6 / +0.7 WORSE on both columns, and screen is +0.4 worse vs libaom | ||
| 24 | +(over the 0.3 bound). The two bars rows are fixtures, never a decision. | ||
| 25 | + | ||
| 26 | +### preset 6 (`EC_AV1_SPEED=6`, tpl depth 4) | ||
| 27 | + | ||
| 28 | +| arm | bars 1080p | bars 2160p | film A | film B | screen | | ||
| 29 | +|---|---|---|---|---|---| | ||
| 30 | +| control | +68.4 / +40.0 | +62.7 / +28.0 | +27.2 / -0.2 | +35.2 / +6.6 | +34.8 / -22.3 | | ||
| 31 | +| `EC_AV1_DELTAQ=2` | +67.0 / +40.2 | +64.1 / +29.5 | +26.6 / -0.4 | +34.7 / +6.4 | +35.3 / -22.2 | | ||
| 32 | + | ||
| 33 | +Control reproduces the charter's preset-6 row to the digit. | ||
| 34 | +VERDICT preset 6: **both film rows pass, the screen row fails the rule.** Film A -0.6 / -0.2 and | ||
| 35 | +film B -0.5 / -0.2, i.e. both real films improve on both columns -- the first arm in which | ||
| 36 | +delta_q is a win on film at all, and the tpl window is what made it one. Screen capture is +0.5 | ||
| 37 | +worse vs libaom (bound is 0.3), so under the keep rule as written `DELTAQ_RES` does NOT ship on | ||
| 38 | +at preset 6 either. | ||
| 39 | + | ||
| 40 | +The shape is the one lane-b64b already met: a lever that pays on film and loses on the capture. | ||
| 41 | +The fix there was a `!screen` content gate on the tool. That gate lives in `encode.rs` | ||
| 42 | +(`deltaq_res_log2`), outside this lane's scope -- see the deferred list. | ||
| 43 | + | ||
| 44 | +## 2. long-GOP tpl depth, preset 0 | ||
| 45 | + | ||
| 46 | +`bd_rate_film_long_gop` (48 pictures, gop 48, the two film rows only), `EC_AV1_SPEED=0`. | ||
| 47 | +The depth override EXISTS: `encode.rs:9371 tpl_depth()` reads `EC_AV1_TPL_D` (`>= 1`), which wins | ||
| 48 | +over `speed::TPL_DEPTH`. | ||
| 49 | + | ||
| 50 | +| arm | film A | film B | | ||
| 51 | +|---|---|---| | ||
| 52 | +| control (depth 8, shipped) | +26.4 / -6.6 | +89.8 / +9.1 | | ||
| 53 | +| `EC_AV1_TPL_D=4` | +26.4 / -6.6 | +89.8 / +9.1 | | ||
| 54 | + | ||
| 55 | +Both rows land on the same tenth on both columns, and the wall is inside noise (film A 577.0s vs | ||
| 56 | +575.0s, film B 514.8s vs 510.0s ours). The byte points differ slightly (film B q=5 71161 vs | ||
| 57 | +70641 B), so the arms really did code different streams -- the depth is simply not worth a tenth | ||
| 58 | +of a BD point over a 48-picture GOP. | ||
| 59 | + | ||
| 60 | +That does NOT reopen preset 0's shipped 8: the 12-frame gate measured depth 4 costing film B | ||
| 61 | +0.7 on BOTH columns there, and this arm measures no long-GOP win to trade for it. `TPL_DEPTH` | ||
| 62 | +ships unchanged. | ||
| 63 | + | ||
| 64 | +## 3. delta_q over a long GOP at preset 6 | ||
| 65 | + | ||
| 66 | +`bd_rate_film_long_gop` (48 pictures, gop 48), `EC_AV1_SPEED=6`. Run because preset 6 is where | ||
| 67 | +delta_q pays on film, and the long GOP is the shape his exports actually have (the screen row is | ||
| 68 | +not in this gate). | ||
| 69 | + | ||
| 70 | +| arm | film A | film B | | ||
| 71 | +|---|---|---| | ||
| 72 | +| control | +32.8 / -2.7 | +104.5 / +18.3 | | ||
| 73 | +| `EC_AV1_DELTAQ=2` | +32.0 / -2.9 | +104.3 / +17.8 | | ||
| 74 | + | ||
| 75 | +Both films improve on both columns again (film A -0.8 / -0.2, film B -0.2 / -0.5), i.e. the | ||
| 76 | +12-frame film result is not a 12-picture artefact -- it holds, slightly larger on film A, over 48 | ||
| 77 | +pictures. delta_q is a real film lever at preset 6 once the tpl map exists; the only thing | ||
| 78 | +standing between it and the default is the capture row. | ||
| 79 | + | ||
| 80 | +## 4. Shipped constants | ||
| 81 | + | ||
| 82 | +**Nothing changes.** `speed::DELTAQ_RES` stays `[4; 11]` (off at every preset) and | ||
| 83 | +`speed::TPL_DEPTH` stays `[8, 8, 8, 4, 4, 4, 4, 1, 1, 1, 1]`. No source file outside | ||
| 84 | +`lanes/dq2.report.md` is touched by this lane. | ||
| 85 | + | ||
| 86 | +* preset 3 delta_q: rejected on its own numbers (film B worse on both columns). | ||
| 87 | +* preset 6 delta_q: passes the film half of the keep rule twice (12-frame and long-GOP), fails | ||
| 88 | + the screen bound by 0.2 over it. Shipping it on would trade 0.5 BD points of his capture | ||
| 89 | + content for 0.5 of his film content -- the rule's answer is no, and the honest fix is a | ||
| 90 | + content gate, not a looser rule. | ||
| 91 | +* `TPL_DEPTH` at preset 0: depth 4 and depth 8 are indistinguishable over 48 pictures, so the | ||
| 92 | + 12-frame measurement (which prefers 8 by 0.7 on film B) remains the only signal and 8 stays. | ||
| 93 | + | ||
| 94 | +## Deferred | ||
| 95 | + | ||
| 96 | +* `deferred: delta_q behind a !screen content gate at preset 6 --` the measurement says it wins | ||
| 97 | + on both films on both gates and loses only on the capture, exactly lane-b64b's shape; the gate | ||
| 98 | + itself lives in `encode.rs deltaq_res_log2` (plus a `DELTAQ_RES` flip at preset 6), which is | ||
| 99 | + outside this lane's `speed.rs`-only scope -- `unblocked by a charter that may edit encode.rs`. | ||
| 100 | +* `deferred: presets 1, 2, 4, 5 for delta_q --` unmeasured; preset 3 rejects and preset 6 is | ||
| 101 | + screen-blocked, so the neighbours only matter once the content gate exists -- | ||
| 102 | + `unblocked by that same lane`. | ||
| 103 | +* `deferred: long-GOP tpl depth above preset 0 --` only preset 0 was run; presets 3..6 already | ||
| 104 | + ship 4 and the preset-0 arm shows the axis is flat over a long GOP -- `unblocked by a lane that | ||
| 105 | + finds a reason to care`. | ||
| 106 | + | ||
| 107 | +## Invariants (release lib binary `ec_av1-8fef0196ab10338d`, this head, encoder unchanged) | ||
| 108 | + | ||
| 109 | +| check | result | | ||
| 110 | +|---|---| | ||
| 111 | +| full suite, detached | **567 passed / 0 failed / 45 ignored**, 1066s (the charter expected 44 ignored; this head has 45 and this lane added no test) | | ||
| 112 | +| `EC_COMP_MISMATCH=1`, presets 3 and 6 | **0 mismatch lines**, over `tile_bytes_do_not_depend_on_the_thread_count --include-ignored` and `the_facade_codes_the_same_bytes_as_encode_sequence` (all four runs ok) | | ||
| 113 | +| `every_speed_preset_decodes_sample_exact_through_both_decoders --ignored` | ok | | ||
| 114 | +| byte pins | `encode.rs:14681` unchanged: **8562** @ q150, **33357** @ q60; the pin test is in the suite above and passed | | ||
| 115 | +| `cargo check --workspace --all-targets -j4` | 0 errors, 0 ec-av1 warnings (21 pre-existing `ec-opus` doc warnings, 1 `ec-vorbis` oracle warning) | | ||
| 116 | + | ||
| 117 | +Logs: `~/.cache/dq2/{p3ctl,p3dq,p6ctl,p6dq,lg0ctl,lg0d4,lg6ctl,lg6dq,inv}.log`. | ||