//! Helpers shared by the integration-test modules of the `it` binary. /// ffmpeg's decoded rawvideo byte stream (frame-packed I420, `w`x`h`). pub(crate) fn ffmpeg_raw_yuv(path: &std::path::Path, w: usize, h: usize) -> Vec { let out = ec_testkit::ffmpeg() .args(["-v", "error", "-i"]) .arg(path) .args(["-f", "rawvideo", "-pix_fmt", "yuv420p", "-"]) .output() .expect("ffmpeg runs"); assert!(out.status.success(), "ffmpeg decode failed: {out:?}"); let frame = w * h + 2 * (w / 2) * (h / 2); assert_eq!( out.stdout.len() % frame, 0, "ffmpeg output is not frame-aligned" ); out.stdout }