forge
Explore
Log in

Don't you dare go Hollow

Compound reference on by default -- BD down on all three gate clips

Browse files at this commit

e062d5bb1a397496aa6a4af46d82ad0080e196cbAhmet Kaan GümüşParent: 3cac217
  • feat
    • compound reference on by default -- BD down on all three gate clips
Show full message
feat(av1): compound reference on by default -- BD down on all three gate clips

Flat BD gate, same machine: vs libaom +121.2/+146.4/+79.1 -> +120.1/+128.5/+73.0
(1080p/2160p/screen), vs rav1e +71.8/+97.8/+17.0 -> +67.8/+86.0/+13.7, wall
6.5/5.6/6.2 s -> 7.5/6.4/6.4 s. Compound takes 8.1%/8.6%/13.8% of coded inter
blocks; modes NEAREST_NEAREST 1218/1439/1848, GLOBAL_GLOBAL 268/377/0, NEW_NEW
203/34/0; pairs LAST+GOLDEN 450/397/311, LAST+ALTREF 1239/1453/1537.

The three GOP round trips in decode.rs called decode_inter_frame_tile_lr with a
hard-coded reference_select = false while decoding a tile the ENCODER wrote
(stale-header class); they now pass the encoder's own bit. Byte pins updated.
crates/ec-av1/src/decode.rsmodified+12 -2
@@ -37493,7 +37493,12 @@ mod tests {
3749337493 false,
3749437494 Some(mc::InterpFilterKind::Regular),
3749537495 false,
37496- false,
37496+ // The encoder's own `reference_select` (spec 5.9.22): these
37497+ // GOP round trips decode a tile the ENCODER wrote, so the
37498+ // header bit must be the one it wrote, not a hard-coded
37499+ // `false` (stale-header class -- a `reference_select` stream
37500+ // reads a `comp_mode` symbol this decode would skip).
37501+ crate::encode::reference_select(),
3749737502 frame.tx_select,
3749837503 &frame.loop_restoration,
3749937504 Some(frame.start_cdfs.0.clone()),
@@ -37812,7 +37817,12 @@ mod tests {
3781237817 false,
3781337818 Some(mc::InterpFilterKind::Regular),
3781437819 false,
37815- false,
37820+ // The encoder's own `reference_select` (spec 5.9.22): these
37821+ // GOP round trips decode a tile the ENCODER wrote, so the
37822+ // header bit must be the one it wrote, not a hard-coded
37823+ // `false` (stale-header class -- a `reference_select` stream
37824+ // reads a `comp_mode` symbol this decode would skip).
37825+ crate::encode::reference_select(),
3781637826 frame.tx_select,
3781737827 &frame.loop_restoration,
3781837828 Some(frame.start_cdfs.0.clone()),
crates/ec-av1/src/encode.rsmodified+2 -2
@@ -3724,7 +3724,7 @@ pub(crate) fn flat_order_hints(order_hint: u32, key_hint: u32, has_altref: bool)
37243724 /// `EC_AV1_COMPOUND=1` arms it in a test build (which is what the BD gate
37253725 /// runs as), and every block still codes SINGLE, so the only cost is one
37263726 /// `comp_mode` symbol per inter block.
3727-const REFERENCE_SELECT: bool = false;
3727+const REFERENCE_SELECT: bool = true;
37283728
37293729 /// [`REFERENCE_SELECT`], with the test-build environment override.
37303730 pub(crate) fn reference_select() -> bool {
@@ -8294,7 +8294,7 @@ mod tests {
82948294 })
82958295 };
82968296 let pins: [(u8, usize, u64); 2] =
8297- [(150, 7444, 0x76eb980832d719f1), (60, 27692, 0x8c88f7e73455d439)];
8297+ [(150, 7209, 0xacdd_6952_78c1_49f2), (60, 27353, 0x9be8_7898_f08d_3b77)];
82988298 for (q, bytes, hash) in pins {
82998299 let encoded = encode_sequence(&source, q, 0.5).unwrap();
83008300 assert_eq!(