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 {
119119 /// only a gate that spells an on-value at that bit depth retires an entry.
120120 #[cfg(test)]
121121 const DEFAULT_ON_TOOLS: &[(&str, &[&str], &str, On)] = &[
122- ("enable-tx-size-search", &["enable-tx-size-search"], "1", On::NonZero),
123- ("enable-directional-intra", &["enable-directional-intra"], "1", On::NonZero),
124- ("enable-smooth-interintra", &["enable-smooth-interintra"], "1", On::NonZero),
125- ("enable-interintra-wedge", &["enable-interintra-wedge"], "1", On::NonZero),
126- ("enable-diff-wtd-comp", &["enable-diff-wtd-comp"], "1", On::NonZero),
127- ("enable-onesided-comp", &["enable-onesided-comp"], "1", On::NonZero),
122+ (
123+ "enable-tx-size-search",
124+ &["enable-tx-size-search"],
125+ "1",
126+ 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+ ),
128158 ("enable-fwd-kf", &["enable-fwd-kf"], "0", On::NonZero),
129159 ("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+ ),
131166 ("intrabc-search", &["cpu-used"], "0", On::AtMost(2)),
132167 ];
133168
@@ -167,10 +202,14 @@ const NEVER_EXERCISED_8BIT: &[(&str, &str)] = &[
167202 "enable-flip-idtx",
168203 "never spelled; the flip/identity transform types are unproven by a real stream",
169204 ),
170- (
171- "enable-global-motion",
172- "off in 5 gates, on in none at 8 bits; lane-gm owns the global-warp prediction that is still missing",
173- ),
205+ // `enable-global-motion` LEFT this list on 2026-09-25 (lane-av1gwarp12 r2):
206+ // `a_real_affine_global_motion_stream_decodes_pixel_exact` loops
207+ // `for depth in [8u32, 10u32]` passing `--enable-global-motion=1` and
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.
174213 (
175214 "enable-rect-tx",
176215 "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)] = &[
178217 ];
179218
180219 #[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`
182222 // and `enable-dist-wtd-comp` at 10 bits without deleting their entries here,
183223 // so this list was already stale (and this test already red) at main 9c35ecc;
184224 // lane-tiles r11's multi-tile 10-bit gates then closed `enable-ab-partitions`,
@@ -240,8 +280,8 @@ const NEVER_ON_10BIT: &[(&str, &str)] = &[];
240280 #[cfg(test)]
241281 mod tests {
242282 use super::{
243- ALIASES, DEFAULT_ON_TOOLS, NEVER_EXERCISED, NEVER_EXERCISED_8BIT, NEVER_EXERCISED_10BIT,
244- NEVER_ON_10BIT, NEVER_ON_8BIT, On, TOOL_UNIVERSE,
283+ On, ALIASES, DEFAULT_ON_TOOLS, NEVER_EXERCISED, NEVER_EXERCISED_10BIT,
284+ NEVER_EXERCISED_8BIT, NEVER_ON_10BIT, NEVER_ON_8BIT, TOOL_UNIVERSE,
245285 };
246286 use std::collections::{BTreeMap, BTreeSet};
247287
@@ -438,11 +478,19 @@ mod tests {
438478 }
439479
440480 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).
441485 body.contains("encode_10bit_gradients")
442486 || body.contains("ten_bit_tool_gate(")
443487 || body.contains("--bit-depth=10")
444488 || body.contains("--input-bit-depth=10")
445489 || 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")
446494 }
447495
448496 /// Flags a gate positively enables (`=1`), at gates of the given depth.
@@ -534,7 +582,9 @@ mod tests {
534582 }
535583
536584 /// [`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)>) {
538588 let gates: Vec<&str> = gate_bodies()
539589 .into_iter()
540590 .filter(|b| covers_depth(b, ten_bit))