stream: a_real_aomenc_lossless_444_key_frame stops reporting green on a missing pin
Browse files at this commit60459a516bc54162d1aa733e969d07c004a4e43fParent: 542c8fe1 changed file +28 -8
- crates/ec-av1/src/stream.rs +28 -8
crates/ec-av1/src/stream.rsmodified+28 -8
| @@ -6488,14 +6488,34 @@ pub(crate) mod tests { | |||
| 6488 | eprintln!("SKIP {NAME}: no ffmpeg"); | 6488 | eprintln!("SKIP {NAME}: no ffmpeg"); |
| 6489 | return; | 6489 | return; |
| 6490 | } | 6490 | } |
| 6491 | - let Ok(stream) = std::fs::read(pin_dir().join("ll444-lossless-key.obu")) else { | 6491 | + // lane-av1skipfix: this arm used to be a bare SKIP, so on any box |
| 6492 | - eprintln!( | 6492 | + // without the pin (the root `fixtures/` directory is GITIGNORED -- |
| 6493 | - "SKIP {NAME}: no pinned bytes at {} -- regenerate with \ | 6493 | + // `.gitignore:2` -- so a fresh clone can never have it) the gate |
| 6494 | - `testsrc2 128x96` yuv444p 6 frames, aomenc --profile=1 --lossless=1 \ | 6494 | + // reported green having decoded nothing. `EC_AV1_REQUIRE_AOMENC=1` |
| 6495 | - --enable-palette=0 --enable-intrabc=0, cut to the key frame's OBUs", | 6495 | + // turns it into a hard failure naming the missing pin and its exact |
| 6496 | - pin_dir().join("ll444-lossless-key.obu").display() | 6496 | + // regeneration recipe, so a batch run cannot report green off it. |
| 6497 | - ); | 6497 | + let pin = pin_dir().join("ll444-lossless-key.obu"); |
| 6498 | - return; | 6498 | + let stream = match std::fs::read(&pin) { |
| 6499 | + Ok(stream) => stream, | ||
| 6500 | + Err(e) => { | ||
| 6501 | + assert!( | ||
| 6502 | + std::env::var_os("EC_AV1_REQUIRE_AOMENC").is_none(), | ||
| 6503 | + "{NAME}: the pinned 4:4:4 lossless key frame is missing at {} ({e}). \ | ||
| 6504 | + Regenerate it with `testsrc2 128x96` yuv444p 6 frames, aomenc \ | ||
| 6505 | + --profile=1 --lossless=1 --enable-palette=0 --enable-intrabc=0, \ | ||
| 6506 | + cut to the key frame's OBUs -- or point EC_AV1_PIN_DIR at a \ | ||
| 6507 | + directory that has it.", | ||
| 6508 | + pin.display() | ||
| 6509 | + ); | ||
| 6510 | + eprintln!( | ||
| 6511 | + "SKIP {NAME}: no pinned bytes at {} ({e}) -- this gate decoded nothing \ | ||
| 6512 | + and proves nothing; regenerate with `testsrc2 128x96` yuv444p 6 \ | ||
| 6513 | + frames, aomenc --profile=1 --lossless=1 --enable-palette=0 \ | ||
| 6514 | + --enable-intrabc=0, cut to the key frame's OBUs", | ||
| 6515 | + pin.display() | ||
| 6516 | + ); | ||
| 6517 | + return; | ||
| 6518 | + } | ||
| 6499 | }; | 6519 | }; |
| 6500 | // Blindness guard: the pinned fixture must really be a lossless frame. | 6520 | // Blindness guard: the pinned fixture must really be a lossless frame. |
| 6501 | let mut parser = Av1Parser::new(); | 6521 | let mut parser = Av1Parser::new(); |