Files
craft-libs/crates/video
Melchi Aaron Zedek bb57d422d0 craft-video: HEVC 4:2:2 8/10-bit decoding (Main 4:2:2 10) (#1087)
Port of storytold/filmcraft#1952, reviewed and approved there before the
decoder moved to craft-libs. 4:2:2 streams that use no range-extension
coding tools (what cameras and libx265 write) now decode:

- chroma geometry from the SPS chroma format (ChromaFormat shifts) in the
  picture store, intra, inter, transform tree, deblocking and SAO;
- Table 8-3 IntraPredModeC mapping for ChromaArrayType 2;
- stacked chroma transform blocks with their second cbf flags;
- chroma QP = Min(qPi, 51) for non-4:2:0 (Table 8-10 applies to 4:2:0 only);
- chroma motion vectors scaled per axis;
- a PPS that scales SAO offsets (a RExt tool) is refused as unsupported.

Tests: 22 libx265 4:2:2 fixtures (8- and 10-bit) compared sample-exactly
with ffmpeg, the Table 8-3 derivation, and the SAO offset scale check.
2026-11-11 23:52:20 -05:00
..

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.

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
apv apv APV (Advanced Professional Video, RFC 9924): decoder (apv-decode alone) and encoder (apv-encode alone)
vp8 vp8 VP8 (RFC 6386): decoder
mpeg2 mpeg2 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 ITU-T H.264 / AVC: decoder (h264-decode alone) and encoder (h264-encode alone)
hevc hevc ITU-T H.265 / HEVC: decoder (hevc-decode alone) and encoder (hevc-encode alone)
vp9 vp9 VP9: decoder (vp9-decode alone) and encoder (vp9-encode alone)
av1 av1 AV1 (AOMedia Video 1): decoder (av1-decode alone) and encoder (av1-encode alone)
threads — Multi-threaded slice/row parallelism via rayon