forge
Explore
Log in

Don't you dare go Hollow

Make the 8x8-OBMC gate's recipe searchable (it has never fired)

Browse files at this commit

62aad8fbfc0dc29eb61005b690b11ffbcb49911bAhmet Kaan GümüşParent: 1db238b
  • test
    • make the 8x8-OBMC gate's recipe searchable (it has never fired)
Show full message
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.rsmodified+13 -3
@@ -3183,11 +3183,21 @@ mod tests {
3183 let mut refusals = Vec::new();3183 let mut refusals = Vec::new();
3184 let mut never_fired = 0u32;3184 let mut never_fired = 0u32;
3185 let mut total_obmc8 = 0usize;3185 let mut total_obmc8 = 0usize;
3186- for attempt in 0..80u32 {3186+ let n_attempts: u32 = std::env::var("EC_OBMC8_ATTEMPTS")
3187+ .ok()
3188+ .and_then(|s| s.parse().ok())
3189+ .unwrap_or(80);
3190+ for attempt in 0..n_attempts {
3187 let seed = 42 + attempt % 40;3191 let seed = 42 + attempt % 40;
3188 let duration = frame_count as f64 / 25.0;3192 let duration = frame_count as f64 / 25.0;
3189- let source =3193+ // Recipe search hook: `gradients` is smooth, so aomenc's RD never
3190- format!("gradients=size={width}x{height}:seed={seed}:duration={duration}:rate=25");3194+ // splits below 16x16 and this gate never fired one 8x8 OBMC block
3195+ // in 45 attempts -- it "passed" by skipping (gate-blind-to-feature).
3196+ // EC_AV1_OBMC8_SOURCE overrides the lavfi source so a firing recipe
3197+ // can be searched for without a rebuild.
3198+ let source = std::env::var("EC_AV1_OBMC8_SOURCE").unwrap_or_else(|_| {
3199+ format!("gradients=size={width}x{height}:seed={seed}:duration={duration}:rate=25")
3200+ });
3191 let y4m = Command::new("ffmpeg")3201 let y4m = Command::new("ffmpeg")
3192 .args([3202 .args([
3193 "-v",3203 "-v",