forge
Explore
Log in

Don't you dare go Hollow

Bound the 8x8-OBMC gate's ffmpeg source with -t

Browse files at this commit

90aeec8f41c23ff7861e62d1e57e0f87795b80c2Ahmet Kaan GümüşParent: e33ddfa
  • fix
    • bound the 8x8-OBMC gate's ffmpeg source with -t
    • correct a false refusal claim
Show full message
fix(av1): bound the 8x8-OBMC gate's ffmpeg source with -t; correct a false refusal claim

The gate's EC_AV1_OBMC8_SOURCE override lets a caller supply a lavfi source
that carries no `duration=` of its own; `testsrc2` is endless, so the y4m pipe
never closed and the gate hung to its 300 s timeout. `-t` is the bound that
holds for every source. Third instance of the class (mandelbrot `end_pts`
twice before): bound the trim inside ffmpeg on decode, bound the duration with
`-t` on generate.

With the bound in place the gate runs 80 attempts in 7 s and shows why it has
never fired one 8x8 OBMC block: decode.rs refuses every inter partition below
16x16. Its message claimed "this encoder never writes one", which the run
disproves -- reworded to name the real gap.
crates/ec-av1/src/decode.rsmodified+1 -1
@@ -8169,7 +8169,7 @@ pub(crate) fn decode_inter_frame_tile_with_cdfs(
8169 let part16 = dec.symbol(&mut cdfs.partition_w16[ctx16]);8169 let part16 = dec.symbol(&mut cdfs.partition_w16[ctx16]);
8170 if part16 != PARTITION_NONE {8170 if part16 != PARTITION_NONE {
8171 return Err(unsupported(8171 return Err(unsupported(
8172- "a partition below 16x16 (this encoder never writes one)",8172+ "an inter partition below 16x16 (8x8 and smaller inter blocks are not coded yet)",
8173 ));8173 ));
8174 }8174 }
8175 decode_inter_block(8175 decode_inter_block(
crates/ec-av1/src/stream.rsmodified+7 -0
@@ -3203,6 +3203,11 @@ mod tests {
3203 let source = std::env::var("EC_AV1_OBMC8_SOURCE").unwrap_or_else(|_| {3203 let source = std::env::var("EC_AV1_OBMC8_SOURCE").unwrap_or_else(|_| {
3204 format!("gradients=size={width}x{height}:seed={seed}:duration={duration}:rate=25")3204 format!("gradients=size={width}x{height}:seed={seed}:duration={duration}:rate=25")
3205 });3205 });
3206+ // A source supplied through EC_AV1_OBMC8_SOURCE need not carry its
3207+ // own `duration=`; `-t` is the bound that always holds. Without it
3208+ // an endless source (`testsrc2`) fills the pipe forever and the
3209+ // gate hangs to its 300 s timeout.
3210+ let duration_arg = format!("{duration}");
3206 let y4m = Command::new("ffmpeg")3211 let y4m = Command::new("ffmpeg")
3207 .args([3212 .args([
3208 "-v",3213 "-v",
@@ -3211,6 +3216,8 @@ mod tests {
3211 "lavfi",3216 "lavfi",
3212 "-i",3217 "-i",
3213 &source,3218 &source,
3219+ "-t",
3220+ &duration_arg,
3214 "-pix_fmt",3221 "-pix_fmt",
3215 "yuv420p",3222 "yuv420p",
3216 "-f",3223 "-f",