forge
Explore
Log in

Don't you dare go Hollow

gate_coverage: retire the stale 8-bit enable-global-motion entry + classify 12-bit gates as high-depth

Browse files at this commit

475351679b5fb3a2a301e57dbb7bfadbeead4c91Ahmet Kaan GümüşParent: 0f27d4e
a_real_affine_global_motion_stream_decodes_pixel_exact loops [8u32, 10u32]
passing --enable-global-motion=1 pixel-exact at both depths since
lane-gmaffine r1, so the 8-bit hole was already closed; the entry survived
because no suite ran a tree containing both the gate and this test until
the ROTZOOM suite. is_ten_bit now also recognizes the 12-bit spellings
(encode_12bit(, --bit-depth=12, --input-bit-depth=12, yuv420p12le) so
12-bit gates land in the high-depth bucket.
crates/ec-av1/src/gate_coverage.rsmodified+65 -15
@@ -119,15 +119,50 @@ enum On {
119 /// only a gate that spells an on-value at that bit depth retires an entry.119 /// only a gate that spells an on-value at that bit depth retires an entry.
120 #[cfg(test)]120 #[cfg(test)]
121 const DEFAULT_ON_TOOLS: &[(&str, &[&str], &str, On)] = &[121 const DEFAULT_ON_TOOLS: &[(&str, &[&str], &str, On)] = &[
122- ("enable-tx-size-search", &["enable-tx-size-search"], "1", On::NonZero),122+ (
123- ("enable-directional-intra", &["enable-directional-intra"], "1", On::NonZero),123+ "enable-tx-size-search",
124- ("enable-smooth-interintra", &["enable-smooth-interintra"], "1", On::NonZero),124+ &["enable-tx-size-search"],
125- ("enable-interintra-wedge", &["enable-interintra-wedge"], "1", On::NonZero),125+ "1",
126- ("enable-diff-wtd-comp", &["enable-diff-wtd-comp"], "1", On::NonZero),126+ On::NonZero,
127- ("enable-onesided-comp", &["enable-onesided-comp"], "1", On::NonZero),127+ ),
128+ (
129+ "enable-directional-intra",
130+ &["enable-directional-intra"],
131+ "1",
132+ On::NonZero,
133+ ),
134+ (
135+ "enable-smooth-interintra",
136+ &["enable-smooth-interintra"],
137+ "1",
138+ On::NonZero,
139+ ),
140+ (
141+ "enable-interintra-wedge",
142+ &["enable-interintra-wedge"],
143+ "1",
144+ On::NonZero,
145+ ),
146+ (
147+ "enable-diff-wtd-comp",
148+ &["enable-diff-wtd-comp"],
149+ "1",
150+ On::NonZero,
151+ ),
152+ (
153+ "enable-onesided-comp",
154+ &["enable-onesided-comp"],
155+ "1",
156+ On::NonZero,
157+ ),
128 ("enable-fwd-kf", &["enable-fwd-kf"], "0", On::NonZero),158 ("enable-fwd-kf", &["enable-fwd-kf"], "0", On::NonZero),
129 ("deblocking", &["loopfilter-control"], "1", On::NonZero),159 ("deblocking", &["loopfilter-control"], "1", On::NonZero),
130- ("multi-tile", &["tile-columns", "tile-rows"], "0", On::NonZero),160+ (
161+ "multi-tile",
162+ &["tile-columns", "tile-rows"],
163+ "0",
164+ On::NonZero,
165+ ),
131 ("intrabc-search", &["cpu-used"], "0", On::AtMost(2)),166 ("intrabc-search", &["cpu-used"], "0", On::AtMost(2)),
132 ];167 ];
133 168
@@ -167,10 +202,14 @@ const NEVER_EXERCISED_8BIT: &[(&str, &str)] = &[
167 "enable-flip-idtx",202 "enable-flip-idtx",
168 "never spelled; the flip/identity transform types are unproven by a real stream",203 "never spelled; the flip/identity transform types are unproven by a real stream",
169 ),204 ),
170- (205+ // `enable-global-motion` LEFT this list on 2026-09-25 (lane-av1gwarp12 r2):
171- "enable-global-motion",206+ // `a_real_affine_global_motion_stream_decodes_pixel_exact` loops
172- "off in 5 gates, on in none at 8 bits; lane-gm owns the global-warp prediction that is still missing",207+ // `for depth in [8u32, 10u32]` passing `--enable-global-motion=1` and
173- ),208+ // pixel-compares both depths, so the 8-bit hole has been closed since
209+ // lane-gmaffine r1 -- the entry survived because no suite ran a tree
210+ // containing both the gate and this test until the ROTZOOM suite.
211+ // The 12-bit ROTZOOM gate rides the high-depth bucket via `encode_12bit(`
212+ // in `is_ten_bit`, so it plays no part in this retirement.
174 (213 (
175 "enable-rect-tx",214 "enable-rect-tx",
176 "never spelled; rect transforms reach the decoder only through partition shape, never through a gate that names the tool",215 "never spelled; rect transforms reach the decoder only through partition shape, never through a gate that names the tool",
@@ -178,7 +217,8 @@ const NEVER_EXERCISED_8BIT: &[(&str, &str)] = &[
178 ];217 ];
179 218
180 #[cfg(test)]219 #[cfg(test)]
181-const NEVER_EXERCISED_10BIT: &[(&str, &str)] = &[ // lane-cwarp's 10-bit compound-global-warp gate closed `enable-global-motion`220+const NEVER_EXERCISED_10BIT: &[(&str, &str)] = &[
221+ // lane-cwarp's 10-bit compound-global-warp gate closed `enable-global-motion`
182 // and `enable-dist-wtd-comp` at 10 bits without deleting their entries here,222 // and `enable-dist-wtd-comp` at 10 bits without deleting their entries here,
183 // so this list was already stale (and this test already red) at main 9c35ecc;223 // so this list was already stale (and this test already red) at main 9c35ecc;
184 // lane-tiles r11's multi-tile 10-bit gates then closed `enable-ab-partitions`,224 // lane-tiles r11's multi-tile 10-bit gates then closed `enable-ab-partitions`,
@@ -240,8 +280,8 @@ const NEVER_ON_10BIT: &[(&str, &str)] = &[];
240 #[cfg(test)]280 #[cfg(test)]
241 mod tests {281 mod tests {
242 use super::{282 use super::{
243- ALIASES, DEFAULT_ON_TOOLS, NEVER_EXERCISED, NEVER_EXERCISED_8BIT, NEVER_EXERCISED_10BIT,283+ On, ALIASES, DEFAULT_ON_TOOLS, NEVER_EXERCISED, NEVER_EXERCISED_10BIT,
244- NEVER_ON_10BIT, NEVER_ON_8BIT, On, TOOL_UNIVERSE,284+ NEVER_EXERCISED_8BIT, NEVER_ON_10BIT, NEVER_ON_8BIT, TOOL_UNIVERSE,
245 };285 };
246 use std::collections::{BTreeMap, BTreeSet};286 use std::collections::{BTreeMap, BTreeSet};
247 287
@@ -438,11 +478,19 @@ mod tests {
438 }478 }
439 479
440 fn is_ten_bit(body: &str) -> bool {480 fn is_ten_bit(body: &str) -> bool {
481+ // The lists pin two buckets, 8-bit and high-bit-depth; 12-bit gates
482+ // count in the high-depth bucket (lane-av1gwarp12's ROTZOOM gate was
483+ // the first 12-bit gate to positively enable a listed tool, and the
484+ // 10-bit-only spellings mis-filed it as 8-bit).
441 body.contains("encode_10bit_gradients")485 body.contains("encode_10bit_gradients")
442 || body.contains("ten_bit_tool_gate(")486 || body.contains("ten_bit_tool_gate(")
443 || body.contains("--bit-depth=10")487 || body.contains("--bit-depth=10")
444 || body.contains("--input-bit-depth=10")488 || body.contains("--input-bit-depth=10")
445 || body.contains("yuv420p10le")489 || body.contains("yuv420p10le")
490+ || body.contains("encode_12bit(")
491+ || body.contains("--bit-depth=12")
492+ || body.contains("--input-bit-depth=12")
493+ || body.contains("yuv420p12le")
446 }494 }
447 495
448 /// Flags a gate positively enables (`=1`), at gates of the given depth.496 /// Flags a gate positively enables (`=1`), at gates of the given depth.
@@ -534,7 +582,9 @@ mod tests {
534 }582 }
535 583
536 /// [`DEFAULT_ON_TOOLS`] per depth: `tool -> (off in N gates, on in N, defaulted in N)`.584 /// [`DEFAULT_ON_TOOLS`] per depth: `tool -> (off in N gates, on in N, defaulted in N)`.
537- fn default_on_settings(ten_bit: bool) -> (usize, BTreeMap<&'static str, (usize, usize, usize)>) {585+ fn default_on_settings(
586+ ten_bit: bool,
587+ ) -> (usize, BTreeMap<&'static str, (usize, usize, usize)>) {
538 let gates: Vec<&str> = gate_bodies()588 let gates: Vec<&str> = gate_bodies()
539 .into_iter()589 .into_iter()
540 .filter(|b| covers_depth(b, ten_bit))590 .filter(|b| covers_depth(b, ten_bit))