From 1afea2203650cba563d96d2c095b747c82e0cb02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Wed, 2 Dec 2026 13:17:40 +0300 Subject: [PATCH] ec-av1 bitrate test: measure on Sintel from 23 s; the 20 s window holds a fade to black (21.46-22.04 s, blackdetect) where even libaom CBR lands -18.1% at every rate; on the clean window every arm lands within 2% --- crates/ec-av1/src/encoder/tests.rs | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) 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 {