From 1c39341f96f68d54ef7bc333316c38be02d7088c Mon Sep 17 00:00:00 2001 From: "Dylan M. Taylor" Date: Sun, 15 Nov 2026 18:24:32 -0500 Subject: [PATCH 1/3] Forward opt-in threading to rav1e encoder dependencies --- crates/image-codecs/Cargo.toml | 2 ++ crates/video/Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/image-codecs/Cargo.toml b/crates/image-codecs/Cargo.toml index be5cd57e1..40a1e50f2 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"] avif = ["image/avif", "dep:ravif", "dep:rav1e", "dep:avif-serialize"] heif = ["dep:craft-heif"] # AVIF decode: craft-video's clean-room pure-Rust AV1 decoder. Native targets only (on wasm32 a 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 } From ea4f63d574930a91efb46977fce64dbf8901a433 Mon Sep 17 00:00:00 2001 From: "Dylan M. Taylor" Date: Sun, 15 Nov 2026 18:52:41 -0500 Subject: [PATCH 2/3] fix: lock optional AVIF threading dependencies --- Cargo.lock | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Cargo.lock b/Cargo.lock index 95341b06d..b9b72c3b0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6127,6 +6127,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ea1f30cedd69f0a2954655f7188c6a834246d2bcf1e315e2ac40c4b24dc9519" dependencies = [ "cfg-if", + "rayon", ] [[package]] @@ -7964,6 +7965,7 @@ dependencies = [ "loop9", "quick-error 2.0.1", "rav1e", + "rayon", "rgb", ] From cbf14205dc0476460e9892d9b1a000b17455a463 Mon Sep 17 00:00:00 2001 From: FredApps <153173854+FredApps@users.noreply.github.com> Date: Mon, 16 Nov 2026 01:13:47 +0100 Subject: [PATCH 3/3] raw: initialize linearization_table in the dngwrite test image (cherry picked from commit 920c745f4217c04c5d881d2c721d537d26239408) --- crates/raw/src/dngwrite.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/raw/src/dngwrite.rs b/crates/raw/src/dngwrite.rs index ace0c07f6..4ef38f4e8 100644 --- a/crates/raw/src/dngwrite.rs +++ b/crates/raw/src/dngwrite.rs @@ -457,6 +457,7 @@ mod tests { color: crate::ColorData::default(), wb_multipliers: None, linearized: false, + linearization_table: None, pixel_aspect: 1.0, opcodes: OpcodeLists::default(), camera: Default::default(),