vp9refsetup: regenerate the odd fixture from the current patcher; narrow the ffmpeg claim
Browse files at this commit14264898624d8b83d590f6e345bba0c3a76aed7aParent: 2251b713 changed files +14 -8
- crates/ec-vp9/tests/data/scaledref_odd.ivf +0 -0
- crates/ec-vp9/tests/scaledref_exact.rs +6 -4
- lanes/vp9refsetup.report.md +8 -4
crates/ec-vp9/tests/data/scaledref_odd.ivfmodified+0 -0
Binary file changed
crates/ec-vp9/tests/scaledref_exact.rsmodified+6 -4
| @@ -10,12 +10,14 @@ | ||
| 10 | 10 | //! The fixtures are committed under `tests/data/` because no ffmpeg |
| 11 | 11 | //! invocation can produce a size change: libvpx's encoder emits one only |
| 12 | 12 | //! through its rate-control resize path (ffmpeg exposes neither |
| 13 | -//! `rc_resize_allowed` nor SVC and crashes outright on a changing filter | |
| 14 | -//! output), and a hand-spliced explicit-size inter frame trips libvpx's own | |
| 15 | -//! header reparsing. The generator is recorded in | |
| 13 | +//! `rc_resize_allowed` nor SVC; its `scale=...:eval=frame` route exits 139 | |
| 14 | +//! with a 0-byte file), and a hand-spliced explicit-size inter frame trips | |
| 15 | +//! libvpx's own header reparsing. The generator is recorded in | |
| 16 | 16 | //! `lanes/vp9refsetup.report.md`: a 1280x720 one-pass CBR encode at 200 kbps, |
| 17 | 17 | //! whose `vp9_resize_one_pass_cbr` downscales frame 1 to 640x360 against the |
| 18 | -//! keyframe. | |
| 18 | +//! keyframe. `scaledref_odd.ivf` is that same file through | |
| 19 | +//! `$HOME/.cache/vp9pix/patch_kf_size.py <in> <out> 1279 719` (which rewrites | |
| 20 | +//! the IVF container size too). | |
| 19 | 21 | //! |
| 20 | 22 | //! Oracle caveat: ffmpeg locks its rawvideo output size to the FIRST decoded |
| 21 | 23 | //! frame's, so a two-size stream cannot be dumped in one pass. Frame 0 is |
lanes/vp9refsetup.report.mdmodified+8 -4
| @@ -64,9 +64,12 @@ None of these can be produced by an ffmpeg invocation: | ||
| 64 | 64 | byte (`cmp` verified). 11 frames: keyframe, hidden intra-only twin, 9 inter. |
| 65 | 65 | * **size change**: libvpx's encoder resizes only through rate control |
| 66 | 66 | (`vp9_resize_one_pass_cbr`, `vp9_ratectrl.c:2728`); ffmpeg exposes neither |
| 67 | - `rc_resize_allowed` nor SVC, and its filtergraph SIGSEGVs (exit 139) on a | |
| 68 | - changing output size. Generated by `lanes/vp9refsetup/gen_scaledref.c` | |
| 69 | - (links the pristine libvpx 1.15.0 encoder): | |
| 67 | + `rc_resize_allowed` nor SVC. Its `scale=...:eval=frame` route into ivf/webm | |
| 68 | + exits 139 with a 0-byte file (ffmpeg 8.1.2), and independently ffmpeg's | |
| 69 | + rawvideo/muxer output size is locked to the first decoded frame (see the | |
| 70 | + oracle caveat), so it cannot express the change either way. Generated by | |
| 71 | + `lanes/vp9refsetup/gen_scaledref.c` (links the pristine libvpx 1.15.0 | |
| 72 | + encoder): | |
| 70 | 73 | ``` |
| 71 | 74 | gcc -I<libvpx> -I<libvpx>/vpx gen_scaledref.c <libvpx>/libvpx.a -o enc -lm -lpthread |
| 72 | 75 | ./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: | ||
| 78 | 81 | size fields patched 1280x720 -> 1279x719 (mi-grid invariant, so the tile data |
| 79 | 82 | stays valid) — the reference is then an odd coded extent and its chroma crop |
| 80 | 83 | ceils. Patch with the existing |
| 81 | - `$HOME/.cache/vp9pix/patch_kf_size.py <in> <out> 1279 719`. | |
| 84 | + `$HOME/.cache/vp9pix/patch_kf_size.py <in> <out> 1279 719`, which rewrites the | |
| 85 | + IVF container size as well (`sha256 af289a0f8dd91bfa854adeac1814dc77644ad87b9df0af884d33abaae2595413`). | |
| 82 | 86 | |
| 83 | 87 | ## Gates |
| 84 | 88 |