forge
Explore
Log in

Don't you dare go Hollow

B19: ec-bench seek every extract (shared SEEK_SECONDS=30); -ss 60 exceeds the 52.2s fixtures (ffprobe) and yielded 0 bytes

Browse files at this commit

c96fce6c392254005ddc07873f582419a5018f4eAhmet Kaan GümüşParent: 9f44fb4
tools/ec-bench/src/main.rsmodified+7 -5
@@ -83,6 +83,8 @@ fn media_dir() -> PathBuf {
8383 .map_or_else(ec_testkit::root, PathBuf::from)
8484 }
8585
86+const SEEK_SECONDS: &str = "30";
87+
8688 fn real_video(codec: &str) -> Option<PathBuf> {
8789 let name = match codec {
8890 "h264" => "open/sintel_trailer-1080p.mp4",
@@ -210,7 +212,7 @@ fn bench_h264(rows: &mut Vec<Row>) -> ec_core::Result<()> {
210212 /// ffmpeg.
211213 fn extract_yuv420p(src: &Path, w: u32, h: u32, n: u32) -> (Vec<u8>, u32, u32, u32) {
212214 let out = ec_testkit::ffmpeg()
213- .args(["-v", "error", "-i"])
215+ .args(["-v", "error", "-ss", SEEK_SECONDS, "-i"])
214216 .arg(src)
215217 .args([
216218 "-vf",
@@ -439,19 +441,19 @@ fn bench_hw_av1_encode_10bit(rows: &mut Vec<Row>) {
439441 rows.push(Row {
440442 component: "ec-hw av1 10-bit",
441443 direction: "encode",
442- content: format!("{w}x{h} yuv420p10le, {n} frames from 00:01:00, CQP 120, {} kB", coded / 1000),
444+ content: format!("{w}x{h} yuv420p10le, {n} frames from 00:00:30, CQP 120, {} kB", coded / 1000),
443445 media: format!("{media_s:.1}s"),
444446 wall_ms: wall * 1000.0,
445447 rtf: (wall > 0.0).then_some(media_s / wall),
446448 });
447449 }
448450
449-/// `extract_yuv420p` at ten bits, planar 16-bit little endian, seeked a
450-/// minute in: frame 0 of a film is its black leader, and a black leader codes
451+/// `extract_yuv420p` at ten bits, planar 16-bit little endian, seeked
452+/// into the clip: frame 0 of a film is its black leader, and a black leader codes
451453 /// to nothing and benchmarks nothing.
452454 fn extract_yuv420p10(src: &Path, w: u32, h: u32, n: u32) -> Vec<u8> {
453455 let out = ec_testkit::ffmpeg()
454- .args(["-v", "error", "-ss", "60", "-i"])
456+ .args(["-v", "error", "-ss", SEEK_SECONDS, "-i"])
455457 .arg(src)
456458 .args([
457459 "-vf", &format!("scale={w}:{h}"),