From 14264898624d8b83d590f6e345bba0c3a76aed7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Sat, 19 Sep 2026 19:03:10 +0300 Subject: [PATCH] vp9refsetup: regenerate the odd fixture from the current patcher; narrow the ffmpeg claim - tests/data/scaledref_odd.ivf now reproduces from gen_scaledref.c + patch_kf_size.py 1279 719 (sha256 af289a0f8dd91bfa854adeac1814dc77644ad87b9df0af884d33abaae2595413); the old bytes predated the patcher's IVF container-header rewrite (3 bytes). Still byte-identical to libvpx (drv_pix3 vs ours, 4490801 bytes, cmp). - the "ffmpeg SIGSEGVs on a changing filter output" wording is narrowed to the verified scope: the scale=...:eval=frame route exits 139 with a 0-byte file, and independently ffmpeg's output size is locked to the first decoded frame. --- crates/ec-vp9/tests/data/scaledref_odd.ivf | Bin 5782 -> 5782 bytes crates/ec-vp9/tests/scaledref_exact.rs | 10 ++++++---- lanes/vp9refsetup.report.md | 12 ++++++++---- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/crates/ec-vp9/tests/data/scaledref_odd.ivf b/crates/ec-vp9/tests/data/scaledref_odd.ivf index 79ab1c7a55e1cfe2449e2122fcea2a298dad3357..b2203f5475d5b516c8dfbb66d7f3a3fafc56a5e0 100644 GIT binary patch delta 24 fcmbQHJ5870#oN=3fkA;GEWpy>Kg;=z{Ow`@QlkeF delta 24 fcmbQHJ5870#oN=3fkA;GEWpx$f%U>h{&q0{OSJ|S diff --git a/crates/ec-vp9/tests/scaledref_exact.rs b/crates/ec-vp9/tests/scaledref_exact.rs index a55619e0..10ed9449 100644 --- a/crates/ec-vp9/tests/scaledref_exact.rs +++ b/crates/ec-vp9/tests/scaledref_exact.rs @@ -10,12 +10,14 @@ //! The fixtures are committed under `tests/data/` because no ffmpeg //! invocation can produce a size change: libvpx's encoder emits one only //! through its rate-control resize path (ffmpeg exposes neither -//! `rc_resize_allowed` nor SVC and crashes outright on a changing filter -//! output), and a hand-spliced explicit-size inter frame trips libvpx's own -//! header reparsing. The generator is recorded in +//! `rc_resize_allowed` nor SVC; its `scale=...:eval=frame` route exits 139 +//! with a 0-byte file), and a hand-spliced explicit-size inter frame trips +//! libvpx's own header reparsing. The generator is recorded in //! `lanes/vp9refsetup.report.md`: a 1280x720 one-pass CBR encode at 200 kbps, //! whose `vp9_resize_one_pass_cbr` downscales frame 1 to 640x360 against the -//! keyframe. +//! keyframe. `scaledref_odd.ivf` is that same file through +//! `$HOME/.cache/vp9pix/patch_kf_size.py 1279 719` (which rewrites +//! the IVF container size too). //! //! Oracle caveat: ffmpeg locks its rawvideo output size to the FIRST decoded //! frame's, so a two-size stream cannot be dumped in one pass. Frame 0 is diff --git a/lanes/vp9refsetup.report.md b/lanes/vp9refsetup.report.md index 069899a1..900c1513 100644 --- a/lanes/vp9refsetup.report.md +++ b/lanes/vp9refsetup.report.md @@ -64,9 +64,12 @@ None of these can be produced by an ffmpeg invocation: byte (`cmp` verified). 11 frames: keyframe, hidden intra-only twin, 9 inter. * **size change**: libvpx's encoder resizes only through rate control (`vp9_resize_one_pass_cbr`, `vp9_ratectrl.c:2728`); ffmpeg exposes neither - `rc_resize_allowed` nor SVC, and its filtergraph SIGSEGVs (exit 139) on a - changing output size. Generated by `lanes/vp9refsetup/gen_scaledref.c` - (links the pristine libvpx 1.15.0 encoder): + `rc_resize_allowed` nor SVC. Its `scale=...:eval=frame` route into ivf/webm + exits 139 with a 0-byte file (ffmpeg 8.1.2), and independently ffmpeg's + rawvideo/muxer output size is locked to the first decoded frame (see the + oracle caveat), so it cannot express the change either way. Generated by + `lanes/vp9refsetup/gen_scaledref.c` (links the pristine libvpx 1.15.0 + encoder): ``` gcc -I -I/vpx gen_scaledref.c /libvpx.a -o enc -lm -lpthread ./enc scaledref.ivf 1280 720 10 200 # one-pass CBR, 200 kbps, lag 0 @@ -78,7 +81,8 @@ None of these can be produced by an ffmpeg invocation: size fields patched 1280x720 -> 1279x719 (mi-grid invariant, so the tile data stays valid) — the reference is then an odd coded extent and its chroma crop ceils. Patch with the existing - `$HOME/.cache/vp9pix/patch_kf_size.py 1279 719`. + `$HOME/.cache/vp9pix/patch_kf_size.py 1279 719`, which rewrites the + IVF container size as well (`sha256 af289a0f8dd91bfa854adeac1814dc77644ad87b9df0af884d33abaae2595413`). ## Gates