diff --git a/Cargo.lock b/Cargo.lock index 60b7f7340..33f71e63b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6148,6 +6148,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ea1f30cedd69f0a2954655f7188c6a834246d2bcf1e315e2ac40c4b24dc9519" dependencies = [ "cfg-if", + "rayon", ] [[package]] @@ -7985,6 +7986,7 @@ dependencies = [ "loop9", "quick-error 2.0.1", "rav1e", + "rayon", "rgb", ] diff --git a/crates/image-codecs/Cargo.toml b/crates/image-codecs/Cargo.toml index f30a8af43..32d24f92c 100644 --- a/crates/image-codecs/Cargo.toml +++ b/crates/image-codecs/Cargo.toml @@ -13,6 +13,8 @@ workspace = true [features] corpus = [] default = [] +# Opt in to threaded AVIF encoding without enabling AVIF (or assembly) by itself. +threads = ["ravif?/threading", "rav1e?/threading"] sgi = [] sunraster = [] avif = ["image/avif", "dep:ravif", "dep:rav1e", "dep:avif-serialize"] diff --git a/crates/video/Cargo.toml b/crates/video/Cargo.toml index dae21e5b1..bb771e419 100644 --- a/crates/video/Cargo.toml +++ b/crates/video/Cargo.toml @@ -57,7 +57,7 @@ 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"] # Decode and encode across worker threads (rayon) in the codecs that support it. -threads = ["dep:rayon"] +threads = ["dep:rayon", "rav1e?/threading"] [dependencies] craft-media = { workspace = true }