Import: Interpret Footage ▸ Preserve RGB keeps the file's values (#411)
Cause: float footage (OpenEXR, float TIFF) was always sRGB-encoded on
decode, and Interpret Footage could not turn that off, so an OCIO effect
on the layer converted values that were already encoded.
Fix: After Effects' Interpret Footage ▸ Color ▸ Preserve RGB
(Footage::preserve_rgb; file.interpretFootage {"preserveRgb": true}; a
checkbox in the Interpret Footage form; Remember / Apply Interpretation
carry it). The decoder keeps float values linear, and the working-space
conversion from the colour profile and Interpret As Linear Light don't
apply, so the file's values enter the composition unconverted. The media
cache key includes the flag, so both interpretations decode separately.
Tests: pool::preserve_rgb_reads_float_exr_values_unconverted,
tests_color::preserve_rgb_footage_is_not_converted (managed, linearized
and not), tests_proxy::guess_alpha_invert_and_linear_light (command,
render, Apply Interpretation).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
698ade94ac
commit
d6de68b20d
@@ -553,6 +553,8 @@ pub(crate) struct Interpretation {
|
||||
fields: Option<effectcraft_project::FieldOrder>,
|
||||
profile: Option<Option<effectcraft_project::ColorSpace>>,
|
||||
linear: Option<bool>,
|
||||
/// Color ▸ Preserve RGB.
|
||||
preserve_rgb: Option<bool>,
|
||||
/// Start Timecode.
|
||||
start: Option<StartTimecode>,
|
||||
}
|
||||
@@ -631,6 +633,7 @@ impl Interpretation {
|
||||
None => None,
|
||||
};
|
||||
it.linear = super::b_p(p, "linearLight");
|
||||
it.preserve_rgb = super::b_p(p, "preserveRgb");
|
||||
// Start Timecode: Use Source File Timecode (`overrideStart: false`), or Override Start
|
||||
// (timecode or a frame number).
|
||||
let start_err = || bad(cmd, "startTimecode: timecode (0:00:41:20) or a frame number, 0 to 1e9");
|
||||
@@ -705,6 +708,9 @@ impl Interpretation {
|
||||
if let Some(v) = self.linear {
|
||||
f.linear_light = v;
|
||||
}
|
||||
if let Some(v) = self.preserve_rgb {
|
||||
f.preserve_rgb = v;
|
||||
}
|
||||
// After the frame rate: timecode is read at the footage's rate.
|
||||
if let Some(start) = self.start.as_ref().and_then(|t| t.frame(f.frame_rate)) {
|
||||
f.start_timecode = start;
|
||||
@@ -785,7 +791,7 @@ fn interpret(s: &mut Session, p: &Value) -> Result<Value> {
|
||||
Some(ItemKind::Footage(f)) => Some(json!({
|
||||
"item": i.0, "alpha": format!("{:?}", f.alpha), "matteColor": f.premul_color, "invertAlpha": f.invert_alpha,
|
||||
"fields": f.fields.label(), "pixelAspect": f.pixel_aspect, "loop": f.loop_count, "frameRate": f.frame_rate.as_f64(),
|
||||
"linearLight": f.linear_light, "startTimecode": f.timecode(0), "overrideStart": f.start_timecode.is_some(),
|
||||
"linearLight": f.linear_light, "preserveRgb": f.preserve_rgb, "startTimecode": f.timecode(0), "overrideStart": f.start_timecode.is_some(),
|
||||
"frames": f.sequence_frames(),
|
||||
})),
|
||||
_ => None,
|
||||
@@ -815,6 +821,7 @@ fn apply_interpretation(s: &mut Session, p: &Value) -> Result<Value> {
|
||||
f.fields = src.fields;
|
||||
f.invert_alpha = src.invert_alpha;
|
||||
f.linear_light = src.linear_light;
|
||||
f.preserve_rgb = src.preserve_rgb;
|
||||
f.color_profile = src.color_profile;
|
||||
if src.native_rate.is_some() {
|
||||
if f.native_rate.is_none() {
|
||||
@@ -1025,7 +1032,7 @@ pub fn specs() -> Vec<CommandSpec> {
|
||||
"Main...",
|
||||
["File", "Interpret Footage"],
|
||||
Some("Cmd+Alt+G"),
|
||||
"{items?, frameRate?: fps|\"file\", alpha?: straight|premultiplied|ignore|guess, guessAlpha?, matteColor?, invertAlpha?, loop?, pixelAspect?, fields?: off|upper|lower, colorProfile?: srgb|rec709|rec2020|p3|auto, linearLight?, overrideStart?: bool (false: Use Source File Timecode), startTimecode?: timecode|frame (Override Start)}",
|
||||
"{items?, frameRate?: fps|\"file\", alpha?: straight|premultiplied|ignore|guess, guessAlpha?, matteColor?, invertAlpha?, loop?, pixelAspect?, fields?: off|upper|lower, colorProfile?: srgb|rec709|rec2020|p3|auto, linearLight?, preserveRgb? (the file's values unconverted), overrideStart?: bool (false: Use Source File Timecode), startTimecode?: timecode|frame (Override Start)}",
|
||||
has_footage_selection,
|
||||
interpret
|
||||
),
|
||||
|
||||
@@ -318,6 +318,7 @@ pub fn footage_metadata(f: &Footage) -> Value {
|
||||
"alpha": format!("{:?}", f.alpha),
|
||||
"colorProfile": f.color_profile.map(|c| format!("{c:?}")).unwrap_or_else(|| "sRGB (default)".into()),
|
||||
"linearLight": f.linear_light,
|
||||
"preserveRgb": f.preserve_rgb,
|
||||
"fields": format!("{:?}", f.fields),
|
||||
"sequenceFiles": f.sequence.len(),
|
||||
"dataRows": f.data.as_ref().map(|d| d.lines().count().saturating_sub(1)),
|
||||
|
||||
@@ -272,4 +272,12 @@ fn guess_alpha_invert_and_linear_light() {
|
||||
s.execute("file.rememberInterpretation", json!({"item": h.0})).unwrap();
|
||||
s.execute("file.applyInterpretation", json!({"items": [w.0]})).unwrap();
|
||||
assert!(foot(&s, w).linear_light);
|
||||
// Color ▸ Preserve RGB (#411) is set, rendered and carried by Apply Interpretation.
|
||||
let out = s.execute("file.interpretFootage", json!({"item": h.0, "preserveRgb": true})).unwrap();
|
||||
assert_eq!(out["items"][0]["preserveRgb"], true);
|
||||
let p = px(&s, c, 0.0, RenderOpts::default(), 1, 1);
|
||||
assert!((p[0] - 0.25).abs() < 0.01, "white at 25 %, unconverted: {p:?}");
|
||||
s.execute("file.rememberInterpretation", json!({"item": h.0})).unwrap();
|
||||
s.execute("file.applyInterpretation", json!({"items": [w.0]})).unwrap();
|
||||
assert!(foot(&s, w).preserve_rgb);
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
//! Values stay gamma-encoded: like After Effects, footage pixels enter the working space as they
|
||||
//! are encoded in the file. Alpha follows the footage's [`AlphaMode`] interpretation.
|
||||
|
||||
use effectcraft_project::AlphaMode;
|
||||
use effectcraft_project::{AlphaMode, Footage};
|
||||
use effectcraft_raster::{Image, Px};
|
||||
use filmcraft_color::{Matrix, Range};
|
||||
use filmcraft_frame::{Chroma, PixelData, VideoFrame};
|
||||
@@ -17,11 +17,24 @@ use rayon::prelude::*;
|
||||
pub(crate) struct AlphaOp {
|
||||
mode: AlphaMode,
|
||||
matte: [f32; 3],
|
||||
/// Interpret Footage ▸ Preserve RGB: float values stay as the file stores them (not
|
||||
/// sRGB-encoded).
|
||||
preserve_rgb: bool,
|
||||
}
|
||||
|
||||
impl AlphaOp {
|
||||
pub(crate) fn new(mode: AlphaMode, matte: [f32; 3]) -> Self {
|
||||
Self { mode, matte }
|
||||
Self { mode, matte, preserve_rgb: false }
|
||||
}
|
||||
/// The interpretation of footage `f`.
|
||||
pub(crate) fn of(f: &Footage) -> Self {
|
||||
Self { preserve_rgb: f.preserve_rgb, ..Self::new(f.alpha, f.premul_color) }
|
||||
}
|
||||
/// A linear float value as the compositor takes it: sRGB-encoded, or the file's own value
|
||||
/// under Preserve RGB.
|
||||
#[inline(always)]
|
||||
fn float(self, v: f32) -> f32 {
|
||||
if self.preserve_rgb { v } else { encode(v) }
|
||||
}
|
||||
/// `c` is the file's colour (straight or premultiplied as the mode says), `a` its alpha.
|
||||
#[inline(always)]
|
||||
@@ -72,7 +85,7 @@ pub(crate) fn frame_to_image_in(f: &VideoFrame, op: AlphaOp, mut buf: Vec<Px>) -
|
||||
for (o, s) in row.iter_mut().zip(src.as_chunks::<4>().0.iter()) {
|
||||
let a = s[3];
|
||||
let inv = if a > 0.0 { 1.0 / a } else { 0.0 };
|
||||
let c = [encode(s[0] * inv) * a, encode(s[1] * inv) * a, encode(s[2] * inv) * a];
|
||||
let c = [op.float(s[0] * inv) * a, op.float(s[1] * inv) * a, op.float(s[2] * inv) * a];
|
||||
*o = if op.mode == AlphaMode::Ignore { [c[0], c[1], c[2], 1.0] } else { [c[0], c[1], c[2], a] };
|
||||
}
|
||||
});
|
||||
@@ -231,7 +244,7 @@ fn convert_yuv<T: Sample>(img: &mut Image, w: usize, h: usize, chroma: Chroma, p
|
||||
}
|
||||
|
||||
/// Convert a still decoded by the `image` crate. Float images (OpenEXR, float TIFF) hold linear
|
||||
/// light and are sRGB-encoded here (values above 1 are kept).
|
||||
/// light and are sRGB-encoded here (values above 1 are kept), unless the footage preserves RGB.
|
||||
pub(crate) fn dynamic_to_image(img: &image::DynamicImage, op: AlphaOp) -> Image {
|
||||
use image::DynamicImage as D;
|
||||
let (w, h) = (img.width(), img.height());
|
||||
@@ -251,9 +264,9 @@ pub(crate) fn dynamic_to_image(img: &image::DynamicImage, op: AlphaOp) -> Image
|
||||
let a = s[3];
|
||||
let c = if premul {
|
||||
let inv = if a > 0.0 { 1.0 / a } else { 0.0 };
|
||||
[encode(s[0] * inv) * a, encode(s[1] * inv) * a, encode(s[2] * inv) * a]
|
||||
[op.float(s[0] * inv) * a, op.float(s[1] * inv) * a, op.float(s[2] * inv) * a]
|
||||
} else {
|
||||
[encode(s[0]), encode(s[1]), encode(s[2])]
|
||||
[op.float(s[0]), op.float(s[1]), op.float(s[2])]
|
||||
};
|
||||
*o = op.apply(c, a.clamp(0.0, 1.0));
|
||||
}
|
||||
|
||||
@@ -37,7 +37,9 @@ fn colour_bars(w: u32, h: u32) -> Image {
|
||||
struct Key {
|
||||
path: Arc<str>,
|
||||
frame: i64,
|
||||
alpha: u8,
|
||||
/// The alpha interpretation (bits 0–1) and Preserve RGB (bit 2): they change the decoded
|
||||
/// pixels.
|
||||
interp: u8,
|
||||
matte: [u32; 3],
|
||||
}
|
||||
|
||||
@@ -516,8 +518,9 @@ impl Inner {
|
||||
AlphaMode::Premultiplied => 1,
|
||||
AlphaMode::Ignore => 2,
|
||||
};
|
||||
let interp = alpha | (u8::from(footage.preserve_rgb) << 2);
|
||||
let matte = if footage.alpha == AlphaMode::Premultiplied { footage.premul_color.map(f32::to_bits) } else { [0; 3] };
|
||||
let key = |path: &str, frame| Key { path: path.into(), frame, alpha, matte };
|
||||
let key = |path: &str, frame| Key { path: path.into(), frame, interp, matte };
|
||||
match footage.kind {
|
||||
FootageKind::Sequence if !footage.sequence.is_empty() => {
|
||||
let i = Self::frame_index(footage.frame_rate, t, footage.sequence_frames(), footage.loop_count);
|
||||
@@ -607,7 +610,7 @@ impl Inner {
|
||||
fn prefetch(self: &Arc<Self>, _footage: &Footage, _t: Tick) {}
|
||||
|
||||
fn decode(&self, loc: &Loc, footage: &Footage) -> Result<Image> {
|
||||
let op = AlphaOp::new(footage.alpha, footage.premul_color);
|
||||
let op = AlphaOp::of(footage);
|
||||
let path = &loc.key.path;
|
||||
match loc.media_t {
|
||||
None if &**path == PLACEHOLDER => Ok(colour_bars(footage.width, footage.height)),
|
||||
@@ -759,7 +762,7 @@ mod tests {
|
||||
fn lru_respects_budget_and_recycles() {
|
||||
let mut c = Lru::default();
|
||||
let img = || Arc::new(Image::new(16, 16)); // 4 KiB + overhead
|
||||
let k = |i| Key { path: "a".into(), frame: i, alpha: 0, matte: [0; 3] };
|
||||
let k = |i| Key { path: "a".into(), frame: i, interp: 0, matte: [0; 3] };
|
||||
let budget = 3 * (4096 + 64);
|
||||
for i in 0..10 {
|
||||
c.insert(k(i), img(), budget);
|
||||
@@ -774,4 +777,27 @@ mod tests {
|
||||
assert_eq!(c.take_spare(256).len(), 256);
|
||||
assert!(c.take_spare(17).is_empty());
|
||||
}
|
||||
|
||||
/// #411: Interpret Footage ▸ Preserve RGB reads a float OpenEXR's values as the file stores
|
||||
/// them (no automatic linear → sRGB encode), so an OCIO effect is the only conversion; the
|
||||
/// default interpretation still encodes. Both interpretations of one file decode separately.
|
||||
#[test]
|
||||
fn preserve_rgb_reads_float_exr_values_unconverted() {
|
||||
use exr::prelude::*;
|
||||
let (w, h) = (2usize, 2usize);
|
||||
let ch = |n: &str, v: f32| AnyChannel::new(n, FlatSamples::F32(vec![v; w * h]));
|
||||
let channels = AnyChannels::sort(vec![ch("R", 0.18), ch("G", 0.5), ch("B", 2.0), ch("A", 1.0)].into());
|
||||
let image = exr::image::Image::from_layer(Layer::new((w, h), LayerAttributes::default(), Encoding::FAST_LOSSLESS, channels));
|
||||
let mut bytes = std::io::Cursor::new(Vec::new());
|
||||
image.write().to_buffered(&mut bytes).unwrap();
|
||||
let b: Arc<[u8]> = bytes.into_inner().into();
|
||||
let pool = MediaPool::new();
|
||||
pool.add_bytes("/render.exr", b.clone());
|
||||
let f = crate::probe_bytes("/render.exr", b).unwrap();
|
||||
let encoded = pool.frame_at(&f, Tick::ZERO).unwrap().get(0, 0);
|
||||
assert!((encoded[0] - 0.4613).abs() < 1e-3 && (encoded[1] - 0.7354).abs() < 1e-3 && encoded[2] > 1.3, "sRGB-encoded: {encoded:?}");
|
||||
let raw = pool.frame_at(&Footage { preserve_rgb: true, ..f.clone() }, Tick::ZERO).unwrap().get(0, 0);
|
||||
assert_eq!(raw, [0.18, 0.5, 2.0, 1.0]);
|
||||
assert_eq!(pool.frame_at(&f, Tick::ZERO).unwrap().get(0, 0), encoded, "the default interpretation is cached apart");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -963,6 +963,11 @@ pub struct Footage {
|
||||
/// Interpret Footage ▸ Color ▸ Interpret As Linear Light: the file's values are linear.
|
||||
#[serde(default, skip_serializing_if = "std::ops::Not::not")]
|
||||
pub linear_light: bool,
|
||||
/// Interpret Footage ▸ Color ▸ Preserve RGB: the file's values enter the composition
|
||||
/// unconverted. Float footage (OpenEXR, float TIFF) is not sRGB-encoded on decode, and the
|
||||
/// colour profile, Interpret As Linear Light and the working space don't apply.
|
||||
#[serde(default, skip_serializing_if = "std::ops::Not::not")]
|
||||
pub preserve_rgb: bool,
|
||||
/// Data footage ([`FootageKind::Data`]): the file's text (JSON, CSV or TSV), kept in the
|
||||
/// project so expressions read it everywhere (and on the web).
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
@@ -1009,6 +1014,7 @@ impl Default for Footage {
|
||||
fields: FieldOrder::Off,
|
||||
invert_alpha: false,
|
||||
linear_light: false,
|
||||
preserve_rgb: false,
|
||||
data: None,
|
||||
layer: None,
|
||||
page: 0,
|
||||
@@ -1019,6 +1025,11 @@ impl Default for Footage {
|
||||
}
|
||||
|
||||
impl Footage {
|
||||
/// Interpret As Linear Light applies (Preserve RGB passes the file's values through).
|
||||
pub fn linear_light_applies(&self) -> bool {
|
||||
self.linear_light && !self.preserve_rgb
|
||||
}
|
||||
|
||||
/// Source time as the footage's timecode: its frame `frame` from Start Timecode
|
||||
/// (`0:00:41:20`), as the Footage panel shows it.
|
||||
pub fn timecode(&self, frame: i64) -> String {
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
//! pixels to their parent). Without a working space the sRGB curve is used.
|
||||
|
||||
use effectcraft_color::{ColorSpace, Conversion};
|
||||
use effectcraft_project::{HdrMode, ProjectSettings};
|
||||
use effectcraft_project::{Footage, HdrMode, ProjectSettings};
|
||||
use effectcraft_raster::Image;
|
||||
use rayon::prelude::*;
|
||||
|
||||
@@ -57,10 +57,11 @@ impl Pipe {
|
||||
self.space.unwrap_or(ColorSpace::Srgb)
|
||||
}
|
||||
|
||||
/// Footage with colour profile `profile` (`None` = sRGB) → working space.
|
||||
pub fn media_in(&self, profile: Option<ColorSpace>) -> Option<Conversion> {
|
||||
let ws = self.space?;
|
||||
Conversion::new(profile.unwrap_or(ColorSpace::Srgb), false, ws, self.linear)
|
||||
/// Footage `f` from its colour profile (`None` = sRGB) → working space; nothing for
|
||||
/// Preserve RGB, whose values enter the working space as the file stores them.
|
||||
pub fn media_in(&self, f: &Footage) -> Option<Conversion> {
|
||||
let ws = self.space.filter(|_| !f.preserve_rgb)?;
|
||||
Conversion::new(f.color_profile.unwrap_or(ColorSpace::Srgb), false, ws, self.linear)
|
||||
}
|
||||
|
||||
/// Authored colours (solids, text, shapes) → working space: linearised in a linear working
|
||||
|
||||
@@ -1089,7 +1089,7 @@ impl<'a> Renderer<'a> {
|
||||
let k = self.raster_scale(ctx, layer);
|
||||
if let Some(img) = self.footage.vector_frame(*item, f, k) {
|
||||
let mut buf = Buf { img: (*img).clone(), offset: [0.0; 2], scale: k };
|
||||
if let Some(c) = self.pipe.media_in(f.color_profile) {
|
||||
if let Some(c) = self.pipe.media_in(f) {
|
||||
color::convert(&mut buf.img, &c);
|
||||
}
|
||||
return Some(buf);
|
||||
@@ -1127,7 +1127,7 @@ impl<'a> Renderer<'a> {
|
||||
} else {
|
||||
Buf { img: img.clone(), offset: [0.0; 2], scale: 1.0 / k }
|
||||
};
|
||||
if let Some(c) = self.pipe.media_in(f.color_profile) {
|
||||
if let Some(c) = self.pipe.media_in(f) {
|
||||
color::convert(&mut buf.img, &c);
|
||||
}
|
||||
buf
|
||||
@@ -1156,7 +1156,7 @@ impl<'a> Renderer<'a> {
|
||||
return Some(Arc::new(interpret_pixels(&field_frame(&img, parity), f)));
|
||||
}
|
||||
let img = self.footage_frame_raw(ctx, layer, item, f, t)?;
|
||||
if f.invert_alpha || f.linear_light { Some(Arc::new(interpret_pixels(&img, f))) } else { Some(img) }
|
||||
if f.invert_alpha || f.linear_light_applies() { Some(Arc::new(interpret_pixels(&img, f))) } else { Some(img) }
|
||||
}
|
||||
|
||||
fn footage_frame_raw(&self, ctx: &EvalCtx, layer: &Layer, item: ItemId, f: &Footage, t: Tick) -> Option<Arc<Image>> {
|
||||
@@ -2024,7 +2024,8 @@ pub fn field_frame(img: &Image, parity: usize) -> Image {
|
||||
/// Interpret Footage ▸ Invert Alpha and Interpret As Linear Light on decoded (premultiplied)
|
||||
/// pixels.
|
||||
pub fn interpret_pixels(img: &Image, f: &Footage) -> Image {
|
||||
if !f.invert_alpha && !f.linear_light {
|
||||
let linear = f.linear_light_applies();
|
||||
if !f.invert_alpha && !linear {
|
||||
return img.clone();
|
||||
}
|
||||
let space = f.color_profile.unwrap_or(effectcraft_color::ColorSpace::Srgb);
|
||||
@@ -2032,7 +2033,7 @@ pub fn interpret_pixels(img: &Image, f: &Footage) -> Image {
|
||||
for p in out.data.iter_mut() {
|
||||
let a = p[3];
|
||||
let mut c = if a > 1e-6 { [p[0] / a, p[1] / a, p[2] / a] } else { [0.0; 3] };
|
||||
if f.linear_light {
|
||||
if linear {
|
||||
// The file's values are linear light: encode them like the rest of the footage.
|
||||
c = c.map(|v| space.encode(v));
|
||||
}
|
||||
|
||||
@@ -198,6 +198,34 @@ fn footage_profile_is_converted_into_the_working_space() {
|
||||
assert!((o[0] - 1.0).abs() < 2e-3 && o[1].abs() < 2e-3 && o[2].abs() < 2e-3, "{o:?}");
|
||||
}
|
||||
|
||||
/// #411: Interpret Footage ▸ Preserve RGB: the footage's values enter the composition as the file
|
||||
/// stores them, whatever its colour profile, Interpret As Linear Light or the working space.
|
||||
#[test]
|
||||
fn preserve_rgb_footage_is_not_converted() {
|
||||
let render = |linearize: bool, f: Footage| {
|
||||
let (mut p, cid, comp) = setup(BitDepth::Bpc32);
|
||||
p.settings.working_space = Some(ColorSpace::Rec2020);
|
||||
p.settings.linearize = linearize;
|
||||
let fid = p.add_item("F", Label::Aqua, None, ItemKind::Footage(f));
|
||||
let l = build::layer(&mut p, &comp, "F", LayerSource::Footage { item: fid }, (40, 20), None);
|
||||
p.comp_mut(cid).unwrap().layers.push(l);
|
||||
let src = Flat([0.18, 0.5, 0.75]);
|
||||
let out = Renderer::new(&p, &src, RenderOpts::default()).comp_frame(cid, Tick::ZERO).get(5, 5);
|
||||
// Back from the output conversion (working space → sRGB) to the working space's values.
|
||||
let ws = effectcraft_color::Conversion::new(ColorSpace::Srgb, false, ColorSpace::Rec2020, linearize).unwrap();
|
||||
let c = ws.apply([out[0], out[1], out[2]]);
|
||||
[c[0], c[1], c[2], out[3]]
|
||||
};
|
||||
let preserve = Footage { preserve_rgb: true, linear_light: true, ..footage(Some(ColorSpace::DisplayP3)) };
|
||||
for linearize in [false, true] {
|
||||
let o = render(linearize, preserve.clone());
|
||||
assert!((o[0] - 0.18).abs() < 1e-3 && (o[1] - 0.5).abs() < 1e-3 && (o[2] - 0.75).abs() < 1e-3, "linearize {linearize}: {o:?}");
|
||||
// Without Preserve RGB the profile and linear light convert the values.
|
||||
let o = render(linearize, Footage { preserve_rgb: false, ..preserve.clone() });
|
||||
assert!((o[0] - 0.18).abs() > 0.05, "linearize {linearize}: {o:?}");
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn layer_cache_is_keyed_by_colour_settings() {
|
||||
let (mut p, cid, _) = setup(BitDepth::Bpc8);
|
||||
|
||||
@@ -458,6 +458,7 @@ pub fn open_form(app: &mut EffectcraftApp, id: &str, p: &Value) -> bool {
|
||||
],
|
||||
f.color_profile.map_or(0, |c| 1 + effectcraft_engine::project::ColorSpace::ALL.iter().position(|x| *x == c).unwrap_or(0)),
|
||||
),
|
||||
Field::bool("preserveRgb", "Preserve RGB", f.preserve_rgb),
|
||||
Field::bool("linearLight", "Interpret As Linear Light", f.linear_light),
|
||||
];
|
||||
// After Frame Rate: an image sequence's frames (missing ones show colour bars, as in
|
||||
|
||||
Reference in New Issue
Block a user