diff --git a/crates/ec-av1/src/encoder/tests.rs b/crates/ec-av1/src/encoder/tests.rs index c8ce5eab..a21cf532 100644 --- a/crates/ec-av1/src/encoder/tests.rs +++ b/crates/ec-av1/src/encoder/tests.rs @@ -672,6 +672,15 @@ width: usize, height: usize, frames: usize, + ) -> Option> { + h264_clip_frames_at(20, width, height, frames) + } + + fn h264_clip_frames_at( + start: u32, + width: usize, + height: usize, + frames: usize, ) -> Option> { // lane-av1speed3: the wall tables below are read on REAL film as // well as on the colour-bar fixture (`bars` vs `film` in the BD @@ -694,7 +703,7 @@ // therefore `return` on `None` WITHOUT printing a second one -- the // second "no fixture" line per gate was the noise that hid this defect. let out = ec_testkit::ffmpeg() - .args(["-v", "error", "-ss", "20", "-i", clip.to_str().unwrap()]) + .args(["-v", "error", "-ss", &start.to_string(), "-i", clip.to_str().unwrap()]) .args(["-frames:v", &frames.to_string()]) .args(["-vf", &format!("scale={width}:{height}")]) .args(["-f", "rawvideo", "-pix_fmt", "yuv420p", "-"]).output() @@ -915,11 +924,13 @@ ); } + const CLEAN_START: u32 = 23; + #[test] fn bitrate_target_lands_within_5_percent_over_48_frames() { let _knobs = crate::speed::knob_read(); let (width, height, frames) = (640usize, 384usize, 48usize); - let Some(pictures) = h264_clip_frames(width, + let Some(pictures) = h264_clip_frames_at(CLEAN_START, width, height, frames, ) else {