mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-12 08:52:32 +00:00
* craft-video: AV1 decoder from FilmCraft (`av1-decode` feature) FilmCraft's crates/av1 at 4c0d2ad7 becomes craft_video::av1::decode. The encoder moves to av1/encode and is still exported from craft_video::av1. Feature av1 now turns on av1-decode and av1-encode, so either half can be built without the other. The ignored speed tests no longer read the thread CPU clock (FilmCraft used rustix for it). craft_video::budget (the picture memory budget from DeckCraft's bitstream crate) is added for the next commit. craft-video is built at opt-level 3 in the dev profile, as FilmCraft built its codecs. * craft-video: AV1 decoder hardening from DeckCraft's copy - The picture store (eight reference slots, the new frame, frames in flight) is checked against a memory budget before a frame is allocated; Decoder::set_memory_budget. - Non-uniform tile spacing is refused past MAX_TILE_COLS columns or MAX_TILE_ROWS rows. * craft-video: AV1 fuzz seeds are 64x64 so SVT-AV1 2.x can encode them FilmCraft's seeds were 64x48; the SVT-AV1 2.3 on the Ubuntu runners refuses a source under 64 lines, and an encoder that exists but fails is a test failure, not a skip.
31 lines
1.9 KiB
Markdown
31 lines
1.9 KiB
Markdown
# 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 for `wasm32-unknown-unknown`.
|
|
- Containers (MP4/MOV, Matroska/WebM), bit-level I/O (`craft_media::bitstream`) and shared
|
|
identifiers (`CodecId`, `CodecParams`) come from [`craft-media`](../media/README.md).
|
|
|
|
## Cargo features
|
|
|
|
No codec feature is on by default.
|
|
|
|
| Feature | Module | Codec |
|
|
|---|---|---|
|
|
| `dnx` | [`dnx`](src/dnx/README.md) | Avid DNxHD / DNxHR (SMPTE ST 2019-1 VC-3): decoder and encoder |
|
|
| `apv` | [`apv`](src/apv/README.md) | APV (Advanced Professional Video, RFC 9924): decoder (`apv-decode` alone) and encoder (`apv-encode` alone) |
|
|
| `vp8` | `vp8` | VP8 (RFC 6386): decoder |
|
|
| `mpeg2` | [`mpeg2`](src/mpeg2/README.md) | MPEG-2 video (ITU-T H.262) and MPEG-1 video (ISO/IEC 11172-2): decoder |
|
|
| `prores` | `prores` | Apple ProRes (SMPTE RDD 36): decoder and encoder |
|
|
| `h264` | [`h264`](src/h264/decode/README.md) | ITU-T H.264 / AVC: decoder (`h264-decode` alone) and encoder (`h264-encode` alone) |
|
|
| `hevc` | [`hevc`](src/hevc/decode/README.md) | ITU-T H.265 / HEVC: decoder (`hevc-decode` alone) and encoder (`hevc-encode` alone) |
|
|
| `vp9` | [`vp9`](src/vp9/decode/README.md) | VP9: decoder (`vp9-decode` alone) and encoder (`vp9-encode` alone) |
|
|
| `av1` | [`av1`](src/av1/decode/README.md) | AV1 (AOMedia Video 1): decoder (`av1-decode` alone) and encoder (`av1-encode` alone) |
|
|
| `threads` | — | Multi-threaded slice/row parallelism via `rayon` |
|