forge
Explore
Log in

Don't you dare go Hollow

128x128 superblocks by default

Browse files at this commit

ffb600b09c4c1ec19237c265b726f88cfb8cc22aAhmet Kaan GümüşParent: 8ef9abd
  • feat
    • 128x128 superblocks by default
Show full message
feat(av1): 128x128 superblocks by default

SB128_DEFAULT flips on now that the eleven 128-superblock desyncs are
closed. Pins re-taken: the same four pictures code 8327 B at q=150 and
33194 B at q=60 (was 8252 / 33053); EC_AV1_SB128=0 restores them.

Suite at the new default: s1 342 passed, s2 201 passed, s3 42 passed,
0 failed.
crates/ec-av1/src/encode.rsmodified+13 -14
@@ -5914,16 +5914,12 @@ fn cfl_on() -> bool {
59145914 /// and the long-GOP gate agrees (film A +24.7/-7.5 -> +24.4/-7.7, film B
59155915 /// +86.8/+7.4 -> +85.6/+6.6).
59165916 ///
5917-/// STILL OFF all the same, and this is the whole reason: the 128-superblock
5918-/// PLUMBING under it (lane-sb128's SPLIT-only roots) still desyncs on eleven
5919-/// of this crate's own round-trip tests -- odd frame sizes, doubly-cut
5920-/// roots, multi-tile layouts and the `decode_stream` GOPs -- with the
5921-/// refusal lane-sb128b named ("a reference frame selected with no picture at
5922-/// this frame's own ref_frame_idx slot"). Those failures REPRODUCE with the
5923-/// 128x128 block switched off (`EC_AV1_B128=0`), so they are not this lane's
5924-/// block; flipping the default before they are fixed would ship a broken
5925-/// encoder for a 0.6-point BD win. `EC_AV1_SB128=1` turns it on.
5926-pub(crate) const SB128_DEFAULT: bool = false;
5917+/// ON since lane-b128m closed the eleven 128-superblock desyncs that held it
5918+/// off (the delta_q unit at the 128 superblock, the superblock size travelling
5919+/// with a `FrameCtx` copy into a tile search worker, the writer's intrabc DV
5920+/// predictor and wavefront, and seven test harnesses that handed the encoder a
5921+/// 64-superblock context). `EC_AV1_SB128=0` turns it off.
5922+pub(crate) const SB128_DEFAULT: bool = true;
59275923
59285924 /// Whether this process's sequences code 128x128 superblocks. An ENCODER
59295925 /// knob (like `speed::SPEED`), never read by a decode: read through a
@@ -17241,10 +17237,13 @@ mod tests {
1724117237 // quantizer grid -- and every decision priced against it -- moved
1724217238 // (8325 -> 8419 / 33014 -> 33029 on its own base); re-taken once more
1724317239 // at the merge of both lanes.
17244- // NOT re-taken on lane-b128: [`SB128_DEFAULT`] stays off, so the
17245- // shipped stream does not move; under `EC_AV1_SB128=1` the same four
17246- // pictures code through the 128 root's own `PARTITION_NONE` block.
17247- let pins: [(u8, usize, u64); 2] = [(150, 8252, 0x5b6e40a2b5498988), (60, 33053, 0x9a0abfc234eccc37)];
17240+ // NOT re-taken on lane-b128: [`SB128_DEFAULT`] stayed off there, so
17241+ // the shipped stream did not move.
17242+ // Re-taken on lane-b128m, which flips [`SB128_DEFAULT`] on: every
17243+ // picture is coded in 128x128 superblocks now, the inter ones
17244+ // offering the 128 root's own `PARTITION_NONE` block -- 8327 bytes at
17245+ // q=150 and 33194 at q=60. `EC_AV1_SB128=0` restores 8252 / 33053.
17246+ let pins: [(u8, usize, u64); 2] = [(150, 8327, 0x33eb7bd59beaf2e3), (60, 33194, 0xafded5cfca824703)];
1724817247 let coded: Vec<(u8, usize, u64)> = pins
1724917248 .iter()
1725017249 .map(|&(q, _, _)| {