Files
craft-libs/crates/video
Dylan M. Taylor e7c3dda7f3 craft-video: AV1 and HEVC take the colour description; AV1 motion search from EffectCraft (#829)
Three-way merge of the changes EffectCraft made to its av1enc and hevcenc
crates after craft-video took them:

- hevc: EncoderConfig carries colour_primaries, transfer_characteristics and
  matrix_coeffs (H.273 code points, BT.709 by default) and the VUI writes them.
- av1: EncoderConfig carries color_primaries, transfer_characteristics and
  matrix_coefficients and color_config writes them.
- av1: motion search keeps a visited set and stops a SAD once it cannot win,
  SATD has fixed-size kernels, and a decision snapshot saves only the block's
  BlockDecoded flags. Output is unchanged.

ffprobe tests check the colour description of both streams.
2026-11-11 16:40:32 -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
vp8 vp8 VP8 (RFC 6386): 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): encoder
threads — Multi-threaded slice/row parallelism via rayon