forge
Explore
Log in

Don't you dare go Hollow

Drive the film-grain sweep with the repo aomenc and the supported-envelope recipe

Browse files at this commit

4da5dbf135004ba45746c659ab0026bb672cf977Ahmet Kaan GümüşParent: 84e41d9
  • test
    • drive the film-grain sweep with the repo aomenc and the supported-envelope recipe
Show full message
test(av1): drive the film-grain sweep with the repo aomenc and the supported-envelope recipe

The sweep probed bare `aomenc` on PATH (always absent) and so always
skipped; it now uses aomenc_path() like every other gate. The recipe
adopts the forwarding gate's constraint set so the streams stay inside
the decoder's supported envelope, with --tune-content=film as the one
flag under test. At 64x64 the streams now reach the GOLDEN_FRAME
refusal on this branch; the test goes green once the mvstack
extension-pass fix (lane-av1golden8) merges and unmasks GOLDEN.
crates/ec-av1/src/stream.rsmodified+47 -17
@@ -2453,17 +2453,11 @@ mod tests {
2453 eprintln!("SKIP real_aomenc_film_grain_streams_decode_pixel_exact: no ffmpeg");2453 eprintln!("SKIP real_aomenc_film_grain_streams_decode_pixel_exact: no ffmpeg");
2454 return;2454 return;
2455 }2455 }
2456- let have_aomenc = Command::new("aomenc")2456+ if !have_aomenc() {
2457- .arg("--help")
2458- .stdout(Stdio::null())
2459- .stderr(Stdio::null())
2460- .status()
2461- .is_ok_and(|s| s.success());
2462- if !have_aomenc {
2463 eprintln!("SKIP real_aomenc_film_grain_streams_decode_pixel_exact: no aomenc");2457 eprintln!("SKIP real_aomenc_film_grain_streams_decode_pixel_exact: no aomenc");
2464 return;2458 return;
2465 }2459 }
2466- let (width, height) = (64usize, 48usize);2460+ let (width, height) = (64usize, 64usize);
2467 for seed in [1u64, 2, 3] {2461 for seed in [1u64, 2, 3] {
2468 let dir = std::env::temp_dir().join(format!(2462 let dir = std::env::temp_dir().join(format!(
2469 "ec-av1-filmgrain-gate-{}-{seed}",2463 "ec-av1-filmgrain-gate-{}-{seed}",
@@ -2483,21 +2477,57 @@ mod tests {
2483 yuv.extend_from_slice(&card.v);2477 yuv.extend_from_slice(&card.v);
2484 }2478 }
2485 std::fs::write(&yuv_path, &yuv).unwrap();2479 std::fs::write(&yuv_path, &yuv).unwrap();
2486- let status = Command::new("aomenc")2480+ let status = Command::new(aomenc_path())
2487 .args([2481 .args([
2488- "--width",2482+ &format!("--width={width}"),
2489- &width.to_string(),2483+ &format!("--height={height}"),
2490- "--height",
2491- &height.to_string(),
2492 "--input-bit-depth=8",2484 "--input-bit-depth=8",
2493 "--bit-depth=8",2485 "--bit-depth=8",
2494 "--fps=25/1",2486 "--fps=25/1",
2495- "--limit",2487+ &format!("--limit={frames}"),
2496- &frames.to_string(),2488+ // The full constraint set of the forwarding/golden gates,
2497- "--tune-content=film",2489+ // so the streams stay inside this decoder's supported
2498- "--cpu-used=6",2490+ // envelope and the gate isolates grain synthesis alone;
2491+ // `--tune-content=film` is the one flag under test (it
2492+ // enables apply_grain).
2493+ "--codec=av1",
2494+ "--passes=1",
2499 "--end-usage=q",2495 "--end-usage=q",
2500 "--cq-level=32",2496 "--cq-level=32",
2497+ "--cpu-used=0",
2498+ "--lag-in-frames=0",
2499+ "--auto-alt-ref=0",
2500+ "--kf-max-dist=1000",
2501+ "--threads=1",
2502+ "--row-mt=0",
2503+ "--max-reference-frames=3",
2504+ "--reduced-reference-set=1",
2505+ "--enable-warped-motion=0",
2506+ "--enable-obmc=0",
2507+ "--enable-masked-comp=0",
2508+ "--enable-interintra-comp=0",
2509+ "--enable-dist-wtd-comp=0",
2510+ "--enable-diff-wtd-comp=0",
2511+ "--enable-onesided-comp=0",
2512+ "--enable-interintra-wedge=0",
2513+ "--enable-smooth-interintra=0",
2514+ "--enable-rect-partitions=0",
2515+ "--enable-ab-partitions=0",
2516+ "--enable-1to4-partitions=0",
2517+ "--enable-filter-intra=0",
2518+ "--enable-smooth-intra=0",
2519+ "--enable-paeth-intra=0",
2520+ "--enable-directional-intra=0",
2521+ "--enable-angle-delta=0",
2522+ "--enable-tx-size-search=0",
2523+ "--enable-cdef=0",
2524+ "--enable-restoration=0",
2525+ "--max-partition-size=32",
2526+ "--min-partition-size=32",
2527+ "--enable-palette=0",
2528+ "--enable-intrabc=0",
2529+ "--enable-cfl-intra=0",
2530+ "--tune-content=film",
2501 "--obu",2531 "--obu",
2502 "-o",2532 "-o",
2503 ])2533 ])