forge
Explore
Log in

Don't you dare go Hollow

The ARFMODE intra arm cuts the top ARF's whole-32 candidates too -- the probe falsified the leaf-only scope (film A arm 1 byte-identical to the control at q150 AND q90: the ARF's 15% intra area lives in search_inter_block's whole-32 intra loop, not in the leaves), so the scene-cut hatch as chartered was a hatch nothing else was using

Browse files at this commit

7ea51337a66ba545d25a2d0b8faeced518d87c0dAhmet Kaan GümüşParent: 5e19f1a
  • perf
    • the ARFMODE intra arm cuts the top ARF's whole-32 candidates too -- the probe falsified the leaf-only scope (film A arm 1 byte-identical to the control at q150 AND q90: the ARF's 15% intra area lives in search_inter_block's whole-32 intra loop, not in the leaves), so the scene-cut hatch as chartered was a hatch nothing else was using
    • per-block engagement counter moved to the whole-32 site, docs updated, witness and pins re-green
Show full message
perf(av1): the ARFMODE intra arm cuts the top ARF's whole-32 candidates too -- the probe falsified the leaf-only scope (film A arm 1 byte-identical to the control at q150 AND q90: the ARF's 15% intra area lives in search_inter_block's whole-32 intra loop, not in the leaves), so the scene-cut hatch as chartered was a hatch nothing else was using; per-block engagement counter moved to the whole-32 site, docs updated, witness and pins re-green
crates/ec-av1/src/encode.rsmodified+19 -6
@@ -7779,13 +7779,17 @@ struct Search<'a> {
7779 /// `intra_pruning_with_hog` -- never prunes it away). `None` runs every7779 /// `intra_pruning_with_hog` -- never prunes it away). `None` runs every
7780 /// mode through full RD, unchanged from before this lever.7780 /// mode through full RD, unchanged from before this lever.
7781 top_k: Option<usize>,7781 top_k: Option<usize>,
7782- /// lane-arfmode: the top ARF's leaf offer set ([`crate::speed::ARFMODE`])7782+ /// lane-arfmode: the top ARF's offer set ([`crate::speed::ARFMODE`])
7783- /// -- `false` cuts the named candidate group from the 16x16/8x8 LEAF7783+ /// -- `false` cuts the named candidate group from the whole-32 search
7784- /// search ([`code_square_inter`]) and the 8x8 split offer at the top ARF7784+ /// ([`search_inter_block`]), the 16x16/8x8 leaf search
7785+ /// ([`code_square_inter`]) and the 8x8 split offer, at the top ARF
7785 /// ([`DqLevel::TopArf`] frames only). `true` everywhere else, which is7786 /// ([`DqLevel::TopArf`] frames only). `true` everywhere else, which is
7786- /// the pre-lane behaviour: the key frame never reaches7787+ /// the pre-lane behaviour: the mid and quarter hidden frames, the shown
7787- /// [`code_square_inter`], the 32x32 whole keeps its full set, and the7788+ /// leaves and the flat path keep intra and compound, and the
7788 /// straddling-edge 8x8s are only mode-gated, never partition-gated.7789 /// straddling-edge 8x8s are only mode-gated, never partition-gated.
7790+ /// The probe's correction: with the leaf gate ALONE the film A stream
7791+ /// was byte-identical to the control -- the ARF's intra area lives at
7792+ /// the whole-32 level, so the intra arm must cut it there too.
7789 arf_leaf_intra: bool,7793 arf_leaf_intra: bool,
7790 arf_leaf8: bool,7794 arf_leaf8: bool,
7791 arf_leaf_compound: bool,7795 arf_leaf_compound: bool,
@@ -11018,7 +11022,13 @@ fn search_inter_block(
11018 _ => search.modes.to_vec(),11022 _ => search.modes.to_vec(),
11019 };11023 };
11020 census_add(5, 1);11024 census_add(5, 1);
11021- census_add(6, intra_modes.len());11025+ census_add(6, if search.arf_leaf_intra { intra_modes.len() } else { 0 });
11026+ // lane-arfmode: arm 1 drops the whole-32 block's intra candidates at the
11027+ // top ARF too -- the probe proved the ARF's intra AREA lives HERE, not at
11028+ // the leaves (film A arm 1 vs control byte-identical with the leaf gate
11029+ // alone), so "the 32x32 whole keeps intra as the scene-cut hatch" was a
11030+ // hatch nothing else was using. Counted once per block.
11031+ if search.arf_leaf_intra {
11022 for &mode in &intra_modes {11032 for &mode in &intra_modes {
11023 let luma_trial = luma.trial(11033 let luma_trial = luma.trial(
11024 At {11034 At {
@@ -11056,6 +11066,9 @@ fn search_inter_block(
11056 mode_bits: mode_bits[usize::from(mode)],11066 mode_bits: mode_bits[usize::from(mode)],
11057 });11067 });
11058 }11068 }
11069+ } else {
11070+ arfmode_hit(0);
11071+ }
11059 11072
11060 // The reference frame buffer a spec decoder holds is exactly the true11073 // The reference frame buffer a spec decoder holds is exactly the true
11061 // (unpadded) coded extent -- a superblock whose partition stops early at11074 // (unpadded) coded extent -- a superblock whose partition stops early at
crates/ec-av1/src/speed.rsmodified+9 -8
@@ -460,14 +460,15 @@ pub(crate) const ARF_TF_WIN: [usize; 11] = [3; 11];
460 /// so [`ARF_TF`] stays where lane-arftf put it.460 /// so [`ARF_TF`] stays where lane-arftf put it.
461 pub(crate) const ARF_TF_WIN_FUT: [usize; 11] = [3; 11];461 pub(crate) const ARF_TF_WIN_FUT: [usize; 11] = [3; 11];
462 462
463-/// lane-arfmode: the top ARF's LEAF offer set, as a bitmask -- `1` the 16x16463+/// lane-arfmode: the top ARF's offer set, as a bitmask -- `1` the group's
464-/// and 8x8 leaves of the group's own anchor ([`crate::encode::DqLevel::464+/// own anchor ([`crate::encode::DqLevel::TopArf`]) offers no INTRA
465-/// TopArf`]) offer no INTRA candidate, `2` a 16x16 leaf under it is not465+/// candidate at any block size (the whole-32 search and the 16x16/8x8
466-/// offered the 8x8 split, `4` the leaves offer no compound candidates;466+/// leaves), `2` a 16x16 leaf under it is not offered the 8x8 split, `4` the
467-/// combinations OR, `0` (the default) is bit-exact with the pre-lane467+/// leaves offer no compound candidates; combinations OR, `0` (the default)
468-/// encoder. `EC_AV1_ARFMODE=<n>` overrides it. The 32x32 whole keeps its468+/// is bit-exact with the pre-lane encoder. `EC_AV1_ARFMODE=<n>` overrides
469-/// full offer set (the scene-cut hatch), and the spec-forced 8x8s at469+/// it. The spec-forced 8x8s at straddling edges are untouched -- only
470-/// straddling edges are untouched -- only RD-optional offers are cut.470+/// RD-optional offers are cut; the mid and quarter hidden frames and every
471+/// shown leaf keep the full set.
471 ///472 ///
472 /// The census it answers to (lanes/arfmode.charter.md, at 0d81d6c5): the top473 /// The census it answers to (lanes/arfmode.charter.md, at 0d81d6c5): the top
473 /// ARF's syntax gap against rav1e's own ARF at the same position is474 /// ARF's syntax gap against rav1e's own ARF at the same position is