forge
Explore
Log in

Don't you dare go Hollow

Enumerate the superblock-root partition alphabet against its arms

Browse files at this commit

00c1b3ff2d80d84fef71bb6208110dedbbd95fc4Ahmet Kaan GümüşParent: 93b8225
  • test
    • enumerate the superblock-root partition alphabet against its arms
Show full message
test(av1): enumerate the superblock-root partition alphabet against its arms

The key-frame superblock root's `match part` carries the refusal "a
superblock-level partition value outside PARTITION_NONE..PARTITION_VERT_4"
in its fallback arm. `part` is either a `partition_w64` symbol (ten values,
`symbol` cannot return more) or, at a frame edge, one of the three gathered
outcomes HORZ/VERT/SPLIT -- all inside that same alphabet. The existing
arm enumerator already walks matches keyed by their own fallback string, so
this is one entry: the match has an arm for all ten values, and the refusal
is dead. Mutation-checked (dropping PARTITION_VERT_4 from its arm fails the
test by name).
crates/ec-av1/src/refusal_inventory.rsmodified+15 -1
@@ -235,6 +235,12 @@ const PROVEN: &[(&str, &str)] = &[
235235 "a 128x128 superblock partition value outside the 8-symbol alphabet",
236236 "every_partition_value_of_an_enumerated_alphabet_has_an_arm",
237237 ),
238+ // lane-t900 r24, enumeration: the key-frame superblock root's own `match`
239+ // has an arm for all ten `partition_w64` values.
240+ (
241+ "a superblock-level partition value outside PARTITION_NONE..PARTITION_VERT_4",
242+ "every_partition_value_of_an_enumerated_alphabet_has_an_arm",
243+ ),
238244 (
239245 "a bit depth of 12 (this decoder is gated at 8 and 10 only: warp/MC/wiener rounding shifts change at 12-bit and no 12-bit gate exists)",
240246 "a_twelve_bit_sequence_header_is_refused_by_name",
@@ -456,10 +462,18 @@ mod tests {
456462 "PARTITION_VERT_4",
457463 ];
458464 // (the refusal in the fallback arm, the alphabet its CDF codes)
459- let blocks: [(&str, usize); 3] = [
465+ let blocks: [(&str, usize); 4] = [
460466 ("a 32x32 partition type this decoder does not code", crate::cdf::PARTITION_W32[0].len() - 1),
461467 ("an INTER 32x32 partition type this decoder does not code", crate::cdf::PARTITION_W32[0].len() - 1),
462468 ("a 128x128 superblock partition value outside the 8-symbol alphabet", crate::cdf::PARTITION_W128[0].len() - 1),
469+ // lane-t900 r24: the key-frame superblock root. Its `part` is
470+ // either a `partition_w64` symbol or, at a frame edge, one of the
471+ // three gathered outcomes (PARTITION_HORZ, PARTITION_VERT,
472+ // PARTITION_SPLIT) -- all inside the same ten-value alphabet.
473+ (
474+ "a superblock-level partition value outside PARTITION_NONE..PARTITION_VERT_4",
475+ crate::cdf::PARTITION_W64[0].len() - 1,
476+ ),
463477 ];
464478 // A pattern's own tokens, plus every value of an inclusive range
465479 // (`p if (PARTITION_HORZ_A..=PARTITION_VERT_B).contains(&p)` is four