mirror of
https://github.com/storytold/effectcraft.git
synced 2026-11-02 14:38:21 -06:00
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 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
7441ccf187
commit
35ce2186a4
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user