forge
Explore
Log in

Don't you dare go Hollow

Merge branch 'lane-pareto2' (4142f563): the preset ladder re-priced on the RDOQ tree; preset 6 keeps the extra-reference NEWMV search and the full coefficient breakout; the native gate prices rav1e/libaom/SVT-AV1 at their fast presets

Browse files at this commit

03046cedfb93a1b7b5ce198cd11599318c710c27Ahmet Kaan GümüşParent: 778c3d35f9ef35
crates/ec-av1/src/encode.rsmodified+93 -0
@@ -12275,6 +12275,20 @@ mod tests {
12275 present12275 present
12276 }12276 }
12277 12277
12278+ /// Whether this ffmpeg was built with `encoder` (lane-pareto2: the
12279+ /// SVT-AV1 Pareto rows are skipped, never failed, on a build without it).
12280+ fn have_encoder(encoder: &str) -> bool {
12281+ Command::new("ffmpeg")
12282+ .args(["-hide_banner", "-encoders"])
12283+ .stderr(Stdio::null())
12284+ .output()
12285+ .is_ok_and(|o| {
12286+ String::from_utf8_lossy(&o.stdout)
12287+ .lines()
12288+ .any(|l| l.split_whitespace().nth(1) == Some(encoder))
12289+ })
12290+ }
12291+
12278 /// Decodes an AV1 OBU stream with ffmpeg and hands back the three planes.12292 /// Decodes an AV1 OBU stream with ffmpeg and hands back the three planes.
12279 fn ffmpeg_decode(stream: &[u8], width: usize, height: usize) -> Picture {12293 fn ffmpeg_decode(stream: &[u8], width: usize, height: usize) -> Picture {
12280 let mut child = Command::new("ffmpeg")12294 let mut child = Command::new("ffmpeg")
@@ -17065,6 +17079,85 @@ mod tests {
17065 bd_rate(&aom, &ours) * 100.0,17079 bd_rate(&aom, &ours) * 100.0,
17066 bd_rate(&rav1e, &ours) * 100.0,17080 bd_rate(&rav1e, &ours) * 100.0,
17067 );17081 );
17082+ // lane-pareto2: the two references at THEIR fast presets, plus
17083+ // SVT-AV1, measured in the SAME arm as the row above -- the only
17084+ // way the wall column of a Pareto table means anything (class:
17085+ // wall tables are comparable only inside one interleaved batch).
17086+ // `EC_AV1_PARETO_REFS=1` only: it roughly doubles the arm.
17087+ if std::env::var("EC_AV1_PARETO_REFS").ok().as_deref() == Some("1") {
17088+ let rav1e_at = |sp: u32| -> Vec<Vec<String>> {
17089+ [50, 100, 150, 200]
17090+ .iter()
17091+ .map(|q| {
17092+ vec![
17093+ "-rav1e-params".to_string(),
17094+ format!(
17095+ "speed={sp}:quantizer={q}:tile_cols=1:tile_rows=1:threads=1"
17096+ ),
17097+ ]
17098+ })
17099+ .collect()
17100+ };
17101+ let aom_at = |cu: u32| -> Vec<Vec<String>> {
17102+ [5, 20, 35, 45]
17103+ .iter()
17104+ .map(|q| {
17105+ vec![
17106+ "-cpu-used".to_string(),
17107+ cu.to_string(),
17108+ "-b:v".to_string(),
17109+ "0".to_string(),
17110+ "-crf".to_string(),
17111+ q.to_string(),
17112+ ]
17113+ })
17114+ .collect()
17115+ };
17116+ let svt_at = |pr: u32| -> Vec<Vec<String>> {
17117+ [20, 35, 45, 55]
17118+ .iter()
17119+ .map(|q| {
17120+ vec![
17121+ "-preset".to_string(),
17122+ pr.to_string(),
17123+ "-crf".to_string(),
17124+ q.to_string(),
17125+ "-svtav1-params".to_string(),
17126+ "lp=1".to_string(),
17127+ ]
17128+ })
17129+ .collect()
17130+ };
17131+ let mut arms: Vec<(String, &str, Vec<Vec<String>>)> = vec![
17132+ ("rav1e speed 8".into(), "librav1e", rav1e_at(8)),
17133+ ("rav1e speed 10".into(), "librav1e", rav1e_at(10)),
17134+ ("libaom cpu-used 8".into(), "libaom-av1", aom_at(8)),
17135+ ];
17136+ if have_encoder("libsvtav1") {
17137+ arms.push(("svt-av1 preset 8".into(), "libsvtav1", svt_at(8)));
17138+ arms.push(("svt-av1 preset 10".into(), "libsvtav1", svt_at(10)));
17139+ } else {
17140+ eprintln!("SKIP the SVT-AV1 rows: this ffmpeg has no libsvtav1");
17141+ }
17142+ for (label, encoder, points) in arms {
17143+ let (lad, wall) = external_ladder(&source, cw, ch, encoder, &points);
17144+ // A REFERENCE stream our decoder cannot read is a note in
17145+ // this table, not a gate failure: these rows exist to
17146+ // price the references, and `assert_ladder_decodes` keeps
17147+ // its teeth for the two ladders the keep table is read off.
17148+ let notes =
17149+ std::mem::take(&mut *LADDER_FAILURES.lock().expect("ladder failures"));
17150+ if !notes.is_empty() {
17151+ eprintln!("{name} {label}: {} point(s) our decoder could not read (reference row, not a gate failure)", notes.len());
17152+ }
17153+ assert_monotone(&format!("{name}: {label}"), &lad);
17154+ println!(
17155+ "| {name} {cw}x{ch} / {label} | -- | {:+.1}% | {:+.1}% | {wall:.1}s (ours {ours_wall:.1}s, rav1e s6 {rav1e_wall:.1}s) |",
17156+ bd_rate(&aom, &lad) * 100.0,
17157+ bd_rate(&rav1e, &lad) * 100.0,
17158+ );
17159+ }
17160+ }
17068 }17161 }
17069 assert_ladder_decodes();17162 assert_ladder_decodes();
17070 }17163 }
crates/ec-av1/src/speed.rsmodified+131 -34
@@ -61,43 +61,124 @@
61 //! live, and off above it, because a preset whose whole purpose is wall does61 //! live, and off above it, because a preset whose whole purpose is wall does
62 //! not spend 12.8% of it on half a BD point.62 //! not spend 12.8% of it on half a BD point.
63 //!63 //!
64-//! # The presets, measured (native gate, one arm at a time, box under other64+//! # The Pareto table, RE-MEASURED 2026-09-08 (lane-pareto2)
65-//! lanes at load 9-48 -- read the wall column against the rav1e anchor in the
66-//! SAME arm, not across arms)
67 //!65 //!
68-//! | preset | film A BD vs libaom / rav1e | screen BD vs libaom / rav1e | film ladder wall ours:libaom:rav1e | 1080p 4x2/8 fps | 3840x1608 4x2/8 fps |66+//! Every row is `encode::tests::bd_rate_screen_native` on THIS head: 12
67+//! frames, gop 12, four quantizers, the native crops (film A 1920x768, film B
68+//! and the capture 1920x1024), one tile, one thread; BD-rate vs libaom
69+//! `cpu-used 6` / vs rav1e `speed 6`. The arms ran THREE at a time on a box
70+//! carrying two other lanes (load 9-25), so the wall is read ONLY as the
71+//! ours:rav1e-speed-6 ratio inside one arm -- `x rav1e` below -- and the fps
72+//! column is our own 48 coded frames over our own ladder wall in that same
73+//! arm. BD is exact across runs; wall is not -- the shipped preset-6 row was
74+//! re-run with the invariant suite alongside, so its wall columns are the
75+//! most depressed of the table; the SERIAL pair (control 75.2s, both levers
76+//! 95.6s on the film A row) is what prices this lane's change: +27% wall for
77+//! 2.8 BD points, and film B gains 3.4 points on top of that for free.
78+//!
79+//! | preset | film A | film B | screen capture | x rav1e s6 (A/B/screen) | 1-thread fps (A/B/screen) |
69 //! |---|---|---|---|---|---|80 //! |---|---|---|---|---|---|
70-//! | 0 | +53.2 / +23.4 | +49.3 / -16.0 | 102.9 : 19.6 : 25.0 | 1.32 | 0.50 |81+//! | 0 | +21.7 / -4.4 | +26.9 / -0.6 | +19.8 / -30.5 | 10.9 / 9.5 / 7.5 | 0.24 / 0.28 / 0.37 |
71-//! | 3 | +55.1 / +24.7 | +54.3 / -13.2 | 63.3 : 16.3 : 23.5 | 1.60 | 0.72 |82+//! | 3 | +22.3 / -4.1 | +27.3 / -0.3 | +23.7 / -28.4 | 7.4 / 6.6 / 4.4 | 0.40 / 0.48 / 0.60 |
72-//! | 6 | +60.9 / +29.1 | +57.7 / -11.7 | 41.3 : 16.0 : 23.4 | 1.83 | 1.50 |83+//! | 6 (as it shipped) | +26.6 / -0.4 | +34.7 / +6.4 | +23.1 / -28.5 | 2.2 / 3.9 / 3.0 | 0.71 / 0.47 / 0.71 |
73-//! | 10 | +158.8 / +104.9 | +174.5 / +41.8 | 16.9 : 18.3 : 24.2 | 6.29 | 3.32 |84+//! | **6 (this lane)** | **+23.0 / -3.2** | **+30.7 / +3.0** | **+23.2 / -28.5** | 3.9 / 2.5 / 2.8 | 0.33 / 0.44 / 0.70 |
85+//! | 8 | +61.1 / +23.5 | +75.6 / +38.4 | +50.8 / -13.8 | 1.0 / 1.5 / 1.3 | 1.50 / 1.34 / 2.10 |
86+//! | 10 | +112.0 / +64.4 | +155.0 / +102.7 | +106.0 / +12.7 | 0.8 / 1.4 / 0.6 | 2.46 / 2.03 / 4.17 |
87+//!
88+//! The whole ladder moved since it was composed (2026-09-07): the encoder is
89+//! four points BETTER than rav1e `speed 6` on film A at preset 0 where the
90+//! old table read +23.4, so every "the keep rule fails at every preset"
91+//! statement that table carried is dead. PARITY WITH rav1e `speed 6` IS
92+//! REACHED AT PRESET 6 on film A and on the screen capture; on film B it is
93+//! reached at preset 3 (-0.3), preset 6 sitting between rav1e `speed 8`
94+//! (+3.5) and `speed 10` (+28.7).
74 //!95 //!
75 //! # Against the reference encoders at THEIR fast presets96 //! # Against the reference encoders at THEIR fast presets
76 //!97 //!
77-//! Same film A crop, 4-point ladders, single thread, one tile, BD-rate vs98+//! Measured in the SAME arms as the shipped preset-6 row above
78-//! rav1e `speed 6` (own harness, `lanes/pareto.md`); fps = 48 coded frames99+//! (`EC_AV1_PARETO_REFS=1`, which runs each reference's fast ladder through
79-//! over the whole ladder:100+//! `external_ladder` right after ours), so the wall column is comparable
101+//! WITHIN a row. `libaom cpu-used 8` codes the same bytes as `cpu-used 6` in
102+//! this ffmpeg -- it reads +0.0% against it on all three rows, one point on
103+//! the plot, not two.
104+//!
105+//! | row | encoder | vs libaom cpu-6 | vs rav1e s6 | 4-point ladder wall (rav1e s6 in that arm) |
106+//! |---|---|---|---|---|
107+//! | film A | ours preset 6 (pre-lane) | +26.6 | -0.4 | 67.6s (31.3s) |
108+//! | film A | rav1e speed 8 | +29.0 | +2.0 | 24.1s |
109+//! | film A | rav1e speed 10 | +45.3 | +17.1 | 8.4s |
110+//! | film A | libaom cpu-used 8 | +0.0 | -20.1 | 15.4s |
111+//! | film A | SVT-AV1 preset 8 | +24.1 | -1.9 | 2.4s |
112+//! | film A | SVT-AV1 preset 10 | +45.3 | +12.1 | 2.0s |
113+//! | film B | ours preset 6 (pre-lane) | +34.7 | +6.4 | 103.0s (26.4s) |
114+//! | film B | rav1e speed 8 | +37.3 | +3.5 | 20.5s |
115+//! | film B | rav1e speed 10 | +61.4 | +28.7 | 10.5s |
116+//! | film B | libaom cpu-used 8 | +0.0 | -22.2 | 32.3s |
117+//! | film B | SVT-AV1 preset 8 | +41.7 | +7.4 | 2.9s |
118+//! | film B | SVT-AV1 preset 10 | +65.9 | +23.3 | 2.0s |
119+//! | screen | ours preset 6 (pre-lane) | +23.1 | -28.5 | 68.0s (22.6s) |
120+//! | screen | rav1e speed 8 | +84.2 | +4.5 | 13.8s |
121+//! | screen | rav1e speed 10 | +332.5 | +103.4 | 9.8s |
122+//! | screen | libaom cpu-used 8 | +0.0 | -42.4 | 17.6s |
123+//! | screen | SVT-AV1 preset 8 | +21.5 | -31.6 | 5.0s |
124+//! | screen | SVT-AV1 preset 10 | +39.4 | -24.5 | 1.9s |
125+//!
126+//! So the QUALITY bar is met and the WALL bar is not: at preset 6 we are
127+//! ahead of rav1e `speed 8` on film A and the capture and behind it on film
128+//! B, but we spend 2-4x rav1e `speed 6`'s wall to do it, and SVT-AV1 preset 8
129+//! is within 2 points of us on film A at a THIRTIETH of the wall. libaom
130+//! `cpu-used 6/8` is 20 points ahead of everything on every row.
131+//!
132+//! # Per-lever re-price at preset 6 (lane-pareto2, film A row, this head)
80 //!133 //!
81-//! | encoder | BD vs rav1e speed 6 | fps |134+//! The ladder was composed off a lever table measured BEFORE RDOQ. This is
135+//! the same one-lever-at-a-time ablation redone AT preset 6, the fast
136+//! software preset, control +26.6 / -0.4. "gain" is BD points off the
137+//! vs-rav1e column; wall is only quoted where it decided a row (three serial
138+//! control arms measured 66.3 / 71.1 / 75.2s, so anything under ~13% wall is
139+//! below this box's floor).
140+//!
141+//! | lever re-enabled at 6 | vs libaom / rav1e | gain | shipped |
142+//! |---|---|---|---|
143+//! | **extra-reference NEWMV** | +24.4 / -2.4 | **2.0** | ON (+15..30% wall = 0.067 pts/1%) |
144+//! | **coefficient breakout 0** | +24.8 / -1.6 | **1.2** | ON (+11% wall = 0.109 pts/1%) |
145+//! | 8x8 split | +25.9 / -0.8 | 0.4 | off (half the film wall in the first table) |
146+//! | warp | +26.2 / -0.8 | 0.4 | off |
147+//! | CfL | +26.2 / -0.7 | 0.3 | off |
148+//! | chroma top-k off | +26.3 / -0.7 | 0.3 | off |
149+//! | inter var-tx | +26.3 / -0.7 | 0.3 | off |
150+//! | angle delta | +26.5 / -0.6 | 0.2 | off |
151+//! | split-RD 0.125 | +26.4 / -0.6 | 0.2 | off |
152+//! | inter-intra top-13 | +26.7 / -0.3 | 0.1 | off |
153+//! | intra top-13 | +26.7 / -0.4 | 0.0 | off |
154+//! | filter intra | +26.7 / -0.4 | 0.0 | off |
155+//! | 32x32 tx depth | +26.6 / -0.4 | 0.0 | off -- INERT at 6 (inter tx select is off) |
156+//! | compound var-tx | +26.6 / -0.4 | 0.0 | off -- inert for the same reason |
157+//! | loop restoration | +26.7 / -0.2 | -0.2 | off (re-enabling it LOSES) |
158+//!
159+//! and the other half of the greedy rule, every lever preset 6 KEEPS, taken
160+//! away one at a time:
161+//!
162+//! | lever removed from 6 | vs libaom / rav1e | cost of losing it |
82 //! |---|---|---|163 //! |---|---|---|
83-//! | rav1e speed 6 | 0.0 | 1.79 |164+//! | RDOQ | +41.2 / +10.2 | 10.6 |
84-//! | rav1e speed 8 | +2.1 | 2.48 |165+//! | 64x64 inter root | +30.7 / +3.4 | 3.8 |
85-//! | rav1e speed 10 | +16.9 | 4.73 |166+//! | key 64x64 intra root | +28.0 / +0.9 | 1.3 |
86-//! | libaom cpu-used 6 | -20.7 | 2.55 |167+//! | per-superblock delta_q | +27.2 / -0.2 | 0.2 |
87-//! | SVT-AV1 preset 8 | -3.9 | 13.80 |168+//! | tpl window 4 -> 1 | +27.0 / -0.3 | 0.1 |
88-//! | SVT-AV1 preset 10/12 | +10.9 | 20.78 |
89-//! | ours speed 0 | +23.4 | 0.47 |
90-//! | ours speed 3 | +24.7 | 0.76 |
91-//! | ours speed 6 | +29.1 | 1.16 |
92-//! | ours speed 10 | +104.9 | 2.84 |
93 //!169 //!
94-//! The keep rule for a preset -- at its own wall, no worse in BD than the170+//! Every keep is confirmed. The two re-enables above ship (see
95-//! reference at that wall -- FAILS at every preset on film: rav1e reaches our171+//! [`EXTRA_REF_NEW`] and [`SPLIT_BREAKOUT`]); together they read +23.0 / -3.2
96-//! speed-10 wall at +16.9 where we are at +104.9, and SVT-AV1 is five times172+//! on film A in the ablation arm, 2.8 points for wall that stayed inside the
97-//! faster than any of ours. What the axis does buy is real: 4.8x (1080p) to173+//! control spread of three serial arms. Presets 4 and 5 take them by
98-//! 6.6x (4K) the frames per second of the full search for +7.7 BD points up174+//! bracketing, not by their own arm; presets 3, 8 and 10 are untouched, and
99-//! to speed 6, and on SCREEN content speeds 0-6 still beat rav1e speed 6175+//! preset 0 is untouched by construction (the byte pins).
100-//! (-16.0 / -13.2 / -11.7).176+//!
177+//! NOT RE-MEASURED, and the reason: the THREADED fps table (1080p and
178+//! 3840x1608 at 4x2 tiles / 8 threads) cannot be read on this box while two
179+//! other lanes run -- three interleaved passes of `filter_stage_wall_*` put
180+//! preset 3 BELOW preset 0 in every pass at load 16-25. The single-thread fps
181+//! column above comes from the BD arms themselves and is ordered correctly.
101 182
102 183
103 use std::sync::atomic::{AtomicU8, Ordering};184 use std::sync::atomic::{AtomicU8, Ordering};
@@ -246,14 +327,20 @@ pub(crate) const SPLIT_RD: [f64; 11] = [
246 ];327 ];
247 328
248 /// `encode::SPLIT_BREAKOUT_COEFFS`: libaom's coefficient-count breakout.329 /// `encode::SPLIT_BREAKOUT_COEFFS`: libaom's coefficient-count breakout.
330+///
331+/// lane-pareto2 RE-PRICED it at preset 6: switching the breakout OFF there
332+/// (back to the shipped 0) takes film A +26.6/-0.4 to +24.8/-1.6 -- 1.2 BD
333+/// points against rav1e `speed 6` -- for +11% wall (73.7s against the 66.3s
334+/// control) = 0.109 points per 1% wall, three times the frontier. Presets 5
335+/// and 6 take 0; preset 5 by BRACKETING (4 already had 0), 6 measured.
249 pub(crate) const SPLIT_BREAKOUT: [usize; 11] = [336 pub(crate) const SPLIT_BREAKOUT: [usize; 11] = [
250 crate::encode::SPLIT_BREAKOUT_COEFFS,337 crate::encode::SPLIT_BREAKOUT_COEFFS,
251 0,338 0,
252 0,339 0,
253 0,340 0,
254 0,341 0,
255- 1,342+ 0,
256- 1,343+ 0,
257 1,344 1,
258 1,345 1,
259 2,346 2,
@@ -297,14 +384,24 @@ pub(crate) const LEAF_SECOND: [bool; 11] = [
297 ];384 ];
298 385
299 /// `encode::EXTRA_REF_NEW_MV`: GOLDEN/ALTREF get a `NEWMV` search of their own.386 /// `encode::EXTRA_REF_NEW_MV`: GOLDEN/ALTREF get a `NEWMV` search of their own.
387+/// lane-pareto2 RE-PRICED it at preset 6 (the fast software preset) on the
388+/// 12-frame film A row of `encode::tests::bd_rate_screen_native`, this head:
389+/// re-enabling it takes +26.6/-0.4 to +24.4/-2.4, TWO BD points against rav1e
390+/// `speed 6`, for +15% .. +30% wall (86.4s against a control that measured
391+/// 66.3/71.1/75.2s over three serial arms) = 0.067 points per 1% wall, which
392+/// clears the ladder's own frontier (CfL + angle 0.031, filter intra 0.039)
393+/// by better than 1.5x. The old ranking dropped it at preset 4 off a table
394+/// measured BEFORE RDOQ; with RDOQ on, a second reference's NEWMV is worth
395+/// twice what that table said. It is ON through preset 6 now; presets 4 and 5
396+/// follow by BRACKETING (0..3 and 6 all keep it), not by their own arm.
300 pub(crate) const EXTRA_REF_NEW: [bool; 11] = [397 pub(crate) const EXTRA_REF_NEW: [bool; 11] = [
301 crate::encode::EXTRA_REF_NEW_MV,398 crate::encode::EXTRA_REF_NEW_MV,
302 true,399 true,
303 true,400 true,
304 true,401 true,
305- false,402+ true,
306- false,403+ true,
307- false,404+ true,
308 false,405 false,
309 false,406 false,
310 false,407 false,
lanes/pareto2.mdadded+158 -0
@@ -0,0 +1,158 @@
1+# lane-pareto2 -- working notes
2+
3+Head: f6c67770 (+ this lane). Box: 12 cores, TWO other lanes running throughout,
4+load 9-25 (load 64 once, during the first fps sweep). Every arm is
5+`encode::tests::bd_rate_screen_native` (12 frames, gop 12, four quantizers,
6+1920x768 / 1920x1024 native crops, 1 tile, 1 thread), logs in
7+`$HOME/.cache/pareto2/logs/`.
8+
9+RULE USED FOR WALL: BD is exact across runs (the same stream), wall is not.
10+Phase-1 arms ran THREE at a time, so their wall is read only as the
11+ours:rav1e-speed-6 ratio INSIDE one arm; the lever arms that decided a shipped
12+row were re-run ONE at a time (`q5.tsv`).
13+
14+## Phase 1 -- the Pareto table, our presets (q1.tsv, 15 arms, all RC=0)
15+
16+BD-rate vs libaom `cpu-used 6` / vs rav1e `speed 6`; fps = 48 coded frames over
17+our own ladder wall in that arm, `ratio` = ours:rav1e-s6 wall in the same arm.
18+
19+| preset | film A | film B | screen | ratio A/B/screen | 1-thread fps A/B/screen |
20+|---|---|---|---|---|---|
21+| 0 | +21.7 / -4.4 | +26.9 / -0.6 | +19.8 / -30.5 | 10.9 / 9.5 / 7.5 | 0.24 / 0.28 / 0.37 |
22+| 3 | +22.3 / -4.1 | +27.3 / -0.3 | +23.7 / -28.4 | 7.4 / 6.6 / 4.4 | 0.40 / 0.48 / 0.60 |
23+| 6 | +26.6 / -0.4 | +34.7 / +6.4 | +23.1 / -28.5 | 2.2 / 3.9 / 3.0 | 0.71 / 0.47 / 0.71 |
24+| 8 | +61.1 / +23.5 | +75.6 / +38.4 | +50.8 / -13.8 | 1.0 / 1.5 / 1.3 | 1.50 / 1.34 / 2.10 |
25+| 10 | +112.0 / +64.4 | +155.0 / +102.7 | +106.0 / +12.7 | 0.8 / 1.4 / 0.6 | 2.46 / 2.03 / 4.17 |
26+
27+## Phase 1b -- the references at THEIR fast presets, same arms (EC_AV1_PARETO_REFS=1)
28+
29+| row | encoder | vs libaom cpu-6 | vs rav1e s6 | ladder wall (rav1e s6 anchor in that arm) |
30+|---|---|---|---|---|
31+| film A | ours preset 6 | +26.6 | -0.4 | 67.6s (31.3s) |
32+| film A | rav1e speed 8 | +29.0 | +2.0 | 24.1s |
33+| film A | rav1e speed 10 | +45.3 | +17.1 | 8.4s |
34+| film A | libaom cpu-used 8 | +0.0 | -20.1 | 15.4s |
35+| film A | SVT-AV1 preset 8 | +24.1 | -1.9 | 2.4s |
36+| film A | SVT-AV1 preset 10 | +45.3 | +12.1 | 2.0s |
37+| film B | ours preset 6 | +34.7 | +6.4 | 103.0s (26.4s) |
38+| film B | rav1e speed 8 | +37.3 | +3.5 | 20.5s |
39+| film B | rav1e speed 10 | +61.4 | +28.7 | 10.5s |
40+| film B | libaom cpu-used 8 | +0.0 | -22.2 | 32.3s |
41+| film B | SVT-AV1 preset 8 | +41.7 | +7.4 | 2.9s |
42+| film B | SVT-AV1 preset 10 | +65.9 | +23.3 | 2.0s |
43+| screen | ours preset 6 | +23.1 | -28.5 | 68.0s (22.6s) |
44+| screen | rav1e speed 8 | +84.2 | +4.5 | 13.8s |
45+| screen | rav1e speed 10 | +332.5 | +103.4 | 9.8s |
46+| screen | libaom cpu-used 8 | +0.0 | -42.4 | 17.6s |
47+| screen | SVT-AV1 preset 8 | +21.5 | -31.6 | 5.0s |
48+| screen | SVT-AV1 preset 10 | +39.4 | -24.5 | 1.9s |
49+
50+`libaom cpu-used 8` reads +0.0% against `cpu-used 6` on every row: this ffmpeg's
51+libaom codes the SAME bytes at both (the old `lanes/pareto.md` run saw the same
52+thing), so it is one point on the plot, not two.
53+
54+NOTE (open): one SVT-AV1 preset-8 screen point decodes one sample off through
55+OUR decoder (`frame 0 plane Y sample 1471489: ours 53, ffmpeg 52`). Reference
56+rows collect that as a note, not a gate failure; it is a real decoder finding.
57+
58+## Phase 2 -- per-lever re-price at preset 6, film A (q2.tsv, 21 arms, all RC=0)
59+
60+Control +26.6 / -0.4. "gain" = BD points the lever takes off the vs-rav1e column.
61+
62+| lever re-enabled at 6 | vs libaom / rav1e | gain |
63+|---|---|---|
64+| extra-reference NEWMV | +24.4 / -2.4 | 2.0 |
65+| coefficient breakout 0 | +24.8 / -1.6 | 1.2 |
66+| 8x8 split | +25.9 / -0.8 | 0.4 |
67+| warp | +26.2 / -0.8 | 0.4 |
68+| CfL | +26.2 / -0.7 | 0.3 |
69+| chroma top-k off | +26.3 / -0.7 | 0.3 |
70+| inter var-tx | +26.3 / -0.7 | 0.3 |
71+| angle delta | +26.5 / -0.6 | 0.2 |
72+| split-RD 0.125 | +26.4 / -0.6 | 0.2 |
73+| inter-intra top-13 | +26.7 / -0.3 | 0.1 |
74+| intra top-13 | +26.7 / -0.4 | 0.0 |
75+| filter intra | +26.7 / -0.4 | 0.0 |
76+| 32x32 tx depth | +26.6 / -0.4 | 0.0 (inert: inter tx select is off at 6) |
77+| compound var-tx | +26.6 / -0.4 | 0.0 (same cause) |
78+| loop restoration | +26.7 / -0.2 | -0.2 (worse) |
79+
80+| lever preset 6 KEEPS, disabled | vs libaom / rav1e | cost of losing it |
81+|---|---|---|
82+| RDOQ | +41.2 / +10.2 | 10.6 |
83+| 64x64 inter root | +30.7 / +3.4 | 3.8 |
84+| key 64x64 intra root | +28.0 / +0.9 | 1.3 |
85+| tpl window 4 -> 1 | +27.0 / -0.3 | 0.1 |
86+| per-SB delta_q | +27.2 / -0.2 | 0.2 |
87+
88+## Phase 3 -- wall of the two candidates, serial arms
89+
90+See `q3.tsv`/`q5.tsv` logs; the threaded fps sweep (`fps2.log`) is NOT usable at
91+this box load -- preset 3 read slower than preset 0 in every pass.
92+
93+## Phase 3 -- serial wall arms (q3/q5, one at a time on MY side; other lanes still ran)
94+
95+| arm | film A BD (libaom / rav1e) | our ladder wall |
96+|---|---|---|
97+| control (preset 6 as it shipped) | +26.6 / -0.4 | 66.3s, 71.1s, 75.2s (three arms) |
98+| + extra-reference NEWMV | +24.4 / -2.4 | 103.2s, 86.4s |
99+| + coefficient breakout 0 | +24.8 / -1.6 | 73.7s |
100+| + both | +23.0 / -3.2 | 67.7s (contended, discarded), 95.6s |
101+
102+Control spread is 13%, so anything cheaper than that is unmeasurable here; the
103+95.6s / 75.2s serial pair is the price of this lane's change: +27% wall.
104+
105+## Phase 4 -- the recomposed presets, re-run for real (q6)
106+
107+| preset | film A | film B | screen |
108+|---|---|---|---|
109+| 4 | +22.5 / -3.9 | -- | -- |
110+| 5 | +22.5 / -3.6 | -- | -- |
111+| 6 | +23.0 / -3.2 | +30.7 / +3.0 | +23.2 / -28.5 |
112+
113+Monotone in speed, and film B gained 3.4 points (+34.7/+6.4 -> +30.7/+3.0)
114+without an arm of its own.
115+
116+## Deferred
117+
118+* threaded fps at 1080p / 3840x1608 (4x2 tiles, 8 and 12 threads): NOT
119+ measurable at load 16-25 with two other lanes on the box -- three
120+ interleaved passes put preset 3 below preset 0 every time. Unblocked by a
121+ quiet box; command is `EC_AV1_SPEED=<n> <testbin> --ignored --nocapture
122+ filter_stage_wall_1080p` / `_4k` (see `fps2.log`).
123+* recomposing preset 6 by REMOVING a lever it keeps (delta_q, tpl 4): the
124+ candidates' BD stakes are 0.1-0.2 points and their wall sits under this
125+ box's 13% floor, so the arms cannot rank them. Same unblock.
126+
127+## OPEN, for a decoder lane: an SVT-AV1 stream our decoder reads one sample off
128+
129+`EC_AV1_PARETO_REFS=1` collected this on the screen row (it is a NOTE on a
130+reference row, not a gate failure):
131+
132+ LADDER DECODE FAILURE: libsvtav1 ["-preset", "8", "-crf", "35",
133+ "-svtav1-params", "lp=1"] frame 0 plane Y sample 1471489:
134+ our decoder decoded 53, ffmpeg 52
135+
136+i.e. frame 0 (the key frame), luma, sample 1471489 of 1920x1024 = row 766,
137+column 1729. One sample, off by one; every other point of every other
138+reference ladder in this lane decoded sample-exact.
139+
140+Reproduce (SvtAv1 v3.1.2 through ffmpeg, no repo fixture touched -- the
141+artifacts live in `$HOME/.cache/pareto2/`):
142+
143+ # the gate's own screen clip: the first OBS .mkv in the manifest that exists
144+ SRC=$(awk -F'\t' 'NR>1 && $1 ~ /\/OBS\// && $1 ~ /\.mkv$/ {print $1; exit}' \
145+ fixtures/real-library-manifest.tsv)
146+ # probe::gate_crop of a 2560x1440 source = 1920x1024 from the middle
147+ ffmpeg -v error -y -ss 0 -i "$SRC" -frames:v 12 \
148+ -vf crop=1920:1024:320:208 -f rawvideo -pix_fmt yuv420p \
149+ $HOME/.cache/pareto2/svt-screen-1920x1024-12f.yuv # md5 d10969be96c8d4e3888401759f562db4
150+ ffmpeg -v error -y -f rawvideo -pix_fmt yuv420p -s 1920x1024 -r 24 \
151+ -i $HOME/.cache/pareto2/svt-screen-1920x1024-12f.yuv \
152+ -an -threads 1 -g 12 -c:v libsvtav1 -preset 8 -crf 35 \
153+ -svtav1-params lp=1 -f obu \
154+ $HOME/.cache/pareto2/svt-p8-crf35-screen.obu # 74769 B, md5 ca517253599f1ef8d5bf61371c0f578c
155+
156+Then `crate::stream::decode_stream` on that .obu against
157+`encode::tests::ffmpeg_decode_sequence` of the same bytes, comparing Y of
158+frame 0 at index 1471489. Both artifacts are kept at those paths.
lanes/pareto2.report.mdadded+158 -0
@@ -0,0 +1,158 @@
1+# lane-pareto2 -- working notes
2+
3+Head: f6c67770 (+ this lane). Box: 12 cores, TWO other lanes running throughout,
4+load 9-25 (load 64 once, during the first fps sweep). Every arm is
5+`encode::tests::bd_rate_screen_native` (12 frames, gop 12, four quantizers,
6+1920x768 / 1920x1024 native crops, 1 tile, 1 thread), logs in
7+`$HOME/.cache/pareto2/logs/`.
8+
9+RULE USED FOR WALL: BD is exact across runs (the same stream), wall is not.
10+Phase-1 arms ran THREE at a time, so their wall is read only as the
11+ours:rav1e-speed-6 ratio INSIDE one arm; the lever arms that decided a shipped
12+row were re-run ONE at a time (`q5.tsv`).
13+
14+## Phase 1 -- the Pareto table, our presets (q1.tsv, 15 arms, all RC=0)
15+
16+BD-rate vs libaom `cpu-used 6` / vs rav1e `speed 6`; fps = 48 coded frames over
17+our own ladder wall in that arm, `ratio` = ours:rav1e-s6 wall in the same arm.
18+
19+| preset | film A | film B | screen | ratio A/B/screen | 1-thread fps A/B/screen |
20+|---|---|---|---|---|---|
21+| 0 | +21.7 / -4.4 | +26.9 / -0.6 | +19.8 / -30.5 | 10.9 / 9.5 / 7.5 | 0.24 / 0.28 / 0.37 |
22+| 3 | +22.3 / -4.1 | +27.3 / -0.3 | +23.7 / -28.4 | 7.4 / 6.6 / 4.4 | 0.40 / 0.48 / 0.60 |
23+| 6 | +26.6 / -0.4 | +34.7 / +6.4 | +23.1 / -28.5 | 2.2 / 3.9 / 3.0 | 0.71 / 0.47 / 0.71 |
24+| 8 | +61.1 / +23.5 | +75.6 / +38.4 | +50.8 / -13.8 | 1.0 / 1.5 / 1.3 | 1.50 / 1.34 / 2.10 |
25+| 10 | +112.0 / +64.4 | +155.0 / +102.7 | +106.0 / +12.7 | 0.8 / 1.4 / 0.6 | 2.46 / 2.03 / 4.17 |
26+
27+## Phase 1b -- the references at THEIR fast presets, same arms (EC_AV1_PARETO_REFS=1)
28+
29+| row | encoder | vs libaom cpu-6 | vs rav1e s6 | ladder wall (rav1e s6 anchor in that arm) |
30+|---|---|---|---|---|
31+| film A | ours preset 6 | +26.6 | -0.4 | 67.6s (31.3s) |
32+| film A | rav1e speed 8 | +29.0 | +2.0 | 24.1s |
33+| film A | rav1e speed 10 | +45.3 | +17.1 | 8.4s |
34+| film A | libaom cpu-used 8 | +0.0 | -20.1 | 15.4s |
35+| film A | SVT-AV1 preset 8 | +24.1 | -1.9 | 2.4s |
36+| film A | SVT-AV1 preset 10 | +45.3 | +12.1 | 2.0s |
37+| film B | ours preset 6 | +34.7 | +6.4 | 103.0s (26.4s) |
38+| film B | rav1e speed 8 | +37.3 | +3.5 | 20.5s |
39+| film B | rav1e speed 10 | +61.4 | +28.7 | 10.5s |
40+| film B | libaom cpu-used 8 | +0.0 | -22.2 | 32.3s |
41+| film B | SVT-AV1 preset 8 | +41.7 | +7.4 | 2.9s |
42+| film B | SVT-AV1 preset 10 | +65.9 | +23.3 | 2.0s |
43+| screen | ours preset 6 | +23.1 | -28.5 | 68.0s (22.6s) |
44+| screen | rav1e speed 8 | +84.2 | +4.5 | 13.8s |
45+| screen | rav1e speed 10 | +332.5 | +103.4 | 9.8s |
46+| screen | libaom cpu-used 8 | +0.0 | -42.4 | 17.6s |
47+| screen | SVT-AV1 preset 8 | +21.5 | -31.6 | 5.0s |
48+| screen | SVT-AV1 preset 10 | +39.4 | -24.5 | 1.9s |
49+
50+`libaom cpu-used 8` reads +0.0% against `cpu-used 6` on every row: this ffmpeg's
51+libaom codes the SAME bytes at both (the old `lanes/pareto.md` run saw the same
52+thing), so it is one point on the plot, not two.
53+
54+NOTE (open): one SVT-AV1 preset-8 screen point decodes one sample off through
55+OUR decoder (`frame 0 plane Y sample 1471489: ours 53, ffmpeg 52`). Reference
56+rows collect that as a note, not a gate failure; it is a real decoder finding.
57+
58+## Phase 2 -- per-lever re-price at preset 6, film A (q2.tsv, 21 arms, all RC=0)
59+
60+Control +26.6 / -0.4. "gain" = BD points the lever takes off the vs-rav1e column.
61+
62+| lever re-enabled at 6 | vs libaom / rav1e | gain |
63+|---|---|---|
64+| extra-reference NEWMV | +24.4 / -2.4 | 2.0 |
65+| coefficient breakout 0 | +24.8 / -1.6 | 1.2 |
66+| 8x8 split | +25.9 / -0.8 | 0.4 |
67+| warp | +26.2 / -0.8 | 0.4 |
68+| CfL | +26.2 / -0.7 | 0.3 |
69+| chroma top-k off | +26.3 / -0.7 | 0.3 |
70+| inter var-tx | +26.3 / -0.7 | 0.3 |
71+| angle delta | +26.5 / -0.6 | 0.2 |
72+| split-RD 0.125 | +26.4 / -0.6 | 0.2 |
73+| inter-intra top-13 | +26.7 / -0.3 | 0.1 |
74+| intra top-13 | +26.7 / -0.4 | 0.0 |
75+| filter intra | +26.7 / -0.4 | 0.0 |
76+| 32x32 tx depth | +26.6 / -0.4 | 0.0 (inert: inter tx select is off at 6) |
77+| compound var-tx | +26.6 / -0.4 | 0.0 (same cause) |
78+| loop restoration | +26.7 / -0.2 | -0.2 (worse) |
79+
80+| lever preset 6 KEEPS, disabled | vs libaom / rav1e | cost of losing it |
81+|---|---|---|
82+| RDOQ | +41.2 / +10.2 | 10.6 |
83+| 64x64 inter root | +30.7 / +3.4 | 3.8 |
84+| key 64x64 intra root | +28.0 / +0.9 | 1.3 |
85+| tpl window 4 -> 1 | +27.0 / -0.3 | 0.1 |
86+| per-SB delta_q | +27.2 / -0.2 | 0.2 |
87+
88+## Phase 3 -- wall of the two candidates, serial arms
89+
90+See `q3.tsv`/`q5.tsv` logs; the threaded fps sweep (`fps2.log`) is NOT usable at
91+this box load -- preset 3 read slower than preset 0 in every pass.
92+
93+## Phase 3 -- serial wall arms (q3/q5, one at a time on MY side; other lanes still ran)
94+
95+| arm | film A BD (libaom / rav1e) | our ladder wall |
96+|---|---|---|
97+| control (preset 6 as it shipped) | +26.6 / -0.4 | 66.3s, 71.1s, 75.2s (three arms) |
98+| + extra-reference NEWMV | +24.4 / -2.4 | 103.2s, 86.4s |
99+| + coefficient breakout 0 | +24.8 / -1.6 | 73.7s |
100+| + both | +23.0 / -3.2 | 67.7s (contended, discarded), 95.6s |
101+
102+Control spread is 13%, so anything cheaper than that is unmeasurable here; the
103+95.6s / 75.2s serial pair is the price of this lane's change: +27% wall.
104+
105+## Phase 4 -- the recomposed presets, re-run for real (q6)
106+
107+| preset | film A | film B | screen |
108+|---|---|---|---|
109+| 4 | +22.5 / -3.9 | -- | -- |
110+| 5 | +22.5 / -3.6 | -- | -- |
111+| 6 | +23.0 / -3.2 | +30.7 / +3.0 | +23.2 / -28.5 |
112+
113+Monotone in speed, and film B gained 3.4 points (+34.7/+6.4 -> +30.7/+3.0)
114+without an arm of its own.
115+
116+## Deferred
117+
118+* threaded fps at 1080p / 3840x1608 (4x2 tiles, 8 and 12 threads): NOT
119+ measurable at load 16-25 with two other lanes on the box -- three
120+ interleaved passes put preset 3 below preset 0 every time. Unblocked by a
121+ quiet box; command is `EC_AV1_SPEED=<n> <testbin> --ignored --nocapture
122+ filter_stage_wall_1080p` / `_4k` (see `fps2.log`).
123+* recomposing preset 6 by REMOVING a lever it keeps (delta_q, tpl 4): the
124+ candidates' BD stakes are 0.1-0.2 points and their wall sits under this
125+ box's 13% floor, so the arms cannot rank them. Same unblock.
126+
127+## OPEN, for a decoder lane: an SVT-AV1 stream our decoder reads one sample off
128+
129+`EC_AV1_PARETO_REFS=1` collected this on the screen row (it is a NOTE on a
130+reference row, not a gate failure):
131+
132+ LADDER DECODE FAILURE: libsvtav1 ["-preset", "8", "-crf", "35",
133+ "-svtav1-params", "lp=1"] frame 0 plane Y sample 1471489:
134+ our decoder decoded 53, ffmpeg 52
135+
136+i.e. frame 0 (the key frame), luma, sample 1471489 of 1920x1024 = row 766,
137+column 1729. One sample, off by one; every other point of every other
138+reference ladder in this lane decoded sample-exact.
139+
140+Reproduce (SvtAv1 v3.1.2 through ffmpeg, no repo fixture touched -- the
141+artifacts live in `$HOME/.cache/pareto2/`):
142+
143+ # the gate's own screen clip: the first OBS .mkv in the manifest that exists
144+ SRC=$(awk -F'\t' 'NR>1 && $1 ~ /\/OBS\// && $1 ~ /\.mkv$/ {print $1; exit}' \
145+ fixtures/real-library-manifest.tsv)
146+ # probe::gate_crop of a 2560x1440 source = 1920x1024 from the middle
147+ ffmpeg -v error -y -ss 0 -i "$SRC" -frames:v 12 \
148+ -vf crop=1920:1024:320:208 -f rawvideo -pix_fmt yuv420p \
149+ $HOME/.cache/pareto2/svt-screen-1920x1024-12f.yuv # md5 d10969be96c8d4e3888401759f562db4
150+ ffmpeg -v error -y -f rawvideo -pix_fmt yuv420p -s 1920x1024 -r 24 \
151+ -i $HOME/.cache/pareto2/svt-screen-1920x1024-12f.yuv \
152+ -an -threads 1 -g 12 -c:v libsvtav1 -preset 8 -crf 35 \
153+ -svtav1-params lp=1 -f obu \
154+ $HOME/.cache/pareto2/svt-p8-crf35-screen.obu # 74769 B, md5 ca517253599f1ef8d5bf61371c0f578c
155+
156+Then `crate::stream::decode_stream` on that .obu against
157+`encode::tests::ffmpeg_decode_sequence` of the same bytes, comparing Y of
158+frame 0 at index 1471489. Both artifacts are kept at those paths.