forge
Explore
Log in

Don't you dare go Hollow

The ARF temporal filter's strength swept on the deciding gate ships at 2

Browse files at this commit

0717f8375d909d0c9fcbe0d143e4bfa1214b782fAhmet Kaan GümüşParent: ea60760
  • feat
    • the ARF temporal filter's strength swept on the deciding gate ships at 2
Show full message
feat(av1): the ARF temporal filter's strength swept on the deciding gate ships at 2

Long-GOP gate (48 pictures, BD vs libaom cpu-6 / rav1e s6): strength 1
+22.6/-8.1 and +81.6/+4.8, 2 +22.2/-8.2 and +78.6/+2.7, 3 (was)
+22.7/-7.9 and +79.0/+2.7, 5 +23.9/-7.4 and +83.6/+5.1. Single-peaked,
bracketed, down on all four columns against the shipped 3. Guard rows
(12 pictures) move at most +0.2/+0.1 and the screen row is
byte-identical. Byte pins re-taken: 8218 -> 8307 at q=150, 33017 bytes
with a different hash at q=60.
crates/ec-av1/src/encode.rsmodified+5 -1
@@ -17076,7 +17076,11 @@ mod tests {
17076 // FILTERED source ([`crate::speed::ARF_TF`]), so every hidden frame's17076 // FILTERED source ([`crate::speed::ARF_TF`]), so every hidden frame's
17077 // pixels -- and the leaves that predict from them -- moved:17077 // pixels -- and the leaves that predict from them -- moved:
17078 // 8269 -> 8218 bytes at q=150 and 33044 -> 33017 at q=60.17078 // 8269 -> 8218 bytes at q=150 and 33044 -> 33017 at q=60.
17079- let pins: [(u8, usize, u64); 2] = [(150, 8218, 0xd533_c8ea_14ca_ae6e), (60, 33017, 0xbced_b694_dcfe_9146)];17079+ // Re-taken on lane-arftf: that filter's strength swept on the deciding
17080+ // gate lands at 2, not 3 ([`crate::speed::ARF_TF`]), so the filtered
17081+ // anchors' pixels moved once more: 8218 -> 8307 bytes at q=150 and
17082+ // 33017 at q=60 (the same LENGTH, different bytes).
17083+ let pins: [(u8, usize, u64); 2] = [(150, 8307, 0xd759_b4f4_cad1_f9a8), (60, 33017, 0xfee7_d4b8_5cea_19d7)];
17080 let coded: Vec<(u8, usize, u64)> = pins17084 let coded: Vec<(u8, usize, u64)> = pins
17081 .iter()17085 .iter()
17082 .map(|&(q, _, _)| {17086 .map(|&(q, _, _)| {
crates/ec-av1/src/speed.rsmodified+28 -2
@@ -393,12 +393,31 @@ pub(crate) const DQ_LEVEL_K: [f64; 3] = [1.5, 1.0, 1.0];
393 /// (`lanes/arfpred.report.md` section 3). Hard filtering does remove 6-7% of393 /// (`lanes/arfpred.report.md` section 3). Hard filtering does remove 6-7% of
394 /// the stream's bytes and gives all of it back in quality, because the leaves394 /// the stream's bytes and gives all of it back in quality, because the leaves
395 /// still carry the grain the anchor no longer has.395 /// still carry the grain the anchor no longer has.
396-pub(crate) const ARF_TF: [f64; 11] = [3.0; 11];396+///
397+/// lane-arftf SWEPT IT ON THE DECIDING GATE (48 pictures, film A / film B,
398+/// BD vs libaom `cpu-used 6` / rav1e `speed 6`, lower is better) -- the probe
399+/// of lane-arfpred mispredicts this lever's sign, so only these count:
400+///
401+/// | strength | film A | film B |
402+/// |---|---|---|
403+/// | 1 | +22.6/-8.1 | +81.6/+4.8 |
404+/// | **2 (ships)** | **+22.2/-8.2** | **+78.6/+2.7** |
405+/// | 3 (was) | +22.7/-7.9 | +79.0/+2.7 |
406+/// | 5 | +23.9/-7.4 | +83.6/+5.1 |
407+///
408+/// The curve is single-peaked at 2 and bracketed on both sides; 2 is down on
409+/// all four columns against the shipped 3 (film A -0.5/-0.3, film B
410+/// -0.4/0.0).
411+pub(crate) const ARF_TF: [f64; 11] = [2.0; 11];
397 412
398 /// lane-arftf: the same filter on the MID ARF (the second hidden frame of a413 /// lane-arftf: the same filter on the MID ARF (the second hidden frame of a
399 /// group), whose window is the group's later leaves -- so it filters FORWARD414 /// group), whose window is the group's later leaves -- so it filters FORWARD
400 /// where the top ARF filters backward. `EC_AV1_ARF_TF_MID=<strength>`415 /// where the top ARF filters backward. `EC_AV1_ARF_TF_MID=<strength>`
401-/// overrides it; `0` is off, which is where the long-GOP gate left it.416+/// overrides it; `0` is off, which is where the long-GOP gate left it:
417+/// filtering the mid ARF at the same strength as the top one reads film A
418+/// +22.2/-8.3 and film B +78.9/+2.6 against the top-only +22.2/-8.2 and
419+/// +78.6/+2.7 -- inside the noise on three columns and 0.3 WORSE on film B's
420+/// libaom one, so the mechanism does not pay a second time one level down.
402 pub(crate) const ARF_TF_MID: [f64; 11] = [0.0; 11];421 pub(crate) const ARF_TF_MID: [f64; 11] = [0.0; 11];
403 422
404 /// lane-arftf: how many window pictures [`crate::encode::arf_temporal_filter`]423 /// lane-arftf: how many window pictures [`crate::encode::arf_temporal_filter`]
@@ -407,6 +426,13 @@ pub(crate) const ARF_TF_MID: [f64; 11] = [0.0; 11];
407 /// display-PAST neighbours and this widens the filter backwards only (a426 /// display-PAST neighbours and this widens the filter backwards only (a
408 /// symmetric +-2 needs a one-group lookahead the encoder does not have).427 /// symmetric +-2 needs a one-group lookahead the encoder does not have).
409 /// `EC_AV1_ARF_TF_WIN=<n>` overrides it.428 /// `EC_AV1_ARF_TF_WIN=<n>` overrides it.
429+///
430+/// 4 (past-only +-2) is REFUTED on the long-GOP gate at strength 2: film A
431+/// +22.8/-7.8 and film B +78.9/+2.8 against 2's +22.2/-8.2 and +78.6/+2.7 --
432+/// worse on three of the four columns. The census's 14.3% SAD removal was
433+/// measured with two neighbours on EACH side; four pictures of one-sided
434+/// past is a different (and worse) window, and the anchor drifts away from
435+/// the leaves it has to predict.
410 pub(crate) const ARF_TF_WIN: [usize; 11] = [2; 11];436 pub(crate) const ARF_TF_WIN: [usize; 11] = [2; 11];
411 437
412 /// lane-arfpred: the qindex below which the ARF temporal filter is OFF --438 /// lane-arfpred: the qindex below which the ARF temporal filter is OFF --