forge
Explore
Log in

Don't you dare go Hollow

Preset 6 keeps the extra-reference NEWMV search and the full coefficient breakout

Browse files at this commit

73765f01643f2f365b6c5437bd58e9746b64cef7Ahmet Kaan GümüşParent: fc10b78
  • perf
    • preset 6 keeps the extra-reference NEWMV search and the full coefficient breakout
Show full message
perf(av1): preset 6 keeps the extra-reference NEWMV search and the full coefficient breakout

The ladder was composed off a lever table measured BEFORE RDOQ. Re-priced at
preset 6 on the 12-frame film A row of bd_rate_screen_native, this head, the
two levers it dropped there are the two cheapest BD points in the table:
extra-reference NEWMV buys 2.0 points (+26.6/-0.4 -> +24.4/-2.4) for +15..30%
wall and the coefficient breakout 1.2 points (-> +24.8/-1.6) for +11%, i.e.
0.067 and 0.109 points per 1% wall against a frontier of 0.031..0.041.

Shipped together, preset 6 reads +23.0/-3.2 film A, +30.7/+3.0 film B,
+23.2/-28.5 screen for +27% wall on three serial arms -- and it is now PAST
rav1e speed 6 on film A and on the capture. Presets 4 and 5 take both levers
by bracketing; 0, 3, 8 and 10 are untouched. The module doc carries the whole
re-measured Pareto table, the references at their fast presets and the
per-lever re-price.
crates/ec-av1/src/speed.rsmodified+131 -34
@@ -61,43 +61,124 @@
6161 //! live, and off above it, because a preset whose whole purpose is wall does
6262 //! not spend 12.8% of it on half a BD point.
6363 //!
64-//! # The presets, measured (native gate, one arm at a time, box under other
65-//! lanes at load 9-48 -- read the wall column against the rav1e anchor in the
66-//! SAME arm, not across arms)
64+//! # The Pareto table, RE-MEASURED 2026-09-08 (lane-pareto2)
6765 //!
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) |
6980 //! |---|---|---|---|---|---|
70-//! | 0 | +53.2 / +23.4 | +49.3 / -16.0 | 102.9 : 19.6 : 25.0 | 1.32 | 0.50 |
71-//! | 3 | +55.1 / +24.7 | +54.3 / -13.2 | 63.3 : 16.3 : 23.5 | 1.60 | 0.72 |
72-//! | 6 | +60.9 / +29.1 | +57.7 / -11.7 | 41.3 : 16.0 : 23.4 | 1.83 | 1.50 |
73-//! | 10 | +158.8 / +104.9 | +174.5 / +41.8 | 16.9 : 18.3 : 24.2 | 6.29 | 3.32 |
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 |
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 |
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 |
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).
7495 //!
7596 //! # Against the reference encoders at THEIR fast presets
7697 //!
77-//! Same film A crop, 4-point ladders, single thread, one tile, BD-rate vs
78-//! rav1e `speed 6` (own harness, `lanes/pareto.md`); fps = 48 coded frames
79-//! over the whole ladder:
98+//! Measured in the SAME arms as the shipped preset-6 row above
99+//! (`EC_AV1_PARETO_REFS=1`, which runs each reference's fast ladder through
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)
80133 //!
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 |
82163 //! |---|---|---|
83-//! | rav1e speed 6 | 0.0 | 1.79 |
84-//! | rav1e speed 8 | +2.1 | 2.48 |
85-//! | rav1e speed 10 | +16.9 | 4.73 |
86-//! | libaom cpu-used 6 | -20.7 | 2.55 |
87-//! | SVT-AV1 preset 8 | -3.9 | 13.80 |
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 |
164+//! | RDOQ | +41.2 / +10.2 | 10.6 |
165+//! | 64x64 inter root | +30.7 / +3.4 | 3.8 |
166+//! | key 64x64 intra root | +28.0 / +0.9 | 1.3 |
167+//! | per-superblock delta_q | +27.2 / -0.2 | 0.2 |
168+//! | tpl window 4 -> 1 | +27.0 / -0.3 | 0.1 |
93169 //!
94-//! The keep rule for a preset -- at its own wall, no worse in BD than the
95-//! reference at that wall -- FAILS at every preset on film: rav1e reaches our
96-//! speed-10 wall at +16.9 where we are at +104.9, and SVT-AV1 is five times
97-//! faster than any of ours. What the axis does buy is real: 4.8x (1080p) to
98-//! 6.6x (4K) the frames per second of the full search for +7.7 BD points up
99-//! to speed 6, and on SCREEN content speeds 0-6 still beat rav1e speed 6
100-//! (-16.0 / -13.2 / -11.7).
170+//! Every keep is confirmed. The two re-enables above ship (see
171+//! [`EXTRA_REF_NEW`] and [`SPLIT_BREAKOUT`]); together they read +23.0 / -3.2
172+//! on film A in the ablation arm, 2.8 points for wall that stayed inside the
173+//! control spread of three serial arms. Presets 4 and 5 take them by
174+//! bracketing, not by their own arm; presets 3, 8 and 10 are untouched, and
175+//! preset 0 is untouched by construction (the byte pins).
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.
101182
102183
103184 use std::sync::atomic::{AtomicU8, Ordering};
@@ -246,14 +327,20 @@ pub(crate) const SPLIT_RD: [f64; 11] = [
246327 ];
247328
248329 /// `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.
249336 pub(crate) const SPLIT_BREAKOUT: [usize; 11] = [
250337 crate::encode::SPLIT_BREAKOUT_COEFFS,
251338 0,
252339 0,
253340 0,
254341 0,
255- 1,
256- 1,
342+ 0,
343+ 0,
257344 1,
258345 1,
259346 2,
@@ -297,14 +384,24 @@ pub(crate) const LEAF_SECOND: [bool; 11] = [
297384 ];
298385
299386 /// `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.
300397 pub(crate) const EXTRA_REF_NEW: [bool; 11] = [
301398 crate::encode::EXTRA_REF_NEW_MV,
302399 true,
303400 true,
304401 true,
305- false,
306- false,
307- false,
402+ true,
403+ true,
404+ true,
308405 false,
309406 false,
310407 false,