ec-av1: bind the 10-bit film gate's pin names as literals so the fixture census can prove them
Browse files at this commit9714b2b0a4e928c2e97da8e4aad1b3772e2d8c90Parent: 1d5fb9c1 changed file +22 -6
- crates/ec-av1/src/stream.rs +22 -6
crates/ec-av1/src/stream.rsmodified+22 -6
| @@ -46931,12 +46931,28 @@ exit 0 | ||
| 46931 | 46931 | if !aomdec_available(NAME) { |
| 46932 | 46932 | return; |
| 46933 | 46933 | } |
| 46934 | - for (pin, frames, shown) in [ | |
| 46935 | - ("reelc_sb128_inter_witness.obu", 16usize, 15usize), | |
| 46936 | - ("gm_small_side_witness.obu", 34, 33), | |
| 46937 | - ] { | |
| 46938 | - let stream = std::fs::read(crate_pin(pin)) | |
| 46939 | - .unwrap_or_else(|e| panic!("{NAME}: reading {pin}: {e}")); | |
| 46934 | + // The pin paths are BOUND HERE, from literals, rather than built from | |
| 46935 | + // the loop variable: `crate_pin`'s argument has to be a literal the | |
| 46936 | + // fixture-library census can resolve, or invariant 4 reports this gate | |
| 46937 | + // as UNPROVEN ("name built at runtime -- this census cannot resolve | |
| 46938 | + // it") and a preflight that checks code shape goes RED. | |
| 46939 | + let pins: [(&str, std::path::PathBuf, usize, usize); 2] = [ | |
| 46940 | + ( | |
| 46941 | + "reelc_sb128_inter_witness.obu", | |
| 46942 | + crate_pin("reelc_sb128_inter_witness.obu"), | |
| 46943 | + 16usize, | |
| 46944 | + 15usize, | |
| 46945 | + ), | |
| 46946 | + ( | |
| 46947 | + "gm_small_side_witness.obu", | |
| 46948 | + crate_pin("gm_small_side_witness.obu"), | |
| 46949 | + 34usize, | |
| 46950 | + 33usize, | |
| 46951 | + ), | |
| 46952 | + ]; | |
| 46953 | + for (pin, path, frames, shown) in pins { | |
| 46954 | + let stream = | |
| 46955 | + std::fs::read(&path).unwrap_or_else(|e| panic!("{NAME}: reading {pin}: {e}")); | |
| 46940 | 46956 | let (decoded, hidden) = decode_all_frames_vs_oracle(&stream, NAME); |
| 46941 | 46957 | assert_eq!( |
| 46942 | 46958 | (decoded, hidden), |