Files
craft-libs/crates/video/Cargo.toml
T
aiongg 4d22e6b958 Merge storytold main d6b5b16bbb into next (18 Nov sync)
- Workflows: main's per-crate layout, with next in the push triggers, Linux only for pushes to
  next, next's crate features (keymap egui, window and update ui) and test paths (crw samples and
  the pdf fixtures run inside the lib's test binary). The workspace gate keeps --keep-going and
  the facade-as-an-app clippy from next's ui.yml. Per-crate doc steps live in docs.yml, which also
  documents craft-ui, the ui-* crates, craft-doc and craft-pdf with every feature. docpath, i18n,
  print and ui workflows go, as on main. actions.lock lists docs.yml and theme.yml.
- Main's cloud and share UI (account, cloud, share, presence, the overflow menu and split button)
  lives in the new crate craft-cloud-ui as main wrote it; the craft-ui facade forwards share and
  cloud and re-exports account, cloud, share and presence, so craft-cloud-local builds unchanged.
- audio and media: main's new tests join tests/main.rs under their features.
- cms: main's new synth and FOGRA39 tests, with the fogra39() helper they use.
- nextest: no gpu group on unix; next's tests create no GPU device.
2026-11-18 01:22:22 +00:00

186 lines
5.0 KiB
TOML

[package]
name = "craft-video"
description = "Clean-room pure-Rust video codecs, one feature per codec: DNxHD/DNxHR, VP8, ProRes, H.264, HEVC, VP9, AV1, MPEG-4 Part 2, Sierra VMD."
version.workspace = true
edition.workspace = true
license.workspace = true
rust-version.workspace = true
repository.workspace = true
[package.metadata.docs.rs]
all-features = true
[lints]
workspace = true
[features]
# FLV codec 3 / SWF Screen Video key frames.
screen-video = ["dep:miniz_oxide"]
# Every codec feature turns on one codec module; none is on by default.
# DNxHD / DNxHR (SMPTE ST 2019-1): decoder and encoder.
dnx = ["dep:craft-media"]
# APV (Advanced Professional Video, RFC 9924): decoder and encoder; `apv-decode` or `apv-encode` for one of them.
apv = ["apv-decode", "apv-encode"]
apv-decode = ["craft-media/bitstream"]
apv-encode = ["craft-media/bitstream"]
# VP8 (RFC 6386): decoder and encoder; `vp8-decode` or `vp8-encode` for one of them.
vp8 = ["vp8-decode", "vp8-encode"]
vp8-decode = []
vp8-encode = []
# MPEG-2 video (ITU-T H.262) and MPEG-1 video (ISO/IEC 11172-2): decoder (`mpeg2-decode`) and
# MPEG-2 encoder (`mpeg2-encode`). The encoder reuses the decoder's code tables, IDCT and motion
# compensation, so it turns on the decoder too.
mpeg2 = ["mpeg2-decode", "mpeg2-encode"]
mpeg2-decode = []
mpeg2-encode = ["mpeg2-decode"]
# MPEG-4 Part 2 video (ISO/IEC 14496-2, the Xvid/DivX format): Simple profile encoder.
mpeg4 = ["mpeg4-encode"]
mpeg4-encode = ["craft-media/bitstream"]
# FFV1 lossless video (RFC 9043): version 3, range coder, decoder and encoder.
ffv1 = []
# Hap (Vidvox): decoder and encoder, with Snappy and chunked second stages.
hap = []
# Motion JPEG: a frame-level decoder and encoder over `craft-jpeg`.
mjpeg = ["dep:craft-jpeg"]
# Apple ProRes (SMPTE RDD 36): decoder and encoder.
prores = ["craft-media/bitstream"]
# H.264 / AVC: decoder and encoder; `h264-decode` or `h264-encode` for one of them.
h264 = ["h264-decode", "h264-encode"]
h264-decode = ["craft-media/bitstream"]
h264-encode = ["craft-media/isobmff"]
# H.265 / HEVC: decoder and encoder; `hevc-decode` or `hevc-encode` for one of them.
hevc = ["hevc-decode", "hevc-encode"]
hevc-decode = ["craft-media/bitstream"]
hevc-encode = ["craft-media/isobmff"]
# VP9: decoder and encoder; `vp9-decode` or `vp9-encode` for one of them.
vp9 = ["vp9-decode", "vp9-encode"]
vp9-decode = ["craft-media/bitstream"]
vp9-encode = ["craft-media/isobmff"]
# AV1: decoder and encoder; `av1-decode` or `av1-encode` for one of them.
av1 = ["av1-decode", "av1-encode"]
av1-decode = ["dep:craft-media"]
av1-encode = ["craft-media/isobmff"]
# Tiled AV1 fallback for frames that exceed the clean-room encoder's single-tile limits.
av1-large-encode = ["av1-encode", "dep:rav1e"]
# Sierra VMD video (8-bit paletted): decoder; `vmd` turns it on too.
vmd = ["vmd-decode"]
vmd-decode = []
# Decode and encode across worker threads (rayon) in the codecs that support it.
threads = ["dep:rayon", "rav1e?/threading"]
[dependencies]
miniz_oxide = { workspace = true, optional = true }
craft-media = { workspace = true, optional = true }
craft-jpeg = { workspace = true, optional = true }
thiserror = { workspace = true }
rayon = { workspace = true, optional = true }
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
rav1e = { version = "0.8", default-features = false, optional = true }
[dev-dependencies]
craft-media-testkit = { workspace = true }
# The AVI muxer, for the MPEG-4 Part 2 encoder's end-to-end test, and the VMD demuxer for the VMD decoder's.
craft-media = { workspace = true, features = ["avi", "vmd"] }
[[test]]
name = "vmd"
required-features = ["vmd-decode"]
[[test]]
name = "hap"
required-features = ["hap"]
[[test]]
name = "mjpeg"
required-features = ["mjpeg"]
[[test]]
name = "dnx"
required-features = ["dnx"]
[[test]]
name = "apv"
required-features = ["apv"]
[[test]]
name = "vp8"
required-features = ["vp8-decode"]
[[example]]
name = "vp8_fuzz"
required-features = ["vp8-decode"]
[[example]]
name = "vp8_vp8dec"
required-features = ["vp8-decode"]
[[test]]
name = "av1_decode"
required-features = ["av1-decode"]
[[example]]
name = "av1_av1dec"
required-features = ["av1-decode"]
[[test]]
name = "h264_decode"
required-features = ["h264-decode"]
[[test]]
name = "h264_encode"
required-features = ["h264-encode"]
[[example]]
name = "h264_h264dec"
required-features = ["h264-decode"]
[[example]]
name = "h264_h264enc_bench"
required-features = ["h264-encode"]
test = true
[[test]]
name = "hevc_decode"
required-features = ["hevc-decode"]
[[example]]
name = "hevc_hevcdec"
required-features = ["hevc-decode"]
[[test]]
name = "vp8_encode"
required-features = ["vp8"]
[[test]]
name = "vp9_decode"
required-features = ["vp9-decode"]
[[example]]
name = "vp9_vp9dec"
required-features = ["vp9-decode"]
[[test]]
name = "mpeg4_encode"
required-features = ["mpeg4-encode"]
[[test]]
name = "mpeg2"
required-features = ["mpeg2-decode"]
[[test]]
name = "ffv1"
required-features = ["ffv1"]
[[test]]
name = "prores"
required-features = ["prores"]
[[test]]
name = "hevc"
required-features = ["hevc-encode"]
[[test]]
name = "av1"
required-features = ["av1"]