From 62aad8fbfc0dc29eb61005b690b11ffbcb49911b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Sun, 30 Aug 2026 08:01:16 +0300 Subject: [PATCH] test(av1): make the 8x8-OBMC gate's recipe searchable (it has never fired) The gate uses smooth gradients, so aomenc's RD never splits below 16x16: 45 attempts, 0 8x8-OBMC blocks, and it 'passes' by printing SKIP -- the owed 8x8-OBMC debt is exactly this. EC_AV1_OBMC8_SOURCE overrides the lavfi source and EC_OBMC8_ATTEMPTS bounds the loop, so a firing recipe can be searched for without a rebuild. No recipe found yet; the search is the next step. --- crates/ec-av1/src/stream.rs | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/crates/ec-av1/src/stream.rs b/crates/ec-av1/src/stream.rs index 691c0267..ffc434b8 100644 --- a/crates/ec-av1/src/stream.rs +++ b/crates/ec-av1/src/stream.rs @@ -3183,11 +3183,21 @@ mod tests { let mut refusals = Vec::new(); let mut never_fired = 0u32; let mut total_obmc8 = 0usize; - for attempt in 0..80u32 { + let n_attempts: u32 = std::env::var("EC_OBMC8_ATTEMPTS") + .ok() + .and_then(|s| s.parse().ok()) + .unwrap_or(80); + for attempt in 0..n_attempts { let seed = 42 + attempt % 40; let duration = frame_count as f64 / 25.0; - let source = - format!("gradients=size={width}x{height}:seed={seed}:duration={duration}:rate=25"); + // Recipe search hook: `gradients` is smooth, so aomenc's RD never + // splits below 16x16 and this gate never fired one 8x8 OBMC block + // in 45 attempts -- it "passed" by skipping (gate-blind-to-feature). + // EC_AV1_OBMC8_SOURCE overrides the lavfi source so a firing recipe + // can be searched for without a rebuild. + let source = std::env::var("EC_AV1_OBMC8_SOURCE").unwrap_or_else(|_| { + format!("gradients=size={width}x{height}:seed={seed}:duration={duration}:rate=25") + }); let y4m = Command::new("ffmpeg") .args([ "-v",