gate_coverage: retire the stale 8-bit enable-global-motion entry + classify 12-bit gates as high-depth
Browse files at this commit475351679b5fb3a2a301e57dbb7bfadbeead4c91Parent: 0f27d4e1 changed file +65 -15
crates/ec-av1/src/gate_coverage.rsmodified+65 -15
| @@ -119,15 +119,50 @@ enum On { | ||
| 119 | 119 | /// only a gate that spells an on-value at that bit depth retires an entry. |
| 120 | 120 | #[cfg(test)] |
| 121 | 121 | 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 | + ), | |
| 128 | 158 | ("enable-fwd-kf", &["enable-fwd-kf"], "0", On::NonZero), |
| 129 | 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 | 166 | ("intrabc-search", &["cpu-used"], "0", On::AtMost(2)), |
| 132 | 167 | ]; |
| 133 | 168 | |
| @@ -167,10 +202,14 @@ const NEVER_EXERCISED_8BIT: &[(&str, &str)] = &[ | ||
| 167 | 202 | "enable-flip-idtx", |
| 168 | 203 | "never spelled; the flip/identity transform types are unproven by a real stream", |
| 169 | 204 | ), |
| 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. | |
| 174 | 213 | ( |
| 175 | 214 | "enable-rect-tx", |
| 176 | 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 | 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 | 222 | // and `enable-dist-wtd-comp` at 10 bits without deleting their entries here, |
| 183 | 223 | // so this list was already stale (and this test already red) at main 9c35ecc; |
| 184 | 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 | 280 | #[cfg(test)] |
| 241 | 281 | mod tests { |
| 242 | 282 | 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, | |
| 245 | 285 | }; |
| 246 | 286 | use std::collections::{BTreeMap, BTreeSet}; |
| 247 | 287 | |
| @@ -438,11 +478,19 @@ mod tests { | ||
| 438 | 478 | } |
| 439 | 479 | |
| 440 | 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 | 485 | body.contains("encode_10bit_gradients") |
| 442 | 486 | || body.contains("ten_bit_tool_gate(") |
| 443 | 487 | || body.contains("--bit-depth=10") |
| 444 | 488 | || body.contains("--input-bit-depth=10") |
| 445 | 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 | 496 | /// Flags a gate positively enables (`=1`), at gates of the given depth. |
| @@ -534,7 +582,9 @@ mod tests { | ||
| 534 | 582 | } |
| 535 | 583 | |
| 536 | 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 | 588 | let gates: Vec<&str> = gate_bodies() |
| 539 | 589 | .into_iter() |
| 540 | 590 | .filter(|b| covers_depth(b, ten_bit)) |