mirror of
https://github.com/storytold/filmcraft.git
synced 2026-10-24 10:10:05 -06:00
HW5: Linux VA-API H.264 hardware decoding (#30)
Stateless VA-API decoding with FilmCraft's own H.264 host side: the software decoder's SPS/PPS/slice-header parsers and its DPB (now generic over the picture type in filmcraft-h264) drive the GPU, so reference marking, reference lists and output order are shared and the pictures are bit-exact with the software decoder. libva is loaded at run time; no libva or driver means software decoding as before. frame_num gaps (open-GOP seeks) get the software decoder's stand-in frames. HybridDecoder keeps the transparent software fallback. Tests: hardware parity on 7 H.264 streams incl. 1080p/2160p, seeks, flushes, forced failures, fuzzing, concurrency; front end against a recording stand-in on every OS; ABI checks against va.h. Docs: platform README, ADR 0001 addendum, architecture, performance (H.264 2160p CPU per frame 417 -> 11 ms on Iris Xe), roadmap. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
5231852443
commit
3496e553e7
@@ -21,7 +21,7 @@ panic path, and fix a crash before building on top of it. The cross-app standard
|
||||
code alone (a literal that always parses): a single-item `#[allow(clippy::expect_used)]` with the reason.
|
||||
3. **No `unsafe`** (`unsafe_code = "forbid"` for the workspace). The single exception is
|
||||
`crates/platform`, which needs `unsafe` to call the operating system's media APIs (hardware
|
||||
video decoding through VideoToolbox and Media Foundation / Direct3D 11; later encoding and Linux) and does nothing else. It
|
||||
video decoding through VideoToolbox, Media Foundation / Direct3D 11 and VA-API; hardware encoding) and does nothing else. It
|
||||
uses `unsafe_code = "deny"` with `#[allow(unsafe_code)]` only on its FFI modules, a
|
||||
`// SAFETY:` comment on every `unsafe` block, a safe `Result`-returning public API, and the
|
||||
pure-Rust decoder as the tested fallback ([ADR 0001](docs/adr/0001-platform-ffi.md)).
|
||||
|
||||
Reference in New Issue
Block a user