From 35ce2186a4bfabbaef3e9111568f8c0e67bfd03b Mon Sep 17 00:00:00 2001 From: Brandon Thomas Date: Sun, 1 Nov 2026 21:53:42 -0500 Subject: [PATCH] Follow-up to #2804: ProRes frame headers carry the colr atom's colour codes They said BT.709 for every output, so a non-709 render disagreed with its atom. Co-Authored-By: Claude Opus 5.5 --- crates/export/src/encode.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/crates/export/src/encode.rs b/crates/export/src/encode.rs index 175c9063d..c9888a035 100644 --- a/crates/export/src/encode.rs +++ b/crates/export/src/encode.rs @@ -208,6 +208,12 @@ impl ProRes { let alpha = channels == Channels::Rgba; let mut cfg = filmcraft_prores::EncoderConfig::new(profile, w, h); cfg.encode_alpha = alpha; + // The frame header carries the same H.273 codes as the `colr` atom, so readers that trust + // either one agree. + if let ColorInfo::Nclc { primaries, transfer, matrix } = colr { + let code = |c| u8::try_from(c).unwrap_or(2); + cfg.color = filmcraft_prores::ColorInfo { primaries: code(primaries), transfer: code(transfer), matrix: code(matrix) }; + } ProRes { enc: filmcraft_prores::Encoder::with_config(cfg), profile, w, h, alpha, colr } } fn is_444(&self) -> bool {