1
0
Fork 0
forked from wry/wry

color-management: use more consistent naming

This commit is contained in:
Julian Orth 2025-09-05 13:45:09 +02:00
parent 32db933242
commit 83e79b68e6
65 changed files with 439 additions and 510 deletions

View file

@ -19,7 +19,7 @@ use {
},
},
indexmap::IndexMap,
jay_config::video::{ColorSpace, TransferFunction, Transform},
jay_config::video::{ColorSpace, Eotf, Transform},
thiserror::Error,
};
@ -51,7 +51,7 @@ impl Parser for OutputParser<'_> {
let mut ext = Extractor::new(self.cx, span, table);
let (
(name, match_val, x, y, scale, transform, mode, vrr_val, tearing_val, format_val),
(color_space, transfer_function, brightness_val),
(color_space, eotf, brightness_val),
) = ext.extract((
(
opt(str("name")),
@ -103,17 +103,13 @@ impl Parser for OutputParser<'_> {
}
},
};
let transfer_function = match transfer_function {
let eotf = match eotf {
None => None,
Some(tf) => match tf.value {
"default" => Some(TransferFunction::DEFAULT),
"pq" => Some(TransferFunction::PQ),
"default" => Some(Eotf::DEFAULT),
"pq" => Some(Eotf::PQ),
_ => {
log::warn!(
"Unknown transfer function {}: {}",
tf.value,
self.cx.error3(tf.span)
);
log::warn!("Unknown EOTF {}: {}", tf.value, self.cx.error3(tf.span));
None
}
},
@ -193,7 +189,7 @@ impl Parser for OutputParser<'_> {
tearing,
format,
color_space,
transfer_function,
eotf,
brightness,
})
}