forge
Explore
Log in

Don't you dare go Hollow

Keep 128x128 superblocks off by default, with the measured case recorded

Browse files at this commit

664282aabb7fbf0f41aceac2c2c23a4e40fefc2fAhmet Kaan GümüşParent: 330a2df
  • chore
    • keep 128x128 superblocks off by default, with the measured case recorded
Show full message
chore(av1): keep 128x128 superblocks off by default, with the measured case recorded

The BD gate says the size now WINS with the 128 root's own block in
(every row down or flat on both columns, long GOP too), but eleven of
this crate's round-trip tests desync under EC_AV1_SB128=1 with the
128x128 block switched OFF (EC_AV1_B128=0) -- odd sizes, doubly-cut
roots, multi-tile layouts, decode_stream GOPs. Those are lane-sb128's
SPLIT-only plumbing, not this lane's block, and they gate the default.
Pins stay at the 64-superblock stream.
crates/ec-av1/src/encode.rsmodified+19 -6
@@ -5891,7 +5891,20 @@ fn cfl_on() -> bool {
5891 /// | film A | +20.6 / -5.1 | **+20.4 / -5.2** |5891 /// | film A | +20.6 / -5.1 | **+20.4 / -5.2** |
5892 /// | film B | +24.8 / -2.1 | **+24.2 / -2.5** |5892 /// | film B | +24.8 / -2.1 | **+24.2 / -2.5** |
5893 /// | screen capture | +14.6 / -33.2 | **+14.4 / -33.2** |5893 /// | screen capture | +14.6 / -33.2 | **+14.4 / -33.2** |
5894-pub(crate) const SB128_DEFAULT: bool = true;5894+///
5895+/// and the long-GOP gate agrees (film A +24.7/-7.5 -> +24.4/-7.7, film B
5896+/// +86.8/+7.4 -> +85.6/+6.6).
5897+///
5898+/// STILL OFF all the same, and this is the whole reason: the 128-superblock
5899+/// PLUMBING under it (lane-sb128's SPLIT-only roots) still desyncs on eleven
5900+/// of this crate's own round-trip tests -- odd frame sizes, doubly-cut
5901+/// roots, multi-tile layouts and the `decode_stream` GOPs -- with the
5902+/// refusal lane-sb128b named ("a reference frame selected with no picture at
5903+/// this frame's own ref_frame_idx slot"). Those failures REPRODUCE with the
5904+/// 128x128 block switched off (`EC_AV1_B128=0`), so they are not this lane's
5905+/// block; flipping the default before they are fixed would ship a broken
5906+/// encoder for a 0.6-point BD win. `EC_AV1_SB128=1` turns it on.
5907+pub(crate) const SB128_DEFAULT: bool = false;
5895 5908
5896 /// Whether this process's sequences code 128x128 superblocks. An ENCODER5909 /// Whether this process's sequences code 128x128 superblocks. An ENCODER
5897 /// knob (like `speed::SPEED`), never read by a decode: read through a5910 /// knob (like `speed::SPEED`), never read by a decode: read through a
@@ -16943,12 +16956,12 @@ mod tests {
16943 // ([`crate::motion::MV_SUBPEL_ITERS`]), so every inter block's vector16956 // ([`crate::motion::MV_SUBPEL_ITERS`]), so every inter block's vector
16944 // -- and with it its residual -- moved: 8325 -> 8288 bytes at q=15016957 // -- and with it its residual -- moved: 8325 -> 8288 bytes at q=150
16945 // and 33014 -> 33090 at q=60.16958 // and 33014 -> 33090 at q=60.
16946- // Re-taken on lane-b128: sequences code 128x128 superblocks by16959+ // NOT re-taken on lane-b128: [`SB128_DEFAULT`] stays off, so the
16947- // default now ([`SB128_DEFAULT`]), and their roots can leave a whole16960+ // shipped stream does not move. Under `EC_AV1_SB128=1` the same four
16948- // 128x128 block whole -- 8288 -> 8303 bytes at q=150 and 33090 ->16961+ // pictures code 8303 bytes at q=150 and 33132 at q=60, through the
16949- // 33132 at q=60. `EC_AV1_SB128=0` restores the 64-superblock stream.16962+ // 128 root's own `PARTITION_NONE` block.
16950 let pins: [(u8, usize, u64); 2] =16963 let pins: [(u8, usize, u64); 2] =
16951- [(150, 8303, 0x0368_e400_f09d_02ba), (60, 33132, 0x884b_c219_5ea9_6416)];16964+ [(150, 8288, 0x241d_8115_0a6d_0f34), (60, 33090, 0x7e02_777c_01b4_f035)];
16952 let coded: Vec<(u8, usize, u64)> = pins16965 let coded: Vec<(u8, usize, u64)> = pins
16953 .iter()16966 .iter()
16954 .map(|&(q, _, _)| {16967 .map(|&(q, _, _)| {