rawshift-hwdec's sequence seam decodes random access points only. An access unit that references other pictures is refused with a clear error (vaapi/video.rs), so keyframe extraction, thumbnails, scrubbing and All-Intra camera modes work, but ordinary long-GOP recordings decode one frame per GOP.
Completing it is a purely internal change behind an unchanged public API — HwVideoDecoder already splits send-packet from receive-frame precisely so reordered output has somewhere to go — so it needs no second breaking release.
What it takes, per codec:
- HEVC — POC derivation (needs
nuh_temporal_id_plus1, which nal_type currently discards, for prevTid0Pic); the full st_ref_pic_set derivation including inter-RPS prediction (today's parse_st_ref_pic_set only counts entries); long-term entries; RefPicSetStCurrBefore/StCurrAfter/LtCurr; reference lists; RASL discard after a CRA that starts the stream or follows a reset. parse_sps currently reads and discards sps_max_num_reorder_pics and sps_max_latency_increase_plus1; both are needed for the bumping process.
- H.264 — see the separate issue for its picture-parameter path first.
- Shared — a decoded picture buffer with surface lifetimes, the Annex C bumping process, and populating
ReferenceFrames / RefPicList in the VA buffers.
Notes for whoever picks this up:
- Reorder must live in hwdec, not the caller: VAAPI is a slice-level API where the caller supplies the reference lists, so the buffer and the ordering cannot live above it.
- The DPB is a pure function over synthetic inputs and should be table-tested (POC types, MMCO, sliding window, hierarchical-B pyramids) without any GPU.
- The device test should assert bit-exactness against ffmpeg's software decode, not a variance heuristic — H.264/HEVC decode is normative, and only bit-exactness catches a wrong reference list or scaling matrix.
- Consider splitting the pure-Rust codec logic out from under
cfg(hwdec_backend = "vaapi"): the test CI job runs cargo test --workspace with no features, so none of the existing parser unit tests run there today.
Follow-up to #39.
rawshift-hwdec's sequence seam decodes random access points only. An access unit that references other pictures is refused with a clear error (vaapi/video.rs), so keyframe extraction, thumbnails, scrubbing and All-Intra camera modes work, but ordinary long-GOP recordings decode one frame per GOP.Completing it is a purely internal change behind an unchanged public API —
HwVideoDecoderalready splits send-packet from receive-frame precisely so reordered output has somewhere to go — so it needs no second breaking release.What it takes, per codec:
nuh_temporal_id_plus1, whichnal_typecurrently discards, forprevTid0Pic); the fullst_ref_pic_setderivation including inter-RPS prediction (today'sparse_st_ref_pic_setonly counts entries); long-term entries;RefPicSetStCurrBefore/StCurrAfter/LtCurr; reference lists; RASL discard after a CRA that starts the stream or follows a reset.parse_spscurrently reads and discardssps_max_num_reorder_picsandsps_max_latency_increase_plus1; both are needed for the bumping process.ReferenceFrames/RefPicListin the VA buffers.Notes for whoever picks this up:
cfg(hwdec_backend = "vaapi"): thetestCI job runscargo test --workspacewith no features, so none of the existing parser unit tests run there today.Follow-up to #39.