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%
Browse files at this commit1afea2203650cba563d96d2c095b747c82e0cb02Parent: a5f823f1 changed file +13 -2
crates/ec-av1/src/encoder/tests.rsmodified+13 -2
| @@ -672,6 +672,15 @@ | ||
| 672 | 672 | width: usize, |
| 673 | 673 | height: usize, |
| 674 | 674 | frames: usize, |
| 675 | + ) -> Option<Vec<Picture>> { | |
| 676 | + h264_clip_frames_at(20, width, height, frames) | |
| 677 | + } | |
| 678 | + | |
| 679 | + fn h264_clip_frames_at( | |
| 680 | + start: u32, | |
| 681 | + width: usize, | |
| 682 | + height: usize, | |
| 683 | + frames: usize, | |
| 675 | 684 | ) -> Option<Vec<Picture>> { |
| 676 | 685 | // lane-av1speed3: the wall tables below are read on REAL film as |
| 677 | 686 | // well as on the colour-bar fixture (`bars` vs `film` in the BD |
| @@ -694,7 +703,7 @@ | ||
| 694 | 703 | // therefore `return` on `None` WITHOUT printing a second one -- the |
| 695 | 704 | // second "no fixture" line per gate was the noise that hid this defect. |
| 696 | 705 | let out = ec_testkit::ffmpeg() |
| 697 | - .args(["-v", "error", "-ss", "20", "-i", clip.to_str().unwrap()]) | |
| 706 | + .args(["-v", "error", "-ss", &start.to_string(), "-i", clip.to_str().unwrap()]) | |
| 698 | 707 | .args(["-frames:v", &frames.to_string()]) |
| 699 | 708 | .args(["-vf", &format!("scale={width}:{height}")]) |
| 700 | 709 | .args(["-f", "rawvideo", "-pix_fmt", "yuv420p", "-"]).output() |
| @@ -915,11 +924,13 @@ | ||
| 915 | 924 | ); |
| 916 | 925 | } |
| 917 | 926 | |
| 927 | + const CLEAN_START: u32 = 23; | |
| 928 | + | |
| 918 | 929 | #[test] |
| 919 | 930 | fn bitrate_target_lands_within_5_percent_over_48_frames() { |
| 920 | 931 | let _knobs = crate::speed::knob_read(); |
| 921 | 932 | let (width, height, frames) = (640usize, 384usize, 48usize); |
| 922 | - let Some(pictures) = h264_clip_frames(width, | |
| 933 | + let Some(pictures) = h264_clip_frames_at(CLEAN_START, width, | |
| 923 | 934 | height, |
| 924 | 935 | frames, |
| 925 | 936 | ) else { |