mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-14 06:22:24 +00:00
* craft-video: VP9 decoder from FilmCraft (`vp9-decode` feature) FilmCraft's crates/vp9 at 4c0d2ad7 becomes craft_video::vp9::decode. The encoder moves to vp9/encode and is still exported from craft_video::vp9. Feature vp9 now turns on vp9-decode and vp9-encode, so either half can be built without the other. The decoder's tests find ffmpeg and the fixture directory through craft-media-testkit; a fixture that cannot be generated fails under CRAFT_MEDIA_REQUIRE_ORACLES=1. craft-video is built at opt-level 3 in the dev profile, as FilmCraft built its codecs. * craft-video: VP9 decoder checks its picture store against a memory budget DeckCraft's copy of the decoder refuses a frame size whose pictures (eight reference slots, the new frame and those in flight) would not fit a byte budget. The budget type comes with it as craft_video::budget; FilmCraft's 2^26 luma sample cap stays.
craft-video
Clean-room pure-Rust video codecs for the Craft apps, one feature per codec: DNxHD/DNxHR, VP8, ProRes and H.264.
- Input and output are byte slices and planar sample buffers; the crate opens no files itself and performs no filesystem I/O.
- Implemented from published standards and RFCs (SMPTE ST 2019-1, RFC 6386, SMPTE RDD 36 and ITU-T H.264).
- Tested against ffmpeg as an external oracle with roundtrips, hostile fuzzing, and conformance vectors.
No
unsafe, no panics on corrupt streams. Builds forwasm32-unknown-unknown. - Containers (MP4/MOV, Matroska/WebM), bit-level I/O (
craft_media::bitstream) and shared identifiers (CodecId,CodecParams) come fromcraft-media.
Cargo features
No codec feature is on by default.
| Feature | Module | Codec |
|---|---|---|
dnx |
dnx |
Avid DNxHD / DNxHR (SMPTE ST 2019-1 VC-3): decoder and encoder |
vp8 |
vp8 |
VP8 (RFC 6386): decoder |
prores |
prores |
Apple ProRes (SMPTE RDD 36): decoder and encoder |
h264 |
h264 |
ITU-T H.264 / AVC: encoder |
hevc |
hevc |
ITU-T H.265 / HEVC: encoder |
vp9 |
vp9 |
VP9: decoder (vp9-decode alone) and encoder (vp9-encode alone) |
av1 |
av1 |
AV1 (AOMedia Video 1): encoder |
threads |
— | Multi-threaded slice/row parallelism via rayon |