forge
Explore
Log in

Don't you dare go Hollow

Warp pin test covers all three pinned regression streams

Browse files at this commit

e19a868be3727d6e402ae5f127b6fb8002092bf2Ahmet Kaan GümüşParent: 569067b
  • test
    • warp pin test covers all three pinned regression streams
Show full message
test(av1): warp pin test covers all three pinned regression streams
crates/ec-av1/src/stream.rsmodified+26 -10
@@ -3468,22 +3468,38 @@ mod tests {
34683468 );
34693469 }
34703470
3471- /// lane-warp round 3: reproduces the pinned mismatch bytes captured by
3472- /// `EC_AV1_GATE_DUMP=$SP/warp-mismatch.obu` off
3473- /// `a_real_aomenc_stream_with_warped_motion_refuses_or_matches` (seed 49,
3474- /// frame 1). Deterministic and static -- `#[ignore]`d, run manually.
3471+ /// Pinned streams captured by `EC_AV1_GATE_DUMP` off
3472+ /// `a_real_aomenc_stream_with_warped_motion_refuses_or_matches` -- each
3473+ /// one is a former mismatch, kept as a regression pin (warp-mismatch:
3474+ /// the WARPED_CAUSAL interp-read suppression; warp-flake-7: the same
3475+ /// suppression for skip_mode blocks; warp-flake-5: mvstack entry
3476+ /// clamping). `EC_AV1_GATE_DUMP_PIN` overrides to a single stream.
3477+ /// Deterministic and static -- `#[ignore]`d because the gitignored
3478+ /// fixtures dir may be absent; run manually.
34753479 #[test]
3476- #[ignore = "reads a pinned fixture path outside the repo; run manually"]
3480+ #[ignore = "reads pinned fixture paths under the gitignored fixtures dir; run manually"]
34773481 fn pinned_warp_stream_decodes_pixel_exact() {
3478- use crate::decode::warp_selected_hits;
3479- let path = std::env::var("EC_AV1_GATE_DUMP_PIN").unwrap_or_else(|_| {
3480- concat!(env!("CARGO_MANIFEST_DIR"), "/../../fixtures/warp-mismatch.obu").to_string()
3481- });
3482- let stream = std::fs::read(&path).expect("reading pinned stream");
34833482 if !have_ffmpeg() {
34843483 eprintln!("SKIP pinned_warp_stream_decodes_pixel_exact: no ffmpeg");
34853484 return;
34863485 }
3486+ let fixtures = concat!(env!("CARGO_MANIFEST_DIR"), "/../../fixtures");
3487+ let paths: Vec<String> = match std::env::var("EC_AV1_GATE_DUMP_PIN") {
3488+ Ok(p) => vec![p],
3489+ Err(_) => ["warp-mismatch", "warp-flake-5", "warp-flake-7"]
3490+ .iter()
3491+ .map(|n| format!("{fixtures}/{n}.obu"))
3492+ .collect(),
3493+ };
3494+ for path in paths {
3495+ eprintln!("pin: {path}");
3496+ check_pinned_warp_stream(&path);
3497+ }
3498+ }
3499+
3500+ fn check_pinned_warp_stream(path: &str) {
3501+ use crate::decode::warp_selected_hits;
3502+ let stream = std::fs::read(path).expect("reading pinned stream");
34873503 let before = warp_selected_hits();
34883504 let frames = decode_stream(&stream).expect("pinned stream must decode");
34893505 eprintln!(