forge
Explore
Log in

Don't you dare go Hollow

Commits

Commits on 03dc6e9978cbbbba112bf5c6ad925845ede8c744Filtered to scripts/gen-fixtures.shClear filter

2026-08-20

fix(h264): drop leading pictures after a seek's open-GOP recovery pointAhmet Kaan Gümüş · 03dc6e9
fix(h264): drop leading pictures after a seek's open-GOP recovery point

Root cause (crates/ec-h264/src/dpb.rs, crates/ec-h264/src/decoder.rs;
mirrored in crates/ec-hw/src/dec/dpb264.rs, crates/ec-hw/src/dec/h264.rs):
an open-GOP I picture is not an IDR — it is a plain I slice whose
predecessors in decode order can still be referenced by pictures that
follow it. A decoder started fresh at that I (exactly what a seek does)
has none of those earlier references, so `build_ref_lists` pads the
missing entries with whatever it has. The old code decoded and output
those leading pictures anyway, handing back frames predicted from padded
(garbage) references before the stream ever reaches a picture whose
references are all real.

Annex D.2.8 defines a `recovery_point` SEI whose absence (the common
case, and this fixture's case) defaults `recovery_frame_cnt` to 0: the
recovery point is the RAP's own POC, i.e. only pictures with a POC at or
after the leading I's own POC are guaranteed fully referenced. The SEI
itself is deliberately not parsed — the default already gives the
correct threshold for the case that matters (mid-GOP seek), and a real
non-zero `recovery_frame_cnt` is out of scope for this fix.

`build_ref_lists` now returns whether it had to pad a list
((lists, padded)); `Decoder`/`H264Decoder` OR that per-slice into
`cur_ref_padded`/`Current::ref_padded`, latch the first post-reset
picture's POC into `recovery_poc` on `end_picture`/`finish_picture`, and
compute `output_ok = !(ref_padded && poc < recovery_poc)`. `Dpb::store`
takes that flag and marks the picture `Mark::Unused`-eligible for output
gating (`pic.output = output_ok`) — it still joins the DPB as a
reference and for bookkeeping, but a gated picture is never handed to a
caller. `reset_pictures` clears `recovery_poc` so a later seek gets its
own threshold.

New test `h264_seek_matches_linear_open_gop` in both suites drives this
through the real entry surface: fixtures/video/h264-open-gop.mp4
(x264 open-GOP, generated via scripts/gen-fixtures.sh) primes a fresh
decoder with the leading IDR's parameter sets, resets picture state (a
seek's exact contract), feeds it from the open-GOP I access unit before
display frame 30, and asserts the first decoded picture matches a linear
decode of frame 30. Confirmed failing before this fix (forcing
output_ok true reproduces the mismatch) and passing after, on both the
software decoder (crates/ec-h264/tests/conformance.rs) and the VA-API
path (crates/ec-hw/tests/gpu.rs, real hardware).

cargo test -p ec-h264: 70 lib + 23 conformance + 8 encode passed, 0
failed. cargo test -p ec-hw --test gpu -- --test-threads=1: 19 passed
(18 pre-existing + the new one), 0 failed.

2026-08-14

test(fixtures): 24-bit ALAC, Matroska-carried audio and cover artAhmet Kaan Gümüş · abd41b6
test(fixtures): 24-bit ALAC, Matroska-carried audio and cover art

24-bit ALAC is the only path where a sample's low bytes ride
uncompressed beside the residuals; Matroska-carried aac/flac/opus and a
video-plus-sound mkv are what the probe delegates; the two cover-art
files are the claim that a still picture is never listed as a video
track.

The mp4 tests drop attached pictures from their ffprobe oracle for the
same reason: this crate does not list one, deliberately, and does not
write one either.
test(fixtures): add 1916x1080 h264/hevc samples for the cropping rectAhmet Kaan Gümüş · 0dc3e2b
test(fixtures): add 1916x1080 h264/hevc samples for the cropping rect

Every other video fixture is CTU-aligned; the local library contains BluRay remuxes at 1916x1080, which is where a conformance-window bug shows up.
feat(oracle): fixture scripts + comparison harnessAhmet Kaan Gümüş · d207f1d
feat(oracle): fixture scripts + comparison harness

gen-fixtures.sh: 87 deterministic ffmpeg fixtures (10 audio codecs x mono/stereo/5.1 x 44.1/48k, 4 video codecs x mp4/mkv x 23.976/60 x 8/10-bit, 4K sample per codec).
fetch-vectors.sh: JVT H.264, JCT-VC HEVC, RFC6716 Opus, cellar FLAC, Xiph Vorbis; checksum-pinned in scripts/vectors.sha256, resumable, per-set graceful failure.
scan-real-library.sh: read-only ffprobe sweep of the local media dirs into fixtures/real-library-manifest.tsv (T3 gate input).
tools/oracle: std-only bin driving ffmpeg/ffprobe through process pipes (bit-exact, audio-compare, video-compare); ffmpeg stays test tooling, never a crate dep.