diff --git a/crates/ec-av1/src/encode.rs b/crates/ec-av1/src/encode.rs index 697d9b0b..994dbf34 100644 --- a/crates/ec-av1/src/encode.rs +++ b/crates/ec-av1/src/encode.rs @@ -14348,6 +14348,7 @@ mod tests { /// EC_AV1_PAL_MAXCOLORS=256 ... same command # palette bound /// EC_AV1_TILES=1:1 EC_AV1_TILE_THREADS=4 ... # 2x2 tiles /// EC_AV1_PYRAMID=0 ... same command # no coding pyramid + /// EC_AV1_GOP_LAYOUT=fixed ... same command # no tail absorbing /// EC_AV1_GATE_FACADE=1 ... same command # the facade arm /// /// The coding pyramid is the DEFAULT of the sequence path this arm codes diff --git a/crates/ec-av1/src/encoder.rs b/crates/ec-av1/src/encoder.rs index 128f5ad3..2e908004 100644 --- a/crates/ec-av1/src/encoder.rs +++ b/crates/ec-av1/src/encoder.rs @@ -368,7 +368,10 @@ pub struct Packet { pub struct Pyramid { /// Pictures per mini-GOP: the hidden frame is `mini_gop` pictures ahead /// of the group's anchor, and `mini_gop - 1` leaves sit between them. - /// `1` would leave no leaf at all and is refused. + /// `1` would leave no leaf at all and is refused. It is the group size a + /// long run takes; the last group of a run is up to 1.5x it, since + /// [`group_target`] absorbs a tail shorter than half a group rather than + /// leaving one behind. pub mini_gop: usize, /// Added to `base_q_idx` for the hidden `ALTREF_FRAME` — negative, since /// every leaf of the group predicts off it. @@ -378,6 +381,39 @@ pub struct Pyramid { pub leaf_q_offset: i16, } +/// How many pictures the mini-GOP now being collected takes, given how many +/// are left in this run (the pictures before the next key frame) and the +/// [`Pyramid::mini_gop`] shape. +/// +/// A fixed `mini_gop` leaves a SHORT TAIL group whenever the run is not a +/// multiple of it: a 12-picture GOP under `mini_gop` 8 codes 8 + 3, and that +/// 3-picture tail is the expensive part -- the 12-frame gate preferred one +/// group of 11 by 7.0 / 20.5 BD points while the 48-frame gate picked 8 +/// (lane-pyr4). The rule here ABSORBS a tail shorter than half a group into +/// the group before it, so a run takes groups of `mini_gop` until at most +/// 1.5 x `mini_gop` is left and then one final group of all of it: +/// remaining 11 under 8 -> 11 (was 8 + 3) +/// remaining 47 under 8 -> 8, 8, 8, 8, 8, 7 -- what the fixed rule already +/// coded, so a long GOP is byte-identical +/// (`the_mini_gop_layout_leaves_no_short_tail`; sweep `lanes/gopad.sweep.txt`). +/// +/// `EC_AV1_GOP_LAYOUT=fixed` restores the old fixed-size rule for an A/B. +fn group_target(remaining: usize, mini_gop: usize, absorb_tail: bool) -> usize { + match absorb_tail && remaining <= mini_gop + mini_gop / 2 { + true => remaining.max(1), + false => mini_gop, + } +} + +/// Whether this run absorbs a short tail group (the default) or cuts every +/// mini-GOP at `mini_gop`: `EC_AV1_GOP_LAYOUT=fixed`, read once. +fn absorb_tail() -> bool { + static ABSORB: std::sync::LazyLock = std::sync::LazyLock::new(|| { + std::env::var("EC_AV1_GOP_LAYOUT").ok().as_deref() != Some("fixed") + }); + *ABSORB +} + impl Pyramid { /// The pyramid a run asks for through the environment: /// `EC_AV1_PYRAMID=[::]`, with @@ -620,13 +656,16 @@ impl Default for Pyramid { /// (film A wants `20`, film B wants `12`, within 1.1 and 4.9 points) so /// `16` stays, being the only value down on all four columns. /// - /// THE PRICE, stated: on the SHORT-GOP gate above (12 frames, `gop = - /// 12`, where a mini-GOP of 8 splits into 8 + 4 while 16 is one group) - /// `8:-32:16` reads film A +51.2 / +21.4 and film B +91.0 / +53.5 - /// against `16:-24:16`'s +44.2 / +15.7 and +70.5 / +35.2. The two gates - /// disagree because the best shape depends on the GOP length, and the - /// long one is what the editor exports; a GOP-length-adaptive `mini_gop` - /// is the standing follow-up, not measured here. + /// THE PRICE THAT WAS, and how it was paid (lane-gopad): on the + /// SHORT-GOP gate (12 frames, `gop = 12`) a fixed mini-GOP of 8 split the + /// run into 8 + 3 and read film A +51.2 / +21.4, film B +91.0 / +53.5, + /// against `16:-24:16`'s +44.2 / +15.7 and +70.5 / +35.2 -- the tail + /// group, not the shape, was the cost. [`group_target`] now absorbs a + /// short tail, so the same 12 pictures code as ONE group of 11 and read + /// film A +43.9 / +15.6 and film B +68.4 / +38.2 (three of the four + /// columns better than `16:-24:16` ever was, film B vs rav1e 3.0 short), + /// while 47 inter pictures still take 8 x 5 + 7 -- the long-GOP table + /// above is coded byte for byte as it was measured. fn default() -> Self { Self { mini_gop: 8, @@ -992,10 +1031,16 @@ impl Av1Encoder { return Ok(packets); } self.pending.push((order, picture.clone())); - // The group closes on its own size, or early when the next picture - // would be a key frame. + // The group closes on the size the LAYOUT gives it (which depends on + // how many pictures are left before the next key frame, so no short + // tail group is left behind), or early when the next picture would be + // a key frame. + let run_start = self.pending[0].0; + let remaining = self.config.gop - (run_start % self.config.gop as u64) as usize; let next_is_key = (order + 1).is_multiple_of(self.config.gop as u64); - if self.pending.len() >= pyramid.mini_gop || next_is_key { + if self.pending.len() >= group_target(remaining, pyramid.mini_gop, absorb_tail()) + || next_is_key + { return self.drain_pending(); } Ok(Vec::new()) @@ -1453,6 +1498,45 @@ mod tests { packets } + /// The mini-GOP layout leaves no short tail group, and leaves the long + /// GOP the fixed rule already coded alone: 47 inter pictures are + /// 8 x 5 + 7 under both rules (so a 48-picture GOP is byte-identical), + /// while a 12-picture GOP stops being 8 + 3 (lane-gopad). + #[test] + fn the_mini_gop_layout_leaves_no_short_tail() { + let groups = |remaining: usize, mini_gop: usize, absorb: bool| { + let (mut left, mut out) = (remaining, Vec::new()); + while left > 0 { + let g = group_target(left, mini_gop, absorb).min(left); + assert!(g > 0); + out.push(g); + left -= g; + } + out + }; + // gop 48: what mini_gop 8 already coded, under either rule. + assert_eq!(groups(47, 8, true), vec![8, 8, 8, 8, 8, 7]); + assert_eq!(groups(47, 8, false), vec![8, 8, 8, 8, 8, 7]); + // gop 12: 8 + 3 becomes one group of 11. + assert_eq!(groups(11, 8, false), vec![8, 3]); + assert_eq!(groups(11, 8, true), vec![11]); + // A run shorter than a group is one group, as before (the 4-picture + // pin clip). + assert_eq!(groups(3, 8, true), vec![3]); + // No group is ever below half the shape, and none is over 1.5x it. + for mini_gop in 2..=16 { + for remaining in 1..=64 { + for g in groups(remaining, mini_gop, true) { + assert!(g * 2 <= 3 * mini_gop, "{remaining}/{mini_gop}: long {g}"); + assert!( + g * 2 >= mini_gop || remaining < mini_gop, + "{remaining}/{mini_gop}: short tail {g}" + ); + } + } + } + } + /// Every OBU stream this test writes to `ffmpeg`/`ffprobe`, concatenated /// in order. fn concat(packets: &[Packet]) -> Vec { diff --git a/lanes/gopad.sweep.txt b/lanes/gopad.sweep.txt new file mode 100644 index 00000000..ca50c3b7 --- /dev/null +++ b/lanes/gopad.sweep.txt @@ -0,0 +1,84 @@ +lane-gopad -- a GOP-LENGTH-AWARE mini-GOP layout +================================================ + +Why. `Pyramid::default` is 8:-32:16, decided on the 48-frame gate +(`encode::tests::bd_rate_film_long_gop`, lanes/pyr4.sweep.txt). The 12-frame +gate `bd_rate_screen_native` preferred 16:-24:16 there, and lane-pyr4 wrote +the price down: at gop 12 a FIXED mini-GOP of 8 splits 11 inter pictures into +8 + 3, and the 3-picture tail group is the expensive part. The shape was +never the disagreement -- the tail was. + +The change (crates/ec-av1/src/encoder.rs). `Av1Encoder::encode_frames` no +longer closes a group at `pyramid.mini_gop` flat; it asks `group_target()` +how big the group being collected should be, given the pictures left before +the next key frame (`config.gop - run_start % config.gop`, known to both +entry points: `encode_sequence` sets gop = pictures.len(), the facade has it +in its config). The rule shipped is ABSORB TAIL: while more than 1.5 x +mini_gop is left, take mini_gop; otherwise take all of it. + remaining 11, mini_gop 8 -> 11 (was 8 + 3) + remaining 47, mini_gop 8 -> 8,8,8,8,8,7 (unchanged -> byte-identical) + remaining 3, mini_gop 8 -> 3 (the 4-picture pin clip, unchanged) +`EC_AV1_GOP_LAYOUT=fixed` restores the old rule for an A/B. + +SHORT-GOP TABLE (`bd_rate_screen_native`, 12 frames, gop 12, EC_AV1_NATIVE_FILM=1 +EC_AV1_NATIVE_FILM4K=1, pyramid 8:-32:16 on every row; BD-rate %, lower better). +Rows keyed by each log's own "pyramid requested/effective" print. + +| layout | film A vs libaom / rav1e | film B vs libaom / rav1e | bars 1080p | bars 2160p | +|---|---|---|---|---| +| fixed 8 + 3 (shipped, lanes/pyr4) | +51.2 / +21.4 | +91.0 / +53.5 | +4.8 / -11.5 | +20.5 / -3.4 | +| balanced 6 + 5 (lanes/gopad/s12-balanced.log) | +48.4 / +18.5 | +82.0 / +46.0 | +3.6 / -12.5 | +14.2 / -8.7 | +| absorb -> 11 ** SHIPS ** (lanes/gopad/s12-absorb.log) | +43.9 / +15.6 | +68.4 / +38.2 | +2.0 / -14.0 | +13.5 / -9.6 | +| (reference) fixed with mini_gop 16, arf -24, lanes/pyr3 | +44.2 / +15.7 | +70.5 / +35.2 | -- | -- | + +Both films improve on both columns against the shipped fixed layout, by +7.3 / 5.8 (film A) and 22.6 / 15.3 (film B); the two bars rows improve too. +Against the 16:-24:16 shape the 12-frame gate used to prefer, absorb at +8:-32:16 is better on three columns (+43.9 vs +44.2, +15.6 vs +15.7, +68.4 vs ++70.5) and 3.0 short on one (film B vs rav1e +38.2 vs +35.2). The balanced +split (equal groups <= mini_gop) is measurably WORSE than absorbing on every +row: at gop 12 the longer single group wins, so 6 + 5 was dropped. + +CANDIDATE (c), per-group ARF offset scaled by log2(group_len)/log2(mini_gop): +NOT BUILT. Its purpose was to give the longer (absorbed) group the -24 the +12-frame gate liked, and the measurement above says the opposite -- the group +of 11 at arf -32 already beats the recorded -24 arm on three of four columns, +so the scaling would move away from the optimum. Skipped, with the numbers. + +LONG-GOP TABLE (`bd_rate_film_long_gop`, 48 frames, gop 48, 8:-32:16). + +| layout | film A vs libaom / rav1e | film B vs libaom / rav1e | +|---|---|---| +| fixed, as recorded on the pyr4 BRANCH | +55.7 / +13.5 | +165.1 / +56.6 | +| fixed, control on THIS head (lanes/gopad/s48-fixed.log) | +55.2 / +12.8 | +151.3 / +47.4 | +| absorb ** SHIPS ** (lanes/gopad/s48-absorb.log) | +55.2 / +12.8 | +151.3 / +47.4 | + +The control arm is the row that matters: main has moved since lane-pyr4 +measured (filter intra among others), so the pyr4 row is not this head's +baseline -- film B is 13.8 / 9.2 better here for reasons that predate this +lane. Against the control, absorb is IDENTICAL: every one of the eight ladder +points matches byte for byte (film A 195531 / 356977 / 619801 / 1331401 B, +film B 76541 / 171950 / 393470 / 1006532 B) at the same PSNR, so the 48-frame +gate does not move by 0.0 on any of the four columns, not merely by <= 0.3. + +47 inter pictures take 8,8,8,8,8,7 under BOTH rules -- a group's boundaries +are all `drain_pending` consumes, so the 48-frame stream is byte-identical +and the confirmation arm reproduces the recorded numbers rather than +approaching them. Pinned by `encoder::tests::the_mini_gop_layout_leaves_no +_short_tail`, which walks both rules over mini_gop 2..=16 x remaining 1..=64. + +VERIFICATION + pins UNCHANGED (8446 / 28548): a 4-picture clip is a 3-picture run, one + group under both rules -- encode::tests::the_encoders_own_streams_are + _byte_identical_to_their_pins ok + encoder::tests::the_facade_codes_the_same_bytes_as_encode_sequence ok + encoder:: --include-ignored --test-threads 1: 29 passed / 0 failed + (includes bitrate_target_lands_within_10_percent_over_48_frames, whose + rate loop now sees a last group of up to 1.5 x mini_gop) + tile_bytes_do_not_depend_on_the_thread_count (--include-ignored) ok + EC_COMP_MISMATCH=1 over the whole lib suite: 546 passed / 0 failed / + 43 ignored, 0 mismatch lines (lanes/gopad/suite.log) + cargo check --workspace --all-targets -j4: 0 errors, 0 ec-av1 warnings + (the 25 warning lines are pre-existing ec-opus / ec-vorbis) + Logs: lanes/gopad/{s12-balanced,s12-absorb,s48-absorb,s48-fixed,suite, + encoder-tests}.log diff --git a/lanes/gopad/encoder-tests.log b/lanes/gopad/encoder-tests.log new file mode 100644 index 00000000..32d1b472 --- /dev/null +++ b/lanes/gopad/encoder-tests.log @@ -0,0 +1,42 @@ + +running 29 tests +test encoder::tests::a_1080p_multi_tile_stream_decodes_sample_exact_through_both_decoders ... ok +test encoder::tests::a_pyramid_stream_decodes_in_display_order_through_both_decoders ... ok +test encoder::tests::a_static_clip_codes_64x64_roots_and_decodes_sample_exact ... ok +test encoder::tests::bitrate_target_lands_within_10_percent_over_48_frames ... ok +test encoder::tests::bt601_limited_colour_is_reported_by_ffprobe ... ok +test encoder::tests::bt709_limited_colour_is_reported_by_ffprobe ... ok +test encoder::tests::bytes_per_frame_controller_never_oscillates_past_its_clamp ... ok +test encoder::tests::bytes_per_frame_target_settles_within_20_percent ... ok +test encoder::tests::every_speed_preset_decodes_sample_exact_through_both_decoders ... ok +test encoder::tests::every_tile_layout_decodes_sample_exact_through_both_decoders ... ok +test encoder::tests::filter_replay_codes_the_same_stream_as_a_full_decode ... ok +test encoder::tests::filter_replay_final_matches_the_capture_decode ... ok +test encoder::tests::filter_stage_bytes_do_not_depend_on_the_thread_count ... ok +test encoder::tests::filter_stage_wall_1080p ... ok +test encoder::tests::filter_stage_wall_4k ... ok +test encoder::tests::filter_stage_wall_film ... ok +test encoder::tests::geometry_mismatch_is_refused ... ok +test encoder::tests::gop_cadence_is_honored ... ok +test encoder::tests::one_in_one_out_delayed_by_the_lookahead_depth ... ok +test encoder::tests::quality_target_is_monotone_in_bytes_and_psnr ... ok +test encoder::tests::the_content_gate_keeps_screen_streams_flat ... ok +test encoder::tests::the_facade_codes_the_same_bytes_as_encode_sequence ... ok +test encoder::tests::the_mini_gop_layout_leaves_no_short_tail ... ok +test encoder::tests::thirty_pictures_at_gop_fifteen_decode_to_two_key_frames ... ok +test encoder::tests::tile_bytes_do_not_depend_on_the_thread_count ... ok +test encoder::tests::tile_search_wall_1080p ... ok +test encoder::tests::tile_search_wall_4k ... ok +test encoder::tests::tile_wall_table_at_1080p ... ok +test encoder::tests::zero_gop_is_refused ... ok + +test result: ok. 29 passed; 0 failed; 0 ignored; 0 measured; 560 filtered out; finished in 672.16s + + +running 2 tests +test encode::tests::the_encoders_own_streams_are_byte_identical_to_their_pins ... ok +test encoder::tests::tile_bytes_do_not_depend_on_the_thread_count ... ok + +test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 587 filtered out; finished in 3.15s + +RC=0 diff --git a/lanes/gopad/s12-absorb.log b/lanes/gopad/s12-absorb.log new file mode 100644 index 00000000..e8d3ea3e --- /dev/null +++ b/lanes/gopad/s12-absorb.log @@ -0,0 +1,39 @@ + +running 1 test +test encode::tests::bd_rate_screen_native ... +native crop, 12 frames, gop=12; tiles (0, 0), tile threads 1, intrabc false, palette maxcolors 128 +| clip | ours PSNR/bytes per point | BD-rate vs libaom | BD-rate vs rav1e | wall ours:libaom:rav1e (noisy) | +|---|---|---|---|---| +bars 1080p: sequence, pyramid requested Some(Pyramid { mini_gop: 8, arf_q_offset: -32, leaf_q_offset: 16 }) effective Some(Pyramid { mini_gop: 8, arf_q_offset: -32, leaf_q_offset: 16 }) +bars 1080p: pricer armings default=17 real=175 +bars 1080p: motion_mode 32x32 SIMPLE=42571 OBMC=0 WARP=346 | 16x16 SIMPLE=4026 OBMC=0 WARP=294 | 8x8 SIMPLE=12994 OBMC=0 WARP=1940 (0.0% OBMC / 4.1% WARP of 62171 eligible) +bars 1080p: inter var-tx depths of 11784 blocks -- leaf single 0=2245 1=900 (28.6% split) | leaf compound 0=984 1=498 (33.6% split) | 32x32 single 0=874 1=1847 (67.9% split) | 32x32 compound 0=2336 1=2100 (47.3% split) +bars 1080p: screen frames on=0 off=4 (0.0% on); palette blocks luma 0 chroma 0; intrabc blocks 0 (searched 0 / valid 0 / won 0) +bars 1080p: filter intra on=true blocks 26588 (modes DC=5735 V=2857 H=5618 D157=8546 PAETH=3832) +| bars 1080p 1920x1024 | 43.17 dB/192863 B, 46.83 dB/291450 B, 50.13 dB/403655 B, 53.14 dB/531399 B | +2.0% | -14.0% | 34.0s:9.5s:17.6s | +bars 2160p: sequence, pyramid requested Some(Pyramid { mini_gop: 8, arf_q_offset: -32, leaf_q_offset: 16 }) effective Some(Pyramid { mini_gop: 8, arf_q_offset: -32, leaf_q_offset: 16 }) +bars 2160p: pricer armings default=15 real=154 +bars 2160p: motion_mode 32x32 SIMPLE=30865 OBMC=0 WARP=170 | 16x16 SIMPLE=2415 OBMC=0 WARP=291 | 8x8 SIMPLE=5108 OBMC=0 WARP=178 (0.0% OBMC / 1.6% WARP of 39027 eligible) +bars 2160p: inter var-tx depths of 9263 blocks -- leaf single 0=1338 1=395 (22.8% split) | leaf compound 0=1107 1=214 (16.2% split) | 32x32 single 0=420 1=1231 (74.6% split) | 32x32 compound 0=141 1=4417 (96.9% split) +bars 2160p: screen frames on=0 off=4 (0.0% on); palette blocks luma 0 chroma 0; intrabc blocks 0 (searched 0 / valid 0 / won 0) +bars 2160p: filter intra on=true blocks 9833 (modes DC=2310 V=581 H=2183 D157=3547 PAETH=1212) +| bars 2160p 1920x1024 | 42.74 dB/206163 B, 46.77 dB/316440 B, 50.31 dB/423772 B, 53.39 dB/534607 B | +13.5% | -9.6% | 34.4s:7.2s:18.8s | +film A (1080p source): sequence, pyramid requested Some(Pyramid { mini_gop: 8, arf_q_offset: -32, leaf_q_offset: 16 }) effective Some(Pyramid { mini_gop: 8, arf_q_offset: -32, leaf_q_offset: 16 }) +film A (1080p source): pricer armings default=20 real=214 +film A (1080p source): motion_mode 32x32 SIMPLE=45674 OBMC=0 WARP=1455 | 16x16 SIMPLE=20981 OBMC=0 WARP=1681 | 8x8 SIMPLE=4346 OBMC=0 WARP=968 (0.0% OBMC / 5.5% WARP of 75105 eligible) +film A (1080p source): inter var-tx depths of 89726 blocks -- leaf single 0=16547 1=2873 (14.8% split) | leaf compound 0=32672 1=6807 (17.2% split) | 32x32 single 0=8182 1=6135 (42.9% split) | 32x32 compound 0=10307 1=6203 (37.6% split) +film A (1080p source): screen frames on=0 off=4 (0.0% on); palette blocks luma 0 chroma 0; intrabc blocks 0 (searched 0 / valid 0 / won 0) +film A (1080p source): filter intra on=true blocks 26297 (modes DC=6681 V=3416 H=4774 D157=7937 PAETH=3489) +| film A (1080p source) 1920x768 | 43.06 dB/62730 B, 45.17 dB/106661 B, 46.58 dB/177362 B, 47.74 dB/328095 B | +43.9% | +15.6% | 69.5s:11.5s:15.2s | +film B (2160p HDR source): sequence, pyramid requested Some(Pyramid { mini_gop: 8, arf_q_offset: -32, leaf_q_offset: 16 }) effective Some(Pyramid { mini_gop: 8, arf_q_offset: -32, leaf_q_offset: 16 }) +film B (2160p HDR source): pricer armings default=17 real=185 +film B (2160p HDR source): motion_mode 32x32 SIMPLE=50211 OBMC=0 WARP=1035 | 16x16 SIMPLE=13582 OBMC=0 WARP=867 | 8x8 SIMPLE=1692 OBMC=0 WARP=441 (0.0% OBMC / 3.5% WARP of 67828 eligible) +film B (2160p HDR source): inter var-tx depths of 78648 blocks -- leaf single 0=15248 1=2707 (15.1% split) | leaf compound 0=26845 1=4675 (14.8% split) | 32x32 single 0=8989 1=7481 (45.4% split) | 32x32 compound 0=7489 1=5214 (41.0% split) +film B (2160p HDR source): screen frames on=0 off=4 (0.0% on); palette blocks luma 0 chroma 0; intrabc blocks 0 (searched 0 / valid 0 / won 0) +film B (2160p HDR source): filter intra on=true blocks 17758 (modes DC=4929 V=2210 H=2503 D157=6222 PAETH=1894) +| film B (2160p HDR source) 1920x1024 | 45.60 dB/25807 B, 47.49 dB/52702 B, 48.72 dB/112338 B, 49.74 dB/251263 B | +68.4% | +38.2% | 73.1s:20.8s:17.6s | +ok + +test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 588 filtered out; finished in 343.05s + +RC=0 diff --git a/lanes/gopad/s12-balanced.log b/lanes/gopad/s12-balanced.log new file mode 100644 index 00000000..5edf5519 --- /dev/null +++ b/lanes/gopad/s12-balanced.log @@ -0,0 +1,39 @@ + +running 1 test +test encode::tests::bd_rate_screen_native ... +native crop, 12 frames, gop=12; tiles (0, 0), tile threads 1, intrabc false, palette maxcolors 128 +| clip | ours PSNR/bytes per point | BD-rate vs libaom | BD-rate vs rav1e | wall ours:libaom:rav1e (noisy) | +|---|---|---|---|---| +bars 1080p: sequence, pyramid requested Some(Pyramid { mini_gop: 8, arf_q_offset: -32, leaf_q_offset: 16 }) effective Some(Pyramid { mini_gop: 8, arf_q_offset: -32, leaf_q_offset: 16 }) +bars 1080p: pricer armings default=17 real=173 +bars 1080p: motion_mode 32x32 SIMPLE=41023 OBMC=0 WARP=182 | 16x16 SIMPLE=3508 OBMC=0 WARP=188 | 8x8 SIMPLE=13068 OBMC=0 WARP=1206 (0.0% OBMC / 2.7% WARP of 59175 eligible) +bars 1080p: inter var-tx depths of 11001 blocks -- leaf single 0=1513 1=650 (30.1% split) | leaf compound 0=1106 1=654 (37.2% split) | 32x32 single 0=791 1=1763 (69.0% split) | 32x32 compound 0=2314 1=2210 (48.9% split) +bars 1080p: screen frames on=0 off=4 (0.0% on); palette blocks luma 0 chroma 0; intrabc blocks 0 (searched 0 / valid 0 / won 0) +bars 1080p: filter intra on=true blocks 26668 (modes DC=5930 V=2801 H=5285 D157=8810 PAETH=3842) +| bars 1080p 1920x1024 | 43.69 dB/210930 B, 47.28 dB/311977 B, 50.52 dB/426848 B, 53.69 dB/564682 B | +3.6% | -12.5% | 33.8s:9.2s:17.7s | +bars 2160p: sequence, pyramid requested Some(Pyramid { mini_gop: 8, arf_q_offset: -32, leaf_q_offset: 16 }) effective Some(Pyramid { mini_gop: 8, arf_q_offset: -32, leaf_q_offset: 16 }) +bars 2160p: pricer armings default=15 real=154 +bars 2160p: motion_mode 32x32 SIMPLE=31185 OBMC=0 WARP=106 | 16x16 SIMPLE=2086 OBMC=0 WARP=213 | 8x8 SIMPLE=5386 OBMC=0 WARP=212 (0.0% OBMC / 1.4% WARP of 39188 eligible) +bars 2160p: inter var-tx depths of 9076 blocks -- leaf single 0=1122 1=355 (24.0% split) | leaf compound 0=1077 1=208 (16.2% split) | 32x32 single 0=446 1=1310 (74.6% split) | 32x32 compound 0=142 1=4416 (96.9% split) +bars 2160p: screen frames on=0 off=4 (0.0% on); palette blocks luma 0 chroma 0; intrabc blocks 0 (searched 0 / valid 0 / won 0) +bars 2160p: filter intra on=true blocks 10592 (modes DC=2384 V=659 H=2320 D157=3902 PAETH=1327) +| bars 2160p 1920x1024 | 43.29 dB/223154 B, 47.24 dB/334819 B, 50.70 dB/442271 B, 53.94 dB/561745 B | +14.2% | -8.7% | 33.8s:7.2s:18.6s | +film A (1080p source): sequence, pyramid requested Some(Pyramid { mini_gop: 8, arf_q_offset: -32, leaf_q_offset: 16 }) effective Some(Pyramid { mini_gop: 8, arf_q_offset: -32, leaf_q_offset: 16 }) +film A (1080p source): pricer armings default=20 real=212 +film A (1080p source): motion_mode 32x32 SIMPLE=40679 OBMC=0 WARP=1355 | 16x16 SIMPLE=20063 OBMC=0 WARP=1869 | 8x8 SIMPLE=5411 OBMC=0 WARP=1263 (0.0% OBMC / 6.4% WARP of 70640 eligible) +film A (1080p source): inter var-tx depths of 87964 blocks -- leaf single 0=15678 1=2789 (15.1% split) | leaf compound 0=32866 1=6641 (16.8% split) | 32x32 single 0=7679 1=5321 (40.9% split) | 32x32 compound 0=10234 1=6756 (39.8% split) +film A (1080p source): screen frames on=0 off=4 (0.0% on); palette blocks luma 0 chroma 0; intrabc blocks 0 (searched 0 / valid 0 / won 0) +film A (1080p source): filter intra on=true blocks 33181 (modes DC=8294 V=4745 H=5828 D157=9682 PAETH=4632) +| film A (1080p source) 1920x768 | 43.49 dB/70635 B, 45.47 dB/121308 B, 46.80 dB/202538 B, 48.00 dB/420365 B | +48.4% | +18.5% | 69.1s:11.2s:14.5s | +film B (2160p HDR source): sequence, pyramid requested Some(Pyramid { mini_gop: 8, arf_q_offset: -32, leaf_q_offset: 16 }) effective Some(Pyramid { mini_gop: 8, arf_q_offset: -32, leaf_q_offset: 16 }) +film B (2160p HDR source): pricer armings default=17 real=189 +film B (2160p HDR source): motion_mode 32x32 SIMPLE=49192 OBMC=0 WARP=1217 | 16x16 SIMPLE=14299 OBMC=0 WARP=993 | 8x8 SIMPLE=2554 OBMC=0 WARP=564 (0.0% OBMC / 4.0% WARP of 68819 eligible) +film B (2160p HDR source): inter var-tx depths of 78962 blocks -- leaf single 0=15858 1=2849 (15.2% split) | leaf compound 0=26409 1=4745 (15.2% split) | 32x32 single 0=8645 1=7202 (45.4% split) | 32x32 compound 0=7799 1=5455 (41.2% split) +film B (2160p HDR source): screen frames on=0 off=4 (0.0% on); palette blocks luma 0 chroma 0; intrabc blocks 0 (searched 0 / valid 0 / won 0) +film B (2160p HDR source): filter intra on=true blocks 24074 (modes DC=6172 V=3353 H=3522 D157=8455 PAETH=2572) +| film B (2160p HDR source) 1920x1024 | 46.05 dB/30689 B, 47.68 dB/64682 B, 48.87 dB/138697 B, 49.93 dB/318772 B | +82.0% | +46.0% | 77.2s:20.7s:17.3s | +ok + +test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 588 filtered out; finished in 344.16s + +RC=0 diff --git a/lanes/gopad/s48-absorb.log b/lanes/gopad/s48-absorb.log new file mode 100644 index 00000000..0defa472 --- /dev/null +++ b/lanes/gopad/s48-absorb.log @@ -0,0 +1,25 @@ + +running 1 test +test encode::tests::bd_rate_film_long_gop ... +native crop, 48 frames, gop=48; tiles (0, 0), tile threads 1, intrabc false, palette maxcolors 128 +| clip | ours PSNR/bytes per point | BD-rate vs libaom | BD-rate vs rav1e | wall ours:libaom:rav1e (noisy) | +|---|---|---|---|---| +film A (1080p source): sequence, pyramid requested Some(Pyramid { mini_gop: 8, arf_q_offset: -32, leaf_q_offset: 16 }) effective Some(Pyramid { mini_gop: 8, arf_q_offset: -32, leaf_q_offset: 16 }) +film A (1080p source): pricer armings default=20 real=902 +film A (1080p source): motion_mode 32x32 SIMPLE=185695 OBMC=0 WARP=9574 | 16x16 SIMPLE=103597 OBMC=0 WARP=14650 | 8x8 SIMPLE=25938 OBMC=0 WARP=4652 (0.0% OBMC / 8.4% WARP of 344106 eligible) +film A (1080p source): inter var-tx depths of 355412 blocks -- leaf single 0=74879 1=15303 (17.0% split) | leaf compound 0=117796 1=24157 (17.0% split) | 32x32 single 0=32956 1=25513 (43.6% split) | 32x32 compound 0=38871 1=25937 (40.0% split) +film A (1080p source): screen frames on=0 off=4 (0.0% on); palette blocks luma 0 chroma 0; intrabc blocks 0 (searched 0 / valid 0 / won 0) +film A (1080p source): filter intra on=true blocks 114341 (modes DC=27493 V=15938 H=22401 D157=32033 PAETH=16476) +| film A (1080p source) 1920x768 | 43.63 dB/195531 B, 45.54 dB/356977 B, 46.80 dB/619801 B, 47.94 dB/1331401 B | +55.2% | +12.8% | 266.8s:33.0s:53.4s | +film B (2160p HDR source): sequence, pyramid requested Some(Pyramid { mini_gop: 8, arf_q_offset: -32, leaf_q_offset: 16 }) effective Some(Pyramid { mini_gop: 8, arf_q_offset: -32, leaf_q_offset: 16 }) +film B (2160p HDR source): pricer armings default=17 real=799 +film B (2160p HDR source): motion_mode 32x32 SIMPLE=211469 OBMC=0 WARP=6377 | 16x16 SIMPLE=71374 OBMC=0 WARP=6009 | 8x8 SIMPLE=13929 OBMC=0 WARP=1672 (0.0% OBMC / 4.5% WARP of 310830 eligible) +film B (2160p HDR source): inter var-tx depths of 302583 blocks -- leaf single 0=65620 1=15157 (18.8% split) | leaf compound 0=87859 1=17247 (16.4% split) | 32x32 single 0=33387 1=32493 (49.3% split) | 32x32 compound 0=27556 1=23264 (45.8% split) +film B (2160p HDR source): screen frames on=0 off=4 (0.0% on); palette blocks luma 0 chroma 0; intrabc blocks 0 (searched 0 / valid 0 / won 0) +film B (2160p HDR source): filter intra on=true blocks 66685 (modes DC=17151 V=9527 H=9562 D157=23412 PAETH=7033) +| film B (2160p HDR source) 1920x1024 | 46.16 dB/76541 B, 47.65 dB/171950 B, 48.72 dB/393470 B, 49.76 dB/1006532 B | +151.3% | +47.4% | 241.3s:70.2s:52.6s | +ok + +test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 588 filtered out; finished in 731.74s + +RC=0 diff --git a/lanes/gopad/s48-fixed.log b/lanes/gopad/s48-fixed.log new file mode 100644 index 00000000..288f3653 --- /dev/null +++ b/lanes/gopad/s48-fixed.log @@ -0,0 +1,26 @@ + +running 1 test +test encode::tests::bd_rate_film_long_gop ... +native crop, 48 frames, gop=48; tiles (0, 0), tile threads 1, intrabc false, palette maxcolors 128 +| clip | ours PSNR/bytes per point | BD-rate vs libaom | BD-rate vs rav1e | wall ours:libaom:rav1e (noisy) | +|---|---|---|---|---| +film A (1080p source): sequence, pyramid requested Some(Pyramid { mini_gop: 8, arf_q_offset: -32, leaf_q_offset: 16 }) effective Some(Pyramid { mini_gop: 8, arf_q_offset: -32, leaf_q_offset: 16 }) +film A (1080p source): pricer armings default=20 real=902 +film A (1080p source): motion_mode 32x32 SIMPLE=185695 OBMC=0 WARP=9574 | 16x16 SIMPLE=103597 OBMC=0 WARP=14650 | 8x8 SIMPLE=25938 OBMC=0 WARP=4652 (0.0% OBMC / 8.4% WARP of 344106 eligible) +film A (1080p source): inter var-tx depths of 355412 blocks -- leaf single 0=74879 1=15303 (17.0% split) | leaf compound 0=117796 1=24157 (17.0% split) | 32x32 single 0=32956 1=25513 (43.6% split) | 32x32 compound 0=38871 1=25937 (40.0% split) +film A (1080p source): screen frames on=0 off=4 (0.0% on); palette blocks luma 0 chroma 0; intrabc blocks 0 (searched 0 / valid 0 / won 0) +film A (1080p source): filter intra on=true blocks 114341 (modes DC=27493 V=15938 H=22401 D157=32033 PAETH=16476) +| film A (1080p source) 1920x768 | 43.63 dB/195531 B, 45.54 dB/356977 B, 46.80 dB/619801 B, 47.94 dB/1331401 B | +55.2% | +12.8% | 296.1s:36.1s:61.8s | +film B (2160p HDR source): sequence, pyramid requested Some(Pyramid { mini_gop: 8, arf_q_offset: -32, leaf_q_offset: 16 }) effective Some(Pyramid { mini_gop: 8, arf_q_offset: -32, leaf_q_offset: 16 }) +film B (2160p HDR source): pricer armings default=17 real=799 +film B (2160p HDR source): motion_mode 32x32 SIMPLE=211469 OBMC=0 WARP=6377 | 16x16 SIMPLE=71374 OBMC=0 WARP=6009 | 8x8 SIMPLE=13929 OBMC=0 WARP=1672 (0.0% OBMC / 4.5% WARP of 310830 eligible) +film B (2160p HDR source): inter var-tx depths of 302583 blocks -- leaf single 0=65620 1=15157 (18.8% split) | leaf compound 0=87859 1=17247 (16.4% split) | 32x32 single 0=33387 1=32493 (49.3% split) | 32x32 compound 0=27556 1=23264 (45.8% split) +film B (2160p HDR source): screen frames on=0 off=4 (0.0% on); palette blocks luma 0 chroma 0; intrabc blocks 0 (searched 0 / valid 0 / won 0) +film B (2160p HDR source): filter intra on=true blocks 66685 (modes DC=17151 V=9527 H=9562 D157=23412 PAETH=7033) +| film B (2160p HDR source) 1920x1024 | 46.16 dB/76541 B, 47.65 dB/171950 B, 48.72 dB/393470 B, 49.76 dB/1006532 B | +151.3% | +47.4% | 249.8s:70.4s:51.2s | +ok + +test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 588 filtered out; finished in 781.74s + +RC=0 +RC=0