From 6d29e03fc1dbd8578b3271dd29139fac9c9f4434 Mon Sep 17 00:00:00 2001 From: smi-leonivkovic Date: Tue, 10 Nov 2026 19:31:40 +0100 Subject: [PATCH 01/51] LR-BEHAV-RENDER-FIDELITY: process V8, Whites and the tone curves measured against Lightroom (#523) Whites and the parametric curve follow Camera Raw's measured response on synthetic grey steps (tools/lr_tone_charts.py, crates/pipeline/src/curve_stage_tables.rs): Whites reaches into the upper midtones and the four regions are broad and additive. The master curve acts hue-preserving on sRGB-encoded linear ProPhoto RGB (largest and smallest channel through the curve, the middle one in proportion in linear light), then the red, green and blue curves per channel, between the calibrated Contrast/Blacks and the colour stage. Refine Saturation keeps the curves' luminance. CPU and GPU share the tables; V1 to V7 are unchanged (docs/curve-stage.md, docs/process-versions.md). --- crates/develop/src/settings.rs | 9 +- crates/gpu/src/params.rs | 35 ++- crates/gpu/src/wgsl/finish.wgsl | 70 +++++ crates/gpu/tests/it/equivalence.rs | 44 +++ crates/pipeline/src/curve_stage.rs | 314 ++++++++++++++++++++++ crates/pipeline/src/curve_stage_tables.rs | 57 ++++ crates/pipeline/src/finish.rs | 19 +- crates/pipeline/src/lib.rs | 4 + crates/pipeline/src/light_v3.rs | 2 +- crates/pipeline/src/local.rs | 2 +- crates/pipeline/src/tests.rs | 24 +- crates/pipeline/src/tests_grain.rs | 2 +- docs/curve-stage.md | 70 +++++ docs/gaps.md | 2 +- docs/parity-checklist.md | 11 +- docs/process-versions.md | 4 +- docs/whats-new.md | 8 + tools/lr_tone_charts.py | 200 ++++++++++++++ tools/requirements-lr-tone-charts.txt | 4 + 19 files changed, 845 insertions(+), 36 deletions(-) create mode 100644 crates/pipeline/src/curve_stage.rs create mode 100644 crates/pipeline/src/curve_stage_tables.rs create mode 100644 docs/curve-stage.md create mode 100644 tools/lr_tone_charts.py create mode 100644 tools/requirements-lr-tone-charts.txt diff --git a/crates/develop/src/settings.rs b/crates/develop/src/settings.rs index 85bb3b90f2a..16a84270e2a 100644 --- a/crates/develop/src/settings.rs +++ b/crates/develop/src/settings.rs @@ -99,12 +99,16 @@ pub enum Process { /// V6, with film grain from a stack of crystal layers (after AurΓ©lien Pierre's model): resolution /// independent, fading out at black and white; V1 to V6 keep their value noise. V7, + /// V7, with Whites and the parametric curve measured against Lightroom, and the tone curves applied as + /// Lightroom does: Whites, the parametric and point curve hue-preserving in linear ProPhoto RGB, then the + /// red, green and blue curves per channel, before the colour stage (`lightcraft_pipeline::curve_stage`). + V8, } impl Process { /// Every process, oldest first. - pub const ALL: [Process; 7] = [Process::V1, Process::V2, Process::V3, Process::V4, Process::V5, Process::V6, Process::V7]; - pub const LATEST: Process = Process::V7; + pub const ALL: [Process; 8] = [Process::V1, Process::V2, Process::V3, Process::V4, Process::V5, Process::V6, Process::V7, Process::V8]; + pub const LATEST: Process = Process::V8; pub const fn version(self) -> ProcessVersion { match self { @@ -115,6 +119,7 @@ impl Process { Process::V5 => ProcessVersion(5), Process::V6 => ProcessVersion(6), Process::V7 => ProcessVersion(7), + Process::V8 => ProcessVersion(8), } } } diff --git a/crates/gpu/src/params.rs b/crates/gpu/src/params.rs index 9140fe81d5c..de6a0c5479d 100644 --- a/crates/gpu/src/params.rs +++ b/crates/gpu/src/params.rs @@ -23,6 +23,9 @@ const FIELDS: &[(&str, usize)] = &[ ("SRGB_OFF", 1), ("CURVE_OFF", 1), ("CURVES", 1), + ("STAGE", 1), + ("STAGE_OFF", 1), + ("STAGE_REFINE", 1), ("GAIN", 1), ("EV", 1), ("AIR", 1), @@ -197,21 +200,22 @@ pub fn finish_block(fp: &FinishParams, masks: &[[f32; MASK_TERMS]], present: &Pr let srgb_off = aux.len(); aux.extend_from_slice(&srgb_lut()[..]); let curve_off = aux.len(); - if let Some(c) = &fp.curves { - for l in c { - if l.v.len() != CURVE_N as usize { - // a wrong-length curve would shift every later aux offset (CURVE_OFF, MASK_OFF and - // the mask terms that follow) and make the kernel read the wrong data. `fail()` - // records the failure on this thread so the render falls back to the CPU; the - // partial `(p, aux)` returned here is never bound to a pipeline. - fail(FailKind::Fatal, format!("curve table has {} entries, expected {}", l.v.len(), CURVE_N)); - // `p` is only assembled below the curve loop, so an empty block is as good as any: - // the caller (render.rs) gates on `failed()` right after this returns and bails to - // the CPU fallback before indexing `p` or uploading `aux`. - return (Vec::new(), aux); - } - aux.extend_from_slice(&l.v); + let stage_off = curve_off + fp.curves.as_ref().map_or(0, |c| c.len() * CURVE_N as usize); + // process V8's stage (red, green, blue, then the base table) or the earlier processes' curves + let tables = fp.curves.iter().flatten().chain(fp.curve_stage.iter().flat_map(|c| c.chan.iter().chain([&c.base]))); + for l in tables { + if l.v.len() != CURVE_N as usize { + // a wrong-length curve would shift every later aux offset (CURVE_OFF, MASK_OFF and + // the mask terms that follow) and make the kernel read the wrong data. `fail()` + // records the failure on this thread so the render falls back to the CPU; the + // partial `(p, aux)` returned here is never bound to a pipeline. + fail(FailKind::Fatal, format!("curve table has {} entries, expected {}", l.v.len(), CURVE_N)); + // `p` is only assembled below the curve loop, so an empty block is as good as any: + // the caller (render.rs) gates on `failed()` right after this returns and bails to + // the CPU fallback before indexing `p` or uploading `aux`. + return (Vec::new(), aux); } + aux.extend_from_slice(&l.v); } let mask_off = aux.len(); for m in masks { @@ -258,6 +262,9 @@ pub fn finish_block(fp: &FinishParams, masks: &[[f32; MASK_TERMS]], present: &Pr p.u("SRGB_OFF", srgb_off as u32); p.u("CURVE_OFF", curve_off as u32); p.b("CURVES", fp.curves.is_some()); + p.b("STAGE", fp.curve_stage.is_some()); + p.u("STAGE_OFF", stage_off as u32); + p.f("STAGE_REFINE", fp.curve_stage.as_ref().map_or(1.0, |c| c.refine)); p.f("REFINE_SAT", fp.refine_sat); p.f("GAIN", fp.gain); p.f("EV", fp.ev); diff --git a/crates/gpu/src/wgsl/finish.wgsl b/crates/gpu/src/wgsl/finish.wgsl index 8a2f72f89ff..b57814fa221 100644 --- a/crates/gpu/src/wgsl/finish.wgsl +++ b/crates/gpu/src/wgsl/finish.wgsl @@ -122,6 +122,71 @@ fn light_ops(d: vec3) -> vec3 { return mul3(PRO_TO_2020, p); } +// A table of process V8's curve stage (`Lut1::eval`) at offset `o` in `aux`. +fn stage_lut(o: u32, x: f32) -> f32 { + let f = clamp(x, 0.0, 1.0) * f32(CURVE_N - 1u); + let i = min(u32(f), CURVE_N - 2u); + let t = f - f32(i); + return aux[o + i] + (aux[o + i + 1u] - aux[o + i]) * t; +} + +// `CurveStage::apply`: the base table on the largest and smallest channel of sRGB-encoded linear ProPhoto, the +// middle one keeping its place between them in linear light, then the red, green and blue curves per channel. +fn curve_stage(d: vec3) -> vec3 { + let p = mul3(PRO_FROM_2020, d); + var pc = clamp(p, vec3(0.0), vec3(1.0)); + var e = vec3(srgb_exact(pc.x), srgb_exact(pc.y), srgb_exact(pc.z)); + var hi = 0u; + var lo = 0u; + for (var k = 1u; k < 3u; k++) { + if (e[k] > e[hi]) { + hi = k; + } + if (e[k] < e[lo]) { + lo = k; + } + } + let off = pu(F_STAGE_OFF); + let base = off + 3u * CURVE_N; + let la = srgb_linear(stage_lut(base, e[hi])); + let lb = srgb_linear(stage_lut(base, e[lo])); + let pa = pc[hi]; + let pb = pc[lo]; + var curved = vec3(0.0); + for (var k = 0u; k < 3u; k++) { + var t = 1.0; + if (pa > pb) { + t = (pc[k] - pb) / (pa - pb); + } + curved[k] = stage_lut(off + k * CURVE_N, srgb_exact(clamp(lb + (la - lb) * t, 0.0, 1.0))); + } + var q = vec3(0.0); + for (var k = 0u; k < 3u; k++) { + q[k] = srgb_linear(clamp(curved[k], 0.0, 1.0)); + } + let rs = pf(F_STAGE_REFINE); + if (rs < 1.0) { + // the saturation back towards the input's, at the curves' luminance + let rr = refine_saturation(e, curved, rs); + var r = vec3(0.0); + for (var k = 0u; k < 3u; k++) { + r[k] = srgb_linear(clamp(rr[k], 0.0, 1.0)); + } + let yq = dot(q, PRO_Y); + let yr = dot(r, PRO_Y); + q = r; + if (yr > 1e-6) { + q = r * (yq / yr); + } + } + for (var k = 0u; k < 3u; k++) { + if (p[k] > 1.0) { + q[k] += p[k] - 1.0; + } + } + return mul3(PRO_TO_2020, q); +} + fn band_weights(h: f32) -> array { var w: array; for (var i = 0u; i < 8u; i++) { @@ -664,6 +729,11 @@ fn main(@builtin(global_invocation_id) gid: vec3) { d = light_ops(d); } + // --- process V8: Whites and the tone curves + if (pu(F_STAGE) != 0u) { + d = curve_stage(d); + } + // --- colour d = color_ops(d, lt[11], lt[12]); if (tint_on) { diff --git a/crates/gpu/tests/it/equivalence.rs b/crates/gpu/tests/it/equivalence.rs index 427afe424da..f9708b4f436 100644 --- a/crates/gpu/tests/it/equivalence.rs +++ b/crates/gpu/tests/it/equivalence.rs @@ -806,6 +806,50 @@ fn light_v3_operators_match() { } } +/// Process V8's curve stage: Whites, the parametric curve, the point curves and Refine Saturation, on a camera curve +/// and without one, in SDR and HDR. +#[test] +fn curve_stage_matches() { + if !gpu() { + return; + } + use lightcraft_geom::Point; + let src = scene(0, 960, 640); + let curve = lightcraft_pipeline::tone::CameraTone::new(std::array::from_fn(|i| { + let x = 0.004 * 1.18f32.powi(i as i32); + [x, 1.0 - (-2.0 * x).exp()] + })) + .unwrap(); + let raw = SourceInfo { raw: true, camera_tone: Some(curve), ..Default::default() }; + let req = RenderRequest::fit(720, 720); + let v8 = || DevelopSettings { process: Process::V8.version(), ..Default::default() }; + for v in [-100.0, -30.0, 40.0, 100.0] { + let mut s = v8(); + s.light.whites = v; + check(&format!("V8 Whites {v}"), &src, &raw, &s, &req); + } + let mut s = v8(); + s.curve.highlights = -40.0; + s.curve.lights = 25.0; + s.curve.darks = -15.0; + s.curve.shadows = 30.0; + check("V8 parametric", &src, &raw, &s, &req); + s.curve.master = vec![Point { x: 0.0, y: 0.05 }, Point { x: 0.5, y: 0.55 }, Point { x: 1.0, y: 0.95 }]; + s.curve.red = vec![Point { x: 0.0, y: 0.0 }, Point { x: 0.4, y: 0.5 }, Point { x: 1.0, y: 1.0 }]; + s.curve.blue = vec![Point { x: 0.0, y: 0.1 }, Point { x: 1.0, y: 0.9 }]; + s.light.whites = -25.0; + check("V8 curves", &src, &raw, &s, &req); + s.curve.refine_saturation = 30.0; + check("V8 Refine Saturation", &src, &raw, &s, &req); + check("V8 curves, no camera curve", &src, &SourceInfo::default(), &s, &req); + s.curve.split_mid = 40.0; + check("V8 other splits", &src, &raw, &s, &req); + s.curve.split_mid = 50.0; + s.hdr.enabled = true; + s.hdr.max_ev = 2.0; + check("V8 HDR preview", &src, &raw, &s, &req); +} + /// Issue #632: the Highlights / Shadows base of each process (V1: the edge-aware filter of log /// luminance; V2: of its fine median, a radius that grows with the render) matches the CPU's, and /// a warm cache never hands one process the other's base. diff --git a/crates/pipeline/src/curve_stage.rs b/crates/pipeline/src/curve_stage.rs new file mode 100644 index 00000000000..bb516c5a432 --- /dev/null +++ b/crates/pipeline/src/curve_stage.rs @@ -0,0 +1,314 @@ +//! Process V8's tone-curve stage ([`lightcraft_develop::Process::V8`], `docs/curve-stage.md`): Whites, the +//! parametric curve and the point curves, applied the way Lightroom applies them. +//! +//! Measured on Camera Raw renders of synthetic charts (`tools/lr_tone_charts.py`): +//! - Whites, the parametric curve, the master point curve, Contrast and Blacks act hue-preserving on linear ProPhoto +//! RGB: the curve maps the largest and the smallest channel (on sRGB-encoded values), and the middle channel keeps +//! its relative position between them in linear light. Predicting coloured patches from the curve measured on +//! grey steps this way leaves 0.03 to 0.16 (OkLab Γ— 100), against 0.3 to 3.4 for V7. +//! - The red, green and blue curves act per channel on sRGB-encoded linear ProPhoto RGB, after the master curve. +//! - Whites and the four parametric regions are tables of Camera Raw's measured output (`curve_stage_tables`): +//! Whites reaches into the midtones (Whites βˆ’50 lowers encoded 0.6 by about 10/255), and each region is broad and +//! overlapping. The regions add: the sum of single regions reproduces three at once within 1/255. +//! +//! The stage runs after the tone map and Process V4's calibrated Contrast and Blacks, before the colour stage. It +//! replaces V7's curves on encoded output values; the tone map leaves Whites to it. + +use lightcraft_color::spline::{Lut1, MonotoneCurve}; +use lightcraft_color::transfer::{linear_to_srgb, srgb_to_linear}; +use lightcraft_develop::{DevelopSettings, Process, ToneCurve}; +use lightcraft_geom::Point; + +use crate::curve_stage_tables as t; +use crate::light_v3::PRO_Y; + +/// Entries per table (as the shipping curve tables). +pub const N: usize = 1024; + +/// Lightroom's default parametric splits: the measured region tables hold for them only. +const DEFAULT_SPLITS: [f64; 3] = [25.0, 50.0, 75.0]; + +/// The stage's tables: `base` (Whites, then the parametric curve, then the master point curve) acts hue-preserving, +/// `chan` (red, green, blue point curves) per channel. All on sRGB-encoded linear ProPhoto values. +#[derive(Clone, Debug)] +pub struct CurveStage { + pub chan: [Lut1; 3], + pub base: Lut1, + /// Refine Saturation, 0..1, on what the curves did (1 when only Whites is set). + pub refine: f32, +} + +/// A measured delta table (257 entries over 0..1) at `x`. +fn table_at(v: &[f32; 257], x: f32) -> f32 { + let p = x.clamp(0.0, 1.0) * 256.0; + let i = (p as usize).min(255); + let f = p - i as f32; + match (v.get(i), v.get(i + 1)) { + (Some(a), Some(b)) => a + (b - a) * f, + _ => 0.0, + } +} + +/// The delta at `x` of a setting measured at `amounts` (sorted, without 0), linearly between the measured amounts +/// and towards 0 below the smallest; clamped to the measured range. +fn measured_delta(amounts: &[f32; K], tables: &[[f32; 257]; K], amount: f32, x: f32) -> f32 { + if amount == 0.0 || K == 0 { + return 0.0; + } + // the measured amounts with 0 between the negative and positive ones + let mut keys: Vec<(f32, Option<&[f32; 257]>)> = amounts.iter().zip(tables.iter()).map(|(a, v)| (*a, Some(v))).collect(); + keys.push((0.0, None)); + keys.sort_by(|a, b| a.0.total_cmp(&b.0)); + let (lo, hi) = (keys.first().map_or(0.0, |k| k.0), keys.last().map_or(0.0, |k| k.0)); + let a = amount.clamp(lo, hi); + let at = |k: &(f32, Option<&[f32; 257]>)| k.1.map_or(0.0, |v| table_at(v, x)); + for w in keys.windows(2) { + if let [k0, k1] = w + && a >= k0.0 + && a <= k1.0 + { + let f = if k1.0 > k0.0 { (a - k0.0) / (k1.0 - k0.0) } else { 0.0 }; + return at(k0) * (1.0 - f) + at(k1) * f; + } + } + 0.0 +} + +/// The parametric curve: the measured regions at the default splits, else the analytic model of earlier processes. +fn parametric(c: &ToneCurve) -> Lut1 { + let splits = [c.split_shadows, c.split_mid, c.split_highlights]; + if splits.iter().zip(DEFAULT_SPLITS).any(|(s, d)| (s - d).abs() > 1e-6) { + return crate::curve::ParametricCurve::new(c).to_lut(); + } + let amounts = [c.shadows, c.darks, c.lights, c.highlights].map(|v| v as f32); + let mut lut = Lut1::from_fn(N, |x| { + let d: f32 = amounts.iter().zip(t::REGIONS.iter()).map(|(a, r)| measured_delta(&t::REGION_AMOUNTS, r, *a, x)).sum(); + (x + d).clamp(0.0, 1.0) + }); + monotone(&mut lut); + lut +} + +fn whites(amount: f64) -> Option { + if amount == 0.0 { + return None; + } + let mut lut = Lut1::from_fn(N, |x| (x + measured_delta(&t::WHITES_AMOUNTS, &t::WHITES, amount as f32, x)).clamp(0.0, 1.0)); + monotone(&mut lut); + Some(lut) +} + +/// Keeps a table non-decreasing (tone order never reverses). +fn monotone(lut: &mut Lut1) { + let mut m = f32::NEG_INFINITY; + for v in &mut lut.v { + m = m.max(*v); + *v = m; + } +} + +impl CurveStage { + /// The stage for `s`: `None` before V8, or when Whites, the parametric curve and every point curve are neutral. + pub fn new(s: &DevelopSettings) -> Option { + if s.process.process() < Process::V8 { + return None; + } + let c = &s.curve; + let parametric_on = c.highlights != 0.0 || c.lights != 0.0 || c.darks != 0.0 || c.shadows != 0.0; + let master = !ToneCurve::point_curve_is_identity(&c.master); + let chans = [&c.red, &c.green, &c.blue].map(|p| !ToneCurve::point_curve_is_identity(p)); + let w = whites(s.light.whites); + if w.is_none() && !parametric_on && !master && !chans.iter().any(|b| *b) { + return None; + } + let to_pts = |p: &[Point]| p.iter().map(|q| (q.x, q.y)).collect::>(); + let mut base = if parametric_on { parametric(c) } else { Lut1::identity(N) }; + if let Some(w) = &w { + base = base.compose(w); + } + if master { + base = MonotoneCurve::new(&to_pts(&c.master)).to_lut(N).compose(&base); + } + let per = [&c.red, &c.green, &c.blue]; + let chan = std::array::from_fn(|i| match per.get(i) { + Some(p) if chans.get(i).copied().unwrap_or(false) => MonotoneCurve::new(&to_pts(p)).to_lut(N), + _ => Lut1::identity(N), + }); + let curves_on = parametric_on || master || chans.iter().any(|b| *b); + let refine = if curves_on { (c.refine_saturation / 100.0).clamp(0.0, 1.0) as f32 } else { 1.0 }; + Some(CurveStage { chan, base, refine }) + } + + /// Linear Rec.2020 in and out (display referred, after the tone map). Values above white keep slope 1. + pub fn apply(&self, d: [f32; 3]) -> [f32; 3] { + let (to, from) = matrices(); + let p = mul3(to, d); + let pc = p.map(|v| v.clamp(0.0, 1.0)); + let e = pc.map(linear_to_srgb); + let (mut hi, mut lo) = (0usize, 0usize); + for k in 1..3 { + if e[k] > e[hi] { + hi = k; + } + if e[k] < e[lo] { + lo = k; + } + } + // the base curve on the largest and smallest channel; the middle one keeps its place in linear light + let (la, lb) = (srgb_to_linear(self.base.eval(e[hi])), srgb_to_linear(self.base.eval(e[lo]))); + let (pa, pb) = (pc[hi], pc[lo]); + let curved: [f32; 3] = std::array::from_fn(|k| { + let t = if pa > pb { (pc[k] - pb) / (pa - pb) } else { 1.0 }; + self.chan[k].eval(linear_to_srgb((lb + (la - lb) * t).clamp(0.0, 1.0))) + }); + let lin = |v: [f32; 3]| v.map(|x| srgb_to_linear(x.clamp(0.0, 1.0))); + let mut q = lin(curved); + if self.refine < 1.0 { + // the saturation back towards the input's, at the curves' luminance + let r = lin(crate::finish::refine_saturation(e, curved, self.refine)); + let y = |v: [f32; 3]| PRO_Y[0] * v[0] + PRO_Y[1] * v[1] + PRO_Y[2] * v[2]; + let (yq, yr) = (y(q), y(r)); + q = if yr > 1e-6 { r.map(|v| v * yq / yr) } else { r }; + } + for (k, v) in q.iter_mut().enumerate() { + if let Some(over) = p.get(k).filter(|x| **x > 1.0) { + *v += over - 1.0; + } + } + mul3(from, q) + } +} + +fn matrices() -> &'static ([[f32; 3]; 3], [[f32; 3]; 3]) { + static M: std::sync::OnceLock<([[f32; 3]; 3], [[f32; 3]; 3])> = std::sync::OnceLock::new(); + M.get_or_init(crate::light_v3::prophoto_matrices) +} + +fn mul3(m: &[[f32; 3]; 3], d: [f32; 3]) -> [f32; 3] { + std::array::from_fn(|r| m[r][0] * d[0] + m[r][1] * d[1] + m[r][2] * d[2]) +} + +#[cfg(test)] +mod tests { + use super::*; + + fn v8() -> DevelopSettings { + DevelopSettings { process: Process::V8.version(), ..Default::default() } + } + + fn with_whites(v: f64) -> DevelopSettings { + let mut s = v8(); + s.light.whites = v; + s + } + + /// Display-linear grey whose sRGB encoding is `e`, through the stage, back to encoded. + fn grey(stage: &CurveStage, e: f32) -> f32 { + linear_to_srgb(stage.apply([srgb_to_linear(e); 3])[1]) + } + + #[test] + fn earlier_processes_and_neutral_settings_have_no_stage() { + assert!(CurveStage::new(&v8()).is_none(), "neutral settings are the identity"); + for p in Process::ALL.iter().filter(|p| **p < Process::V8) { + let s = DevelopSettings { process: p.version(), ..with_whites(-50.0) }; + assert!(CurveStage::new(&s).is_none(), "{p:?}"); + } + } + + #[test] + fn whites_reaches_into_the_midtones_as_measured() { + let stage = CurveStage::new(&with_whites(-50.0)).expect("Whites set"); + let drop = (0.6 - grey(&stage, 0.6)) * 255.0; + assert!((7.0..13.0).contains(&drop), "encoded 0.6 fell by {drop}/255"); + let dark = (0.05 - grey(&stage, 0.05)).abs() * 255.0; + assert!(dark < 2.0, "the shadows hardly move: {dark}/255"); + let up = CurveStage::new(&with_whites(50.0)).expect("Whites set"); + assert!(grey(&up, 0.6) > 0.6); + } + + #[test] + fn regions_add_and_act_in_their_own_range() { + let curve = |f: fn(&mut ToneCurve)| { + let mut s = v8(); + f(&mut s.curve); + CurveStage::new(&s).expect("a region set") + }; + let shadows = curve(|c| c.shadows = 50.0); + let highlights = curve(|c| c.highlights = 50.0); + let both = curve(|c| { + c.shadows = 50.0; + c.highlights = 50.0; + }); + assert!(grey(&shadows, 0.15) - 0.15 > 3.0 * (grey(&shadows, 0.85) - 0.85).abs(), "Shadows lifts the dark end"); + assert!(grey(&highlights, 0.85) - 0.85 > 3.0 * (grey(&highlights, 0.15) - 0.15).abs(), "Highlights lifts the bright end"); + for e in [0.15f32, 0.4, 0.6, 0.85] { + let sum = e + (grey(&shadows, e) - e) + (grey(&highlights, e) - e); + assert!((grey(&both, e) - sum).abs() < 1.5 / 255.0, "{e}"); + } + } + + #[test] + fn other_splits_fall_back_to_the_analytic_curve() { + let mut s = v8(); + s.curve.highlights = 50.0; + s.curve.split_mid = 40.0; + let stage = CurveStage::new(&s).expect("a region set"); + assert_eq!(stage.base.v, crate::curve::ParametricCurve::new(&s.curve).to_lut().v); + } + + #[test] + fn tone_order_never_reverses_and_every_table_fits_the_gpu() { + for w in [-100.0, -50.0, 37.0, 100.0] { + let mut s = with_whites(w); + s.curve.shadows = -100.0; + s.curve.lights = 100.0; + let stage = CurveStage::new(&s).expect("set"); + assert!(stage.base.v.windows(2).all(|p| p[0] <= p[1]), "{w}"); + assert!(stage.chan.iter().chain([&stage.base]).all(|l| l.v.len() == N), "{w}"); + } + } + + #[test] + fn the_middle_channel_keeps_its_place_in_linear_prophoto() { + let stage = CurveStage::new(&with_whites(-100.0)).expect("Whites set"); + let (to, from) = matrices(); + let input = [0.55f32, 0.27, 0.08]; + let out = mul3(to, stage.apply(mul3(from, input))); + let at = |p: [f32; 3]| (p[1] - p[2]) / (p[0] - p[2]); + assert!((at(out) - at(input)).abs() < 1e-3, "{out:?}"); + } + + #[test] + fn colour_curves_act_per_channel_after_the_master() { + let mut s = v8(); + s.curve.red = vec![Point { x: 0.0, y: 0.0 }, Point { x: 0.5, y: 0.7 }, Point { x: 1.0, y: 1.0 }]; + let stage = CurveStage::new(&s).expect("a red curve"); + let (to, from) = matrices(); + let out = mul3(to, stage.apply(mul3(from, [srgb_to_linear(0.5); 3]))); + assert!((linear_to_srgb(out[0]) - 0.7).abs() < 2e-3, "{out:?}"); + assert!((linear_to_srgb(out[1]) - 0.5).abs() < 2e-3, "{out:?}"); + } + + #[test] + fn hdr_values_keep_slope_one_above_white() { + let stage = CurveStage::new(&with_whites(-50.0)).expect("Whites set"); + let (a, b) = (stage.apply([2.0; 3]), stage.apply([3.0; 3])); + assert!((b[0] - a[0] - 1.0).abs() < 1e-3, "{a:?} {b:?}"); + } + + #[test] + fn refine_saturation_at_zero_undoes_what_the_curves_added() { + let mut s = v8(); + s.curve.master = vec![Point { x: 0.0, y: 0.0 }, Point { x: 0.25, y: 0.15 }, Point { x: 0.75, y: 0.85 }, Point { x: 1.0, y: 1.0 }]; + let sat = |stage: &CurveStage| { + let (to, from) = matrices(); + let p = mul3(to, stage.apply(mul3(from, [0.5, 0.25, 0.12]))).map(linear_to_srgb); + (p[0] - p[2]) / (0.2126 * p[0] + 0.7152 * p[1] + 0.0722 * p[2]) + }; + let full = sat(&CurveStage::new(&s).expect("a curve")); + s.curve.refine_saturation = 0.0; + let none = sat(&CurveStage::new(&s).expect("a curve")); + assert!(none < full, "{none} {full}"); + } +} diff --git a/crates/pipeline/src/curve_stage_tables.rs b/crates/pipeline/src/curve_stage_tables.rs new file mode 100644 index 00000000000..768fcb7ef51 --- /dev/null +++ b/crates/pipeline/src/curve_stage_tables.rs @@ -0,0 +1,57 @@ +// @generated by tools/lr_tone_charts.py from Camera Raw renders of its synthetic grey steps (docs/curve-stage.md). +// Output minus input of each setting on sRGB-encoded linear ProPhoto values, 257 evenly spaced inputs from 0 to 1. + +pub const WHITES_AMOUNTS: [f32; 6] = [-100.0, -50.0, -25.0, 25.0, 50.0, 100.0]; +pub static WHITES: [[f32; 257]; 6] = [ + [0.000000, 0.000000, 0.000000, -0.000115, -0.000262, -0.000282, -0.000280, -0.000241, -0.000213, -0.000216, -0.000229, -0.000303, -0.000375, -0.000435, -0.000492, -0.000540, -0.000588, -0.000634, -0.000679, -0.000739, -0.000800, -0.000869, -0.000949, -0.001028, -0.001128, -0.001240, -0.001352, -0.001477, -0.001619, -0.001762, -0.001904, -0.002002, -0.002093, -0.002185, -0.002276, -0.002425, -0.002578, -0.002731, -0.002884, -0.003029, -0.003167, -0.003305, -0.003443, -0.003582, -0.003749, -0.003925, -0.004101, -0.004276, -0.004452, -0.004625, -0.004797, -0.004968, -0.005139, -0.005311, -0.005482, -0.005703, -0.005924, -0.006145, -0.006365, -0.006586, -0.006807, -0.007026, -0.007246, -0.007466, -0.007686, -0.007906, -0.008126, -0.008373, -0.008635, -0.008897, -0.009159, -0.009421, -0.009683, -0.009945, -0.010238, -0.010534, -0.010830, -0.011127, -0.011423, -0.011719, -0.012016, -0.012349, -0.012699, -0.013049, -0.013399, -0.013749, -0.014099, -0.014449, -0.014799, -0.015189, -0.015580, -0.015970, -0.016360, -0.016750, -0.017141, -0.017531, -0.017921, -0.018365, -0.018821, -0.019277, -0.019733, -0.020189, -0.020645, -0.021101, -0.021557, -0.022017, -0.022533, -0.023050, -0.023566, -0.024083, -0.024599, -0.025116, -0.025632, -0.026149, -0.026665, -0.027240, -0.027837, -0.028434, -0.029031, -0.029627, -0.030224, -0.030821, -0.031418, -0.032015, -0.032612, -0.033245, -0.033891, -0.034538, -0.035184, -0.035830, -0.036477, -0.037123, -0.037769, -0.038416, -0.039062, -0.039694, -0.040247, -0.040800, -0.041354, -0.041907, -0.042461, -0.043014, -0.043567, -0.044121, -0.044674, -0.045228, -0.045801, -0.046389, -0.046978, -0.047567, -0.048156, -0.048744, -0.049333, -0.049922, -0.050510, -0.051099, -0.051692, -0.052335, -0.052977, -0.053620, -0.054263, -0.054905, -0.055548, -0.056190, -0.056833, -0.057476, -0.058118, -0.058807, -0.059508, -0.060209, -0.060911, -0.061612, -0.062313, -0.063014, -0.063716, -0.064417, -0.065118, -0.065860, -0.066614, -0.067368, -0.068122, -0.068877, -0.069631, -0.070385, -0.071139, -0.071894, -0.072650, -0.073448, -0.074245, -0.075042, -0.075839, -0.076636, -0.077434, -0.078231, -0.079028, -0.079825, -0.080644, -0.081470, -0.082296, -0.083121, -0.083947, -0.084772, -0.085598, -0.086424, -0.087249, -0.088070, -0.088891, -0.089713, -0.090534, -0.091355, -0.092176, -0.092997, -0.093818, -0.094591, -0.095338, -0.096086, -0.096833, -0.097581, -0.098329, -0.099076, -0.099824, -0.100370, -0.100889, -0.101407, -0.101925, -0.102443, -0.102962, -0.103480, -0.103672, -0.103685, -0.103698, -0.103711, -0.103724, -0.103737, -0.103750, -0.102762, -0.101769, -0.100777, -0.099784, -0.098791, -0.097798, -0.095053, -0.092290, -0.089527, -0.086764, -0.084001, -0.079339, -0.073815, -0.068290, -0.062766, -0.056620, -0.047795, -0.038970, -0.030145, -0.020499, -0.010248, 0.000000], + [0.000000, 0.000000, 0.000000, -0.000115, -0.000262, -0.000282, -0.000280, -0.000241, -0.000213, -0.000216, -0.000229, -0.000303, -0.000362, -0.000342, -0.000361, -0.000481, -0.000584, -0.000629, -0.000675, -0.000737, -0.000799, -0.000867, -0.000942, -0.001016, -0.001114, -0.001228, -0.001342, -0.001450, -0.001552, -0.001653, -0.001755, -0.001854, -0.001952, -0.002051, -0.002149, -0.002281, -0.002416, -0.002551, -0.002686, -0.002827, -0.002972, -0.003118, -0.003263, -0.003408, -0.003547, -0.003685, -0.003822, -0.003960, -0.004098, -0.004249, -0.004411, -0.004572, -0.004733, -0.004894, -0.005056, -0.005261, -0.005466, -0.005671, -0.005876, -0.006080, -0.006285, -0.006462, -0.006638, -0.006814, -0.006991, -0.007167, -0.007343, -0.007550, -0.007772, -0.007994, -0.008217, -0.008439, -0.008661, -0.008884, -0.009132, -0.009384, -0.009636, -0.009888, -0.010140, -0.010392, -0.010643, -0.010911, -0.011186, -0.011462, -0.011737, -0.012012, -0.012288, -0.012563, -0.012838, -0.013154, -0.013470, -0.013786, -0.014102, -0.014418, -0.014734, -0.015050, -0.015366, -0.015714, -0.016071, -0.016427, -0.016783, -0.017140, -0.017496, -0.017852, -0.018209, -0.018567, -0.018960, -0.019353, -0.019746, -0.020140, -0.020533, -0.020926, -0.021319, -0.021712, -0.022105, -0.022531, -0.022969, -0.023407, -0.023846, -0.024284, -0.024722, -0.025160, -0.025599, -0.026037, -0.026475, -0.026923, -0.027375, -0.027827, -0.028279, -0.028731, -0.029183, -0.029634, -0.030086, -0.030538, -0.030990, -0.031423, -0.031754, -0.032085, -0.032417, -0.032748, -0.033079, -0.033411, -0.033742, -0.034073, -0.034405, -0.034736, -0.035069, -0.035404, -0.035739, -0.036073, -0.036408, -0.036743, -0.037077, -0.037412, -0.037747, -0.038082, -0.038416, -0.038748, -0.039080, -0.039412, -0.039744, -0.040076, -0.040408, -0.040740, -0.041072, -0.041404, -0.041736, -0.042057, -0.042374, -0.042692, -0.043009, -0.043326, -0.043644, -0.043961, -0.044279, -0.044596, -0.044913, -0.045210, -0.045500, -0.045790, -0.046080, -0.046370, -0.046661, -0.046951, -0.047241, -0.047531, -0.047818, -0.048053, -0.048289, -0.048524, -0.048760, -0.048995, -0.049231, -0.049466, -0.049702, -0.049937, -0.050104, -0.050252, -0.050400, -0.050548, -0.050695, -0.050843, -0.050991, -0.051139, -0.051287, -0.051339, -0.051388, -0.051437, -0.051486, -0.051535, -0.051584, -0.051633, -0.051683, -0.051635, -0.051537, -0.051439, -0.051341, -0.051243, -0.051146, -0.051048, -0.050950, -0.050664, -0.050351, -0.050038, -0.049725, -0.049412, -0.049099, -0.048786, -0.048276, -0.047660, -0.047043, -0.046427, -0.045810, -0.045194, -0.044577, -0.043540, -0.042501, -0.041462, -0.040423, -0.039384, -0.038345, -0.036747, -0.035143, -0.033539, -0.031934, -0.030330, -0.028242, -0.025934, -0.023626, -0.021318, -0.018876, -0.015857, -0.012837, -0.009818, -0.006628, -0.003314, 0.000000], + [0.000000, 0.000000, 0.000000, -0.000096, -0.000224, -0.000267, -0.000245, -0.000104, -0.000027, -0.000130, -0.000228, -0.000300, -0.000357, -0.000337, -0.000338, -0.000392, -0.000441, -0.000477, -0.000512, -0.000549, -0.000585, -0.000641, -0.000721, -0.000802, -0.000869, -0.000929, -0.000988, -0.001060, -0.001151, -0.001242, -0.001332, -0.001401, -0.001466, -0.001531, -0.001596, -0.001706, -0.001818, -0.001931, -0.002044, -0.002140, -0.002224, -0.002308, -0.002392, -0.002476, -0.002571, -0.002669, -0.002768, -0.002866, -0.002964, -0.003073, -0.003190, -0.003306, -0.003423, -0.003540, -0.003656, -0.003790, -0.003925, -0.004059, -0.004193, -0.004327, -0.004461, -0.004584, -0.004706, -0.004829, -0.004952, -0.005074, -0.005197, -0.005321, -0.005447, -0.005573, -0.005698, -0.005824, -0.005950, -0.006075, -0.006233, -0.006394, -0.006556, -0.006717, -0.006879, -0.007040, -0.007202, -0.007371, -0.007545, -0.007718, -0.007891, -0.008064, -0.008238, -0.008411, -0.008584, -0.008777, -0.008969, -0.009161, -0.009354, -0.009546, -0.009739, -0.009931, -0.010123, -0.010331, -0.010542, -0.010753, -0.010964, -0.011175, -0.011386, -0.011597, -0.011808, -0.012019, -0.012243, -0.012468, -0.012692, -0.012916, -0.013140, -0.013364, -0.013588, -0.013813, -0.014037, -0.014283, -0.014536, -0.014790, -0.015044, -0.015298, -0.015552, -0.015806, -0.016060, -0.016314, -0.016568, -0.016806, -0.017038, -0.017269, -0.017501, -0.017733, -0.017965, -0.018197, -0.018429, -0.018660, -0.018892, -0.019112, -0.019271, -0.019429, -0.019587, -0.019745, -0.019904, -0.020062, -0.020220, -0.020379, -0.020537, -0.020695, -0.020846, -0.020990, -0.021135, -0.021280, -0.021425, -0.021569, -0.021714, -0.021859, -0.022004, -0.022148, -0.022292, -0.022427, -0.022561, -0.022695, -0.022830, -0.022964, -0.023098, -0.023233, -0.023367, -0.023502, -0.023636, -0.023754, -0.023867, -0.023981, -0.024094, -0.024207, -0.024321, -0.024434, -0.024548, -0.024661, -0.024774, -0.024866, -0.024951, -0.025036, -0.025121, -0.025206, -0.025292, -0.025377, -0.025462, -0.025547, -0.025629, -0.025670, -0.025711, -0.025752, -0.025793, -0.025834, -0.025875, -0.025916, -0.025957, -0.025998, -0.025998, -0.025986, -0.025975, -0.025963, -0.025951, -0.025939, -0.025928, -0.025916, -0.025904, -0.025834, -0.025762, -0.025689, -0.025617, -0.025545, -0.025473, -0.025401, -0.025328, -0.025208, -0.025064, -0.024920, -0.024775, -0.024631, -0.024487, -0.024342, -0.024198, -0.023963, -0.023714, -0.023466, -0.023217, -0.022968, -0.022720, -0.022471, -0.022140, -0.021764, -0.021387, -0.021011, -0.020634, -0.020258, -0.019881, -0.019330, -0.018779, -0.018227, -0.017676, -0.017124, -0.016573, -0.015824, -0.015074, -0.014323, -0.013572, -0.012822, -0.011889, -0.010874, -0.009859, -0.008844, -0.007785, -0.006538, -0.005290, -0.004043, -0.002728, -0.001364, 0.000000], + [0.000000, 0.000000, 0.000004, 0.000007, 0.000012, 0.000032, 0.000045, 0.000043, 0.000043, 0.000043, 0.000042, 0.000036, 0.000043, 0.000120, 0.000175, 0.000171, 0.000179, 0.000226, 0.000273, 0.000311, 0.000349, 0.000381, 0.000405, 0.000429, 0.000479, 0.000545, 0.000612, 0.000660, 0.000680, 0.000700, 0.000719, 0.000776, 0.000838, 0.000900, 0.000962, 0.001031, 0.001099, 0.001168, 0.001237, 0.001297, 0.001353, 0.001408, 0.001463, 0.001518, 0.001577, 0.001636, 0.001696, 0.001755, 0.001815, 0.001891, 0.001980, 0.002068, 0.002156, 0.002244, 0.002332, 0.002395, 0.002458, 0.002521, 0.002584, 0.002648, 0.002711, 0.002808, 0.002906, 0.003004, 0.003102, 0.003200, 0.003297, 0.003400, 0.003505, 0.003611, 0.003716, 0.003821, 0.003926, 0.004032, 0.004151, 0.004273, 0.004395, 0.004516, 0.004638, 0.004760, 0.004881, 0.005011, 0.005145, 0.005278, 0.005412, 0.005545, 0.005679, 0.005812, 0.005946, 0.006092, 0.006237, 0.006383, 0.006529, 0.006674, 0.006820, 0.006966, 0.007112, 0.007278, 0.007449, 0.007620, 0.007791, 0.007962, 0.008133, 0.008304, 0.008475, 0.008647, 0.008834, 0.009021, 0.009208, 0.009396, 0.009583, 0.009770, 0.009958, 0.010145, 0.010332, 0.010538, 0.010750, 0.010963, 0.011175, 0.011388, 0.011600, 0.011812, 0.012025, 0.012237, 0.012450, 0.012632, 0.012804, 0.012975, 0.013147, 0.013318, 0.013490, 0.013661, 0.013833, 0.014004, 0.014175, 0.014343, 0.014493, 0.014642, 0.014791, 0.014941, 0.015090, 0.015240, 0.015389, 0.015538, 0.015688, 0.015837, 0.015989, 0.016144, 0.016299, 0.016454, 0.016609, 0.016764, 0.016919, 0.017074, 0.017229, 0.017384, 0.017539, 0.017690, 0.017841, 0.017992, 0.018144, 0.018295, 0.018446, 0.018597, 0.018749, 0.018900, 0.019051, 0.019198, 0.019344, 0.019490, 0.019635, 0.019781, 0.019927, 0.020073, 0.020219, 0.020364, 0.020510, 0.020649, 0.020785, 0.020921, 0.021057, 0.021194, 0.021330, 0.021466, 0.021602, 0.021739, 0.021874, 0.021991, 0.022108, 0.022225, 0.022342, 0.022459, 0.022576, 0.022693, 0.022810, 0.022927, 0.023029, 0.023128, 0.023227, 0.023326, 0.023425, 0.023523, 0.023622, 0.023721, 0.023820, 0.023898, 0.023976, 0.024053, 0.024131, 0.024209, 0.024287, 0.024365, 0.024442, 0.024500, 0.024547, 0.024595, 0.024642, 0.024689, 0.024737, 0.024784, 0.024832, 0.024839, 0.024842, 0.024844, 0.024846, 0.024849, 0.024851, 0.024853, 0.024802, 0.024721, 0.024641, 0.024560, 0.024480, 0.024399, 0.024319, 0.024114, 0.023909, 0.023704, 0.023499, 0.023293, 0.023088, 0.022686, 0.022283, 0.021879, 0.021475, 0.021072, 0.020448, 0.019725, 0.019001, 0.018278, 0.017293, 0.015181, 0.013069, 0.010956, 0.007812, 0.003905, 0.000000], + [0.000000, 0.000074, 0.000125, 0.000231, 0.000267, 0.000269, 0.000316, 0.000448, 0.000536, 0.000503, 0.000469, 0.000429, 0.000417, 0.000552, 0.000665, 0.000728, 0.000803, 0.000921, 0.001038, 0.001193, 0.001351, 0.001497, 0.001630, 0.001762, 0.001902, 0.002047, 0.002192, 0.002339, 0.002490, 0.002641, 0.002792, 0.003019, 0.003256, 0.003493, 0.003731, 0.003912, 0.004089, 0.004267, 0.004444, 0.004658, 0.004898, 0.005139, 0.005379, 0.005619, 0.005873, 0.006130, 0.006388, 0.006645, 0.006902, 0.007164, 0.007429, 0.007694, 0.007959, 0.008224, 0.008489, 0.008774, 0.009058, 0.009343, 0.009628, 0.009912, 0.010197, 0.010532, 0.010867, 0.011202, 0.011538, 0.011873, 0.012208, 0.012575, 0.012959, 0.013343, 0.013727, 0.014111, 0.014495, 0.014879, 0.015296, 0.015716, 0.016137, 0.016557, 0.016978, 0.017398, 0.017819, 0.018281, 0.018764, 0.019247, 0.019729, 0.020212, 0.020694, 0.021177, 0.021660, 0.022208, 0.022756, 0.023304, 0.023852, 0.024401, 0.024949, 0.025497, 0.026045, 0.026634, 0.027233, 0.027832, 0.028430, 0.029029, 0.029628, 0.030227, 0.030825, 0.031429, 0.032111, 0.032793, 0.033474, 0.034156, 0.034838, 0.035520, 0.036201, 0.036883, 0.037565, 0.038266, 0.038975, 0.039684, 0.040393, 0.041102, 0.041811, 0.042520, 0.043228, 0.043937, 0.044646, 0.045200, 0.045698, 0.046195, 0.046693, 0.047190, 0.047688, 0.048186, 0.048683, 0.049181, 0.049679, 0.050172, 0.050642, 0.051112, 0.051581, 0.052051, 0.052521, 0.052991, 0.053460, 0.053930, 0.054400, 0.054870, 0.055335, 0.055795, 0.056256, 0.056717, 0.057178, 0.057639, 0.058099, 0.058560, 0.059021, 0.059482, 0.059940, 0.060371, 0.060802, 0.061232, 0.061663, 0.062094, 0.062525, 0.062955, 0.063386, 0.063817, 0.064247, 0.064643, 0.065028, 0.065414, 0.065800, 0.066185, 0.066571, 0.066957, 0.067342, 0.067728, 0.068114, 0.068443, 0.068753, 0.069064, 0.069374, 0.069685, 0.069995, 0.070306, 0.070616, 0.070927, 0.071233, 0.071471, 0.071709, 0.071946, 0.072184, 0.072422, 0.072660, 0.072897, 0.073135, 0.073373, 0.073549, 0.073708, 0.073868, 0.074027, 0.074186, 0.074346, 0.074505, 0.074664, 0.074823, 0.074873, 0.074920, 0.074966, 0.075013, 0.075059, 0.075106, 0.075152, 0.075199, 0.075137, 0.075020, 0.074903, 0.074786, 0.074670, 0.074553, 0.074436, 0.074319, 0.073978, 0.073606, 0.073233, 0.072861, 0.072488, 0.072115, 0.071743, 0.071119, 0.070356, 0.069593, 0.068831, 0.068068, 0.067306, 0.066543, 0.065205, 0.063864, 0.062523, 0.061182, 0.059841, 0.058501, 0.055362, 0.052205, 0.049048, 0.045891, 0.042734, 0.039062, 0.035155, 0.031249, 0.027343, 0.023437, 0.019530, 0.015624, 0.011718, 0.007812, 0.003905, 0.000000], + [0.000000, 0.000500, 0.001050, 0.001608, 0.002124, 0.002641, 0.003061, 0.003303, 0.003534, 0.003731, 0.003895, 0.003860, 0.003920, 0.004480, 0.005071, 0.005740, 0.006429, 0.007182, 0.007935, 0.008852, 0.009777, 0.010736, 0.011738, 0.012740, 0.013790, 0.014871, 0.015953, 0.017110, 0.018378, 0.019646, 0.020914, 0.022253, 0.023603, 0.024952, 0.026301, 0.027757, 0.029220, 0.030684, 0.032148, 0.033662, 0.035214, 0.036765, 0.038316, 0.039868, 0.041479, 0.043107, 0.044734, 0.046362, 0.047990, 0.049693, 0.051446, 0.053199, 0.054951, 0.056704, 0.058458, 0.060353, 0.062248, 0.064143, 0.066038, 0.067933, 0.069828, 0.071984, 0.074141, 0.076298, 0.078455, 0.080612, 0.082769, 0.085098, 0.087516, 0.089934, 0.092353, 0.094771, 0.097190, 0.099608, 0.102268, 0.104958, 0.107648, 0.110338, 0.113028, 0.115718, 0.118408, 0.121306, 0.124302, 0.127299, 0.130295, 0.133292, 0.136288, 0.139284, 0.142281, 0.145455, 0.148629, 0.151804, 0.154979, 0.158153, 0.161328, 0.164503, 0.167677, 0.170547, 0.173344, 0.176141, 0.178938, 0.181735, 0.184532, 0.187329, 0.190126, 0.192895, 0.195221, 0.197546, 0.199871, 0.202196, 0.204522, 0.206847, 0.209172, 0.211497, 0.213823, 0.215741, 0.217504, 0.219267, 0.221030, 0.222793, 0.224556, 0.226319, 0.228082, 0.229845, 0.231608, 0.232962, 0.234169, 0.235376, 0.236582, 0.237789, 0.238996, 0.240202, 0.241409, 0.242616, 0.243822, 0.244972, 0.245824, 0.246675, 0.247527, 0.248378, 0.249229, 0.250081, 0.250932, 0.251784, 0.252635, 0.253487, 0.254150, 0.254663, 0.255176, 0.255689, 0.256201, 0.256714, 0.257227, 0.257740, 0.258253, 0.258766, 0.259249, 0.259381, 0.259513, 0.259645, 0.259777, 0.259909, 0.260041, 0.260173, 0.260305, 0.260437, 0.260570, 0.260342, 0.260015, 0.259689, 0.259363, 0.259036, 0.258710, 0.258383, 0.258057, 0.257731, 0.257404, 0.256644, 0.255745, 0.254845, 0.253946, 0.253046, 0.252147, 0.251248, 0.250348, 0.249449, 0.248501, 0.246825, 0.245149, 0.243472, 0.241796, 0.240119, 0.238443, 0.236767, 0.235090, 0.233414, 0.230383, 0.226974, 0.223565, 0.220155, 0.216746, 0.213337, 0.209928, 0.206518, 0.203109, 0.199218, 0.195312, 0.191405, 0.187499, 0.183593, 0.179687, 0.175780, 0.171874, 0.167968, 0.164062, 0.160155, 0.156249, 0.152343, 0.148437, 0.144530, 0.140624, 0.136718, 0.132812, 0.128905, 0.124999, 0.121093, 0.117187, 0.113280, 0.109374, 0.105468, 0.101562, 0.097655, 0.093749, 0.089843, 0.085937, 0.082030, 0.078124, 0.074218, 0.070312, 0.066405, 0.062499, 0.058593, 0.054687, 0.050780, 0.046874, 0.042968, 0.039062, 0.035155, 0.031249, 0.027343, 0.023437, 0.019530, 0.015624, 0.011718, 0.007812, 0.003905, 0.000000], +]; + +/// Shadows, Darks, Lights, Highlights at the default splits (25, 50, 75). +pub const REGION_AMOUNTS: [f32; 8] = [-100.0, -75.0, -50.0, -25.0, 25.0, 50.0, 75.0, 100.0]; +pub static REGIONS: [[[f32; 257]; 8]; 4] = [ + [ + [0.000000, -0.003906, -0.007812, -0.011719, -0.015625, -0.019531, -0.023438, -0.027344, -0.031250, -0.035156, -0.039062, -0.042969, -0.046875, -0.050781, -0.054687, -0.058593, -0.062499, -0.066404, -0.070310, -0.074214, -0.078119, -0.082020, -0.085917, -0.089814, -0.093689, -0.097549, -0.101408, -0.105222, -0.108969, -0.112716, -0.116463, -0.119858, -0.123204, -0.126550, -0.129896, -0.132087, -0.134192, -0.136297, -0.138402, -0.139029, -0.138591, -0.138153, -0.137715, -0.137277, -0.136208, -0.134968, -0.133728, -0.132488, -0.131248, -0.130007, -0.128764, -0.127522, -0.126280, -0.125038, -0.123793, -0.122191, -0.120589, -0.118988, -0.117386, -0.115784, -0.114182, -0.112299, -0.110414, -0.108530, -0.106645, -0.104760, -0.102875, -0.100853, -0.098758, -0.096664, -0.094569, -0.092474, -0.090380, -0.088285, -0.086074, -0.083848, -0.081623, -0.079397, -0.077171, -0.074945, -0.072719, -0.070470, -0.068210, -0.065950, -0.063690, -0.061429, -0.059169, -0.056909, -0.054648, -0.052496, -0.050343, -0.048191, -0.046039, -0.043887, -0.041734, -0.039582, -0.037430, -0.035503, -0.033629, -0.031756, -0.029882, -0.028009, -0.026135, -0.024262, -0.022388, -0.020543, -0.019148, -0.017753, -0.016358, -0.014963, -0.013569, -0.012174, -0.010779, -0.009384, -0.007989, -0.007096, -0.006394, -0.005692, -0.004989, -0.004287, -0.003585, -0.002883, -0.002181, -0.001479, -0.000777, -0.000550, -0.000494, -0.000438, -0.000382, -0.000326, -0.000270, -0.000214, -0.000159, -0.000103, -0.000047, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000], + [0.000000, -0.003906, -0.007810, -0.011714, -0.015617, -0.019520, -0.023420, -0.027317, -0.031213, -0.035106, -0.038996, -0.042869, -0.046738, -0.050579, -0.054409, -0.058210, -0.061993, -0.065718, -0.069443, -0.072985, -0.076518, -0.079914, -0.083141, -0.086369, -0.089272, -0.091958, -0.094644, -0.096916, -0.098582, -0.100248, -0.101914, -0.102339, -0.102591, -0.102842, -0.103094, -0.102809, -0.102485, -0.102160, -0.101836, -0.101648, -0.101559, -0.101469, -0.101380, -0.101290, -0.100926, -0.100488, -0.100049, -0.099610, -0.099171, -0.098507, -0.097696, -0.096884, -0.096073, -0.095261, -0.094447, -0.093356, -0.092265, -0.091174, -0.090084, -0.088993, -0.087902, -0.086539, -0.085174, -0.083810, -0.082445, -0.081080, -0.079715, -0.078211, -0.076633, -0.075055, -0.073477, -0.071899, -0.070321, -0.068743, -0.067045, -0.065333, -0.063620, -0.061908, -0.060195, -0.058482, -0.056770, -0.055028, -0.053272, -0.051517, -0.049761, -0.048005, -0.046250, -0.044494, -0.042738, -0.041056, -0.039375, -0.037694, -0.036012, -0.034331, -0.032650, -0.030969, -0.029287, -0.027782, -0.026319, -0.024855, -0.023392, -0.021929, -0.020466, -0.019003, -0.017539, -0.016098, -0.015009, -0.013919, -0.012830, -0.011740, -0.010651, -0.009561, -0.008472, -0.007382, -0.006293, -0.005591, -0.005039, -0.004486, -0.003933, -0.003380, -0.002827, -0.002274, -0.001722, -0.001169, -0.000616, -0.000437, -0.000392, -0.000348, -0.000304, -0.000259, -0.000215, -0.000170, -0.000126, -0.000082, -0.000037, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000], + [0.000000, -0.003889, -0.007766, -0.011628, -0.015484, -0.019325, -0.023153, -0.026956, -0.030743, -0.034487, -0.038207, -0.041789, -0.045327, -0.048632, -0.051842, -0.054816, -0.057642, -0.059991, -0.062341, -0.063894, -0.065409, -0.066430, -0.066845, -0.067260, -0.067075, -0.066490, -0.065904, -0.065464, -0.065235, -0.065006, -0.064777, -0.064648, -0.064532, -0.064417, -0.064302, -0.063994, -0.063672, -0.063350, -0.063027, -0.062616, -0.062141, -0.061666, -0.061190, -0.060715, -0.060164, -0.059592, -0.059020, -0.058449, -0.057877, -0.057219, -0.056506, -0.055792, -0.055079, -0.054365, -0.053651, -0.052854, -0.052057, -0.051260, -0.050464, -0.049667, -0.048870, -0.047994, -0.047118, -0.046242, -0.045365, -0.044489, -0.043613, -0.042704, -0.041779, -0.040854, -0.039928, -0.039003, -0.038078, -0.037152, -0.036206, -0.035257, -0.034309, -0.033360, -0.032411, -0.031463, -0.030514, -0.029568, -0.028622, -0.027676, -0.026731, -0.025785, -0.024839, -0.023894, -0.022948, -0.022057, -0.021166, -0.020276, -0.019385, -0.018494, -0.017603, -0.016712, -0.015821, -0.015026, -0.014254, -0.013482, -0.012710, -0.011938, -0.011166, -0.010394, -0.009622, -0.008861, -0.008269, -0.007678, -0.007087, -0.006495, -0.005904, -0.005312, -0.004721, -0.004129, -0.003538, -0.003150, -0.002841, -0.002531, -0.002221, -0.001912, -0.001602, -0.001292, -0.000983, -0.000673, -0.000363, -0.000262, -0.000235, -0.000209, -0.000182, -0.000155, -0.000129, -0.000102, -0.000076, -0.000049, -0.000022, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000], + [0.000000, -0.003216, -0.006332, -0.009343, -0.012326, -0.015215, -0.018012, -0.020640, -0.023188, -0.025512, -0.027735, -0.029351, -0.030826, -0.031553, -0.032123, -0.032295, -0.032353, -0.032045, -0.031737, -0.032000, -0.032289, -0.032629, -0.033031, -0.033434, -0.033802, -0.034148, -0.034493, -0.034792, -0.035021, -0.035251, -0.035480, -0.035605, -0.035715, -0.035825, -0.035935, -0.035913, -0.035882, -0.035851, -0.035820, -0.035735, -0.035609, -0.035484, -0.035359, -0.035234, -0.035025, -0.034794, -0.034563, -0.034332, -0.034101, -0.033801, -0.033455, -0.033109, -0.032763, -0.032417, -0.032070, -0.031651, -0.031232, -0.030812, -0.030393, -0.029974, -0.029555, -0.029057, -0.028559, -0.028061, -0.027563, -0.027065, -0.026567, -0.026037, -0.025490, -0.024943, -0.024396, -0.023849, -0.023303, -0.022756, -0.022183, -0.021607, -0.021032, -0.020456, -0.019880, -0.019304, -0.018729, -0.018149, -0.017566, -0.016984, -0.016402, -0.015820, -0.015238, -0.014655, -0.014073, -0.013525, -0.012977, -0.012429, -0.011880, -0.011332, -0.010784, -0.010236, -0.009688, -0.009199, -0.008724, -0.008250, -0.007775, -0.007301, -0.006826, -0.006352, -0.005877, -0.005409, -0.005050, -0.004690, -0.004331, -0.003971, -0.003612, -0.003253, -0.002893, -0.002534, -0.002174, -0.001938, -0.001748, -0.001559, -0.001369, -0.001180, -0.000990, -0.000801, -0.000611, -0.000422, -0.000232, -0.000169, -0.000152, -0.000135, -0.000118, -0.000101, -0.000083, -0.000066, -0.000049, -0.000032, -0.000014, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000], + [0.000000, 0.003646, 0.006659, 0.009375, 0.011731, 0.013420, 0.014676, 0.015142, 0.015370, 0.014932, 0.014561, 0.014594, 0.014704, 0.015220, 0.015721, 0.016189, 0.016651, 0.017095, 0.017538, 0.017972, 0.018404, 0.018805, 0.019166, 0.019527, 0.019867, 0.020193, 0.020519, 0.020826, 0.021106, 0.021387, 0.021667, 0.021886, 0.022098, 0.022309, 0.022520, 0.022666, 0.022807, 0.022948, 0.023088, 0.023182, 0.023242, 0.023302, 0.023362, 0.023422, 0.023400, 0.023355, 0.023310, 0.023265, 0.023221, 0.023123, 0.022990, 0.022858, 0.022725, 0.022592, 0.022459, 0.022224, 0.021989, 0.021754, 0.021519, 0.021284, 0.021049, 0.020741, 0.020433, 0.020124, 0.019816, 0.019508, 0.019199, 0.018846, 0.018470, 0.018094, 0.017718, 0.017341, 0.016965, 0.016589, 0.016177, 0.015761, 0.015345, 0.014929, 0.014513, 0.014097, 0.013681, 0.013261, 0.012839, 0.012416, 0.011994, 0.011572, 0.011150, 0.010728, 0.010306, 0.009902, 0.009498, 0.009094, 0.008689, 0.008285, 0.007881, 0.007477, 0.007073, 0.006710, 0.006356, 0.006003, 0.005650, 0.005297, 0.004943, 0.004590, 0.004237, 0.003889, 0.003626, 0.003364, 0.003102, 0.002840, 0.002577, 0.002315, 0.002053, 0.001791, 0.001528, 0.001357, 0.001221, 0.001085, 0.000948, 0.000812, 0.000676, 0.000540, 0.000404, 0.000267, 0.000131, 0.000088, 0.000079, 0.000070, 0.000061, 0.000052, 0.000043, 0.000034, 0.000026, 0.000017, 0.000008, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000], + [0.000000, 0.009101, 0.016045, 0.021283, 0.025025, 0.026425, 0.027479, 0.027901, 0.028224, 0.028275, 0.028387, 0.028865, 0.029436, 0.030492, 0.031508, 0.032421, 0.033364, 0.034399, 0.035435, 0.036317, 0.037192, 0.038050, 0.038889, 0.039728, 0.040518, 0.041276, 0.042034, 0.042754, 0.043416, 0.044078, 0.044741, 0.045302, 0.045849, 0.046396, 0.046943, 0.047349, 0.047744, 0.048140, 0.048536, 0.048827, 0.049044, 0.049260, 0.049476, 0.049693, 0.049744, 0.049751, 0.049758, 0.049765, 0.049772, 0.049646, 0.049434, 0.049222, 0.049010, 0.048798, 0.048584, 0.048137, 0.047690, 0.047243, 0.046796, 0.046348, 0.045901, 0.045257, 0.044610, 0.043964, 0.043318, 0.042672, 0.042026, 0.041275, 0.040470, 0.039665, 0.038860, 0.038055, 0.037250, 0.036444, 0.035538, 0.034620, 0.033702, 0.032783, 0.031865, 0.030947, 0.030028, 0.029095, 0.028155, 0.027215, 0.026275, 0.025335, 0.024395, 0.023455, 0.022515, 0.021619, 0.020723, 0.019827, 0.018931, 0.018034, 0.017138, 0.016242, 0.015346, 0.014552, 0.013783, 0.013014, 0.012245, 0.011476, 0.010707, 0.009938, 0.009168, 0.008411, 0.007845, 0.007278, 0.006712, 0.006145, 0.005579, 0.005012, 0.004445, 0.003879, 0.003312, 0.002945, 0.002654, 0.002363, 0.002071, 0.001780, 0.001489, 0.001198, 0.000906, 0.000615, 0.000324, 0.000229, 0.000206, 0.000183, 0.000159, 0.000136, 0.000113, 0.000090, 0.000066, 0.000043, 0.000020, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000], + [0.000000, 0.016424, 0.026872, 0.032718, 0.036179, 0.037852, 0.039251, 0.040147, 0.040939, 0.041440, 0.042015, 0.043039, 0.044157, 0.045770, 0.047360, 0.048891, 0.050438, 0.052038, 0.053639, 0.055094, 0.056543, 0.057972, 0.059376, 0.060780, 0.062128, 0.063438, 0.064749, 0.066005, 0.067181, 0.068356, 0.069532, 0.070566, 0.071581, 0.072595, 0.073610, 0.074423, 0.075221, 0.076019, 0.076817, 0.077447, 0.077957, 0.078467, 0.078977, 0.079487, 0.079717, 0.079872, 0.080026, 0.080181, 0.080336, 0.080261, 0.080036, 0.079811, 0.079586, 0.079361, 0.079132, 0.078488, 0.077845, 0.077201, 0.076558, 0.075914, 0.075270, 0.074259, 0.073245, 0.072231, 0.071217, 0.070203, 0.069189, 0.067969, 0.066640, 0.065312, 0.063983, 0.062655, 0.061327, 0.059998, 0.058504, 0.056989, 0.055474, 0.053959, 0.052444, 0.050929, 0.049414, 0.047861, 0.046290, 0.044719, 0.043148, 0.041577, 0.040006, 0.038435, 0.036864, 0.035383, 0.033902, 0.032421, 0.030940, 0.029460, 0.027979, 0.026498, 0.025017, 0.023711, 0.022447, 0.021184, 0.019920, 0.018656, 0.017392, 0.016128, 0.014864, 0.013620, 0.012702, 0.011785, 0.010867, 0.009949, 0.009031, 0.008113, 0.007195, 0.006278, 0.005360, 0.004765, 0.004294, 0.003823, 0.003353, 0.002882, 0.002411, 0.001940, 0.001469, 0.000998, 0.000527, 0.000374, 0.000336, 0.000298, 0.000260, 0.000222, 0.000184, 0.000146, 0.000108, 0.000070, 0.000032, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000], + [0.000000, 0.025013, 0.036949, 0.042838, 0.046705, 0.048947, 0.050910, 0.052362, 0.053694, 0.054690, 0.055763, 0.057303, 0.058964, 0.061264, 0.063530, 0.065707, 0.067897, 0.070128, 0.072358, 0.074526, 0.076691, 0.078814, 0.080885, 0.082956, 0.084966, 0.086934, 0.088903, 0.090823, 0.092674, 0.094525, 0.096376, 0.098048, 0.099696, 0.101343, 0.102991, 0.104385, 0.105761, 0.107137, 0.108512, 0.109656, 0.110634, 0.111611, 0.112588, 0.113565, 0.114129, 0.114580, 0.115032, 0.115483, 0.115935, 0.116025, 0.115879, 0.115733, 0.115587, 0.115441, 0.115289, 0.114462, 0.113635, 0.112808, 0.111982, 0.111155, 0.110328, 0.108885, 0.107438, 0.105990, 0.104543, 0.103096, 0.101648, 0.099869, 0.097916, 0.095962, 0.094009, 0.092055, 0.090102, 0.088148, 0.085917, 0.083652, 0.081387, 0.079122, 0.076857, 0.074592, 0.072327, 0.070013, 0.067676, 0.065339, 0.063001, 0.060664, 0.058327, 0.055990, 0.053653, 0.051465, 0.049278, 0.047092, 0.044905, 0.042718, 0.040531, 0.038344, 0.036158, 0.034252, 0.032414, 0.030575, 0.028737, 0.026898, 0.025060, 0.023222, 0.021383, 0.019575, 0.018249, 0.016923, 0.015598, 0.014272, 0.012946, 0.011621, 0.010295, 0.008969, 0.007644, 0.006791, 0.006119, 0.005447, 0.004775, 0.004103, 0.003431, 0.002759, 0.002087, 0.001415, 0.000743, 0.000525, 0.000472, 0.000418, 0.000365, 0.000312, 0.000258, 0.000205, 0.000152, 0.000098, 0.000045, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000], + ], + [ + [0.000000, -0.003906, -0.007812, -0.011719, -0.015625, -0.019531, -0.023438, -0.027344, -0.031250, -0.035156, -0.039062, -0.042969, -0.046875, -0.050781, -0.054688, -0.058594, -0.062500, -0.066406, -0.070312, -0.074219, -0.078125, -0.082031, -0.085938, -0.089844, -0.093750, -0.097656, -0.101562, -0.105469, -0.109375, -0.113281, -0.117187, -0.121093, -0.124999, -0.128906, -0.132812, -0.136717, -0.140621, -0.144526, -0.148431, -0.152333, -0.156234, -0.160135, -0.164036, -0.167937, -0.171819, -0.175697, -0.179574, -0.183452, -0.187329, -0.191141, -0.194911, -0.198680, -0.202449, -0.206219, -0.209984, -0.213377, -0.216770, -0.220162, -0.223555, -0.226947, -0.230340, -0.232560, -0.234772, -0.236984, -0.239196, -0.241409, -0.243621, -0.244545, -0.244792, -0.245038, -0.245285, -0.245532, -0.245779, -0.246025, -0.246172, -0.246307, -0.246442, -0.246576, -0.246711, -0.246845, -0.246980, -0.246882, -0.246673, -0.246464, -0.246254, -0.246045, -0.245836, -0.245627, -0.245418, -0.244803, -0.244185, -0.243568, -0.242951, -0.242334, -0.241716, -0.241099, -0.240482, -0.239553, -0.238550, -0.237547, -0.236544, -0.235540, -0.234537, -0.233534, -0.232531, -0.231509, -0.230200, -0.228890, -0.227580, -0.226271, -0.224961, -0.223651, -0.222342, -0.221032, -0.219723, -0.218225, -0.216656, -0.215087, -0.213517, -0.211948, -0.210379, -0.208810, -0.207241, -0.205671, -0.204102, -0.202374, -0.200589, -0.198804, -0.197019, -0.195235, -0.193450, -0.191665, -0.189880, -0.188095, -0.186310, -0.184500, -0.182559, -0.180619, -0.178678, -0.176738, -0.174798, -0.172857, -0.170917, -0.168976, -0.167036, -0.165095, -0.163099, -0.161058, -0.159017, -0.156976, -0.154936, -0.152895, -0.150854, -0.148813, -0.146772, -0.144731, -0.142686, -0.140594, -0.138502, -0.136410, -0.134318, -0.132226, -0.130134, -0.128042, -0.125950, -0.123858, -0.121766, -0.119682, -0.117600, -0.115518, -0.113436, -0.111355, -0.109273, -0.107191, -0.105109, -0.103027, -0.100945, -0.098905, -0.096878, -0.094851, -0.092824, -0.090797, -0.088770, -0.086743, -0.084717, -0.082690, -0.080669, -0.078748, -0.076826, -0.074905, -0.072983, -0.071062, -0.069140, -0.067219, -0.065297, -0.063375, -0.061571, -0.059799, -0.058027, -0.056255, -0.054484, -0.052712, -0.050940, -0.049168, -0.047396, -0.045808, -0.044226, -0.042644, -0.041063, -0.039481, -0.037899, -0.036317, -0.034735, -0.033291, -0.031918, -0.030545, -0.029173, -0.027800, -0.026427, -0.025054, -0.023681, -0.022501, -0.021348, -0.020196, -0.019043, -0.017890, -0.016738, -0.015585, -0.014581, -0.013657, -0.012734, -0.011811, -0.010888, -0.009964, -0.009041, -0.008335, -0.007630, -0.006925, -0.006220, -0.005514, -0.004809, -0.004309, -0.003811, -0.003313, -0.002815, -0.002317, -0.001941, -0.001619, -0.001297, -0.000976, -0.000683, -0.000518, -0.000353, -0.000188, -0.000092, -0.000046, 0.000000], + [0.000000, -0.003906, -0.007812, -0.011717, -0.015622, -0.019528, -0.023434, -0.027338, -0.031242, -0.035145, -0.039048, -0.042950, -0.046852, -0.050752, -0.054650, -0.058542, -0.062434, -0.066322, -0.070211, -0.074086, -0.077960, -0.081820, -0.085661, -0.089502, -0.093311, -0.097100, -0.100888, -0.104624, -0.108282, -0.111941, -0.115599, -0.119092, -0.122562, -0.126032, -0.129502, -0.132580, -0.135629, -0.138678, -0.141728, -0.144400, -0.146802, -0.149204, -0.151605, -0.154007, -0.155625, -0.157031, -0.158436, -0.159842, -0.161247, -0.162285, -0.163082, -0.163880, -0.164677, -0.165474, -0.166274, -0.167365, -0.168456, -0.169547, -0.170638, -0.171729, -0.172819, -0.173662, -0.174504, -0.175345, -0.176186, -0.177028, -0.177869, -0.178537, -0.179113, -0.179690, -0.180267, -0.180843, -0.181420, -0.181997, -0.182333, -0.182640, -0.182947, -0.183253, -0.183560, -0.183867, -0.184174, -0.184268, -0.184262, -0.184256, -0.184250, -0.184244, -0.184238, -0.184232, -0.184226, -0.183930, -0.183633, -0.183336, -0.183039, -0.182742, -0.182445, -0.182148, -0.181851, -0.181319, -0.180731, -0.180143, -0.179554, -0.178966, -0.178378, -0.177789, -0.177201, -0.176597, -0.175739, -0.174881, -0.174023, -0.173166, -0.172308, -0.171450, -0.170592, -0.169734, -0.168876, -0.167842, -0.166740, -0.165638, -0.164537, -0.163435, -0.162333, -0.161232, -0.160130, -0.159028, -0.157927, -0.156676, -0.155371, -0.154066, -0.152762, -0.151457, -0.150152, -0.148847, -0.147543, -0.146238, -0.144933, -0.143603, -0.142137, -0.140671, -0.139205, -0.137739, -0.136274, -0.134808, -0.133342, -0.131876, -0.130410, -0.128944, -0.127420, -0.125848, -0.124276, -0.122704, -0.121133, -0.119561, -0.117989, -0.116417, -0.114845, -0.113274, -0.111698, -0.110072, -0.108446, -0.106820, -0.105194, -0.103568, -0.101942, -0.100316, -0.098690, -0.097064, -0.095438, -0.093809, -0.092180, -0.090550, -0.088921, -0.087291, -0.085662, -0.084032, -0.082403, -0.080773, -0.079144, -0.077546, -0.075959, -0.074372, -0.072785, -0.071198, -0.069611, -0.068024, -0.066437, -0.064850, -0.063268, -0.061761, -0.060254, -0.058748, -0.057241, -0.055735, -0.054228, -0.052722, -0.051215, -0.049709, -0.048298, -0.046915, -0.045531, -0.044148, -0.042764, -0.041380, -0.039997, -0.038613, -0.037230, -0.035986, -0.034747, -0.033507, -0.032268, -0.031029, -0.029789, -0.028550, -0.027310, -0.026179, -0.025103, -0.024027, -0.022951, -0.021875, -0.020798, -0.019722, -0.018646, -0.017719, -0.016812, -0.015906, -0.014999, -0.014093, -0.013186, -0.012280, -0.011490, -0.010765, -0.010040, -0.009316, -0.008591, -0.007866, -0.007141, -0.006584, -0.006028, -0.005472, -0.004916, -0.004360, -0.003804, -0.003410, -0.003017, -0.002625, -0.002233, -0.001840, -0.001542, -0.001286, -0.001030, -0.000774, -0.000541, -0.000410, -0.000279, -0.000148, -0.000072, -0.000036, 0.000000], + [0.000000, -0.003896, -0.007794, -0.011686, -0.015574, -0.019462, -0.023345, -0.027217, -0.031086, -0.034947, -0.038802, -0.042626, -0.046444, -0.050238, -0.054009, -0.057720, -0.061406, -0.065011, -0.068615, -0.072035, -0.075446, -0.078709, -0.081790, -0.084872, -0.087704, -0.090369, -0.093035, -0.095368, -0.097214, -0.099060, -0.100906, -0.101989, -0.102964, -0.103939, -0.104914, -0.105335, -0.105714, -0.106094, -0.106474, -0.107069, -0.107820, -0.108570, -0.109321, -0.110071, -0.110713, -0.111326, -0.111938, -0.112550, -0.113163, -0.113641, -0.114032, -0.114423, -0.114814, -0.115205, -0.115595, -0.115822, -0.116050, -0.116277, -0.116505, -0.116732, -0.116960, -0.116991, -0.117021, -0.117052, -0.117082, -0.117112, -0.117142, -0.117070, -0.116945, -0.116820, -0.116695, -0.116570, -0.116444, -0.116319, -0.116069, -0.115804, -0.115539, -0.115274, -0.115009, -0.114743, -0.114478, -0.114121, -0.113720, -0.113318, -0.112917, -0.112516, -0.112114, -0.111713, -0.111312, -0.110791, -0.110269, -0.109748, -0.109226, -0.108704, -0.108183, -0.107661, -0.107140, -0.106545, -0.105933, -0.105321, -0.104709, -0.104096, -0.103484, -0.102872, -0.102260, -0.101643, -0.100944, -0.100245, -0.099546, -0.098846, -0.098147, -0.097448, -0.096749, -0.096050, -0.095351, -0.094604, -0.093838, -0.093073, -0.092308, -0.091542, -0.090777, -0.090012, -0.089246, -0.088481, -0.087716, -0.086909, -0.086088, -0.085266, -0.084445, -0.083623, -0.082802, -0.081980, -0.081159, -0.080337, -0.079516, -0.078688, -0.077828, -0.076968, -0.076109, -0.075249, -0.074389, -0.073529, -0.072669, -0.071810, -0.070950, -0.070090, -0.069215, -0.068328, -0.067441, -0.066554, -0.065667, -0.064781, -0.063894, -0.063007, -0.062120, -0.061233, -0.060346, -0.059456, -0.058566, -0.057676, -0.056786, -0.055896, -0.055006, -0.054116, -0.053226, -0.052336, -0.051447, -0.050570, -0.049697, -0.048824, -0.047950, -0.047077, -0.046204, -0.045331, -0.044458, -0.043585, -0.042712, -0.041861, -0.041019, -0.040176, -0.039333, -0.038490, -0.037647, -0.036804, -0.035962, -0.035119, -0.034279, -0.033476, -0.032674, -0.031871, -0.031069, -0.030266, -0.029463, -0.028661, -0.027858, -0.027056, -0.026307, -0.025573, -0.024839, -0.024105, -0.023371, -0.022638, -0.021904, -0.021170, -0.020436, -0.019767, -0.019101, -0.018435, -0.017768, -0.017102, -0.016435, -0.015769, -0.015102, -0.014491, -0.013909, -0.013326, -0.012744, -0.012161, -0.011579, -0.010996, -0.010414, -0.009906, -0.009408, -0.008910, -0.008412, -0.007914, -0.007417, -0.006919, -0.006483, -0.006081, -0.005679, -0.005277, -0.004875, -0.004473, -0.004071, -0.003755, -0.003438, -0.003122, -0.002806, -0.002490, -0.002174, -0.001953, -0.001733, -0.001512, -0.001292, -0.001072, -0.000900, -0.000750, -0.000601, -0.000451, -0.000316, -0.000241, -0.000165, -0.000090, -0.000045, -0.000023, 0.000000], + [0.000000, -0.003245, -0.006451, -0.009562, -0.012604, -0.015620, -0.018545, -0.021305, -0.024020, -0.026613, -0.029128, -0.031179, -0.033102, -0.034352, -0.035460, -0.036218, -0.036875, -0.037210, -0.037546, -0.037927, -0.038310, -0.038883, -0.039689, -0.040494, -0.041371, -0.042295, -0.043219, -0.044099, -0.044914, -0.045729, -0.046543, -0.047334, -0.048121, -0.048909, -0.049696, -0.050409, -0.051117, -0.051824, -0.052532, -0.053184, -0.053796, -0.054408, -0.055020, -0.055632, -0.056188, -0.056729, -0.057271, -0.057812, -0.058353, -0.058826, -0.059254, -0.059683, -0.060111, -0.060540, -0.060967, -0.061309, -0.061650, -0.061992, -0.062333, -0.062675, -0.063016, -0.063236, -0.063455, -0.063673, -0.063892, -0.064110, -0.064329, -0.064479, -0.064594, -0.064708, -0.064823, -0.064937, -0.065051, -0.065166, -0.065188, -0.065199, -0.065210, -0.065221, -0.065232, -0.065243, -0.065254, -0.065196, -0.065105, -0.065014, -0.064923, -0.064833, -0.064742, -0.064651, -0.064560, -0.064371, -0.064181, -0.063992, -0.063802, -0.063612, -0.063423, -0.063233, -0.063043, -0.062789, -0.062520, -0.062250, -0.061981, -0.061712, -0.061442, -0.061173, -0.060903, -0.060629, -0.060277, -0.059925, -0.059573, -0.059221, -0.058870, -0.058518, -0.058166, -0.057814, -0.057462, -0.057064, -0.056648, -0.056232, -0.055816, -0.055400, -0.054984, -0.054568, -0.054152, -0.053736, -0.053320, -0.052863, -0.052392, -0.051922, -0.051451, -0.050980, -0.050509, -0.050038, -0.049568, -0.049097, -0.048626, -0.048148, -0.047635, -0.047122, -0.046608, -0.046095, -0.045582, -0.045068, -0.044555, -0.044042, -0.043529, -0.043015, -0.042489, -0.041953, -0.041418, -0.040882, -0.040346, -0.039810, -0.039274, -0.038738, -0.038202, -0.037666, -0.037130, -0.036584, -0.036039, -0.035494, -0.034948, -0.034403, -0.033858, -0.033312, -0.032767, -0.032222, -0.031676, -0.031135, -0.030594, -0.030053, -0.029512, -0.028972, -0.028431, -0.027890, -0.027349, -0.026809, -0.026268, -0.025741, -0.025218, -0.024695, -0.024173, -0.023650, -0.023127, -0.022604, -0.022082, -0.021559, -0.021038, -0.020543, -0.020047, -0.019552, -0.019057, -0.018562, -0.018066, -0.017571, -0.017076, -0.016580, -0.016117, -0.015661, -0.015206, -0.014751, -0.014296, -0.013841, -0.013386, -0.012931, -0.012476, -0.012068, -0.011661, -0.011255, -0.010848, -0.010441, -0.010035, -0.009628, -0.009222, -0.008848, -0.008491, -0.008134, -0.007776, -0.007419, -0.007062, -0.006705, -0.006348, -0.006035, -0.005729, -0.005423, -0.005116, -0.004810, -0.004503, -0.004197, -0.003931, -0.003687, -0.003444, -0.003200, -0.002957, -0.002713, -0.002469, -0.002280, -0.002092, -0.001903, -0.001714, -0.001526, -0.001337, -0.001202, -0.001067, -0.000933, -0.000798, -0.000664, -0.000555, -0.000457, -0.000359, -0.000262, -0.000174, -0.000132, -0.000090, -0.000047, -0.000023, -0.000011, 0.000000], + [0.000000, 0.003733, 0.006885, 0.009623, 0.011999, 0.013697, 0.014974, 0.015479, 0.015753, 0.015382, 0.015074, 0.015142, 0.015300, 0.015928, 0.016523, 0.017035, 0.017575, 0.018207, 0.018839, 0.019385, 0.019926, 0.020457, 0.020973, 0.021490, 0.022018, 0.022555, 0.023091, 0.023617, 0.024128, 0.024639, 0.025149, 0.025657, 0.026163, 0.026670, 0.027177, 0.027654, 0.028129, 0.028604, 0.029079, 0.029548, 0.030014, 0.030480, 0.030946, 0.031412, 0.031837, 0.032250, 0.032663, 0.033077, 0.033490, 0.033884, 0.034267, 0.034649, 0.035031, 0.035414, 0.035795, 0.036135, 0.036474, 0.036813, 0.037152, 0.037491, 0.037830, 0.038118, 0.038406, 0.038694, 0.038982, 0.039270, 0.039557, 0.039805, 0.040033, 0.040260, 0.040487, 0.040714, 0.040941, 0.041168, 0.041329, 0.041483, 0.041637, 0.041790, 0.041944, 0.042097, 0.042251, 0.042362, 0.042453, 0.042544, 0.042635, 0.042727, 0.042818, 0.042909, 0.043000, 0.043004, 0.043007, 0.043010, 0.043013, 0.043017, 0.043020, 0.043023, 0.043027, 0.042961, 0.042879, 0.042797, 0.042716, 0.042634, 0.042552, 0.042470, 0.042388, 0.042302, 0.042144, 0.041986, 0.041828, 0.041670, 0.041512, 0.041354, 0.041196, 0.041039, 0.040881, 0.040665, 0.040428, 0.040191, 0.039954, 0.039717, 0.039480, 0.039243, 0.039005, 0.038768, 0.038531, 0.038245, 0.037941, 0.037637, 0.037333, 0.037030, 0.036726, 0.036422, 0.036118, 0.035814, 0.035510, 0.035198, 0.034841, 0.034484, 0.034127, 0.033770, 0.033413, 0.033055, 0.032698, 0.032341, 0.031984, 0.031627, 0.031251, 0.030860, 0.030469, 0.030078, 0.029686, 0.029295, 0.028904, 0.028513, 0.028122, 0.027731, 0.027339, 0.026936, 0.026534, 0.026132, 0.025729, 0.025327, 0.024925, 0.024522, 0.024120, 0.023717, 0.023315, 0.022911, 0.022506, 0.022101, 0.021696, 0.021291, 0.020886, 0.020481, 0.020076, 0.019671, 0.019266, 0.018872, 0.018481, 0.018090, 0.017700, 0.017309, 0.016919, 0.016528, 0.016137, 0.015747, 0.015358, 0.014991, 0.014624, 0.014257, 0.013890, 0.013523, 0.013156, 0.012789, 0.012423, 0.012056, 0.011713, 0.011377, 0.011041, 0.010705, 0.010370, 0.010034, 0.009698, 0.009362, 0.009026, 0.008726, 0.008427, 0.008128, 0.007830, 0.007531, 0.007232, 0.006933, 0.006634, 0.006361, 0.006101, 0.005841, 0.005580, 0.005320, 0.005060, 0.004800, 0.004540, 0.004318, 0.004101, 0.003884, 0.003668, 0.003451, 0.003235, 0.003018, 0.002826, 0.002648, 0.002469, 0.002290, 0.002112, 0.001933, 0.001755, 0.001621, 0.001487, 0.001353, 0.001219, 0.001085, 0.000951, 0.000849, 0.000749, 0.000648, 0.000547, 0.000446, 0.000373, 0.000313, 0.000253, 0.000193, 0.000138, 0.000106, 0.000075, 0.000043, 0.000023, 0.000011, 0.000000], + [0.000000, 0.009208, 0.016334, 0.021551, 0.025264, 0.026740, 0.027861, 0.028333, 0.028707, 0.028808, 0.028974, 0.029541, 0.030206, 0.031393, 0.032549, 0.033632, 0.034735, 0.035905, 0.037075, 0.038197, 0.039317, 0.040428, 0.041528, 0.042628, 0.043718, 0.044802, 0.045887, 0.046964, 0.048033, 0.049102, 0.050170, 0.051216, 0.052258, 0.053300, 0.054342, 0.055360, 0.056375, 0.057391, 0.058407, 0.059397, 0.060370, 0.061342, 0.062315, 0.063287, 0.064219, 0.065139, 0.066059, 0.066979, 0.067900, 0.068793, 0.069668, 0.070544, 0.071419, 0.072295, 0.073169, 0.073942, 0.074715, 0.075488, 0.076261, 0.077035, 0.077808, 0.078506, 0.079203, 0.079900, 0.080598, 0.081295, 0.081993, 0.082610, 0.083185, 0.083760, 0.084335, 0.084910, 0.085485, 0.086060, 0.086515, 0.086956, 0.087396, 0.087836, 0.088276, 0.088717, 0.089157, 0.089497, 0.089789, 0.090081, 0.090373, 0.090665, 0.090957, 0.091249, 0.091541, 0.091651, 0.091761, 0.091871, 0.091980, 0.092090, 0.092200, 0.092310, 0.092419, 0.092373, 0.092290, 0.092206, 0.092122, 0.092039, 0.091955, 0.091872, 0.091788, 0.091693, 0.091414, 0.091134, 0.090854, 0.090575, 0.090295, 0.090016, 0.089736, 0.089456, 0.089177, 0.088761, 0.088293, 0.087825, 0.087356, 0.086888, 0.086420, 0.085952, 0.085484, 0.085016, 0.084547, 0.083951, 0.083309, 0.082666, 0.082024, 0.081382, 0.080739, 0.080097, 0.079454, 0.078812, 0.078170, 0.077506, 0.076729, 0.075953, 0.075177, 0.074400, 0.073624, 0.072847, 0.072071, 0.071295, 0.070518, 0.069742, 0.068918, 0.068057, 0.067196, 0.066335, 0.065474, 0.064612, 0.063751, 0.062890, 0.062029, 0.061168, 0.060304, 0.059402, 0.058501, 0.057600, 0.056699, 0.055798, 0.054897, 0.053995, 0.053094, 0.052193, 0.051292, 0.050390, 0.049487, 0.048584, 0.047681, 0.046779, 0.045876, 0.044973, 0.044070, 0.043167, 0.042265, 0.041387, 0.040518, 0.039649, 0.038780, 0.037910, 0.037041, 0.036172, 0.035303, 0.034433, 0.033568, 0.032758, 0.031948, 0.031139, 0.030329, 0.029519, 0.028710, 0.027900, 0.027090, 0.026280, 0.025526, 0.024786, 0.024047, 0.023308, 0.022568, 0.021829, 0.021090, 0.020350, 0.019611, 0.018953, 0.018297, 0.017641, 0.016985, 0.016330, 0.015674, 0.015018, 0.014362, 0.013769, 0.013206, 0.012644, 0.012082, 0.011520, 0.010958, 0.010396, 0.009833, 0.009349, 0.008876, 0.008402, 0.007929, 0.007455, 0.006982, 0.006509, 0.006094, 0.005712, 0.005330, 0.004948, 0.004566, 0.004184, 0.003802, 0.003509, 0.003217, 0.002925, 0.002633, 0.002341, 0.002049, 0.001834, 0.001621, 0.001407, 0.001193, 0.000980, 0.000822, 0.000691, 0.000559, 0.000427, 0.000307, 0.000234, 0.000162, 0.000090, 0.000046, 0.000023, 0.000000], + [0.000000, 0.016424, 0.027008, 0.032906, 0.036341, 0.038091, 0.039557, 0.040504, 0.041346, 0.041896, 0.042523, 0.043617, 0.044814, 0.046556, 0.048276, 0.049941, 0.051629, 0.053393, 0.055157, 0.056839, 0.058518, 0.060201, 0.061890, 0.063580, 0.065239, 0.066879, 0.068519, 0.070164, 0.071818, 0.073472, 0.075127, 0.076752, 0.078373, 0.079994, 0.081615, 0.083234, 0.084852, 0.086471, 0.088089, 0.089686, 0.091267, 0.092848, 0.094429, 0.096010, 0.097533, 0.099041, 0.100548, 0.102055, 0.103562, 0.105039, 0.106496, 0.107952, 0.109409, 0.110866, 0.112321, 0.113668, 0.115015, 0.116362, 0.117709, 0.119057, 0.120404, 0.121643, 0.122882, 0.124121, 0.125360, 0.126599, 0.127838, 0.128971, 0.130047, 0.131123, 0.132199, 0.133276, 0.134352, 0.135428, 0.136325, 0.137200, 0.138075, 0.138950, 0.139825, 0.140700, 0.141575, 0.142288, 0.142924, 0.143560, 0.144197, 0.144833, 0.145469, 0.146105, 0.146741, 0.147086, 0.147430, 0.147774, 0.148117, 0.148461, 0.148804, 0.149148, 0.149492, 0.149568, 0.149580, 0.149592, 0.149604, 0.149616, 0.149628, 0.149640, 0.149652, 0.149643, 0.149297, 0.148951, 0.148605, 0.148259, 0.147913, 0.147567, 0.147221, 0.146875, 0.146529, 0.145923, 0.145218, 0.144513, 0.143807, 0.143102, 0.142397, 0.141692, 0.140986, 0.140281, 0.139576, 0.138635, 0.137610, 0.136584, 0.135559, 0.134534, 0.133508, 0.132483, 0.131457, 0.130432, 0.129407, 0.128340, 0.127060, 0.125779, 0.124498, 0.123217, 0.121937, 0.120656, 0.119375, 0.118094, 0.116814, 0.115533, 0.114162, 0.112719, 0.111277, 0.109834, 0.108391, 0.106948, 0.105506, 0.104063, 0.102620, 0.101177, 0.099729, 0.098216, 0.096703, 0.095190, 0.093677, 0.092163, 0.090650, 0.089137, 0.087624, 0.086111, 0.084597, 0.083086, 0.081575, 0.080065, 0.078554, 0.077043, 0.075532, 0.074022, 0.072511, 0.071000, 0.069490, 0.068024, 0.066574, 0.065123, 0.063672, 0.062222, 0.060771, 0.059321, 0.057870, 0.056419, 0.054975, 0.053631, 0.052286, 0.050941, 0.049597, 0.048252, 0.046907, 0.045563, 0.044218, 0.042874, 0.041628, 0.040410, 0.039193, 0.037975, 0.036757, 0.035540, 0.034322, 0.033104, 0.031886, 0.030809, 0.029736, 0.028662, 0.027589, 0.026516, 0.025443, 0.024369, 0.023296, 0.022324, 0.021403, 0.020482, 0.019561, 0.018641, 0.017720, 0.016799, 0.015878, 0.015091, 0.014324, 0.013556, 0.012788, 0.012020, 0.011252, 0.010485, 0.009816, 0.009200, 0.008585, 0.007970, 0.007355, 0.006740, 0.006125, 0.005652, 0.005180, 0.004708, 0.004236, 0.003764, 0.003292, 0.002949, 0.002607, 0.002265, 0.001924, 0.001582, 0.001330, 0.001118, 0.000907, 0.000695, 0.000500, 0.000380, 0.000260, 0.000140, 0.000069, 0.000034, 0.000000], + [0.000000, 0.025013, 0.036949, 0.042838, 0.046717, 0.049017, 0.051023, 0.052492, 0.053831, 0.054810, 0.055876, 0.057465, 0.059174, 0.061515, 0.063827, 0.066068, 0.068332, 0.070669, 0.073007, 0.075282, 0.077555, 0.079832, 0.082114, 0.084397, 0.086660, 0.088911, 0.091163, 0.093429, 0.095718, 0.098006, 0.100295, 0.102560, 0.104823, 0.107085, 0.109347, 0.111619, 0.113892, 0.116165, 0.118438, 0.120705, 0.122967, 0.125229, 0.127492, 0.129754, 0.131964, 0.134161, 0.136358, 0.138554, 0.140751, 0.142934, 0.145107, 0.147280, 0.149453, 0.151626, 0.153799, 0.155865, 0.157932, 0.159999, 0.162066, 0.164132, 0.166199, 0.168152, 0.170103, 0.172055, 0.174007, 0.175958, 0.177910, 0.179744, 0.181516, 0.183287, 0.185059, 0.186831, 0.188603, 0.190374, 0.191918, 0.193433, 0.194948, 0.196463, 0.197978, 0.199494, 0.201009, 0.202300, 0.203485, 0.204670, 0.205854, 0.207039, 0.208224, 0.209409, 0.210593, 0.211345, 0.212094, 0.212843, 0.213593, 0.214342, 0.215091, 0.215841, 0.216590, 0.216921, 0.217152, 0.217382, 0.217613, 0.217844, 0.218075, 0.218306, 0.218537, 0.218734, 0.218389, 0.218045, 0.217700, 0.217355, 0.217011, 0.216666, 0.216321, 0.215977, 0.215632, 0.214856, 0.213914, 0.212973, 0.212031, 0.211090, 0.210148, 0.209207, 0.208266, 0.207324, 0.206383, 0.205037, 0.203546, 0.202055, 0.200563, 0.199072, 0.197581, 0.196090, 0.194598, 0.193107, 0.191616, 0.190057, 0.188143, 0.186229, 0.184315, 0.182401, 0.180487, 0.178573, 0.176659, 0.174745, 0.172831, 0.170917, 0.168855, 0.166676, 0.164496, 0.162316, 0.160136, 0.157956, 0.155777, 0.153597, 0.151417, 0.149237, 0.147049, 0.144765, 0.142480, 0.140195, 0.137910, 0.135626, 0.133341, 0.131056, 0.128772, 0.126487, 0.124202, 0.121930, 0.119662, 0.117393, 0.115125, 0.112856, 0.110588, 0.108319, 0.106051, 0.103783, 0.101514, 0.099329, 0.097170, 0.095011, 0.092852, 0.090693, 0.088534, 0.086375, 0.084216, 0.082057, 0.079908, 0.077921, 0.075933, 0.073945, 0.071958, 0.069970, 0.067983, 0.065995, 0.064008, 0.062020, 0.060192, 0.058408, 0.056624, 0.054840, 0.053056, 0.051272, 0.049488, 0.047705, 0.045921, 0.044355, 0.042796, 0.041237, 0.039678, 0.038119, 0.036559, 0.035000, 0.033441, 0.032034, 0.030704, 0.029375, 0.028045, 0.026715, 0.025386, 0.024056, 0.022726, 0.021598, 0.020498, 0.019398, 0.018299, 0.017199, 0.016099, 0.014999, 0.014039, 0.013155, 0.012271, 0.011388, 0.010504, 0.009620, 0.008736, 0.008061, 0.007386, 0.006711, 0.006037, 0.005362, 0.004687, 0.004199, 0.003713, 0.003226, 0.002740, 0.002253, 0.001892, 0.001589, 0.001285, 0.000981, 0.000702, 0.000532, 0.000362, 0.000191, 0.000092, 0.000046, 0.000000], + ], + [ + [0.000000, -0.000071, -0.000200, -0.000235, -0.000293, -0.000455, -0.000599, -0.000710, -0.000810, -0.000879, -0.000962, -0.001118, -0.001254, -0.001285, -0.001372, -0.001597, -0.001824, -0.002054, -0.002285, -0.002534, -0.002783, -0.003057, -0.003360, -0.003664, -0.004024, -0.004422, -0.004821, -0.005246, -0.005710, -0.006174, -0.006637, -0.007191, -0.007758, -0.008324, -0.008890, -0.009557, -0.010232, -0.010907, -0.011581, -0.012338, -0.013153, -0.013968, -0.014783, -0.015598, -0.016560, -0.017562, -0.018564, -0.019566, -0.020568, -0.021673, -0.022846, -0.024019, -0.025192, -0.026365, -0.027540, -0.028933, -0.030326, -0.031720, -0.033113, -0.034507, -0.035900, -0.037518, -0.039138, -0.040758, -0.042378, -0.043997, -0.045617, -0.047383, -0.049224, -0.051066, -0.052908, -0.054750, -0.056592, -0.058434, -0.060469, -0.062528, -0.064588, -0.066647, -0.068706, -0.070765, -0.072825, -0.074998, -0.077226, -0.079454, -0.081682, -0.083910, -0.086138, -0.088366, -0.090593, -0.092945, -0.095297, -0.097649, -0.100002, -0.102354, -0.104706, -0.107058, -0.109410, -0.111792, -0.114181, -0.116570, -0.118959, -0.121348, -0.123737, -0.126127, -0.128516, -0.130900, -0.133205, -0.135510, -0.137815, -0.140121, -0.142426, -0.144731, -0.147036, -0.149341, -0.151646, -0.153810, -0.155920, -0.158030, -0.160140, -0.162250, -0.164360, -0.166470, -0.168580, -0.170690, -0.172800, -0.174685, -0.176489, -0.178293, -0.180097, -0.181901, -0.183705, -0.185509, -0.187312, -0.189116, -0.190920, -0.192661, -0.194070, -0.195480, -0.196889, -0.198298, -0.199708, -0.201117, -0.202526, -0.203936, -0.205345, -0.206754, -0.207929, -0.208916, -0.209902, -0.210889, -0.211875, -0.212862, -0.213849, -0.214835, -0.215822, -0.216809, -0.217761, -0.218302, -0.218843, -0.219385, -0.219926, -0.220468, -0.221009, -0.221550, -0.222092, -0.222633, -0.223175, -0.223373, -0.223477, -0.223581, -0.223685, -0.223790, -0.223894, -0.223998, -0.224102, -0.224206, -0.224311, -0.224079, -0.223739, -0.223399, -0.223059, -0.222719, -0.222379, -0.222039, -0.221699, -0.221359, -0.220991, -0.220197, -0.219404, -0.218610, -0.217817, -0.217023, -0.216229, -0.215436, -0.214642, -0.213849, -0.212686, -0.211419, -0.210153, -0.208886, -0.207620, -0.206353, -0.205087, -0.203820, -0.202554, -0.200796, -0.199022, -0.197249, -0.195476, -0.193703, -0.191929, -0.190156, -0.188383, -0.186241, -0.183909, -0.181578, -0.179246, -0.176915, -0.174583, -0.172252, -0.169920, -0.167052, -0.164108, -0.161163, -0.158218, -0.155273, -0.152329, -0.149384, -0.146004, -0.142384, -0.138765, -0.135145, -0.131526, -0.127906, -0.124287, -0.119928, -0.115565, -0.111202, -0.106840, -0.102477, -0.098114, -0.092973, -0.087825, -0.082676, -0.077527, -0.072378, -0.066647, -0.060652, -0.054657, -0.048662, -0.042520, -0.035744, -0.028969, -0.022193, -0.015000, -0.007499, 0.000000], + [0.000000, -0.000071, -0.000200, -0.000235, -0.000293, -0.000455, -0.000556, -0.000546, -0.000562, -0.000649, -0.000735, -0.000816, -0.000892, -0.000944, -0.001027, -0.001188, -0.001343, -0.001475, -0.001608, -0.001785, -0.001965, -0.002163, -0.002381, -0.002600, -0.002850, -0.003120, -0.003391, -0.003676, -0.003983, -0.004291, -0.004598, -0.004989, -0.005392, -0.005795, -0.006198, -0.006651, -0.007109, -0.007566, -0.008024, -0.008549, -0.009124, -0.009698, -0.010272, -0.010847, -0.011506, -0.012189, -0.012871, -0.013554, -0.014237, -0.014997, -0.015807, -0.016617, -0.017428, -0.018238, -0.019050, -0.020006, -0.020963, -0.021920, -0.022877, -0.023833, -0.024790, -0.025892, -0.026996, -0.028099, -0.029202, -0.030305, -0.031408, -0.032613, -0.033871, -0.035128, -0.036386, -0.037644, -0.038902, -0.040160, -0.041546, -0.042949, -0.044352, -0.045755, -0.047157, -0.048560, -0.049963, -0.051442, -0.052958, -0.054474, -0.055990, -0.057506, -0.059022, -0.060538, -0.062054, -0.063673, -0.065292, -0.066911, -0.068530, -0.070149, -0.071768, -0.073387, -0.075006, -0.076653, -0.078308, -0.079962, -0.081616, -0.083271, -0.084925, -0.086579, -0.088234, -0.089887, -0.091517, -0.093148, -0.094778, -0.096408, -0.098039, -0.099669, -0.101300, -0.102930, -0.104560, -0.106122, -0.107657, -0.109192, -0.110727, -0.112262, -0.113797, -0.115332, -0.116867, -0.118402, -0.119937, -0.121342, -0.122700, -0.124058, -0.125417, -0.126775, -0.128133, -0.129492, -0.130850, -0.132208, -0.133566, -0.134886, -0.136005, -0.137123, -0.138242, -0.139361, -0.140479, -0.141598, -0.142716, -0.143835, -0.144953, -0.146072, -0.147033, -0.147870, -0.148706, -0.149542, -0.150379, -0.151215, -0.152051, -0.152888, -0.153724, -0.154560, -0.155373, -0.155900, -0.156427, -0.156954, -0.157482, -0.158009, -0.158536, -0.159063, -0.159591, -0.160118, -0.160645, -0.160913, -0.161109, -0.161306, -0.161502, -0.161698, -0.161895, -0.162091, -0.162288, -0.162484, -0.162681, -0.162615, -0.162465, -0.162315, -0.162166, -0.162016, -0.161866, -0.161716, -0.161566, -0.161416, -0.161244, -0.160734, -0.160225, -0.159715, -0.159205, -0.158696, -0.158186, -0.157676, -0.157167, -0.156657, -0.155846, -0.154951, -0.154056, -0.153161, -0.152266, -0.151371, -0.150476, -0.149581, -0.148686, -0.147397, -0.146095, -0.144794, -0.143493, -0.142192, -0.140890, -0.139589, -0.138288, -0.136696, -0.134955, -0.133214, -0.131473, -0.129731, -0.127990, -0.126249, -0.124508, -0.122358, -0.120149, -0.117940, -0.115731, -0.113523, -0.111314, -0.109105, -0.106572, -0.103860, -0.101149, -0.098438, -0.095726, -0.093015, -0.090303, -0.087065, -0.083824, -0.080584, -0.077343, -0.074102, -0.070861, -0.067083, -0.063300, -0.059516, -0.055733, -0.051949, -0.047772, -0.043416, -0.039060, -0.034704, -0.030257, -0.025414, -0.020571, -0.015729, -0.010617, -0.005308, 0.000000], + [0.000000, -0.000071, -0.000200, -0.000235, -0.000262, -0.000282, -0.000288, -0.000268, -0.000281, -0.000384, -0.000475, -0.000498, -0.000529, -0.000602, -0.000680, -0.000772, -0.000851, -0.000891, -0.000930, -0.001038, -0.001149, -0.001270, -0.001403, -0.001537, -0.001702, -0.001887, -0.002072, -0.002263, -0.002465, -0.002666, -0.002867, -0.003103, -0.003344, -0.003585, -0.003826, -0.004107, -0.004390, -0.004674, -0.004958, -0.005280, -0.005629, -0.005978, -0.006327, -0.006676, -0.007079, -0.007498, -0.007916, -0.008334, -0.008752, -0.009219, -0.009717, -0.010215, -0.010714, -0.011212, -0.011711, -0.012287, -0.012864, -0.013440, -0.014016, -0.014592, -0.015168, -0.015840, -0.016513, -0.017185, -0.017858, -0.018530, -0.019203, -0.019937, -0.020703, -0.021470, -0.022237, -0.023003, -0.023770, -0.024537, -0.025378, -0.026230, -0.027081, -0.027932, -0.028783, -0.029634, -0.030485, -0.031388, -0.032315, -0.033241, -0.034168, -0.035095, -0.036022, -0.036948, -0.037875, -0.038874, -0.039873, -0.040873, -0.041872, -0.042871, -0.043870, -0.044870, -0.045869, -0.046896, -0.047930, -0.048965, -0.049999, -0.051033, -0.052067, -0.053101, -0.054135, -0.055169, -0.056203, -0.057238, -0.058272, -0.059306, -0.060340, -0.061374, -0.062408, -0.063443, -0.064477, -0.065483, -0.066478, -0.067473, -0.068468, -0.069464, -0.070459, -0.071454, -0.072449, -0.073444, -0.074440, -0.075371, -0.076280, -0.077188, -0.078097, -0.079006, -0.079914, -0.080823, -0.081732, -0.082641, -0.083549, -0.084436, -0.085211, -0.085985, -0.086759, -0.087534, -0.088308, -0.089082, -0.089856, -0.090631, -0.091405, -0.092179, -0.092858, -0.093459, -0.094061, -0.094662, -0.095264, -0.095866, -0.096467, -0.097069, -0.097670, -0.098272, -0.098859, -0.099267, -0.099676, -0.100084, -0.100493, -0.100901, -0.101310, -0.101718, -0.102127, -0.102535, -0.102944, -0.103183, -0.103377, -0.103570, -0.103763, -0.103957, -0.104150, -0.104343, -0.104537, -0.104730, -0.104923, -0.104933, -0.104884, -0.104835, -0.104787, -0.104738, -0.104689, -0.104640, -0.104591, -0.104542, -0.104477, -0.104176, -0.103874, -0.103573, -0.103271, -0.102969, -0.102668, -0.102366, -0.102064, -0.101763, -0.101250, -0.100679, -0.100108, -0.099536, -0.098965, -0.098394, -0.097822, -0.097251, -0.096680, -0.095835, -0.094983, -0.094130, -0.093278, -0.092425, -0.091573, -0.090720, -0.089867, -0.088813, -0.087656, -0.086499, -0.085342, -0.084185, -0.083028, -0.081871, -0.080714, -0.079281, -0.077808, -0.076336, -0.074863, -0.073390, -0.071917, -0.070445, -0.068766, -0.066974, -0.065182, -0.063389, -0.061597, -0.059805, -0.058013, -0.055884, -0.053753, -0.051623, -0.049492, -0.047361, -0.045231, -0.042779, -0.040323, -0.037868, -0.035412, -0.032957, -0.030269, -0.027474, -0.024680, -0.021886, -0.019040, -0.015973, -0.012905, -0.009838, -0.006628, -0.003314, 0.000000], + [0.000000, -0.000071, -0.000067, 0.000000, -0.000034, -0.000192, -0.000245, -0.000104, -0.000027, -0.000130, -0.000226, -0.000285, -0.000334, -0.000330, -0.000338, -0.000378, -0.000407, -0.000401, -0.000395, -0.000475, -0.000559, -0.000627, -0.000675, -0.000723, -0.000795, -0.000883, -0.000971, -0.001062, -0.001157, -0.001251, -0.001346, -0.001450, -0.001555, -0.001660, -0.001765, -0.001892, -0.002021, -0.002150, -0.002278, -0.002425, -0.002584, -0.002743, -0.002902, -0.003061, -0.003250, -0.003447, -0.003645, -0.003842, -0.004039, -0.004252, -0.004475, -0.004697, -0.004920, -0.005142, -0.005366, -0.005633, -0.005901, -0.006169, -0.006437, -0.006705, -0.006973, -0.007278, -0.007583, -0.007889, -0.008194, -0.008499, -0.008805, -0.009136, -0.009481, -0.009825, -0.010170, -0.010515, -0.010860, -0.011205, -0.011595, -0.011990, -0.012386, -0.012782, -0.013177, -0.013573, -0.013969, -0.014383, -0.014807, -0.015231, -0.015654, -0.016078, -0.016502, -0.016926, -0.017349, -0.017813, -0.018278, -0.018742, -0.019206, -0.019671, -0.020135, -0.020599, -0.021063, -0.021543, -0.022027, -0.022510, -0.022994, -0.023478, -0.023961, -0.024445, -0.024928, -0.025412, -0.025906, -0.026399, -0.026892, -0.027385, -0.027879, -0.028372, -0.028865, -0.029358, -0.029852, -0.030339, -0.030823, -0.031307, -0.031792, -0.032276, -0.032760, -0.033245, -0.033729, -0.034214, -0.034698, -0.035159, -0.035611, -0.036063, -0.036516, -0.036968, -0.037420, -0.037873, -0.038325, -0.038777, -0.039230, -0.039673, -0.040067, -0.040461, -0.040856, -0.041250, -0.041644, -0.042039, -0.042433, -0.042827, -0.043222, -0.043616, -0.043968, -0.044287, -0.044605, -0.044923, -0.045241, -0.045560, -0.045878, -0.046196, -0.046515, -0.046833, -0.047144, -0.047369, -0.047595, -0.047821, -0.048046, -0.048272, -0.048497, -0.048723, -0.048948, -0.049174, -0.049399, -0.049541, -0.049658, -0.049776, -0.049894, -0.050012, -0.050130, -0.050248, -0.050366, -0.050484, -0.050602, -0.050629, -0.050627, -0.050624, -0.050622, -0.050620, -0.050618, -0.050616, -0.050614, -0.050611, -0.050601, -0.050463, -0.050325, -0.050187, -0.050049, -0.049911, -0.049774, -0.049636, -0.049498, -0.049360, -0.049114, -0.048838, -0.048561, -0.048285, -0.048009, -0.047733, -0.047457, -0.047180, -0.046904, -0.046486, -0.046064, -0.045642, -0.045220, -0.044797, -0.044375, -0.043953, -0.043530, -0.043006, -0.042430, -0.041854, -0.041278, -0.040702, -0.040125, -0.039549, -0.038973, -0.038261, -0.037530, -0.036799, -0.036068, -0.035337, -0.034606, -0.033876, -0.033046, -0.032162, -0.031278, -0.030394, -0.029510, -0.028626, -0.027742, -0.026702, -0.025662, -0.024622, -0.023582, -0.022542, -0.021501, -0.020316, -0.019129, -0.017942, -0.016754, -0.015567, -0.014280, -0.012947, -0.011614, -0.010281, -0.008927, -0.007484, -0.006041, -0.004599, -0.003095, -0.001547, 0.000000], + [0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000043, 0.000166, 0.000256, 0.000255, 0.000252, 0.000231, 0.000235, 0.000373, 0.000470, 0.000463, 0.000477, 0.000559, 0.000641, 0.000711, 0.000781, 0.000858, 0.000943, 0.001029, 0.001133, 0.001250, 0.001368, 0.001484, 0.001599, 0.001714, 0.001830, 0.001979, 0.002132, 0.002286, 0.002440, 0.002629, 0.002822, 0.003014, 0.003206, 0.003414, 0.003633, 0.003851, 0.004070, 0.004289, 0.004536, 0.004792, 0.005048, 0.005304, 0.005559, 0.005847, 0.006155, 0.006463, 0.006772, 0.007080, 0.007389, 0.007748, 0.008108, 0.008467, 0.008827, 0.009187, 0.009546, 0.009966, 0.010387, 0.010808, 0.011228, 0.011649, 0.012069, 0.012530, 0.013013, 0.013496, 0.013978, 0.014461, 0.014943, 0.015426, 0.015957, 0.016494, 0.017031, 0.017569, 0.018106, 0.018643, 0.019180, 0.019766, 0.020375, 0.020984, 0.021593, 0.022202, 0.022811, 0.023420, 0.024029, 0.024692, 0.025355, 0.026018, 0.026682, 0.027345, 0.028008, 0.028671, 0.029335, 0.030037, 0.030749, 0.031461, 0.032172, 0.032884, 0.033596, 0.034307, 0.035019, 0.035733, 0.036480, 0.037228, 0.037976, 0.038723, 0.039471, 0.040218, 0.040966, 0.041713, 0.042461, 0.043221, 0.043986, 0.044752, 0.045517, 0.046282, 0.047047, 0.047813, 0.048578, 0.049343, 0.050108, 0.050863, 0.051614, 0.052364, 0.053115, 0.053866, 0.054616, 0.055367, 0.056118, 0.056869, 0.057619, 0.058361, 0.059055, 0.059749, 0.060443, 0.061138, 0.061832, 0.062526, 0.063220, 0.063915, 0.064609, 0.065303, 0.065945, 0.066545, 0.067145, 0.067745, 0.068345, 0.068945, 0.069545, 0.070145, 0.070745, 0.071345, 0.071934, 0.072388, 0.072842, 0.073295, 0.073749, 0.074203, 0.074657, 0.075111, 0.075564, 0.076018, 0.076472, 0.076782, 0.077053, 0.077324, 0.077595, 0.077866, 0.078137, 0.078408, 0.078679, 0.078950, 0.079220, 0.079325, 0.079376, 0.079426, 0.079477, 0.079528, 0.079579, 0.079630, 0.079680, 0.079731, 0.079767, 0.079572, 0.079377, 0.079181, 0.078986, 0.078791, 0.078596, 0.078401, 0.078206, 0.078010, 0.077612, 0.077157, 0.076702, 0.076247, 0.075792, 0.075336, 0.074881, 0.074426, 0.073971, 0.073262, 0.072545, 0.071828, 0.071111, 0.070394, 0.069677, 0.068960, 0.068242, 0.067354, 0.066377, 0.065401, 0.064424, 0.063448, 0.062471, 0.061495, 0.060518, 0.059328, 0.058107, 0.056887, 0.055666, 0.054446, 0.053225, 0.052004, 0.050635, 0.049183, 0.047732, 0.046281, 0.044829, 0.043378, 0.041927, 0.040273, 0.038619, 0.036964, 0.035310, 0.033655, 0.032001, 0.030165, 0.028327, 0.026490, 0.024652, 0.022814, 0.020876, 0.018893, 0.016909, 0.014926, 0.012917, 0.010800, 0.008684, 0.006567, 0.004401, 0.002200, 0.000000], + [0.000000, 0.000000, 0.000000, 0.000116, 0.000261, 0.000266, 0.000316, 0.000448, 0.000536, 0.000503, 0.000469, 0.000429, 0.000415, 0.000533, 0.000639, 0.000717, 0.000803, 0.000918, 0.001034, 0.001185, 0.001339, 0.001483, 0.001615, 0.001748, 0.001909, 0.002090, 0.002270, 0.002452, 0.002636, 0.002821, 0.003005, 0.003238, 0.003477, 0.003717, 0.003957, 0.004272, 0.004592, 0.004912, 0.005233, 0.005576, 0.005935, 0.006293, 0.006652, 0.007011, 0.007417, 0.007836, 0.008255, 0.008674, 0.009093, 0.009564, 0.010069, 0.010573, 0.011078, 0.011583, 0.012088, 0.012669, 0.013249, 0.013829, 0.014409, 0.014989, 0.015570, 0.016260, 0.016950, 0.017641, 0.018332, 0.019023, 0.019713, 0.020466, 0.021253, 0.022039, 0.022825, 0.023611, 0.024397, 0.025183, 0.026060, 0.026949, 0.027837, 0.028726, 0.029615, 0.030503, 0.031392, 0.032356, 0.033356, 0.034356, 0.035356, 0.036355, 0.037355, 0.038355, 0.039355, 0.040455, 0.041556, 0.042657, 0.043758, 0.044859, 0.045960, 0.047061, 0.048161, 0.049341, 0.050540, 0.051738, 0.052937, 0.054135, 0.055334, 0.056532, 0.057731, 0.058934, 0.060213, 0.061492, 0.062771, 0.064050, 0.065329, 0.066608, 0.067887, 0.069166, 0.070445, 0.071756, 0.073079, 0.074402, 0.075725, 0.077048, 0.078371, 0.079694, 0.081017, 0.082340, 0.083663, 0.084991, 0.086321, 0.087651, 0.088981, 0.090311, 0.091641, 0.092971, 0.094301, 0.095631, 0.096961, 0.098280, 0.099536, 0.100792, 0.102048, 0.103305, 0.104561, 0.105817, 0.107074, 0.108330, 0.109586, 0.110842, 0.112015, 0.113122, 0.114228, 0.115335, 0.116441, 0.117548, 0.118654, 0.119761, 0.120867, 0.121974, 0.123061, 0.123922, 0.124784, 0.125645, 0.126506, 0.127368, 0.128229, 0.129090, 0.129952, 0.130813, 0.131674, 0.132273, 0.132801, 0.133328, 0.133855, 0.134382, 0.134909, 0.135437, 0.135964, 0.136491, 0.137018, 0.137241, 0.137366, 0.137491, 0.137616, 0.137741, 0.137866, 0.137990, 0.138115, 0.138240, 0.138337, 0.138001, 0.137666, 0.137330, 0.136995, 0.136659, 0.136323, 0.135988, 0.135652, 0.135317, 0.134606, 0.133791, 0.132976, 0.132160, 0.131345, 0.130530, 0.129714, 0.128899, 0.128084, 0.126801, 0.125504, 0.124207, 0.122911, 0.121614, 0.120317, 0.119020, 0.117723, 0.116126, 0.114376, 0.112625, 0.110875, 0.109124, 0.107374, 0.105623, 0.103872, 0.101753, 0.099582, 0.097411, 0.095239, 0.093068, 0.090896, 0.088725, 0.086311, 0.083765, 0.081218, 0.078672, 0.076125, 0.073579, 0.071032, 0.068169, 0.065305, 0.062440, 0.059576, 0.056711, 0.053847, 0.050711, 0.047573, 0.044435, 0.041297, 0.038159, 0.034875, 0.031526, 0.028176, 0.024826, 0.021444, 0.017921, 0.014399, 0.010876, 0.007285, 0.003642, 0.000000], + [0.000000, 0.000000, 0.000000, 0.000116, 0.000261, 0.000266, 0.000359, 0.000615, 0.000826, 0.000914, 0.000981, 0.000924, 0.000898, 0.001030, 0.001153, 0.001249, 0.001375, 0.001596, 0.001816, 0.002025, 0.002233, 0.002461, 0.002715, 0.002968, 0.003250, 0.003550, 0.003850, 0.004177, 0.004542, 0.004907, 0.005272, 0.005691, 0.006117, 0.006544, 0.006970, 0.007500, 0.008037, 0.008574, 0.009111, 0.009716, 0.010370, 0.011024, 0.011678, 0.012331, 0.013073, 0.013839, 0.014604, 0.015370, 0.016135, 0.017003, 0.017939, 0.018875, 0.019810, 0.020746, 0.021683, 0.022781, 0.023878, 0.024976, 0.026074, 0.027171, 0.028269, 0.029576, 0.030884, 0.032192, 0.033500, 0.034808, 0.036116, 0.037556, 0.039064, 0.040573, 0.042082, 0.043591, 0.045099, 0.046608, 0.048311, 0.050037, 0.051764, 0.053490, 0.055217, 0.056943, 0.058670, 0.060552, 0.062507, 0.064463, 0.066419, 0.068374, 0.070330, 0.072286, 0.074241, 0.076403, 0.078566, 0.080729, 0.082892, 0.085055, 0.087218, 0.089381, 0.091544, 0.093844, 0.096176, 0.098509, 0.100841, 0.103174, 0.105506, 0.107838, 0.110171, 0.112509, 0.114945, 0.117381, 0.119816, 0.122252, 0.124687, 0.127123, 0.129558, 0.131994, 0.134429, 0.136848, 0.139261, 0.141673, 0.144086, 0.146499, 0.148911, 0.151324, 0.153736, 0.156149, 0.158561, 0.160827, 0.163040, 0.165253, 0.167466, 0.169680, 0.171893, 0.174106, 0.176319, 0.178532, 0.180745, 0.182893, 0.184697, 0.186501, 0.188305, 0.190109, 0.191913, 0.193717, 0.195521, 0.197325, 0.199129, 0.200933, 0.202403, 0.203606, 0.204810, 0.206013, 0.207216, 0.208420, 0.209623, 0.210826, 0.212030, 0.213233, 0.214380, 0.214852, 0.215324, 0.215797, 0.216269, 0.216741, 0.217214, 0.217686, 0.218158, 0.218631, 0.219103, 0.218971, 0.218672, 0.218374, 0.218075, 0.217777, 0.217479, 0.217180, 0.216882, 0.216584, 0.216285, 0.215432, 0.214400, 0.213368, 0.212336, 0.211304, 0.210272, 0.209240, 0.208208, 0.207177, 0.206105, 0.204435, 0.202765, 0.201095, 0.199424, 0.197754, 0.196084, 0.194414, 0.192744, 0.191073, 0.188989, 0.186789, 0.184589, 0.182389, 0.180188, 0.177988, 0.175788, 0.173588, 0.171388, 0.168782, 0.166163, 0.163545, 0.160927, 0.158308, 0.155690, 0.153071, 0.150453, 0.147620, 0.144677, 0.141734, 0.138791, 0.135848, 0.132905, 0.129962, 0.127019, 0.123855, 0.120660, 0.117464, 0.114269, 0.111073, 0.107878, 0.104682, 0.101365, 0.097982, 0.094599, 0.091216, 0.087832, 0.084449, 0.081066, 0.077534, 0.074001, 0.070468, 0.066935, 0.063402, 0.059869, 0.056220, 0.052570, 0.048920, 0.045269, 0.041619, 0.037910, 0.034174, 0.030439, 0.026703, 0.022954, 0.019145, 0.015337, 0.011529, 0.007697, 0.003848, 0.000000], + [0.000000, 0.000000, 0.000125, 0.000228, 0.000293, 0.000443, 0.000634, 0.000899, 0.001109, 0.001164, 0.001202, 0.001141, 0.001121, 0.001314, 0.001494, 0.001642, 0.001818, 0.002085, 0.002351, 0.002575, 0.002797, 0.003071, 0.003409, 0.003747, 0.004100, 0.004463, 0.004827, 0.005230, 0.005691, 0.006153, 0.006614, 0.007157, 0.007710, 0.008264, 0.008818, 0.009477, 0.010144, 0.010811, 0.011478, 0.012241, 0.013074, 0.013906, 0.014739, 0.015572, 0.016516, 0.017490, 0.018464, 0.019438, 0.020412, 0.021520, 0.022715, 0.023911, 0.025107, 0.026302, 0.027500, 0.028906, 0.030311, 0.031717, 0.033123, 0.034529, 0.035934, 0.037616, 0.039299, 0.040982, 0.042665, 0.044349, 0.046032, 0.047894, 0.049851, 0.051807, 0.053764, 0.055720, 0.057677, 0.059633, 0.061852, 0.064104, 0.066356, 0.068608, 0.070860, 0.073112, 0.075364, 0.077831, 0.080401, 0.082970, 0.085540, 0.088110, 0.090679, 0.093249, 0.095818, 0.098683, 0.101550, 0.104416, 0.107283, 0.110149, 0.113016, 0.115882, 0.118749, 0.121821, 0.124942, 0.128063, 0.131185, 0.134306, 0.137427, 0.140548, 0.143670, 0.146800, 0.150080, 0.153359, 0.156639, 0.159919, 0.163198, 0.166478, 0.169758, 0.173038, 0.176317, 0.179575, 0.182824, 0.186074, 0.189323, 0.192573, 0.195822, 0.199072, 0.202321, 0.205571, 0.208820, 0.211836, 0.214768, 0.217699, 0.220631, 0.223563, 0.226495, 0.229426, 0.232358, 0.235290, 0.238222, 0.241045, 0.243296, 0.245546, 0.247797, 0.250048, 0.252299, 0.254550, 0.256801, 0.259052, 0.261303, 0.263553, 0.265259, 0.266529, 0.267799, 0.269068, 0.270338, 0.271608, 0.272878, 0.274148, 0.275417, 0.276687, 0.277867, 0.277989, 0.278110, 0.278231, 0.278353, 0.278474, 0.278595, 0.278717, 0.278838, 0.278959, 0.279081, 0.278317, 0.277310, 0.276304, 0.275297, 0.274291, 0.273284, 0.272278, 0.271272, 0.270265, 0.269259, 0.267528, 0.265565, 0.263601, 0.261638, 0.259675, 0.257712, 0.255748, 0.253785, 0.251822, 0.249814, 0.247126, 0.244439, 0.241752, 0.239064, 0.236377, 0.233689, 0.231002, 0.228314, 0.225627, 0.222547, 0.219357, 0.216167, 0.212978, 0.209788, 0.206598, 0.203409, 0.200219, 0.197029, 0.193530, 0.190022, 0.186513, 0.183005, 0.179496, 0.175988, 0.172479, 0.168971, 0.165337, 0.161638, 0.157940, 0.154241, 0.150543, 0.146844, 0.143146, 0.139448, 0.135657, 0.131852, 0.128048, 0.124244, 0.120440, 0.116635, 0.112831, 0.108987, 0.105122, 0.101256, 0.097391, 0.093525, 0.089659, 0.085794, 0.081907, 0.078019, 0.074132, 0.070244, 0.066357, 0.062469, 0.058569, 0.054668, 0.050768, 0.046867, 0.042966, 0.039062, 0.035155, 0.031249, 0.027343, 0.023437, 0.019530, 0.015624, 0.011718, 0.007812, 0.003905, 0.000000], + ], + [ + [0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, -0.000170, -0.000401, -0.000631, -0.000862, -0.001093, -0.001324, -0.001555, -0.001786, -0.002017, -0.002248, -0.002629, -0.003800, -0.004971, -0.006143, -0.007314, -0.008485, -0.009656, -0.010827, -0.011999, -0.013170, -0.014341, -0.015931, -0.017854, -0.019778, -0.021701, -0.023625, -0.025548, -0.027472, -0.029395, -0.031319, -0.033242, -0.035202, -0.037590, -0.039978, -0.042366, -0.044754, -0.047142, -0.049530, -0.051918, -0.054306, -0.056694, -0.059082, -0.061595, -0.064142, -0.066690, -0.069237, -0.071784, -0.074332, -0.076879, -0.079426, -0.081974, -0.084521, -0.086958, -0.089360, -0.091762, -0.094164, -0.096566, -0.098968, -0.101370, -0.103772, -0.106174, -0.108550, -0.110533, -0.112515, -0.114498, -0.116481, -0.118464, -0.120447, -0.122430, -0.124413, -0.126396, -0.127877, -0.129218, -0.130559, -0.131900, -0.133241, -0.134582, -0.135923, -0.137264, -0.138605, -0.139159, -0.139689, -0.140219, -0.140748, -0.141278, -0.141807, -0.142337, -0.142867, -0.142785, -0.142391, -0.141997, -0.141603, -0.141208, -0.140814, -0.140420, -0.140026, -0.138758, -0.137365, -0.135972, -0.134580, -0.133187, -0.131794, -0.130401, -0.128338, -0.125908, -0.123477, -0.121047, -0.118616, -0.116186, -0.113755, -0.110258, -0.106756, -0.103253, -0.099751, -0.096248, -0.092746, -0.088181, -0.083606, -0.079030, -0.074455, -0.069879, -0.064569, -0.058924, -0.053280, -0.047636, -0.041810, -0.035207, -0.028604, -0.022001, -0.014908, -0.007453, 0.000000], + [0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, -0.000119, -0.000282, -0.000445, -0.000607, -0.000770, -0.000932, -0.001095, -0.001257, -0.001420, -0.001582, -0.001850, -0.002671, -0.003492, -0.004313, -0.005134, -0.005955, -0.006776, -0.007597, -0.008418, -0.009239, -0.010060, -0.011173, -0.012519, -0.013866, -0.015212, -0.016559, -0.017905, -0.019252, -0.020598, -0.021945, -0.023291, -0.024663, -0.026331, -0.027999, -0.029667, -0.031336, -0.033004, -0.034672, -0.036340, -0.038008, -0.039677, -0.041345, -0.043102, -0.044885, -0.046667, -0.048449, -0.050231, -0.052013, -0.053795, -0.055577, -0.057359, -0.059141, -0.060847, -0.062528, -0.064209, -0.065890, -0.067571, -0.069252, -0.070933, -0.072614, -0.074295, -0.075959, -0.077358, -0.078758, -0.080157, -0.081557, -0.082956, -0.084356, -0.085755, -0.087155, -0.088555, -0.089611, -0.090571, -0.091531, -0.092492, -0.093452, -0.094412, -0.095373, -0.096333, -0.097293, -0.097711, -0.098112, -0.098512, -0.098913, -0.099314, -0.099714, -0.100115, -0.100515, -0.100489, -0.100243, -0.099998, -0.099752, -0.099507, -0.099261, -0.099016, -0.098770, -0.097900, -0.096940, -0.095980, -0.095020, -0.094060, -0.093100, -0.092141, -0.090700, -0.088994, -0.087289, -0.085584, -0.083879, -0.082174, -0.080469, -0.077998, -0.075524, -0.073051, -0.070577, -0.068103, -0.065629, -0.062390, -0.059143, -0.055896, -0.052649, -0.049403, -0.045639, -0.041641, -0.037642, -0.033643, -0.029518, -0.024848, -0.020178, -0.015508, -0.010503, -0.005251, 0.000000], + [0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, -0.000074, -0.000175, -0.000275, -0.000376, -0.000477, -0.000577, -0.000678, -0.000779, -0.000879, -0.000980, -0.001147, -0.001660, -0.002173, -0.002687, -0.003200, -0.003713, -0.004227, -0.004740, -0.005253, -0.005767, -0.006280, -0.006971, -0.007803, -0.008636, -0.009468, -0.010301, -0.011133, -0.011966, -0.012798, -0.013631, -0.014463, -0.015311, -0.016344, -0.017377, -0.018410, -0.019442, -0.020475, -0.021508, -0.022540, -0.023573, -0.024606, -0.025639, -0.026726, -0.027829, -0.028932, -0.030035, -0.031137, -0.032240, -0.033343, -0.034446, -0.035548, -0.036651, -0.037711, -0.038756, -0.039802, -0.040847, -0.041893, -0.042939, -0.043984, -0.045030, -0.046076, -0.047111, -0.047989, -0.048867, -0.049745, -0.050623, -0.051501, -0.052379, -0.053257, -0.054135, -0.055012, -0.055682, -0.056292, -0.056903, -0.057514, -0.058125, -0.058735, -0.059346, -0.059957, -0.060568, -0.060842, -0.061107, -0.061371, -0.061635, -0.061899, -0.062163, -0.062427, -0.062691, -0.062689, -0.062551, -0.062412, -0.062273, -0.062135, -0.061996, -0.061857, -0.061719, -0.061187, -0.060599, -0.060011, -0.059423, -0.058834, -0.058246, -0.057658, -0.056765, -0.055704, -0.054643, -0.053582, -0.052521, -0.051460, -0.050399, -0.048848, -0.047296, -0.045743, -0.044190, -0.042637, -0.041084, -0.039057, -0.037025, -0.034993, -0.032961, -0.030929, -0.028563, -0.026045, -0.023528, -0.021010, -0.018416, -0.015497, -0.012577, -0.009657, -0.006537, -0.003268, 0.000000], + [0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, -0.000035, -0.000082, -0.000130, -0.000178, -0.000225, -0.000273, -0.000320, -0.000368, -0.000415, -0.000463, -0.000541, -0.000777, -0.001013, -0.001249, -0.001485, -0.001722, -0.001958, -0.002194, -0.002430, -0.002666, -0.002903, -0.003222, -0.003608, -0.003994, -0.004381, -0.004767, -0.005153, -0.005539, -0.005925, -0.006311, -0.006697, -0.007090, -0.007569, -0.008048, -0.008526, -0.009005, -0.009483, -0.009962, -0.010441, -0.010919, -0.011398, -0.011877, -0.012381, -0.012892, -0.013404, -0.013915, -0.014426, -0.014938, -0.015449, -0.015960, -0.016472, -0.016983, -0.017477, -0.017964, -0.018452, -0.018940, -0.019427, -0.019915, -0.020403, -0.020890, -0.021378, -0.021861, -0.022268, -0.022676, -0.023084, -0.023492, -0.023899, -0.024307, -0.024715, -0.025123, -0.025531, -0.025846, -0.026137, -0.026427, -0.026717, -0.027007, -0.027297, -0.027588, -0.027878, -0.028168, -0.028302, -0.028431, -0.028559, -0.028688, -0.028817, -0.028946, -0.029074, -0.029203, -0.029209, -0.029151, -0.029093, -0.029035, -0.028977, -0.028919, -0.028861, -0.028803, -0.028558, -0.028287, -0.028016, -0.027745, -0.027474, -0.027203, -0.026931, -0.026515, -0.026020, -0.025524, -0.025029, -0.024533, -0.024038, -0.023542, -0.022817, -0.022090, -0.021364, -0.020638, -0.019911, -0.019185, -0.018235, -0.017283, -0.016331, -0.015379, -0.014426, -0.013321, -0.012146, -0.010971, -0.009796, -0.008586, -0.007226, -0.005865, -0.004505, -0.003049, -0.001525, 0.000000], + [0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000050, 0.000117, 0.000184, 0.000252, 0.000319, 0.000387, 0.000454, 0.000522, 0.000589, 0.000656, 0.000766, 0.001096, 0.001427, 0.001757, 0.002087, 0.002417, 0.002748, 0.003078, 0.003408, 0.003739, 0.004069, 0.004518, 0.005061, 0.005605, 0.006148, 0.006691, 0.007235, 0.007778, 0.008322, 0.008865, 0.009408, 0.009962, 0.010631, 0.011301, 0.011971, 0.012641, 0.013310, 0.013980, 0.014650, 0.015320, 0.015989, 0.016659, 0.017370, 0.018091, 0.018813, 0.019535, 0.020256, 0.020978, 0.021700, 0.022421, 0.023143, 0.023865, 0.024567, 0.025263, 0.025959, 0.026656, 0.027352, 0.028048, 0.028744, 0.029440, 0.030137, 0.030827, 0.031423, 0.032019, 0.032615, 0.033211, 0.033807, 0.034403, 0.034999, 0.035595, 0.036191, 0.036657, 0.037087, 0.037517, 0.037946, 0.038376, 0.038806, 0.039235, 0.039665, 0.040095, 0.040305, 0.040509, 0.040713, 0.040916, 0.041120, 0.041323, 0.041527, 0.041731, 0.041753, 0.041683, 0.041613, 0.041543, 0.041473, 0.041402, 0.041332, 0.041262, 0.040922, 0.040544, 0.040166, 0.039787, 0.039409, 0.039031, 0.038653, 0.038058, 0.037345, 0.036632, 0.035920, 0.035207, 0.034494, 0.033781, 0.032735, 0.031687, 0.030640, 0.029592, 0.028545, 0.027497, 0.026120, 0.024740, 0.023359, 0.021979, 0.020598, 0.019008, 0.017322, 0.015636, 0.013950, 0.012215, 0.010269, 0.008323, 0.006376, 0.004310, 0.002155, 0.000000], + [0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000080, 0.000189, 0.000299, 0.000408, 0.000517, 0.000626, 0.000735, 0.000844, 0.000953, 0.001063, 0.001242, 0.001787, 0.002333, 0.002879, 0.003425, 0.003971, 0.004517, 0.005063, 0.005609, 0.006154, 0.006700, 0.007438, 0.008329, 0.009220, 0.010111, 0.011002, 0.011893, 0.012784, 0.013675, 0.014566, 0.015457, 0.016365, 0.017469, 0.018573, 0.019676, 0.020780, 0.021884, 0.022988, 0.024092, 0.025195, 0.026299, 0.027403, 0.028573, 0.029761, 0.030948, 0.032136, 0.033324, 0.034512, 0.035700, 0.036888, 0.038076, 0.039263, 0.040424, 0.041575, 0.042727, 0.043878, 0.045030, 0.046181, 0.047333, 0.048484, 0.049636, 0.050778, 0.051774, 0.052771, 0.053767, 0.054764, 0.055761, 0.056757, 0.057754, 0.058750, 0.059747, 0.060528, 0.061250, 0.061971, 0.062693, 0.063414, 0.064136, 0.064857, 0.065579, 0.066300, 0.066662, 0.067012, 0.067362, 0.067712, 0.068062, 0.068412, 0.068762, 0.069112, 0.069160, 0.069053, 0.068946, 0.068839, 0.068732, 0.068625, 0.068518, 0.068411, 0.067854, 0.067232, 0.066611, 0.065990, 0.065368, 0.064747, 0.064125, 0.063141, 0.061957, 0.060774, 0.059590, 0.058406, 0.057223, 0.056039, 0.054292, 0.052542, 0.050792, 0.049041, 0.047291, 0.045541, 0.043250, 0.040953, 0.038657, 0.036360, 0.034063, 0.031426, 0.028634, 0.025842, 0.023050, 0.020178, 0.016957, 0.013737, 0.010517, 0.007105, 0.003552, 0.000000], + [0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000141, 0.000333, 0.000525, 0.000718, 0.000910, 0.001102, 0.001294, 0.001486, 0.001678, 0.001870, 0.002192, 0.003198, 0.004204, 0.005210, 0.006216, 0.007222, 0.008228, 0.009234, 0.010240, 0.011246, 0.012252, 0.013647, 0.015354, 0.017061, 0.018768, 0.020474, 0.022181, 0.023888, 0.025595, 0.027302, 0.029009, 0.030749, 0.032879, 0.035009, 0.037140, 0.039270, 0.041400, 0.043531, 0.045661, 0.047791, 0.049922, 0.052052, 0.054258, 0.056485, 0.058711, 0.060938, 0.063165, 0.065392, 0.067619, 0.069845, 0.072072, 0.074299, 0.076337, 0.078313, 0.080290, 0.082267, 0.084244, 0.086221, 0.088198, 0.090174, 0.092151, 0.094094, 0.095519, 0.096944, 0.098369, 0.099794, 0.101219, 0.102644, 0.104069, 0.105494, 0.106919, 0.107739, 0.108391, 0.109042, 0.109694, 0.110345, 0.110997, 0.111648, 0.112299, 0.112951, 0.112758, 0.112539, 0.112320, 0.112101, 0.111883, 0.111664, 0.111445, 0.111226, 0.110443, 0.109371, 0.108299, 0.107227, 0.106156, 0.105084, 0.104012, 0.102940, 0.101213, 0.099393, 0.097572, 0.095752, 0.093931, 0.092111, 0.090290, 0.088075, 0.085643, 0.083211, 0.080779, 0.078347, 0.075915, 0.073483, 0.070586, 0.067687, 0.064788, 0.061889, 0.058989, 0.056090, 0.052849, 0.049604, 0.046360, 0.043115, 0.039870, 0.036455, 0.032962, 0.029468, 0.025975, 0.022446, 0.018760, 0.015074, 0.011388, 0.007628, 0.003814, 0.000000], + [0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000178, 0.000421, 0.000664, 0.000906, 0.001149, 0.001392, 0.001634, 0.001877, 0.002120, 0.002362, 0.002773, 0.004064, 0.005355, 0.006646, 0.007937, 0.009228, 0.010519, 0.011810, 0.013101, 0.014392, 0.015683, 0.017484, 0.019691, 0.021898, 0.024106, 0.026313, 0.028521, 0.030728, 0.032935, 0.035143, 0.037350, 0.039601, 0.042371, 0.045140, 0.047909, 0.050679, 0.053448, 0.056218, 0.058987, 0.061756, 0.064526, 0.067295, 0.070147, 0.073022, 0.075896, 0.078771, 0.081645, 0.084520, 0.087394, 0.090269, 0.093143, 0.096018, 0.098611, 0.101113, 0.103616, 0.106118, 0.108621, 0.111123, 0.113625, 0.116128, 0.118630, 0.121083, 0.122773, 0.124462, 0.126152, 0.127842, 0.129532, 0.131221, 0.132911, 0.134601, 0.136291, 0.137119, 0.137708, 0.138296, 0.138884, 0.139472, 0.140060, 0.140649, 0.141237, 0.141825, 0.141254, 0.140648, 0.140041, 0.139434, 0.138827, 0.138220, 0.137613, 0.137007, 0.135669, 0.133956, 0.132244, 0.130531, 0.128819, 0.127106, 0.125393, 0.123681, 0.121195, 0.118600, 0.116004, 0.113408, 0.110812, 0.108217, 0.105621, 0.102623, 0.099405, 0.096186, 0.092968, 0.089749, 0.086531, 0.083312, 0.079721, 0.076129, 0.072536, 0.068944, 0.065351, 0.061758, 0.057965, 0.054171, 0.050376, 0.046581, 0.042786, 0.038937, 0.035063, 0.031190, 0.027316, 0.023437, 0.019530, 0.015624, 0.011718, 0.007812, 0.003905, 0.000000], + ], +]; diff --git a/crates/pipeline/src/finish.rs b/crates/pipeline/src/finish.rs index 3bce268a68c..041936bdaa4 100644 --- a/crates/pipeline/src/finish.rs +++ b/crates/pipeline/src/finish.rs @@ -148,8 +148,8 @@ impl GrainModel { seed: g.seed, }) }), - Process::V7 if draft => crate::crystal::CrystalGrain::draft(g, px_per_long).map(GrainModel::Crystal), - Process::V7 => crate::crystal::CrystalGrain::new(g, px_per_long).map(GrainModel::Crystal), + Process::V7 | Process::V8 if draft => crate::crystal::CrystalGrain::draft(g, px_per_long).map(GrainModel::Crystal), + Process::V7 | Process::V8 => crate::crystal::CrystalGrain::new(g, px_per_long).map(GrainModel::Crystal), } } } @@ -248,6 +248,8 @@ pub struct FinishParams { pub shadow_tint: f32, /// Tone curves (parametric ∘ point, per channel) on encoded values, 1024 entries each. pub curves: Option<[Lut1; 3]>, + /// Process V8's Whites and tone curves (they replace `curves`, which stays `None` from V8 on). + pub curve_stage: Option, /// Refine Saturation as 0..1 (1 = the curves' own saturation). pub refine_sat: f32, pub vig: Option, @@ -335,7 +337,8 @@ impl FinishParams { light: crate::light_v3::LightOps::new(s, info), lut: crate::lut::get(&s.profile.id).map(|l| (l, (s.profile.amount / 100.0).clamp(0.0, 2.0) as f32)), ops: ColorOps::new(s), - curves: curve_luts(&s.curve), + curves: if s.process.process() < Process::V8 { curve_luts(&s.curve) } else { None }, + curve_stage: crate::curve_stage::CurveStage::new(s), refine_sat: (s.curve.refine_saturation / 100.0).clamp(0.0, 1.0) as f32, vig: if effects { vignette(s) } else { None }, to_out: space.from_working(), @@ -412,6 +415,13 @@ pub fn base_tone(s: &DevelopSettings, info: &SourceInfo, peak: f32) -> ToneMap { None if info.raw => ToneMap::rolloff_hdr(l.contrast, l.whites, l.blacks, peak), None => ToneMap::display_hdr(l.contrast, l.whites, l.blacks, peak), }, + // V7, with Whites moved out of the tone map: the curve stage applies Whites as measured against + // Lightroom (`crate::curve_stage`) + Process::V8 => match info.camera_tone.as_ref().filter(|_| info.raw) { + Some(curve) => ToneMap::camera_rolloff_hdr(curve, 0.0, 0.0, 0.0, peak), + None if info.raw => ToneMap::rolloff_hdr(l.contrast, 0.0, l.blacks, peak), + None => ToneMap::display_hdr(l.contrast, 0.0, l.blacks, peak), + }, } } @@ -558,6 +568,9 @@ pub(crate) fn finish_with( // --- process V4: calibrated Contrast, Blacks (ProPhoto with the sRGB transfer) d = apply_light(d, light.as_ref(), preview_light.as_ref(), exact, srgb); + // --- process V8: Whites and the tone curves, as Lightroom applies them + d = fp.curve_stage.as_ref().map_or(d, |stage| stage.apply(d)); + // --- colour d = fp.ops.apply(d, l_sat, l_hue); if let Some((dir, amt)) = local.tint { diff --git a/crates/pipeline/src/lib.rs b/crates/pipeline/src/lib.rs index 34bd402336f..1dc2ae10fff 100644 --- a/crates/pipeline/src/lib.rs +++ b/crates/pipeline/src/lib.rs @@ -12,6 +12,7 @@ //! 3. tone map β€” contrast / whites / blacks filmic curve on luminance, highlight desaturation //! 4. colour β€” vibrance, saturation, colour mixer, colour grading, B&W (OkLCh) //! 5. display β€” gamut map to the output space (sRGB unless [`RenderRequest::space`] says otherwise), encode, tone curves (parametric + point), vignette, grain +//! (from process V8 the tone curves and Whites run between 3 and 4 instead: [`curve_stage`]) //! //! Spatial parameters are specified relative to the image's long edge, so a 400 px preview and a //! 60 MP export look alike. @@ -29,6 +30,9 @@ pub mod colorops; pub mod crystal; pub mod cull; pub mod curve; +pub mod curve_stage; +#[rustfmt::skip] +mod curve_stage_tables; pub mod dust; pub mod finish; pub mod geometry; diff --git a/crates/pipeline/src/light_v3.rs b/crates/pipeline/src/light_v3.rs index a7db45ec066..5f3e0f9bf24 100644 --- a/crates/pipeline/src/light_v3.rs +++ b/crates/pipeline/src/light_v3.rs @@ -284,7 +284,7 @@ pub fn applies(s: &DevelopSettings, info: &SourceInfo) -> bool { let camera_look = info.raw && info.camera_tone.is_some(); match s.process.process() { Process::V1 | Process::V2 | Process::V3 => false, - Process::V4 | Process::V5 | Process::V6 | Process::V7 => camera_look, + Process::V4 | Process::V5 | Process::V6 | Process::V7 | Process::V8 => camera_look, } } diff --git a/crates/pipeline/src/local.rs b/crates/pipeline/src/local.rs index 5fb9ad84ceb..0401c315338 100644 --- a/crates/pipeline/src/local.rs +++ b/crates/pipeline/src/local.rs @@ -375,7 +375,7 @@ pub fn base_detail_radius(px_per_long: f64) -> usize { pub fn tone_base_detail(s: &DevelopSettings, px_per_long: f64) -> usize { match s.process.process() { Process::V1 => 0, - Process::V2 | Process::V3 | Process::V4 | Process::V5 | Process::V6 | Process::V7 => base_detail_radius(px_per_long), + Process::V2 | Process::V3 | Process::V4 | Process::V5 | Process::V6 | Process::V7 | Process::V8 => base_detail_radius(px_per_long), } } diff --git a/crates/pipeline/src/tests.rs b/crates/pipeline/src/tests.rs index f1229bd5690..0ebe887a372 100644 --- a/crates/pipeline/src/tests.rs +++ b/crates/pipeline/src/tests.rs @@ -1,4 +1,4 @@ -use lightcraft_develop::{DevelopSettings, controls}; +use lightcraft_develop::{DevelopSettings, Process, controls}; use lightcraft_raster::Rgb32f; use crate::{RenderRequest, SourceInfo, render}; @@ -453,13 +453,23 @@ fn refine_saturation_tames_a_contrast_curve() { lightcraft_geom::Point::new(0.7, 0.85), lightcraft_geom::Point::new(1.0, 1.0), ]; - let full = render(&src, &info, &s, &req).image.data[0]; + let curved = s.clone(); s.curve.refine_saturation = 0.0; - let refined = render(&src, &info, &s, &req).image.data[0]; - assert!(sat(full) > sat(refined), "{flat:?} {full:?} {refined:?}"); - // the curve's tone change stays - let y = |p: [u8; 4]| 0.2126 * p[0] as f32 + 0.7152 * p[1] as f32 + 0.0722 * p[2] as f32; - assert!((y(full) - y(refined)).abs() < 2.0); + let y = |p: [u8; 4], lin: bool| { + let c = |v: u8| if lin { lightcraft_color::transfer::srgb_to_linear(v as f32 / 255.0) } else { v as f32 }; + 0.2126 * c(p[0]) + 0.7152 * c(p[1]) + 0.0722 * c(p[2]) + }; + for process in [Process::V7, Process::V8] { + let on = |s: &DevelopSettings| render(&src, &info, &DevelopSettings { process: process.version(), ..s.clone() }, &req).image.data[0]; + let (full, refined) = (on(&curved), on(&s)); + assert!(sat(full) > sat(refined), "{process:?}: {flat:?} {full:?} {refined:?}"); + // the curve's tone change stays: up to V7 the encoded luma, from V8 the luminance + if process < Process::V8 { + assert!((y(full, false) - y(refined, false)).abs() < 2.0, "{process:?}: {full:?} {refined:?}"); + } else { + assert!((y(full, true) / y(refined, true) - 1.0).abs() < 0.03, "{process:?}: {full:?} {refined:?}"); + } + } } #[test] diff --git a/crates/pipeline/src/tests_grain.rs b/crates/pipeline/src/tests_grain.rs index 14172a516cd..9dc48924530 100644 --- a/crates/pipeline/src/tests_grain.rs +++ b/crates/pipeline/src/tests_grain.rs @@ -35,7 +35,7 @@ fn processes_before_v7_keep_the_value_noise() { Process::V1 | Process::V2 | Process::V3 | Process::V4 | Process::V5 | Process::V6 => { assert!(matches!(model, Some(GrainModel::Value(_))), "{p:?}") } - Process::V7 => assert!(matches!(model, Some(GrainModel::Crystal(_))), "{p:?}"), + Process::V7 | Process::V8 => assert!(matches!(model, Some(GrainModel::Crystal(_))), "{p:?}"), } assert!(GrainModel::new(&on(p, 0.0), 2000.0, false).is_none(), "{p:?}: no grain at Amount 0"); } diff --git a/docs/curve-stage.md b/docs/curve-stage.md new file mode 100644 index 00000000000..16381aefaa9 --- /dev/null +++ b/docs/curve-stage.md @@ -0,0 +1,70 @@ +# Whites and the tone curves, measured (process V8) + +> **Changes:** [revision history](#revision-history) + +Process V8 renders Whites, the parametric curve and the point curves the way Lightroom does, from measurements of +Camera Raw's output. V1 to V7 are unchanged (`docs/process-versions.md`). The code is +`crates/pipeline/src/curve_stage.rs`, its measured tables `crates/pipeline/src/curve_stage_tables.rs`, and the GPU +kernel's `curve_stage` in `crates/gpu/src/wgsl/finish.wgsl`. + +## What was wrong + +Up to V7 Whites is part of the tone map, which acts on luminance, and the curves act on each channel of the +display-encoded output. Measured against Camera Raw, this goes wrong in three ways: + +- **Whites reaches too little.** Lightroom's Whites moves the upper midtones too: at Whites βˆ’50 an sRGB-encoded 0.6 + drops by about 10/255. V7's Whites barely touches them. +- **The parametric regions are too narrow.** Lightroom's Highlights, Lights, Darks and Shadows regions are broad and + overlap, and they add: the sum of the single regions reproduces three at once within 1/255. +- **Per-channel curves shift hues.** A contrast curve applied to R, G and B separately pushes orange towards red and + saturates. Lightroom's master curve keeps the hue. It maps the largest and the smallest channel through the curve, + and the middle channel keeps its relative position between them in linear light. + +## What V8 does + +After the tone map and V4's calibrated Contrast and Blacks, before the colour stage: + +1. Convert linear Rec.2020 to linear ProPhoto RGB (D50, Bradford) and encode with the sRGB curve, as the V4 + operators do (`light_v3::prophoto_matrices`). +2. Build the base table: Whites, then the parametric curve, then the master point curve. Whites and the four regions + are Camera Raw's measured output minus input (257 inputs each). Whites is measured at Β±25, Β±50 and Β±100, the + regions at Β±25, Β±50, Β±75 and Β±100, and amounts in between are interpolated linearly, towards 0 below 25. The + tables hold for Lightroom's default splits (25, 50, 75). With other splits the parametric curve is the analytic + model of the earlier processes. The table is kept non-decreasing. +3. Apply the base table to the largest and smallest channel. The middle channel keeps its relative position between + them in linear light. +4. Apply the red, green and blue point curves to each channel. +5. Refine Saturation (below 100) moves saturation back towards the input's, as in V7, and then rescales to the + curves' linear luminance, so the tone change stays. +6. Values above SDR white (an HDR render) continue with slope 1. + +The tone map no longer applies Whites under V8 (`finish::base_tone`), and the V7 output-curve tables are not built +(`FinishParams::curves` is `None`). With Whites, the parametric curve and the point curves all neutral, the stage +does not run and the render is V7's. + +## How it was measured + +`tools/lr_tone_charts.py charts OUT_DIR` writes linear DNG charts: 48 grey steps from 0.002 to 1 and OkLCh colour +patches, with the settings in the DNG's XMP. It writes one neutral chart, Whites at each measured amount, and each +parametric region at each measured amount. The charts are original test data. Every chart was rendered through +Camera Raw to a 16-bit Adobe RGB (1998) TIFF. Only that output is measured, and nothing of Adobe's is copied or +shipped. `tools/lr_tone_charts.py tables RENDER_DIR OUT_RS` reads the grey steps of each render as sRGB-encoded +linear ProPhoto values and writes `curve_stage_tables.rs`. It needs numpy and tifffile +(`tools/requirements-lr-tone-charts.txt`). Running the tool again reproduces the committed charts and the committed +tables byte for byte. + +The grey-step tables leave out how colour is treated. To check that, the colour patches of the same renders were +predicted from the grey-step curves under the hue-preserving rule in step 3. The prediction is within 0.03 to 0.16 +(OkLab Γ— 100) of Camera Raw's patches, against 0.3 to 3.4 for V7's per-channel curves. + +## Limits + +- The tables are measured with Lightroom's default splits. Moved splits use the earlier analytic model. +- Local (mask) Whites keeps the earlier processes' operator. +- The measurements use Camera Raw's process version 2012 controls (`crs:ProcessVersion` 11.0). + +## Revision history + +| Date | Change | Summary | +|---|---|---| +| 2026-11-10 | minor | Process V8: measured Whites and parametric curve, hue-preserving master curve | diff --git a/docs/gaps.md b/docs/gaps.md index 72ff6d72f88..4e58bb69807 100644 --- a/docs/gaps.md +++ b/docs/gaps.md @@ -17,7 +17,7 @@ Hours are Opus 5.5 agent wall-clock hours (see [target-app-parity.md](target-app |---:|---|---|---|---:|---| | 1 B | **Camera colour is estimated, not measured** (LR-PROF-CAMERACOLOR). Raws start from a per-file fit to the camera JPEG, 10 bundled profiles, 52 spectral matrices (plus same-sensor bodies, e.g. the X-T30 through the X-T3) or chart-measured matrices (the EOS D60); others use a neutral matrix (a black-and-white camera JPEG gives its tone curve only, #577; dark JPEG tones also guide the toe, #1307) | Ξ”E vs camera JPEG 2.9–10 after fitting (raw-parity.md); 1 chart-calibrated model (EOS D60: its Kelvin scale and fallback colour, the look stays the JPEG fit) vs 1,500 Adobe Standard profiles | every raw shooter sees colour that is close but not Lightroom's; some get neutral-matrix colour | 50–90 | [raw-parity](raw-parity.md#colour) | | 2 B | **CR3 variants no public file uses** (LR-IMP-FORMATS): `crx.rs` refuses vertical-tile C-RAW, partial-subband and other plane coding, multi-tile 0x200 and adaptive low-frequency gains, and those files fall back to the preview. All 110 CC0 CR3s on raw.pixls.us (31 folders) decode from sensor data, so none of these variants has a public sample; 26 CR3 bodies are verified (M50 / R100 / R8 exact, R5 Mark II pinned, 22 more pinned on one CC0 file each and checked against the camera JPEG, [cr3.md](cr3.md#further-bodies-one-cc0-file-each)). HEIF stills are `.HIF` files, not CR3; no CR3 sRAW / mRAW sample exists | measured: Canon's share whose camera fully works 73% β†’ 94% (raw-parity.md); 18 of 22 popular Canon bodies write CR3, all 18 now verified | +0.3 points of photographers; the variants surface only as user files that open as a preview | 10–25 | [raw-parity](raw-parity.md#remaining-work-ranked-by-photographers-unlocked-per-hour) | -| 3 B | **Render fidelity partial** (LR-BEHAV-RENDER-FIDELITY): calibrated camera-look Contrast and Blacks; other operators need measurement; from process V5 raw tone curves roll off into white in stops, so Exposure keeps recorded highlights (#1632) | process V3 reduces held-out response error from 0.136 to 0.038 stops for Contrast and 0.424 to 0.077 for Blacks on one Sony camera; Whites remains V2 pending a follow-up | imported Lightroom edits still differ, especially on uncalibrated operators and cameras | 30–60 | [calibrated Light operators](light-v3.md), [process versions](process-versions.md) | +| 3 B | **Render fidelity partial** (LR-BEHAV-RENDER-FIDELITY): calibrated camera-look Contrast and Blacks; other operators need measurement; from process V5 raw tone curves roll off into white in stops, so Exposure keeps recorded highlights (#1632); from V8 Whites and the tone curves are measured against Camera Raw ([curve-stage.md](curve-stage.md)) | process V3 reduces held-out response error from 0.136 to 0.038 stops for Contrast and 0.424 to 0.077 for Blacks on one Sony camera; Whites remains V2 pending a follow-up | imported Lightroom edits still differ, especially on uncalibrated operators and cameras | 30–60 | [calibrated Light operators](light-v3.md), [process versions](process-versions.md) | | 4 | ~~Original-pixel detail at 100%~~ (LR-VIEW-ZOOM): closed 2026-10-12, see Closed recently | checklist row βœ… | β€” | 0 | [ui-parity](ui-parity.md) | | 5 B | **AI masks: Subject, Sky, People, Background, Landscape** are heuristics; Object / Describe run SAM 3 but its download has no mirror configured | `crates/segment`; ai-masks.md; MASK rows 67% | masking is how most Lightroom users edit today | 40–70 + model decision | [target-app-parity](target-app-parity.md#ai) | | 6 | **Compressed ORF** (support withdrawn) | #3775 decoder removed pending provenance review; uncompressed support remains | compressed files use embedded JPEG previews when available, not sensor data | pending review | [orf-compression](orf-compression.md) | diff --git a/docs/parity-checklist.md b/docs/parity-checklist.md index 7d1ec1a01a9..436e7af1e5c 100644 --- a/docs/parity-checklist.md +++ b/docs/parity-checklist.md @@ -183,10 +183,10 @@ differences and missing bindings are in [ui-parity.md](ui-parity.md#shortcuts). | LR-EDIT-LIGHT-CONTRAST | Contrast | P0 | 🟑 | `ctl:light.contrast` | From process V4, global Contrast on the camera-look path is fitted per channel in ProPhoto with the sRGB transfer. Check response error 0.136 to 0.038 stops on six held-out Sony photos. Other sources and local adjustments retain V2; broader parity remains unverified (`docs/light-v3.md`). | | LR-EDIT-LIGHT-HIGHLIGHTS | Highlights | P0 | βœ… | `ctl:light.highlights`, `crates/raw/src/highlight.rs` | sensor-clipped highlights stay neutral when Highlights (or Exposure, Whites) darkens them: fully clipped content is rebuilt to the neutral of the colour model applied after it, partly clipped content takes its colour from reliable unclipped content nearby (not from dark objects, lens fringes or another surface beside it) and white where there is none, and pale partly clipped content (a white sky) turns white on its way to clipping (#523); binned previews and thumbnails decide clipping per sample before averaging (`develop_binned_masked`, `highlight::reconstruct_masked`), so a block with one clipped specular sample keeps its mean instead of jumping to the clip level, which reconstruction turned into green speckles at 500 px (#548) From process V2 the Highlights/Shadows base is the edge-aware filter of the 0.15 %-of-long-edge median of log luminance: twigs and fine texture take their surroundings' shift, so bright areas keep their local contrast as with Exposure (V1's base kept ~0.6 of it at βˆ’100, #632); region edges stay sharp. Alt/Option-drag shows highlight clipping | | LR-EDIT-LIGHT-SHADOWS | Shadows | P0 | βœ… | `ctl:light.shadows` | From process V2, the same base as Highlights: dark areas keep their local contrast when lifted (#632). Alt/Option-drag shows shadow clipping (white, clipped channels in colour) | -| LR-EDIT-LIGHT-WHITES | Whites | P0 | 🟑 | `ctl:light.whites`, `crates/pipeline/src/visualize.rs` | V4 preserves V2 Whites for both signs. Calibration is a planned follow-up; measured V2 check response error is 0.075 stops on the Sony test photos (`docs/light-v3.md`). Alt/Option-drag shows highlight clipping (black, clipped channels in colour) | +| LR-EDIT-LIGHT-WHITES | Whites | P0 | 🟑 | `ctl:light.whites`, `crates/pipeline/src/visualize.rs` | From process V8 Whites is measured against Camera Raw renders of synthetic grey steps and reaches into the midtones as Lightroom's does ([curve-stage.md](curve-stage.md)); not yet compared on photos per camera. V4 to V7 preserve V2 Whites for both signs; measured V2 check response error is 0.075 stops on the Sony test photos (`docs/light-v3.md`). Alt/Option-drag shows highlight clipping (black, clipped channels in colour) | | LR-EDIT-LIGHT-BLACKS | Blacks | P0 | 🟑 | `ctl:light.blacks`, `crates/pipeline/src/visualize.rs` | From process V4, global Blacks on the camera-look path uses a fitted per-channel/luminance mix. Check response error 0.424 to 0.077 stops on six held-out Sony photos; deepest tones still differ. Other sources and local adjustments retain V2 (`docs/light-v3.md`). Alt/Option-drag shows shadow clipping (white, clipped channels in colour) | -| LR-EDIT-LIGHT-CURVE-PARAM | Parametric curve | P0 | βœ… | `ctl:curve.highlights`, `ctl:curve.lights`, `ctl:curve.darks`, `ctl:curve.shadows`, `ctl:curve.split*`, `crates/pipeline/src/curve.rs` | the graph draws the renderer's own curve model; dragging the line moves the region under the pointer (one undo step) | -| LR-EDIT-LIGHT-CURVE-POINT | Point curve | P0 | βœ… | `cmd:develop.curve`, `cmd:curve.reset`, `cmd:curve.presets`, `cmd:curve.applyPreset`, `cmd:curve.savePreset`, `cmd:curve.deletePreset`, `cmd:curve.importPresets`, `cmd:curve.exportPresets`, `cmd:file.importCurvePresets`, `cmd:file.exportCurvePresets`, `crates/engine/src/cmd/curves.rs`, `crates/ui-egui/src/panels/edit.rs` | click to add a point; drag a point in both axes (between its neighbours, input / output readout, one undo step per drag; βŒ₯-drag moves it a tenth as far for fine adjustment, issue #1363); drag empty space to add and drag; double-click removes; reset: double-click a channel selector (that channel), the Reset button under the graph (every curve incl. parametric) or right-click the graph (channel / all); Point Curve preset dropdown: own Linear / Medium Contrast / Strong Contrast, user presets (save the current point curves, delete by right-click; saved with the library), import / export as `.lccurve` JSON | +| LR-EDIT-LIGHT-CURVE-PARAM | Parametric curve | P0 | βœ… | `ctl:curve.highlights`, `ctl:curve.lights`, `ctl:curve.darks`, `ctl:curve.shadows`, `ctl:curve.split*`, `crates/pipeline/src/curve.rs` | from process V8 the regions are Camera Raw's measured response at the default splits, broad and additive ([curve-stage.md](curve-stage.md)); the graph draws the renderer's own curve model; dragging the line moves the region under the pointer (one undo step) | +| LR-EDIT-LIGHT-CURVE-POINT | Point curve | P0 | βœ… | `cmd:develop.curve`, `cmd:curve.reset`, `cmd:curve.presets`, `cmd:curve.applyPreset`, `cmd:curve.savePreset`, `cmd:curve.deletePreset`, `cmd:curve.importPresets`, `cmd:curve.exportPresets`, `cmd:file.importCurvePresets`, `cmd:file.exportCurvePresets`, `crates/engine/src/cmd/curves.rs`, `crates/ui-egui/src/panels/edit.rs` | click to add a point; drag a point in both axes (between its neighbours, input / output readout, one undo step per drag; βŒ₯-drag moves it a tenth as far for fine adjustment, issue #1363); drag empty space to add and drag; double-click removes; reset: double-click a channel selector (that channel), the Reset button under the graph (every curve incl. parametric) or right-click the graph (channel / all); Point Curve preset dropdown: own Linear / Medium Contrast / Strong Contrast, user presets (save the current point curves, delete by right-click; saved with the library), import / export as `.lccurve` JSON; from process V8 the master curve keeps hue as Lightroom's does (largest and smallest channel through the curve, the middle one in proportion), and the red, green and blue curves follow it per channel ([curve-stage.md](curve-stage.md)) | | LR-EDIT-LIGHT-CURVE-RGB | Per-channel curves | P0 | βœ… | `cmd:develop.curve` (`channel`) | | | LR-EDIT-LIGHT-CURVE-REFINESAT | Curve saturation compensation | P1 | βœ… | `ctl:curve.refineSaturation` | | | LR-EDIT-LIGHT-CURVE-TAT | Drag-on-image curve adjust | P1 | βœ… | `cmd:develop.targeted` (`target: curve`) | | @@ -467,7 +467,7 @@ differences and missing bindings are in [ui-parity.md](ui-parity.md#shortcuts). | LR-BEHAV-OFFLINE | Offline editing | P1 | βœ… | | local-first: everything works offline | | LR-BEHAV-WEB-SAFETY | Library safety in the browser build | P1 | 🟑 | `cmd:file.backupLibrary`, `cmd:file.restoreLibrary`, `apps/lightcraft-web/src/safety.rs`, `apps/lightcraft-web/src/backup.rs`, `apps/lightcraft-web/src/files.rs` | web only (experimental): Back Up Library (zip of the catalog and every stored original) and a non-destructive Restore; failed saves show as unsaved and are retried; a photo that can't be stored isn't added; one tab per library (Web Locks); notices for storage that isn't persistent and for a library that can't open; `?reset` asks first; a panic shows a message. Missing: `?safe` start, deleting originals of removed photos, zip64 (backups > 4 GB) | | LR-BEHAV-GPU | GPU acceleration | P0 | βœ… | `crates/gpu/src/render.rs`, `cmd:app.gpu`, `docs/gpu-pipeline.md`, `crates/ui-egui/src/panels/notices.rs` | CPU fallback per render on device limits, out of memory, device errors / loss, incomplete or black results (`perf.gpuReason`, `perf.gpuFallback`; each render reports its own reason β€” `lightcraft_gpu::try_render`, `gpuFallback` per exported file β€” issue #675); short submissions for slow iGPUs; backend choice (DX12 only on Windows, `LIGHTCRAFT_GPU_BACKEND` / `WGPU_BACKEND`), device created after the window opens, crash sentinel (issue #136); a GPU lost while LightCraft runs (driver reset) stops it with that message and turns GPU rendering off for the next start, which says why (issue #1337; the window's renderer can't survive the lost device); quitting waits (up to 2 s) for renders in flight and starts no new GPU work, so none is inside the driver when the process exits (`crates/gpu/src/exit.rs`, issue #620; seen crashing only on Linux + NVIDIA, other drivers unverified); with GPU rendering on and no adapter found at all (e.g. no Vulkan loader on NixOS outside `nix develop`), the desktop app says once per session that it renders on the CPU and points to Help β–Έ System Info (`gpu_notice`; not when the GPU is turned off or only a software adapter exists); no tiling beyond the buffer limit (CPU) | -| LR-BEHAV-RENDER-FIDELITY | Rendering matches Lightroom | P1 | 🟑 | `crates/pipeline/src/lib.rs`, `crates/pipeline/src/tone.rs` | Process V4 calibrates global camera-look Contrast and Blacks against black-box Lightroom exports of Sony ILCE-7CR photos. Held-out response errors are 0.038 and 0.077 stops; V1/V2 keep their rendering. Whites retains V2 and awaits a follow-up. Exposure, Highlights/Shadows, other operators and broader camera coverage remain open (`docs/light-v3.md`). From process V5 a raw's tone curve rolls off into white in stops (past a camera curve's last fitted knot, or from half a stop below the generic curve's white point instead of clipping), so Exposure +1 and +2 keep the highlights the sensor recorded: on 12 CC0 corpus raws and 6 CC0 DNGs on the generic curve, unclipped pixels whose luminance renders at 254 or more fall from up to 22.5 % to 0 at +1 EV and from up to 35 % to at most 0.03 % at +2 EV, apart from one sky that is mostly at the clip (#1632). Not compared with Lightroom's output | +| LR-BEHAV-RENDER-FIDELITY | Rendering matches Lightroom | P1 | 🟑 | `crates/pipeline/src/lib.rs`, `crates/pipeline/src/tone.rs` | Process V4 calibrates global camera-look Contrast and Blacks against black-box Lightroom exports of Sony ILCE-7CR photos. Held-out response errors are 0.038 and 0.077 stops; V1/V2 keep their rendering. Whites retains V2 and awaits a follow-up. Exposure, Highlights/Shadows, other operators and broader camera coverage remain open (`docs/light-v3.md`). From process V8 Whites, the parametric curve and the point curves follow Camera Raw's measured response on synthetic grey steps, the master curve hue-preserving ([curve-stage.md](curve-stage.md)). From process V5 a raw's tone curve rolls off into white in stops (past a camera curve's last fitted knot, or from half a stop below the generic curve's white point instead of clipping), so Exposure +1 and +2 keep the highlights the sensor recorded: on 12 CC0 corpus raws and 6 CC0 DNGs on the generic curve, unclipped pixels whose luminance renders at 254 or more fall from up to 22.5 % to 0 at +1 EV and from up to 35 % to at most 0.03 % at +2 EV, apart from one sky that is mostly at the clip (#1632). Not compared with Lightroom's output | | LR-BEHAV-DRAGDROP | Drag and drop | P1 | βœ… | `crates/ui-egui/src/lib.rs`, `crates/ui-egui/src/panels/grid.rs` (`drag_feedback`), `crates/ui-egui/src/panels/left.rs` (`drop_target`, `album_drag_over`, `top_level_drop_target`, `drag_auto_scroll`), `crates/ui-egui/src/destination.rs`, `crates/ui-egui/src/widgets.rs` (`context_menu`), `crates/ui-egui/src/widgets/text_field.rs`, `crates/ui-egui/src/tests/carried_right_click.rs`, `crates/ui-egui/src/tests/carried_text_field_menu.rs` | a right-click while photos are carried opens no context menu (every menu opened through `widgets::context_menu`: sidebar rows, grid cells, lists; a text field's own Cut / Copy / Paste menu too); files β†’ app (a drop-target card while they hover, then the import review); grid photos β†’ an album row (adds the selection, with a count badge while dragging); sidebar album / folder rows β†’ a folder (moves it; its name follows the pointer); a drag of albums or grid photos near the top or bottom edge of the sidebar scrolls it (faster nearer the edge, only while the pointer is over the sidebar); when another folder has the same name, the dragged label, the Move question and the toast name the folder it is in (`home (/a)`); an album drop's toast does the same for an album of that name in another album folder (two in the same place have nothing to tell them apart and keep the plain name); only the primary button drags photos and drops them: a right-button drag over a grid cell neither picks photos up nor changes the selection, and a right-button release while photos are dragged neither drops them nor ends the drag | | LR-BEHAV-TOAST | Toast notifications | P1 | βœ… | `crates/ui-egui/src/panels.rs` | | | LR-BEHAV-DIALOGS | Dialogs fit the window | P1 | βœ… | `crates/ui-egui/src/dialogs.rs` (`dialog_body`, `list_height`), `crates/ui-egui/src/tests/dialog_fit.rs`, `crates/ui-egui/src/tests/dialog_copy.rs`, `crates/ui-egui/src/tests/dialogs.rs` (`a_click_outside_closes_the_dialog_when_settings_allow_it`) | a dialog taller than the window (Export on a 1366Γ—768 screen, issue #781) never runs off it: its options scroll while the title bar and the Cancel / confirm row stay on screen (the confirm button names its action: Create, Rename, Create Stacks, Export 3 Photos…, with "OK" kept only for a one-field prompt opened with a command that has no verb, `crates/ui-egui/src/tests/dialog_copy.rs`); lists that scroll on their own (What's New, All Metadata, shortcuts, smart-album rules, credits) get shorter first; dialogs that fit look as before; Import keeps its own resizable, scrolling window; Settings β†’ Dialogs β†’ Close a dialog by clicking outside it (off by default, so a stray click never throws away a dialog's choices): a click pressed and released on the dimmed backdrop closes the dialog like Esc and doesn't reach the panels below, while a drag that ends outside (a slider pulled past the edge) or a click that closes a dropdown keeps it; the import review never closes this way (`clicked_backdrop`); a one-line prompt (Rename Folder, New Folder on Disk, the preset and version names, New Library when its name can't be used, Auto-Tag from Tracklog) the engine refuses stays open with its text and shows the reason in a toast, so the name can be corrected, where it used to close without a word; a New Folder on Disk that works says so (β€œCreated folder β€œSelects” in β€œ2026/Shoot””, naming the parent by its last two folders as dialogs do) | @@ -732,7 +732,7 @@ From `08-lightroom-classic-extras.md` (Classic-only features) and part 2 of `06- | LRC-DEV-CALIB | Calibration panel | P1 | βœ… | `ctl:calibration.*` | | | LRC-DEV-TAT | Targeted adjustment tools | P1 | βœ… | `cmd:develop.targeted` (`target`: curve / hue / sat / lum) | | | LRC-DEV-DEFAULTS | Per-camera raw defaults | P1 | βœ… | `cmd:library.preferences` (`camera`, `import.perCamera`), `crates/ui-egui/src/dialogs/settings.rs` | Settings β†’ Import: raw default and per-camera presets | -| LRC-DEV-PROCESS | Process versions, Update to Current Process | P1 | βœ… | `cmd:develop.updateProcess`, `cmd:develop.reset`, `cmd:develop.get`, `crates/develop/src/settings.rs`, `crates/pipeline/src/finish.rs`, `docs/process-versions.md` | Each photo keeps its saved rendering process. V1 is legacy, V2 preserves Highlights/Shadows detail, V3 is pixel-scale sharpening, V4 calibrates camera-look Contrast and Blacks, V5 rolls raw tone curves off into white in stops (#1632), V6 takes colour noise reduction to the joint method (#815), V7 draws film grain from crystal layers. New photos and Reset use the latest; Update is one undoable step and never downgrades a future number. Copy/paste/sync preserve the receiving process. Persistent render keys include the resolved process from V3 on; V1/V2 keys remain unchanged. | +| LRC-DEV-PROCESS | Process versions, Update to Current Process | P1 | βœ… | `cmd:develop.updateProcess`, `cmd:develop.reset`, `cmd:develop.get`, `crates/develop/src/settings.rs`, `crates/pipeline/src/finish.rs`, `docs/process-versions.md` | Each photo keeps its saved rendering process. V1 is legacy, V2 preserves Highlights/Shadows detail, V3 is pixel-scale sharpening, V4 calibrates camera-look Contrast and Blacks, V5 rolls raw tone curves off into white in stops (#1632), V6 takes colour noise reduction to the joint method (#815), V7 draws film grain from crystal layers, V8 measures Whites and the tone curves against Lightroom and keeps hue through the master curve. New photos and Reset use the latest; Update is one undoable step and never downgrades a future number. Copy/paste/sync preserve the receiving process. Persistent render keys include the resolved process from V3 on; V1/V2 keys remain unchanged. | | LRC-DEV-VIEWOPTIONS | Develop view options | P2 | 🟑 | `cmd:view.viewOptions`, `crates/ui-egui/src/dialogs/settings.rs` (`view_options`) | View β–Έ View Options… (⌘J), the Loupe View part: Show Info Overlay with Info 1 / Info 2, and the three lines of each (none, file name, capture date, dimensions, exposure, camera, lens, camera + lens) with Use Defaults; Show Briefly When Photo Changes under each Info (one at most): with the overlay off, that Info shows for 3 s each time the loupe changes photo; General's Show message when loading or rendering photos (on by default; off, the loupe does not say "Rendering…"); applied as they change, saved with the app settings; `view.viewOptions {info1, info2, briefly, loupeMessages}` sets them for agents. Not yet: the Grid View tab, more fields (ratings, metadata, copy name), the video-frame option | | LRC-DEV-LOUPEOVERLAY | Loupe overlay: layout image | P2 | 🟑 | `cmd:view.chooseLayoutImage`, `cmd:view.layoutImage`, `cmd:view.layoutImageOpacity`, `cmd:view.layoutImageMatte`, `crates/ui-egui/src/panels/layout_overlay.rs` | View β–Έ Loupe Overlay: a PNG with transparency (a cover layout, a banner's safe areas) fitted and centred over the loupe photo, following zoom and pan; opacity and matte (the photo darkened outside the graphic's box) in steps; βŒ₯⌘O shows / hides it; read off the UI thread; saved with the UI state. Not yet: the Grid and Guides overlays, moving and resizing the layout with ⌘ held, free opacity / matte sliders | | LRC-DEV-VIDEO | Video frame capture | P2 | ⬜ | | | @@ -805,6 +805,7 @@ Latin stays upright. Advanced Japanese composition remains open. Regression cove | 2026-11-07 | correction | Compressed ORF sensor support withdrawn pending provenance review; embedded preview fallback remains. Coverage regenerated without the removed decoder: 557 verified, 665 unverified, 187 preview-only, 37 unsupported; 94% use-weighted coverage. | | 2026-11-04 | minor | Compressed ORF support was introduced in #3775; subsequently withdrawn pending provenance review. Earlier clean-room and verification claims are withdrawn; compressed files use embedded previews when available. See [ORF status](orf-compression.md). | | 2026-10-28 | minor | KEY-HIDEPINS βœ… β†’ 🟑: in the Masking panel an unmodified H toggles the mask pins (`view.maskPins`, the View β–Έ Show Mask Pins switch) instead of opening Remove; the toggle yields only to an explicit assignment of H itself, a Remove key reassigned to anything else still opens Remove there, and outside Masking β€” and the full-screen preview, where no panel shows β€” H keeps its own binding (Remove, by default). Remove's spot pins keep ⇧H as their only hide toggle (`tests/keymap` `h_toggles_the_mask_pins_while_masking`, `a_remapped_remove_key_still_opens_remove_while_masking`, `h_still_toggles_the_pins_when_remove_moves_to_another_key`) | +| 2026-11-10 | minor | LR-EDIT-LIGHT-WHITES, LR-EDIT-LIGHT-CURVE-PARAM, LR-EDIT-LIGHT-CURVE-POINT, LR-BEHAV-RENDER-FIDELITY, LRC-DEV-PROCESS: process V8 measures Whites and the parametric curve against Camera Raw and applies the master curve hue-preserving ([curve-stage.md](curve-stage.md)); statuses unchanged | | 2026-11-07 | minor | LR-EDIT-EFFECTS-GRAIN, LRC-DEV-PROCESS: process V7 takes film grain to crystal layers ([grain.md](grain.md)); V1 to V6 keep value noise | | 2026-11-06 | minor | LR-EDIT-DETAIL-CNR, LRC-DEV-PROCESS: process V6 takes colour noise reduction to the joint method on linear Rβˆ’Y / Bβˆ’Y (issue #815); status unchanged | | 2026-11-05 | minor | LR-BEHAV-RENDER-FIDELITY, LRC-DEV-PROCESS: process V5 rolls a raw's tone curve off into white in stops, past a camera curve's last knot and from half a stop below the generic curve's white point, so raising Exposure no longer turns recorded highlights white (#1632); statuses and counts unchanged | diff --git a/docs/process-versions.md b/docs/process-versions.md index b27367ed6f8..ab2a16b977a 100644 --- a/docs/process-versions.md +++ b/docs/process-versions.md @@ -15,7 +15,8 @@ stronger Light sliders, issue #196) without changing a single photo someone has | **V4** | V3 plus calibrated global Contrast (per channel) and Blacks (per-channel/luminance mix) on raws with a camera tone curve. Whites behaves exactly as V2, both signs; its calibration is a planned follow-up. Other sources and local adjustments retain V2 operators. See [calibrated Light operators](light-v3.md). | | **V5** | V4 plus: a raw's tone curve rolls off into white in stops instead of reaching it within about a stop of the sensor's white, so raising Exposure keeps the highlights the sensor recorded (issue #1632). **Camera curve** (the look fitted to the embedded JPEG, or a DNG's `ProfileToneCurve`; `CameraTone`): past its last knot `CameraTone::apply_rolloff` closes the gap to white by `gap / (1 + cΒ·(2^t βˆ’ 1))` at `t` stops past the knot, with `c` matching the curve's slope there and the gap halving every stop in the end (`tone::ROLLOFF_STOPS`); `ToneMap::camera_rolloff_hdr` builds the table from it. Under V1 to V4 the curve past its last knot (fitted only to camera JPEG tones below 0.85, so 1 to 3 stops below the sensor's white on most photos) closes on white exponentially in linear light: the sensor's white renders at 8-bit 246 to 254 at Exposure 0 and 254 to 255 from Exposure +1. On the 11 CC0 corpus files with a fitted look (8 Sony, 2 Nikon, 1 Fujifilm) it now renders at 239 to 250 at Exposure 0 and 247 to 253 at +1. A DNG curve that reaches white at the sensor's white renders as before. **Generic curve** (raws without a camera curve, `ToneMap::rolloff_hdr`): from half a stop below its white point (`tone::GENERIC_KNEE_STOPS`) the same shoulder takes over, with the extended Reinhard curve's value and slope at the join, where V1 to V4 clip at the white point (scene 1.18 at default settings, ΒΌ stop above the sensor's white). The sensor's white renders at about 235, 248 and 252 at Exposure 0, +1 and +2 (V1 to V4: 239, 255, 255; the CC0 Canon R8 file and 6 CC0 DNGs without a camera curve). Content past the old clip point, such as a clipped sky, now renders up to 15 codes below white at Exposure 0 and reaches 255 about 5 stops past the sensor's white. Below the last knot or the join, JPEGs and other display-referred sources, and the camera fit itself are unchanged; CPU and GPU share the tone LUT. | | **V6** | V5 plus: colour noise reduction filters the linear colour differences Rβˆ’Y and Bβˆ’Y with the joint method (issue #815, `docs/nr-color-joint.md`): edge-aware weights from a denoised guide shared by both differences, anisotropic diffusion over scales, a brake for isolated colour specks; Y is kept exactly. V1 to V5 keep the blurred chromaticity (`local::denoise`). CPU (`local::denoise`) and GPU (`render::denoise`) branch on `local::joint_colour_nr`. Renders with Color 0 are the same as V2's. | -| **V7** (the latest) | V6 plus: film grain from crystal layers ([grain.md](grain.md), `crates/pipeline/src/crystal.rs`), after AurΓ©lien Pierre's model: resolution independent (a preview is the export's grain box-downscaled), fading out at black and white, calibrated to Lightroom Classic's strength and width at mid grey. V1 to V6 keep their two-octave value noise exactly (`finish::ValueGrain`; on the GPU `F_GRAIN_MODEL` 0); `finish::GrainModel::new` picks the model per process. Renders without grain don't depend on this. | +| **V7** | V6 plus: film grain from crystal layers ([grain.md](grain.md), `crates/pipeline/src/crystal.rs`), after AurΓ©lien Pierre's model: resolution independent (a preview is the export's grain box-downscaled), fading out at black and white, calibrated to Lightroom Classic's strength and width at mid grey. V1 to V6 keep their two-octave value noise exactly (`finish::ValueGrain`; on the GPU `F_GRAIN_MODEL` 0); `finish::GrainModel::new` picks the model per process. Renders without grain don't depend on this. | +| **V8** (the latest) | V7 plus: Whites, the parametric curve and the point curves as Lightroom applies them ([curve-stage.md](curve-stage.md), `crates/pipeline/src/curve_stage.rs`), measured on Camera Raw renders of synthetic grey steps. Whites leaves the tone map and, with the parametric curve, comes from measured tables (Whites reaches into the midtones; the regions are broad and add); the master curve acts hue-preserving on sRGB-encoded linear ProPhoto RGB (largest and smallest channel through the curve, the middle one in proportion in linear light), then the red, green and blue curves per channel, between the calibrated Contrast and Blacks and the colour stage. V1 to V7 keep Whites in the tone map and their per-channel curves on the output. CPU (`finish::finish_with`) and GPU (`finish.wgsl::curve_stage`) share the tables. Renders with Whites, the parametric curve and the point curves neutral are V7's. | ## The rule @@ -111,6 +112,7 @@ extra field and retain their existing cached renders. No cache-version bump is n | Date | Change | Summary | |---|---|---| +| 2026-11-10 | minor | V8: Whites and the tone curves measured against Lightroom ([curve-stage.md](curve-stage.md)); V1 to V7 keep theirs | | 2026-11-07 | minor | V7: film grain from crystal layers ([grain.md](grain.md)); V1 to V6 keep their value noise | | 2026-11-05 | minor | V5: a raw's tone curve rolls off into white in stops, so raising Exposure keeps recorded highlights (#1632) | | 2026-10-12 | minor | Calibrated Contrast and Blacks, V2 Whites, resolved-process cache keys and number coordination | diff --git a/docs/whats-new.md b/docs/whats-new.md index 56fc27ed793..4e7ca2c0d23 100644 --- a/docs/whats-new.md +++ b/docs/whats-new.md @@ -2,6 +2,14 @@ ## Unreleased +### Whites and the tone curves behave as in Lightroom (process V8) +- Whites now reaches into the upper midtones as Lightroom's does, and the Highlights, Lights, Darks and Shadows + regions of the parametric curve are as broad as Lightroom's and add up the same way: both follow Lightroom's + measured response. A contrast curve no longer turns orange towards red: the point curve keeps colours' hue, and + the red, green and blue curves act on their channel after it. This is rendering process 8: new photos (and Reset) + get it, photos you already edited keep their look until you choose Photo β–Έ Update to Current Process. See + [Whites and the tone curves](curve-stage.md). + ### Film grain that looks like film (process V7) - Grain now comes from a simulated emulsion of crystal layers (after AurΓ©lien Pierre's model): dense, soft and cloudy rather than dots on top of the photo. It fades out towards black and white as on a print, so shadows keep their depth diff --git a/tools/lr_tone_charts.py b/tools/lr_tone_charts.py new file mode 100644 index 00000000000..c67aa2dad20 --- /dev/null +++ b/tools/lr_tone_charts.py @@ -0,0 +1,200 @@ +#!/usr/bin/env python3 +"""Measure Lightroom's Whites and parametric curve on synthetic grey steps (process V8, docs/curve-stage.md). + + python3 tools/lr_tone_charts.py charts OUT_DIR + Writes linear DNG charts (48 grey steps plus colour patches) with the settings embedded as XMP: + one neutral chart, Whites at +-25/50/100 and each parametric region at +-25/50/75/100 (default splits). + (render every DNG through Camera Raw to a 16-bit Adobe RGB (1998) TIFF with the same file name) + python3 tools/lr_tone_charts.py tables RENDER_DIR OUT_RS + Reads the renders and writes the Rust tables of `lightcraft_pipeline::curve_stage`. + +The charts are original test data generated here; nothing in them comes from Adobe. Only Camera Raw's output is +measured. Requires numpy and tifffile (tools/requirements-lr-tone-charts.txt). +""" +import json +import os +import struct +import sys + +import numpy as np + +W, H = 2400, 1600 +CELL = 60 +# linear sRGB -> XYZ (D65) inverse, stored as the DNG's ColorMatrix1 so the chart decodes as scene-linear sRGB +XYZ_TO_SRGB = [[3.2404542, -1.5371385, -0.4985314], [-0.969266, 1.8760108, 0.041556], [0.0556434, -0.2040259, 1.0572252]] +WHITES = (-100, -50, -25, 25, 50, 100) +REGIONS = ("Shadows", "Darks", "Lights", "Highlights") +REGION_AMOUNTS = (-100, -75, -50, -25, 25, 50, 75, 100) + + +def xmp(**settings): + """Camera Raw settings with everything else neutral (no sharpening, noise reduction, lens or vignette correction).""" + d = dict(CameraProfile="Embedded", WhiteBalance="As Shot", Exposure2012="0.00", Contrast2012="0", Highlights2012="0", + Shadows2012="0", Whites2012="0", Blacks2012="0", ToneCurveName2012="Linear", Sharpness="0", LuminanceSmoothing="0", + ColorNoiseReduction="0", LensProfileEnable="0", PostCropVignetteAmount="0", VignetteAmount="0", Texture="0", + Clarity2012="0", Dehaze="0", Vibrance="0", Saturation="0") + d.update({k: str(v) for k, v in settings.items()}) + attrs = " ".join(f'crs:{k}="{v}"' for k, v in d.items()) + return ('' + '').encode("utf8") + + +def write_dng(path, img, xm): + """A minimal linear (LinearRaw) DNG: `img` is scene-linear RGB 0..1, height x width x 3.""" + h, w = img.shape[:2] + px = (np.clip(img, 0, 1) * 65535 + 0.5).astype(" linear sRGB as the exact inverse of the sRGB primaries' matrix (the patches' colours) + x2s = np.linalg.inv(np.array([[0.4124564, 0.3575761, 0.1804375], [0.2126729, 0.7151522, 0.0721750], [0.0193339, 0.1191920, 0.9503041]])) + img = np.full((H, W, 3), 0.18) + patches = [] + + def put(c, **k): + i = len(patches) + x, y = (i % (W // CELL)) * CELL, (i // (W // CELL)) * CELL + ok = bool(np.all(c >= 0) and np.all(c <= 1)) + if ok: + img[y + 6:y + CELL - 6, x + 6:x + CELL - 6] = c + patches.append(dict(y=y + 6, x=x + 6, w=CELL - 12, h=CELL - 12, ok=ok, **k)) + + for g in np.geomspace(0.002, 1, 48): + put(np.array([g, g, g]), kind="grey", v=float(g)) + for lightness in (0.25, 0.4, 0.55, 0.7, 0.82, 0.92): + for chroma in (0.04, 0.08, 0.12): + for hue in range(0, 360, 15): + lab = np.array([lightness, chroma * np.cos(np.radians(hue)), chroma * np.sin(np.radians(hue))]) + put(x2s @ (m1i @ ((m2i @ lab) ** 3)), kind="colour", L=lightness, C=chroma, hue=hue) + return img, patches + + +def variants(): + v = {"neutral": {}} + for a in WHITES: + v[f"whites{a:+d}"] = {"Whites2012": a} + for r in REGIONS: + for a in REGION_AMOUNTS: + v[f"par_{r.lower()}{a:+d}"] = {"Parametric" + r: a} + return v + + +# ---- tables ------------------------------------------------------------------------------------------------- + +ADOBE_TO_XYZ = np.array([[0.5767309, 0.1855540, 0.1881852], [0.2973769, 0.6273491, 0.0752741], [0.0270343, 0.0706872, 0.9911085]]) +# XYZ (D65) -> linear ProPhoto RGB (D50, Bradford), as `RgbSpace::to_space` +XYZ_TO_PROPHOTO = (np.array([[1.3459433, -0.2556075, -0.0511118], [-0.5445989, 1.5081673, 0.0205351], [0.0, 0.0, 1.2118128]]) + @ np.array([[1.0478112, 0.0228866, -0.0501270], [0.0295424, 0.9904844, -0.0170491], + [-0.0092345, 0.0150436, 0.7521316]])) + + +def srgb_encode(v): + v = np.clip(v, 0, None) + return np.where(v <= 0.0031308, v * 12.92, 1.055 * v ** (1 / 2.4) - 0.055) + + +def grey_levels(path, patches): + """The grey steps of a Camera Raw render as sRGB-encoded linear ProPhoto values (the curve stage's domain).""" + import tifffile + a = tifffile.imread(path).astype(np.float64) + a /= 65535.0 if a.max() > 255 else 255.0 + out = [] + for q in patches: + if q["kind"] != "grey" or not q["ok"]: + continue + rgb = a[q["y"] + 8:q["y"] + q["h"] - 8, q["x"] + 8:q["x"] + q["w"] - 8].reshape(-1, 3).mean(0) + xyz = ADOBE_TO_XYZ @ (np.clip(rgb, 0, 1) ** (563 / 256)) + out.append(srgb_encode((XYZ_TO_PROPHOTO @ xyz)[1])) + return np.array(out) + + +def delta_table(neutral, edited): + """Output minus input over 257 evenly spaced inputs, from matched grey steps; zero at both ends.""" + o = np.argsort(neutral) + x, y = neutral[o], np.maximum.accumulate(edited[o]) + grid = np.linspace(0, 1, 257) + d = np.interp(grid, x, y - x) + lo, hi = grid < x[0], grid > x[-1] + d[lo] = np.interp(grid[lo], [0, x[0]], [0, d[~lo][0]]) + d[hi] = np.interp(grid[hi], [x[-1], 1], [d[~hi][-1], 0]) + return d + + +def tables(render_dir, out_rs): + patches = json.load(open(os.path.join(render_dir, "manifest.json")))["patches"] + tif = lambda n: os.path.join(render_dir, f"curve__{n}.tif") + n0 = grey_levels(tif("neutral"), patches) + rows = lambda names: [delta_table(n0, grey_levels(tif(n), patches)) for n in names] + whites = rows([f"whites{a:+d}" for a in WHITES]) + regions = [rows([f"par_{r.lower()}{a:+d}" for a in REGION_AMOUNTS]) for r in REGIONS] + fmt = lambda t: "[" + ", ".join(f"{v:.6f}" for v in t) + "]" + s = ["// @generated by tools/lr_tone_charts.py from Camera Raw renders of its synthetic grey steps (docs/curve-stage.md).", + "// Output minus input of each setting on sRGB-encoded linear ProPhoto values, 257 evenly spaced inputs from 0 to 1.", + "", + f"pub const WHITES_AMOUNTS: [f32; {len(WHITES)}] = [{', '.join(f'{a}.0' for a in WHITES)}];", + f"pub static WHITES: [[f32; 257]; {len(WHITES)}] = [", *[f" {fmt(t)}," for t in whites], "];", + "", + "/// Shadows, Darks, Lights, Highlights at the default splits (25, 50, 75).", + f"pub const REGION_AMOUNTS: [f32; {len(REGION_AMOUNTS)}] = [{', '.join(f'{a}.0' for a in REGION_AMOUNTS)}];", + f"pub static REGIONS: [[[f32; 257]; {len(REGION_AMOUNTS)}]; 4] = ["] + for r in regions: + s += [" ["] + [f" {fmt(t)}," for t in r] + [" ],"] + s += ["];", ""] + with open(out_rs, "w") as f: + f.write("\n".join(s)) + + +def main(): + if len(sys.argv) == 3 and sys.argv[1] == "charts": + out = sys.argv[2] + os.makedirs(out, exist_ok=True) + img, patches = chart() + json.dump(dict(patches=patches), open(os.path.join(out, "manifest.json"), "w")) + for name, settings in variants().items(): + write_dng(os.path.join(out, f"curve__{name}.dng"), img, xmp(**settings)) + elif len(sys.argv) == 4 and sys.argv[1] == "tables": + tables(sys.argv[2], sys.argv[3]) + else: + sys.exit(__doc__) + + +if __name__ == "__main__": + main() diff --git a/tools/requirements-lr-tone-charts.txt b/tools/requirements-lr-tone-charts.txt new file mode 100644 index 00000000000..c91f37d19e9 --- /dev/null +++ b/tools/requirements-lr-tone-charts.txt @@ -0,0 +1,4 @@ +# Python packages for tools/lr_tone_charts.py (crates/pipeline/src/curve_stage_tables.rs, docs/curve-stage.md). +# python3 -m venv .venv-lr-tone && .venv-lr-tone/bin/pip install -r tools/requirements-lr-tone-charts.txt +numpy==2.5.4 +tifffile==2026.11.8 From 1835f3a31ecf2c4755c8890ce7217c3c8cd2eae0 Mon Sep 17 00:00:00 2001 From: smi-leonivkovic Date: Tue, 10 Nov 2026 22:11:59 +0100 Subject: [PATCH 02/51] LR-EDIT-COLOR-MIXER-HSL: process V8, the colour mixer measured against Lightroom (#523) Each mixer slider follows Camera Raw's measured response on synthetic OkLCh charts (tools/lr_mixer_charts.py, crates/pipeline/src/mixer_stage.bin): hue shift, relative chroma change and lightness change by input hue (5 degree bins), chroma and lightness level, at +-25/50/75/100, with chroma keys per lightness level. All set sliders combine into one table (hue and lightness add, chroma multiplies), applied in OkLCh after the calibrated Contrast/Blacks and before the curve stage, as Lightroom orders them. V7's mixer is off from V8; Calibration, Saturation, Vibrance and grading keep their operators. CPU and GPU share the table; V1 to V7 are unchanged (docs/mixer-stage.md, docs/process-versions.md). --- crates/gpu/src/params.rs | 11 + crates/gpu/src/wgsl/finish.wgsl | 68 +++++- crates/gpu/tests/it/equivalence.rs | 29 +++ crates/pipeline/src/colorops.rs | 6 +- crates/pipeline/src/curve_stage.rs | 3 +- crates/pipeline/src/finish.rs | 6 +- crates/pipeline/src/lib.rs | 4 +- crates/pipeline/src/mixer_stage.bin | Bin 0 -> 394092 bytes crates/pipeline/src/mixer_stage.rs | 317 ++++++++++++++++++++++++++ docs/curve-stage.md | 3 +- docs/gaps.md | 2 +- docs/mixer-stage.md | 81 +++++++ docs/parity-checklist.md | 7 +- docs/process-versions.md | 3 +- docs/whats-new.md | 7 + tools/lr_mixer_charts.py | 174 ++++++++++++++ tools/requirements-lr-tone-charts.txt | 3 +- 17 files changed, 711 insertions(+), 13 deletions(-) create mode 100644 crates/pipeline/src/mixer_stage.bin create mode 100644 crates/pipeline/src/mixer_stage.rs create mode 100644 docs/mixer-stage.md create mode 100644 tools/lr_mixer_charts.py diff --git a/crates/gpu/src/params.rs b/crates/gpu/src/params.rs index de6a0c5479d..520f5b99d14 100644 --- a/crates/gpu/src/params.rs +++ b/crates/gpu/src/params.rs @@ -26,6 +26,8 @@ const FIELDS: &[(&str, usize)] = &[ ("STAGE", 1), ("STAGE_OFF", 1), ("STAGE_REFINE", 1), + ("MSTAGE", 1), + ("MSTAGE_OFF", 1), ("GAIN", 1), ("EV", 1), ("AIR", 1), @@ -217,6 +219,13 @@ pub fn finish_block(fp: &FinishParams, masks: &[[f32; MASK_TERMS]], present: &Pr } aux.extend_from_slice(&l.v); } + // process V8's mixer stage: its 9 chroma and 3 lightness keys, then its table + let mstage_off = aux.len(); + if let Some(cs) = &fp.mixer_stage { + aux.extend(cs.chroma.iter().flatten()); + aux.extend_from_slice(&cs.light); + aux.extend_from_slice(&cs.table[..]); + } let mask_off = aux.len(); for m in masks { aux.extend_from_slice(m); @@ -265,6 +274,8 @@ pub fn finish_block(fp: &FinishParams, masks: &[[f32; MASK_TERMS]], present: &Pr p.b("STAGE", fp.curve_stage.is_some()); p.u("STAGE_OFF", stage_off as u32); p.f("STAGE_REFINE", fp.curve_stage.as_ref().map_or(1.0, |c| c.refine)); + p.b("MSTAGE", fp.mixer_stage.is_some()); + p.u("MSTAGE_OFF", mstage_off as u32); p.f("REFINE_SAT", fp.refine_sat); p.f("GAIN", fp.gain); p.f("EV", fp.ev); diff --git a/crates/gpu/src/wgsl/finish.wgsl b/crates/gpu/src/wgsl/finish.wgsl index b57814fa221..50953fca921 100644 --- a/crates/gpu/src/wgsl/finish.wgsl +++ b/crates/gpu/src/wgsl/finish.wgsl @@ -122,6 +122,69 @@ fn light_ops(d: vec3) -> vec3 { return mul3(PRO_TO_2020, p); } +// `mixer_stage::level`: the lower and upper of three keys around `x` and the upper's weight, clamped. +struct CLevel { + a: u32, + b: u32, + f: f32, +} + +fn mstage_level(k: vec3, x: f32) -> CLevel { + if (x <= k.x) { + return CLevel(0u, 0u, 0.0); + } + if (x <= k.y) { + return CLevel(0u, 1u, (x - k.x) / (k.y - k.x)); + } + if (x <= k.z) { + return CLevel(1u, 2u, (x - k.y) / (k.z - k.y)); + } + return CLevel(2u, 2u, 0.0); +} + +// `MixerStage::look`, with the level keys at `keys` (9 chroma by lightness level, then 3 lightness) and the table +// after them: (hue shift, chroma factor, lightness change). +fn mstage_look(keys: u32, l: f32, c: f32, h: f32) -> vec3 { + let t = keys + 12u; + let hd = ((h * 57.29577951308232) % 360.0 + 360.0) % 360.0 / 5.0; + let i0 = u32(hd) % 72u; + let i1 = (i0 + 1u) % 72u; + let fh = hd - floor(hd); + let lb = mstage_level(vec3(aux[keys + 9u], aux[keys + 10u], aux[keys + 11u]), l); + var r = array, 2>(vec3(0.0), vec3(0.0)); + for (var j = 0u; j < 2u; j++) { + let m = select(lb.a, lb.b, j == 1u); + let ck = vec3(aux[keys + 3u * m], aux[keys + 3u * m + 1u], aux[keys + 3u * m + 2u]); + let cb = mstage_level(ck, c); + var v = vec3(0.0); + for (var o = 0u; o < 3u; o++) { + let r0 = t + ((m * 3u + cb.a) * 3u + o) * 72u; + let r1 = t + ((m * 3u + cb.b) * 3u + o) * 72u; + let a = aux[r0 + i0] * (1.0 - fh) + aux[r0 + i1] * fh; + let b = aux[r1 + i0] * (1.0 - fh) + aux[r1 + i1] * fh; + v[o] = a * (1.0 - cb.f) + b * cb.f; + } + if (c < ck.x) { + v.z *= max(c / ck.x, 0.0); + } + r[j] = v; + } + return r[0] * (1.0 - lb.f) + r[1] * lb.f; +} + +// `MixerStage::apply`: the colour mixer, through OkLCh. +fn mixer_stage(d: vec3) -> vec3 { + let lab = oklab(d); + let l = lab.x; + let c = sqrt(lab.y * lab.y + lab.z * lab.z); + // atan2(0, 0) is undefined in WGSL; the CPU's gives 0 + let h = select(atan2(lab.z, lab.y), 0.0, c == 0.0); + let r = mstage_look(pu(F_MSTAGE_OFF), l, c, h); + let h2 = h + r.x; + let c2 = c * r.y; + return oklab_inv(vec3(max(l + r.z, 0.0), c2 * cos(h2), c2 * sin(h2))); +} + // A table of process V8's curve stage (`Lut1::eval`) at offset `o` in `aux`. fn stage_lut(o: u32, x: f32) -> f32 { let f = clamp(x, 0.0, 1.0) * f32(CURVE_N - 1u); @@ -729,7 +792,10 @@ fn main(@builtin(global_invocation_id) gid: vec3) { d = light_ops(d); } - // --- process V8: Whites and the tone curves + // --- process V8: the colour mixer, then Whites and the tone curves + if (pu(F_MSTAGE) != 0u) { + d = mixer_stage(d); + } if (pu(F_STAGE) != 0u) { d = curve_stage(d); } diff --git a/crates/gpu/tests/it/equivalence.rs b/crates/gpu/tests/it/equivalence.rs index f9708b4f436..db0e19a183a 100644 --- a/crates/gpu/tests/it/equivalence.rs +++ b/crates/gpu/tests/it/equivalence.rs @@ -850,6 +850,35 @@ fn curve_stage_matches() { check("V8 HDR preview", &src, &raw, &s, &req); } +/// Process V8's mixer stage matches the CPU's, alone, with Calibration (still V7's operator), with the curve +/// stage after it, and with V7's colour tools (Saturation, B&W) that still follow. +#[test] +fn mixer_stage_matches() { + if !gpu() { + return; + } + let src = scene(0, 960, 640); + let raw = SourceInfo { raw: true, ..Default::default() }; + let req = RenderRequest::fit(720, 720); + let v8 = || DevelopSettings { process: Process::V8.version(), ..Default::default() }; + let mut s = v8(); + s.mixer.orange.sat = -60.0; + s.mixer.blue.hue = -40.0; + s.mixer.green.lum = 70.0; + s.mixer.magenta.hue = 15.0; + check("V8 mixer", &src, &raw, &s, &req); + s.calibration.red_hue = 45.0; + s.calibration.blue_sat = 60.0; + s.calibration.shadows_tint = 30.0; + check("V8 mixer and calibration", &src, &raw, &s, &req); + s.curve.master = vec![Point { x: 0.0, y: 0.05 }, Point { x: 0.5, y: 0.6 }, Point { x: 1.0, y: 0.95 }]; + s.color.saturation = 20.0; + check("V8 colour stage, curves, Saturation", &src, &raw, &s, &req); + check("V8 colour stage, not raw", &src, &SourceInfo::default(), &s, &req); + s.treatment = lightcraft_develop::Treatment::Bw; + check("V8 colour stage, B&W", &src, &raw, &s, &req); +} + /// Issue #632: the Highlights / Shadows base of each process (V1: the edge-aware filter of log /// luminance; V2: of its fine median, a radius that grows with the render) matches the CPU's, and /// a warm cache never hands one process the other's base. diff --git a/crates/pipeline/src/colorops.rs b/crates/pipeline/src/colorops.rs index ff32779313a..e6e25f4a5a1 100644 --- a/crates/pipeline/src/colorops.rs +++ b/crates/pipeline/src/colorops.rs @@ -162,7 +162,8 @@ impl ColorOps { hue: bands.map(|b| (b.hue / 100.0) as f32 * 0.5), sat: bands.map(|b| (b.sat / 100.0) as f32), lum: bands.map(|b| (b.lum / 100.0) as f32 * 0.18), - mixer: !s.mixer.is_neutral(), + // from process V8 the colour stage applies the mixer (`crate::mixer_stage`) + mixer: !s.mixer.is_neutral() && s.process.process() < lightcraft_develop::Process::V8, points: if crate::is_bw(s) { Vec::new() } else { @@ -366,7 +367,8 @@ mod tests { #[test] fn mixer_targets_its_band() { - let mut s = DevelopSettings::default(); + // V7's mixer (from V8 the colour stage applies it: `crate::mixer_stage`) + let mut s = DevelopSettings { process: lightcraft_develop::Process::V7.version(), ..DevelopSettings::default() }; s.mixer.blue.sat = -100.0; let ops = ColorOps::new(&s); let blue = [0.02, 0.05, 0.4]; diff --git a/crates/pipeline/src/curve_stage.rs b/crates/pipeline/src/curve_stage.rs index bb516c5a432..b5d0d7ff244 100644 --- a/crates/pipeline/src/curve_stage.rs +++ b/crates/pipeline/src/curve_stage.rs @@ -11,7 +11,8 @@ //! Whites reaches into the midtones (Whites βˆ’50 lowers encoded 0.6 by about 10/255), and each region is broad and //! overlapping. The regions add: the sum of single regions reproduces three at once within 1/255. //! -//! The stage runs after the tone map and Process V4's calibrated Contrast and Blacks, before the colour stage. It +//! The stage runs after the tone map, Process V4's calibrated Contrast and Blacks and V8's colour mixer +//! ([`crate::mixer_stage`]), before the colour stage. It //! replaces V7's curves on encoded output values; the tone map leaves Whites to it. use lightcraft_color::spline::{Lut1, MonotoneCurve}; diff --git a/crates/pipeline/src/finish.rs b/crates/pipeline/src/finish.rs index 041936bdaa4..109632bff33 100644 --- a/crates/pipeline/src/finish.rs +++ b/crates/pipeline/src/finish.rs @@ -248,6 +248,8 @@ pub struct FinishParams { pub shadow_tint: f32, /// Tone curves (parametric ∘ point, per channel) on encoded values, 1024 entries each. pub curves: Option<[Lut1; 3]>, + /// Process V8's colour mixer (it replaces the mixer in `ops`). + pub mixer_stage: Option, /// Process V8's Whites and tone curves (they replace `curves`, which stays `None` from V8 on). pub curve_stage: Option, /// Refine Saturation as 0..1 (1 = the curves' own saturation). @@ -338,6 +340,7 @@ impl FinishParams { lut: crate::lut::get(&s.profile.id).map(|l| (l, (s.profile.amount / 100.0).clamp(0.0, 2.0) as f32)), ops: ColorOps::new(s), curves: if s.process.process() < Process::V8 { curve_luts(&s.curve) } else { None }, + mixer_stage: crate::mixer_stage::MixerStage::new(s), curve_stage: crate::curve_stage::CurveStage::new(s), refine_sat: (s.curve.refine_saturation / 100.0).clamp(0.0, 1.0) as f32, vig: if effects { vignette(s) } else { None }, @@ -568,7 +571,8 @@ pub(crate) fn finish_with( // --- process V4: calibrated Contrast, Blacks (ProPhoto with the sRGB transfer) d = apply_light(d, light.as_ref(), preview_light.as_ref(), exact, srgb); - // --- process V8: Whites and the tone curves, as Lightroom applies them + // --- process V8: the colour mixer, then Whites and the tone curves, as Lightroom applies them + d = fp.mixer_stage.as_ref().map_or(d, |stage| stage.apply(d)); d = fp.curve_stage.as_ref().map_or(d, |stage| stage.apply(d)); // --- colour diff --git a/crates/pipeline/src/lib.rs b/crates/pipeline/src/lib.rs index 1dc2ae10fff..f4ebeaca16a 100644 --- a/crates/pipeline/src/lib.rs +++ b/crates/pipeline/src/lib.rs @@ -12,7 +12,8 @@ //! 3. tone map β€” contrast / whites / blacks filmic curve on luminance, highlight desaturation //! 4. colour β€” vibrance, saturation, colour mixer, colour grading, B&W (OkLCh) //! 5. display β€” gamut map to the output space (sRGB unless [`RenderRequest::space`] says otherwise), encode, tone curves (parametric + point), vignette, grain -//! (from process V8 the tone curves and Whites run between 3 and 4 instead: [`curve_stage`]) +//! (from process V8 the colour mixer, then the tone curves and Whites, run between 3 and 4 instead: +//! [`mixer_stage`], [`curve_stage`]) //! //! Spatial parameters are specified relative to the image's long edge, so a 400 px preview and a //! 60 MP export look alike. @@ -45,6 +46,7 @@ pub mod local_tone; pub mod lut; pub mod mask_space; pub mod masks; +pub mod mixer_stage; pub mod nrc_joint; #[cfg(test)] mod nrc_joint_reference; diff --git a/crates/pipeline/src/mixer_stage.bin b/crates/pipeline/src/mixer_stage.bin new file mode 100644 index 0000000000000000000000000000000000000000..1a82ee5333d23757494afeaf2a10812c55bb4afb GIT binary patch literal 394092 zcmb@P30O_r`}lYBgi@LZsiZ+8>728hM52g9LL|u?A~Ns06O~e-lxUDrBn={^d8Sl| zq=__&GDI}~*E-$%{fYa(*V*fy=ZVff`|S3+*Sp^JS?_w^cP*Yb&xQ@dFbVL(3x4>( z4+r>J2!1fEtN_C_+l|=0;Wdvkapi+%>e0 zoop0Xn{AN0e1YNK;Y`C*Uj>X8o?mDzb7{Nrf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=&=7SDFjAXeR6Fbo zcIsVbBvrMKjEzyRcN=RecpG#T_?`Ms3+}*FK;jDKl+v+Y1^r)h&lutoifDBK`_e)F zW|bu>;X;x4-lf7wI>DxBvE>i))bZ~dxCmqnAfYjh0p5P(BPKuPBdrUIdl6qvBTu$p z+k@}jg6ON2vp!0$k+!~ac@yDafQSLaG-&W`wcq{EYlKK*G@6Y0(eE2{$(?K^2k?Uj z(Ch>zh94&vb({JBd4+H=LUd#btKrZ$v^T9I49^=)M3S)^JUV;jeQ)m~f{hVbfEM4L zY%Bfp$`{;7>Xar>d9B%{=d$icuiO)^#9&Mjl8jgwxRx%mi6(y4mJyMM=-X~9Ne#aX zZn_F?C03at>Z+8k)!KceSKaUjfKDx;8!RvHV?^Yj#fPx=($C>O;Ff*Z z1!9dkB3_l$wO+rUJk(MDlK9$<7EkMHOixJ;0EzEwPBT6>qHWh$OKJM+yWm0NgIL@a zv1bsM%v{FGz2uI~t(ST(bI$)+8 zYDhRBa^A2>Xwq2z)k`ZE6C4?6coj=!1ew$QK+6v}RnB32rs=>#UM zLBRWQ--Sc`L{4=Dl8hrEG2m%N`{-_N4MxOwL=4bcoci)ExKUxtBvu)r#WLAt^ekbo z(!*)5&Jg`Ca*<@j0>Q=i0xQfn8XaN0%tm`#VXZ~UVRyg{d6`SZT608Ql`*h!JwP7z z#CizMNJI<}0j_>k-mzvt*P9WZg=W97wrLq}ez+Y(tS1n4RocLI<3aMU&M9d|AtE#x zZ?5^C`V_oQI15K>AauZ*%hhA$ZzaJTG&8! zesW4A$SCvAVZ5tD^XCjV6ux_K9XwdMScq6V7wsH*6%Chp93hXlFG#bf>l#3+!J8Tz y9v(>sZyucc4*Od*4ULRY_XCX7Wkv*C0Jqt^4G7oeYCI^pirflDOE, +} + +fn f32_at(off: usize) -> Option { + TABLE.get(off..off + 4).and_then(|b| b.try_into().ok()).map(f32::from_le_bytes) +} + +fn u32_at(off: usize) -> Option { + TABLE.get(off..off + 4).and_then(|b| b.try_into().ok()).map(u32::from_le_bytes) +} + +/// The table's level keys (chroma per lightness level, lightness), when its header and size match this code. +fn levels() -> Option<([[f32; 3]; 3], [f32; 3])> { + let dims = [1, SLIDERS, AMOUNTS.len(), ROWS, OUTPUTS, HUES]; + let header_ok = TABLE.get(..4) == Some(b"LCCS") + && dims.iter().enumerate().all(|(i, d)| u32_at(4 + 4 * i) == Some(*d as u32)) + && AMOUNTS.iter().enumerate().all(|(i, a)| f32_at(28 + 4 * i) == Some(*a)); + if !header_ok || TABLE.len() != HEADER + SLIDERS * AMOUNTS.len() * ROWS * OUTPUTS * ROW_BYTES { + return None; + } + let at = |i: usize| f32_at(28 + 4 * AMOUNTS.len() + 4 * i); + let chroma = [[at(0)?, at(1)?, at(2)?], [at(3)?, at(4)?, at(5)?], [at(6)?, at(7)?, at(8)?]]; + let light = [at(9)?, at(10)?, at(11)?]; + Some((chroma, light)) +} + +/// Measured response of `slider` at measured amount `amount`, row `row`, output `out`, hue bin `bin`. +fn measured(slider: usize, amount: usize, row: usize, out: usize, bin: usize) -> f32 { + let off = HEADER + (((slider * AMOUNTS.len() + amount) * ROWS + row) * OUTPUTS + out) * ROW_BYTES; + let scale = f32_at(off).unwrap_or(0.0); + TABLE.get(off + 4 + bin).map_or(0.0, |q| scale * f32::from(i8::from_le_bytes([*q]))) +} + +/// The two measured amounts around `v` and the weight of the upper: `None` stands for the unedited 0. +fn bracket(v: f32) -> (Option, Option, f32) { + let v = v.clamp(AMOUNTS[0], AMOUNTS[AMOUNTS.len() - 1]); + let mut keys: Vec<(f32, Option)> = AMOUNTS.iter().enumerate().map(|(i, a)| (*a, Some(i))).collect(); + keys.push((0.0, None)); + keys.sort_by(|a, b| a.0.total_cmp(&b.0)); + for w in keys.windows(2) { + if let [k0, k1] = w + && v >= k0.0 + && v <= k1.0 + { + let f = if k1.0 > k0.0 { (v - k0.0) / (k1.0 - k0.0) } else { 0.0 }; + return (k0.1, k1.1, f); + } + } + (None, None, 0.0) +} + +/// The combined table of `(slider, amount)` pairs: hue and lightness changes add, chroma changes multiply. +fn combine(sliders: &[(usize, f32)]) -> Option> { + let active: Vec<_> = sliders.iter().filter(|(_, v)| *v != 0.0 && v.is_finite()).collect(); + if active.is_empty() { + return None; + } + let mut t = Box::new([0.0f32; TABLE_LEN]); + for row in 0..ROWS { + for out in 0..OUTPUTS { + for bin in 0..HUES { + let mut acc = if out == 1 { 1.0 } else { 0.0 }; + for (slider, v) in &active { + let (a0, a1, f) = bracket(*v); + let at = |a: Option| a.map_or(0.0, |a| measured(*slider, a, row, out, bin)); + let r = at(a0) * (1.0 - f) + at(a1) * f; + match out { + 0 => acc += r.to_radians(), + 1 => acc *= (1.0 + r).max(0.0), + _ => acc += r, + } + } + if let Some(slot) = t.get_mut((row * OUTPUTS + out) * HUES + bin) { + *slot = acc; + } + } + } + } + Some(t) +} + +/// Position of `x` between the three measured levels `keys`: (lower, upper, weight of the upper), clamped. +fn level(keys: &[f32; 3], x: f32) -> (usize, usize, f32) { + if x <= keys[0] { + (0, 0, 0.0) + } else if x <= keys[1] { + (0, 1, (x - keys[0]) / (keys[1] - keys[0])) + } else if x <= keys[2] { + (1, 2, (x - keys[1]) / (keys[2] - keys[1])) + } else { + (2, 2, 0.0) + } +} + +impl MixerStage { + /// The stage for `s`: `None` before V8, or when the mixer is neutral. + pub fn new(s: &DevelopSettings) -> Option { + if s.process.process() < Process::V8 { + return None; + } + let (chroma, light) = levels()?; + let sliders: Vec<(usize, f32)> = s.mixer.bands().iter().flat_map(|b| [b.hue, b.sat, b.lum]).enumerate().map(|(i, v)| (i, v as f32)).collect(); + combine(&sliders).map(|table| MixerStage { chroma, light, table }) + } + + /// The (hue shift, chroma factor, lightness change) for OkLCh `l`, `c`, `h`: linear in hue, bilinear in the chroma + /// and lightness levels, clamped to the measured ones. Below the lowest measured chroma the lightness change fades + /// out towards neutral. + pub fn look(&self, l: f32, c: f32, h: f32) -> [f32; 3] { + let hd = h.to_degrees().rem_euclid(360.0) / 5.0; + let i0 = (hd as usize) % HUES; + let i1 = (i0 + 1) % HUES; + let fh = hd - hd.floor(); + let (l0, l1, fl) = level(&self.light, l); + let at = |row: usize, out: usize, bin: usize| self.table.get((row * OUTPUTS + out) * HUES + bin).copied().unwrap_or(0.0); + // per lightness level: bilinear in its own chroma keys, the lightness change faded out below the lowest + let per_level = |m: usize| { + let keys = self.chroma.get(m).copied().unwrap_or([1.0; 3]); + let (c0, c1, fc) = level(&keys, c); + let mut r = [0.0f32; 3]; + for (out, v) in r.iter_mut().enumerate() { + let hue = |row: usize| at(row, out, i0) * (1.0 - fh) + at(row, out, i1) * fh; + *v = hue(m * 3 + c0) * (1.0 - fc) + hue(m * 3 + c1) * fc; + } + if c < keys[0] { + r[2] *= (c / keys[0]).max(0.0); + } + r + }; + let (a, b) = (per_level(l0), per_level(l1)); + std::array::from_fn(|k| a[k] * (1.0 - fl) + b[k] * fl) + } + + /// The colour mixer on linear Rec.2020 (through OkLCh). + pub fn apply(&self, d: [f32; 3]) -> [f32; 3] { + let [l, c, h] = lab_to_lch(oklab_from_2020(d)); + let [dh, k, dl] = self.look(l, c, h); + oklab_to_2020(lch_to_lab([(l + dl).max(0.0), c * k, h + dh])) + } +} + +#[cfg(test)] +mod tests { + use super::*; + use lightcraft_develop::Hsl; + + fn v8() -> DevelopSettings { + DevelopSettings { process: Process::V8.version(), ..Default::default() } + } + + fn lch_of(d: [f32; 3]) -> [f32; 3] { + lab_to_lch(oklab_from_2020(d)) + } + + /// Linear Rec.2020 of OkLCh (`h` in degrees). + fn colour(l: f32, c: f32, h: f32) -> [f32; 3] { + oklab_to_2020(lch_to_lab([l, c, h.to_radians()])) + } + + fn hue_shift(a: [f32; 3], b: [f32; 3]) -> f32 { + let d = (lch_of(b)[2] - lch_of(a)[2]).to_degrees(); + (d + 180.0).rem_euclid(360.0) - 180.0 + } + + #[test] + fn the_table_matches_this_code() { + let (chroma, light) = levels().expect("table header"); + assert!(chroma.iter().all(|c| c.windows(2).all(|w| w[0] < w[1])) && light.windows(2).all(|w| w[0] < w[1]), "{chroma:?} {light:?}"); + // every scale is finite and the values stay within plausible ranges + for slider in 0..SLIDERS { + for a in 0..AMOUNTS.len() { + for row in 0..ROWS { + for out in 0..OUTPUTS { + let m = (0..HUES).map(|b| measured(slider, a, row, out, b).abs()).fold(0.0, f32::max); + // Blue Luminance βˆ’100 darkens pale blues and raises their chroma about sixfold + let limit = [180.0, 8.0, 0.5][out]; + assert!(m.is_finite() && m <= limit, "slider {slider} amount {a} row {row} out {out}: {m}"); + } + } + } + } + } + + #[test] + fn only_v8_with_a_mixer_gets_the_stage() { + assert!(MixerStage::new(&v8()).is_none()); + let mut s = v8(); + s.calibration.blue_hue = -20.0; + assert!(MixerStage::new(&s).is_none(), "Calibration keeps the earlier operator"); + s.mixer.orange.sat = 30.0; + assert!(MixerStage::new(&s).is_some()); + s.process = Process::V7.version(); + assert!(MixerStage::new(&s).is_none()); + } + + #[test] + fn a_band_moves_its_own_colours_and_leaves_the_others() { + let mut s = v8(); + s.mixer.orange = Hsl { hue: 0.0, sat: -60.0, lum: 0.0 }; + let st = MixerStage::new(&s).expect("stage"); + // Lightroom's Orange centre sits near OkLab hue 51 + let orange = colour(0.7, 0.1, 55.0); + let out = st.apply(orange); + assert!(lch_of(out)[1] < lch_of(orange)[1] * 0.7, "{:?} -> {:?}", lch_of(orange), lch_of(out)); + let blue = colour(0.6, 0.1, 255.0); + let b = lch_of(st.apply(blue)); + assert!((b[1] / lch_of(blue)[1] - 1.0).abs() < 0.03 && (b[0] - lch_of(blue)[0]).abs() < 0.005, "{b:?}"); + } + + #[test] + fn hue_and_luminance_follow_the_measured_direction() { + let mut s = v8(); + s.mixer.blue.hue = -100.0; + let st = MixerStage::new(&s).expect("stage"); + let blue = colour(0.6, 0.1, 255.0); + // Lightroom's Blue Hue βˆ’100 turns blue towards aqua (lower OkLab hue) + assert!(hue_shift(blue, st.apply(blue)) < -10.0, "{}", hue_shift(blue, st.apply(blue))); + let mut s = v8(); + s.mixer.green.lum = -80.0; + let st = MixerStage::new(&s).expect("stage"); + let green = colour(0.7, 0.1, 140.0); + assert!(lch_of(st.apply(green))[0] < lch_of(green)[0] - 0.03); + } + + #[test] + fn amounts_interpolate_and_grow_with_the_slider() { + let shift = |v: f64| { + let mut s = v8(); + s.mixer.yellow.hue = v; + let st = MixerStage::new(&s).expect("stage"); + let c = colour(0.85, 0.1, 100.0); + hue_shift(c, st.apply(c)).abs() + }; + let (a, b, c, d) = (shift(10.0), shift(25.0), shift(60.0), shift(100.0)); + assert!(a < b && b < c && c < d, "{a} {b} {c} {d}"); + assert!((a - b * 0.4).abs() < 0.05 * b.max(1.0), "below 25 the effect fades linearly: {a} vs {b}"); + } + + #[test] + fn sliders_combine_on_the_same_input() { + let one = |f: &dyn Fn(&mut DevelopSettings)| { + let mut s = v8(); + f(&mut s); + MixerStage::new(&s).expect("stage") + }; + let a = one(&|s| s.mixer.orange.sat = 40.0); + let b = one(&|s| s.mixer.orange.lum = -30.0); + let both = one(&|s| { + s.mixer.orange.sat = 40.0; + s.mixer.orange.lum = -30.0; + }); + // on a measured node (lightness and chroma level 1, hue bin 11), where no interpolation blurs the rule + let (l, c, h) = (a.light[1], a.chroma[1][1], 55f32.to_radians()); + let (ra, rb, r) = (a.look(l, c, h), b.look(l, c, h), both.look(l, c, h)); + assert!((r[1] - ra[1] * rb[1]).abs() < 1e-5, "chroma changes multiply: {ra:?} {rb:?} {r:?}"); + assert!((r[2] - ra[2] - rb[2]).abs() < 1e-5, "lightness changes add"); + } + + #[test] + fn near_neutral_colours_keep_their_lightness() { + let mut s = v8(); + s.mixer.red.lum = 100.0; + s.mixer.blue.sat = 60.0; + let st = MixerStage::new(&s).expect("stage"); + for g in [0.02f32, 0.18, 0.7] { + let out = st.apply([g; 3]); + assert!(out.iter().all(|v| (v - g).abs() < 5e-4 * g.max(0.1)), "{g}: {out:?}"); + } + } +} diff --git a/docs/curve-stage.md b/docs/curve-stage.md index 16381aefaa9..f574dc0623e 100644 --- a/docs/curve-stage.md +++ b/docs/curve-stage.md @@ -22,7 +22,8 @@ display-encoded output. Measured against Camera Raw, this goes wrong in three wa ## What V8 does -After the tone map and V4's calibrated Contrast and Blacks, before the colour stage: +After the tone map, V4's calibrated Contrast and Blacks and V8's colour mixer ([mixer-stage.md](mixer-stage.md)), +before the colour stage: 1. Convert linear Rec.2020 to linear ProPhoto RGB (D50, Bradford) and encode with the sRGB curve, as the V4 operators do (`light_v3::prophoto_matrices`). diff --git a/docs/gaps.md b/docs/gaps.md index 4e58bb69807..d121b5ac713 100644 --- a/docs/gaps.md +++ b/docs/gaps.md @@ -17,7 +17,7 @@ Hours are Opus 5.5 agent wall-clock hours (see [target-app-parity.md](target-app |---:|---|---|---|---:|---| | 1 B | **Camera colour is estimated, not measured** (LR-PROF-CAMERACOLOR). Raws start from a per-file fit to the camera JPEG, 10 bundled profiles, 52 spectral matrices (plus same-sensor bodies, e.g. the X-T30 through the X-T3) or chart-measured matrices (the EOS D60); others use a neutral matrix (a black-and-white camera JPEG gives its tone curve only, #577; dark JPEG tones also guide the toe, #1307) | Ξ”E vs camera JPEG 2.9–10 after fitting (raw-parity.md); 1 chart-calibrated model (EOS D60: its Kelvin scale and fallback colour, the look stays the JPEG fit) vs 1,500 Adobe Standard profiles | every raw shooter sees colour that is close but not Lightroom's; some get neutral-matrix colour | 50–90 | [raw-parity](raw-parity.md#colour) | | 2 B | **CR3 variants no public file uses** (LR-IMP-FORMATS): `crx.rs` refuses vertical-tile C-RAW, partial-subband and other plane coding, multi-tile 0x200 and adaptive low-frequency gains, and those files fall back to the preview. All 110 CC0 CR3s on raw.pixls.us (31 folders) decode from sensor data, so none of these variants has a public sample; 26 CR3 bodies are verified (M50 / R100 / R8 exact, R5 Mark II pinned, 22 more pinned on one CC0 file each and checked against the camera JPEG, [cr3.md](cr3.md#further-bodies-one-cc0-file-each)). HEIF stills are `.HIF` files, not CR3; no CR3 sRAW / mRAW sample exists | measured: Canon's share whose camera fully works 73% β†’ 94% (raw-parity.md); 18 of 22 popular Canon bodies write CR3, all 18 now verified | +0.3 points of photographers; the variants surface only as user files that open as a preview | 10–25 | [raw-parity](raw-parity.md#remaining-work-ranked-by-photographers-unlocked-per-hour) | -| 3 B | **Render fidelity partial** (LR-BEHAV-RENDER-FIDELITY): calibrated camera-look Contrast and Blacks; other operators need measurement; from process V5 raw tone curves roll off into white in stops, so Exposure keeps recorded highlights (#1632); from V8 Whites and the tone curves are measured against Camera Raw ([curve-stage.md](curve-stage.md)) | process V3 reduces held-out response error from 0.136 to 0.038 stops for Contrast and 0.424 to 0.077 for Blacks on one Sony camera; Whites remains V2 pending a follow-up | imported Lightroom edits still differ, especially on uncalibrated operators and cameras | 30–60 | [calibrated Light operators](light-v3.md), [process versions](process-versions.md) | +| 3 B | **Render fidelity partial** (LR-BEHAV-RENDER-FIDELITY): calibrated camera-look Contrast and Blacks; other operators need measurement; from process V5 raw tone curves roll off into white in stops, so Exposure keeps recorded highlights (#1632); from V8 Whites, the tone curves and the colour mixer are measured against Camera Raw ([curve-stage.md](curve-stage.md), [mixer-stage.md](mixer-stage.md)) | process V3 reduces held-out response error from 0.136 to 0.038 stops for Contrast and 0.424 to 0.077 for Blacks on one Sony camera; Whites remains V2 pending a follow-up | imported Lightroom edits still differ, especially on uncalibrated operators and cameras | 30–60 | [calibrated Light operators](light-v3.md), [process versions](process-versions.md) | | 4 | ~~Original-pixel detail at 100%~~ (LR-VIEW-ZOOM): closed 2026-10-12, see Closed recently | checklist row βœ… | β€” | 0 | [ui-parity](ui-parity.md) | | 5 B | **AI masks: Subject, Sky, People, Background, Landscape** are heuristics; Object / Describe run SAM 3 but its download has no mirror configured | `crates/segment`; ai-masks.md; MASK rows 67% | masking is how most Lightroom users edit today | 40–70 + model decision | [target-app-parity](target-app-parity.md#ai) | | 6 | **Compressed ORF** (support withdrawn) | #3775 decoder removed pending provenance review; uncompressed support remains | compressed files use embedded JPEG previews when available, not sensor data | pending review | [orf-compression](orf-compression.md) | diff --git a/docs/mixer-stage.md b/docs/mixer-stage.md new file mode 100644 index 00000000000..a825ba01624 --- /dev/null +++ b/docs/mixer-stage.md @@ -0,0 +1,81 @@ +# The colour mixer, measured (process V8) + +> **Changes:** [revision history](#revision-history) + +Process V8 renders the colour mixer (Hue, Saturation and Luminance of the eight bands) the way Lightroom does, from +measurements of Camera Raw's output. V1 to V7 are unchanged (`docs/process-versions.md`). The code is +`crates/pipeline/src/mixer_stage.rs`, its measured table `crates/pipeline/src/mixer_stage.bin`, and the GPU kernel's +`mixer_stage` in `crates/gpu/src/wgsl/finish.wgsl`. + +## What was wrong + +Up to V7 the mixer is a model: eight bands with smooth weights around fixed OkLCh hues, a hue rotation, a chroma +scale and a lightness change, linear in the slider, applied after the tone curves. Measured against Camera Raw on +fine colour charts: + +- **The bands sit in the wrong place.** V7 centres each band on the OkLab hue of the pure sRGB colour (Red 29, + Orange 82, Yellow 110, Green 142, Aqua 195, Blue 254, Purple 312, Magenta 335). Lightroom's Saturation +50 peaks + at 10, 50, 95, 140, 180, 255, 320 and 350 (5Β° bins). A red-orange such as skin or autumn leaves gets Lightroom's + Orange adjustment but V7's Red one. +- **The widths differ.** At half height Lightroom's Blue band is about 85Β° wide against V7's 59Β°, its Red and Magenta + bands about 20Β° against 54Β° and 39Β°. +- **The response is not linear.** Saturation +100 does 2.6 to 2.9 times what +50 does, Luminance +100 about 1.7 + times. At Β±100 Lightroom's Hue and Saturation sliders also move lightness, by up to 3 to 17 (OkLab L Γ— 100) + depending on the band. Its hue shift barely depends on the input's chroma (0.8 to 1.15 times between the lowest and + highest measured level), while V7 scales the shift by chroma up to 0.12, so a colour of chroma 0.04 gets a third. +- **The order differs.** Lightroom applies the mixer before the tone curves (below). + +## What V8 does + +After the tone map and V4's calibrated Contrast and Blacks, before the curve stage ([curve-stage.md](curve-stage.md)): + +1. Convert linear Rec.2020 to OkLCh. +2. Look up the response of every mixer slider that is set in Camera Raw's measured table: for the pixel's hue (72 + bins of 5Β°), chroma and lightness, the hue shift, the relative chroma change and the lightness change. The table + holds each slider at Β±25, Β±50, Β±75 and Β±100. Amounts in between are interpolated linearly, towards 0 below 25. + Hue is interpolated linearly. Chroma and lightness are interpolated bilinearly between the three measured levels + of each, and clamped outside them. Below the lowest measured chroma the lightness change fades out, so greys stay + grey. +3. All sliders act on the same input colour. Their hue and lightness changes add and their chroma changes multiply + (charts with several sliders at once: closer than adding). +4. Convert back to linear Rec.2020. + +V7's mixer in `ColorOps` is off under V8 (`ColorOps::mixer`), so the mixer applies once. With the mixer neutral the +stage does not run. Calibration, Saturation, Vibrance, Point Color, B&W and Colour Grading keep their V7 operators, +after the curves as before. + +## How it was measured + +`tools/lr_mixer_charts.py charts OUT_DIR` writes linear DNG charts of OkLCh patches (72 hues Γ— 3 chroma levels Γ— 3 +lightness levels, patches outside sRGB left out), with the settings in the DNG's XMP. It writes one neutral chart and +each band's Hue, Saturation and Luminance at each measured amount (193 charts). The charts are original test data. +Every chart was rendered through Camera Raw to a 16-bit Adobe RGB (1998) TIFF. Only that output is measured, and +nothing of Adobe's is copied or shipped. `tools/lr_mixer_charts.py table RENDER_DIR OUT_BIN` reads each render's +patches as OkLab, takes each setting's response against Camera Raw's own neutral chart, and writes +`mixer_stage.bin` (format in the tool's docstring: per row a scale and 72 signed bytes, 394 KB). It needs numpy and +tifffile (`tools/requirements-lr-tone-charts.txt`). Running the tool again reproduces the committed charts and the +committed table byte for byte. + +Camera Raw's neutral render desaturates bright colours: patches of one nominal chroma come out about three times +less chromatic at the top lightness level than at the bottom. The table therefore keeps chroma keys per lightness +level. Predicting Camera Raw's edited charts from its neutral chart with the stage's rules leaves 0.04 (Hue), 0.04 +(Saturation) and 0.10 (Luminance) OkLab Γ— 100, against average effects of 0.57, 0.51 and 1.27. That covers Β±10 too, +which the table does not hold. With one set of chroma keys for all lightness levels it leaves 0.07, 0.08 and 0.28. + +The order comes from separate check charts rendered while investigating: a strong curve together with mixer +settings. Predicting them from the single-setting renders leaves 1.17 (OkLab Γ— 100) with the mixer before the curves +and 1.66 with it after. Those check charts are not part of the tool. + +## Limits + +- Camera Raw's process version 2012 controls (`crs:ProcessVersion` 11.0), one chart layout, sRGB-gamut patches. More + saturated colours than the top measured chroma level take its response. +- Calibration is not measured in. Its measured response matched the charts better than V7's matrix, but made the + held-out photos worse (OkLab colour error 1.316 to 1.331), so V8 keeps V7's Calibration. +- Masks' Hue and Saturation keep the earlier operators. + +## Revision history + +| Date | Change | Summary | +|---|---|---| +| 2026-11-10 | minor | Process V8: the colour mixer measured against Lightroom, before the tone curves | diff --git a/docs/parity-checklist.md b/docs/parity-checklist.md index 436e7af1e5c..c41c74b8a65 100644 --- a/docs/parity-checklist.md +++ b/docs/parity-checklist.md @@ -196,7 +196,7 @@ differences and missing bindings are in [ui-parity.md](ui-parity.md#shortcuts). | LR-EDIT-COLOR-TINT | Tint | P0 | βœ… | `ctl:wb.tint`, `docs/tint-direction.md` | DNG / Lightroom sign: negative (left) adds green, positive (right) magenta; XMP `crs:Tint` values render as in Lightroom (issue #188); CPU/GPU regression tests | | LR-EDIT-COLOR-VIBRANCE | Vibrance | P0 | βœ… | `ctl:color.vibrance` | | | LR-EDIT-COLOR-SATURATION | Saturation | P0 | βœ… | `ctl:color.saturation` | | -| LR-EDIT-COLOR-MIXER-HSL | 8-band colour mixer | P0 | βœ… | `ctl:mixer.*` | no targeted (drag-on-image) mode | +| LR-EDIT-COLOR-MIXER-HSL | 8-band colour mixer | P0 | βœ… | `ctl:mixer.*`, `crates/pipeline/src/mixer_stage.rs` | from process V8 each slider follows Camera Raw's measured response on synthetic OkLCh charts (band centres, widths, the non-linear amount, side effects on lightness), applied before the tone curves ([mixer-stage.md](mixer-stage.md)); no targeted (drag-on-image) mode | | LR-EDIT-COLOR-MIXER-BW | B&W mix | P1 | βœ… | `ctl:bw.*`, `cmd:develop.autoBwMix` | eight bands; Auto pushes each hue band's colourful pixels away from the mean lightness (own rule) | | LR-EDIT-COLOR-POINTCOLOR | Point colour | P1 | βœ… | `cmd:pointColor.pick`, `cmd:pointColor.delete` | | | LR-EDIT-COLOR-GRADING | Colour grading wheels | P0 | βœ… | `ctl:grading.*`, `crates/ui-egui/src/panels/edit.rs` (`grading`) | 3-Way / Shadows / Midtones / Highlights tabs; a range tab shows one large wheel with Hue, Saturation and Luminance sliders; Blending and Balance in every tab; 3-Way shows the hovered wheel's hue and saturation; every wheel marks its neutral centre; wheel modifiers as in Lightroom: Shift-drag keeps the puck's hue and changes saturation only (the spoke is the guide; a puck at the centre has no hue, so it takes the angle where the pointer pressed), Cmd/Ctrl-drag keeps the saturation and changes hue only (the circle is the guide), Alt/Option-drag fine-adjusts at 0.1x and combines with either lock, and a hover tooltip lists them (issues #559, #1160; tests `shift_dragging_across_the_tangent_keeps_the_hue_and_moves_saturation`, `shift_drag_keeps_the_pucks_hue_wherever_the_pointer_grabs`, `cmd_drag_keeps_the_saturation_and_changes_only_the_hue`, `alt_drag_fine_adjusts_to_a_tenth_of_the_pointers_travel`, `alt_works_with_shift_and_cmd_constraints` in `crates/ui-egui/src/tests/grading.rs`); a wheel drag holds the pointer as in Lightroom: hidden while dragging (the puck follows the mouse's travel; on macOS the pointer is locked in place), back where the button went down on release, and given back at once on Esc, a lost window focus or a wheel that goes away mid-drag; the browser can't move the pointer, so there it only shows again where the drag ended (issue #1899; tests `a_held_wheel_follows_the_mouses_motion_not_where_the_pointer_sits`, `a_wheel_drag_hides_the_pointer_and_releasing_puts_it_back_where_it_was_pressed`, `escape_or_losing_focus_gives_the_pointer_back_mid_drag`, `a_wheel_that_goes_away_mid_drag_gives_the_pointer_back`); the large wheel adds 25/50/75 % saturation rings (issue #559); each wheel's eye hides its effect for viewing only (`RenderJob::with_hidden_grading`, not saved, export unaffected) (issue #737). No Global wheel tab yet | @@ -467,7 +467,7 @@ differences and missing bindings are in [ui-parity.md](ui-parity.md#shortcuts). | LR-BEHAV-OFFLINE | Offline editing | P1 | βœ… | | local-first: everything works offline | | LR-BEHAV-WEB-SAFETY | Library safety in the browser build | P1 | 🟑 | `cmd:file.backupLibrary`, `cmd:file.restoreLibrary`, `apps/lightcraft-web/src/safety.rs`, `apps/lightcraft-web/src/backup.rs`, `apps/lightcraft-web/src/files.rs` | web only (experimental): Back Up Library (zip of the catalog and every stored original) and a non-destructive Restore; failed saves show as unsaved and are retried; a photo that can't be stored isn't added; one tab per library (Web Locks); notices for storage that isn't persistent and for a library that can't open; `?reset` asks first; a panic shows a message. Missing: `?safe` start, deleting originals of removed photos, zip64 (backups > 4 GB) | | LR-BEHAV-GPU | GPU acceleration | P0 | βœ… | `crates/gpu/src/render.rs`, `cmd:app.gpu`, `docs/gpu-pipeline.md`, `crates/ui-egui/src/panels/notices.rs` | CPU fallback per render on device limits, out of memory, device errors / loss, incomplete or black results (`perf.gpuReason`, `perf.gpuFallback`; each render reports its own reason β€” `lightcraft_gpu::try_render`, `gpuFallback` per exported file β€” issue #675); short submissions for slow iGPUs; backend choice (DX12 only on Windows, `LIGHTCRAFT_GPU_BACKEND` / `WGPU_BACKEND`), device created after the window opens, crash sentinel (issue #136); a GPU lost while LightCraft runs (driver reset) stops it with that message and turns GPU rendering off for the next start, which says why (issue #1337; the window's renderer can't survive the lost device); quitting waits (up to 2 s) for renders in flight and starts no new GPU work, so none is inside the driver when the process exits (`crates/gpu/src/exit.rs`, issue #620; seen crashing only on Linux + NVIDIA, other drivers unverified); with GPU rendering on and no adapter found at all (e.g. no Vulkan loader on NixOS outside `nix develop`), the desktop app says once per session that it renders on the CPU and points to Help β–Έ System Info (`gpu_notice`; not when the GPU is turned off or only a software adapter exists); no tiling beyond the buffer limit (CPU) | -| LR-BEHAV-RENDER-FIDELITY | Rendering matches Lightroom | P1 | 🟑 | `crates/pipeline/src/lib.rs`, `crates/pipeline/src/tone.rs` | Process V4 calibrates global camera-look Contrast and Blacks against black-box Lightroom exports of Sony ILCE-7CR photos. Held-out response errors are 0.038 and 0.077 stops; V1/V2 keep their rendering. Whites retains V2 and awaits a follow-up. Exposure, Highlights/Shadows, other operators and broader camera coverage remain open (`docs/light-v3.md`). From process V8 Whites, the parametric curve and the point curves follow Camera Raw's measured response on synthetic grey steps, the master curve hue-preserving ([curve-stage.md](curve-stage.md)). From process V5 a raw's tone curve rolls off into white in stops (past a camera curve's last fitted knot, or from half a stop below the generic curve's white point instead of clipping), so Exposure +1 and +2 keep the highlights the sensor recorded: on 12 CC0 corpus raws and 6 CC0 DNGs on the generic curve, unclipped pixels whose luminance renders at 254 or more fall from up to 22.5 % to 0 at +1 EV and from up to 35 % to at most 0.03 % at +2 EV, apart from one sky that is mostly at the clip (#1632). Not compared with Lightroom's output | +| LR-BEHAV-RENDER-FIDELITY | Rendering matches Lightroom | P1 | 🟑 | `crates/pipeline/src/lib.rs`, `crates/pipeline/src/tone.rs` | Process V4 calibrates global camera-look Contrast and Blacks against black-box Lightroom exports of Sony ILCE-7CR photos. Held-out response errors are 0.038 and 0.077 stops; V1/V2 keep their rendering. Whites retains V2 and awaits a follow-up. Exposure, Highlights/Shadows, other operators and broader camera coverage remain open (`docs/light-v3.md`). From process V8 Whites, the parametric curve and the point curves follow Camera Raw's measured response on synthetic grey steps, the master curve hue-preserving ([curve-stage.md](curve-stage.md)). From V8 the colour mixer follows Camera Raw's measured response on synthetic colour charts ([mixer-stage.md](mixer-stage.md)); Calibration, Saturation, Vibrance and Colour Grading are not measured in yet. From process V5 a raw's tone curve rolls off into white in stops (past a camera curve's last fitted knot, or from half a stop below the generic curve's white point instead of clipping), so Exposure +1 and +2 keep the highlights the sensor recorded: on 12 CC0 corpus raws and 6 CC0 DNGs on the generic curve, unclipped pixels whose luminance renders at 254 or more fall from up to 22.5 % to 0 at +1 EV and from up to 35 % to at most 0.03 % at +2 EV, apart from one sky that is mostly at the clip (#1632). Not compared with Lightroom's output | | LR-BEHAV-DRAGDROP | Drag and drop | P1 | βœ… | `crates/ui-egui/src/lib.rs`, `crates/ui-egui/src/panels/grid.rs` (`drag_feedback`), `crates/ui-egui/src/panels/left.rs` (`drop_target`, `album_drag_over`, `top_level_drop_target`, `drag_auto_scroll`), `crates/ui-egui/src/destination.rs`, `crates/ui-egui/src/widgets.rs` (`context_menu`), `crates/ui-egui/src/widgets/text_field.rs`, `crates/ui-egui/src/tests/carried_right_click.rs`, `crates/ui-egui/src/tests/carried_text_field_menu.rs` | a right-click while photos are carried opens no context menu (every menu opened through `widgets::context_menu`: sidebar rows, grid cells, lists; a text field's own Cut / Copy / Paste menu too); files β†’ app (a drop-target card while they hover, then the import review); grid photos β†’ an album row (adds the selection, with a count badge while dragging); sidebar album / folder rows β†’ a folder (moves it; its name follows the pointer); a drag of albums or grid photos near the top or bottom edge of the sidebar scrolls it (faster nearer the edge, only while the pointer is over the sidebar); when another folder has the same name, the dragged label, the Move question and the toast name the folder it is in (`home (/a)`); an album drop's toast does the same for an album of that name in another album folder (two in the same place have nothing to tell them apart and keep the plain name); only the primary button drags photos and drops them: a right-button drag over a grid cell neither picks photos up nor changes the selection, and a right-button release while photos are dragged neither drops them nor ends the drag | | LR-BEHAV-TOAST | Toast notifications | P1 | βœ… | `crates/ui-egui/src/panels.rs` | | | LR-BEHAV-DIALOGS | Dialogs fit the window | P1 | βœ… | `crates/ui-egui/src/dialogs.rs` (`dialog_body`, `list_height`), `crates/ui-egui/src/tests/dialog_fit.rs`, `crates/ui-egui/src/tests/dialog_copy.rs`, `crates/ui-egui/src/tests/dialogs.rs` (`a_click_outside_closes_the_dialog_when_settings_allow_it`) | a dialog taller than the window (Export on a 1366Γ—768 screen, issue #781) never runs off it: its options scroll while the title bar and the Cancel / confirm row stay on screen (the confirm button names its action: Create, Rename, Create Stacks, Export 3 Photos…, with "OK" kept only for a one-field prompt opened with a command that has no verb, `crates/ui-egui/src/tests/dialog_copy.rs`); lists that scroll on their own (What's New, All Metadata, shortcuts, smart-album rules, credits) get shorter first; dialogs that fit look as before; Import keeps its own resizable, scrolling window; Settings β†’ Dialogs β†’ Close a dialog by clicking outside it (off by default, so a stray click never throws away a dialog's choices): a click pressed and released on the dimmed backdrop closes the dialog like Esc and doesn't reach the panels below, while a drag that ends outside (a slider pulled past the edge) or a click that closes a dropdown keeps it; the import review never closes this way (`clicked_backdrop`); a one-line prompt (Rename Folder, New Folder on Disk, the preset and version names, New Library when its name can't be used, Auto-Tag from Tracklog) the engine refuses stays open with its text and shows the reason in a toast, so the name can be corrected, where it used to close without a word; a New Folder on Disk that works says so (β€œCreated folder β€œSelects” in β€œ2026/Shoot””, naming the parent by its last two folders as dialogs do) | @@ -732,7 +732,7 @@ From `08-lightroom-classic-extras.md` (Classic-only features) and part 2 of `06- | LRC-DEV-CALIB | Calibration panel | P1 | βœ… | `ctl:calibration.*` | | | LRC-DEV-TAT | Targeted adjustment tools | P1 | βœ… | `cmd:develop.targeted` (`target`: curve / hue / sat / lum) | | | LRC-DEV-DEFAULTS | Per-camera raw defaults | P1 | βœ… | `cmd:library.preferences` (`camera`, `import.perCamera`), `crates/ui-egui/src/dialogs/settings.rs` | Settings β†’ Import: raw default and per-camera presets | -| LRC-DEV-PROCESS | Process versions, Update to Current Process | P1 | βœ… | `cmd:develop.updateProcess`, `cmd:develop.reset`, `cmd:develop.get`, `crates/develop/src/settings.rs`, `crates/pipeline/src/finish.rs`, `docs/process-versions.md` | Each photo keeps its saved rendering process. V1 is legacy, V2 preserves Highlights/Shadows detail, V3 is pixel-scale sharpening, V4 calibrates camera-look Contrast and Blacks, V5 rolls raw tone curves off into white in stops (#1632), V6 takes colour noise reduction to the joint method (#815), V7 draws film grain from crystal layers, V8 measures Whites and the tone curves against Lightroom and keeps hue through the master curve. New photos and Reset use the latest; Update is one undoable step and never downgrades a future number. Copy/paste/sync preserve the receiving process. Persistent render keys include the resolved process from V3 on; V1/V2 keys remain unchanged. | +| LRC-DEV-PROCESS | Process versions, Update to Current Process | P1 | βœ… | `cmd:develop.updateProcess`, `cmd:develop.reset`, `cmd:develop.get`, `crates/develop/src/settings.rs`, `crates/pipeline/src/finish.rs`, `docs/process-versions.md` | Each photo keeps its saved rendering process. V1 is legacy, V2 preserves Highlights/Shadows detail, V3 is pixel-scale sharpening, V4 calibrates camera-look Contrast and Blacks, V5 rolls raw tone curves off into white in stops (#1632), V6 takes colour noise reduction to the joint method (#815), V7 draws film grain from crystal layers, V8 measures Whites, the tone curves and the colour mixer against Lightroom and keeps hue through the master curve. New photos and Reset use the latest; Update is one undoable step and never downgrades a future number. Copy/paste/sync preserve the receiving process. Persistent render keys include the resolved process from V3 on; V1/V2 keys remain unchanged. | | LRC-DEV-VIEWOPTIONS | Develop view options | P2 | 🟑 | `cmd:view.viewOptions`, `crates/ui-egui/src/dialogs/settings.rs` (`view_options`) | View β–Έ View Options… (⌘J), the Loupe View part: Show Info Overlay with Info 1 / Info 2, and the three lines of each (none, file name, capture date, dimensions, exposure, camera, lens, camera + lens) with Use Defaults; Show Briefly When Photo Changes under each Info (one at most): with the overlay off, that Info shows for 3 s each time the loupe changes photo; General's Show message when loading or rendering photos (on by default; off, the loupe does not say "Rendering…"); applied as they change, saved with the app settings; `view.viewOptions {info1, info2, briefly, loupeMessages}` sets them for agents. Not yet: the Grid View tab, more fields (ratings, metadata, copy name), the video-frame option | | LRC-DEV-LOUPEOVERLAY | Loupe overlay: layout image | P2 | 🟑 | `cmd:view.chooseLayoutImage`, `cmd:view.layoutImage`, `cmd:view.layoutImageOpacity`, `cmd:view.layoutImageMatte`, `crates/ui-egui/src/panels/layout_overlay.rs` | View β–Έ Loupe Overlay: a PNG with transparency (a cover layout, a banner's safe areas) fitted and centred over the loupe photo, following zoom and pan; opacity and matte (the photo darkened outside the graphic's box) in steps; βŒ₯⌘O shows / hides it; read off the UI thread; saved with the UI state. Not yet: the Grid and Guides overlays, moving and resizing the layout with ⌘ held, free opacity / matte sliders | | LRC-DEV-VIDEO | Video frame capture | P2 | ⬜ | | | @@ -806,6 +806,7 @@ Latin stays upright. Advanced Japanese composition remains open. Regression cove | 2026-11-04 | minor | Compressed ORF support was introduced in #3775; subsequently withdrawn pending provenance review. Earlier clean-room and verification claims are withdrawn; compressed files use embedded previews when available. See [ORF status](orf-compression.md). | | 2026-10-28 | minor | KEY-HIDEPINS βœ… β†’ 🟑: in the Masking panel an unmodified H toggles the mask pins (`view.maskPins`, the View β–Έ Show Mask Pins switch) instead of opening Remove; the toggle yields only to an explicit assignment of H itself, a Remove key reassigned to anything else still opens Remove there, and outside Masking β€” and the full-screen preview, where no panel shows β€” H keeps its own binding (Remove, by default). Remove's spot pins keep ⇧H as their only hide toggle (`tests/keymap` `h_toggles_the_mask_pins_while_masking`, `a_remapped_remove_key_still_opens_remove_while_masking`, `h_still_toggles_the_pins_when_remove_moves_to_another_key`) | | 2026-11-10 | minor | LR-EDIT-LIGHT-WHITES, LR-EDIT-LIGHT-CURVE-PARAM, LR-EDIT-LIGHT-CURVE-POINT, LR-BEHAV-RENDER-FIDELITY, LRC-DEV-PROCESS: process V8 measures Whites and the parametric curve against Camera Raw and applies the master curve hue-preserving ([curve-stage.md](curve-stage.md)); statuses unchanged | +| 2026-11-10 | minor | LR-EDIT-COLOR-MIXER-HSL, LR-BEHAV-RENDER-FIDELITY, LRC-DEV-PROCESS: process V8 measures the colour mixer against Camera Raw and applies it before the tone curves ([mixer-stage.md](mixer-stage.md)); statuses unchanged | | 2026-11-07 | minor | LR-EDIT-EFFECTS-GRAIN, LRC-DEV-PROCESS: process V7 takes film grain to crystal layers ([grain.md](grain.md)); V1 to V6 keep value noise | | 2026-11-06 | minor | LR-EDIT-DETAIL-CNR, LRC-DEV-PROCESS: process V6 takes colour noise reduction to the joint method on linear Rβˆ’Y / Bβˆ’Y (issue #815); status unchanged | | 2026-11-05 | minor | LR-BEHAV-RENDER-FIDELITY, LRC-DEV-PROCESS: process V5 rolls a raw's tone curve off into white in stops, past a camera curve's last knot and from half a stop below the generic curve's white point, so raising Exposure no longer turns recorded highlights white (#1632); statuses and counts unchanged | diff --git a/docs/process-versions.md b/docs/process-versions.md index ab2a16b977a..a44fa949aa4 100644 --- a/docs/process-versions.md +++ b/docs/process-versions.md @@ -16,7 +16,7 @@ stronger Light sliders, issue #196) without changing a single photo someone has | **V5** | V4 plus: a raw's tone curve rolls off into white in stops instead of reaching it within about a stop of the sensor's white, so raising Exposure keeps the highlights the sensor recorded (issue #1632). **Camera curve** (the look fitted to the embedded JPEG, or a DNG's `ProfileToneCurve`; `CameraTone`): past its last knot `CameraTone::apply_rolloff` closes the gap to white by `gap / (1 + cΒ·(2^t βˆ’ 1))` at `t` stops past the knot, with `c` matching the curve's slope there and the gap halving every stop in the end (`tone::ROLLOFF_STOPS`); `ToneMap::camera_rolloff_hdr` builds the table from it. Under V1 to V4 the curve past its last knot (fitted only to camera JPEG tones below 0.85, so 1 to 3 stops below the sensor's white on most photos) closes on white exponentially in linear light: the sensor's white renders at 8-bit 246 to 254 at Exposure 0 and 254 to 255 from Exposure +1. On the 11 CC0 corpus files with a fitted look (8 Sony, 2 Nikon, 1 Fujifilm) it now renders at 239 to 250 at Exposure 0 and 247 to 253 at +1. A DNG curve that reaches white at the sensor's white renders as before. **Generic curve** (raws without a camera curve, `ToneMap::rolloff_hdr`): from half a stop below its white point (`tone::GENERIC_KNEE_STOPS`) the same shoulder takes over, with the extended Reinhard curve's value and slope at the join, where V1 to V4 clip at the white point (scene 1.18 at default settings, ΒΌ stop above the sensor's white). The sensor's white renders at about 235, 248 and 252 at Exposure 0, +1 and +2 (V1 to V4: 239, 255, 255; the CC0 Canon R8 file and 6 CC0 DNGs without a camera curve). Content past the old clip point, such as a clipped sky, now renders up to 15 codes below white at Exposure 0 and reaches 255 about 5 stops past the sensor's white. Below the last knot or the join, JPEGs and other display-referred sources, and the camera fit itself are unchanged; CPU and GPU share the tone LUT. | | **V6** | V5 plus: colour noise reduction filters the linear colour differences Rβˆ’Y and Bβˆ’Y with the joint method (issue #815, `docs/nr-color-joint.md`): edge-aware weights from a denoised guide shared by both differences, anisotropic diffusion over scales, a brake for isolated colour specks; Y is kept exactly. V1 to V5 keep the blurred chromaticity (`local::denoise`). CPU (`local::denoise`) and GPU (`render::denoise`) branch on `local::joint_colour_nr`. Renders with Color 0 are the same as V2's. | | **V7** | V6 plus: film grain from crystal layers ([grain.md](grain.md), `crates/pipeline/src/crystal.rs`), after AurΓ©lien Pierre's model: resolution independent (a preview is the export's grain box-downscaled), fading out at black and white, calibrated to Lightroom Classic's strength and width at mid grey. V1 to V6 keep their two-octave value noise exactly (`finish::ValueGrain`; on the GPU `F_GRAIN_MODEL` 0); `finish::GrainModel::new` picks the model per process. Renders without grain don't depend on this. | -| **V8** (the latest) | V7 plus: Whites, the parametric curve and the point curves as Lightroom applies them ([curve-stage.md](curve-stage.md), `crates/pipeline/src/curve_stage.rs`), measured on Camera Raw renders of synthetic grey steps. Whites leaves the tone map and, with the parametric curve, comes from measured tables (Whites reaches into the midtones; the regions are broad and add); the master curve acts hue-preserving on sRGB-encoded linear ProPhoto RGB (largest and smallest channel through the curve, the middle one in proportion in linear light), then the red, green and blue curves per channel, between the calibrated Contrast and Blacks and the colour stage. V1 to V7 keep Whites in the tone map and their per-channel curves on the output. CPU (`finish::finish_with`) and GPU (`finish.wgsl::curve_stage`) share the tables. Renders with Whites, the parametric curve and the point curves neutral are V7's. | +| **V8** (the latest) | V7 plus: Whites, the parametric curve and the point curves as Lightroom applies them ([curve-stage.md](curve-stage.md), `crates/pipeline/src/curve_stage.rs`), measured on Camera Raw renders of synthetic grey steps. Whites leaves the tone map and, with the parametric curve, comes from measured tables (Whites reaches into the midtones; the regions are broad and add); the master curve acts hue-preserving on sRGB-encoded linear ProPhoto RGB (largest and smallest channel through the curve, the middle one in proportion in linear light), then the red, green and blue curves per channel, between the calibrated Contrast and Blacks and the colour stage. V1 to V7 keep Whites in the tone map and their per-channel curves on the output. CPU (`finish::finish_with`) and GPU (`finish.wgsl::curve_stage`) share the tables. Renders with Whites, the parametric curve and the point curves neutral are V7's. The colour mixer follows Camera Raw's measured response on synthetic OkLCh charts ([mixer-stage.md](mixer-stage.md), `crates/pipeline/src/mixer_stage.rs`): per band and slider the hue shift, chroma change and lightness change by input hue, chroma and lightness, applied before the tone curves; V1 to V7 keep their mixer model after the curves (`ColorOps::mixer`). | ## The rule @@ -113,6 +113,7 @@ extra field and retain their existing cached renders. No cache-version bump is n | Date | Change | Summary | |---|---|---| | 2026-11-10 | minor | V8: Whites and the tone curves measured against Lightroom ([curve-stage.md](curve-stage.md)); V1 to V7 keep theirs | +| 2026-11-10 | minor | V8: the colour mixer measured against Lightroom, before the tone curves ([mixer-stage.md](mixer-stage.md)); V1 to V7 keep theirs | | 2026-11-07 | minor | V7: film grain from crystal layers ([grain.md](grain.md)); V1 to V6 keep their value noise | | 2026-11-05 | minor | V5: a raw's tone curve rolls off into white in stops, so raising Exposure keeps recorded highlights (#1632) | | 2026-10-12 | minor | Calibrated Contrast and Blacks, V2 Whites, resolved-process cache keys and number coordination | diff --git a/docs/whats-new.md b/docs/whats-new.md index 4e7ca2c0d23..2aed03bed06 100644 --- a/docs/whats-new.md +++ b/docs/whats-new.md @@ -2,6 +2,13 @@ ## Unreleased +### The colour mixer behaves as in Lightroom (process V8) +- Each band of the colour mixer now covers the colours Lightroom's does (a red-orange such as skin answers to + Orange, Blue reaches further towards aqua and purple), and Hue, Saturation and Luminance follow Lightroom's + measured response, including how strongly they act at large amounts. The mixer works before the tone curves, as in + Lightroom. This is part of rendering process 8: photos you already edited keep their look until you choose + Photo β–Έ Update to Current Process. See [The colour mixer](mixer-stage.md). + ### Whites and the tone curves behave as in Lightroom (process V8) - Whites now reaches into the upper midtones as Lightroom's does, and the Highlights, Lights, Darks and Shadows regions of the parametric curve are as broad as Lightroom's and add up the same way: both follow Lightroom's diff --git a/tools/lr_mixer_charts.py b/tools/lr_mixer_charts.py new file mode 100644 index 00000000000..c3e7a5a7f09 --- /dev/null +++ b/tools/lr_mixer_charts.py @@ -0,0 +1,174 @@ +#!/usr/bin/env python3 +"""Measure Lightroom's colour mixer on synthetic colour charts (process V8, docs/mixer-stage.md). + + python3 tools/lr_mixer_charts.py charts OUT_DIR + Writes linear DNG charts (OkLCh patches: 72 hues x 3 chroma x 3 lightness levels) with the settings embedded + as XMP: one neutral chart and every mixer band's Hue, Saturation and Luminance at -100, -75, -50, -25, 25, + 50, 75 and 100. + (render every DNG through Camera Raw to a 16-bit Adobe RGB (1998) TIFF with the same file name) + python3 tools/lr_mixer_charts.py table RENDER_DIR OUT_BIN + Reads the renders and writes the response table of `lightcraft_pipeline::mixer_stage` (format below). + +The charts are original test data generated here; nothing in them comes from Adobe. Only Camera Raw's output is +measured. Requires numpy and tifffile (tools/requirements-lr-tone-charts.txt). + +Table format, little-endian: b"LCCS", u32 version 1, u32 sliders, amounts, rows per amount (9), outputs (3), hue +bins (72); f32 amounts; f32 chroma levels (3 per lightness level, 9); f32 lightness levels (3). Then for each slider, amount, lightness +level, chroma level and output: f32 scale and 72 i8 (value = scale x i8). Outputs per OkLab hue bin (5 degrees): +hue shift in degrees, relative chroma change, lightness change. +""" +import json +import os +import struct +import sys + +import numpy as np + +sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) +from lr_tone_charts import ADOBE_TO_XYZ, H, W, write_dng, xmp # noqa: E402 + +CELL = 60 +BANDS = ("Red", "Orange", "Yellow", "Green", "Aqua", "Blue", "Purple", "Magenta") +MIXER = (("Hue", "HueAdjustment"), ("Sat", "SaturationAdjustment"), ("Lum", "LuminanceAdjustment")) +AMOUNTS = (-100, -75, -50, -25, 25, 50, 75, 100) +LIGHTNESS = (0.45, 0.62, 0.78) +CHROMA = (0.04, 0.08, 0.13) +HUES = 72 + +# OkLab (Ottosson): XYZ (D65) -> LMS, cube root, -> Lab +M1 = np.array([[0.8189330101, 0.3618667424, -0.1288597137], [0.0329845436, 0.9293118715, 0.0361456387], + [0.0482003018, 0.2643662691, 0.6338517070]]) +M2 = np.array([[0.2104542553, 0.793617785, -0.0040720468], [1.9779984951, -2.428592205, 0.4505937099], + [0.0259040371, 0.7827717662, -0.808675766]]) +SRGB_TO_XYZ = np.array([[0.4124564, 0.3575761, 0.1804375], [0.2126729, 0.7151522, 0.0721750], [0.0193339, 0.1191920, 0.9503041]]) + + +def chart(): + """OkLCh patches, hue in 5 degree steps x 3 chroma x 3 lightness levels; patches outside sRGB are left out.""" + m2i, m1i, x2s = np.linalg.inv(M2), np.linalg.inv(M1), np.linalg.inv(SRGB_TO_XYZ) + cols = W // CELL + img = np.full((H, W, 3), 0.18) + patches = [] + for lightness in LIGHTNESS: + for chroma in CHROMA: + for hue in range(0, 360, 360 // HUES): + i = len(patches) + x, y = (i % cols) * CELL, (i // cols) * CELL + h = np.radians(hue) + c = x2s @ (m1i @ ((m2i @ np.array([lightness, chroma * np.cos(h), chroma * np.sin(h)])) ** 3)) + ok = bool(np.all(c >= 0) and np.all(c <= 1)) + if ok: + img[y + 6:y + CELL - 6, x + 6:x + CELL - 6] = c + patches.append(dict(y=y + 6, x=x + 6, w=CELL - 12, h=CELL - 12, L=lightness, C=chroma, hue=hue, ok=ok)) + return img, patches + + +def sliders(): + """(chart name stem, XMP key) per slider, in the table's order: mixer bands x (Hue, Sat, Lum).""" + return [(f"mix_{b}{p}", k + b) for b in BANDS for p, k in MIXER] + + +def variants(): + v = {"neutral": {}} + for stem, key in sliders(): + for a in AMOUNTS: + v[f"{stem}{a:+d}"] = {key: a} + return v + + +# ---- table -------------------------------------------------------------------------------------------------- + +def oklab_patches(path, patches): + """Mean colour of each in-gamut patch of a Camera Raw render, as OkLab.""" + import tifffile + a = tifffile.imread(path).astype(np.float64) + a /= 65535.0 if a.max() > 255 else 255.0 + out = [] + for q in patches: + rgb = a[q["y"] + 10:q["y"] + q["h"] - 10, q["x"] + 10:q["x"] + q["w"] - 10].reshape(-1, 3).mean(0) + xyz = ADOBE_TO_XYZ @ (np.clip(rgb, 0, 1) ** (563 / 256)) + out.append(M2 @ np.cbrt(M1 @ xyz)) + return np.array(out) + + +def by_hue(hue, values): + """Mean of `values` per 5 degree hue bin, bins without a patch interpolated around the circle; and which bins had one.""" + bins = np.arange(0, 360, 360 // HUES) + centres, means, have = [], [], np.zeros(HUES, bool) + for i, b in enumerate(bins): + k = ((hue - b + 2.5) % 360) < 5 + if k.any(): + centres.append(b) + means.append(values[k].mean(0)) + have[i] = True + centres, means = np.array(centres, float), np.array(means) + return np.stack([np.interp(bins, centres, means[:, o], period=360) for o in range(3)], 1), have + + +def response(lab0, lab, light, chroma): + """Hue shift (degrees), relative chroma change and lightness change of each chart setting against neutral, + per lightness and chroma level and hue bin: shape (9, 3, 72).""" + hue0 = np.degrees(np.arctan2(lab0[:, 2], lab0[:, 1])) % 360 + c0 = np.hypot(lab0[:, 1], lab0[:, 2]) + hue = np.degrees(np.arctan2(lab[:, 2], lab[:, 1])) % 360 + r = np.stack([(hue - hue0 + 180) % 360 - 180, np.hypot(lab[:, 1], lab[:, 2]) / c0 - 1, lab[:, 0] - lab0[:, 0]], 1) + out = np.zeros((9, 3, HUES)) + for ci, cv in enumerate(CHROMA): + m = chroma == cv + base, _ = by_hue(hue0[m], r[m]) + for li, lv in enumerate(LIGHTNESS): + m2 = m & (light == lv) + if m2.sum() < 6: + out[li * 3 + ci] = base.T + continue + c, have = by_hue(hue0[m2], r[m2]) + # hue bins without an in-gamut patch at this lightness: blend smoothly towards the all-lightness curve + w = np.convolve(np.r_[have[-3:], have, have[:3]].astype(float), np.ones(7) / 7, "same")[3:-3] + out[li * 3 + ci] = (c * w[:, None] + base * (1 - w[:, None])).T + return out + + +def table(render_dir, out_bin): + patches = [p for p in json.load(open(os.path.join(render_dir, "manifest.json")))["patches"] if p["ok"]] + tif = lambda n: os.path.join(render_dir, f"mixer__{n}.tif") + lab0 = oklab_patches(tif("neutral"), patches) + light = np.array([p["L"] for p in patches]) + chroma = np.array([p["C"] for p in patches]) + c0 = np.hypot(lab0[:, 1], lab0[:, 2]) + # Camera Raw's neutral render desaturates bright colours, so each lightness level has its own chroma keys + chroma_levels = [] + for v in LIGHTNESS: + for c in CHROMA: + m = (light == v) & (chroma == c) + chroma_levels.append(float(c0[m].mean() if m.sum() else c0[chroma == c].mean())) + light_levels = [float(lab0[light == v, 0].mean()) for v in LIGHTNESS] + names = sliders() + out = bytearray(b"LCCS" + struct.pack("<6I", 1, len(names), len(AMOUNTS), 9, 3, HUES)) + out += struct.pack(f"<{len(AMOUNTS)}f", *AMOUNTS) + struct.pack("<9f", *chroma_levels) + struct.pack("<3f", *light_levels) + for stem, _ in names: + for a in AMOUNTS: + t = response(lab0, oklab_patches(tif(f"{stem}{a:+d}"), patches), light, chroma) + for row in t.reshape(-1, HUES): + scale = float(np.abs(row).max()) / 127.0 + q = np.zeros(HUES) if scale == 0 else np.round(row / scale) + out += struct.pack(" Date: Tue, 10 Nov 2026 22:57:23 +0100 Subject: [PATCH 03/51] LR-EDIT-COLOR-GRADING: process V8, Colour Grading measured against Lightroom (#523) The grading wheels follow Camera Raw's measured response on synthetic charts (tools/lr_grading_charts.py, crates/pipeline/src/grading_stage_tables.rs): per wheel an OkLab tint by hue and saturation, a lightness profile by Blending and Balance, a damping for colours already leaning the tint's way, and Luminance as a lightness change. It replaces V7's grading at the end of the colour tools; CPU and GPU share the resolved wheels. V1 to V7 are unchanged (docs/grading-stage.md, docs/process-versions.md). --- crates/gpu/src/params.rs | 16 ++ crates/gpu/src/wgsl/finish.wgsl | 48 ++++ crates/gpu/tests/it/equivalence.rs | 30 +++ crates/pipeline/src/colorops.rs | 16 +- crates/pipeline/src/grading_stage.rs | 277 ++++++++++++++++++++ crates/pipeline/src/grading_stage_tables.rs | 188 +++++++++++++ crates/pipeline/src/lib.rs | 3 + docs/gaps.md | 2 +- docs/grading-stage.md | 85 ++++++ docs/parity-checklist.md | 7 +- docs/process-versions.md | 3 +- docs/whats-new.md | 8 + tools/lr_grading_charts.py | 226 ++++++++++++++++ tools/requirements-lr-tone-charts.txt | 3 +- 14 files changed, 904 insertions(+), 8 deletions(-) create mode 100644 crates/pipeline/src/grading_stage.rs create mode 100644 crates/pipeline/src/grading_stage_tables.rs create mode 100644 docs/grading-stage.md create mode 100644 tools/lr_grading_charts.py diff --git a/crates/gpu/src/params.rs b/crates/gpu/src/params.rs index 520f5b99d14..8c52554c77a 100644 --- a/crates/gpu/src/params.rs +++ b/crates/gpu/src/params.rs @@ -28,6 +28,8 @@ const FIELDS: &[(&str, usize)] = &[ ("STAGE_REFINE", 1), ("MSTAGE", 1), ("MSTAGE_OFF", 1), + ("MGRADE", 1), + ("MGRADE_OFF", 1), ("GAIN", 1), ("EV", 1), ("AIR", 1), @@ -226,6 +228,17 @@ pub fn finish_block(fp: &FinishParams, masks: &[[f32; MASK_TERMS]], present: &Pr aux.extend_from_slice(&cs.light); aux.extend_from_slice(&cs.table[..]); } + // process V8's Colour Grading: the Luminance curve, then per wheel its tint, damping and profile + let mgrade_off = aux.len(); + let mgrade = fp.ops.measured_grading.as_ref(); + if let Some(g) = mgrade { + aux.extend_from_slice(&g.lum); + for w in &g.wheels { + aux.extend_from_slice(&w.tint); + aux.extend(w.damping.iter().flatten()); + aux.extend_from_slice(&w.profile); + } + } let mask_off = aux.len(); for m in masks { aux.extend_from_slice(m); @@ -276,6 +289,9 @@ pub fn finish_block(fp: &FinishParams, masks: &[[f32; MASK_TERMS]], present: &Pr p.f("STAGE_REFINE", fp.curve_stage.as_ref().map_or(1.0, |c| c.refine)); p.b("MSTAGE", fp.mixer_stage.is_some()); p.u("MSTAGE_OFF", mstage_off as u32); + // 0: off, else 1 + the number of wheels with a tint + p.u("MGRADE", mgrade.map_or(0, |g| 1 + g.wheels.len() as u32)); + p.u("MGRADE_OFF", mgrade_off as u32); p.f("REFINE_SAT", fp.refine_sat); p.f("GAIN", fp.gain); p.f("EV", fp.ev); diff --git a/crates/gpu/src/wgsl/finish.wgsl b/crates/gpu/src/wgsl/finish.wgsl index 50953fca921..8342b941362 100644 --- a/crates/gpu/src/wgsl/finish.wgsl +++ b/crates/gpu/src/wgsl/finish.wgsl @@ -372,9 +372,57 @@ fn color_ops(rgb: vec3, local_sat: f32, local_hue: f32) -> vec3 { lab.x += pf(F_WHEELS + 3u * k + 2u) * wt; } } + if (pu(F_MGRADE) != 0u) { + lab = measured_grade(lab); + } return oklab_inv(lab); } +// `grading_stage` lightness grid (65 entries at `o`), clamped. +fn mgrade_grid(o: u32, l: f32) -> f32 { + let p = clamp(l, 0.0, 1.0) * 64.0; + let i = min(u32(p), 63u); + return aux[o + i] + (aux[o + i + 1u] - aux[o + i]) * (p - f32(i)); +} + +// `GradingStage::apply`: each wheel's damped tint by its lightness profile, then the Luminance curve. +fn measured_grade(lab: vec3) -> vec3 { + let off = pu(F_MGRADE_OFF); + let n = pu(F_MGRADE) - 1u; + let c = sqrt(lab.y * lab.y + lab.z * lab.z); + // atan2(0, 0) is undefined in WGSL; the CPU's gives 0 + let hue = select(atan2(lab.z, lab.y), 0.0, c == 0.0); + var out = lab; + for (var k = 0u; k < n; k++) { + let w = off + 65u + k * 85u; + let p = mgrade_grid(w + 20u, lab.x); + if (p == 0.0) { + continue; + } + let ta = aux[w]; + let tb = aux[w + 1u]; + let diff = abs(wrap_angle(hue - atan2(tb, ta))); + let bin = min(u32(diff * 57.29577951308232 / 30.0), 5u); + // the damping's chroma levels (`grading_stage_tables::CHROMA`) + var damp = 1.0; + if (c <= 0.04) { + damp = 1.0 + (aux[w + 2u + bin] - 1.0) * c / 0.04; + } else if (c <= 0.08) { + let f = (c - 0.04) / 0.04; + damp = aux[w + 2u + bin] * (1.0 - f) + aux[w + 8u + bin] * f; + } else if (c <= 0.12) { + let f = (c - 0.08) / 0.04; + damp = aux[w + 8u + bin] * (1.0 - f) + aux[w + 14u + bin] * f; + } else { + damp = aux[w + 14u + bin]; + } + out.y += p * ta * damp; + out.z += p * tb * damp; + } + out.x = max(lab.x + mgrade_grid(off, lab.x), 0.0); + return out; +} + // `colorops::calibrate`: primaries matrix, then the shadows tint (luminance kept). fn calibrate(c0: vec3) -> vec3 { var c = c0; diff --git a/crates/gpu/tests/it/equivalence.rs b/crates/gpu/tests/it/equivalence.rs index db0e19a183a..e617ecb262b 100644 --- a/crates/gpu/tests/it/equivalence.rs +++ b/crates/gpu/tests/it/equivalence.rs @@ -879,6 +879,36 @@ fn mixer_stage_matches() { check("V8 colour stage, B&W", &src, &raw, &s, &req); } +/// Process V8's measured Colour Grading matches the CPU's: single wheels, all four with Blending and Balance, +/// Luminance only, and together with the mixer stage, the curves and B&W. +#[test] +fn grading_stage_matches() { + if !gpu() { + return; + } + let src = scene(0, 960, 640); + let raw = SourceInfo { raw: true, ..Default::default() }; + let req = RenderRequest::fit(720, 720); + let v8 = || DevelopSettings { process: Process::V8.version(), ..Default::default() }; + let mut s = v8(); + s.grading.shadows = lightcraft_develop::Wheel { hue: 210.0, sat: 40.0, lum: 0.0 }; + check("V8 shadows wheel", &src, &raw, &s, &req); + s.grading.midtones = lightcraft_develop::Wheel { hue: 45.0, sat: 22.0, lum: -20.0 }; + s.grading.highlights = lightcraft_develop::Wheel { hue: 46.0, sat: 80.0, lum: 30.0 }; + s.grading.global = lightcraft_develop::Wheel { hue: 300.0, sat: 15.0, lum: 10.0 }; + s.grading.blending = 70.0; + s.grading.balance = -35.0; + check("V8 four wheels", &src, &raw, &s, &req); + let mut l = v8(); + l.grading.highlights.lum = -60.0; + check("V8 grading Luminance only", &src, &raw, &l, &req); + s.mixer.orange.sat = 40.0; + s.curve.master = vec![Point { x: 0.0, y: 0.05 }, Point { x: 0.5, y: 0.6 }, Point { x: 1.0, y: 0.95 }]; + check("V8 grading, mixer, curves", &src, &raw, &s, &req); + s.treatment = lightcraft_develop::Treatment::Bw; + check("V8 grading, B&W", &src, &raw, &s, &req); +} + /// Issue #632: the Highlights / Shadows base of each process (V1: the edge-aware filter of log /// luminance; V2: of its fine median, a radius that grows with the render) matches the CPU's, and /// a warm cache never hands one process the other's base. diff --git a/crates/pipeline/src/colorops.rs b/crates/pipeline/src/colorops.rs index e6e25f4a5a1..d07912624e0 100644 --- a/crates/pipeline/src/colorops.rs +++ b/crates/pipeline/src/colorops.rs @@ -144,6 +144,8 @@ pub struct ColorOps { pub grading: Option<([WheelK; 4], f32, f32)>, /// OkLCh hue of skin tones (protected by vibrance). pub skin: f32, + /// Process V8's Colour Grading, measured against Lightroom (`grading` is `None` from V8 on). + pub measured_grading: Option, } fn wheel(w: &lightcraft_develop::Wheel) -> WheelK { @@ -170,7 +172,7 @@ impl ColorOps { s.point_colors.iter().take(lightcraft_develop::MAX_POINT_COLORS).filter(|p| !p.is_neutral()).map(PointK::new).collect() }, bw: crate::is_bw(s).then(|| s.bw_mix.bands().map(|v| (v / 100.0) as f32)), - grading: (!g.is_neutral()).then(|| { + grading: (!g.is_neutral() && s.process.process() < lightcraft_develop::Process::V8).then(|| { ( [wheel(&g.shadows), wheel(&g.midtones), wheel(&g.highlights), wheel(&g.global)], (g.blending / 100.0) as f32, @@ -178,11 +180,18 @@ impl ColorOps { ) }), skin: oklch_hue_of_srgb_hue(25.0), + measured_grading: crate::grading_stage::GradingStage::new(s), } } pub fn is_identity(&self) -> bool { - self.vibrance == 0.0 && self.saturation == 0.0 && !self.mixer && self.points.is_empty() && self.bw.is_none() && self.grading.is_none() + self.vibrance == 0.0 + && self.saturation == 0.0 + && !self.mixer + && self.points.is_empty() + && self.bw.is_none() + && self.grading.is_none() + && self.measured_grading.is_none() } /// `local_sat` (βˆ’1..1) and `local_hue` (radians) come from masks. @@ -251,6 +260,9 @@ impl ColorOps { /// Colour grading on OkLab, then back to linear Rec.2020. #[inline] fn grade(&self, mut lab: [f32; 3]) -> [f32; 3] { + if let Some(g) = &self.measured_grading { + return oklab_to_2020(g.apply(lab)); + } if let Some((wheels, blending, balance)) = &self.grading { let m = 0.5 - balance * 0.25; let width = 0.15 + blending * 0.5; diff --git a/crates/pipeline/src/grading_stage.rs b/crates/pipeline/src/grading_stage.rs new file mode 100644 index 00000000000..6ced6892cdb --- /dev/null +++ b/crates/pipeline/src/grading_stage.rs @@ -0,0 +1,277 @@ +//! Process V8's Colour Grading ([`lightcraft_develop::Process::V8`], `docs/grading-stage.md`), applied the way +//! Lightroom applies it. +//! +//! Measured on Camera Raw renders of synthetic charts (`tools/lr_grading_charts.py`, tables in +//! `grading_stage_tables`). Per wheel (shadows, midtones, highlights, global): +//! - an OkLab tint (a, b) by wheel hue (12 steps of 30Β°) and saturation (25, 50, 100); +//! - a lightness profile, the share of the tint each lightness gets, by Blending and Balance. Lightroom's shadows +//! wheel reaches well into the midtones and its global wheel peaks in the midtones; +//! - a damping: colours that already lean the tint's way get less of it (55 to 87% for saturated colours in the same +//! direction), by their chroma and the angle between their hue and the tint's; +//! - the wheel's Luminance as a lightness change by lightness. +//! +//! The wheels act on the same input colour and their changes add. The stage replaces V7's grading at the end of +//! [`crate::colorops::ColorOps`], in the same place. + +use lightcraft_develop::{ColorGrading, DevelopSettings, Process, Wheel}; + +use crate::grading_stage_tables as t; + +/// Lightness grid entries (0 to 1). +pub const GRID: usize = 65; + +/// One active wheel, resolved for a render. +#[derive(Clone, Debug)] +pub struct WheelStage { + /// OkLab (a, b) at full share. + pub tint: [f32; 2], + /// Share of the tint by lightness. + pub profile: [f32; GRID], + /// Share by chroma level and angle bin (see [`t::DAMPING`]). + pub damping: [[f32; 6]; 3], +} + +#[derive(Clone, Debug)] +pub struct GradingStage { + /// Wheels with a saturation above 0. + pub wheels: Vec, + /// Every wheel's Luminance together: the lightness change by lightness. + pub lum: [f32; GRID], +} + +/// `v` on a lightness grid, linear, clamped to 0..1. +fn on_grid(v: &[f32; GRID], l: f32) -> f32 { + let p = l.clamp(0.0, 1.0) * (GRID - 1) as f32; + let i = (p as usize).min(GRID - 2); + match (v.get(i), v.get(i + 1)) { + (Some(a), Some(b)) => a + (b - a) * (p - i as f32), + _ => 0.0, + } +} + +/// (lower index, upper index, weight of the upper) of `x` in the sorted `keys`, clamped. +fn bracket(keys: &[f32], x: f32) -> (usize, usize, f32) { + let n = keys.len(); + match (keys.first(), keys.last()) { + (Some(lo), Some(hi)) if n >= 2 && x > *lo => { + if x >= *hi { + return (n - 1, n - 1, 0.0); + } + let i = keys.windows(2).position(|w| x <= w[1]).unwrap_or(0); + (i, i + 1, (x - keys[i]) / (keys[i + 1] - keys[i])) + } + _ => (0, 0, 0.0), + } +} + +fn lerp_grid(a: &[f32; GRID], b: &[f32; GRID], f: f32) -> [f32; GRID] { + std::array::from_fn(|i| a[i] * (1.0 - f) + b[i] * f) +} + +/// The tint of wheel `w` at `hue` (degrees) and `sat` (0..100): linear in hue around the circle, and in saturation +/// from none at 0 through the measured saturations. +fn tint(w: usize, hue: f32, sat: f32) -> [f32; 2] { + let Some(table) = t::TINT.get(w) else { return [0.0; 2] }; + let n = t::HUES.len(); + let step = 360.0 / n as f32; + let h = hue.rem_euclid(360.0); + let i = (h / step) as usize % n; + let fh = h / step - (h / step).floor(); + let at = |hi: usize| -> [f32; 2] { + let s = sat.clamp(0.0, t::SATS[t::SATS.len() - 1]); + let row = &table[hi % n]; + let k = t::SATS.iter().position(|v| s <= *v).unwrap_or(t::SATS.len() - 1); + let (s0, v0) = if k == 0 { (0.0, [0.0; 2]) } else { (t::SATS[k - 1], row[k - 1]) }; + let (s1, v1) = (t::SATS[k], row[k]); + let f = if s1 > s0 { (s - s0) / (s1 - s0) } else { 1.0 }; + [v0[0] + (v1[0] - v0[0]) * f, v0[1] + (v1[1] - v0[1]) * f] + }; + let (a, b) = (at(i), at(i + 1)); + [a[0] * (1.0 - fh) + b[0] * fh, a[1] * (1.0 - fh) + b[1] * fh] +} + +/// The share of wheel `w`'s tint by lightness: the Blending profile, shifted by Balance (not for the global wheel). +fn profile(w: usize, blending: f32, balance: f32) -> [f32; GRID] { + let (Some(pb), Some(pa)) = (t::PROFILE_BLEND.get(w), t::PROFILE_BALANCE.get(w)) else { return [0.0; GRID] }; + let (b0, b1, fb) = bracket(&t::BLENDS, blending); + let blend = lerp_grid(&pb[b0], &pb[b1], fb); + if w == 3 { + return blend.map(|v| v.max(0.0)); + } + let (a0, a1, fa) = bracket(&t::BALANCES, balance); + let bal = lerp_grid(&pa[a0], &pa[a1], fa); + let zero = t::BALANCES.iter().position(|v| *v == 0.0).unwrap_or(0); + std::array::from_fn(|i| (blend[i] + bal[i] - pa[zero][i]).max(0.0)) +} + +/// Wheel `w`'s Luminance `v` as a lightness change by lightness (measured at Β±50 and Β±100, 0 in between). +fn luminance(w: usize, v: f32) -> [f32; GRID] { + let Some(table) = t::LUM.get(w) else { return [0.0; GRID] }; + let mut keys: Vec<(f32, Option<&[f32; GRID]>)> = t::LUMS.iter().zip(table.iter()).map(|(a, c)| (*a, Some(c))).collect(); + keys.push((0.0, None)); + keys.sort_by(|a, b| a.0.total_cmp(&b.0)); + let amounts: Vec = keys.iter().map(|k| k.0).collect(); + let (i0, i1, f) = bracket(&amounts, v); + let zero = [0.0; GRID]; + let at = |i: usize| keys.get(i).and_then(|k| k.1).unwrap_or(&zero); + lerp_grid(at(i0), at(i1), f) +} + +impl GradingStage { + /// The stage for `s`: `None` before V8 or when Colour Grading is neutral. + pub fn new(s: &DevelopSettings) -> Option { + if s.process.process() < Process::V8 || s.grading.is_neutral() { + return None; + } + let g: &ColorGrading = &s.grading; + let wheels: [&Wheel; 4] = [&g.shadows, &g.midtones, &g.highlights, &g.global]; + let (blending, balance) = (g.blending as f32, g.balance as f32); + let mut lum = [0.0f32; GRID]; + let mut out = Vec::new(); + for (w, wheel) in wheels.iter().enumerate() { + if wheel.sat > 0.0 && wheel.sat.is_finite() { + out.push(WheelStage { + tint: tint(w, wheel.hue as f32, wheel.sat as f32), + profile: profile(w, blending, balance), + damping: t::DAMPING.get(w).copied().unwrap_or([[1.0; 6]; 3]), + }); + } + if wheel.lum != 0.0 && wheel.lum.is_finite() { + let l = luminance(w, wheel.lum as f32); + lum.iter_mut().zip(l).for_each(|(a, b)| *a += b); + } + } + Some(GradingStage { wheels: out, lum }) + } + + /// Colour Grading on OkLab. + pub fn apply(&self, lab: [f32; 3]) -> [f32; 3] { + let [l0, a0, b0] = lab; + let c = (a0 * a0 + b0 * b0).sqrt(); + let hue = b0.atan2(a0); + let (mut a, mut b) = (a0, b0); + for w in &self.wheels { + let p = on_grid(&w.profile, l0); + if p == 0.0 { + continue; + } + let diff = (hue - w.tint[1].atan2(w.tint[0]) + std::f32::consts::PI).rem_euclid(std::f32::consts::TAU) - std::f32::consts::PI; + let bin = ((diff.abs().to_degrees() / 30.0) as usize).min(5); + let level = |k: usize| w.damping.get(k).and_then(|r| r.get(bin)).copied().unwrap_or(1.0); + let damp = if c <= t::CHROMA[0] { + 1.0 + (level(0) - 1.0) * c / t::CHROMA[0] + } else { + let (k0, k1, f) = bracket(&t::CHROMA, c); + level(k0) * (1.0 - f) + level(k1) * f + }; + a += p * w.tint[0] * damp; + b += p * w.tint[1] * damp; + } + [(l0 + on_grid(&self.lum, l0)).max(0.0), a, b] + } +} + +#[cfg(test)] +mod tests { + use super::*; + + fn v8() -> DevelopSettings { + DevelopSettings { process: Process::V8.version(), ..Default::default() } + } + + fn stage(f: impl Fn(&mut ColorGrading)) -> GradingStage { + let mut s = v8(); + f(&mut s.grading); + GradingStage::new(&s).expect("stage") + } + + #[test] + fn only_v8_with_grading_gets_the_stage() { + assert!(GradingStage::new(&v8()).is_none()); + let mut s = v8(); + s.grading.shadows.hue = 200.0; + assert!(GradingStage::new(&s).is_none(), "a hue without saturation is neutral"); + s.grading.shadows.sat = 30.0; + assert!(GradingStage::new(&s).is_some()); + s.process = Process::V7.version(); + assert!(GradingStage::new(&s).is_none()); + } + + #[test] + fn the_shadows_wheel_tints_greys_and_reaches_into_the_midtones() { + // a warm shadows tint (wheel hue 30) + let st = stage(|g| { + g.shadows.hue = 30.0; + g.shadows.sat = 60.0; + }); + let dark = st.apply([0.3, 0.0, 0.0]); + let mid = st.apply([0.6, 0.0, 0.0]); + let bright = st.apply([0.95, 0.0, 0.0]); + let size = |x: [f32; 3]| x[1].hypot(x[2]); + assert!(dark[1] > 0.0 && dark[2] > 0.0, "warm: {dark:?}"); + assert!(size(mid) > 0.3 * size(dark), "Lightroom's shadows wheel reaches the midtones: {mid:?} vs {dark:?}"); + assert!(size(bright) < 0.3 * size(dark), "{bright:?}"); + assert_eq!(dark[0], 0.3, "the tint leaves lightness alone"); + } + + #[test] + fn colours_leaning_the_tints_way_get_less_of_it() { + let st = stage(|g| { + g.global.hue = 30.0; + g.global.sat = 100.0; + }); + let grey = st.apply([0.6, 0.0, 0.0]); + let t = [grey[1], grey[2]]; + let n = t[0].hypot(t[1]); + let along = [0.1 * t[0] / n, 0.1 * t[1] / n]; + let same = st.apply([0.6, along[0], along[1]]); + let gain = ((same[1] - along[0]) * t[0] + (same[2] - along[1]) * t[1]) / (n * n); + assert!(gain < 0.95 && gain > 0.3, "{gain}"); + } + + #[test] + fn saturation_and_hue_interpolate() { + let size = |sat: f64, hue: f64| { + let st = stage(|g| { + g.midtones.hue = hue; + g.midtones.sat = sat; + }); + let x = st.apply([0.5, 0.0, 0.0]); + (x[1].hypot(x[2]), x[2].atan2(x[1])) + }; + let (s10, _) = size(10.0, 120.0); + let (s25, h25) = size(25.0, 120.0); + let (s75, _) = size(75.0, 120.0); + assert!(s10 < s25 && s25 < s75, "{s10} {s25} {s75}"); + assert!((s10 - 0.4 * s25).abs() < 1e-4, "below 25 the tint grows linearly from none"); + let (_, h_mid) = size(25.0, 135.0); + let (_, h150) = size(25.0, 150.0); + assert!((h25.min(h150)..=h25.max(h150)).contains(&h_mid), "{h25} {h_mid} {h150}"); + } + + #[test] + fn luminance_moves_lightness_and_nothing_else() { + let st = stage(|g| g.highlights.lum = 60.0); + assert!(st.wheels.is_empty()); + let x = st.apply([0.85, 0.02, -0.01]); + assert!(x[0] > 0.85, "{x:?}"); + assert_eq!([x[1], x[2]], [0.02, -0.01]); + let st = stage(|g| g.highlights.lum = -100.0); + assert!(st.apply([0.85, 0.0, 0.0])[0] < 0.85); + } + + #[test] + fn balance_moves_the_split() { + let at = |balance: f64| { + let st = stage(|g| { + g.shadows.hue = 220.0; + g.shadows.sat = 50.0; + g.balance = balance; + }); + let x = st.apply([0.55, 0.0, 0.0]); + x[1].hypot(x[2]) + }; + // Balance towards the highlights narrows the shadows wheel's reach + assert!(at(100.0) < at(0.0) && at(0.0) < at(-100.0), "{} {} {}", at(100.0), at(0.0), at(-100.0)); + } +} diff --git a/crates/pipeline/src/grading_stage_tables.rs b/crates/pipeline/src/grading_stage_tables.rs new file mode 100644 index 00000000000..3e7cf3485e4 --- /dev/null +++ b/crates/pipeline/src/grading_stage_tables.rs @@ -0,0 +1,188 @@ +// @generated by tools/lr_grading_charts.py from Camera Raw renders of its synthetic charts (docs/grading-stage.md). +// OkLab. Wheels: shadows, midtones, highlights, global. Lightness grids: 65 steps from 0 to 1. +// Measured values, which can come close to a mathematical constant by chance. +#![allow(clippy::approx_constant)] + +pub const HUES: [f32; 12] = [0.0, 30.0, 60.0, 90.0, 120.0, 150.0, 180.0, 210.0, 240.0, 270.0, 300.0, 330.0]; +pub const SATS: [f32; 3] = [25.0, 50.0, 100.0]; +pub const BLENDS: [f32; 5] = [0.0, 25.0, 50.0, 75.0, 100.0]; +pub const BALANCES: [f32; 5] = [-100.0, -50.0, 0.0, 50.0, 100.0]; +pub const LUMS: [f32; 4] = [-100.0, -50.0, 50.0, 100.0]; +/// Nominal chroma of the damping's levels. +pub const CHROMA: [f32; 3] = [0.04, 0.08, 0.12]; + +/// Tint (a, b) per wheel, hue and saturation. +pub static TINT: [[[[f32; 2]; 3]; 12]; 4] = [ + [ + [[0.035477, 0.007008], [0.067495, 0.014511], [0.120858, 0.032836]], + [[0.016530, 0.016464], [0.030564, 0.034663], [0.049958, 0.061038]], + [[-0.003467, 0.026660], [-0.008795, 0.052789], [-0.014649, 0.081209]], + [[-0.021924, 0.022847], [-0.046296, 0.048465], [-0.072994, 0.075344]], + [[-0.041227, 0.019131], [-0.085552, 0.041121], [-0.139628, 0.069983]], + [[-0.039813, 0.005828], [-0.080372, 0.012503], [-0.125646, 0.022998]], + [[-0.039139, -0.006464], [-0.077075, -0.011604], [-0.115741, -0.016271]], + [[-0.018811, -0.015007], [-0.039547, -0.028853], [-0.073277, -0.051632]], + [[0.000727, -0.023073], [-0.000561, -0.043844], [-0.018201, -0.096857]], + [[0.019587, -0.019996], [0.037305, -0.037976], [0.076139, -0.076771]], + [[0.037447, -0.016737], [0.071573, -0.031647], [0.129916, -0.056564]], + [[0.036773, -0.005253], [0.070633, -0.009973], [0.129164, -0.016548]], + ], + [ + [[0.034533, 0.006497], [0.068746, 0.013474], [0.135767, 0.028979]], + [[0.016188, 0.014446], [0.031995, 0.028715], [0.062971, 0.056809]], + [[-0.002257, 0.022493], [-0.005244, 0.044342], [-0.012751, 0.086235]], + [[-0.019392, 0.019541], [-0.039284, 0.038802], [-0.080522, 0.076571]], + [[-0.036491, 0.016696], [-0.072974, 0.033661], [-0.145512, 0.068292]], + [[-0.035492, 0.005410], [-0.070778, 0.011365], [-0.140379, 0.024872]], + [[-0.034730, -0.006069], [-0.069530, -0.011744], [-0.138936, -0.022060]], + [[-0.016699, -0.014669], [-0.034074, -0.029584], [-0.071567, -0.060347]], + [[0.001282, -0.023171], [0.001288, -0.047049], [-0.004307, -0.097089]], + [[0.018871, -0.019847], [0.037170, -0.040017], [0.071813, -0.081473]], + [[0.036392, -0.016398], [0.072573, -0.032465], [0.143903, -0.063563]], + [[0.035580, -0.004852], [0.071137, -0.009115], [0.141714, -0.015784]], + ], + [ + [[0.031880, 0.005921], [0.064455, 0.012285], [0.120601, 0.023985]], + [[0.014907, 0.012973], [0.029775, 0.025458], [0.059221, 0.049030]], + [[-0.001861, 0.020009], [-0.004063, 0.038627], [-0.009679, 0.076361]], + [[-0.017413, 0.017437], [-0.034806, 0.034002], [-0.071480, 0.066638]], + [[-0.032804, 0.014965], [-0.064863, 0.029745], [-0.126885, 0.058800]], + [[-0.031943, 0.004917], [-0.063077, 0.010291], [-0.123044, 0.022234]], + [[-0.031200, -0.005524], [-0.061747, -0.010689], [-0.120966, -0.020088]], + [[-0.014996, -0.013544], [-0.030147, -0.027738], [-0.057983, -0.054546]], + [[0.001387, -0.021648], [0.002067, -0.043878], [0.000855, -0.084329]], + [[0.017399, -0.018460], [0.034367, -0.037701], [0.062083, -0.072173]], + [[0.033580, -0.015169], [0.067997, -0.030569], [0.128711, -0.057386]], + [[0.032789, -0.004413], [0.066479, -0.008259], [0.125718, -0.013603]], + ], + [ + [[0.034903, 0.006624], [0.069372, 0.013825], [0.136319, 0.030090]], + [[0.016316, 0.014612], [0.032149, 0.029052], [0.063052, 0.057453]], + [[-0.002342, 0.022695], [-0.005511, 0.044628], [-0.013436, 0.086330]], + [[-0.019644, 0.019750], [-0.039797, 0.039175], [-0.081640, 0.077130]], + [[-0.036917, 0.016915], [-0.073782, 0.034146], [-0.146699, 0.069284]], + [[-0.035877, 0.005507], [-0.071474, 0.011626], [-0.141222, 0.025621]], + [[-0.035127, -0.006102], [-0.070276, -0.011731], [-0.139885, -0.021805]], + [[-0.016972, -0.014850], [-0.034820, -0.029966], [-0.074050, -0.061267]], + [[0.001193, -0.023501], [0.000792, -0.047852], [-0.007409, -0.099200]], + [[0.019061, -0.020104], [0.037499, -0.040589], [0.071907, -0.082860]], + [[0.036796, -0.016558], [0.073284, -0.032708], [0.144743, -0.063697]], + [[0.035995, -0.004866], [0.071902, -0.009058], [0.142730, -0.015253]], + ], +]; + +/// Share of the tint by lightness, per wheel and Blending (at Balance 0). +pub static PROFILE_BLEND: [[[f32; 65]; 5]; 4] = [ + [ + [0.00000, 0.10577, 0.21155, 0.30588, 0.38577, 0.43526, 0.46277, 0.48157, 0.50133, 0.52624, 0.56814, 0.62302, 0.67820, 0.73254, 0.78566, 0.83529, 0.87612, 0.89994, 0.91275, 0.92123, 0.92608, 0.91934, 0.90085, 0.87388, 0.83376, 0.78122, 0.72236, 0.64932, 0.57260, 0.49000, 0.40699, 0.32369, 0.24854, 0.17628, 0.12049, 0.06966, 0.03807, 0.01473, 0.00271, 0.00117, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000], + [0.00000, 0.10577, 0.21155, 0.30588, 0.38577, 0.43526, 0.46277, 0.48157, 0.50133, 0.52624, 0.56814, 0.62332, 0.67834, 0.73293, 0.78634, 0.83715, 0.88013, 0.90741, 0.92254, 0.93384, 0.94270, 0.94113, 0.92892, 0.90910, 0.87758, 0.83473, 0.78614, 0.72473, 0.65985, 0.58943, 0.51771, 0.44515, 0.37854, 0.31404, 0.26247, 0.21479, 0.18281, 0.15755, 0.14151, 0.13398, 0.12659, 0.11964, 0.11270, 0.10560, 0.09850, 0.09120, 0.08385, 0.07662, 0.06944, 0.06235, 0.05531, 0.04866, 0.04220, 0.03624, 0.03044, 0.02529, 0.02035, 0.01571, 0.01180, 0.00832, 0.00537, 0.00310, 0.00136, 0.00038, 0.00000], + [0.00000, 0.10577, 0.21155, 0.30588, 0.38577, 0.43526, 0.46277, 0.48157, 0.50133, 0.52624, 0.56814, 0.62334, 0.67914, 0.73383, 0.78757, 0.83922, 0.88508, 0.91696, 0.93625, 0.95181, 0.96571, 0.97149, 0.96806, 0.95815, 0.93834, 0.90900, 0.87476, 0.82905, 0.77999, 0.72558, 0.66911, 0.61132, 0.55643, 0.50257, 0.45718, 0.41435, 0.38210, 0.35436, 0.33305, 0.31767, 0.30212, 0.28604, 0.26997, 0.25300, 0.23602, 0.21868, 0.20124, 0.18385, 0.16650, 0.14959, 0.13296, 0.11709, 0.10160, 0.08714, 0.07301, 0.06045, 0.04859, 0.03771, 0.02829, 0.01995, 0.01294, 0.00745, 0.00327, 0.00088, 0.00000], + [0.00000, 0.11208, 0.22417, 0.31664, 0.39332, 0.44281, 0.46742, 0.48722, 0.50728, 0.53400, 0.57791, 0.63550, 0.69248, 0.74927, 0.80512, 0.85992, 0.91214, 0.95518, 0.98551, 1.00978, 1.03139, 1.04991, 1.06149, 1.06821, 1.06750, 1.05903, 1.04659, 1.02434, 0.99869, 0.96762, 0.93290, 0.89585, 0.85729, 0.81820, 0.78086, 0.74407, 0.71105, 0.67964, 0.65040, 0.62314, 0.59508, 0.56450, 0.53393, 0.50070, 0.46746, 0.43330, 0.39892, 0.36472, 0.33061, 0.29715, 0.26409, 0.23243, 0.20150, 0.17281, 0.14485, 0.11986, 0.09628, 0.07467, 0.05606, 0.03958, 0.02566, 0.01458, 0.00648, 0.00177, 0.00000], + [0.00000, 0.11223, 0.22446, 0.32431, 0.40164, 0.44885, 0.47214, 0.49064, 0.51323, 0.54185, 0.58886, 0.64823, 0.70646, 0.76510, 0.82328, 0.88130, 0.93967, 0.99534, 1.04449, 1.08642, 1.12325, 1.15973, 1.19511, 1.22905, 1.25978, 1.28655, 1.31128, 1.32993, 1.34572, 1.35688, 1.36223, 1.36394, 1.35771, 1.34874, 1.33045, 1.30941, 1.27965, 1.24619, 1.20663, 1.16142, 1.11387, 1.05898, 1.00411, 0.94291, 0.88169, 0.81784, 0.75336, 0.68877, 0.62413, 0.56075, 0.49812, 0.43824, 0.37976, 0.32543, 0.27245, 0.22528, 0.18078, 0.14000, 0.10505, 0.07411, 0.04797, 0.02720, 0.01222, 0.00339, 0.00000], + ], + [ + [0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00033, 0.00222, 0.00412, 0.00689, 0.01224, 0.01814, 0.02782, 0.04103, 0.05813, 0.07947, 0.10526, 0.13780, 0.17654, 0.21976, 0.26968, 0.32529, 0.38381, 0.44842, 0.51442, 0.58254, 0.64989, 0.71677, 0.77835, 0.83806, 0.88669, 0.93200, 0.96248, 0.98663, 0.99748, 0.99606, 0.98822, 0.96052, 0.93286, 0.88388, 0.83487, 0.77446, 0.71131, 0.64379, 0.57422, 0.50485, 0.43562, 0.37010, 0.30646, 0.24980, 0.19542, 0.15078, 0.11056, 0.07648, 0.05103, 0.03075, 0.01615, 0.00698, 0.00214, 0.00034, 0.00000], + [0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00091, 0.00327, 0.00391, 0.00636, 0.00987, 0.01432, 0.02080, 0.02953, 0.04170, 0.05666, 0.07580, 0.09914, 0.12671, 0.16077, 0.20050, 0.24438, 0.29455, 0.34961, 0.40722, 0.47021, 0.53435, 0.60028, 0.66514, 0.72931, 0.78833, 0.84555, 0.89204, 0.93531, 0.96436, 0.98733, 0.99770, 0.99644, 0.98909, 0.96291, 0.93677, 0.89013, 0.84346, 0.78558, 0.72500, 0.65992, 0.59269, 0.52521, 0.45758, 0.39289, 0.32971, 0.27266, 0.21764, 0.17142, 0.12924, 0.09268, 0.06451, 0.04129, 0.02360, 0.01160, 0.00437, 0.00099, 0.00000], + [0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00101, 0.00438, 0.00671, 0.00602, 0.00783, 0.01078, 0.01670, 0.02363, 0.03315, 0.04439, 0.05928, 0.07763, 0.09986, 0.12626, 0.15676, 0.19255, 0.23356, 0.27828, 0.32845, 0.38291, 0.43955, 0.50044, 0.56211, 0.62495, 0.68648, 0.74718, 0.80247, 0.85586, 0.89932, 0.93981, 0.96702, 0.98855, 0.99833, 0.99726, 0.99056, 0.96642, 0.94233, 0.89897, 0.85560, 0.80129, 0.74436, 0.68259, 0.61853, 0.55355, 0.48803, 0.42461, 0.36227, 0.30470, 0.24875, 0.20031, 0.15546, 0.11559, 0.08334, 0.05595, 0.03411, 0.01811, 0.00754, 0.00185, 0.00000], + [0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00079, 0.00477, 0.00810, 0.01104, 0.01284, 0.01319, 0.02048, 0.02729, 0.03750, 0.05117, 0.06674, 0.08637, 0.10905, 0.13586, 0.16649, 0.20061, 0.23939, 0.28272, 0.32905, 0.37947, 0.43283, 0.48768, 0.54548, 0.60347, 0.66174, 0.71820, 0.77352, 0.82352, 0.87167, 0.91049, 0.94652, 0.97075, 0.98994, 0.99886, 0.99830, 0.99273, 0.97164, 0.95060, 0.91218, 0.87375, 0.82476, 0.77323, 0.71649, 0.65726, 0.59611, 0.53383, 0.47216, 0.41082, 0.35251, 0.29528, 0.24352, 0.19463, 0.14974, 0.11157, 0.07795, 0.04978, 0.02778, 0.01228, 0.00321, 0.00000], + [0.00000, 0.00000, 0.00000, 0.00000, 0.00066, 0.00513, 0.00921, 0.01309, 0.01903, 0.02240, 0.02251, 0.03193, 0.04515, 0.06088, 0.08071, 0.10302, 0.13041, 0.16018, 0.19397, 0.23135, 0.27175, 0.31577, 0.36257, 0.41118, 0.46223, 0.51434, 0.56692, 0.61969, 0.67173, 0.72262, 0.77083, 0.81734, 0.85847, 0.89770, 0.92889, 0.95767, 0.97705, 0.99243, 0.99987, 0.99999, 0.99620, 0.98026, 0.96436, 0.93404, 0.90372, 0.86365, 0.82124, 0.77283, 0.72157, 0.66674, 0.60980, 0.55107, 0.49146, 0.43184, 0.37238, 0.31506, 0.25947, 0.20629, 0.15826, 0.11436, 0.07577, 0.04399, 0.02027, 0.00553, 0.00000], + ], + [ + [0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00279, 0.00817, 0.01987, 0.05113, 0.08240, 0.14073, 0.19918, 0.27339, 0.35148, 0.43526, 0.52180, 0.60551, 0.68753, 0.75901, 0.82517, 0.87100, 0.91020, 0.91982, 0.91492, 0.88973, 0.83302, 0.75053, 0.63710, 0.49259, 0.33811, 0.17347, 0.00000], + [0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00132, 0.00243, 0.00225, 0.00353, 0.00425, 0.00590, 0.00795, 0.00982, 0.01225, 0.01501, 0.01796, 0.02136, 0.02541, 0.02978, 0.03444, 0.03942, 0.04461, 0.05070, 0.05700, 0.06362, 0.07052, 0.07759, 0.08503, 0.09260, 0.10024, 0.10790, 0.11544, 0.12292, 0.13260, 0.14430, 0.16126, 0.19445, 0.22764, 0.28283, 0.33811, 0.40592, 0.47680, 0.55153, 0.62811, 0.70109, 0.77192, 0.83212, 0.88694, 0.92226, 0.95124, 0.95189, 0.93879, 0.90649, 0.84442, 0.75655, 0.63851, 0.49321, 0.33830, 0.17352, 0.00000], + [0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00093, 0.00181, 0.00324, 0.00353, 0.00648, 0.00817, 0.01093, 0.01442, 0.01879, 0.02370, 0.02944, 0.03572, 0.04257, 0.05106, 0.06044, 0.07060, 0.08207, 0.09443, 0.10728, 0.12144, 0.13621, 0.15191, 0.16837, 0.18531, 0.20284, 0.22059, 0.23861, 0.25672, 0.27462, 0.29244, 0.31153, 0.33178, 0.35581, 0.39155, 0.42729, 0.47854, 0.52986, 0.58909, 0.65027, 0.71267, 0.77566, 0.83390, 0.88929, 0.93401, 0.97335, 0.99397, 1.00855, 0.99675, 0.97230, 0.93020, 0.86044, 0.76501, 0.64059, 0.49412, 0.33861, 0.17352, 0.00000], + [0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00103, 0.00351, 0.00354, 0.00529, 0.00547, 0.00906, 0.01200, 0.01564, 0.02193, 0.02833, 0.03648, 0.04600, 0.05748, 0.07030, 0.08428, 0.10059, 0.11938, 0.13965, 0.16172, 0.18586, 0.21110, 0.23893, 0.26791, 0.29866, 0.33069, 0.36353, 0.39755, 0.43200, 0.46687, 0.50185, 0.53636, 0.57066, 0.60509, 0.63962, 0.67594, 0.71773, 0.75953, 0.80763, 0.85577, 0.90546, 0.95555, 1.00270, 1.04847, 1.08724, 1.12186, 1.14478, 1.16179, 1.16055, 1.15345, 1.12153, 1.07787, 1.01784, 0.92137, 0.80098, 0.65817, 0.50723, 0.34749, 0.17816, 0.00000], + [0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00088, 0.00460, 0.00848, 0.00828, 0.01076, 0.01083, 0.01584, 0.02209, 0.03039, 0.04038, 0.05331, 0.06766, 0.08594, 0.10688, 0.13065, 0.15728, 0.18774, 0.22216, 0.25929, 0.30031, 0.34494, 0.39155, 0.44327, 0.49673, 0.55290, 0.61123, 0.67094, 0.73262, 0.79502, 0.85805, 0.92128, 0.98339, 1.04504, 1.10474, 1.16265, 1.21890, 1.26988, 1.32094, 1.36239, 1.40388, 1.43523, 1.46415, 1.48276, 1.49644, 1.49895, 1.49479, 1.47744, 1.45342, 1.41230, 1.36583, 1.29858, 1.21739, 1.11678, 0.97982, 0.83461, 0.68359, 0.52572, 0.35971, 0.18444, 0.00000], + ], + [ + [0.00000, 0.07290, 0.14580, 0.21663, 0.27556, 0.32040, 0.35186, 0.36099, 0.35907, 0.35802, 0.36274, 0.38305, 0.41188, 0.44438, 0.47755, 0.51028, 0.54236, 0.57401, 0.60492, 0.63535, 0.66536, 0.69441, 0.72245, 0.74981, 0.77616, 0.80126, 0.82567, 0.84819, 0.86987, 0.89022, 0.90887, 0.92644, 0.94169, 0.95613, 0.96772, 0.97846, 0.98614, 0.99254, 0.99651, 0.99824, 0.99866, 0.99494, 0.99126, 0.98207, 0.97290, 0.95879, 0.94352, 0.92415, 0.90284, 0.87749, 0.84975, 0.81768, 0.78348, 0.74381, 0.70251, 0.65475, 0.60408, 0.54931, 0.48795, 0.42243, 0.35181, 0.27486, 0.19093, 0.09914, 0.00000], + [0.00000, 0.07290, 0.14580, 0.21663, 0.27556, 0.32040, 0.35186, 0.36099, 0.35907, 0.35802, 0.36274, 0.38305, 0.41188, 0.44438, 0.47755, 0.51028, 0.54236, 0.57401, 0.60492, 0.63535, 0.66536, 0.69441, 0.72245, 0.74981, 0.77616, 0.80126, 0.82567, 0.84819, 0.86987, 0.89022, 0.90887, 0.92644, 0.94169, 0.95613, 0.96772, 0.97846, 0.98614, 0.99254, 0.99651, 0.99824, 0.99866, 0.99494, 0.99126, 0.98207, 0.97290, 0.95879, 0.94352, 0.92415, 0.90284, 0.87749, 0.84975, 0.81768, 0.78348, 0.74381, 0.70251, 0.65475, 0.60408, 0.54931, 0.48795, 0.42243, 0.35181, 0.27486, 0.19093, 0.09914, 0.00000], + [0.00000, 0.07290, 0.14580, 0.21663, 0.27556, 0.32040, 0.35186, 0.36099, 0.35907, 0.35802, 0.36274, 0.38305, 0.41188, 0.44438, 0.47755, 0.51028, 0.54236, 0.57401, 0.60492, 0.63535, 0.66536, 0.69441, 0.72245, 0.74981, 0.77616, 0.80126, 0.82567, 0.84819, 0.86987, 0.89022, 0.90887, 0.92644, 0.94169, 0.95613, 0.96772, 0.97846, 0.98614, 0.99254, 0.99651, 0.99824, 0.99866, 0.99494, 0.99126, 0.98207, 0.97290, 0.95879, 0.94352, 0.92415, 0.90284, 0.87749, 0.84975, 0.81768, 0.78348, 0.74381, 0.70251, 0.65475, 0.60408, 0.54931, 0.48795, 0.42243, 0.35181, 0.27486, 0.19093, 0.09914, 0.00000], + [0.00000, 0.07290, 0.14580, 0.21663, 0.27556, 0.32040, 0.35186, 0.36099, 0.35907, 0.35802, 0.36274, 0.38305, 0.41188, 0.44438, 0.47755, 0.51028, 0.54236, 0.57401, 0.60492, 0.63535, 0.66536, 0.69441, 0.72245, 0.74981, 0.77616, 0.80126, 0.82567, 0.84819, 0.86987, 0.89022, 0.90887, 0.92644, 0.94169, 0.95613, 0.96772, 0.97846, 0.98614, 0.99254, 0.99651, 0.99824, 0.99866, 0.99494, 0.99126, 0.98207, 0.97290, 0.95879, 0.94352, 0.92415, 0.90284, 0.87749, 0.84975, 0.81768, 0.78348, 0.74381, 0.70251, 0.65475, 0.60408, 0.54931, 0.48795, 0.42243, 0.35181, 0.27486, 0.19093, 0.09914, 0.00000], + [0.00000, 0.07290, 0.14580, 0.21663, 0.27556, 0.32040, 0.35186, 0.36099, 0.35907, 0.35802, 0.36274, 0.38305, 0.41188, 0.44438, 0.47755, 0.51028, 0.54236, 0.57401, 0.60492, 0.63535, 0.66536, 0.69441, 0.72245, 0.74981, 0.77616, 0.80126, 0.82567, 0.84819, 0.86987, 0.89022, 0.90887, 0.92644, 0.94169, 0.95613, 0.96772, 0.97846, 0.98614, 0.99254, 0.99651, 0.99824, 0.99866, 0.99494, 0.99126, 0.98207, 0.97290, 0.95879, 0.94352, 0.92415, 0.90284, 0.87749, 0.84975, 0.81768, 0.78348, 0.74381, 0.70251, 0.65475, 0.60408, 0.54931, 0.48795, 0.42243, 0.35181, 0.27486, 0.19093, 0.09914, 0.00000], + ], +]; + +/// Share of the tint by lightness, per wheel and Balance (at Blending 50; the global wheel ignores Balance). +pub static PROFILE_BALANCE: [[[f32; 65]; 5]; 4] = [ + [ + [0.00000, 0.10577, 0.21155, 0.30588, 0.38602, 0.43656, 0.46225, 0.48063, 0.50085, 0.52609, 0.56785, 0.62400, 0.67946, 0.73543, 0.79090, 0.84565, 0.89997, 0.95414, 1.00717, 1.05967, 1.11190, 1.16331, 1.21336, 1.26280, 1.31176, 1.35914, 1.40577, 1.45075, 1.49503, 1.53819, 1.57872, 1.61764, 1.64158, 1.66017, 1.67358, 1.68542, 1.68888, 1.68876, 1.68101, 1.66622, 1.64718, 1.61501, 1.58288, 1.53179, 1.48071, 1.41420, 1.34405, 1.26190, 1.17416, 1.07767, 0.97615, 0.86907, 0.75940, 0.64895, 0.53904, 0.43621, 0.34059, 0.25473, 0.19016, 0.13893, 0.09989, 0.06442, 0.03324, 0.01020, 0.00000], + [0.00000, 0.10577, 0.21155, 0.30588, 0.38602, 0.43656, 0.46225, 0.48063, 0.50165, 0.52660, 0.56753, 0.62371, 0.67981, 0.73543, 0.79067, 0.84503, 0.89971, 0.95301, 1.00519, 1.05674, 1.10722, 1.15359, 1.18777, 1.21579, 1.23796, 1.25647, 1.27261, 1.27972, 1.28242, 1.27818, 1.26576, 1.24819, 1.22002, 1.18822, 1.14524, 1.09903, 1.04351, 0.98409, 0.91978, 0.85091, 0.78150, 0.71007, 0.63873, 0.57286, 0.50706, 0.45153, 0.39854, 0.35661, 0.32001, 0.29074, 0.26584, 0.24070, 0.21544, 0.19005, 0.16466, 0.13995, 0.11583, 0.09254, 0.07133, 0.05187, 0.03464, 0.02019, 0.00939, 0.00262, 0.00000], + [0.00000, 0.10577, 0.21155, 0.30588, 0.38577, 0.43526, 0.46277, 0.48157, 0.50133, 0.52624, 0.56814, 0.62334, 0.67914, 0.73383, 0.78757, 0.83922, 0.88508, 0.91696, 0.93625, 0.95181, 0.96571, 0.97149, 0.96806, 0.95815, 0.93834, 0.90900, 0.87476, 0.82905, 0.77999, 0.72558, 0.66911, 0.61132, 0.55643, 0.50257, 0.45718, 0.41435, 0.38210, 0.35436, 0.33305, 0.31767, 0.30212, 0.28604, 0.26997, 0.25300, 0.23602, 0.21868, 0.20124, 0.18385, 0.16650, 0.14959, 0.13296, 0.11709, 0.10160, 0.08714, 0.07301, 0.06045, 0.04859, 0.03771, 0.02829, 0.01995, 0.01294, 0.00745, 0.00327, 0.00088, 0.00000], + [0.00000, 0.10577, 0.21155, 0.30588, 0.38577, 0.43505, 0.46183, 0.48135, 0.50154, 0.52492, 0.56397, 0.61359, 0.65360, 0.67586, 0.67735, 0.67005, 0.65960, 0.63728, 0.60374, 0.56176, 0.51391, 0.46261, 0.41415, 0.36916, 0.33133, 0.30378, 0.28161, 0.27156, 0.26183, 0.25259, 0.24259, 0.23210, 0.22120, 0.21015, 0.19886, 0.18749, 0.17619, 0.16492, 0.15385, 0.14297, 0.13225, 0.12201, 0.11178, 0.10249, 0.09320, 0.08445, 0.07584, 0.06790, 0.06028, 0.05315, 0.04631, 0.04005, 0.03408, 0.02884, 0.02383, 0.01956, 0.01555, 0.01189, 0.00871, 0.00600, 0.00384, 0.00223, 0.00105, 0.00023, 0.00000], + [0.00000, 0.10577, 0.21155, 0.30315, 0.37857, 0.42084, 0.43468, 0.42680, 0.40202, 0.35999, 0.29189, 0.23017, 0.18884, 0.16149, 0.15006, 0.14305, 0.13681, 0.12934, 0.12152, 0.11362, 0.10580, 0.09834, 0.09146, 0.08484, 0.07841, 0.07245, 0.06676, 0.06181, 0.05708, 0.05267, 0.04855, 0.04461, 0.04110, 0.03774, 0.03485, 0.03210, 0.02942, 0.02677, 0.02441, 0.02230, 0.02027, 0.01843, 0.01660, 0.01512, 0.01363, 0.01221, 0.01081, 0.00957, 0.00841, 0.00730, 0.00623, 0.00534, 0.00454, 0.00381, 0.00311, 0.00257, 0.00204, 0.00155, 0.00108, 0.00072, 0.00048, 0.00032, 0.00028, 0.00000, 0.00000], + ], + [ + [0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00002, 0.00085, 0.00087, 0.00216, 0.00273, 0.00340, 0.00493, 0.00618, 0.00746, 0.00897, 0.01078, 0.01338, 0.01629, 0.01931, 0.02280, 0.02662, 0.03157, 0.03691, 0.04285, 0.04974, 0.05723, 0.06613, 0.07554, 0.08661, 0.09818, 0.11160, 0.12583, 0.14166, 0.15897, 0.17714, 0.19796, 0.21879, 0.24276, 0.26676, 0.29289, 0.31958, 0.34720, 0.37532, 0.40311, 0.43079, 0.45633, 0.48095, 0.50010, 0.51756, 0.52389, 0.52268, 0.51077, 0.47505, 0.42083, 0.34389, 0.24225, 0.12860, 0.03675, 0.00000], + [0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00132, 0.00279, 0.00319, 0.00550, 0.00689, 0.00987, 0.01317, 0.01729, 0.02285, 0.02950, 0.03730, 0.04629, 0.05705, 0.07044, 0.08557, 0.10314, 0.12353, 0.14553, 0.17216, 0.20097, 0.23316, 0.26870, 0.30638, 0.34823, 0.39159, 0.43831, 0.48609, 0.53541, 0.58545, 0.63490, 0.68385, 0.73132, 0.77405, 0.81688, 0.84793, 0.87905, 0.89613, 0.90985, 0.90909, 0.90141, 0.87892, 0.84759, 0.80131, 0.74749, 0.67875, 0.60578, 0.52161, 0.43595, 0.34818, 0.26450, 0.18703, 0.11881, 0.06417, 0.02670, 0.00643, 0.00000], + [0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00101, 0.00438, 0.00671, 0.00602, 0.00783, 0.01078, 0.01670, 0.02363, 0.03315, 0.04439, 0.05928, 0.07763, 0.09986, 0.12626, 0.15676, 0.19255, 0.23356, 0.27828, 0.32845, 0.38291, 0.43955, 0.50044, 0.56211, 0.62495, 0.68648, 0.74718, 0.80247, 0.85586, 0.89932, 0.93981, 0.96702, 0.98855, 0.99833, 0.99726, 0.99056, 0.96642, 0.94233, 0.89897, 0.85560, 0.80129, 0.74436, 0.68259, 0.61853, 0.55355, 0.48803, 0.42461, 0.36227, 0.30470, 0.24875, 0.20031, 0.15546, 0.11559, 0.08334, 0.05595, 0.03411, 0.01811, 0.00754, 0.00185, 0.00000], + [0.00000, 0.00000, 0.00000, 0.00000, 0.00066, 0.00513, 0.00921, 0.01398, 0.02168, 0.02649, 0.02990, 0.04604, 0.06717, 0.09567, 0.13148, 0.17327, 0.22438, 0.28248, 0.34558, 0.41270, 0.48262, 0.55311, 0.62011, 0.68358, 0.74039, 0.78645, 0.82643, 0.84920, 0.86402, 0.86649, 0.85718, 0.84036, 0.81216, 0.77997, 0.74020, 0.69822, 0.65314, 0.60679, 0.56054, 0.51437, 0.46903, 0.42600, 0.38305, 0.34465, 0.30632, 0.27208, 0.23887, 0.20903, 0.18081, 0.15558, 0.13214, 0.11151, 0.09231, 0.07609, 0.06077, 0.04843, 0.03723, 0.02759, 0.01994, 0.01348, 0.00836, 0.00458, 0.00197, 0.00047, 0.00000], + [0.00000, 0.00308, 0.00615, 0.01813, 0.04020, 0.07201, 0.11173, 0.15030, 0.18391, 0.20533, 0.24870, 0.31569, 0.38298, 0.43956, 0.47965, 0.49813, 0.49751, 0.48108, 0.45480, 0.42319, 0.38891, 0.35402, 0.32105, 0.28963, 0.26068, 0.23468, 0.21026, 0.18945, 0.17006, 0.15285, 0.13749, 0.12332, 0.11115, 0.09969, 0.08996, 0.08075, 0.07277, 0.06532, 0.05862, 0.05262, 0.04692, 0.04214, 0.03736, 0.03347, 0.02958, 0.02627, 0.02311, 0.02028, 0.01761, 0.01523, 0.01302, 0.01111, 0.00934, 0.00779, 0.00631, 0.00516, 0.00407, 0.00305, 0.00226, 0.00158, 0.00103, 0.00062, 0.00029, 0.00009, 0.00000], + ], + [ + [0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00055, 0.00070, 0.00099, 0.00161, 0.00187, 0.00222, 0.00270, 0.00328, 0.00409, 0.00522, 0.00639, 0.00740, 0.00855, 0.00980, 0.01146, 0.01322, 0.01512, 0.01724, 0.01950, 0.02213, 0.02489, 0.02802, 0.03126, 0.03484, 0.03858, 0.04267, 0.04710, 0.05163, 0.05648, 0.06132, 0.06704, 0.07275, 0.07872, 0.08475, 0.09097, 0.09727, 0.10365, 0.11005, 0.11627, 0.12239, 0.12779, 0.13295, 0.13690, 0.13979, 0.14121, 0.13930, 0.13642, 0.13626, 0.14939, 0.16753, 0.13743, 0.00000], + [0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00043, 0.00102, 0.00225, 0.00239, 0.00412, 0.00435, 0.00648, 0.00857, 0.01048, 0.01268, 0.01537, 0.01867, 0.02246, 0.02661, 0.03131, 0.03645, 0.04188, 0.04839, 0.05527, 0.06271, 0.07095, 0.07970, 0.08924, 0.09906, 0.10970, 0.12059, 0.13225, 0.14424, 0.15661, 0.16933, 0.18211, 0.19511, 0.20810, 0.22097, 0.23383, 0.24568, 0.25728, 0.26755, 0.27719, 0.28751, 0.29825, 0.31795, 0.34218, 0.37608, 0.41260, 0.45368, 0.49196, 0.52633, 0.54279, 0.54120, 0.51441, 0.45145, 0.32949, 0.17194, 0.00000], + [0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00093, 0.00181, 0.00324, 0.00353, 0.00648, 0.00817, 0.01093, 0.01442, 0.01879, 0.02370, 0.02944, 0.03572, 0.04257, 0.05106, 0.06044, 0.07060, 0.08207, 0.09443, 0.10728, 0.12144, 0.13621, 0.15191, 0.16837, 0.18531, 0.20284, 0.22059, 0.23861, 0.25672, 0.27462, 0.29244, 0.31153, 0.33178, 0.35581, 0.39155, 0.42729, 0.47854, 0.52986, 0.58909, 0.65027, 0.71267, 0.77566, 0.83390, 0.88929, 0.93401, 0.97335, 0.99397, 1.00855, 0.99675, 0.97230, 0.93020, 0.86044, 0.76501, 0.64059, 0.49412, 0.33861, 0.17352, 0.00000], + [0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00088, 0.00405, 0.00407, 0.00701, 0.01022, 0.00981, 0.01384, 0.01971, 0.02689, 0.03464, 0.04530, 0.05603, 0.06910, 0.08374, 0.09960, 0.11658, 0.13514, 0.15490, 0.17537, 0.19672, 0.21864, 0.24100, 0.26537, 0.29547, 0.33449, 0.38449, 0.44151, 0.51055, 0.58390, 0.66625, 0.75138, 0.83991, 0.92998, 1.01874, 1.10632, 1.19133, 1.26818, 1.34512, 1.40487, 1.46460, 1.50650, 1.54404, 1.56483, 1.57756, 1.57420, 1.56122, 1.53179, 1.49406, 1.43752, 1.37529, 1.29284, 1.19627, 1.08004, 0.94247, 0.79942, 0.65191, 0.49910, 0.34020, 0.17378, 0.00000], + [0.00000, 0.00000, 0.00000, 0.00562, 0.01306, 0.01805, 0.02930, 0.03822, 0.04720, 0.05387, 0.05855, 0.07747, 0.09941, 0.12178, 0.14802, 0.18453, 0.24197, 0.31781, 0.40878, 0.51092, 0.62144, 0.73976, 0.86201, 0.98601, 1.11085, 1.23280, 1.35300, 1.46653, 1.57579, 1.67829, 1.77206, 1.86024, 1.93615, 2.00771, 2.06511, 2.11827, 2.15778, 2.19145, 2.21484, 2.22875, 2.23792, 2.23244, 2.22698, 2.20359, 2.18016, 2.14289, 2.10229, 2.05123, 1.99519, 1.92973, 1.85871, 1.77861, 1.69400, 1.59870, 1.49907, 1.36670, 1.23177, 1.09313, 0.94988, 0.80384, 0.65427, 0.50013, 0.34054, 0.17384, 0.00000], + ], + [ + [0.00000, 0.07290, 0.14580, 0.21663, 0.27556, 0.32040, 0.35186, 0.36099, 0.35907, 0.35802, 0.36274, 0.38305, 0.41188, 0.44438, 0.47755, 0.51028, 0.54236, 0.57401, 0.60492, 0.63535, 0.66536, 0.69441, 0.72245, 0.74981, 0.77616, 0.80126, 0.82567, 0.84819, 0.86987, 0.89022, 0.90887, 0.92644, 0.94169, 0.95613, 0.96772, 0.97846, 0.98614, 0.99254, 0.99651, 0.99824, 0.99866, 0.99494, 0.99126, 0.98207, 0.97290, 0.95879, 0.94352, 0.92415, 0.90284, 0.87749, 0.84975, 0.81768, 0.78348, 0.74381, 0.70251, 0.65475, 0.60408, 0.54931, 0.48795, 0.42243, 0.35181, 0.27486, 0.19093, 0.09914, 0.00000], + [0.00000, 0.07290, 0.14580, 0.21663, 0.27556, 0.32040, 0.35186, 0.36099, 0.35907, 0.35802, 0.36274, 0.38305, 0.41188, 0.44438, 0.47755, 0.51028, 0.54236, 0.57401, 0.60492, 0.63535, 0.66536, 0.69441, 0.72245, 0.74981, 0.77616, 0.80126, 0.82567, 0.84819, 0.86987, 0.89022, 0.90887, 0.92644, 0.94169, 0.95613, 0.96772, 0.97846, 0.98614, 0.99254, 0.99651, 0.99824, 0.99866, 0.99494, 0.99126, 0.98207, 0.97290, 0.95879, 0.94352, 0.92415, 0.90284, 0.87749, 0.84975, 0.81768, 0.78348, 0.74381, 0.70251, 0.65475, 0.60408, 0.54931, 0.48795, 0.42243, 0.35181, 0.27486, 0.19093, 0.09914, 0.00000], + [0.00000, 0.07290, 0.14580, 0.21663, 0.27556, 0.32040, 0.35186, 0.36099, 0.35907, 0.35802, 0.36274, 0.38305, 0.41188, 0.44438, 0.47755, 0.51028, 0.54236, 0.57401, 0.60492, 0.63535, 0.66536, 0.69441, 0.72245, 0.74981, 0.77616, 0.80126, 0.82567, 0.84819, 0.86987, 0.89022, 0.90887, 0.92644, 0.94169, 0.95613, 0.96772, 0.97846, 0.98614, 0.99254, 0.99651, 0.99824, 0.99866, 0.99494, 0.99126, 0.98207, 0.97290, 0.95879, 0.94352, 0.92415, 0.90284, 0.87749, 0.84975, 0.81768, 0.78348, 0.74381, 0.70251, 0.65475, 0.60408, 0.54931, 0.48795, 0.42243, 0.35181, 0.27486, 0.19093, 0.09914, 0.00000], + [0.00000, 0.07290, 0.14580, 0.21663, 0.27556, 0.32040, 0.35186, 0.36099, 0.35907, 0.35802, 0.36274, 0.38305, 0.41188, 0.44438, 0.47755, 0.51028, 0.54236, 0.57401, 0.60492, 0.63535, 0.66536, 0.69441, 0.72245, 0.74981, 0.77616, 0.80126, 0.82567, 0.84819, 0.86987, 0.89022, 0.90887, 0.92644, 0.94169, 0.95613, 0.96772, 0.97846, 0.98614, 0.99254, 0.99651, 0.99824, 0.99866, 0.99494, 0.99126, 0.98207, 0.97290, 0.95879, 0.94352, 0.92415, 0.90284, 0.87749, 0.84975, 0.81768, 0.78348, 0.74381, 0.70251, 0.65475, 0.60408, 0.54931, 0.48795, 0.42243, 0.35181, 0.27486, 0.19093, 0.09914, 0.00000], + [0.00000, 0.07290, 0.14580, 0.21663, 0.27556, 0.32040, 0.35186, 0.36099, 0.35907, 0.35802, 0.36274, 0.38305, 0.41188, 0.44438, 0.47755, 0.51028, 0.54236, 0.57401, 0.60492, 0.63535, 0.66536, 0.69441, 0.72245, 0.74981, 0.77616, 0.80126, 0.82567, 0.84819, 0.86987, 0.89022, 0.90887, 0.92644, 0.94169, 0.95613, 0.96772, 0.97846, 0.98614, 0.99254, 0.99651, 0.99824, 0.99866, 0.99494, 0.99126, 0.98207, 0.97290, 0.95879, 0.94352, 0.92415, 0.90284, 0.87749, 0.84975, 0.81768, 0.78348, 0.74381, 0.70251, 0.65475, 0.60408, 0.54931, 0.48795, 0.42243, 0.35181, 0.27486, 0.19093, 0.09914, 0.00000], + ], +]; + +/// Lightness change by lightness, per wheel and Luminance. +pub static LUM: [[[f32; 65]; 4]; 4] = [ + [ + [-0.000000, -0.015625, -0.031250, -0.046875, -0.062500, -0.077380, -0.090185, -0.105006, -0.118033, -0.129777, -0.139887, -0.147565, -0.151420, -0.152247, -0.149120, -0.142476, -0.132786, -0.124434, -0.120218, -0.117058, -0.113333, -0.108705, -0.103438, -0.097790, -0.091678, -0.085253, -0.078696, -0.072065, -0.065541, -0.059181, -0.053202, -0.047466, -0.042438, -0.037663, -0.033849, -0.030324, -0.027742, -0.025562, -0.023897, -0.022706, -0.021512, -0.020308, -0.019104, -0.017863, -0.016621, -0.015376, -0.014131, -0.012908, -0.011695, -0.010511, -0.009344, -0.008228, -0.007137, -0.006129, -0.005146, -0.004257, -0.003421, -0.002660, -0.001998, -0.001410, -0.000912, -0.000511, -0.000242, -0.000063, 0.000000], + [-0.000000, -0.005827, -0.011655, -0.017659, -0.023540, -0.029054, -0.034205, -0.038794, -0.042181, -0.043852, -0.041327, -0.037318, -0.036876, -0.038858, -0.041000, -0.042834, -0.044332, -0.045401, -0.046047, -0.046299, -0.046178, -0.045542, -0.044432, -0.043010, -0.041155, -0.038970, -0.036621, -0.033966, -0.031279, -0.028541, -0.025875, -0.023256, -0.020902, -0.018642, -0.016802, -0.015088, -0.013828, -0.012762, -0.011949, -0.011370, -0.010786, -0.010190, -0.009594, -0.008976, -0.008358, -0.007730, -0.007101, -0.006484, -0.005873, -0.005279, -0.004694, -0.004130, -0.003578, -0.003069, -0.002573, -0.002131, -0.001716, -0.001336, -0.001006, -0.000712, -0.000462, -0.000267, -0.000132, -0.000026, 0.000000], + [0.000000, 0.062484, 0.124967, 0.126772, 0.115550, 0.104858, 0.094968, 0.085945, 0.078067, 0.071546, 0.067596, 0.065365, 0.063180, 0.061127, 0.059107, 0.057118, 0.055157, 0.053163, 0.051185, 0.049147, 0.047020, 0.044793, 0.042447, 0.040016, 0.037457, 0.034781, 0.032051, 0.029256, 0.026469, 0.023692, 0.021040, 0.018468, 0.016194, 0.014026, 0.012336, 0.010789, 0.009767, 0.008968, 0.008376, 0.007975, 0.007571, 0.007159, 0.006746, 0.006317, 0.005887, 0.005452, 0.005016, 0.004576, 0.004136, 0.003712, 0.003299, 0.002909, 0.002530, 0.002170, 0.001816, 0.001505, 0.001211, 0.000938, 0.000707, 0.000497, 0.000316, 0.000178, 0.000086, 0.000027, 0.000000], + [0.000000, 0.091464, 0.182928, 0.189871, 0.178253, 0.167231, 0.156849, 0.147256, 0.138416, 0.130253, 0.124233, 0.119695, 0.115351, 0.111150, 0.107063, 0.103130, 0.099225, 0.095428, 0.091685, 0.087923, 0.084107, 0.080199, 0.076152, 0.071991, 0.067645, 0.063119, 0.058502, 0.053703, 0.048901, 0.044091, 0.039448, 0.034910, 0.030862, 0.026988, 0.023980, 0.021232, 0.019382, 0.017915, 0.016795, 0.015995, 0.015190, 0.014373, 0.013557, 0.012683, 0.011808, 0.010932, 0.010057, 0.009184, 0.008312, 0.007465, 0.006632, 0.005837, 0.005062, 0.004343, 0.003642, 0.003007, 0.002412, 0.001875, 0.001405, 0.000991, 0.000647, 0.000374, 0.000155, 0.000043, 0.000000], + ], + [ + [0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, -0.000171, -0.000467, -0.000302, -0.000426, -0.000516, -0.000879, -0.001144, -0.001631, -0.002287, -0.003056, -0.004063, -0.005334, -0.006868, -0.008677, -0.010940, -0.013583, -0.016521, -0.019936, -0.023805, -0.027906, -0.032487, -0.037199, -0.042116, -0.047057, -0.052013, -0.056642, -0.061153, -0.064945, -0.068521, -0.071124, -0.073310, -0.074607, -0.075083, -0.075138, -0.073893, -0.072648, -0.069906, -0.067157, -0.063506, -0.059634, -0.055275, -0.050682, -0.045873, -0.040936, -0.036010, -0.031090, -0.026411, -0.021819, -0.017716, -0.013883, -0.010426, -0.007577, -0.005124, -0.003136, -0.001663, -0.000718, -0.000185, 0.000000], + [0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, -0.000192, -0.000220, -0.000343, -0.000510, -0.000682, -0.000914, -0.001176, -0.001649, -0.002183, -0.002873, -0.003704, -0.004668, -0.005849, -0.007222, -0.008749, -0.010526, -0.012496, -0.014567, -0.016862, -0.019215, -0.021656, -0.024084, -0.026503, -0.028747, -0.030928, -0.032743, -0.034449, -0.035661, -0.036662, -0.037223, -0.037378, -0.037316, -0.036586, -0.035855, -0.034388, -0.032918, -0.030995, -0.028960, -0.026701, -0.024332, -0.021891, -0.019406, -0.016954, -0.014517, -0.012247, -0.010033, -0.008093, -0.006293, -0.004688, -0.003386, -0.002273, -0.001380, -0.000731, -0.000309, -0.000080, 0.000000], + [0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000155, 0.000334, 0.000277, 0.000342, 0.000570, 0.000802, 0.001135, 0.001535, 0.002013, 0.002664, 0.003470, 0.004427, 0.005529, 0.006818, 0.008331, 0.009993, 0.011865, 0.013918, 0.016062, 0.018397, 0.020772, 0.023209, 0.025591, 0.027938, 0.030096, 0.032188, 0.033874, 0.035438, 0.036492, 0.037329, 0.037696, 0.037628, 0.037339, 0.036365, 0.035392, 0.033671, 0.031947, 0.029806, 0.027563, 0.025142, 0.022636, 0.020125, 0.017613, 0.015204, 0.012848, 0.010718, 0.008661, 0.006918, 0.005313, 0.003902, 0.002800, 0.001868, 0.001128, 0.000595, 0.000243, 0.000060, 0.000000], + [0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000172, 0.000570, 0.000438, 0.000525, 0.000688, 0.000898, 0.001331, 0.001806, 0.002556, 0.003435, 0.004586, 0.005972, 0.007722, 0.009778, 0.012112, 0.014891, 0.018067, 0.021527, 0.025412, 0.029634, 0.034024, 0.038741, 0.043516, 0.048378, 0.053133, 0.057820, 0.062078, 0.066184, 0.069466, 0.072501, 0.074455, 0.075947, 0.076469, 0.076094, 0.075261, 0.073012, 0.070763, 0.067006, 0.063243, 0.058701, 0.053967, 0.048966, 0.043835, 0.038754, 0.033703, 0.028937, 0.024314, 0.020185, 0.016213, 0.012886, 0.009849, 0.007217, 0.005149, 0.003416, 0.002058, 0.001082, 0.000441, 0.000116, 0.000000], + ], + [ + [0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, -0.000220, -0.000173, -0.000368, -0.000461, -0.000503, -0.000714, -0.000955, -0.001198, -0.001492, -0.001826, -0.002196, -0.002633, -0.003123, -0.003656, -0.004261, -0.004912, -0.005588, -0.006337, -0.007114, -0.007937, -0.008794, -0.009674, -0.010590, -0.011520, -0.012457, -0.013397, -0.014331, -0.015261, -0.016253, -0.017302, -0.018579, -0.020556, -0.022534, -0.025877, -0.029226, -0.033357, -0.037679, -0.042337, -0.047157, -0.052000, -0.056857, -0.061518, -0.066080, -0.070196, -0.074170, -0.077543, -0.080622, -0.083291, -0.085303, -0.086889, -0.087970, -0.088471, -0.088327, -0.087427, -0.085841], + [0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, -0.000170, -0.000145, -0.000212, -0.000305, -0.000343, -0.000485, -0.000600, -0.000765, -0.000934, -0.001101, -0.001341, -0.001577, -0.001827, -0.002119, -0.002453, -0.002805, -0.003170, -0.003548, -0.003949, -0.004378, -0.004824, -0.005280, -0.005741, -0.006216, -0.006696, -0.007167, -0.007634, -0.008135, -0.008668, -0.009340, -0.010441, -0.011543, -0.013408, -0.015276, -0.017594, -0.020022, -0.022658, -0.025394, -0.028165, -0.030957, -0.033624, -0.036227, -0.038554, -0.040788, -0.042593, -0.044181, -0.045465, -0.046256, -0.046730, -0.046830, -0.046496, -0.045687, -0.044389, -0.042685], + [0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000057, 0.000170, 0.000223, 0.000341, 0.000421, 0.000558, 0.000691, 0.000856, 0.001043, 0.001287, 0.001582, 0.001867, 0.002214, 0.002592, 0.002999, 0.003448, 0.003919, 0.004453, 0.005010, 0.005606, 0.006220, 0.006845, 0.007507, 0.008180, 0.008865, 0.009552, 0.010230, 0.010904, 0.011636, 0.012421, 0.013355, 0.014745, 0.016135, 0.018172, 0.020212, 0.022600, 0.025074, 0.027632, 0.030232, 0.032673, 0.035019, 0.036923, 0.038603, 0.039504, 0.040150, 0.039665, 0.038642, 0.036868, 0.033959, 0.030332, 0.025883, 0.020562, 0.014392, 0.007495, 0.000000], + [0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000224, 0.000206, 0.000342, 0.000494, 0.000582, 0.000832, 0.001087, 0.001320, 0.001696, 0.002124, 0.002604, 0.003136, 0.003720, 0.004398, 0.005137, 0.005965, 0.006869, 0.007815, 0.008871, 0.009975, 0.011150, 0.012374, 0.013628, 0.014949, 0.016293, 0.017675, 0.019068, 0.020459, 0.021849, 0.023349, 0.024950, 0.026858, 0.029717, 0.032576, 0.036764, 0.040958, 0.045964, 0.051169, 0.056612, 0.062170, 0.067442, 0.072543, 0.076752, 0.080512, 0.082567, 0.084067, 0.083083, 0.080908, 0.077072, 0.070756, 0.062937, 0.053423, 0.042161, 0.029311, 0.015150, 0.000000], + ], + [ + [-0.000000, -0.004569, -0.009138, -0.014034, -0.017927, -0.022037, -0.025798, -0.028851, -0.031400, -0.032176, -0.029285, -0.026541, -0.028029, -0.030356, -0.032685, -0.034893, -0.037233, -0.039447, -0.041656, -0.043841, -0.045988, -0.048089, -0.050178, -0.052242, -0.054246, -0.056190, -0.058104, -0.059955, -0.061749, -0.063454, -0.065085, -0.066671, -0.068130, -0.069544, -0.070816, -0.072046, -0.073103, -0.074087, -0.074914, -0.075595, -0.076192, -0.076528, -0.076863, -0.076780, -0.076694, -0.076255, -0.075729, -0.074856, -0.073817, -0.072426, -0.070824, -0.068813, -0.066594, -0.063840, -0.060918, -0.057316, -0.053404, -0.049058, -0.043982, -0.038431, -0.032302, -0.025456, -0.017850, -0.009341, 0.000000], + [-0.000000, -0.002195, -0.004389, -0.007324, -0.009611, -0.011721, -0.013330, -0.014787, -0.015819, -0.015831, -0.013341, -0.013294, -0.014396, -0.015597, -0.016732, -0.017866, -0.019049, -0.020183, -0.021294, -0.022392, -0.023482, -0.024584, -0.025620, -0.026632, -0.027635, -0.028610, -0.029568, -0.030471, -0.031343, -0.032167, -0.032949, -0.033705, -0.034390, -0.035049, -0.035626, -0.036177, -0.036632, -0.037046, -0.037379, -0.037636, -0.037844, -0.037900, -0.037956, -0.037795, -0.037632, -0.037279, -0.036880, -0.036316, -0.035673, -0.034853, -0.033928, -0.032807, -0.031589, -0.030117, -0.028566, -0.026713, -0.024728, -0.022559, -0.020080, -0.017407, -0.014504, -0.011328, -0.007877, -0.004080, 0.000000], + [0.000000, 0.003048, 0.006097, 0.008608, 0.011185, 0.013335, 0.014867, 0.015929, 0.015529, 0.013610, 0.013035, 0.014337, 0.015581, 0.016832, 0.018111, 0.019329, 0.020531, 0.021697, 0.022906, 0.024091, 0.025223, 0.026306, 0.027390, 0.028452, 0.029448, 0.030403, 0.031337, 0.032208, 0.033045, 0.033830, 0.034541, 0.035205, 0.035790, 0.036347, 0.036788, 0.037196, 0.037485, 0.037723, 0.037858, 0.037896, 0.037882, 0.037709, 0.037536, 0.037130, 0.036723, 0.036126, 0.035482, 0.034663, 0.033759, 0.032702, 0.031552, 0.030225, 0.028810, 0.027200, 0.025529, 0.023624, 0.021621, 0.019482, 0.017151, 0.014691, 0.012081, 0.009311, 0.006362, 0.003256, 0.000000], + [0.000000, 0.006390, 0.012781, 0.019032, 0.024288, 0.028362, 0.031377, 0.031926, 0.029747, 0.026964, 0.027527, 0.030215, 0.032920, 0.035586, 0.038222, 0.040816, 0.043315, 0.045814, 0.048280, 0.050685, 0.053026, 0.055296, 0.057482, 0.059605, 0.061633, 0.063547, 0.065400, 0.067104, 0.068726, 0.070219, 0.071554, 0.072787, 0.073817, 0.074775, 0.075490, 0.076131, 0.076503, 0.076760, 0.076802, 0.076645, 0.076377, 0.075761, 0.075146, 0.074066, 0.072984, 0.071513, 0.069947, 0.068052, 0.066000, 0.063658, 0.061142, 0.058315, 0.055330, 0.052002, 0.048567, 0.044733, 0.040737, 0.036518, 0.031980, 0.027247, 0.022291, 0.017091, 0.011626, 0.005929, 0.000000], + ], +]; + +/// Share of the tint a colour gets, per wheel, chroma level and angle between its hue and the tint's (30 degree bins). +pub static DAMPING: [[[f32; 6]; 3]; 4] = [ + [ + [0.8972, 0.8972, 0.9472, 0.9883, 1.0299, 1.0456], + [0.8114, 0.8132, 0.8666, 0.9618, 0.9899, 1.0505], + [0.6237, 0.7830, 0.9143, 1.0750, 1.0236, 1.1827], + ], + [ + [0.9589, 0.9558, 0.9740, 0.9837, 0.9933, 0.9900], + [0.8359, 0.8761, 0.8829, 0.9179, 0.9269, 0.9107], + [1.0203, 0.9884, 0.9041, 0.9244, 0.9580, 1.0181], + ], + [ + [0.9719, 0.9822, 0.9888, 0.9888, 0.9830, 0.9826], + [0.9058, 0.8993, 0.9260, 0.9398, 0.9448, 0.9848], + [0.9056, 0.8774, 0.8967, 0.8801, 0.9082, 1.0064], + ], + [ + [0.9575, 0.9652, 0.9784, 0.9858, 0.9994, 0.9953], + [0.9106, 0.9254, 0.9445, 0.9744, 0.9827, 0.9793], + [0.8952, 0.8732, 0.9261, 0.9346, 0.9503, 0.9545], + ], +]; diff --git a/crates/pipeline/src/lib.rs b/crates/pipeline/src/lib.rs index f4ebeaca16a..e919b054f7a 100644 --- a/crates/pipeline/src/lib.rs +++ b/crates/pipeline/src/lib.rs @@ -37,6 +37,9 @@ mod curve_stage_tables; pub mod dust; pub mod finish; pub mod geometry; +pub mod grading_stage; +#[rustfmt::skip] +mod grading_stage_tables; pub mod light_v3; // generated (`light_v3_params.rs`), kept in its own compact layout #[rustfmt::skip] diff --git a/docs/gaps.md b/docs/gaps.md index d121b5ac713..5b6d2279c2d 100644 --- a/docs/gaps.md +++ b/docs/gaps.md @@ -17,7 +17,7 @@ Hours are Opus 5.5 agent wall-clock hours (see [target-app-parity.md](target-app |---:|---|---|---|---:|---| | 1 B | **Camera colour is estimated, not measured** (LR-PROF-CAMERACOLOR). Raws start from a per-file fit to the camera JPEG, 10 bundled profiles, 52 spectral matrices (plus same-sensor bodies, e.g. the X-T30 through the X-T3) or chart-measured matrices (the EOS D60); others use a neutral matrix (a black-and-white camera JPEG gives its tone curve only, #577; dark JPEG tones also guide the toe, #1307) | Ξ”E vs camera JPEG 2.9–10 after fitting (raw-parity.md); 1 chart-calibrated model (EOS D60: its Kelvin scale and fallback colour, the look stays the JPEG fit) vs 1,500 Adobe Standard profiles | every raw shooter sees colour that is close but not Lightroom's; some get neutral-matrix colour | 50–90 | [raw-parity](raw-parity.md#colour) | | 2 B | **CR3 variants no public file uses** (LR-IMP-FORMATS): `crx.rs` refuses vertical-tile C-RAW, partial-subband and other plane coding, multi-tile 0x200 and adaptive low-frequency gains, and those files fall back to the preview. All 110 CC0 CR3s on raw.pixls.us (31 folders) decode from sensor data, so none of these variants has a public sample; 26 CR3 bodies are verified (M50 / R100 / R8 exact, R5 Mark II pinned, 22 more pinned on one CC0 file each and checked against the camera JPEG, [cr3.md](cr3.md#further-bodies-one-cc0-file-each)). HEIF stills are `.HIF` files, not CR3; no CR3 sRAW / mRAW sample exists | measured: Canon's share whose camera fully works 73% β†’ 94% (raw-parity.md); 18 of 22 popular Canon bodies write CR3, all 18 now verified | +0.3 points of photographers; the variants surface only as user files that open as a preview | 10–25 | [raw-parity](raw-parity.md#remaining-work-ranked-by-photographers-unlocked-per-hour) | -| 3 B | **Render fidelity partial** (LR-BEHAV-RENDER-FIDELITY): calibrated camera-look Contrast and Blacks; other operators need measurement; from process V5 raw tone curves roll off into white in stops, so Exposure keeps recorded highlights (#1632); from V8 Whites, the tone curves and the colour mixer are measured against Camera Raw ([curve-stage.md](curve-stage.md), [mixer-stage.md](mixer-stage.md)) | process V3 reduces held-out response error from 0.136 to 0.038 stops for Contrast and 0.424 to 0.077 for Blacks on one Sony camera; Whites remains V2 pending a follow-up | imported Lightroom edits still differ, especially on uncalibrated operators and cameras | 30–60 | [calibrated Light operators](light-v3.md), [process versions](process-versions.md) | +| 3 B | **Render fidelity partial** (LR-BEHAV-RENDER-FIDELITY): calibrated camera-look Contrast and Blacks; other operators need measurement; from process V5 raw tone curves roll off into white in stops, so Exposure keeps recorded highlights (#1632); from V8 Whites, the tone curves, the colour mixer and Colour Grading are measured against Camera Raw ([curve-stage.md](curve-stage.md), [mixer-stage.md](mixer-stage.md), [grading-stage.md](grading-stage.md)) | process V3 reduces held-out response error from 0.136 to 0.038 stops for Contrast and 0.424 to 0.077 for Blacks on one Sony camera; Whites remains V2 pending a follow-up | imported Lightroom edits still differ, especially on uncalibrated operators and cameras | 30–60 | [calibrated Light operators](light-v3.md), [process versions](process-versions.md) | | 4 | ~~Original-pixel detail at 100%~~ (LR-VIEW-ZOOM): closed 2026-10-12, see Closed recently | checklist row βœ… | β€” | 0 | [ui-parity](ui-parity.md) | | 5 B | **AI masks: Subject, Sky, People, Background, Landscape** are heuristics; Object / Describe run SAM 3 but its download has no mirror configured | `crates/segment`; ai-masks.md; MASK rows 67% | masking is how most Lightroom users edit today | 40–70 + model decision | [target-app-parity](target-app-parity.md#ai) | | 6 | **Compressed ORF** (support withdrawn) | #3775 decoder removed pending provenance review; uncompressed support remains | compressed files use embedded JPEG previews when available, not sensor data | pending review | [orf-compression](orf-compression.md) | diff --git a/docs/grading-stage.md b/docs/grading-stage.md new file mode 100644 index 00000000000..2ea71070010 --- /dev/null +++ b/docs/grading-stage.md @@ -0,0 +1,85 @@ +# Colour Grading, measured (process V8) + +> **Changes:** [revision history](#revision-history) + +Process V8 renders Colour Grading (the shadows, midtones, highlights and global wheels with Blending and Balance) the +way Lightroom does, from measurements of Camera Raw's output. V1 to V7 are unchanged (`docs/process-versions.md`). +The code is `crates/pipeline/src/grading_stage.rs`, its measured tables `crates/pipeline/src/grading_stage_tables.rs`, +and the GPU kernel's `measured_grade` in `crates/gpu/src/wgsl/finish.wgsl`. + +## What was wrong + +Up to V7 each wheel adds a fixed OkLab tint, 0.09 at saturation 100, in the direction of the pure sRGB colour of the +wheel's hue, weighted by smooth steps in lightness. Measured against Camera Raw on charts of grey steps and colour +patches: + +- **The tints are the wrong size and direction.** Lightroom's tint at saturation 100 is 0.08 to 0.16 depending on + the hue. Wheel hue 0 points to OkLab hue 11 to 15 in Lightroom, 29 in V7. +- **The wheels reach different tones.** At Blending 50 Lightroom's shadows wheel peaks at lightness 0.33 and gives + at least half its tint from 0.12 to 0.52, so it barely touches the deepest shadows. V7's is strongest at black and + gone by 0.6. Lightroom's global wheel peaks in the midtones (0.62, half or more from 0.23 to 0.89). V7's is the + same at every lightness. Midtones peak at 0.59 and highlights at 0.84. +- **Colours that already lean the tint's way get less of it.** A saturated colour in the tint's direction gets 62% + of the shadows tint and about 90% of the highlights and global tints. V7 adds the full tint to every colour. + +## What V8 does + +At the end of the colour tools, where V7 grades (`ColorOps::grade`), in OkLab: + +1. Each wheel with a saturation above 0 adds its tint times its share at the pixel's lightness, times the damping. + - The tint comes from the measured table: 12 hues of 30Β°, saturation 25, 50 and 100, linear in between, and + from none at saturation 0. + - The share comes from the profile measured at the pixel's Blending, plus the change that Balance makes (not for + the global wheel). + - The damping depends on the pixel's chroma (levels 0.04, 0.08 and 0.12, from none at 0) and on the angle between + its hue and the tint's (bins of 30Β°). +2. Each wheel's Luminance adds a lightness change by lightness, measured at Β±50 and Β±100, linear in between. +3. The wheels act on the same input colour and their changes add. + +V7's grading is off under V8 (`ColorOps::grading` is `None`). With Colour Grading neutral the stage does not run. + +## How it was measured + +`tools/lr_grading_charts.py charts OUT_DIR` writes linear DNG charts with the grey steps and colour patches of +`tools/lr_tone_charts.py`, with the settings in the DNG's XMP (197 charts). It writes: + +- one neutral chart; +- each wheel at 12 hues Γ— 3 saturations; +- each wheel's Luminance at Β±50 and Β±100; +- Blending 0, 25, 75 and 100, and Balance Β±50 and Β±100; +- two combinations used only as checks. + +The charts are original test data. Every chart was rendered through Camera Raw to a 16-bit Adobe RGB (1998) TIFF. +Only that output is measured, and nothing of Adobe's is copied or shipped. + +`tools/lr_grading_charts.py tables RENDER_DIR OUT_RS` reads each render's patches as OkLab and writes +`grading_stage_tables.rs`: + +- The tints and profiles are fitted on the grey steps: the profile's shape is the mean tint size over the hues, + and each tint is the least-squares scale of its grey-step change against that shape. +- The damping comes from the colour patches. +- The Luminance curves are the grey steps' lightness change. + +It needs numpy and tifffile (`tools/requirements-lr-tone-charts.txt`). Running the tool again reproduces the +committed charts and the committed tables byte for byte. + +Predicting Camera Raw's edited charts from its neutral chart with the stage's rules leaves 1.26 (OkLab Γ— 100) on +average, against an average effect of 3.12. By kind: wheel hue and saturation 1.18 against 3.05, Luminance 0.79 +against 2.84, Blending 1.89 against 3.82, Balance 1.60 against 3.27, the two combinations 1.43 against 2.67. + +On 5 held-out Panasonic DC-S9 photos with 19 presets, rendered at 1,500 px and compared with Camera Raw's renders +after aligning the two engines' geometry, the mean OkLab a/b error falls from 1.32 to 1.19 (OkLab Γ— 100) over all +edit groups, and on the Teal & Orange preset from 2.66 to 1.34. + +## Limits + +- Camera Raw's tint also changes grey steps' lightness a little. Leaving that out costs on the charts (1.26 against + 0.93 with it), but including it made photos with several strong wheels worse, so the tint leaves lightness alone. +- The damping's chroma levels are the charts' nominal chroma, and the measured hues are 30Β° apart. +- Camera Raw's process version 2012 controls (`crs:ProcessVersion` 11.0), one chart layout, sRGB-gamut patches. + +## Revision history + +| Date | Change | Summary | +|---|---|---| +| 2026-11-10 | minor | Process V8: Colour Grading measured against Lightroom | diff --git a/docs/parity-checklist.md b/docs/parity-checklist.md index c41c74b8a65..857e69c527f 100644 --- a/docs/parity-checklist.md +++ b/docs/parity-checklist.md @@ -199,7 +199,7 @@ differences and missing bindings are in [ui-parity.md](ui-parity.md#shortcuts). | LR-EDIT-COLOR-MIXER-HSL | 8-band colour mixer | P0 | βœ… | `ctl:mixer.*`, `crates/pipeline/src/mixer_stage.rs` | from process V8 each slider follows Camera Raw's measured response on synthetic OkLCh charts (band centres, widths, the non-linear amount, side effects on lightness), applied before the tone curves ([mixer-stage.md](mixer-stage.md)); no targeted (drag-on-image) mode | | LR-EDIT-COLOR-MIXER-BW | B&W mix | P1 | βœ… | `ctl:bw.*`, `cmd:develop.autoBwMix` | eight bands; Auto pushes each hue band's colourful pixels away from the mean lightness (own rule) | | LR-EDIT-COLOR-POINTCOLOR | Point colour | P1 | βœ… | `cmd:pointColor.pick`, `cmd:pointColor.delete` | | -| LR-EDIT-COLOR-GRADING | Colour grading wheels | P0 | βœ… | `ctl:grading.*`, `crates/ui-egui/src/panels/edit.rs` (`grading`) | 3-Way / Shadows / Midtones / Highlights tabs; a range tab shows one large wheel with Hue, Saturation and Luminance sliders; Blending and Balance in every tab; 3-Way shows the hovered wheel's hue and saturation; every wheel marks its neutral centre; wheel modifiers as in Lightroom: Shift-drag keeps the puck's hue and changes saturation only (the spoke is the guide; a puck at the centre has no hue, so it takes the angle where the pointer pressed), Cmd/Ctrl-drag keeps the saturation and changes hue only (the circle is the guide), Alt/Option-drag fine-adjusts at 0.1x and combines with either lock, and a hover tooltip lists them (issues #559, #1160; tests `shift_dragging_across_the_tangent_keeps_the_hue_and_moves_saturation`, `shift_drag_keeps_the_pucks_hue_wherever_the_pointer_grabs`, `cmd_drag_keeps_the_saturation_and_changes_only_the_hue`, `alt_drag_fine_adjusts_to_a_tenth_of_the_pointers_travel`, `alt_works_with_shift_and_cmd_constraints` in `crates/ui-egui/src/tests/grading.rs`); a wheel drag holds the pointer as in Lightroom: hidden while dragging (the puck follows the mouse's travel; on macOS the pointer is locked in place), back where the button went down on release, and given back at once on Esc, a lost window focus or a wheel that goes away mid-drag; the browser can't move the pointer, so there it only shows again where the drag ended (issue #1899; tests `a_held_wheel_follows_the_mouses_motion_not_where_the_pointer_sits`, `a_wheel_drag_hides_the_pointer_and_releasing_puts_it_back_where_it_was_pressed`, `escape_or_losing_focus_gives_the_pointer_back_mid_drag`, `a_wheel_that_goes_away_mid_drag_gives_the_pointer_back`); the large wheel adds 25/50/75 % saturation rings (issue #559); each wheel's eye hides its effect for viewing only (`RenderJob::with_hidden_grading`, not saved, export unaffected) (issue #737). No Global wheel tab yet | +| LR-EDIT-COLOR-GRADING | Colour grading wheels | P0 | βœ… | `ctl:grading.*`, `crates/ui-egui/src/panels/edit.rs` (`grading`), `crates/pipeline/src/grading_stage.rs` | from process V8 the wheels follow Camera Raw's measured response on synthetic charts (tint size and direction, lightness reach by Blending and Balance, less tint for colours already leaning its way; [grading-stage.md](grading-stage.md)); 3-Way / Shadows / Midtones / Highlights tabs; a range tab shows one large wheel with Hue, Saturation and Luminance sliders; Blending and Balance in every tab; 3-Way shows the hovered wheel's hue and saturation; every wheel marks its neutral centre; wheel modifiers as in Lightroom: Shift-drag keeps the puck's hue and changes saturation only (the spoke is the guide; a puck at the centre has no hue, so it takes the angle where the pointer pressed), Cmd/Ctrl-drag keeps the saturation and changes hue only (the circle is the guide), Alt/Option-drag fine-adjusts at 0.1x and combines with either lock, and a hover tooltip lists them (issues #559, #1160; tests `shift_dragging_across_the_tangent_keeps_the_hue_and_moves_saturation`, `shift_drag_keeps_the_pucks_hue_wherever_the_pointer_grabs`, `cmd_drag_keeps_the_saturation_and_changes_only_the_hue`, `alt_drag_fine_adjusts_to_a_tenth_of_the_pointers_travel`, `alt_works_with_shift_and_cmd_constraints` in `crates/ui-egui/src/tests/grading.rs`); a wheel drag holds the pointer as in Lightroom: hidden while dragging (the puck follows the mouse's travel; on macOS the pointer is locked in place), back where the button went down on release, and given back at once on Esc, a lost window focus or a wheel that goes away mid-drag; the browser can't move the pointer, so there it only shows again where the drag ended (issue #1899; tests `a_held_wheel_follows_the_mouses_motion_not_where_the_pointer_sits`, `a_wheel_drag_hides_the_pointer_and_releasing_puts_it_back_where_it_was_pressed`, `escape_or_losing_focus_gives_the_pointer_back_mid_drag`, `a_wheel_that_goes_away_mid_drag_gives_the_pointer_back`); the large wheel adds 25/50/75 % saturation rings (issue #559); each wheel's eye hides its effect for viewing only (`RenderJob::with_hidden_grading`, not saved, export unaffected) (issue #737). No Global wheel tab yet | | LR-EDIT-EFFECTS-TEXTURE | Texture | P0 | βœ… | `ctl:effects.texture` | | | LR-EDIT-EFFECTS-CLARITY | Clarity | P0 | βœ… | `ctl:effects.clarity` | | | LR-EDIT-EFFECTS-DEHAZE | Dehaze | P0 | βœ… | `ctl:effects.dehaze` | | @@ -467,7 +467,7 @@ differences and missing bindings are in [ui-parity.md](ui-parity.md#shortcuts). | LR-BEHAV-OFFLINE | Offline editing | P1 | βœ… | | local-first: everything works offline | | LR-BEHAV-WEB-SAFETY | Library safety in the browser build | P1 | 🟑 | `cmd:file.backupLibrary`, `cmd:file.restoreLibrary`, `apps/lightcraft-web/src/safety.rs`, `apps/lightcraft-web/src/backup.rs`, `apps/lightcraft-web/src/files.rs` | web only (experimental): Back Up Library (zip of the catalog and every stored original) and a non-destructive Restore; failed saves show as unsaved and are retried; a photo that can't be stored isn't added; one tab per library (Web Locks); notices for storage that isn't persistent and for a library that can't open; `?reset` asks first; a panic shows a message. Missing: `?safe` start, deleting originals of removed photos, zip64 (backups > 4 GB) | | LR-BEHAV-GPU | GPU acceleration | P0 | βœ… | `crates/gpu/src/render.rs`, `cmd:app.gpu`, `docs/gpu-pipeline.md`, `crates/ui-egui/src/panels/notices.rs` | CPU fallback per render on device limits, out of memory, device errors / loss, incomplete or black results (`perf.gpuReason`, `perf.gpuFallback`; each render reports its own reason β€” `lightcraft_gpu::try_render`, `gpuFallback` per exported file β€” issue #675); short submissions for slow iGPUs; backend choice (DX12 only on Windows, `LIGHTCRAFT_GPU_BACKEND` / `WGPU_BACKEND`), device created after the window opens, crash sentinel (issue #136); a GPU lost while LightCraft runs (driver reset) stops it with that message and turns GPU rendering off for the next start, which says why (issue #1337; the window's renderer can't survive the lost device); quitting waits (up to 2 s) for renders in flight and starts no new GPU work, so none is inside the driver when the process exits (`crates/gpu/src/exit.rs`, issue #620; seen crashing only on Linux + NVIDIA, other drivers unverified); with GPU rendering on and no adapter found at all (e.g. no Vulkan loader on NixOS outside `nix develop`), the desktop app says once per session that it renders on the CPU and points to Help β–Έ System Info (`gpu_notice`; not when the GPU is turned off or only a software adapter exists); no tiling beyond the buffer limit (CPU) | -| LR-BEHAV-RENDER-FIDELITY | Rendering matches Lightroom | P1 | 🟑 | `crates/pipeline/src/lib.rs`, `crates/pipeline/src/tone.rs` | Process V4 calibrates global camera-look Contrast and Blacks against black-box Lightroom exports of Sony ILCE-7CR photos. Held-out response errors are 0.038 and 0.077 stops; V1/V2 keep their rendering. Whites retains V2 and awaits a follow-up. Exposure, Highlights/Shadows, other operators and broader camera coverage remain open (`docs/light-v3.md`). From process V8 Whites, the parametric curve and the point curves follow Camera Raw's measured response on synthetic grey steps, the master curve hue-preserving ([curve-stage.md](curve-stage.md)). From V8 the colour mixer follows Camera Raw's measured response on synthetic colour charts ([mixer-stage.md](mixer-stage.md)); Calibration, Saturation, Vibrance and Colour Grading are not measured in yet. From process V5 a raw's tone curve rolls off into white in stops (past a camera curve's last fitted knot, or from half a stop below the generic curve's white point instead of clipping), so Exposure +1 and +2 keep the highlights the sensor recorded: on 12 CC0 corpus raws and 6 CC0 DNGs on the generic curve, unclipped pixels whose luminance renders at 254 or more fall from up to 22.5 % to 0 at +1 EV and from up to 35 % to at most 0.03 % at +2 EV, apart from one sky that is mostly at the clip (#1632). Not compared with Lightroom's output | +| LR-BEHAV-RENDER-FIDELITY | Rendering matches Lightroom | P1 | 🟑 | `crates/pipeline/src/lib.rs`, `crates/pipeline/src/tone.rs` | Process V4 calibrates global camera-look Contrast and Blacks against black-box Lightroom exports of Sony ILCE-7CR photos. Held-out response errors are 0.038 and 0.077 stops; V1/V2 keep their rendering. Whites retains V2 and awaits a follow-up. Exposure, Highlights/Shadows, other operators and broader camera coverage remain open (`docs/light-v3.md`). From process V8 Whites, the parametric curve and the point curves follow Camera Raw's measured response on synthetic grey steps, the master curve hue-preserving ([curve-stage.md](curve-stage.md)). From V8 the colour mixer follows Camera Raw's measured response on synthetic colour charts ([mixer-stage.md](mixer-stage.md)), and Colour Grading too ([grading-stage.md](grading-stage.md)); Calibration, Saturation and Vibrance are not measured in yet. From process V5 a raw's tone curve rolls off into white in stops (past a camera curve's last fitted knot, or from half a stop below the generic curve's white point instead of clipping), so Exposure +1 and +2 keep the highlights the sensor recorded: on 12 CC0 corpus raws and 6 CC0 DNGs on the generic curve, unclipped pixels whose luminance renders at 254 or more fall from up to 22.5 % to 0 at +1 EV and from up to 35 % to at most 0.03 % at +2 EV, apart from one sky that is mostly at the clip (#1632). Not compared with Lightroom's output | | LR-BEHAV-DRAGDROP | Drag and drop | P1 | βœ… | `crates/ui-egui/src/lib.rs`, `crates/ui-egui/src/panels/grid.rs` (`drag_feedback`), `crates/ui-egui/src/panels/left.rs` (`drop_target`, `album_drag_over`, `top_level_drop_target`, `drag_auto_scroll`), `crates/ui-egui/src/destination.rs`, `crates/ui-egui/src/widgets.rs` (`context_menu`), `crates/ui-egui/src/widgets/text_field.rs`, `crates/ui-egui/src/tests/carried_right_click.rs`, `crates/ui-egui/src/tests/carried_text_field_menu.rs` | a right-click while photos are carried opens no context menu (every menu opened through `widgets::context_menu`: sidebar rows, grid cells, lists; a text field's own Cut / Copy / Paste menu too); files β†’ app (a drop-target card while they hover, then the import review); grid photos β†’ an album row (adds the selection, with a count badge while dragging); sidebar album / folder rows β†’ a folder (moves it; its name follows the pointer); a drag of albums or grid photos near the top or bottom edge of the sidebar scrolls it (faster nearer the edge, only while the pointer is over the sidebar); when another folder has the same name, the dragged label, the Move question and the toast name the folder it is in (`home (/a)`); an album drop's toast does the same for an album of that name in another album folder (two in the same place have nothing to tell them apart and keep the plain name); only the primary button drags photos and drops them: a right-button drag over a grid cell neither picks photos up nor changes the selection, and a right-button release while photos are dragged neither drops them nor ends the drag | | LR-BEHAV-TOAST | Toast notifications | P1 | βœ… | `crates/ui-egui/src/panels.rs` | | | LR-BEHAV-DIALOGS | Dialogs fit the window | P1 | βœ… | `crates/ui-egui/src/dialogs.rs` (`dialog_body`, `list_height`), `crates/ui-egui/src/tests/dialog_fit.rs`, `crates/ui-egui/src/tests/dialog_copy.rs`, `crates/ui-egui/src/tests/dialogs.rs` (`a_click_outside_closes_the_dialog_when_settings_allow_it`) | a dialog taller than the window (Export on a 1366Γ—768 screen, issue #781) never runs off it: its options scroll while the title bar and the Cancel / confirm row stay on screen (the confirm button names its action: Create, Rename, Create Stacks, Export 3 Photos…, with "OK" kept only for a one-field prompt opened with a command that has no verb, `crates/ui-egui/src/tests/dialog_copy.rs`); lists that scroll on their own (What's New, All Metadata, shortcuts, smart-album rules, credits) get shorter first; dialogs that fit look as before; Import keeps its own resizable, scrolling window; Settings β†’ Dialogs β†’ Close a dialog by clicking outside it (off by default, so a stray click never throws away a dialog's choices): a click pressed and released on the dimmed backdrop closes the dialog like Esc and doesn't reach the panels below, while a drag that ends outside (a slider pulled past the edge) or a click that closes a dropdown keeps it; the import review never closes this way (`clicked_backdrop`); a one-line prompt (Rename Folder, New Folder on Disk, the preset and version names, New Library when its name can't be used, Auto-Tag from Tracklog) the engine refuses stays open with its text and shows the reason in a toast, so the name can be corrected, where it used to close without a word; a New Folder on Disk that works says so (β€œCreated folder β€œSelects” in β€œ2026/Shoot””, naming the parent by its last two folders as dialogs do) | @@ -732,7 +732,7 @@ From `08-lightroom-classic-extras.md` (Classic-only features) and part 2 of `06- | LRC-DEV-CALIB | Calibration panel | P1 | βœ… | `ctl:calibration.*` | | | LRC-DEV-TAT | Targeted adjustment tools | P1 | βœ… | `cmd:develop.targeted` (`target`: curve / hue / sat / lum) | | | LRC-DEV-DEFAULTS | Per-camera raw defaults | P1 | βœ… | `cmd:library.preferences` (`camera`, `import.perCamera`), `crates/ui-egui/src/dialogs/settings.rs` | Settings β†’ Import: raw default and per-camera presets | -| LRC-DEV-PROCESS | Process versions, Update to Current Process | P1 | βœ… | `cmd:develop.updateProcess`, `cmd:develop.reset`, `cmd:develop.get`, `crates/develop/src/settings.rs`, `crates/pipeline/src/finish.rs`, `docs/process-versions.md` | Each photo keeps its saved rendering process. V1 is legacy, V2 preserves Highlights/Shadows detail, V3 is pixel-scale sharpening, V4 calibrates camera-look Contrast and Blacks, V5 rolls raw tone curves off into white in stops (#1632), V6 takes colour noise reduction to the joint method (#815), V7 draws film grain from crystal layers, V8 measures Whites, the tone curves and the colour mixer against Lightroom and keeps hue through the master curve. New photos and Reset use the latest; Update is one undoable step and never downgrades a future number. Copy/paste/sync preserve the receiving process. Persistent render keys include the resolved process from V3 on; V1/V2 keys remain unchanged. | +| LRC-DEV-PROCESS | Process versions, Update to Current Process | P1 | βœ… | `cmd:develop.updateProcess`, `cmd:develop.reset`, `cmd:develop.get`, `crates/develop/src/settings.rs`, `crates/pipeline/src/finish.rs`, `docs/process-versions.md` | Each photo keeps its saved rendering process. V1 is legacy, V2 preserves Highlights/Shadows detail, V3 is pixel-scale sharpening, V4 calibrates camera-look Contrast and Blacks, V5 rolls raw tone curves off into white in stops (#1632), V6 takes colour noise reduction to the joint method (#815), V7 draws film grain from crystal layers, V8 measures Whites, the tone curves, the colour mixer and Colour Grading against Lightroom and keeps hue through the master curve. New photos and Reset use the latest; Update is one undoable step and never downgrades a future number. Copy/paste/sync preserve the receiving process. Persistent render keys include the resolved process from V3 on; V1/V2 keys remain unchanged. | | LRC-DEV-VIEWOPTIONS | Develop view options | P2 | 🟑 | `cmd:view.viewOptions`, `crates/ui-egui/src/dialogs/settings.rs` (`view_options`) | View β–Έ View Options… (⌘J), the Loupe View part: Show Info Overlay with Info 1 / Info 2, and the three lines of each (none, file name, capture date, dimensions, exposure, camera, lens, camera + lens) with Use Defaults; Show Briefly When Photo Changes under each Info (one at most): with the overlay off, that Info shows for 3 s each time the loupe changes photo; General's Show message when loading or rendering photos (on by default; off, the loupe does not say "Rendering…"); applied as they change, saved with the app settings; `view.viewOptions {info1, info2, briefly, loupeMessages}` sets them for agents. Not yet: the Grid View tab, more fields (ratings, metadata, copy name), the video-frame option | | LRC-DEV-LOUPEOVERLAY | Loupe overlay: layout image | P2 | 🟑 | `cmd:view.chooseLayoutImage`, `cmd:view.layoutImage`, `cmd:view.layoutImageOpacity`, `cmd:view.layoutImageMatte`, `crates/ui-egui/src/panels/layout_overlay.rs` | View β–Έ Loupe Overlay: a PNG with transparency (a cover layout, a banner's safe areas) fitted and centred over the loupe photo, following zoom and pan; opacity and matte (the photo darkened outside the graphic's box) in steps; βŒ₯⌘O shows / hides it; read off the UI thread; saved with the UI state. Not yet: the Grid and Guides overlays, moving and resizing the layout with ⌘ held, free opacity / matte sliders | | LRC-DEV-VIDEO | Video frame capture | P2 | ⬜ | | | @@ -807,6 +807,7 @@ Latin stays upright. Advanced Japanese composition remains open. Regression cove | 2026-10-28 | minor | KEY-HIDEPINS βœ… β†’ 🟑: in the Masking panel an unmodified H toggles the mask pins (`view.maskPins`, the View β–Έ Show Mask Pins switch) instead of opening Remove; the toggle yields only to an explicit assignment of H itself, a Remove key reassigned to anything else still opens Remove there, and outside Masking β€” and the full-screen preview, where no panel shows β€” H keeps its own binding (Remove, by default). Remove's spot pins keep ⇧H as their only hide toggle (`tests/keymap` `h_toggles_the_mask_pins_while_masking`, `a_remapped_remove_key_still_opens_remove_while_masking`, `h_still_toggles_the_pins_when_remove_moves_to_another_key`) | | 2026-11-10 | minor | LR-EDIT-LIGHT-WHITES, LR-EDIT-LIGHT-CURVE-PARAM, LR-EDIT-LIGHT-CURVE-POINT, LR-BEHAV-RENDER-FIDELITY, LRC-DEV-PROCESS: process V8 measures Whites and the parametric curve against Camera Raw and applies the master curve hue-preserving ([curve-stage.md](curve-stage.md)); statuses unchanged | | 2026-11-10 | minor | LR-EDIT-COLOR-MIXER-HSL, LR-BEHAV-RENDER-FIDELITY, LRC-DEV-PROCESS: process V8 measures the colour mixer against Camera Raw and applies it before the tone curves ([mixer-stage.md](mixer-stage.md)); statuses unchanged | +| 2026-11-10 | minor | LR-EDIT-COLOR-GRADING, LR-BEHAV-RENDER-FIDELITY, LRC-DEV-PROCESS: process V8 measures Colour Grading against Camera Raw ([grading-stage.md](grading-stage.md)); statuses unchanged | | 2026-11-07 | minor | LR-EDIT-EFFECTS-GRAIN, LRC-DEV-PROCESS: process V7 takes film grain to crystal layers ([grain.md](grain.md)); V1 to V6 keep value noise | | 2026-11-06 | minor | LR-EDIT-DETAIL-CNR, LRC-DEV-PROCESS: process V6 takes colour noise reduction to the joint method on linear Rβˆ’Y / Bβˆ’Y (issue #815); status unchanged | | 2026-11-05 | minor | LR-BEHAV-RENDER-FIDELITY, LRC-DEV-PROCESS: process V5 rolls a raw's tone curve off into white in stops, past a camera curve's last knot and from half a stop below the generic curve's white point, so raising Exposure no longer turns recorded highlights white (#1632); statuses and counts unchanged | diff --git a/docs/process-versions.md b/docs/process-versions.md index a44fa949aa4..059ed1e96d6 100644 --- a/docs/process-versions.md +++ b/docs/process-versions.md @@ -16,7 +16,7 @@ stronger Light sliders, issue #196) without changing a single photo someone has | **V5** | V4 plus: a raw's tone curve rolls off into white in stops instead of reaching it within about a stop of the sensor's white, so raising Exposure keeps the highlights the sensor recorded (issue #1632). **Camera curve** (the look fitted to the embedded JPEG, or a DNG's `ProfileToneCurve`; `CameraTone`): past its last knot `CameraTone::apply_rolloff` closes the gap to white by `gap / (1 + cΒ·(2^t βˆ’ 1))` at `t` stops past the knot, with `c` matching the curve's slope there and the gap halving every stop in the end (`tone::ROLLOFF_STOPS`); `ToneMap::camera_rolloff_hdr` builds the table from it. Under V1 to V4 the curve past its last knot (fitted only to camera JPEG tones below 0.85, so 1 to 3 stops below the sensor's white on most photos) closes on white exponentially in linear light: the sensor's white renders at 8-bit 246 to 254 at Exposure 0 and 254 to 255 from Exposure +1. On the 11 CC0 corpus files with a fitted look (8 Sony, 2 Nikon, 1 Fujifilm) it now renders at 239 to 250 at Exposure 0 and 247 to 253 at +1. A DNG curve that reaches white at the sensor's white renders as before. **Generic curve** (raws without a camera curve, `ToneMap::rolloff_hdr`): from half a stop below its white point (`tone::GENERIC_KNEE_STOPS`) the same shoulder takes over, with the extended Reinhard curve's value and slope at the join, where V1 to V4 clip at the white point (scene 1.18 at default settings, ΒΌ stop above the sensor's white). The sensor's white renders at about 235, 248 and 252 at Exposure 0, +1 and +2 (V1 to V4: 239, 255, 255; the CC0 Canon R8 file and 6 CC0 DNGs without a camera curve). Content past the old clip point, such as a clipped sky, now renders up to 15 codes below white at Exposure 0 and reaches 255 about 5 stops past the sensor's white. Below the last knot or the join, JPEGs and other display-referred sources, and the camera fit itself are unchanged; CPU and GPU share the tone LUT. | | **V6** | V5 plus: colour noise reduction filters the linear colour differences Rβˆ’Y and Bβˆ’Y with the joint method (issue #815, `docs/nr-color-joint.md`): edge-aware weights from a denoised guide shared by both differences, anisotropic diffusion over scales, a brake for isolated colour specks; Y is kept exactly. V1 to V5 keep the blurred chromaticity (`local::denoise`). CPU (`local::denoise`) and GPU (`render::denoise`) branch on `local::joint_colour_nr`. Renders with Color 0 are the same as V2's. | | **V7** | V6 plus: film grain from crystal layers ([grain.md](grain.md), `crates/pipeline/src/crystal.rs`), after AurΓ©lien Pierre's model: resolution independent (a preview is the export's grain box-downscaled), fading out at black and white, calibrated to Lightroom Classic's strength and width at mid grey. V1 to V6 keep their two-octave value noise exactly (`finish::ValueGrain`; on the GPU `F_GRAIN_MODEL` 0); `finish::GrainModel::new` picks the model per process. Renders without grain don't depend on this. | -| **V8** (the latest) | V7 plus: Whites, the parametric curve and the point curves as Lightroom applies them ([curve-stage.md](curve-stage.md), `crates/pipeline/src/curve_stage.rs`), measured on Camera Raw renders of synthetic grey steps. Whites leaves the tone map and, with the parametric curve, comes from measured tables (Whites reaches into the midtones; the regions are broad and add); the master curve acts hue-preserving on sRGB-encoded linear ProPhoto RGB (largest and smallest channel through the curve, the middle one in proportion in linear light), then the red, green and blue curves per channel, between the calibrated Contrast and Blacks and the colour stage. V1 to V7 keep Whites in the tone map and their per-channel curves on the output. CPU (`finish::finish_with`) and GPU (`finish.wgsl::curve_stage`) share the tables. Renders with Whites, the parametric curve and the point curves neutral are V7's. The colour mixer follows Camera Raw's measured response on synthetic OkLCh charts ([mixer-stage.md](mixer-stage.md), `crates/pipeline/src/mixer_stage.rs`): per band and slider the hue shift, chroma change and lightness change by input hue, chroma and lightness, applied before the tone curves; V1 to V7 keep their mixer model after the curves (`ColorOps::mixer`). | +| **V8** (the latest) | V7 plus: Whites, the parametric curve and the point curves as Lightroom applies them ([curve-stage.md](curve-stage.md), `crates/pipeline/src/curve_stage.rs`), measured on Camera Raw renders of synthetic grey steps. Whites leaves the tone map and, with the parametric curve, comes from measured tables (Whites reaches into the midtones; the regions are broad and add); the master curve acts hue-preserving on sRGB-encoded linear ProPhoto RGB (largest and smallest channel through the curve, the middle one in proportion in linear light), then the red, green and blue curves per channel, between the calibrated Contrast and Blacks and the colour stage. V1 to V7 keep Whites in the tone map and their per-channel curves on the output. CPU (`finish::finish_with`) and GPU (`finish.wgsl::curve_stage`) share the tables. Renders with Whites, the parametric curve and the point curves neutral are V7's. The colour mixer follows Camera Raw's measured response on synthetic OkLCh charts ([mixer-stage.md](mixer-stage.md), `crates/pipeline/src/mixer_stage.rs`): per band and slider the hue shift, chroma change and lightness change by input hue, chroma and lightness, applied before the tone curves; V1 to V7 keep their mixer model after the curves (`ColorOps::mixer`). Colour Grading follows Camera Raw's measured response ([grading-stage.md](grading-stage.md), `crates/pipeline/src/grading_stage.rs`): per wheel a tint by hue and saturation, a lightness profile by Blending and Balance, a damping for colours already leaning the tint's way, and Luminance as a lightness change; V1 to V7 keep their grading (`ColorOps::grading`). | ## The rule @@ -114,6 +114,7 @@ extra field and retain their existing cached renders. No cache-version bump is n |---|---|---| | 2026-11-10 | minor | V8: Whites and the tone curves measured against Lightroom ([curve-stage.md](curve-stage.md)); V1 to V7 keep theirs | | 2026-11-10 | minor | V8: the colour mixer measured against Lightroom, before the tone curves ([mixer-stage.md](mixer-stage.md)); V1 to V7 keep theirs | +| 2026-11-10 | minor | V8: Colour Grading measured against Lightroom ([grading-stage.md](grading-stage.md)); V1 to V7 keep theirs | | 2026-11-07 | minor | V7: film grain from crystal layers ([grain.md](grain.md)); V1 to V6 keep their value noise | | 2026-11-05 | minor | V5: a raw's tone curve rolls off into white in stops, so raising Exposure keeps recorded highlights (#1632) | | 2026-10-12 | minor | Calibrated Contrast and Blacks, V2 Whites, resolved-process cache keys and number coordination | diff --git a/docs/whats-new.md b/docs/whats-new.md index 2aed03bed06..e0330d39445 100644 --- a/docs/whats-new.md +++ b/docs/whats-new.md @@ -2,6 +2,14 @@ ## Unreleased +### Colour Grading behaves as in Lightroom (process V8) +- The colour grading wheels now tint as strongly and in the same direction as Lightroom's, reach the same tones (the + shadows wheel spares the deepest blacks and reaches into the midtones, the global wheel acts most on the + midtones), and give less tint to colours that already lean its way, so a warm grade no longer oversaturates warm + colours. Blending, Balance and Luminance follow Lightroom's measured response too. This is part of rendering + process 8: photos you already edited keep their look until you choose Photo β–Έ Update to Current Process. See + [Colour Grading](grading-stage.md). + ### The colour mixer behaves as in Lightroom (process V8) - Each band of the colour mixer now covers the colours Lightroom's does (a red-orange such as skin answers to Orange, Blue reaches further towards aqua and purple), and Hue, Saturation and Luminance follow Lightroom's diff --git a/tools/lr_grading_charts.py b/tools/lr_grading_charts.py new file mode 100644 index 00000000000..ee5d11ea38b --- /dev/null +++ b/tools/lr_grading_charts.py @@ -0,0 +1,226 @@ +#!/usr/bin/env python3 +"""Measure Lightroom's Colour Grading on synthetic charts (process V8, docs/grading-stage.md). + + python3 tools/lr_grading_charts.py charts OUT_DIR + Writes linear DNG charts (the grey steps and colour patches of tools/lr_tone_charts.py) with the settings + embedded as XMP: one neutral chart; each wheel (shadows, midtones, highlights, global) at 12 hues x 3 + saturations, at Luminance -100/-50/50/100, at Blending 0/25/75/100 and (not global) at Balance + -100/-50/50/100; and two combinations used only as checks. + (render every DNG through Camera Raw to a 16-bit Adobe RGB (1998) TIFF with the same file name) + python3 tools/lr_grading_charts.py tables RENDER_DIR OUT_RS + Reads the renders and writes the Rust tables of `lightcraft_pipeline::grading_stage`. + +The charts are original test data generated here; nothing in them comes from Adobe. Only Camera Raw's output is +measured. Requires numpy and tifffile (tools/requirements-lr-tone-charts.txt). + +The model, per wheel: an OkLab tint (a, b) by wheel hue and saturation; a lightness profile (how much of the tint +each lightness gets) by Blending and Balance; a damping of the tint for colours that already lean its way, by their +chroma and the angle between their hue and the tint's; and the wheel's Luminance as a lightness change by lightness. +""" +import json +import os +import sys + +import numpy as np + +sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) +from lr_tone_charts import ADOBE_TO_XYZ, chart, write_dng, xmp # noqa: E402 + +WHEELS = { + "shadows": ("SplitToningShadowHue", "SplitToningShadowSaturation", "ColorGradeShadowLum"), + "midtones": ("ColorGradeMidtoneHue", "ColorGradeMidtoneSat", "ColorGradeMidtoneLum"), + "highlights": ("SplitToningHighlightHue", "SplitToningHighlightSaturation", "ColorGradeHighlightLum"), + "global": ("ColorGradeGlobalHue", "ColorGradeGlobalSat", "ColorGradeGlobalLum"), +} +HUES = tuple(range(0, 360, 30)) +SATS = (25, 50, 100) +BLENDS = (0, 25, 50, 75, 100) +BALANCES = (-100, -50, 0, 50, 100) +LUMS = (-100, -50, 50, 100) +CHROMA = (0.04, 0.08, 0.12) +GRID = 65 +# the hue and saturation each wheel is measured at for Blending and Balance +REF_HUE, REF_SAT = 30, 100 + +M1 = np.array([[0.8189330101, 0.3618667424, -0.1288597137], [0.0329845436, 0.9293118715, 0.0361456387], + [0.0482003018, 0.2643662691, 0.6338517070]]) +M2 = np.array([[0.2104542553, 0.793617785, -0.0040720468], [1.9779984951, -2.428592205, 0.4505937099], + [0.0259040371, 0.7827717662, -0.808675766]]) + + +def variants(): + v = {"neutral": {}} + for w, (kh, ks, kl) in WHEELS.items(): + for h in HUES: + for s in SATS: + v[f"{w}_h{h}_s{s}"] = {kh: h, ks: s, "ColorGradeBlending": 50} + for lum in (-50, 50): + v[f"{w}_lum{lum:+d}"] = {kl: lum, "ColorGradeBlending": 50} + split = {"SplitToningShadowHue": 52, "SplitToningShadowSaturation": 50, "SplitToningHighlightHue": 220, + "SplitToningHighlightSaturation": 50} + for b in (0, 25, 75, 100): + v[f"blend{b}"] = {**split, "ColorGradeBlending": b} + for bal in (-50, 50): + v[f"balance{bal:+d}"] = {**split, "ColorGradeBlending": 50, "SplitToningBalance": bal} + v["dm_grading"] = {"SplitToningShadowHue": 52, "SplitToningShadowSaturation": 20, "SplitToningHighlightHue": 34, + "SplitToningHighlightSaturation": 0, "SplitToningBalance": 40, "ColorGradeBlending": 100} + v["to_grading"] = {"SplitToningShadowHue": 205, "SplitToningShadowSaturation": 18, "SplitToningHighlightHue": 46, + "SplitToningHighlightSaturation": 80, "ColorGradeMidtoneHue": 45, "ColorGradeMidtoneSat": 22, + "ColorGradeGlobalHue": 46, "ColorGradeGlobalSat": 33, "ColorGradeBlending": 50} + for w, (kh, ks, kl) in WHEELS.items(): + for b in (0, 25, 75, 100): + v[f"{w}_blend{b}"] = {kh: REF_HUE, ks: REF_SAT, "ColorGradeBlending": b} + if w != "global": + for bal in (-100, -50, 50, 100): + v[f"{w}_bal{bal:+d}"] = {kh: REF_HUE, ks: REF_SAT, "ColorGradeBlending": 50, "SplitToningBalance": bal} + for lum in (-100, 100): + v[f"{w}_lum{lum:+d}"] = {kl: lum, "ColorGradeBlending": 50} + return v + + +# ---- tables ------------------------------------------------------------------------------------------------- + +def oklab_patches(path, patches): + """Mean colour of every patch of a Camera Raw render, as OkLab.""" + import tifffile + a = tifffile.imread(path).astype(np.float64) + a /= 65535.0 if a.max() > 255 else 255.0 + out = [] + for q in patches: + rgb = a[q["y"] + 8:q["y"] + q["h"] - 8, q["x"] + 8:q["x"] + q["w"] - 8].reshape(-1, 3).mean(0) + xyz = ADOBE_TO_XYZ @ (np.clip(rgb, 0, 1) ** (563 / 256)) + out.append(M2 @ np.cbrt(np.maximum(M1 @ xyz, 0))) + return np.array(out) + + +def tables(render_dir, out_rs): + patches = json.load(open(os.path.join(render_dir, "manifest.json")))["patches"] + ok = np.array([p["ok"] for p in patches]) + grey = ok & np.array([p["kind"] == "grey" for p in patches]) + col = ok & np.array([p["kind"] == "colour" for p in patches]) + cache = {} + + def lab(n): + if n not in cache: + cache[n] = oklab_patches(os.path.join(render_dir, f"grade__{n}.tif"), patches) + return cache[n] + + n0 = lab("neutral") + order = np.argsort(n0[grey][:, 0]) + grey_l = n0[grey][order, 0] + grid = np.linspace(0, 1, GRID) + + def offsets(n): + """(dL, da, db) of the grey steps against neutral, on the lightness grid; towards 0 below the darkest step.""" + d = (lab(n) - n0)[grey][order] + out = np.stack([np.interp(grid, grey_l, d[:, k]) for k in range(3)], 1) + low = grid < grey_l[0] + out[low] *= (grid[low] / grey_l[0])[:, None] + return out + + chroma = np.array([p.get("C", 0) for p in patches])[col] + nc = n0[col] + hue_c = np.arctan2(nc[:, 2], nc[:, 1]) + tint, pblend, pbal, lum, att = {}, {}, {}, {}, {} + for w in WHEELS: + # the profile's shape at Blending 50: mean tint size over the hues at saturation 100, peak 1 + size = np.mean([np.hypot(*offsets(f"{w}_h{h}_s100")[:, 1:].T) for h in HUES], 0) + prof = size / size.max() + for h in HUES: + for s in SATS: + tint[(w, h, s)] = (offsets(f"{w}_h{h}_s{s}") * prof[:, None]).sum(0)[1:] / (prof ** 2).sum() + ref = np.hypot(*tint[(w, REF_HUE, REF_SAT)]) + ref_name = f"{w}_h{REF_HUE}_s{REF_SAT}" + for b in BLENDS: + pblend[(w, b)] = np.hypot(*offsets(ref_name if b == 50 else f"{w}_blend{b}")[:, 1:].T) / ref + for a in BALANCES: + if w == "global": + pbal[(w, a)] = pblend[(w, 50)] + else: + pbal[(w, a)] = np.hypot(*offsets(ref_name if a == 0 else f"{w}_bal{a:+d}")[:, 1:].T) / ref + for v in LUMS: + lum[(w, v)] = offsets(f"{w}_lum{v:+d}")[:, 0] + # damping: the colour patches' change along the grey steps' tint, by chroma level and angle (6 x 30 degrees) + acc, cnt = np.zeros((3, 6)), np.zeros((3, 6)) + for h in HUES: + name = f"{w}_h{h}_s100" + d = (lab(name) - n0)[col] + g = offsets(name) + gd = np.stack([np.interp(nc[:, 0], grid, g[:, k]) for k in range(3)], 1) + mag = np.hypot(gd[:, 1], gd[:, 2]) + m = mag > 0.01 + u = gd[:, 1:] / np.maximum(mag, 1e-9)[:, None] + proj = (d[:, 1:] * u).sum(1) / np.maximum(mag, 1e-9) + ang = np.degrees(np.abs((hue_c - np.arctan2(gd[:, 2], gd[:, 1]) + np.pi) % (2 * np.pi) - np.pi)) + for i, c in enumerate(CHROMA): + for j in range(6): + k = m & (chroma == c) & (ang >= j * 30) & (ang < j * 30 + 30) + if k.any(): + acc[i, j] += np.median(proj[k]) + cnt[i, j] += 1 + att[w] = np.where(cnt > 0, acc / np.maximum(cnt, 1), 1.0) + + f = lambda v, p=6: f"{v:.{p}f}" + row = lambda vs, p=6: "[" + ", ".join(f(v, p) for v in vs) + "]" + names = list(WHEELS) + s = ["// @generated by tools/lr_grading_charts.py from Camera Raw renders of its synthetic charts (docs/grading-stage.md).", + "// OkLab. Wheels: shadows, midtones, highlights, global. Lightness grids: 65 steps from 0 to 1.", + "// Measured values, which can come close to a mathematical constant by chance.", + "#![allow(clippy::approx_constant)]", + "", + f"pub const HUES: [f32; {len(HUES)}] = [{', '.join(f'{h}.0' for h in HUES)}];", + f"pub const SATS: [f32; {len(SATS)}] = [{', '.join(f'{x}.0' for x in SATS)}];", + f"pub const BLENDS: [f32; {len(BLENDS)}] = [{', '.join(f'{x}.0' for x in BLENDS)}];", + f"pub const BALANCES: [f32; {len(BALANCES)}] = [{', '.join(f'{x}.0' for x in BALANCES)}];", + f"pub const LUMS: [f32; {len(LUMS)}] = [{', '.join(f'{x}.0' for x in LUMS)}];", + f"/// Nominal chroma of the damping's levels.", + f"pub const CHROMA: [f32; 3] = [{', '.join(str(c) for c in CHROMA)}];", + "", + "/// Tint (a, b) per wheel, hue and saturation.", + f"pub static TINT: [[[[f32; 2]; {len(SATS)}]; {len(HUES)}]; 4] = ["] + for w in names: + s.append(" [") + for h in HUES: + s.append(" [" + ", ".join(row(tint[(w, h, x)]) for x in SATS) + "],") + s.append(" ],") + s += ["];", "", + "/// Share of the tint by lightness, per wheel and Blending (at Balance 0).", + f"pub static PROFILE_BLEND: [[[f32; {GRID}]; {len(BLENDS)}]; 4] = ["] + for w in names: + s += [" ["] + [f" {row(pblend[(w, b)], 5)}," for b in BLENDS] + [" ],"] + s += ["];", "", + "/// Share of the tint by lightness, per wheel and Balance (at Blending 50; the global wheel ignores Balance).", + f"pub static PROFILE_BALANCE: [[[f32; {GRID}]; {len(BALANCES)}]; 4] = ["] + for w in names: + s += [" ["] + [f" {row(pbal[(w, a)], 5)}," for a in BALANCES] + [" ],"] + s += ["];", "", + "/// Lightness change by lightness, per wheel and Luminance.", + f"pub static LUM: [[[f32; {GRID}]; {len(LUMS)}]; 4] = ["] + for w in names: + s += [" ["] + [f" {row(lum[(w, v)])}," for v in LUMS] + [" ],"] + s += ["];", "", + "/// Share of the tint a colour gets, per wheel, chroma level and angle between its hue and the tint's (30 degree bins).", + "pub static DAMPING: [[[f32; 6]; 3]; 4] = ["] + for w in names: + s += [" ["] + [f" {row(att[w][i], 4)}," for i in range(3)] + [" ],"] + s += ["];", ""] + with open(out_rs, "w") as fh: + fh.write("\n".join(s)) + + +def main(): + if len(sys.argv) == 3 and sys.argv[1] == "charts": + out = sys.argv[2] + os.makedirs(out, exist_ok=True) + img, patches = chart() + json.dump(dict(patches=patches), open(os.path.join(out, "manifest.json"), "w")) + for name, settings in variants().items(): + write_dng(os.path.join(out, f"grade__{name}.dng"), img, xmp(**settings)) + elif len(sys.argv) == 4 and sys.argv[1] == "tables": + tables(sys.argv[2], sys.argv[3]) + else: + sys.exit(__doc__) + + +if __name__ == "__main__": + main() diff --git a/tools/requirements-lr-tone-charts.txt b/tools/requirements-lr-tone-charts.txt index 9a6ef1bb80f..1a33ee4b8d1 100644 --- a/tools/requirements-lr-tone-charts.txt +++ b/tools/requirements-lr-tone-charts.txt @@ -1,5 +1,6 @@ # Python packages for tools/lr_tone_charts.py (crates/pipeline/src/curve_stage_tables.rs, docs/curve-stage.md) -# and tools/lr_mixer_charts.py (crates/pipeline/src/mixer_stage.bin, docs/mixer-stage.md). +# tools/lr_mixer_charts.py (crates/pipeline/src/mixer_stage.bin, docs/mixer-stage.md) and +# tools/lr_grading_charts.py (crates/pipeline/src/grading_stage_tables.rs, docs/grading-stage.md). # python3 -m venv .venv-lr-tone && .venv-lr-tone/bin/pip install -r tools/requirements-lr-tone-charts.txt numpy==2.5.4 tifffile==2026.11.8 From b16fd0c4321ee47a1846f8e46b67f9a859170c04 Mon Sep 17 00:00:00 2001 From: smi-leonivkovic Date: Wed, 11 Nov 2026 06:52:29 +0100 Subject: [PATCH 04/51] LR-BEHAV-RENDER-FIDELITY: doc comments for the V8 curve stage, Gap 3 evidence for V8 Whites (#523) --- crates/pipeline/src/curve_stage.rs | 5 +++++ docs/gaps.md | 3 ++- tools/lr_tone_charts.py | 5 +++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/crates/pipeline/src/curve_stage.rs b/crates/pipeline/src/curve_stage.rs index bb516c5a432..c460ab7e00a 100644 --- a/crates/pipeline/src/curve_stage.rs +++ b/crates/pipeline/src/curve_stage.rs @@ -89,6 +89,7 @@ fn parametric(c: &ToneCurve) -> Lut1 { lut } +/// The measured Whites curve at `amount`, or `None` at 0. fn whites(amount: f64) -> Option { if amount == 0.0 { return None; @@ -179,11 +180,13 @@ impl CurveStage { } } +/// Linear Rec.2020 to linear ProPhoto and back, built once. fn matrices() -> &'static ([[f32; 3]; 3], [[f32; 3]; 3]) { static M: std::sync::OnceLock<([[f32; 3]; 3], [[f32; 3]; 3])> = std::sync::OnceLock::new(); M.get_or_init(crate::light_v3::prophoto_matrices) } +/// Multiplies a colour by a 3 Γ— 3 matrix. fn mul3(m: &[[f32; 3]; 3], d: [f32; 3]) -> [f32; 3] { std::array::from_fn(|r| m[r][0] * d[0] + m[r][1] * d[1] + m[r][2] * d[2]) } @@ -192,10 +195,12 @@ fn mul3(m: &[[f32; 3]; 3], d: [f32; 3]) -> [f32; 3] { mod tests { use super::*; + /// Default settings on process V8. fn v8() -> DevelopSettings { DevelopSettings { process: Process::V8.version(), ..Default::default() } } + /// V8 settings with only Whites at `v`. fn with_whites(v: f64) -> DevelopSettings { let mut s = v8(); s.light.whites = v; diff --git a/docs/gaps.md b/docs/gaps.md index 4e58bb69807..537eb72531f 100644 --- a/docs/gaps.md +++ b/docs/gaps.md @@ -17,7 +17,7 @@ Hours are Opus 5.5 agent wall-clock hours (see [target-app-parity.md](target-app |---:|---|---|---|---:|---| | 1 B | **Camera colour is estimated, not measured** (LR-PROF-CAMERACOLOR). Raws start from a per-file fit to the camera JPEG, 10 bundled profiles, 52 spectral matrices (plus same-sensor bodies, e.g. the X-T30 through the X-T3) or chart-measured matrices (the EOS D60); others use a neutral matrix (a black-and-white camera JPEG gives its tone curve only, #577; dark JPEG tones also guide the toe, #1307) | Ξ”E vs camera JPEG 2.9–10 after fitting (raw-parity.md); 1 chart-calibrated model (EOS D60: its Kelvin scale and fallback colour, the look stays the JPEG fit) vs 1,500 Adobe Standard profiles | every raw shooter sees colour that is close but not Lightroom's; some get neutral-matrix colour | 50–90 | [raw-parity](raw-parity.md#colour) | | 2 B | **CR3 variants no public file uses** (LR-IMP-FORMATS): `crx.rs` refuses vertical-tile C-RAW, partial-subband and other plane coding, multi-tile 0x200 and adaptive low-frequency gains, and those files fall back to the preview. All 110 CC0 CR3s on raw.pixls.us (31 folders) decode from sensor data, so none of these variants has a public sample; 26 CR3 bodies are verified (M50 / R100 / R8 exact, R5 Mark II pinned, 22 more pinned on one CC0 file each and checked against the camera JPEG, [cr3.md](cr3.md#further-bodies-one-cc0-file-each)). HEIF stills are `.HIF` files, not CR3; no CR3 sRAW / mRAW sample exists | measured: Canon's share whose camera fully works 73% β†’ 94% (raw-parity.md); 18 of 22 popular Canon bodies write CR3, all 18 now verified | +0.3 points of photographers; the variants surface only as user files that open as a preview | 10–25 | [raw-parity](raw-parity.md#remaining-work-ranked-by-photographers-unlocked-per-hour) | -| 3 B | **Render fidelity partial** (LR-BEHAV-RENDER-FIDELITY): calibrated camera-look Contrast and Blacks; other operators need measurement; from process V5 raw tone curves roll off into white in stops, so Exposure keeps recorded highlights (#1632); from V8 Whites and the tone curves are measured against Camera Raw ([curve-stage.md](curve-stage.md)) | process V3 reduces held-out response error from 0.136 to 0.038 stops for Contrast and 0.424 to 0.077 for Blacks on one Sony camera; Whites remains V2 pending a follow-up | imported Lightroom edits still differ, especially on uncalibrated operators and cameras | 30–60 | [calibrated Light operators](light-v3.md), [process versions](process-versions.md) | +| 3 B | **Render fidelity partial** (LR-BEHAV-RENDER-FIDELITY): calibrated camera-look Contrast and Blacks; other operators need measurement; from process V5 raw tone curves roll off into white in stops, so Exposure keeps recorded highlights (#1632); from V8 Whites and the tone curves are measured against Camera Raw ([curve-stage.md](curve-stage.md)) | process V3 reduces held-out response error from 0.136 to 0.038 stops for Contrast and 0.424 to 0.077 for Blacks on one Sony camera; Whites stays V2 in V4 to V7 | imported Lightroom edits still differ, especially on uncalibrated operators and cameras | 30–60 | [calibrated Light operators](light-v3.md), [process versions](process-versions.md) | | 4 | ~~Original-pixel detail at 100%~~ (LR-VIEW-ZOOM): closed 2026-10-12, see Closed recently | checklist row βœ… | β€” | 0 | [ui-parity](ui-parity.md) | | 5 B | **AI masks: Subject, Sky, People, Background, Landscape** are heuristics; Object / Describe run SAM 3 but its download has no mirror configured | `crates/segment`; ai-masks.md; MASK rows 67% | masking is how most Lightroom users edit today | 40–70 + model decision | [target-app-parity](target-app-parity.md#ai) | | 6 | **Compressed ORF** (support withdrawn) | #3775 decoder removed pending provenance review; uncompressed support remains | compressed files use embedded JPEG previews when available, not sensor data | pending review | [orf-compression](orf-compression.md) | @@ -90,6 +90,7 @@ Beta-blocking gaps (B) total **~230–430 h**; with the stability and platform w | Date | Change | Summary | |---|---|---| +| 2026-11-11 | minor | Gap 3: from process V8 Whites and the tone curves are measured against Camera Raw ([curve-stage.md](curve-stage.md)); gap not closed | | 2026-11-01 | minor | Gap 13: Lightroom catalog backup zips import directly, and a backup of an imported catalog adds no collection twice (#2592); the gap stays open | | 2026-11-07 | correction | Compressed ORF sensor support withdrawn pending provenance review; embedded preview fallback remains. Coverage regenerated without the removed decoder: 557 verified, 665 unverified, 187 preview-only, 37 unsupported; 94% use-weighted coverage. | | 2026-11-04 | minor | Compressed ORF support was introduced in #3775; subsequently withdrawn pending provenance review. Earlier clean-room and verification claims are withdrawn; compressed files use embedded previews when available. See [ORF status](orf-compression.md). | diff --git a/tools/lr_tone_charts.py b/tools/lr_tone_charts.py index c67aa2dad20..d52b6f6f3a8 100644 --- a/tools/lr_tone_charts.py +++ b/tools/lr_tone_charts.py @@ -90,6 +90,7 @@ def chart(): patches = [] def put(c, **k): + """Place patch colour `c` in the next cell; a colour outside 0..1 is listed but left black.""" i = len(patches) x, y = (i % (W // CELL)) * CELL, (i // (W // CELL)) * CELL ok = bool(np.all(c >= 0) and np.all(c <= 1)) @@ -108,6 +109,7 @@ def put(c, **k): def variants(): + """Name and XMP settings of every chart: neutral, each Whites amount, each region amount.""" v = {"neutral": {}} for a in WHITES: v[f"whites{a:+d}"] = {"Whites2012": a} @@ -127,6 +129,7 @@ def variants(): def srgb_encode(v): + """Linear to sRGB-encoded values.""" v = np.clip(v, 0, None) return np.where(v <= 0.0031308, v * 12.92, 1.055 * v ** (1 / 2.4) - 0.055) @@ -159,6 +162,7 @@ def delta_table(neutral, edited): def tables(render_dir, out_rs): + """Measure the Camera Raw renders in `render_dir` and write the Rust tables to `out_rs`.""" patches = json.load(open(os.path.join(render_dir, "manifest.json")))["patches"] tif = lambda n: os.path.join(render_dir, f"curve__{n}.tif") n0 = grey_levels(tif("neutral"), patches) @@ -183,6 +187,7 @@ def tables(render_dir, out_rs): def main(): + """Command line: `charts OUT_DIR` or `tables RENDER_DIR OUT_RS`.""" if len(sys.argv) == 3 and sys.argv[1] == "charts": out = sys.argv[2] os.makedirs(out, exist_ok=True) From a8280a64df2f3ad22cfc6156bbe229e878172580 Mon Sep 17 00:00:00 2001 From: smi-leonivkovic Date: Wed, 11 Nov 2026 06:53:21 +0100 Subject: [PATCH 05/51] LR-EDIT-COLOR-MIXER-HSL: test that V8 leaves the mixer to the mixer stage, doc comments (#523) --- crates/pipeline/src/colorops.rs | 10 ++++++++++ crates/pipeline/src/mixer_stage.rs | 5 +++++ docs/gaps.md | 1 + tools/lr_mixer_charts.py | 3 +++ 4 files changed, 19 insertions(+) diff --git a/crates/pipeline/src/colorops.rs b/crates/pipeline/src/colorops.rs index e6e25f4a5a1..82512233102 100644 --- a/crates/pipeline/src/colorops.rs +++ b/crates/pipeline/src/colorops.rs @@ -380,6 +380,16 @@ mod tests { assert!((cr - cr0).abs() < 0.01); } + #[test] + fn v8_leaves_the_mixer_to_the_mixer_stage() { + // from V8 `crate::mixer_stage` applies the mixer, so `ColorOps` must not apply it again + let mut s = DevelopSettings { process: lightcraft_develop::Process::V7.version(), ..DevelopSettings::default() }; + s.mixer.blue.sat = -100.0; + assert!(ColorOps::new(&s).mixer); + s.process = lightcraft_develop::Process::V8.version(); + assert!(!ColorOps::new(&s).mixer); + } + #[test] fn calibration_keeps_white_and_moves_primaries() { assert!(calibration_matrix(&Calibration::default()).is_none()); diff --git a/crates/pipeline/src/mixer_stage.rs b/crates/pipeline/src/mixer_stage.rs index 4f7e6644248..c746f48b554 100644 --- a/crates/pipeline/src/mixer_stage.rs +++ b/crates/pipeline/src/mixer_stage.rs @@ -48,10 +48,12 @@ pub struct MixerStage { pub table: Box<[f32; TABLE_LEN]>, } +/// The little-endian `f32` at byte `off` of the table, if it is inside. fn f32_at(off: usize) -> Option { TABLE.get(off..off + 4).and_then(|b| b.try_into().ok()).map(f32::from_le_bytes) } +/// The little-endian `u32` at byte `off` of the table, if it is inside. fn u32_at(off: usize) -> Option { TABLE.get(off..off + 4).and_then(|b| b.try_into().ok()).map(u32::from_le_bytes) } @@ -191,10 +193,12 @@ mod tests { use super::*; use lightcraft_develop::Hsl; + /// Default settings on process V8. fn v8() -> DevelopSettings { DevelopSettings { process: Process::V8.version(), ..Default::default() } } + /// OkLCh of a linear Rec.2020 colour (`h` in radians). fn lch_of(d: [f32; 3]) -> [f32; 3] { lab_to_lch(oklab_from_2020(d)) } @@ -204,6 +208,7 @@ mod tests { oklab_to_2020(lch_to_lab([l, c, h.to_radians()])) } + /// Hue change from `a` to `b` in degrees, in -180..180. fn hue_shift(a: [f32; 3], b: [f32; 3]) -> f32 { let d = (lch_of(b)[2] - lch_of(a)[2]).to_degrees(); (d + 180.0).rem_euclid(360.0) - 180.0 diff --git a/docs/gaps.md b/docs/gaps.md index e888c846d94..a1526ec23dd 100644 --- a/docs/gaps.md +++ b/docs/gaps.md @@ -90,6 +90,7 @@ Beta-blocking gaps (B) total **~230–430 h**; with the stability and platform w | Date | Change | Summary | |---|---|---| +| 2026-11-11 | minor | Gap 3: from process V8 the colour mixer is measured against Camera Raw ([mixer-stage.md](mixer-stage.md)); gap not closed | | 2026-11-11 | minor | Gap 3: from process V8 Whites and the tone curves are measured against Camera Raw ([curve-stage.md](curve-stage.md)); gap not closed | | 2026-11-01 | minor | Gap 13: Lightroom catalog backup zips import directly, and a backup of an imported catalog adds no collection twice (#2592); the gap stays open | | 2026-11-07 | correction | Compressed ORF sensor support withdrawn pending provenance review; embedded preview fallback remains. Coverage regenerated without the removed decoder: 557 verified, 665 unverified, 187 preview-only, 37 unsupported; 94% use-weighted coverage. | diff --git a/tools/lr_mixer_charts.py b/tools/lr_mixer_charts.py index c3e7a5a7f09..b5e279c2aed 100644 --- a/tools/lr_mixer_charts.py +++ b/tools/lr_mixer_charts.py @@ -69,6 +69,7 @@ def sliders(): def variants(): + """Name and XMP settings of every chart: neutral, then each mixer slider at each amount.""" v = {"neutral": {}} for stem, key in sliders(): for a in AMOUNTS: @@ -129,6 +130,7 @@ def response(lab0, lab, light, chroma): def table(render_dir, out_bin): + """Measure the Camera Raw renders in `render_dir` and write the binary table to `out_bin`.""" patches = [p for p in json.load(open(os.path.join(render_dir, "manifest.json")))["patches"] if p["ok"]] tif = lambda n: os.path.join(render_dir, f"mixer__{n}.tif") lab0 = oklab_patches(tif("neutral"), patches) @@ -157,6 +159,7 @@ def table(render_dir, out_bin): def main(): + """Command line: `charts OUT_DIR` or `table RENDER_DIR OUT_BIN`.""" if len(sys.argv) == 3 and sys.argv[1] == "charts": out = sys.argv[2] os.makedirs(out, exist_ok=True) From 4fd64f8a1ff9e81858f9a335be405cfc1cde9b56 Mon Sep 17 00:00:00 2001 From: smi-leonivkovic Date: Wed, 11 Nov 2026 06:54:23 +0100 Subject: [PATCH 06/51] LR-EDIT-COLOR-GRADING: mixer docs name V8's grading stage, doc comments (#523) --- crates/pipeline/src/grading_stage.rs | 3 +++ docs/mixer-stage.md | 6 ++++-- tools/lr_grading_charts.py | 4 ++++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/crates/pipeline/src/grading_stage.rs b/crates/pipeline/src/grading_stage.rs index 6ced6892cdb..9dfd3993603 100644 --- a/crates/pipeline/src/grading_stage.rs +++ b/crates/pipeline/src/grading_stage.rs @@ -64,6 +64,7 @@ fn bracket(keys: &[f32], x: f32) -> (usize, usize, f32) { } } +/// Linear blend of two lightness grids, `f` = 0 gives `a`. fn lerp_grid(a: &[f32; GRID], b: &[f32; GRID], f: f32) -> [f32; GRID] { std::array::from_fn(|i| a[i] * (1.0 - f) + b[i] * f) } @@ -175,10 +176,12 @@ impl GradingStage { mod tests { use super::*; + /// Default settings on process V8. fn v8() -> DevelopSettings { DevelopSettings { process: Process::V8.version(), ..Default::default() } } + /// The stage for V8 settings with Colour Grading set by `f`. fn stage(f: impl Fn(&mut ColorGrading)) -> GradingStage { let mut s = v8(); f(&mut s.grading); diff --git a/docs/mixer-stage.md b/docs/mixer-stage.md index a825ba01624..4d78af74a0e 100644 --- a/docs/mixer-stage.md +++ b/docs/mixer-stage.md @@ -41,8 +41,9 @@ After the tone map and V4's calibrated Contrast and Blacks, before the curve sta 4. Convert back to linear Rec.2020. V7's mixer in `ColorOps` is off under V8 (`ColorOps::mixer`), so the mixer applies once. With the mixer neutral the -stage does not run. Calibration, Saturation, Vibrance, Point Color, B&W and Colour Grading keep their V7 operators, -after the curves as before. +stage does not run. Calibration, Saturation, Vibrance, Point Color and B&W keep their V7 operators, after the +curves as before. Colour Grading also runs after the curves, through its own measured V8 stage +([grading-stage.md](grading-stage.md)). ## How it was measured @@ -78,4 +79,5 @@ and 1.66 with it after. Those check charts are not part of the tool. | Date | Change | Summary | |---|---|---| +| 2026-11-11 | patch | Colour Grading under V8 has its own measured stage, not V7's operator | | 2026-11-10 | minor | Process V8: the colour mixer measured against Lightroom, before the tone curves | diff --git a/tools/lr_grading_charts.py b/tools/lr_grading_charts.py index ee5d11ea38b..bf06369bf51 100644 --- a/tools/lr_grading_charts.py +++ b/tools/lr_grading_charts.py @@ -49,6 +49,7 @@ def variants(): + """Name and XMP settings of every chart (neutral, wheels, Luminance, Blending, Balance, checks).""" v = {"neutral": {}} for w, (kh, ks, kl) in WHEELS.items(): for h in HUES: @@ -94,6 +95,7 @@ def oklab_patches(path, patches): def tables(render_dir, out_rs): + """Measure the Camera Raw renders in `render_dir` and write the Rust tables to `out_rs`.""" patches = json.load(open(os.path.join(render_dir, "manifest.json")))["patches"] ok = np.array([p["ok"] for p in patches]) grey = ok & np.array([p["kind"] == "grey" for p in patches]) @@ -101,6 +103,7 @@ def tables(render_dir, out_rs): cache = {} def lab(n): + """OkLab patches of render `n`, read once.""" if n not in cache: cache[n] = oklab_patches(os.path.join(render_dir, f"grade__{n}.tif"), patches) return cache[n] @@ -209,6 +212,7 @@ def offsets(n): def main(): + """Command line: `charts OUT_DIR` or `tables RENDER_DIR OUT_RS`.""" if len(sys.argv) == 3 and sys.argv[1] == "charts": out = sys.argv[2] os.makedirs(out, exist_ok=True) From 969ab28170716ec66971e991ad7f904609610cbb Mon Sep 17 00:00:00 2001 From: smi-leonivkovic Date: Wed, 11 Nov 2026 07:24:29 +0100 Subject: [PATCH 07/51] LR-BEHAV-RENDER-FIDELITY: process V8, Lightroom's default base curve for camera profiles without one (#523) --- crates/engine/src/files/load.rs | 7 + crates/engine/src/smart.rs | 5 + crates/engine/src/tests/dcp.rs | 23 ++++ crates/gpu/src/params.rs | 2 + crates/gpu/src/wgsl/finish.wgsl | 19 ++- crates/gpu/tests/it/equivalence.rs | 27 ++++ crates/pipeline/src/default_tone.rs | 154 ++++++++++++++++++++++ crates/pipeline/src/default_tone_table.rs | 53 ++++++++ crates/pipeline/src/finish.rs | 26 +++- crates/pipeline/src/lib.rs | 9 ++ crates/pipeline/src/light_v3.rs | 4 +- docs/default-tone.md | 92 +++++++++++++ docs/gaps.md | 3 +- docs/parity-checklist.md | 3 +- docs/process-versions.md | 3 +- docs/whats-new.md | 9 ++ tools/lr_tone_charts.py | 25 +++- 17 files changed, 454 insertions(+), 10 deletions(-) create mode 100644 crates/pipeline/src/default_tone.rs create mode 100644 crates/pipeline/src/default_tone_table.rs create mode 100644 docs/default-tone.md diff --git a/crates/engine/src/files/load.rs b/crates/engine/src/files/load.rs index 0e396dd8150..60eeba5bb91 100644 --- a/crates/engine/src/files/load.rs +++ b/crates/engine/src/files/load.rs @@ -246,6 +246,12 @@ fn load_bytes_now( kept_tone, ); let local_tone = local_tone(&raw); + // From process V8 a profile without a tone curve of its own (Adobe Standard) renders with Lightroom's + // default curve, shifted by the camera's measured exposure offset (`lightcraft_pipeline::default_tone`). + let default_tone = dcp.filter(|p| p.color.profile.tone_curve.is_none()).map(|_| { + let m = &raw.metadata; + lightcraft_pipeline::default_tone::camera_ev(m.make.as_deref().unwrap_or(""), m.model.as_deref().unwrap_or("")) + }); let (temp, tint) = scale.as_shot(xy); return Ok(( img, @@ -259,6 +265,7 @@ fn load_bytes_now( legacy_relative_wb: scale.legacy_relative, camera_color, camera_tone, + default_tone, mattes, local_tone, // (the catalog knows the original's size: `media::source_info`) diff --git a/crates/engine/src/smart.rs b/crates/engine/src/smart.rs index b44d1f35a13..266db2a1909 100644 --- a/crates/engine/src/smart.rs +++ b/crates/engine/src/smart.rs @@ -97,6 +97,9 @@ struct SmartFacts { lens: Option, camera_color: Option, local_tone: Option, + /// `SourceInfo::default_tone` (absent in smart previews written before process V8's default curve). + #[serde(default)] + default_tone: Option, /// The semantic mattes whose bytes follow the facts, in this order. #[serde(default)] mattes: Vec, @@ -197,6 +200,7 @@ pub fn encode(img: &Rgb32f, info: Option<&SourceInfo>) -> Result, String lens: i.lens, camera_color: i.camera_color.as_deref().cloned(), local_tone: i.local_tone.as_deref().cloned(), + default_tone: i.default_tone, mattes: matte_list, }; let facts = serde_json::to_vec(&facts).map_err(|e| e.to_string())?; @@ -244,6 +248,7 @@ pub fn decode(bytes: &[u8]) -> Result<(Rgb32f, Option, Option 0.01, "V7 keeps the file's own tone: {}", v7.apply(0.18)); +} + #[test] fn import_choose_cache_persist_and_delete() { let dir = temp_dir("session"); diff --git a/crates/gpu/src/params.rs b/crates/gpu/src/params.rs index 8c52554c77a..a00c87322fa 100644 --- a/crates/gpu/src/params.rs +++ b/crates/gpu/src/params.rs @@ -30,6 +30,7 @@ const FIELDS: &[(&str, usize)] = &[ ("MSTAGE_OFF", 1), ("MGRADE", 1), ("MGRADE_OFF", 1), + ("RGB_TONE", 1), ("GAIN", 1), ("EV", 1), ("AIR", 1), @@ -292,6 +293,7 @@ pub fn finish_block(fp: &FinishParams, masks: &[[f32; MASK_TERMS]], present: &Pr // 0: off, else 1 + the number of wheels with a tint p.u("MGRADE", mgrade.map_or(0, |g| 1 + g.wheels.len() as u32)); p.u("MGRADE_OFF", mgrade_off as u32); + p.b("RGB_TONE", fp.rgb_tone); p.f("REFINE_SAT", fp.refine_sat); p.f("GAIN", fp.gain); p.f("EV", fp.ev); diff --git a/crates/gpu/src/wgsl/finish.wgsl b/crates/gpu/src/wgsl/finish.wgsl index 8342b941362..8f7d0dafed7 100644 --- a/crates/gpu/src/wgsl/finish.wgsl +++ b/crates/gpu/src/wgsl/finish.wgsl @@ -93,6 +93,21 @@ fn light_channel(k: u32, x: f32) -> f32 { return light_eval(k, encode_srgb(x)); } +// `default_tone::rgb_tone`: the base tone on the largest and smallest linear ProPhoto channel, the middle +// channel keeping its place between them (process V8 with Lightroom's default curve). +fn rgb_tone(c: vec3) -> vec3 { + let p = max(mul3(PRO_FROM_2020, c), vec3(0.0)); + let a = max(p.x, max(p.y, p.z)); + let b = min(p.x, min(p.y, p.z)); + let fa = tone_apply(a); + let fb = tone_apply(b); + var o = vec3(fa); + if (a > b) { + o = vec3(fb) + vec3(fa - fb) * (p - vec3(b)) / (a - b); + } + return mul3(PRO_TO_2020, o); +} + // `Operator::luminance`: scaled by F of the ProPhoto luminance over it. fn light_lum(k: u32, p: vec3) -> vec3 { let y = PRO_Y.x * p.x + PRO_Y.y * p.y + PRO_Y.z * p.z; @@ -822,7 +837,9 @@ fn main(@builtin(global_invocation_id) gid: vec3) { let yl = lum2020(c); let o = tone_apply(yl); var d = vec3(0.0); - if (yl > 1e-9) { + if (pu(F_RGB_TONE) != 0u) { + d = rgb_tone(c); + } else if (yl > 1e-9) { d = c * o / yl; } let k = chroma_scale(o); diff --git a/crates/gpu/tests/it/equivalence.rs b/crates/gpu/tests/it/equivalence.rs index e617ecb262b..c0ffd6ecf00 100644 --- a/crates/gpu/tests/it/equivalence.rs +++ b/crates/gpu/tests/it/equivalence.rs @@ -909,6 +909,33 @@ fn grading_stage_matches() { check("V8 grading, B&W", &src, &raw, &s, &req); } +/// Process V8's default curve for a raw whose profile has no tone curve (`default_tone`): the GPU applies it hue +/// preserving on linear ProPhoto channels as the CPU does, alone, with an exposure offset, with Exposure and +/// Contrast, with the curves and colour stages, and in HDR. +#[test] +fn default_tone_matches() { + if !gpu() { + return; + } + let src = scene(0, 960, 640); + let req = RenderRequest::fit(720, 720); + let v8 = || DevelopSettings { process: Process::V8.version(), ..Default::default() }; + let plain = SourceInfo { raw: true, default_tone: Some(0.0), ..Default::default() }; + check("V8 default curve", &src, &plain, &v8(), &req); + let shifted = SourceInfo { default_tone: Some(-0.1), ..plain.clone() }; + let mut s = v8(); + s.light.exposure = 0.7; + s.light.contrast = 30.0; + check("V8 default curve, offset, Exposure, Contrast", &src, &shifted, &s, &req); + s.mixer.orange.sat = 40.0; + s.grading.shadows = lightcraft_develop::Wheel { hue: 210.0, sat: 40.0, lum: 0.0 }; + s.curve.master = vec![Point { x: 0.0, y: 0.05 }, Point { x: 0.5, y: 0.6 }, Point { x: 1.0, y: 0.95 }]; + check("V8 default curve, mixer, grading, curves", &src, &shifted, &s, &req); + let mut h = v8(); + h.hdr.enabled = true; + check("V8 default curve, HDR", &src, &plain, &h, &req); +} + /// Issue #632: the Highlights / Shadows base of each process (V1: the edge-aware filter of log /// luminance; V2: of its fine median, a radius that grows with the render) matches the CPU's, and /// a warm cache never hands one process the other's base. diff --git a/crates/pipeline/src/default_tone.rs b/crates/pipeline/src/default_tone.rs new file mode 100644 index 00000000000..c45f8ac7042 --- /dev/null +++ b/crates/pipeline/src/default_tone.rs @@ -0,0 +1,154 @@ +//! Lightroom's default base curve, measured (process V8, `docs/default-tone.md`). +//! +//! A camera profile without a tone curve of its own (a DCP without `ProfileToneCurve`, such as the Adobe Standard +//! profiles) leaves the base tone to the raw converter. Lightroom then applies its default curve, hue preserving on +//! linear ProPhoto channels. Up to V7 LightCraft keeps the photo's own tone instead (the curve fitted to its camera +//! JPEG, `lightcraft_engine::files`), so the same profile renders brighter and flatter than in Lightroom. +//! +//! From V8 such a raw ([`SourceInfo::default_tone`]) gets the curve measured on Camera Raw's render of a synthetic +//! chart of grey steps (`tools/lr_tone_charts.py base`, [`crate::default_tone_table`]), applied the way Lightroom +//! applies it ([`rgb_tone`]). The chart is a DNG without a baseline exposure. Camera Raw gives a raw of another format +//! its own exposure offset per camera, which LightCraft does not know: [`camera_ev`] holds the offsets measured on +//! photos, and other cameras get none. + +use crate::SourceInfo; +use crate::default_tone_table::GREY; +use crate::tone::CameraTone; +use lightcraft_develop::{DevelopSettings, Process}; + +/// Exposure offsets measured per camera (make, model, stops) for a raw rendered through its Adobe Standard profile: +/// the shift of the chart's curve that leaves Lightroom's unedited renders of the camera's photos no brighter or +/// darker on average (`docs/default-tone.md`). +const CAMERA_EV: [(&str, &str, f32); 1] = [("Panasonic", "DC-S9", -0.10)]; + +/// The measured exposure offset of a camera in stops, 0 for a camera not measured. +pub fn camera_ev(make: &str, model: &str) -> f32 { + CAMERA_EV.iter().find(|(m, n, _)| make.trim().eq_ignore_ascii_case(m) && model.trim().eq_ignore_ascii_case(n)).map_or(0.0, |c| c.2) +} + +/// The default curve of `info` under `s`: from process V8, for a raw whose profile has no tone curve. +pub fn for_source(s: &DevelopSettings, info: &SourceInfo) -> Option { + let v8 = match s.process.process() { + Process::V1 | Process::V2 | Process::V3 | Process::V4 | Process::V5 | Process::V6 | Process::V7 => false, + Process::V8 => true, + }; + curve(info.default_tone.filter(|_| v8 && info.raw)?) +} + +/// The measured curve with the scene shifted by `ev` stops: 32 knots, evenly spaced in stops over the chart's grey +/// steps. Below the first knot the curve runs straight to black; past the last it rolls off into white +/// ([`CameraTone::apply_rolloff`]). +pub fn curve(ev: f32) -> Option { + if !ev.is_finite() { + return None; + } + let gain = 2f32.powf(ev); + let (x0, x1) = (GREY[0][0].ln(), GREY[GREY.len() - 1][0].ln()); + let knots: [[f32; 2]; 32] = std::array::from_fn(|i| { + let x = (x0 + (x1 - x0) * i as f32 / 31.0).exp(); + [x / gain, grey(x).min(0.9995)] + }); + CameraTone::new(knots) +} + +/// The chart's output at chart value `x` (linear in log `x` between the grey steps). +fn grey(x: f32) -> f32 { + let l = x.max(GREY[0][0]).ln(); + let i = GREY.partition_point(|g| g[0].ln() <= l).clamp(1, GREY.len() - 1); + let (a, b) = (GREY[i - 1], GREY[i]); + let t = ((l - a[0].ln()) / (b[0].ln() - a[0].ln())).clamp(0.0, 1.0); + a[1] + (b[1] - a[1]) * t +} + +/// The base tone as Lightroom applies it: `tone` on the largest and smallest channel in linear ProPhoto, the middle +/// channel keeping its place between them (linear Rec.2020 in and out). +pub fn rgb_tone(c: [f32; 3], tone: impl Fn(f32) -> f32) -> [f32; 3] { + let (to, from) = matrices(); + let p = mul3(to, c).map(|v| v.max(0.0)); + let (mut hi, mut lo) = (0, 0); + for k in 1..3 { + if p[k] > p[hi] { + hi = k; + } + if p[k] < p[lo] { + lo = k; + } + } + let (a, b) = (p[hi], p[lo]); + let (fa, fb) = (tone(a), tone(b)); + let out: [f32; 3] = std::array::from_fn(|k| if a > b { fb + (fa - fb) * (p[k] - b) / (a - b) } else { fa }); + mul3(from, out) +} + +/// Linear Rec.2020 to linear ProPhoto and back, built once. +fn matrices() -> &'static ([[f32; 3]; 3], [[f32; 3]; 3]) { + static M: std::sync::OnceLock<([[f32; 3]; 3], [[f32; 3]; 3])> = std::sync::OnceLock::new(); + M.get_or_init(crate::light_v3::prophoto_matrices) +} + +/// Multiplies a colour by a 3 Γ— 3 matrix. +fn mul3(m: &[[f32; 3]; 3], d: [f32; 3]) -> [f32; 3] { + std::array::from_fn(|r| m[r][0] * d[0] + m[r][1] * d[1] + m[r][2] * d[2]) +} + +#[cfg(test)] +mod tests { + use super::*; + + /// Settings on process `p`. + fn on(p: Process) -> DevelopSettings { + DevelopSettings { process: p.version(), ..Default::default() } + } + + /// A raw rendered through a profile without a tone curve, with exposure offset `ev`. + fn raw(ev: Option) -> SourceInfo { + SourceInfo { raw: true, default_tone: ev, ..Default::default() } + } + + #[test] + fn only_v8_raws_whose_profile_has_no_curve_get_it() { + assert!(for_source(&on(Process::V8), &raw(Some(0.0))).is_some()); + assert!(for_source(&on(Process::V7), &raw(Some(0.0))).is_none()); + assert!(for_source(&on(Process::V8), &raw(None)).is_none()); + let rendered = SourceInfo { raw: false, ..raw(Some(0.0)) }; + assert!(for_source(&on(Process::V8), &rendered).is_none()); + } + + #[test] + fn the_curve_follows_the_chart_and_the_offset_shifts_it() { + let c = curve(0.0).unwrap(); + for g in GREY.iter().filter(|g| g[0] > 0.01 && g[0] < 0.9) { + assert!((c.apply(g[0]) - g[1]).abs() < 0.01, "{g:?} -> {}", c.apply(g[0])); + } + // the chart's mid grey (scene 0.18) lands well above display 0.18: a base curve with contrast and lift + let mid = c.apply(0.18); + assert!(mid > 0.35 && mid < 0.45, "{mid}"); + // -0.1 stops: the scene needs 2^0.1 more light for the same output + let d = curve(-0.1).unwrap(); + assert!((d.apply(0.18 * 2f32.powf(0.1)) - mid).abs() < 2e-3); + assert!(curve(f32::NAN).is_none()); + } + + #[test] + fn camera_offsets_are_by_make_and_model() { + assert_eq!(camera_ev("Panasonic", "DC-S9"), -0.10); + assert_eq!(camera_ev("PANASONIC ", "dc-s9"), -0.10); + assert_eq!(camera_ev("Panasonic", "DC-S5M2"), 0.0); + assert_eq!(camera_ev("Sony", "ILCE-7M4"), 0.0); + } + + #[test] + fn rgb_tone_keeps_grey_grey_and_hue_in_prophoto() { + let c = curve(0.0).unwrap(); + let f = |v: f32| c.apply_rolloff(v); + let g = rgb_tone([0.18; 3], f); + assert!(g.iter().all(|v| (v - c.apply(0.18)).abs() < 1e-4), "{g:?}"); + // the middle ProPhoto channel keeps its relative place between the others + let (to, from) = matrices(); + let p = [0.30, 0.12, 0.05]; + let o = mul3(to, rgb_tone(mul3(from, p), f)); + let (r0, r1) = ((p[1] - p[2]) / (p[0] - p[2]), (o[1] - o[2]) / (o[0] - o[2])); + assert!((r0 - r1).abs() < 1e-3, "{r0} {r1}"); + assert!((o[0] - f(0.30)).abs() < 1e-4 && (o[2] - f(0.05)).abs() < 1e-4); + } +} diff --git a/crates/pipeline/src/default_tone_table.rs b/crates/pipeline/src/default_tone_table.rs new file mode 100644 index 00000000000..3176dba93ad --- /dev/null +++ b/crates/pipeline/src/default_tone_table.rs @@ -0,0 +1,53 @@ +// @generated by tools/lr_tone_charts.py from Camera Raw's render of its neutral synthetic chart (docs/default-tone.md). +// Grey steps: the chart's linear value in, the render's linear ProPhoto value out. + +pub const GREY: [[f32; 2]; 48] = [ + [0.002000, 0.000040], + [0.002283, 0.000104], + [0.002605, 0.000219], + [0.002974, 0.000424], + [0.003394, 0.000717], + [0.003874, 0.001144], + [0.004422, 0.001707], + [0.005047, 0.002339], + [0.005760, 0.002980], + [0.006574, 0.003607], + [0.007504, 0.004265], + [0.008565, 0.005058], + [0.009775, 0.006037], + [0.011157, 0.007229], + [0.012734, 0.008741], + [0.014535, 0.010636], + [0.016589, 0.012987], + [0.018934, 0.015945], + [0.021611, 0.019623], + [0.024666, 0.024203], + [0.028153, 0.029793], + [0.032133, 0.036603], + [0.036676, 0.044853], + [0.041860, 0.054620], + [0.047778, 0.066304], + [0.054532, 0.080238], + [0.062241, 0.096812], + [0.071040, 0.116504], + [0.081082, 0.139933], + [0.092545, 0.167734], + [0.105627, 0.200785], + [0.120560, 0.239611], + [0.137603, 0.282620], + [0.157055, 0.329237], + [0.179257, 0.379123], + [0.204598, 0.431716], + [0.233521, 0.486391], + [0.266533, 0.542321], + [0.304212, 0.598742], + [0.347217, 0.654951], + [0.396302, 0.710310], + [0.452325, 0.764074], + [0.516268, 0.815565], + [0.589251, 0.863751], + [0.672551, 0.907644], + [0.767627, 0.945887], + [0.876143, 0.977265], + [1.000000, 0.999998], +]; diff --git a/crates/pipeline/src/finish.rs b/crates/pipeline/src/finish.rs index 109632bff33..67f6d81f7e8 100644 --- a/crates/pipeline/src/finish.rs +++ b/crates/pipeline/src/finish.rs @@ -239,6 +239,9 @@ pub struct FinishParams { /// A LUT profile and its amount (0..2), applied to the display-encoded colour. pub lut: Option<(std::sync::Arc, f32)>, pub tone: ToneMap, + /// Process V8 with Lightroom's default curve ([`crate::default_tone`]): the tone map applies hue preserving + /// on linear ProPhoto channels ([`crate::default_tone::rgb_tone`]) instead of scaling by luminance. + pub rgb_tone: bool, /// Process V4's calibrated Contrast and Blacks on the camera-look path, applied after /// the tone map (`None`: another process or path, or both at 0; see [`crate::light_v3`]). pub light: Option, @@ -336,6 +339,7 @@ impl FinishParams { calib: if calibration { crate::colorops::calibration_matrix(&s.calibration) } else { None }, shadow_tint: if calibration { (s.calibration.shadows_tint / 100.0) as f32 } else { 0.0 }, tone: base_tone(s, info, peak), + rgb_tone: crate::default_tone::for_source(s, info).is_some(), light: crate::light_v3::LightOps::new(s, info), lut: crate::lut::get(&s.profile.id).map(|l| (l, (s.profile.amount / 100.0).clamp(0.0, 2.0) as f32)), ops: ColorOps::new(s), @@ -419,15 +423,29 @@ pub fn base_tone(s: &DevelopSettings, info: &SourceInfo, peak: f32) -> ToneMap { None => ToneMap::display_hdr(l.contrast, l.whites, l.blacks, peak), }, // V7, with Whites moved out of the tone map: the curve stage applies Whites as measured against - // Lightroom (`crate::curve_stage`) - Process::V8 => match info.camera_tone.as_ref().filter(|_| info.raw) { - Some(curve) => ToneMap::camera_rolloff_hdr(curve, 0.0, 0.0, 0.0, peak), + // Lightroom (`crate::curve_stage`). A raw whose profile has no tone curve gets Lightroom's default + // curve, measured (`crate::default_tone`), instead of its own. + Process::V8 => match crate::default_tone::for_source(s, info).or(info.camera_tone.filter(|_| info.raw)) { + Some(curve) => ToneMap::camera_rolloff_hdr(&curve, 0.0, 0.0, 0.0, peak), None if info.raw => ToneMap::rolloff_hdr(l.contrast, 0.0, l.blacks, peak), None => ToneMap::display_hdr(l.contrast, 0.0, l.blacks, peak), }, } } +/// The base tone map applied to colour `c` (linear Rec.2020, luminance `yl`, tone-mapped luminance `o`): scaled by +/// the luminance change, or from process V8 on Lightroom's default curve hue preserving on linear ProPhoto channels +/// ([`FinishParams::rgb_tone`]). +fn tone_mapped(fp: &FinishParams, c: [f32; 3], yl: f32, o: f32) -> [f32; 3] { + if fp.rgb_tone { + crate::default_tone::rgb_tone(c, |v| fp.tone.apply(v)) + } else if yl > 1e-9 { + c.map(|v| v * o / yl) + } else { + [0.0; 3] + } +} + /// Finish the prepared pipeline stages into an 8-bit RGBA image in `space` (or `display`). pub(crate) fn finish(p: &Prepared, s: &DevelopSettings, frame: &Frame, info: &SourceInfo, req: &crate::RenderRequest) -> Rgba8 { let (space, display, proof) = (req.space, req.display.as_ref(), req.proof); @@ -557,7 +575,7 @@ pub(crate) fn finish_with( // --- tone map on luminance, highlight desaturation let yl = luminance_2020(c); let o = fp.tone.apply(yl); - let mut d = if yl > 1e-9 { c.map(|v| v * o / yl) } else { [0.0; 3] }; + let mut d = tone_mapped(fp, c, yl, o); let k = fp.tone.chroma_scale(o); if k != 1.0 { d = d.map(|v| o + (v - o) * k); diff --git a/crates/pipeline/src/lib.rs b/crates/pipeline/src/lib.rs index e919b054f7a..73579c84d99 100644 --- a/crates/pipeline/src/lib.rs +++ b/crates/pipeline/src/lib.rs @@ -34,6 +34,9 @@ pub mod curve; pub mod curve_stage; #[rustfmt::skip] mod curve_stage_tables; +pub mod default_tone; +#[rustfmt::skip] +mod default_tone_table; pub mod dust; pub mod finish; pub mod geometry; @@ -108,6 +111,11 @@ pub struct SourceInfo { /// the developed pixels (Bradford, linear Rec.2020). pub camera_color: Option>, pub camera_tone: Option, + /// The raw is rendered through a camera profile without a tone curve of its own (a DCP without + /// `ProfileToneCurve`, such as Adobe Standard): from process V8 its base tone is Lightroom's default curve, + /// measured, with the scene shifted by this many stops, the camera's measured exposure offset + /// ([`default_tone`]; 0 for a camera not measured). `None`: the profile has its own curve, or no profile. + pub default_tone: Option, /// Segmentation mattes stored in the file (DNG semantic masks): AI masks use them. pub mattes: Option>, /// The raw's own local tone mapping (DNG `ProfileGainTableMap`), rendered only when the @@ -131,6 +139,7 @@ impl Default for SourceInfo { legacy_relative_wb: false, camera_color: None, camera_tone: None, + default_tone: None, mattes: None, local_tone: None, native_long: None, diff --git a/crates/pipeline/src/light_v3.rs b/crates/pipeline/src/light_v3.rs index 5f3e0f9bf24..bb17906b093 100644 --- a/crates/pipeline/src/light_v3.rs +++ b/crates/pipeline/src/light_v3.rs @@ -284,7 +284,9 @@ pub fn applies(s: &DevelopSettings, info: &SourceInfo) -> bool { let camera_look = info.raw && info.camera_tone.is_some(); match s.process.process() { Process::V1 | Process::V2 | Process::V3 => false, - Process::V4 | Process::V5 | Process::V6 | Process::V7 | Process::V8 => camera_look, + Process::V4 | Process::V5 | Process::V6 | Process::V7 => camera_look, + // a raw on Lightroom's default curve has a camera curve too, even when no tone was fitted to its JPEG + Process::V8 => camera_look || crate::default_tone::for_source(s, info).is_some(), } } diff --git a/docs/default-tone.md b/docs/default-tone.md new file mode 100644 index 00000000000..89faf982d5b --- /dev/null +++ b/docs/default-tone.md @@ -0,0 +1,92 @@ +# Lightroom's default base curve, measured (process V8) + +> **Changes:** [revision history](#revision-history) + +Process V8 gives a raw rendered through a camera profile without a tone curve of its own the base tone Lightroom +gives it, from measurements of Camera Raw's output. V1 to V7 are unchanged (`docs/process-versions.md`). The code is +`crates/pipeline/src/default_tone.rs`, its measured table `crates/pipeline/src/default_tone_table.rs`, and the GPU +kernel's `rgb_tone` in `crates/gpu/src/wgsl/finish.wgsl`. + +## What was wrong + +A DNG camera profile (`.dcp`) may carry a tone curve (`ProfileToneCurve`). Adobe Standard profiles do not: they leave +the base tone to the raw converter. Lightroom then applies its default base curve. Up to V7 LightCraft keeps the +photo's own tone instead: the file's DNG tone curve, or else the curve fitted to the camera JPEG +(`files::load`, `kept_tone`). Measured against Camera Raw: + +- **The base curve is a different one.** Lightroom's default curve lifts the midtones more and rolls off into white + later than a typical camera JPEG's. On 5 held-out Panasonic Lumix DC-S9 raws with the Adobe Standard profile, the + unedited V7 render is off by 5.03 in lightness (RMS, OkLab Γ— 100), and brighter by 2.41 on average. +- **It is applied to luminance, not to the channels.** V7 scales all three channels by the curve's change in + luminance. Lightroom applies the curve to the largest and the smallest channel in linear ProPhoto RGB, and the + middle channel keeps its relative position between them. On the 327 colour patches of the neutral chart this rule + predicts Camera Raw's output within 0.26 (OkLab Γ— 100). Scaling by luminance misses by 5.31, and the curve on each + channel by 0.86. + +## What V8 does + +For a raw whose profile has no tone curve (`SourceInfo::default_tone`, set by `files::load` when a camera profile +without `ProfileToneCurve` is chosen): + +1. The base tone map's camera curve is the measured default curve (`default_tone::curve`): 32 knots evenly spaced in + stops over the chart's grey steps, the scene shifted by the camera's exposure offset. Past the last knot it rolls + off into white in stops, as V5 extends every camera curve (#1632). +2. The tone map applies hue preserving on linear ProPhoto channels (`default_tone::rgb_tone`), not by luminance. +3. Contrast and Blacks keep V4's calibrated operators, and Whites, the curves, the colour mixer and Colour Grading + follow as before ([curve-stage.md](curve-stage.md), [mixer-stage.md](mixer-stage.md), + [grading-stage.md](grading-stage.md)). + +A raw without a camera profile, a profile with a tone curve of its own, and a rendered file are unchanged. + +**The exposure offset.** The chart is a DNG with a baseline exposure of 0. For a raw of another format (RW2, ARW, NEF +and so on) Camera Raw uses an exposure offset of its own per camera, which the file does not carry and LightCraft +does not know. `default_tone::camera_ev` holds the offsets measured on photos: + +| Camera | Offset (stops) | Measured on | +|---|---:|---| +| Panasonic Lumix DC-S9 (RW2) | βˆ’0.10 | 5 photos, the shift that leaves Lightroom's unedited renders no brighter or darker on average | + +Other cameras get 0. Without the offset the S9 renders 1.1 lighter in lightness than Lightroom (OkLab Γ— 100), so a +camera not measured can be off by about that much. + +## How it was measured + +`tools/lr_tone_charts.py base RENDER_DIR OUT_RS` reads Camera Raw's render of the neutral chart of +`tools/lr_tone_charts.py charts` (48 grey steps, geometric from 0.002 to 1, linear DNG, settings neutral) and writes +the grey steps (chart value in, linear ProPhoto value out) to `default_tone_table.rs`. The chart is original test +data. It was rendered through Camera Raw to a 16-bit Adobe RGB (1998) TIFF, and only that output is measured. Nothing +of Adobe's is copied or shipped, and no profile's contents are read: the only fact taken from a profile is whether it +has a tone curve. Running the tool again writes the committed table byte for byte. + +The offset was fitted on 5 training photos of the DC-S9 and checked on 5 others held out from fitting. + +## Results + +Held-out Panasonic Lumix DC-S9 photos (RW2, Adobe Standard profile, 1,500 px, aligned against Camera Raw's renders), +lightness RMS and mean a/b error (OkLab Γ— 100), lower is better: + +| Edits | Tone: before β†’ this | Colour: before β†’ this | +|---|---|---| +| Unedited | 5.03 β†’ 0.69 | 1.00 β†’ 0.27 | +| Highlights, Shadows | 6.20 β†’ 3.26 | 1.02 β†’ 0.38 | +| Highlights and Shadows together | 8.66 β†’ 6.59 | 1.01 β†’ 0.62 | +| 19 presets (7 groups) | 6.38 β†’ 2.61 | 1.26 β†’ 0.73 | + +"Before" is process V8 without this change. + +Unedited, the five photos are off by 0.44 to 1.10 in lightness and on average 0.09 darker than Lightroom (2.41 +lighter before). No preset gets worse in tone or in colour. + +## Limits + +- One camera's offset is measured. Others render with the chart's curve as it is. +- The curve is measured for Camera Raw's process version 2012 (`crs:ProcessVersion` 11.0), one chart, grey steps up to + the DNG's white. Above white it rolls off as V5's camera curves do, not as measured. +- Smart previews are built without the imported camera profile, so a photo whose original is offline renders + without the profile, and so without this curve, until the original is back (as before). + +## Revision history + +| Date | Change | Summary | +|---|---|---| +| 2026-11-11 | minor | Process V8: Lightroom's default base curve for a raw whose camera profile has none | diff --git a/docs/gaps.md b/docs/gaps.md index 63de6110a55..508e1abc058 100644 --- a/docs/gaps.md +++ b/docs/gaps.md @@ -17,7 +17,7 @@ Hours are Opus 5.5 agent wall-clock hours (see [target-app-parity.md](target-app |---:|---|---|---|---:|---| | 1 B | **Camera colour is estimated, not measured** (LR-PROF-CAMERACOLOR). Raws start from a per-file fit to the camera JPEG, 10 bundled profiles, 52 spectral matrices (plus same-sensor bodies, e.g. the X-T30 through the X-T3) or chart-measured matrices (the EOS D60); others use a neutral matrix (a black-and-white camera JPEG gives its tone curve only, #577; dark JPEG tones also guide the toe, #1307) | Ξ”E vs camera JPEG 2.9–10 after fitting (raw-parity.md); 1 chart-calibrated model (EOS D60: its Kelvin scale and fallback colour, the look stays the JPEG fit) vs 1,500 Adobe Standard profiles | every raw shooter sees colour that is close but not Lightroom's; some get neutral-matrix colour | 50–90 | [raw-parity](raw-parity.md#colour) | | 2 B | **CR3 variants no public file uses** (LR-IMP-FORMATS): `crx.rs` refuses vertical-tile C-RAW, partial-subband and other plane coding, multi-tile 0x200 and adaptive low-frequency gains, and those files fall back to the preview. All 110 CC0 CR3s on raw.pixls.us (31 folders) decode from sensor data, so none of these variants has a public sample; 26 CR3 bodies are verified (M50 / R100 / R8 exact, R5 Mark II pinned, 22 more pinned on one CC0 file each and checked against the camera JPEG, [cr3.md](cr3.md#further-bodies-one-cc0-file-each)). HEIF stills are `.HIF` files, not CR3; no CR3 sRAW / mRAW sample exists | measured: Canon's share whose camera fully works 73% β†’ 94% (raw-parity.md); 18 of 22 popular Canon bodies write CR3, all 18 now verified | +0.3 points of photographers; the variants surface only as user files that open as a preview | 10–25 | [raw-parity](raw-parity.md#remaining-work-ranked-by-photographers-unlocked-per-hour) | -| 3 B | **Render fidelity partial** (LR-BEHAV-RENDER-FIDELITY): calibrated camera-look Contrast and Blacks; other operators need measurement; from process V5 raw tone curves roll off into white in stops, so Exposure keeps recorded highlights (#1632); from V8 Whites, the tone curves, the colour mixer and Colour Grading are measured against Camera Raw ([curve-stage.md](curve-stage.md), [mixer-stage.md](mixer-stage.md), [grading-stage.md](grading-stage.md)) | process V3 reduces held-out response error from 0.136 to 0.038 stops for Contrast and 0.424 to 0.077 for Blacks on one Sony camera; Whites stays V2 in V4 to V7 | imported Lightroom edits still differ, especially on uncalibrated operators and cameras | 30–60 | [calibrated Light operators](light-v3.md), [process versions](process-versions.md) | +| 3 B | **Render fidelity partial** (LR-BEHAV-RENDER-FIDELITY): calibrated camera-look Contrast and Blacks; other operators need measurement; from process V5 raw tone curves roll off into white in stops, so Exposure keeps recorded highlights (#1632); from V8 Whites, the tone curves, the colour mixer and Colour Grading are measured against Camera Raw ([curve-stage.md](curve-stage.md), [mixer-stage.md](mixer-stage.md), [grading-stage.md](grading-stage.md)), and a raw whose camera profile has no tone curve gets Lightroom's measured default base curve ([default-tone.md](default-tone.md)) | process V3 reduces held-out response error from 0.136 to 0.038 stops for Contrast and 0.424 to 0.077 for Blacks on one Sony camera; Whites stays V2 in V4 to V7 | imported Lightroom edits still differ, especially on uncalibrated operators and cameras | 30–60 | [calibrated Light operators](light-v3.md), [process versions](process-versions.md) | | 4 | ~~Original-pixel detail at 100%~~ (LR-VIEW-ZOOM): closed 2026-10-12, see Closed recently | checklist row βœ… | β€” | 0 | [ui-parity](ui-parity.md) | | 5 B | **AI masks: Subject, Sky, People, Background, Landscape** are heuristics; Object / Describe run SAM 3 but its download has no mirror configured | `crates/segment`; ai-masks.md; MASK rows 67% | masking is how most Lightroom users edit today | 40–70 + model decision | [target-app-parity](target-app-parity.md#ai) | | 6 | **Compressed ORF** (support withdrawn) | #3775 decoder removed pending provenance review; uncompressed support remains | compressed files use embedded JPEG previews when available, not sensor data | pending review | [orf-compression](orf-compression.md) | @@ -90,6 +90,7 @@ Beta-blocking gaps (B) total **~230–430 h**; with the stability and platform w | Date | Change | Summary | |---|---|---| +| 2026-11-11 | minor | Gap 3: from process V8 a raw whose camera profile has no tone curve gets Lightroom's measured default base curve ([default-tone.md](default-tone.md)); gap not closed | | 2026-11-11 | minor | Gap 3: from process V8 Colour Grading is measured against Camera Raw ([grading-stage.md](grading-stage.md)); gap not closed | | 2026-11-11 | minor | Gap 3: from process V8 the colour mixer is measured against Camera Raw ([mixer-stage.md](mixer-stage.md)); gap not closed | | 2026-11-11 | minor | Gap 3: from process V8 Whites and the tone curves are measured against Camera Raw ([curve-stage.md](curve-stage.md)); gap not closed | diff --git a/docs/parity-checklist.md b/docs/parity-checklist.md index 857e69c527f..fb6bf8ee6e9 100644 --- a/docs/parity-checklist.md +++ b/docs/parity-checklist.md @@ -467,7 +467,7 @@ differences and missing bindings are in [ui-parity.md](ui-parity.md#shortcuts). | LR-BEHAV-OFFLINE | Offline editing | P1 | βœ… | | local-first: everything works offline | | LR-BEHAV-WEB-SAFETY | Library safety in the browser build | P1 | 🟑 | `cmd:file.backupLibrary`, `cmd:file.restoreLibrary`, `apps/lightcraft-web/src/safety.rs`, `apps/lightcraft-web/src/backup.rs`, `apps/lightcraft-web/src/files.rs` | web only (experimental): Back Up Library (zip of the catalog and every stored original) and a non-destructive Restore; failed saves show as unsaved and are retried; a photo that can't be stored isn't added; one tab per library (Web Locks); notices for storage that isn't persistent and for a library that can't open; `?reset` asks first; a panic shows a message. Missing: `?safe` start, deleting originals of removed photos, zip64 (backups > 4 GB) | | LR-BEHAV-GPU | GPU acceleration | P0 | βœ… | `crates/gpu/src/render.rs`, `cmd:app.gpu`, `docs/gpu-pipeline.md`, `crates/ui-egui/src/panels/notices.rs` | CPU fallback per render on device limits, out of memory, device errors / loss, incomplete or black results (`perf.gpuReason`, `perf.gpuFallback`; each render reports its own reason β€” `lightcraft_gpu::try_render`, `gpuFallback` per exported file β€” issue #675); short submissions for slow iGPUs; backend choice (DX12 only on Windows, `LIGHTCRAFT_GPU_BACKEND` / `WGPU_BACKEND`), device created after the window opens, crash sentinel (issue #136); a GPU lost while LightCraft runs (driver reset) stops it with that message and turns GPU rendering off for the next start, which says why (issue #1337; the window's renderer can't survive the lost device); quitting waits (up to 2 s) for renders in flight and starts no new GPU work, so none is inside the driver when the process exits (`crates/gpu/src/exit.rs`, issue #620; seen crashing only on Linux + NVIDIA, other drivers unverified); with GPU rendering on and no adapter found at all (e.g. no Vulkan loader on NixOS outside `nix develop`), the desktop app says once per session that it renders on the CPU and points to Help β–Έ System Info (`gpu_notice`; not when the GPU is turned off or only a software adapter exists); no tiling beyond the buffer limit (CPU) | -| LR-BEHAV-RENDER-FIDELITY | Rendering matches Lightroom | P1 | 🟑 | `crates/pipeline/src/lib.rs`, `crates/pipeline/src/tone.rs` | Process V4 calibrates global camera-look Contrast and Blacks against black-box Lightroom exports of Sony ILCE-7CR photos. Held-out response errors are 0.038 and 0.077 stops; V1/V2 keep their rendering. Whites retains V2 and awaits a follow-up. Exposure, Highlights/Shadows, other operators and broader camera coverage remain open (`docs/light-v3.md`). From process V8 Whites, the parametric curve and the point curves follow Camera Raw's measured response on synthetic grey steps, the master curve hue-preserving ([curve-stage.md](curve-stage.md)). From V8 the colour mixer follows Camera Raw's measured response on synthetic colour charts ([mixer-stage.md](mixer-stage.md)), and Colour Grading too ([grading-stage.md](grading-stage.md)); Calibration, Saturation and Vibrance are not measured in yet. From process V5 a raw's tone curve rolls off into white in stops (past a camera curve's last fitted knot, or from half a stop below the generic curve's white point instead of clipping), so Exposure +1 and +2 keep the highlights the sensor recorded: on 12 CC0 corpus raws and 6 CC0 DNGs on the generic curve, unclipped pixels whose luminance renders at 254 or more fall from up to 22.5 % to 0 at +1 EV and from up to 35 % to at most 0.03 % at +2 EV, apart from one sky that is mostly at the clip (#1632). Not compared with Lightroom's output | +| LR-BEHAV-RENDER-FIDELITY | Rendering matches Lightroom | P1 | 🟑 | `crates/pipeline/src/lib.rs`, `crates/pipeline/src/tone.rs` | Process V4 calibrates global camera-look Contrast and Blacks against black-box Lightroom exports of Sony ILCE-7CR photos. Held-out response errors are 0.038 and 0.077 stops; V1/V2 keep their rendering. Up to V7 Whites retains V2. Exposure, Highlights/Shadows, other operators and broader camera coverage remain open (`docs/light-v3.md`). From process V8 Whites, the parametric curve and the point curves follow Camera Raw's measured response on synthetic grey steps, the master curve hue-preserving ([curve-stage.md](curve-stage.md)). From V8 the colour mixer follows Camera Raw's measured response on synthetic colour charts ([mixer-stage.md](mixer-stage.md)), and Colour Grading too ([grading-stage.md](grading-stage.md)); Calibration, Saturation and Vibrance are not measured in yet. From V8 a raw whose camera profile has no tone curve of its own (Adobe Standard) gets Lightroom's default base curve measured on a synthetic chart, hue preserving on linear ProPhoto channels, with a per-camera exposure offset measured for the Panasonic Lumix DC-S9 only ([default-tone.md](default-tone.md)). From process V5 a raw's tone curve rolls off into white in stops (past a camera curve's last fitted knot, or from half a stop below the generic curve's white point instead of clipping), so Exposure +1 and +2 keep the highlights the sensor recorded: on 12 CC0 corpus raws and 6 CC0 DNGs on the generic curve, unclipped pixels whose luminance renders at 254 or more fall from up to 22.5 % to 0 at +1 EV and from up to 35 % to at most 0.03 % at +2 EV, apart from one sky that is mostly at the clip (#1632). Not compared with Lightroom's output | | LR-BEHAV-DRAGDROP | Drag and drop | P1 | βœ… | `crates/ui-egui/src/lib.rs`, `crates/ui-egui/src/panels/grid.rs` (`drag_feedback`), `crates/ui-egui/src/panels/left.rs` (`drop_target`, `album_drag_over`, `top_level_drop_target`, `drag_auto_scroll`), `crates/ui-egui/src/destination.rs`, `crates/ui-egui/src/widgets.rs` (`context_menu`), `crates/ui-egui/src/widgets/text_field.rs`, `crates/ui-egui/src/tests/carried_right_click.rs`, `crates/ui-egui/src/tests/carried_text_field_menu.rs` | a right-click while photos are carried opens no context menu (every menu opened through `widgets::context_menu`: sidebar rows, grid cells, lists; a text field's own Cut / Copy / Paste menu too); files β†’ app (a drop-target card while they hover, then the import review); grid photos β†’ an album row (adds the selection, with a count badge while dragging); sidebar album / folder rows β†’ a folder (moves it; its name follows the pointer); a drag of albums or grid photos near the top or bottom edge of the sidebar scrolls it (faster nearer the edge, only while the pointer is over the sidebar); when another folder has the same name, the dragged label, the Move question and the toast name the folder it is in (`home (/a)`); an album drop's toast does the same for an album of that name in another album folder (two in the same place have nothing to tell them apart and keep the plain name); only the primary button drags photos and drops them: a right-button drag over a grid cell neither picks photos up nor changes the selection, and a right-button release while photos are dragged neither drops them nor ends the drag | | LR-BEHAV-TOAST | Toast notifications | P1 | βœ… | `crates/ui-egui/src/panels.rs` | | | LR-BEHAV-DIALOGS | Dialogs fit the window | P1 | βœ… | `crates/ui-egui/src/dialogs.rs` (`dialog_body`, `list_height`), `crates/ui-egui/src/tests/dialog_fit.rs`, `crates/ui-egui/src/tests/dialog_copy.rs`, `crates/ui-egui/src/tests/dialogs.rs` (`a_click_outside_closes_the_dialog_when_settings_allow_it`) | a dialog taller than the window (Export on a 1366Γ—768 screen, issue #781) never runs off it: its options scroll while the title bar and the Cancel / confirm row stay on screen (the confirm button names its action: Create, Rename, Create Stacks, Export 3 Photos…, with "OK" kept only for a one-field prompt opened with a command that has no verb, `crates/ui-egui/src/tests/dialog_copy.rs`); lists that scroll on their own (What's New, All Metadata, shortcuts, smart-album rules, credits) get shorter first; dialogs that fit look as before; Import keeps its own resizable, scrolling window; Settings β†’ Dialogs β†’ Close a dialog by clicking outside it (off by default, so a stray click never throws away a dialog's choices): a click pressed and released on the dimmed backdrop closes the dialog like Esc and doesn't reach the panels below, while a drag that ends outside (a slider pulled past the edge) or a click that closes a dropdown keeps it; the import review never closes this way (`clicked_backdrop`); a one-line prompt (Rename Folder, New Folder on Disk, the preset and version names, New Library when its name can't be used, Auto-Tag from Tracklog) the engine refuses stays open with its text and shows the reason in a toast, so the name can be corrected, where it used to close without a word; a New Folder on Disk that works says so (β€œCreated folder β€œSelects” in β€œ2026/Shoot””, naming the parent by its last two folders as dialogs do) | @@ -802,6 +802,7 @@ Latin stays upright. Advanced Japanese composition remains open. Regression cove | Date | Change | Summary | |---|---|---| +| 2026-11-11 | minor | LR-BEHAV-RENDER-FIDELITY, LRC-DEV-PROCESS: process V8 gives a raw whose camera profile has no tone curve Lightroom's default base curve, measured ([default-tone.md](default-tone.md)); status unchanged | | 2026-11-07 | correction | Compressed ORF sensor support withdrawn pending provenance review; embedded preview fallback remains. Coverage regenerated without the removed decoder: 557 verified, 665 unverified, 187 preview-only, 37 unsupported; 94% use-weighted coverage. | | 2026-11-04 | minor | Compressed ORF support was introduced in #3775; subsequently withdrawn pending provenance review. Earlier clean-room and verification claims are withdrawn; compressed files use embedded previews when available. See [ORF status](orf-compression.md). | | 2026-10-28 | minor | KEY-HIDEPINS βœ… β†’ 🟑: in the Masking panel an unmodified H toggles the mask pins (`view.maskPins`, the View β–Έ Show Mask Pins switch) instead of opening Remove; the toggle yields only to an explicit assignment of H itself, a Remove key reassigned to anything else still opens Remove there, and outside Masking β€” and the full-screen preview, where no panel shows β€” H keeps its own binding (Remove, by default). Remove's spot pins keep ⇧H as their only hide toggle (`tests/keymap` `h_toggles_the_mask_pins_while_masking`, `a_remapped_remove_key_still_opens_remove_while_masking`, `h_still_toggles_the_pins_when_remove_moves_to_another_key`) | diff --git a/docs/process-versions.md b/docs/process-versions.md index 059ed1e96d6..61013a377c4 100644 --- a/docs/process-versions.md +++ b/docs/process-versions.md @@ -16,7 +16,7 @@ stronger Light sliders, issue #196) without changing a single photo someone has | **V5** | V4 plus: a raw's tone curve rolls off into white in stops instead of reaching it within about a stop of the sensor's white, so raising Exposure keeps the highlights the sensor recorded (issue #1632). **Camera curve** (the look fitted to the embedded JPEG, or a DNG's `ProfileToneCurve`; `CameraTone`): past its last knot `CameraTone::apply_rolloff` closes the gap to white by `gap / (1 + cΒ·(2^t βˆ’ 1))` at `t` stops past the knot, with `c` matching the curve's slope there and the gap halving every stop in the end (`tone::ROLLOFF_STOPS`); `ToneMap::camera_rolloff_hdr` builds the table from it. Under V1 to V4 the curve past its last knot (fitted only to camera JPEG tones below 0.85, so 1 to 3 stops below the sensor's white on most photos) closes on white exponentially in linear light: the sensor's white renders at 8-bit 246 to 254 at Exposure 0 and 254 to 255 from Exposure +1. On the 11 CC0 corpus files with a fitted look (8 Sony, 2 Nikon, 1 Fujifilm) it now renders at 239 to 250 at Exposure 0 and 247 to 253 at +1. A DNG curve that reaches white at the sensor's white renders as before. **Generic curve** (raws without a camera curve, `ToneMap::rolloff_hdr`): from half a stop below its white point (`tone::GENERIC_KNEE_STOPS`) the same shoulder takes over, with the extended Reinhard curve's value and slope at the join, where V1 to V4 clip at the white point (scene 1.18 at default settings, ΒΌ stop above the sensor's white). The sensor's white renders at about 235, 248 and 252 at Exposure 0, +1 and +2 (V1 to V4: 239, 255, 255; the CC0 Canon R8 file and 6 CC0 DNGs without a camera curve). Content past the old clip point, such as a clipped sky, now renders up to 15 codes below white at Exposure 0 and reaches 255 about 5 stops past the sensor's white. Below the last knot or the join, JPEGs and other display-referred sources, and the camera fit itself are unchanged; CPU and GPU share the tone LUT. | | **V6** | V5 plus: colour noise reduction filters the linear colour differences Rβˆ’Y and Bβˆ’Y with the joint method (issue #815, `docs/nr-color-joint.md`): edge-aware weights from a denoised guide shared by both differences, anisotropic diffusion over scales, a brake for isolated colour specks; Y is kept exactly. V1 to V5 keep the blurred chromaticity (`local::denoise`). CPU (`local::denoise`) and GPU (`render::denoise`) branch on `local::joint_colour_nr`. Renders with Color 0 are the same as V2's. | | **V7** | V6 plus: film grain from crystal layers ([grain.md](grain.md), `crates/pipeline/src/crystal.rs`), after AurΓ©lien Pierre's model: resolution independent (a preview is the export's grain box-downscaled), fading out at black and white, calibrated to Lightroom Classic's strength and width at mid grey. V1 to V6 keep their two-octave value noise exactly (`finish::ValueGrain`; on the GPU `F_GRAIN_MODEL` 0); `finish::GrainModel::new` picks the model per process. Renders without grain don't depend on this. | -| **V8** (the latest) | V7 plus: Whites, the parametric curve and the point curves as Lightroom applies them ([curve-stage.md](curve-stage.md), `crates/pipeline/src/curve_stage.rs`), measured on Camera Raw renders of synthetic grey steps. Whites leaves the tone map and, with the parametric curve, comes from measured tables (Whites reaches into the midtones; the regions are broad and add); the master curve acts hue-preserving on sRGB-encoded linear ProPhoto RGB (largest and smallest channel through the curve, the middle one in proportion in linear light), then the red, green and blue curves per channel, between the calibrated Contrast and Blacks and the colour stage. V1 to V7 keep Whites in the tone map and their per-channel curves on the output. CPU (`finish::finish_with`) and GPU (`finish.wgsl::curve_stage`) share the tables. Renders with Whites, the parametric curve and the point curves neutral are V7's. The colour mixer follows Camera Raw's measured response on synthetic OkLCh charts ([mixer-stage.md](mixer-stage.md), `crates/pipeline/src/mixer_stage.rs`): per band and slider the hue shift, chroma change and lightness change by input hue, chroma and lightness, applied before the tone curves; V1 to V7 keep their mixer model after the curves (`ColorOps::mixer`). Colour Grading follows Camera Raw's measured response ([grading-stage.md](grading-stage.md), `crates/pipeline/src/grading_stage.rs`): per wheel a tint by hue and saturation, a lightness profile by Blending and Balance, a damping for colours already leaning the tint's way, and Luminance as a lightness change; V1 to V7 keep their grading (`ColorOps::grading`). | +| **V8** (the latest) | V7 plus: Whites, the parametric curve and the point curves as Lightroom applies them ([curve-stage.md](curve-stage.md), `crates/pipeline/src/curve_stage.rs`), measured on Camera Raw renders of synthetic grey steps. Whites leaves the tone map and, with the parametric curve, comes from measured tables (Whites reaches into the midtones; the regions are broad and add); the master curve acts hue-preserving on sRGB-encoded linear ProPhoto RGB (largest and smallest channel through the curve, the middle one in proportion in linear light), then the red, green and blue curves per channel, between the calibrated Contrast and Blacks and the colour stage. V1 to V7 keep Whites in the tone map and their per-channel curves on the output. CPU (`finish::finish_with`) and GPU (`finish.wgsl::curve_stage`) share the tables. Renders with Whites, the parametric curve and the point curves neutral are V7's. The colour mixer follows Camera Raw's measured response on synthetic OkLCh charts ([mixer-stage.md](mixer-stage.md), `crates/pipeline/src/mixer_stage.rs`): per band and slider the hue shift, chroma change and lightness change by input hue, chroma and lightness, applied before the tone curves; V1 to V7 keep their mixer model after the curves (`ColorOps::mixer`). Colour Grading follows Camera Raw's measured response ([grading-stage.md](grading-stage.md), `crates/pipeline/src/grading_stage.rs`): per wheel a tint by hue and saturation, a lightness profile by Blending and Balance, a damping for colours already leaning the tint's way, and Luminance as a lightness change; V1 to V7 keep their grading (`ColorOps::grading`). A raw whose camera profile has no tone curve of its own (a DCP without `ProfileToneCurve`, such as Adobe Standard) gets Lightroom's default base curve, measured on a synthetic chart, applied hue preserving on linear ProPhoto channels and shifted by the camera's measured exposure offset ([default-tone.md](default-tone.md), `crates/pipeline/src/default_tone.rs`); V1 to V7 keep the photo's own tone (the file's curve or the one fitted to its camera JPEG), scaled by luminance. | ## The rule @@ -115,6 +115,7 @@ extra field and retain their existing cached renders. No cache-version bump is n | 2026-11-10 | minor | V8: Whites and the tone curves measured against Lightroom ([curve-stage.md](curve-stage.md)); V1 to V7 keep theirs | | 2026-11-10 | minor | V8: the colour mixer measured against Lightroom, before the tone curves ([mixer-stage.md](mixer-stage.md)); V1 to V7 keep theirs | | 2026-11-10 | minor | V8: Colour Grading measured against Lightroom ([grading-stage.md](grading-stage.md)); V1 to V7 keep theirs | +| 2026-11-11 | minor | V8: Lightroom's default base curve for a raw whose camera profile has none ([default-tone.md](default-tone.md)); V1 to V7 keep the photo's own tone | | 2026-11-07 | minor | V7: film grain from crystal layers ([grain.md](grain.md)); V1 to V6 keep their value noise | | 2026-11-05 | minor | V5: a raw's tone curve rolls off into white in stops, so raising Exposure keeps recorded highlights (#1632) | | 2026-10-12 | minor | Calibrated Contrast and Blacks, V2 Whites, resolved-process cache keys and number coordination | diff --git a/docs/whats-new.md b/docs/whats-new.md index e0330d39445..999ae6362a7 100644 --- a/docs/whats-new.md +++ b/docs/whats-new.md @@ -2,6 +2,15 @@ ## Unreleased +### Adobe Standard profiles look as in Lightroom (process V8) +- A raw developed with an imported camera profile that has no tone curve of its own, such as Adobe Standard, now gets + Lightroom's base tone curve, applied the way Lightroom applies it, instead of the tone of the camera's JPEG. An + unedited photo then matches Lightroom's in brightness, contrast and colour far more closely. Panasonic Lumix DC-S9 + raws (RW2) are measured and match closely; other cameras get the same curve without a per-camera exposure offset, + so they can come out a little lighter or darker than in Lightroom. This is part of rendering process 8: photos you + already edited keep their look until you choose Photo β–Έ Update to Current Process. See + [Lightroom's default base curve](default-tone.md). + ### Colour Grading behaves as in Lightroom (process V8) - The colour grading wheels now tint as strongly and in the same direction as Lightroom's, reach the same tones (the shadows wheel spares the deepest blacks and reaches into the midtones, the global wheel acts most on the diff --git a/tools/lr_tone_charts.py b/tools/lr_tone_charts.py index d52b6f6f3a8..5354318c0c8 100644 --- a/tools/lr_tone_charts.py +++ b/tools/lr_tone_charts.py @@ -7,6 +7,9 @@ (render every DNG through Camera Raw to a 16-bit Adobe RGB (1998) TIFF with the same file name) python3 tools/lr_tone_charts.py tables RENDER_DIR OUT_RS Reads the renders and writes the Rust tables of `lightcraft_pipeline::curve_stage`. + python3 tools/lr_tone_charts.py base RENDER_DIR OUT_RS + Reads the neutral render and writes Lightroom's default base curve, the table of + `lightcraft_pipeline::default_tone` (docs/default-tone.md). The charts are original test data generated here; nothing in them comes from Adobe. Only Camera Raw's output is measured. Requires numpy and tifffile (tools/requirements-lr-tone-charts.txt). @@ -186,8 +189,26 @@ def tables(render_dir, out_rs): f.write("\n".join(s)) +def base(render_dir, out_rs): + """Write the neutral render's grey steps (chart value in, linear ProPhoto out) as the default base curve to `out_rs`.""" + patches = json.load(open(os.path.join(render_dir, "manifest.json")))["patches"] + steps = [q["v"] for q in patches if q["kind"] == "grey" and q["ok"]] + enc = grey_levels(os.path.join(render_dir, "curve__neutral.tif"), patches) + lin = np.where(enc <= 0.04045, enc / 12.92, ((enc + 0.055) / 1.055) ** 2.4) + lin = np.maximum.accumulate(np.clip(lin, 0, 1)) + s = ["// @generated by tools/lr_tone_charts.py from Camera Raw's render of its neutral synthetic chart (docs/default-tone.md).", + "// Grey steps: the chart's linear value in, the render's linear ProPhoto value out.", + "", + f"pub const GREY: [[f32; 2]; {len(steps)}] = [", + *[f" [{x:.6f}, {y:.6f}]," for x, y in zip(steps, lin)], + "];", + ""] + with open(out_rs, "w") as f: + f.write("\n".join(s)) + + def main(): - """Command line: `charts OUT_DIR` or `tables RENDER_DIR OUT_RS`.""" + """Command line: `charts OUT_DIR`, `tables RENDER_DIR OUT_RS` or `base RENDER_DIR OUT_RS`.""" if len(sys.argv) == 3 and sys.argv[1] == "charts": out = sys.argv[2] os.makedirs(out, exist_ok=True) @@ -197,6 +218,8 @@ def main(): write_dng(os.path.join(out, f"curve__{name}.dng"), img, xmp(**settings)) elif len(sys.argv) == 4 and sys.argv[1] == "tables": tables(sys.argv[2], sys.argv[3]) + elif len(sys.argv) == 4 and sys.argv[1] == "base": + base(sys.argv[2], sys.argv[3]) else: sys.exit(__doc__) From 815ebe60a3d64b20a33f62b90a56d4afe0c3804c Mon Sep 17 00:00:00 2001 From: smi-leonivkovic Date: Wed, 11 Nov 2026 07:45:33 +0100 Subject: [PATCH 08/51] LR-BEHAV-RENDER-FIDELITY: what's new names process 9 (#523) --- docs/whats-new.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/whats-new.md b/docs/whats-new.md index 2f9648725db..344fca12af7 100644 --- a/docs/whats-new.md +++ b/docs/whats-new.md @@ -6,7 +6,7 @@ - Whites now reaches into the upper midtones as Lightroom's does, and the Highlights, Lights, Darks and Shadows regions of the parametric curve are as broad as Lightroom's and add up the same way: both follow Lightroom's measured response. A contrast curve no longer turns orange towards red: the point curve keeps colours' hue, and - the red, green and blue curves act on their channel after it. This is rendering process 8: new photos (and Reset) + the red, green and blue curves act on their channel after it. This is rendering process 9: new photos (and Reset) get it, photos you already edited keep their look until you choose Photo β–Έ Update to Current Process. See [Whites and the tone curves](curve-stage.md). From 472a0144196113a929ef02f3af3552ba6b612cce Mon Sep 17 00:00:00 2001 From: smi-leonivkovic Date: Wed, 11 Nov 2026 08:04:56 +0100 Subject: [PATCH 09/51] LR-EDIT-LIGHT-HIGHLIGHTS: process V9, Highlights relative to the frame's tonal range as in Lightroom (#523) --- crates/gpu/src/ctx.rs | 12 +++ crates/gpu/src/params.rs | 6 ++ crates/gpu/src/render.rs | 1 + crates/gpu/src/wgsl/finish.wgsl | 19 ++++- crates/gpu/tests/it/equivalence.rs | 22 ++++++ crates/pipeline/src/finish.rs | 27 ++++++- crates/pipeline/src/hs_range.rs | 114 ++++++++++++++++++++++++++++ crates/pipeline/src/lib.rs | 15 ++++ crates/pipeline/src/local.rs | 20 ++++- crates/pipeline/src/tests_window.rs | 12 +++ docs/gaps.md | 3 +- docs/hs-range.md | 77 +++++++++++++++++++ docs/parity-checklist.md | 5 +- docs/process-versions.md | 3 +- docs/whats-new.md | 7 ++ 15 files changed, 332 insertions(+), 11 deletions(-) create mode 100644 crates/pipeline/src/hs_range.rs create mode 100644 docs/hs-range.md diff --git a/crates/gpu/src/ctx.rs b/crates/gpu/src/ctx.rs index 6be62a9bcfe..e07f1e57c58 100644 --- a/crates/gpu/src/ctx.rs +++ b/crates/gpu/src/ctx.rs @@ -414,6 +414,18 @@ fn constants() -> String { let rows: Vec = m.iter().map(|r| format!("vec3({:?}, {:?}, {:?})", r[0], r[1], r[2])).collect(); s += &format!("const {name} = array, 3>({});\n", rows.join(", ")); } + { + use lightcraft_pipeline::hs_range as hr; + s += &format!( + "const HS_H_AMP: f32 = {:?};\nconst HS_H_SPAN: f32 = {:?};\nconst HS_H_POW: f32 = {:?};\nconst HS_H_REACH: f32 = {:?};\nconst HS_H_AMP_MIN: f32 = {:?};\nconst HS_H_AMP_MAX: f32 = {:?};\n", + hr::H_AMP, + hr::H_SPAN, + hr::H_POW, + hr::H_REACH, + hr::H_AMP_RANGE.0, + hr::H_AMP_RANGE.1 + ); + } s += &format!( "const TONE_MIN_EV: f32 = {LUT_MIN_EV:?};\nconst TONE_MAX_EV: f32 = {LUT_MAX_EV:?};\nconst TONE_N: u32 = {LUT_N}u;\nconst CHROMA_N: u32 = {CHROMA_N}u;\n" ); diff --git a/crates/gpu/src/params.rs b/crates/gpu/src/params.rs index 21b0a1c93f9..0ab2993d50c 100644 --- a/crates/gpu/src/params.rs +++ b/crates/gpu/src/params.rs @@ -31,6 +31,9 @@ const FIELDS: &[(&str, usize)] = &[ ("MGRADE", 1), ("MGRADE_OFF", 1), ("RGB_TONE", 1), + ("HS_RANGE", 1), + ("HS_RANGE_LO", 1), + ("HS_RANGE_HI", 1), ("GAIN", 1), ("EV", 1), ("AIR", 1), @@ -294,6 +297,9 @@ pub fn finish_block(fp: &FinishParams, masks: &[[f32; MASK_TERMS]], present: &Pr p.u("MGRADE", mgrade.map_or(0, |g| 1 + g.wheels.len() as u32)); p.u("MGRADE_OFF", mgrade_off as u32); p.b("RGB_TONE", fp.rgb_tone); + p.b("HS_RANGE", fp.hs_range.is_some()); + p.f("HS_RANGE_LO", fp.hs_range.map_or(0.0, |r| r.lo)); + p.f("HS_RANGE_HI", fp.hs_range.map_or(0.0, |r| r.hi)); p.f("REFINE_SAT", fp.refine_sat); p.f("GAIN", fp.gain); p.f("EV", fp.ev); diff --git a/crates/gpu/src/render.rs b/crates/gpu/src/render.rs index bc079edb113..7dd0be67094 100644 --- a/crates/gpu/src/render.rs +++ b/crates/gpu/src/render.rs @@ -790,6 +790,7 @@ pub fn render( image_size: (w, h), px_per_long: plan.px_per_long, air_pre: prep.air, + hs_range: plan.hs_range, space: req.space, draft: req.quality == lightcraft_pipeline::Quality::Draft, }); diff --git a/crates/gpu/src/wgsl/finish.wgsl b/crates/gpu/src/wgsl/finish.wgsl index dbd67892c82..06885e0c81d 100644 --- a/crates/gpu/src/wgsl/finish.wgsl +++ b/crates/gpu/src/wgsl/finish.wgsl @@ -93,6 +93,17 @@ fn light_channel(k: u32, x: f32) -> f32 { return light_eval(k, encode_srgb(x)); } +// `FrameRange::highlights` (process V9): Highlights scaled by the frame's tonal range HS_RANGE_LO..HS_RANGE_HI. +fn hs_range_highlights(hh: f32, base: f32) -> f32 { + if (hh == 0.0) { + return 0.0; + } + let span = max(pf(F_HS_RANGE_HI) - pf(F_HS_RANGE_LO), 0.1); + let amp = clamp(HS_H_AMP * pow(span / HS_H_SPAN, HS_H_POW), HS_H_AMP_MIN, HS_H_AMP_MAX); + let low = -1.0 - HS_H_REACH * max(span - HS_H_SPAN, 0.0); + return hh * amp * sstep(low, 2.8, base); +} + // `default_tone::rgb_tone`: the base tone on the largest and smallest linear ProPhoto channel, the middle // channel keeping its place between them (process V9 with Lightroom's default curve). fn rgb_tone(c: vec3) -> vec3 { @@ -776,8 +787,12 @@ fn main(@builtin(global_invocation_id) gid: vec3) { let ss = pf(F_SH) + lt[5]; if (hh != 0.0 || ss != 0.0) { let ws = 1.0 - sstep(-4.8, 0.3, base); - let wh = sstep(-1.0, 2.8, base); - delta += ss * 1.7 * ws * sqrt(ws) + hh * 1.7 * wh; + delta += ss * 1.7 * ws * sqrt(ws); + if (pu(F_HS_RANGE) != 0u) { + delta += hs_range_highlights(hh, base); + } else { + delta += hh * 1.7 * sstep(-1.0, 2.8, base); + } } if (lt[6] != 0.0) { delta += lt[6] * 0.8 * sstep(0.5, 3.0, l1); diff --git a/crates/gpu/tests/it/equivalence.rs b/crates/gpu/tests/it/equivalence.rs index fcd58265ae6..2e62ed9abf7 100644 --- a/crates/gpu/tests/it/equivalence.rs +++ b/crates/gpu/tests/it/equivalence.rs @@ -936,6 +936,28 @@ fn default_tone_matches() { check("V9 default curve, HDR", &src, &plain, &h, &req); } +/// Process V9's Highlights relative to the frame's tonal range (`hs_range`): the GPU uses the plan's range as the CPU +/// does, darkening and brightening, with Shadows, with Exposure, and in a window of a larger frame. +#[test] +fn hs_range_matches() { + if !gpu() { + return; + } + let src = scene(0, 960, 640); + let raw = SourceInfo { raw: true, ..Default::default() }; + let req = RenderRequest::fit(720, 720); + let v9 = || DevelopSettings { process: Process::V9.version(), ..Default::default() }; + let mut s = v9(); + s.light.highlights = -100.0; + check("V9 Highlights -100", &src, &raw, &s, &req); + s.light.highlights = 60.0; + s.light.shadows = 40.0; + s.light.exposure = -0.5; + check("V9 Highlights +60, Shadows, Exposure", &src, &raw, &s, &req); + let win = RenderRequest { window: Some(lightcraft_pipeline::PixelWindow { x: 200, y: 120, w: 320, h: 240 }), ..req }; + check("V9 Highlights in a window", &src, &raw, &s, &win); +} + /// Issue #632: the Highlights / Shadows base of each process (V1: the edge-aware filter of log /// luminance; V2 to V7: of its fine median, V8 on: of its detail-free plane, a radius that grows with the render) matches the CPU's, and /// a warm cache never hands one process the other's base. diff --git a/crates/pipeline/src/finish.rs b/crates/pipeline/src/finish.rs index d6c909d1689..ad1b4c2c66a 100644 --- a/crates/pipeline/src/finish.rs +++ b/crates/pipeline/src/finish.rs @@ -267,6 +267,8 @@ pub struct FinishParams { pub proof: Option, pub hl: f32, pub sh: f32, + /// Process V9: Highlights acts relative to the frame's tonal range, exposure included ([`crate::hs_range`]). + pub hs_range: Option, pub clar: f32, pub tex: f32, pub dehaze: f32, @@ -306,6 +308,8 @@ pub struct FinishParamsInput<'a> { pub image_size: (usize, usize), pub px_per_long: f64, pub air_pre: f32, + /// The whole frame's tonal range before exposure ([`crate::Plan::hs_range`]). + pub hs_range: Option, pub space: OutputSpace, /// A draft render (a drag, [`crate::Quality::Draft`]): see [`GrainModel::new`]. pub draft: bool, @@ -314,7 +318,7 @@ pub struct FinishParamsInput<'a> { impl FinishParams { /// Parameters for a `w Γ— h` render into `space`; `ev`/`air_pre` as in [`crate::Prepared`]. pub fn new(input: FinishParamsInput<'_>) -> FinishParams { - let FinishParamsInput { settings: s, frame, info, image_size: (w, h), px_per_long, air_pre, space, draft } = input; + let FinishParamsInput { settings: s, frame, info, image_size: (w, h), px_per_long, air_pre, hs_range, space, draft } = input; let effects = s.section_enabled("effects"); let (clar, tex, dehaze) = if effects { ((s.effects.clarity / 100.0) as f32, (s.effects.texture / 100.0) as f32, (s.effects.dehaze / 100.0) as f32) @@ -353,6 +357,7 @@ impl FinishParams { out_trc: space.trc(), proof: None, hl: (s.light.highlights / 100.0) as f32, + hs_range: hs_range.filter(|_| crate::hs_range::wanted(s)).map(|r| r.shifted(ev)), sh: (s.light.shadows / 100.0) as f32, clar, tex, @@ -458,6 +463,7 @@ pub(crate) fn finish(p: &Prepared, s: &DevelopSettings, frame: &Frame, info: &So image_size: (w, h), px_per_long: p.px_per_long, air_pre: p.air, + hs_range: p.hs_range, space, draft, }); @@ -492,6 +498,7 @@ pub(crate) fn finish_deep(p: &Prepared, s: &DevelopSettings, frame: &Frame, info image_size: (w, h), px_per_long: p.px_per_long, air_pre: p.air, + hs_range: p.hs_range, space, draft, }); @@ -561,7 +568,7 @@ pub(crate) fn finish_with( // --- local tone in log luminance let shift = l1 - l0; let base = p.base.data[i] + fp.ev + shift; - let delta = local_tone_delta(p, fp, i, base, l1, &local); + let delta = local_tone_delta(p, fp, i, base, l1, &local, fp.hs_range.as_ref()); if delta != 0.0 { let g = delta.exp2(); c = c.map(|v| v * g); @@ -828,14 +835,26 @@ fn adjust_scene_pixel(p: &Prepared, fp: &FinishParams, index: usize, raw: [f32; (color, log_luminance) } -fn local_tone_delta(p: &Prepared, fp: &FinishParams, index: usize, base: f32, l1: f32, local: &PixelLocalTerms) -> f32 { +fn local_tone_delta( + p: &Prepared, + fp: &FinishParams, + index: usize, + base: f32, + l1: f32, + local: &PixelLocalTerms, + range: Option<&crate::hs_range::FrameRange>, +) -> f32 { let [_, _, _, l_con, l_hl, l_sh, l_wh, l_bl, l_tex, l_clar, _, _, _, l_sharp, l_noise, _, _] = local.values; let mut delta = 0.0; let (highlights, shadows) = (fp.hl + l_hl, fp.sh + l_sh); if highlights != 0.0 || shadows != 0.0 { let shadow_weight = 1.0 - smooth(-4.8, 0.3, base); let highlight_weight = smooth(-1.0, 2.8, base); - delta += shadows * 1.7 * shadow_weight * shadow_weight.sqrt() + highlights * 1.7 * highlight_weight; + delta += shadows * 1.7 * shadow_weight * shadow_weight.sqrt(); + delta += match range { + Some(r) => r.highlights(highlights, base), + None => highlights * 1.7 * highlight_weight, + }; } if l_wh != 0.0 { delta += l_wh * 0.8 * smooth(0.5, 3.0, l1); diff --git a/crates/pipeline/src/hs_range.rs b/crates/pipeline/src/hs_range.rs new file mode 100644 index 00000000000..338870d19c8 --- /dev/null +++ b/crates/pipeline/src/hs_range.rs @@ -0,0 +1,114 @@ +//! Highlights relative to the photo's own tonal range (process V9, `docs/hs-range.md`). +//! +//! Up to V8 Highlights moves the base layer's log luminance by a fixed weight of its absolute level. Lightroom's acts +//! relative to the frame: on a photo with a wide tonal range it reaches further down and works harder. From V9 +//! Highlights takes the frame's range from the base layer's percentiles ([`FrameRange`]). Shadows keeps V8's rule. + +use lightcraft_develop::Process; + +/// The base layer's tonal range in logβ‚‚ luminance (exposure included): its 2nd and 99th percentile. +#[derive(Clone, Copy, Debug, PartialEq)] +pub struct FrameRange { + pub lo: f32, + pub hi: f32, +} + +/// Percentiles of the base layer that span the frame's range. +const P_LO: f32 = 0.02; +const P_HI: f32 = 0.99; +/// Highlights: strength `H_AMP Β· (span / H_SPAN)^H_POW` (clamped to `H_AMP_RANGE`), reaching down to +/// `βˆ’1 βˆ’ H_REACH Β· (span βˆ’ H_SPAN)` stops. +pub const H_AMP: f32 = 0.7; +pub const H_SPAN: f32 = 5.0; +pub const H_POW: f32 = 2.4; +pub const H_REACH: f32 = 0.8; +pub const H_AMP_RANGE: (f32, f32) = (0.2, 8.0); + +/// Whether `s` uses the frame's range: process V9 with Highlights, globally or in a visible mask. +pub fn wanted(s: &lightcraft_develop::DevelopSettings) -> bool { + let v8 = match s.process.process() { + Process::V1 | Process::V2 | Process::V3 | Process::V4 | Process::V5 | Process::V6 | Process::V7 | Process::V8 => false, + Process::V9 => true, + }; + v8 && (s.light.highlights != 0.0 || s.masks.iter().any(|m| m.visible && !m.components.is_empty() && m.adjust.highlights != 0.0)) +} + +impl FrameRange { + /// The range after exposure `ev` (stops). + pub fn shifted(self, ev: f32) -> FrameRange { + FrameRange { lo: self.lo + ev, hi: self.hi + ev } + } + + /// The range of base-layer values `base` (logβ‚‚ luminance before exposure `ev`), from every 7th value; + /// `None` without a finite value. + pub fn of(base: &[f32], ev: f32) -> Option { + let mut sample: Vec = base.iter().step_by(7).copied().filter(|v| v.is_finite()).collect(); + if sample.is_empty() { + return None; + } + sample.sort_by(f32::total_cmp); + let at = |q: f32| sample[((q * (sample.len() - 1) as f32) as usize).min(sample.len() - 1)] + ev; + Some(FrameRange { lo: at(P_LO), hi: at(P_HI) }) + } + + /// The change in logβ‚‚ luminance that Highlights (βˆ’1..1) makes at base-layer value `base`. + pub fn highlights(&self, highlights: f32, base: f32) -> f32 { + if highlights == 0.0 { + return 0.0; + } + let span = (self.hi - self.lo).max(0.1); + let amp = (H_AMP * (span / H_SPAN).powf(H_POW)).clamp(H_AMP_RANGE.0, H_AMP_RANGE.1); + let low = -1.0 - H_REACH * (span - H_SPAN).max(0.0); + highlights * amp * smooth(low, 2.8, base) + } +} + +/// Hermite smooth step from `e0` to `e1`. +fn smooth(e0: f32, e1: f32, x: f32) -> f32 { + let t = ((x - e0) / (e1 - e0)).clamp(0.0, 1.0); + t * t * (3.0 - 2.0 * t) +} + +#[cfg(test)] +mod tests { + use super::*; + use lightcraft_develop::DevelopSettings; + + /// Settings on process `p` with Highlights at `h` (βˆ’100..100). + fn on(p: Process, h: f64) -> DevelopSettings { + let mut s = DevelopSettings { process: p.version(), ..Default::default() }; + s.light.highlights = h; + s + } + + #[test] + fn only_v9_with_highlights_uses_the_range() { + assert!(wanted(&on(Process::V9, -40.0))); + assert!(!wanted(&on(Process::V9, 0.0))); + assert!(!wanted(&on(Process::V8, -40.0))); + assert!(!wanted(&on(Process::V7, -40.0))); + } + + #[test] + fn the_range_is_the_2nd_to_99th_percentile_and_exposure_shifts_it() { + let base: Vec = (0..7000).map(|i| (i % 1000) as f32 / 100.0 - 5.0).collect(); + let r = FrameRange::of(&base, 0.0).unwrap(); + assert!((r.lo - -4.8).abs() < 0.05 && (r.hi - 4.9).abs() < 0.05, "{r:?}"); + assert_eq!(FrameRange::of(&base, 1.0).unwrap(), r.shifted(1.0)); + assert!(FrameRange::of(&[f32::NAN], 0.0).is_none()); + } + + #[test] + fn a_wider_range_makes_highlights_stronger_and_reach_further_down() { + let narrow = FrameRange { lo: -3.0, hi: 2.0 }; + let wide = FrameRange { lo: -6.0, hi: 2.0 }; + assert_eq!(narrow.highlights(0.0, 1.0), 0.0); + // in the highlights + assert!(wide.highlights(-1.0, 2.0) < narrow.highlights(-1.0, 2.0) && narrow.highlights(-1.0, 2.0) < 0.0); + // below the narrow frame's reach (βˆ’1 stop), the wide frame's still acts + assert_eq!(narrow.highlights(-1.0, -1.5), 0.0); + assert!(wide.highlights(-1.0, -1.5) < 0.0); + // a 5-stop frame at full Highlights is about V8's strength at the top (0.7 against 1.7: a gentler start) + assert!((narrow.highlights(-1.0, 2.8) - -0.7).abs() < 1e-4); + } +} diff --git a/crates/pipeline/src/lib.rs b/crates/pipeline/src/lib.rs index 095423bf054..95b7ed492f8 100644 --- a/crates/pipeline/src/lib.rs +++ b/crates/pipeline/src/lib.rs @@ -43,6 +43,7 @@ pub mod geometry; pub mod grading_stage; #[rustfmt::skip] mod grading_stage_tables; +pub mod hs_range; pub mod light_v3; // generated (`light_v3_params.rs`), kept in its own compact layout #[rustfmt::skip] @@ -278,6 +279,8 @@ pub(crate) struct Prepared { pub chroma_blur: Option>, /// Airlight of `dark` (before exposure). pub air: f32, + /// The whole frame's tonal range for process V9's Highlights (before exposure; [`Plan::hs_range`]). + pub hs_range: Option, pub masks: Vec, /// Output pixels per unit of the source long edge. pub px_per_long: f64, @@ -456,6 +459,9 @@ pub struct Plan<'a> { pub eyes: Vec, /// The whole frame's dehaze airlight, for a windowed render (which can't see the whole frame). pub fixed_air: Option, + /// Process V9 with Highlights: the whole frame's tonal range ([`hs_range`]), from a small render of it so that + /// every render of the photo (a window, a preview, an export) shares it. + pub hs_range: Option, /// A windowed render works on a larger window when spots reach into it (see /// [`spots::window_for_reads`]); this is the requested window inside the rendered one, which /// the result is cut to. @@ -496,6 +502,12 @@ pub fn plan<'a>(src: &Rgb32f, info: &SourceInfo, s: &'a DevelopSettings, req: &R let detail_scale = local::detail_scale(px_per_long, native_long); let mut fixed_air = None; let mut keep = None; + let hs_range = hs_range::wanted(s).then(|| { + let k = (AIRLIGHT_PROXY_EDGE as f64 / full_w.max(full_h) as f64).min(1.0); + let (pw, ph) = (((full_w as f64 * k).round() as usize).max(1), ((full_h as f64 * k).round() as usize).max(1)); + local::frame_range(src, info, s, &frame, pw, ph) + }); + let hs_range = hs_range.flatten(); let full = (frame.clone(), full_w, full_h); let (frame, w, h) = match req.window { Some(win) => { @@ -564,6 +576,7 @@ pub fn plan<'a>(src: &Rgb32f, info: &SourceInfo, s: &'a DevelopSettings, req: &R noise_key, eyes, fixed_air, + hs_range, keep, mattes: info.mattes.clone(), full, @@ -601,6 +614,7 @@ pub fn colour_noise(src: &Rgb32f, info: &SourceInfo, p: &Plan<'_>) -> Option, info: &SourceInfo, s: &DevelopSettings, req: &Rende if let Some(a) = plan.fixed_air { prep.air = a; } + prep.hs_range = plan.hs_range; lap("prepare", &mut t); if let Some((a, c)) = shared { c.put(CacheEntry { src: a.clone(), geo, sampled, lin: Some((lin_key, lin)), colour_noise, planes }); diff --git a/crates/pipeline/src/local.rs b/crates/pipeline/src/local.rs index be3fb758f9e..499dd6d8397 100644 --- a/crates/pipeline/src/local.rs +++ b/crates/pipeline/src/local.rs @@ -911,7 +911,7 @@ pub(crate) fn prepare( }; let ev = s.light.exposure as f32; let masks = timed("masks", || masks::evaluate(&s.masks, frame, img.width, img.height, &img, &log_l, ev, mattes)); - Prepared { img, log_l, base, clarity_blur, texture_blur, sharpen_blur, dark, chroma_blur, air, masks, px_per_long } + Prepared { img, log_l, base, clarity_blur, texture_blur, sharpen_blur, dark, chroma_blur, air, hs_range: None, masks, px_per_long } } /// The airlight of the whole output frame, estimated on a small render of it (`proxy_w` px wide): @@ -923,6 +923,24 @@ pub(crate) fn frame_airlight(src: &Rgb32f, info: &SourceInfo, s: &DevelopSetting airlight(&gaussian(&img.map(dark_of), sigma)) } +/// The tonal range of the whole output frame for process V9's Highlights ([`crate::hs_range`]): the base layer's +/// percentiles on a small render of it (`proxy_w` px wide), so that a window, a preview and an export of one photo +/// share it. Before exposure, like [`Prepared::base`](crate::Prepared). +pub(crate) fn frame_range( + src: &Rgb32f, + info: &SourceInfo, + s: &DevelopSettings, + frame: &Frame, + proxy_w: usize, + proxy_h: usize, +) -> Option { + let mut img = Rgb32f::clone(&frame_proxy(src, frame, proxy_w, proxy_h)); + white_balance(&mut img, info, s); + let ppl = frame.px_per_long(proxy_w); + let base = tone_base(&img.map(log_lum), (0.015 * ppl as f32).max(1.0), tone_base_detail(s, ppl), base_keeps_gaps(s)); + crate::hs_range::FrameRange::of(&base.data, 0.0) +} + /// How many airlight proxies [`frame_proxy`] keeps (one per photo and frame being zoomed into; each ≀ 1.8 MB). const FRAME_PROXIES_KEPT: usize = 4; diff --git a/crates/pipeline/src/tests_window.rs b/crates/pipeline/src/tests_window.rs index e5fb6ea801d..96d390b0a4d 100644 --- a/crates/pipeline/src/tests_window.rs +++ b/crates/pipeline/src/tests_window.rs @@ -133,6 +133,18 @@ fn spatial_adjustments_agree_inside_the_halo() { } } +// Given process V9's Highlights (relative to the frame's tonal range), a window takes the range of the whole frame, +// not of its own pixels: a window over the bright or the dark part renders as the full render does there +#[test] +fn highlights_take_the_frames_range_not_the_windows() { + let mut s = DevelopSettings::default(); + assert_eq!(s.process.process(), lightcraft_develop::Process::V9); + controls::set(&mut s, "light.highlights", -100.0); + for (x, y) in [(0, 0), (W - 400, H - 300), (300, 180)] { + check("highlights", &s, PixelWindow { x, y, w: 400, h: 300 }, 6, 0.8); + } +} + // Given a huge virtual frame (48000 px: an 800 % zoom), only the window is rendered #[test] fn a_window_of_a_huge_frame_is_cheap() { diff --git a/docs/gaps.md b/docs/gaps.md index 1b1abab0d6a..2517023d15b 100644 --- a/docs/gaps.md +++ b/docs/gaps.md @@ -17,7 +17,7 @@ Hours are Opus 5.5 agent wall-clock hours (see [target-app-parity.md](target-app |---:|---|---|---|---:|---| | 1 B | **Camera colour is estimated, not measured** (LR-PROF-CAMERACOLOR). Raws start from a per-file fit to the camera JPEG, 10 bundled profiles, 52 spectral matrices (plus same-sensor bodies, e.g. the X-T30 through the X-T3) or chart-measured matrices (the EOS D60); others use a neutral matrix (a black-and-white camera JPEG gives its tone curve only, #577; dark JPEG tones also guide the toe, #1307) | Ξ”E vs camera JPEG 2.9–10 after fitting (raw-parity.md); 1 chart-calibrated model (EOS D60: its Kelvin scale and fallback colour, the look stays the JPEG fit) vs 1,500 Adobe Standard profiles | every raw shooter sees colour that is close but not Lightroom's; some get neutral-matrix colour | 50–90 | [raw-parity](raw-parity.md#colour) | | 2 B | **CR3 variants no public file uses** (LR-IMP-FORMATS): `crx.rs` refuses vertical-tile C-RAW, partial-subband and other plane coding, multi-tile 0x200 and adaptive low-frequency gains, and those files fall back to the preview. All 110 CC0 CR3s on raw.pixls.us (31 folders) decode from sensor data, so none of these variants has a public sample; 26 CR3 bodies are verified (M50 / R100 / R8 exact, R5 Mark II pinned, 22 more pinned on one CC0 file each and checked against the camera JPEG, [cr3.md](cr3.md#further-bodies-one-cc0-file-each)). HEIF stills are `.HIF` files, not CR3; no CR3 sRAW / mRAW sample exists | measured: Canon's share whose camera fully works 73% β†’ 94% (raw-parity.md); 18 of 22 popular Canon bodies write CR3, all 18 now verified | +0.3 points of photographers; the variants surface only as user files that open as a preview | 10–25 | [raw-parity](raw-parity.md#remaining-work-ranked-by-photographers-unlocked-per-hour) | -| 3 B | **Render fidelity partial** (LR-BEHAV-RENDER-FIDELITY): calibrated camera-look Contrast and Blacks; other operators need measurement; from process V5 raw tone curves roll off into white in stops, so Exposure keeps recorded highlights (#1632); from V9 Whites, the tone curves, the colour mixer and Colour Grading are measured against Camera Raw ([curve-stage.md](curve-stage.md), [mixer-stage.md](mixer-stage.md), [grading-stage.md](grading-stage.md)), and a raw whose camera profile has no tone curve gets Lightroom's measured default base curve ([default-tone.md](default-tone.md)) | process V3 reduces held-out response error from 0.136 to 0.038 stops for Contrast and 0.424 to 0.077 for Blacks on one Sony camera; Whites stays V2 in V4 to V8 | imported Lightroom edits still differ, especially on uncalibrated operators and cameras | 30–60 | [calibrated Light operators](light-v3.md), [process versions](process-versions.md) | +| 3 B | **Render fidelity partial** (LR-BEHAV-RENDER-FIDELITY): calibrated camera-look Contrast and Blacks; other operators need measurement; from process V5 raw tone curves roll off into white in stops, so Exposure keeps recorded highlights (#1632); from V9 Whites, the tone curves, the colour mixer and Colour Grading are measured against Camera Raw ([curve-stage.md](curve-stage.md), [mixer-stage.md](mixer-stage.md), [grading-stage.md](grading-stage.md)), and a raw whose camera profile has no tone curve gets Lightroom's measured default base curve ([default-tone.md](default-tone.md)); from V9 Highlights acts relative to the frame's tonal range, fitted on photos ([hs-range.md](hs-range.md)) | process V3 reduces held-out response error from 0.136 to 0.038 stops for Contrast and 0.424 to 0.077 for Blacks on one Sony camera; Whites stays V2 in V4 to V8 | imported Lightroom edits still differ, especially on uncalibrated operators and cameras | 30–60 | [calibrated Light operators](light-v3.md), [process versions](process-versions.md) | | 4 | ~~Original-pixel detail at 100%~~ (LR-VIEW-ZOOM): closed 2026-10-12, see Closed recently | checklist row βœ… | β€” | 0 | [ui-parity](ui-parity.md) | | 5 B | **AI masks: Subject, Sky, People, Background, Landscape** are heuristics; Object / Describe run SAM 3 but its download has no mirror configured | `crates/segment`; ai-masks.md; MASK rows 67% | masking is how most Lightroom users edit today | 40–70 + model decision | [target-app-parity](target-app-parity.md#ai) | | 6 | **Compressed ORF** (support withdrawn) | #3775 decoder removed pending provenance review; uncompressed support remains | compressed files use embedded JPEG previews when available, not sensor data | pending review | [orf-compression](orf-compression.md) | @@ -90,6 +90,7 @@ Beta-blocking gaps (B) total **~230–430 h**; with the stability and platform w | Date | Change | Summary | |---|---|---| +| 2026-11-11 | minor | Gap 3: from process V9 Highlights acts relative to the frame's tonal range, fitted on photos ([hs-range.md](hs-range.md)); gap not closed | | 2026-11-11 | minor | Gap 3: from process V9 a raw whose camera profile has no tone curve gets Lightroom's measured default base curve ([default-tone.md](default-tone.md)); gap not closed | | 2026-11-11 | minor | Gap 3: from process V9 Colour Grading is measured against Camera Raw ([grading-stage.md](grading-stage.md)); gap not closed | | 2026-11-11 | minor | Gap 3: from process V9 the colour mixer is measured against Camera Raw ([mixer-stage.md](mixer-stage.md)); gap not closed | diff --git a/docs/hs-range.md b/docs/hs-range.md new file mode 100644 index 00000000000..806a024eb55 --- /dev/null +++ b/docs/hs-range.md @@ -0,0 +1,77 @@ +# Highlights relative to the frame's tonal range (process V9) + +> **Changes:** [revision history](#revision-history) + +Process V9 makes Highlights act relative to the photo's own tonal range, as Lightroom's does. V1 to V8 are unchanged +(`docs/process-versions.md`), and Shadows keeps V8's rule. The code is `crates/pipeline/src/hs_range.rs`, the range +`local::frame_range`, and the GPU kernel's `hs_range_highlights` in `crates/gpu/src/wgsl/finish.wgsl`. + +## What was wrong + +Up to V8 Highlights moves the base layer's log luminance by a fixed weight of its absolute level: `1.7 Γ— amount` at +the top, fading out below βˆ’1 stop from middle grey. Lightroom's Highlights depends on the photo. Measured on Camera +Raw renders of photos at Highlights βˆ’50 and βˆ’100, Lightroom's Highlights works relative to the frame's own tonal +range, anchored on its darkest tones: + +- **On a photo with a wide tonal range it works harder.** Its pull at the top grows with the span from the frame's + darkest to its brightest tones. +- **It reaches further down.** On such a photo it also darkens the upper midtones, which V8 leaves alone. + +Region size barely matters: the response follows the frame's range, not how much of the frame is bright. + +## What V9 does + +1. **The frame's range.** The base layer's 2nd and 99th percentile in logβ‚‚ luminance (`FrameRange`), plus exposure. + It comes from a small render of the whole output frame, 384 px on the long edge, the same proxy Dehaze uses for + its airlight (`local::frame_range`, `Plan::hs_range`). So a zoomed window, a preview and an export of one photo + share it. +2. **Highlights** adds `amount Γ— a Γ— smooth(low, 2.8, base)` to the base layer's log luminance (`FrameRange::highlights`): + - `span` is the range's width in stops, at least 0.1. + - The strength is `a = 0.7 Γ— (span / 5)^2.4`, clamped to 0.2…8. + - It reaches down to `low = βˆ’1 βˆ’ 0.8 Γ— max(span βˆ’ 5, 0)` stops. +3. **Shadows**, local Whites, Blacks, Contrast, Clarity and Texture are V8's. + +It applies to global Highlights and to Highlights in masks. A photo with Highlights at 0 renders as V8. + +## How it was fitted + +The form comes from an earlier analysis of Camera Raw renders of photos: the response scales with the frame's range +and is anchored on its darkest tones. The five constants were fitted by coordinate descent against Camera Raw renders +of 5 training photos (Panasonic Lumix DC-S9, RW2, Adobe Standard), on Highlights βˆ’50 and βˆ’100, the Highlights and +Shadows combination and one preset of each group. They were checked on 5 other photos held out from fitting. These +renders are the contributor's own photos and are not in the repository. Unlike the curve, mixer and grading stages, +no synthetic chart is involved: a flat chart has no tonal range for the rule to act on. + +A version that also made Shadows relative to the range was measured too. It moved Shadows +100 further from Lightroom +(4.35 to 4.53) and the Highlights and Shadows combination less than Highlights alone did, so Shadows keeps V8's rule. + +## Results + +Held-out Panasonic Lumix DC-S9 photos (RW2, Adobe Standard profile, 1,500 px, aligned against Camera Raw's renders), +lightness RMS and mean a/b error (OkLab Γ— 100), lower is better. "Before" is process V9 without this change. + +| Edits | Tone: before β†’ this | Colour: before β†’ this | +|---|---|---| +| Highlights βˆ’50, βˆ’100 | 3.30 β†’ 2.17 | 0.37 β†’ 0.27 | +| Highlights βˆ’100 with Shadows +100 | 6.59 β†’ 4.03 | 0.62 β†’ 0.42 | +| Shadows +50, +100 | 3.23 β†’ 3.23 | 0.39 β†’ 0.39 | +| 19 presets (7 groups) | 2.61 β†’ 2.14 | 0.73 β†’ 0.69 | +| Unedited | 0.69 β†’ 0.69 | 0.27 β†’ 0.27 | + +Three presets get worse: Muted (tone 4.92 β†’ 5.35, colour 0.72 β†’ 0.85), Sunset (tone 2.24 β†’ 2.43) and Cool (colour +1.53 β†’ 1.58, tone better). + +## Limits + +- Fitted on one camera's photos (10 in all) with Lightroom's renders as reference; other cameras and scenes are + unchecked. +- The percentiles come from a 384 px proxy, so a frame whose range is set by a few tiny highlights can read a + slightly different range than the full image would. +- The formula is a fit, not a measurement of Lightroom's operator: its shape matches on these photos, its constants + may not hold for very wide or very narrow ranges (the strength is clamped). + +## Revision history + +| Date | Change | Summary | +|---|---|---| +| 2026-11-11 | minor | Process V9: Highlights relative to the frame's tonal range | diff --git a/docs/parity-checklist.md b/docs/parity-checklist.md index 5d6cef78ea6..5f68700cdbc 100644 --- a/docs/parity-checklist.md +++ b/docs/parity-checklist.md @@ -181,7 +181,7 @@ differences and missing bindings are in [ui-parity.md](ui-parity.md#shortcuts). | LR-EDIT-HDR-MODE | HDR editing | P2 | βœ… | `cmd:develop.hdr`, `ctl:hdr.maxEv`, `crates/ui-egui/src/panels/edit.rs` (`hdr_row`) | HDR button next to B&W in the Edit panel header, as Lightroom (Visualize HDR and the headroom limit in the Light panel while it's on, sliding open and shut with the histogram's layout change); see Q. HDR | | LR-EDIT-LIGHT-EXPOSURE | Exposure | P0 | βœ… | `ctl:light.exposure` | Alt/Option-drag shows highlight clipping (black, clipped channels in colour) | | LR-EDIT-LIGHT-CONTRAST | Contrast | P0 | 🟑 | `ctl:light.contrast` | From process V4, global Contrast on the camera-look path is fitted per channel in ProPhoto with the sRGB transfer. Check response error 0.136 to 0.038 stops on six held-out Sony photos. Other sources and local adjustments retain V2; broader parity remains unverified (`docs/light-v3.md`). | -| LR-EDIT-LIGHT-HIGHLIGHTS | Highlights | P0 | βœ… | `ctl:light.highlights`, `crates/raw/src/highlight.rs` | sensor-clipped highlights stay neutral when Highlights (or Exposure, Whites) darkens them: fully clipped content is rebuilt to the neutral of the colour model applied after it, partly clipped content takes its colour from reliable unclipped content nearby (not from dark objects, lens fringes or another surface beside it) and white where there is none, and pale partly clipped content (a white sky) turns white on its way to clipping (#523); binned previews and thumbnails decide clipping per sample before averaging (`develop_binned_masked`, `highlight::reconstruct_masked`), so a block with one clipped specular sample keeps its mean instead of jumping to the clip level, which reconstruction turned into green speckles at 500 px (#548) From process V2 the Highlights/Shadows base is the edge-aware filter of the 0.15 %-of-long-edge median of log luminance: twigs and fine texture take their surroundings' shift, so bright areas keep their local contrast as with Exposure (V1's base kept ~0.6 of it at βˆ’100, #632); region edges stay sharp; from process V8 (`local::detail_free`: clamped between the median at that radius and one 3Γ— wider) lettering keeps clean gaps (the median alone turned them into blocks of the letters' tone). Alt/Option-drag shows highlight clipping | +| LR-EDIT-LIGHT-HIGHLIGHTS | Highlights | P0 | βœ… | `ctl:light.highlights`, `crates/raw/src/highlight.rs` | sensor-clipped highlights stay neutral when Highlights (or Exposure, Whites) darkens them: fully clipped content is rebuilt to the neutral of the colour model applied after it, partly clipped content takes its colour from reliable unclipped content nearby (not from dark objects, lens fringes or another surface beside it) and white where there is none, and pale partly clipped content (a white sky) turns white on its way to clipping (#523); binned previews and thumbnails decide clipping per sample before averaging (`develop_binned_masked`, `highlight::reconstruct_masked`), so a block with one clipped specular sample keeps its mean instead of jumping to the clip level, which reconstruction turned into green speckles at 500 px (#548) From process V2 the Highlights/Shadows base is the edge-aware filter of the 0.15 %-of-long-edge median of log luminance: twigs and fine texture take their surroundings' shift, so bright areas keep their local contrast as with Exposure (V1's base kept ~0.6 of it at βˆ’100, #632); region edges stay sharp; from process V8 (`local::detail_free`: clamped between the median at that radius and one 3Γ— wider) lettering keeps clean gaps (the median alone turned them into blocks of the letters' tone). Alt/Option-drag shows highlight clipping; from process V9 it acts relative to the frame's tonal range, stronger and reaching further down on a wide range, as Lightroom's does ([hs-range.md](hs-range.md)) | | LR-EDIT-LIGHT-SHADOWS | Shadows | P0 | βœ… | `ctl:light.shadows` | From process V2, the same base as Highlights: dark areas keep their local contrast when lifted (#632); from process V8, the gaps in dark lettering on a bright panel are not lifted into bright blocks. Alt/Option-drag shows shadow clipping (white, clipped channels in colour) | | LR-EDIT-LIGHT-WHITES | Whites | P0 | 🟑 | `ctl:light.whites`, `crates/pipeline/src/visualize.rs` | From process V9 Whites is measured against Camera Raw renders of synthetic grey steps and reaches into the midtones as Lightroom's does ([curve-stage.md](curve-stage.md)); not yet compared on photos per camera. V4 to V8 preserve V2 Whites for both signs; measured V2 check response error is 0.075 stops on the Sony test photos (`docs/light-v3.md`). Alt/Option-drag shows highlight clipping (black, clipped channels in colour) | | LR-EDIT-LIGHT-BLACKS | Blacks | P0 | 🟑 | `ctl:light.blacks`, `crates/pipeline/src/visualize.rs` | From process V4, global Blacks on the camera-look path uses a fitted per-channel/luminance mix. Check response error 0.424 to 0.077 stops on six held-out Sony photos; deepest tones still differ. Other sources and local adjustments retain V2 (`docs/light-v3.md`). Alt/Option-drag shows shadow clipping (white, clipped channels in colour) | @@ -467,7 +467,7 @@ differences and missing bindings are in [ui-parity.md](ui-parity.md#shortcuts). | LR-BEHAV-OFFLINE | Offline editing | P1 | βœ… | | local-first: everything works offline | | LR-BEHAV-WEB-SAFETY | Library safety in the browser build | P1 | 🟑 | `cmd:file.backupLibrary`, `cmd:file.restoreLibrary`, `apps/lightcraft-web/src/safety.rs`, `apps/lightcraft-web/src/backup.rs`, `apps/lightcraft-web/src/files.rs` | web only (experimental): Back Up Library (zip of the catalog and every stored original) and a non-destructive Restore; failed saves show as unsaved and are retried; a photo that can't be stored isn't added; one tab per library (Web Locks); notices for storage that isn't persistent and for a library that can't open; `?reset` asks first; a panic shows a message. Missing: `?safe` start, deleting originals of removed photos, zip64 (backups > 4 GB) | | LR-BEHAV-GPU | GPU acceleration | P0 | βœ… | `crates/gpu/src/render.rs`, `cmd:app.gpu`, `docs/gpu-pipeline.md`, `crates/ui-egui/src/panels/notices.rs` | CPU fallback per render on device limits, out of memory, device errors / loss, incomplete or black results (`perf.gpuReason`, `perf.gpuFallback`; each render reports its own reason β€” `lightcraft_gpu::try_render`, `gpuFallback` per exported file β€” issue #675); short submissions for slow iGPUs; backend choice (DX12 only on Windows, `LIGHTCRAFT_GPU_BACKEND` / `WGPU_BACKEND`), device created after the window opens, crash sentinel (issue #136); a GPU lost while LightCraft runs (driver reset) stops it with that message and turns GPU rendering off for the next start, which says why (issue #1337; the window's renderer can't survive the lost device); quitting waits (up to 2 s) for renders in flight and starts no new GPU work, so none is inside the driver when the process exits (`crates/gpu/src/exit.rs`, issue #620; seen crashing only on Linux + NVIDIA, other drivers unverified); with GPU rendering on and no adapter found at all (e.g. no Vulkan loader on NixOS outside `nix develop`), the desktop app says once per session that it renders on the CPU and points to Help β–Έ System Info (`gpu_notice`; not when the GPU is turned off or only a software adapter exists); no tiling beyond the buffer limit (CPU) | -| LR-BEHAV-RENDER-FIDELITY | Rendering matches Lightroom | P1 | 🟑 | `crates/pipeline/src/lib.rs`, `crates/pipeline/src/tone.rs` | Process V4 calibrates global camera-look Contrast and Blacks against black-box Lightroom exports of Sony ILCE-7CR photos. Held-out response errors are 0.038 and 0.077 stops; V1/V2 keep their rendering. Up to V8 Whites retains V2. Exposure, Highlights/Shadows, other operators and broader camera coverage remain open (`docs/light-v3.md`). From process V9 Whites, the parametric curve and the point curves follow Camera Raw's measured response on synthetic grey steps, the master curve hue-preserving ([curve-stage.md](curve-stage.md)). From V9 the colour mixer follows Camera Raw's measured response on synthetic colour charts ([mixer-stage.md](mixer-stage.md)), and Colour Grading too ([grading-stage.md](grading-stage.md)); Calibration, Saturation and Vibrance are not measured in yet. From V9 a raw whose camera profile has no tone curve of its own (Adobe Standard) gets Lightroom's default base curve measured on a synthetic chart, hue preserving on linear ProPhoto channels, with a per-camera exposure offset measured for the Panasonic Lumix DC-S9 only ([default-tone.md](default-tone.md)). From process V5 a raw's tone curve rolls off into white in stops (past a camera curve's last fitted knot, or from half a stop below the generic curve's white point instead of clipping), so Exposure +1 and +2 keep the highlights the sensor recorded: on 12 CC0 corpus raws and 6 CC0 DNGs on the generic curve, unclipped pixels whose luminance renders at 254 or more fall from up to 22.5 % to 0 at +1 EV and from up to 35 % to at most 0.03 % at +2 EV, apart from one sky that is mostly at the clip (#1632). Not compared with Lightroom's output | +| LR-BEHAV-RENDER-FIDELITY | Rendering matches Lightroom | P1 | 🟑 | `crates/pipeline/src/lib.rs`, `crates/pipeline/src/tone.rs` | Process V4 calibrates global camera-look Contrast and Blacks against black-box Lightroom exports of Sony ILCE-7CR photos. Held-out response errors are 0.038 and 0.077 stops; V1/V2 keep their rendering. Up to V8 Whites retains V2. Exposure, Highlights/Shadows, other operators and broader camera coverage remain open (`docs/light-v3.md`). From process V9 Whites, the parametric curve and the point curves follow Camera Raw's measured response on synthetic grey steps, the master curve hue-preserving ([curve-stage.md](curve-stage.md)). From V9 the colour mixer follows Camera Raw's measured response on synthetic colour charts ([mixer-stage.md](mixer-stage.md)), and Colour Grading too ([grading-stage.md](grading-stage.md)); Calibration, Saturation and Vibrance are not measured in yet. From V9 Highlights acts relative to the frame's tonal range, fitted on Lightroom's renders of photos ([hs-range.md](hs-range.md)). From V9 a raw whose camera profile has no tone curve of its own (Adobe Standard) gets Lightroom's default base curve measured on a synthetic chart, hue preserving on linear ProPhoto channels, with a per-camera exposure offset measured for the Panasonic Lumix DC-S9 only ([default-tone.md](default-tone.md)). From process V5 a raw's tone curve rolls off into white in stops (past a camera curve's last fitted knot, or from half a stop below the generic curve's white point instead of clipping), so Exposure +1 and +2 keep the highlights the sensor recorded: on 12 CC0 corpus raws and 6 CC0 DNGs on the generic curve, unclipped pixels whose luminance renders at 254 or more fall from up to 22.5 % to 0 at +1 EV and from up to 35 % to at most 0.03 % at +2 EV, apart from one sky that is mostly at the clip (#1632). Not compared with Lightroom's output | | LR-BEHAV-DRAGDROP | Drag and drop | P1 | βœ… | `crates/ui-egui/src/lib.rs`, `crates/ui-egui/src/panels/grid.rs` (`drag_feedback`), `crates/ui-egui/src/panels/left.rs` (`drop_target`, `album_drag_over`, `top_level_drop_target`, `drag_auto_scroll`), `crates/ui-egui/src/destination.rs`, `crates/ui-egui/src/widgets.rs` (`context_menu`), `crates/ui-egui/src/widgets/text_field.rs`, `crates/ui-egui/src/tests/carried_right_click.rs`, `crates/ui-egui/src/tests/carried_text_field_menu.rs` | a right-click while photos are carried opens no context menu (every menu opened through `widgets::context_menu`: sidebar rows, grid cells, lists; a text field's own Cut / Copy / Paste menu too); files β†’ app (a drop-target card while they hover, then the import review); grid photos β†’ an album row (adds the selection, with a count badge while dragging); sidebar album / folder rows β†’ a folder (moves it; its name follows the pointer); a drag of albums or grid photos near the top or bottom edge of the sidebar scrolls it (faster nearer the edge, only while the pointer is over the sidebar); when another folder has the same name, the dragged label, the Move question and the toast name the folder it is in (`home (/a)`); an album drop's toast does the same for an album of that name in another album folder (two in the same place have nothing to tell them apart and keep the plain name); only the primary button drags photos and drops them: a right-button drag over a grid cell neither picks photos up nor changes the selection, and a right-button release while photos are dragged neither drops them nor ends the drag | | LR-BEHAV-TOAST | Toast notifications | P1 | βœ… | `crates/ui-egui/src/panels.rs` | | | LR-BEHAV-DIALOGS | Dialogs fit the window | P1 | βœ… | `crates/ui-egui/src/dialogs.rs` (`dialog_body`, `list_height`), `crates/ui-egui/src/tests/dialog_fit.rs`, `crates/ui-egui/src/tests/dialog_copy.rs`, `crates/ui-egui/src/tests/dialogs.rs` (`a_click_outside_closes_the_dialog_when_settings_allow_it`) | a dialog taller than the window (Export on a 1366Γ—768 screen, issue #781) never runs off it: its options scroll while the title bar and the Cancel / confirm row stay on screen (the confirm button names its action: Create, Rename, Create Stacks, Export 3 Photos…, with "OK" kept only for a one-field prompt opened with a command that has no verb, `crates/ui-egui/src/tests/dialog_copy.rs`); lists that scroll on their own (What's New, All Metadata, shortcuts, smart-album rules, credits) get shorter first; dialogs that fit look as before; Import keeps its own resizable, scrolling window; Settings β†’ Dialogs β†’ Close a dialog by clicking outside it (off by default, so a stray click never throws away a dialog's choices): a click pressed and released on the dimmed backdrop closes the dialog like Esc and doesn't reach the panels below, while a drag that ends outside (a slider pulled past the edge) or a click that closes a dropdown keeps it; the import review never closes this way (`clicked_backdrop`); a one-line prompt (Rename Folder, New Folder on Disk, the preset and version names, New Library when its name can't be used, Auto-Tag from Tracklog) the engine refuses stays open with its text and shows the reason in a toast, so the name can be corrected, where it used to close without a word; a New Folder on Disk that works says so (β€œCreated folder β€œSelects” in β€œ2026/Shoot””, naming the parent by its last two folders as dialogs do) | @@ -802,6 +802,7 @@ Latin stays upright. Advanced Japanese composition remains open. Regression cove | Date | Change | Summary | |---|---|---| +| 2026-11-11 | minor | LR-EDIT-LIGHT-HIGHLIGHTS, LR-BEHAV-RENDER-FIDELITY, LRC-DEV-PROCESS: process V9 makes Highlights relative to the frame's tonal range ([hs-range.md](hs-range.md)); statuses unchanged | | 2026-11-11 | minor | LR-BEHAV-RENDER-FIDELITY, LRC-DEV-PROCESS: process V9 gives a raw whose camera profile has no tone curve Lightroom's default base curve, measured ([default-tone.md](default-tone.md)); status unchanged | | 2026-11-07 | correction | Compressed ORF sensor support withdrawn pending provenance review; embedded preview fallback remains. Coverage regenerated without the removed decoder: 557 verified, 665 unverified, 187 preview-only, 37 unsupported; 94% use-weighted coverage. | | 2026-11-04 | minor | Compressed ORF support was introduced in #3775; subsequently withdrawn pending provenance review. Earlier clean-room and verification claims are withdrawn; compressed files use embedded previews when available. See [ORF status](orf-compression.md). | diff --git a/docs/process-versions.md b/docs/process-versions.md index ee874d22bbe..98d9cbddece 100644 --- a/docs/process-versions.md +++ b/docs/process-versions.md @@ -17,7 +17,7 @@ stronger Light sliders, issue #196) without changing a single photo someone has | **V6** | V5 plus: colour noise reduction filters the linear colour differences Rβˆ’Y and Bβˆ’Y with the joint method (issue #815, `docs/nr-color-joint.md`): edge-aware weights from a denoised guide shared by both differences, anisotropic diffusion over scales, a brake for isolated colour specks; Y is kept exactly. V1 to V5 keep the blurred chromaticity (`local::denoise`). CPU (`local::denoise`) and GPU (`render::denoise`) branch on `local::joint_colour_nr`. Renders with Color 0 are the same as V2's. | | **V7** | V6 plus: film grain from crystal layers ([grain.md](grain.md), `crates/pipeline/src/crystal.rs`), after AurΓ©lien Pierre's model: resolution independent (a preview is the export's grain box-downscaled), fading out at black and white, calibrated to Lightroom Classic's strength and width at mid grey. V1 to V6 keep their two-octave value noise exactly (`finish::ValueGrain`; on the GPU `F_GRAIN_MODEL` 0); `finish::GrainModel::new` picks the model per process. Renders without grain don't depend on this. | | **V8** | V7 plus: Highlights and Shadows take their edge-aware filter of log luminance without its fine detail (`local::detail_free`: each value clamped between its separable median at the V2 radius and the median of a 3Γ— wider neighbourhood) instead of V2's plain median (`local::base_keeps_gaps`), so the gaps in dark lettering on a bright panel are not lifted into bright blocks (issue #3460). CPU (`local::tone_base`) and GPU (`render::tone_base`) branch on it; the base plane is keyed by process. Renders without Highlights or Shadows (global or local) are the same as V7's. | -| **V9** (the latest) | V8 plus: Whites, the parametric curve and the point curves as Lightroom applies them ([curve-stage.md](curve-stage.md), `crates/pipeline/src/curve_stage.rs`), measured on Camera Raw renders of synthetic grey steps. Whites leaves the tone map and, with the parametric curve, comes from measured tables (Whites reaches into the midtones; the regions are broad and add); the master curve acts hue-preserving on sRGB-encoded linear ProPhoto RGB (largest and smallest channel through the curve, the middle one in proportion in linear light), then the red, green and blue curves per channel, between the calibrated Contrast and Blacks and the colour stage. V1 to V8 keep Whites in the tone map and their per-channel curves on the output. CPU (`finish::finish_with`) and GPU (`finish.wgsl::curve_stage`) share the tables. Renders with Whites, the parametric curve and the point curves neutral are V7's. The colour mixer follows Camera Raw's measured response on synthetic OkLCh charts ([mixer-stage.md](mixer-stage.md), `crates/pipeline/src/mixer_stage.rs`): per band and slider the hue shift, chroma change and lightness change by input hue, chroma and lightness, applied before the tone curves; V1 to V8 keep their mixer model after the curves (`ColorOps::mixer`). Colour Grading follows Camera Raw's measured response ([grading-stage.md](grading-stage.md), `crates/pipeline/src/grading_stage.rs`): per wheel a tint by hue and saturation, a lightness profile by Blending and Balance, a damping for colours already leaning the tint's way, and Luminance as a lightness change; V1 to V8 keep their grading (`ColorOps::grading`). A raw whose camera profile has no tone curve of its own (a DCP without `ProfileToneCurve`, such as Adobe Standard) gets Lightroom's default base curve, measured on a synthetic chart, applied hue preserving on linear ProPhoto channels and shifted by the camera's measured exposure offset ([default-tone.md](default-tone.md), `crates/pipeline/src/default_tone.rs`); V1 to V8 keep the photo's own tone (the file's curve or the one fitted to its camera JPEG), scaled by luminance. | +| **V9** (the latest) | V8 plus: Whites, the parametric curve and the point curves as Lightroom applies them ([curve-stage.md](curve-stage.md), `crates/pipeline/src/curve_stage.rs`), measured on Camera Raw renders of synthetic grey steps. Whites leaves the tone map and, with the parametric curve, comes from measured tables (Whites reaches into the midtones; the regions are broad and add); the master curve acts hue-preserving on sRGB-encoded linear ProPhoto RGB (largest and smallest channel through the curve, the middle one in proportion in linear light), then the red, green and blue curves per channel, between the calibrated Contrast and Blacks and the colour stage. V1 to V8 keep Whites in the tone map and their per-channel curves on the output. CPU (`finish::finish_with`) and GPU (`finish.wgsl::curve_stage`) share the tables. Renders with Whites, the parametric curve and the point curves neutral are V7's. The colour mixer follows Camera Raw's measured response on synthetic OkLCh charts ([mixer-stage.md](mixer-stage.md), `crates/pipeline/src/mixer_stage.rs`): per band and slider the hue shift, chroma change and lightness change by input hue, chroma and lightness, applied before the tone curves; V1 to V8 keep their mixer model after the curves (`ColorOps::mixer`). Colour Grading follows Camera Raw's measured response ([grading-stage.md](grading-stage.md), `crates/pipeline/src/grading_stage.rs`): per wheel a tint by hue and saturation, a lightness profile by Blending and Balance, a damping for colours already leaning the tint's way, and Luminance as a lightness change; V1 to V8 keep their grading (`ColorOps::grading`). A raw whose camera profile has no tone curve of its own (a DCP without `ProfileToneCurve`, such as Adobe Standard) gets Lightroom's default base curve, measured on a synthetic chart, applied hue preserving on linear ProPhoto channels and shifted by the camera's measured exposure offset ([default-tone.md](default-tone.md), `crates/pipeline/src/default_tone.rs`); V1 to V8 keep the photo's own tone (the file's curve or the one fitted to its camera JPEG), scaled by luminance. Highlights acts relative to the frame's tonal range (the base layer's 2nd to 99th percentile, from a 384 px render of the whole frame): stronger and reaching further down on a wide range ([hs-range.md](hs-range.md), `crates/pipeline/src/hs_range.rs`); Shadows keeps V8's rule. | ## The rule @@ -131,6 +131,7 @@ extra field and retain their existing cached renders. No cache-version bump is n | 2026-11-10 | minor | V9: the colour mixer measured against Lightroom, before the tone curves ([mixer-stage.md](mixer-stage.md)); V1 to V8 keep theirs | | 2026-11-10 | minor | V9: Colour Grading measured against Lightroom ([grading-stage.md](grading-stage.md)); V1 to V8 keep theirs | | 2026-11-11 | minor | V9: Lightroom's default base curve for a raw whose camera profile has none ([default-tone.md](default-tone.md)); V1 to V8 keep the photo's own tone | +| 2026-11-11 | minor | V9: Highlights relative to the frame's tonal range ([hs-range.md](hs-range.md)); V1 to V8 keep theirs | | 2026-11-08 | minor | V8: the Highlights/Shadows base keeps the gaps in dark lettering (#3460) | | 2026-11-07 | minor | V7: film grain from crystal layers ([grain.md](grain.md)); V1 to V6 keep their value noise | | 2026-11-05 | minor | V5: a raw's tone curve rolls off into white in stops, so raising Exposure keeps recorded highlights (#1632) | diff --git a/docs/whats-new.md b/docs/whats-new.md index 4f0662096da..e0fad3525b8 100644 --- a/docs/whats-new.md +++ b/docs/whats-new.md @@ -2,6 +2,13 @@ ## Unreleased +### Highlights behaves as in Lightroom (process V9) +- Highlights now adapts to the photo, as Lightroom's does: on a photo with a wide range from its darkest to its + brightest tones it recovers more and reaches further into the upper midtones, and on a flat photo it acts more + gently. A zoomed-in view, a preview and an export of the same photo get the same result. Shadows is unchanged. + This is part of rendering process 9: photos you already edited keep their look until you choose Photo β–Έ Update to + Current Process. See [Highlights relative to the frame's range](hs-range.md). + ### Adobe Standard profiles look as in Lightroom (process V9) - A raw developed with an imported camera profile that has no tone curve of its own, such as Adobe Standard, now gets Lightroom's base tone curve, applied the way Lightroom applies it, instead of the tone of the camera's JPEG. An From 0793d08bda8f0a47cce8037d56d39b3a12708067 Mon Sep 17 00:00:00 2001 From: smi-leonivkovic Date: Wed, 11 Nov 2026 08:46:50 +0100 Subject: [PATCH 10/51] LR-BEHAV-RENDER-FIDELITY: exposure offsets measured for the Lumix S5, S5 II and S5 IIX (#523) --- crates/pipeline/src/default_tone.rs | 12 +++++++----- docs/default-tone.md | 15 ++++++++++++--- docs/whats-new.md | 4 ++-- 3 files changed, 21 insertions(+), 10 deletions(-) diff --git a/crates/pipeline/src/default_tone.rs b/crates/pipeline/src/default_tone.rs index 92a01fed048..5515557434d 100644 --- a/crates/pipeline/src/default_tone.rs +++ b/crates/pipeline/src/default_tone.rs @@ -16,10 +16,11 @@ use crate::default_tone_table::GREY; use crate::tone::CameraTone; use lightcraft_develop::{DevelopSettings, Process}; -/// Exposure offsets measured per camera (make, model, stops) for a raw rendered through its Adobe Standard profile: -/// the shift of the chart's curve that leaves Lightroom's unedited renders of the camera's photos no brighter or -/// darker on average (`docs/default-tone.md`). -const CAMERA_EV: [(&str, &str, f32); 1] = [("Panasonic", "DC-S9", -0.10)]; +/// Exposure offsets per camera (make, model, stops) for a raw rendered through its Adobe Standard profile: the shift +/// of the chart's curve that leaves Lightroom's unedited renders of the camera's photos no brighter or darker on +/// average, measured per camera (`docs/default-tone.md`). +const CAMERA_EV: [(&str, &str, f32); 4] = + [("Panasonic", "DC-S9", -0.10), ("Panasonic", "DC-S5", -0.04), ("Panasonic", "DC-S5M2", -0.03), ("Panasonic", "DC-S5M2X", -0.05)]; /// The measured exposure offset of a camera in stops, 0 for a camera not measured. pub fn camera_ev(make: &str, model: &str) -> f32 { @@ -134,7 +135,8 @@ mod tests { fn camera_offsets_are_by_make_and_model() { assert_eq!(camera_ev("Panasonic", "DC-S9"), -0.10); assert_eq!(camera_ev("PANASONIC ", "dc-s9"), -0.10); - assert_eq!(camera_ev("Panasonic", "DC-S5M2"), 0.0); + assert_eq!(camera_ev("Panasonic", "DC-S5M2"), -0.03); + assert_eq!(camera_ev("Panasonic", "DC-G9M2"), 0.0); assert_eq!(camera_ev("Sony", "ILCE-7M4"), 0.0); } diff --git a/docs/default-tone.md b/docs/default-tone.md index aae7e9b0dc1..1574a72f394 100644 --- a/docs/default-tone.md +++ b/docs/default-tone.md @@ -40,11 +40,19 @@ A raw without a camera profile, a profile with a tone curve of its own, and a re **The exposure offset.** The chart is a DNG with a baseline exposure of 0. For a raw of another format (RW2, ARW, NEF and so on) Camera Raw uses an exposure offset of its own per camera, which the file does not carry and LightCraft -does not know. `default_tone::camera_ev` holds the offsets measured on photos: +does not know. `default_tone::camera_ev` holds the offsets: | Camera | Offset (stops) | Measured on | |---|---:|---| -| Panasonic Lumix DC-S9 (RW2) | βˆ’0.10 | 5 photos, the shift that leaves Lightroom's unedited renders no brighter or darker on average | +| Panasonic Lumix DC-S9 (RW2) | βˆ’0.10 | 5 photos (training set; the 5 held-out photos land 0.00 lighter on average) | +| Panasonic Lumix DC-S5 (RW2) | βˆ’0.04 | 6 photos from 6 days; with the offset 0.10 darker than Lightroom on average (0.44 lighter without) | +| Panasonic Lumix DC-S5 II (DC-S5M2, RW2) | βˆ’0.03 | 6 photos from 6 days; 0.02 darker (0.32 lighter without) | +| Panasonic Lumix DC-S5 IIX (DC-S5M2X, RW2) | βˆ’0.05 | 6 photos from 6 days; 0.06 darker (0.56 lighter without) | + +Lightness differences are OkLab Γ— 100, the mean over the central three quarters of each frame, unedited, against +Camera Raw's render through the same camera's Adobe Standard profile. Adding a camera takes about 5 photos: render +them unedited through Camera Raw and LightCraft, and pick the offset that leaves the mean lightness difference at 0 +(about 11.8 per stop). Other cameras get 0. Without the offset the S9 renders 1.1 lighter in lightness than Lightroom (OkLab Γ— 100), so a camera not measured can be off by about that much. @@ -79,7 +87,8 @@ lighter before). No preset gets worse in tone or in colour. ## Limits -- One camera's offset is measured. Others render with the chart's curve as it is. +- Four cameras' offsets are measured (the Lumix S9, S5, S5 II and S5 IIX). Other cameras render with the chart's + curve as it is, which on these four would be 0.3 to 1.2 lighter than Lightroom. - The curve is measured for Camera Raw's process version 2012 (`crs:ProcessVersion` 11.0), one chart, grey steps up to the DNG's white. Above white it rolls off as V5's camera curves do, not as measured. - Smart previews are built without the imported camera profile, so a photo whose original is offline renders diff --git a/docs/whats-new.md b/docs/whats-new.md index 4f0662096da..ef75893df63 100644 --- a/docs/whats-new.md +++ b/docs/whats-new.md @@ -5,8 +5,8 @@ ### Adobe Standard profiles look as in Lightroom (process V9) - A raw developed with an imported camera profile that has no tone curve of its own, such as Adobe Standard, now gets Lightroom's base tone curve, applied the way Lightroom applies it, instead of the tone of the camera's JPEG. An - unedited photo then matches Lightroom's in brightness, contrast and colour far more closely. Panasonic Lumix DC-S9 - raws (RW2) are measured and match closely; other cameras get the same curve without a per-camera exposure offset, + unedited photo then matches Lightroom's in brightness, contrast and colour far more closely. Panasonic Lumix S9, + S5, S5 II and S5 IIX raws (RW2) are measured and match closely; other cameras get the same curve without a per-camera exposure offset, so they can come out a little lighter or darker than in Lightroom. This is part of rendering process 9: photos you already edited keep their look until you choose Photo β–Έ Update to Current Process. See [Lightroom's default base curve](default-tone.md). From 5fed65cab19fcbcaaa6754938322f93fddd11f3d Mon Sep 17 00:00:00 2001 From: smi-leonivkovic Date: Wed, 11 Nov 2026 08:58:49 +0100 Subject: [PATCH 11/51] LR-EDIT-CALIB: process V9, Calibration's primaries measured against Lightroom (#523) --- crates/gpu/src/params.rs | 18 +++++- crates/gpu/src/wgsl/finish.wgsl | 14 +++-- crates/gpu/tests/it/equivalence.rs | 4 ++ crates/pipeline/src/finish.rs | 3 +- crates/pipeline/src/mixer_stage.bin | Bin 394092 -> 492588 bytes crates/pipeline/src/mixer_stage.rs | 87 ++++++++++++++++++++++------ docs/gaps.md | 3 +- docs/mixer-stage.md | 37 ++++++++---- docs/parity-checklist.md | 5 +- docs/process-versions.md | 3 +- docs/whats-new.md | 6 ++ tools/lr_mixer_charts.py | 12 ++-- 12 files changed, 145 insertions(+), 47 deletions(-) diff --git a/crates/gpu/src/params.rs b/crates/gpu/src/params.rs index 0ab2993d50c..5c9552aebca 100644 --- a/crates/gpu/src/params.rs +++ b/crates/gpu/src/params.rs @@ -28,6 +28,9 @@ const FIELDS: &[(&str, usize)] = &[ ("STAGE_REFINE", 1), ("MSTAGE", 1), ("MSTAGE_OFF", 1), + ("MSTAGE_MIX", 1), + ("MSTAGE_CAL", 1), + ("MSTAGE_CAL_OFF", 1), ("MGRADE", 1), ("MGRADE_OFF", 1), ("RGB_TONE", 1), @@ -225,12 +228,18 @@ pub fn finish_block(fp: &FinishParams, masks: &[[f32; MASK_TERMS]], present: &Pr } aux.extend_from_slice(&l.v); } - // process V9's mixer stage: its 9 chroma and 3 lightness keys, then its table + // process V9's mixer stage: calibration's table, then the mixer's, each after the 9 chroma and 3 lightness keys + let mstage_cal_off = aux.len(); + if let Some((cs, t)) = fp.mixer_stage.as_ref().and_then(|cs| cs.calibration.as_deref().map(|t| (cs, t))) { + aux.extend(cs.chroma.iter().flatten()); + aux.extend_from_slice(&cs.light); + aux.extend_from_slice(&t[..]); + } let mstage_off = aux.len(); - if let Some(cs) = &fp.mixer_stage { + if let Some((cs, t)) = fp.mixer_stage.as_ref().and_then(|cs| cs.table.as_deref().map(|t| (cs, t))) { aux.extend(cs.chroma.iter().flatten()); aux.extend_from_slice(&cs.light); - aux.extend_from_slice(&cs.table[..]); + aux.extend_from_slice(&t[..]); } // process V9's Colour Grading: the Luminance curve, then per wheel its tint, damping and profile let mgrade_off = aux.len(); @@ -293,6 +302,9 @@ pub fn finish_block(fp: &FinishParams, masks: &[[f32; MASK_TERMS]], present: &Pr p.f("STAGE_REFINE", fp.curve_stage.as_ref().map_or(1.0, |c| c.refine)); p.b("MSTAGE", fp.mixer_stage.is_some()); p.u("MSTAGE_OFF", mstage_off as u32); + p.b("MSTAGE_MIX", fp.mixer_stage.as_ref().is_some_and(|cs| cs.table.is_some())); + p.b("MSTAGE_CAL", fp.mixer_stage.as_ref().is_some_and(|cs| cs.calibration.is_some())); + p.u("MSTAGE_CAL_OFF", mstage_cal_off as u32); // 0: off, else 1 + the number of wheels with a tint p.u("MGRADE", mgrade.map_or(0, |g| 1 + g.wheels.len() as u32)); p.u("MGRADE_OFF", mgrade_off as u32); diff --git a/crates/gpu/src/wgsl/finish.wgsl b/crates/gpu/src/wgsl/finish.wgsl index 06885e0c81d..d3120807bb8 100644 --- a/crates/gpu/src/wgsl/finish.wgsl +++ b/crates/gpu/src/wgsl/finish.wgsl @@ -198,14 +198,14 @@ fn mstage_look(keys: u32, l: f32, c: f32, h: f32) -> vec3 { return r[0] * (1.0 - lb.f) + r[1] * lb.f; } -// `MixerStage::apply`: the colour mixer, through OkLCh. -fn mixer_stage(d: vec3) -> vec3 { +// One pass of `MixerStage::apply` (calibration or the mixer), through OkLCh: the keys and table at `keys` in `aux`. +fn mixer_stage(d: vec3, keys: u32) -> vec3 { let lab = oklab(d); let l = lab.x; let c = sqrt(lab.y * lab.y + lab.z * lab.z); // atan2(0, 0) is undefined in WGSL; the CPU's gives 0 let h = select(atan2(lab.z, lab.y), 0.0, c == 0.0); - let r = mstage_look(pu(F_MSTAGE_OFF), l, c, h); + let r = mstage_look(keys, l, c, h); let h2 = h + r.x; let c2 = c * r.y; return oklab_inv(vec3(max(l + r.z, 0.0), c2 * cos(h2), c2 * sin(h2))); @@ -874,7 +874,13 @@ fn main(@builtin(global_invocation_id) gid: vec3) { // --- process V9: the colour mixer, then Whites and the tone curves if (pu(F_MSTAGE) != 0u) { - d = mixer_stage(d); + // calibration's primaries first, then the mixer (`MixerStage::apply`) + if (pu(F_MSTAGE_CAL) != 0u) { + d = mixer_stage(d, pu(F_MSTAGE_CAL_OFF)); + } + if (pu(F_MSTAGE_MIX) != 0u) { + d = mixer_stage(d, pu(F_MSTAGE_OFF)); + } } if (pu(F_STAGE) != 0u) { d = curve_stage(d); diff --git a/crates/gpu/tests/it/equivalence.rs b/crates/gpu/tests/it/equivalence.rs index 2e62ed9abf7..03e31477bb4 100644 --- a/crates/gpu/tests/it/equivalence.rs +++ b/crates/gpu/tests/it/equivalence.rs @@ -871,6 +871,10 @@ fn mixer_stage_matches() { s.calibration.blue_sat = 60.0; s.calibration.shadows_tint = 30.0; check("V9 mixer and calibration", &src, &raw, &s, &req); + let mut c = v9(); + c.calibration.green_hue = -30.0; + c.calibration.red_sat = 50.0; + check("V9 calibration alone", &src, &raw, &c, &req); s.curve.master = vec![Point { x: 0.0, y: 0.05 }, Point { x: 0.5, y: 0.6 }, Point { x: 1.0, y: 0.95 }]; s.color.saturation = 20.0; check("V9 colour stage, curves, Saturation", &src, &raw, &s, &req); diff --git a/crates/pipeline/src/finish.rs b/crates/pipeline/src/finish.rs index ad1b4c2c66a..44984e10102 100644 --- a/crates/pipeline/src/finish.rs +++ b/crates/pipeline/src/finish.rs @@ -340,7 +340,8 @@ impl FinishParams { let peak = s.hdr.peak(); FinishParams { peak, - calib: if calibration { crate::colorops::calibration_matrix(&s.calibration) } else { None }, + // from V9 the primaries are measured in the mixer stage (`crate::mixer_stage`); the shadows tint stays + calib: if calibration && s.process.process() < Process::V9 { crate::colorops::calibration_matrix(&s.calibration) } else { None }, shadow_tint: if calibration { (s.calibration.shadows_tint / 100.0) as f32 } else { 0.0 }, tone: base_tone(s, info, peak), rgb_tone: crate::default_tone::for_source(s, info).is_some(), diff --git a/crates/pipeline/src/mixer_stage.bin b/crates/pipeline/src/mixer_stage.bin index 1a82ee5333d23757494afeaf2a10812c55bb4afb..10b3514b8611e2b17c7cceaef373a8f27ecec431 100644 GIT binary patch delta 99310 zcmZ6z1yok;w*F0bcXu~PJ;Z~QG=hR+2P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u)0rCh16Wlz%f6MBHL?ns!4M{1v*?LwRgr$kZ#vAJrprDAn_qn;<8x_ET!ir;143{+3J zPef9s3E_~8Ii*y+?OLu2kOJ$(UqFzsI!NcB3OZ0hERBR;5FoZ=4}Qr>tPe1mL!+by zhD=m1iQ$9$lVE}$N#n(*zJLj8vD2u_7EUGIHwuy0yQyp^0I}Fv)x;QqP|8QwPC>O? zxu6OYELgg1`O3dGY~6qI!gXRn$=_JmH#4fBtQ1BM>oX6rw8pX}0$(n*?NZbOE2x0B zi|X_C<-_Yow`@Fo_iMrK+uPXfExhukl1rO;7-RRm?Gu$qkRErn`j+zFG5CWA&df|L zu>xZ;{qPD1iEPd6XE@o{%JjkQ+r%>s>JmeX-LZYUSgh-VeO>HIgI;PYVvVX<)-NJ?vwh9yQ)q)AWmKCw>dj43NXxNsUx2>DCbkY3(EL^qY2#=VO`s)4XoPy&2 E2NkfjXaE2J delta 38 tcmZ3}A@`, + /// Calibration's red, green and blue primaries, applied first (`None`: all at 0). + pub calibration: Option>, + /// The mixer, applied to calibration's result (`None`: neutral). + pub table: Option>, } /// The little-endian `f32` at byte `off` of the table, if it is inside. @@ -142,26 +149,37 @@ fn level(keys: &[f32; 3], x: f32) -> (usize, usize, f32) { } impl MixerStage { - /// The stage for `s`: `None` before V9, or when the mixer is neutral. + /// The stage for `s`: `None` before V9, or when the mixer and calibration's primaries are neutral. pub fn new(s: &DevelopSettings) -> Option { if s.process.process() < Process::V9 { return None; } let (chroma, light) = levels()?; let sliders: Vec<(usize, f32)> = s.mixer.bands().iter().flat_map(|b| [b.hue, b.sat, b.lum]).enumerate().map(|(i, v)| (i, v as f32)).collect(); - combine(&sliders).map(|table| MixerStage { chroma, light, table }) + let primaries: Vec<(usize, f32)> = if s.section_enabled("calibration") { + s.calibration.primaries().iter().flat_map(|(h, sat)| [*h, *sat]).enumerate().map(|(i, v)| (CALIBRATION + i, v as f32)).collect() + } else { + Vec::new() + }; + let (calibration, table) = (combine(&primaries), combine(&sliders)); + (calibration.is_some() || table.is_some()).then_some(MixerStage { chroma, light, calibration, table }) } /// The (hue shift, chroma factor, lightness change) for OkLCh `l`, `c`, `h`: linear in hue, bilinear in the chroma /// and lightness levels, clamped to the measured ones. Below the lowest measured chroma the lightness change fades /// out towards neutral. pub fn look(&self, l: f32, c: f32, h: f32) -> [f32; 3] { + self.table.as_deref().map_or([0.0, 1.0, 0.0], |t| self.look_in(t, l, c, h)) + } + + /// [`MixerStage::look`] in the combined table `table`. + fn look_in(&self, table: &[f32; TABLE_LEN], l: f32, c: f32, h: f32) -> [f32; 3] { let hd = h.to_degrees().rem_euclid(360.0) / 5.0; let i0 = (hd as usize) % HUES; let i1 = (i0 + 1) % HUES; let fh = hd - hd.floor(); let (l0, l1, fl) = level(&self.light, l); - let at = |row: usize, out: usize, bin: usize| self.table.get((row * OUTPUTS + out) * HUES + bin).copied().unwrap_or(0.0); + let at = |row: usize, out: usize, bin: usize| table.get((row * OUTPUTS + out) * HUES + bin).copied().unwrap_or(0.0); // per lightness level: bilinear in its own chroma keys, the lightness change faded out below the lowest let per_level = |m: usize| { let keys = self.chroma.get(m).copied().unwrap_or([1.0; 3]); @@ -180,11 +198,15 @@ impl MixerStage { std::array::from_fn(|k| a[k] * (1.0 - fl) + b[k] * fl) } - /// The colour mixer on linear Rec.2020 (through OkLCh). + /// Calibration's primaries, then the colour mixer, on linear Rec.2020 (through OkLCh). pub fn apply(&self, d: [f32; 3]) -> [f32; 3] { - let [l, c, h] = lab_to_lch(oklab_from_2020(d)); - let [dh, k, dl] = self.look(l, c, h); - oklab_to_2020(lch_to_lab([(l + dl).max(0.0), c * k, h + dh])) + let mut lch = lab_to_lch(oklab_from_2020(d)); + for t in [self.calibration.as_deref(), self.table.as_deref()].into_iter().flatten() { + let [l, c, h] = lch; + let [dh, k, dl] = self.look_in(t, l, c, h); + lch = [(l + dl).max(0.0), c * k, h + dh]; + } + oklab_to_2020(lch_to_lab(lch)) } } @@ -234,14 +256,41 @@ mod tests { } #[test] - fn only_v8_with_a_mixer_gets_the_stage() { + fn only_v9_with_a_mixer_or_calibration_gets_the_stage() { assert!(MixerStage::new(&v9()).is_none()); let mut s = v9(); + s.calibration.shadows_tint = 30.0; + assert!(MixerStage::new(&s).is_none(), "the shadows tint keeps the earlier operator"); s.calibration.blue_hue = -20.0; - assert!(MixerStage::new(&s).is_none(), "Calibration keeps the earlier operator"); + let cal = MixerStage::new(&s).expect("calibration's primaries are measured"); + assert!(cal.calibration.is_some() && cal.table.is_none()); s.mixer.orange.sat = 30.0; - assert!(MixerStage::new(&s).is_some()); - s.process = Process::V7.version(); + let both = MixerStage::new(&s).expect("stage"); + assert!(both.calibration.is_some() && both.table.is_some()); + s.process = Process::V8.version(); + assert!(MixerStage::new(&s).is_none()); + } + + #[test] + fn calibration_moves_its_primary_and_leaves_grey() { + let one = |f: &dyn Fn(&mut DevelopSettings)| { + let mut s = v9(); + f(&mut s); + MixerStage::new(&s).expect("stage") + }; + // Blue Saturation +60 makes a saturated blue more colourful and leaves a grey grey + let blue = colour(0.5, 0.12, 265.0); + let more = one(&|s| s.calibration.blue_sat = 60.0); + assert!(lch_of(more.apply(blue))[1] > lch_of(blue)[1] * 1.05, "{:?}", lch_of(more.apply(blue))); + let grey = [0.2f32; 3]; + assert!(lch_of(more.apply(grey))[1] < 0.005); + // Red Hue +50 turns a red towards orange + let red = colour(0.55, 0.15, 25.0); + assert!(hue_shift(red, one(&|s| s.calibration.red_hue = 50.0).apply(red)) > 2.0); + // the section switch turns calibration off with it + let mut s = v9(); + s.calibration.blue_sat = 60.0; + s.disabled_sections.push("calibration".into()); assert!(MixerStage::new(&s).is_none()); } diff --git a/docs/gaps.md b/docs/gaps.md index 2517023d15b..cd8f8f80bb4 100644 --- a/docs/gaps.md +++ b/docs/gaps.md @@ -17,7 +17,7 @@ Hours are Opus 5.5 agent wall-clock hours (see [target-app-parity.md](target-app |---:|---|---|---|---:|---| | 1 B | **Camera colour is estimated, not measured** (LR-PROF-CAMERACOLOR). Raws start from a per-file fit to the camera JPEG, 10 bundled profiles, 52 spectral matrices (plus same-sensor bodies, e.g. the X-T30 through the X-T3) or chart-measured matrices (the EOS D60); others use a neutral matrix (a black-and-white camera JPEG gives its tone curve only, #577; dark JPEG tones also guide the toe, #1307) | Ξ”E vs camera JPEG 2.9–10 after fitting (raw-parity.md); 1 chart-calibrated model (EOS D60: its Kelvin scale and fallback colour, the look stays the JPEG fit) vs 1,500 Adobe Standard profiles | every raw shooter sees colour that is close but not Lightroom's; some get neutral-matrix colour | 50–90 | [raw-parity](raw-parity.md#colour) | | 2 B | **CR3 variants no public file uses** (LR-IMP-FORMATS): `crx.rs` refuses vertical-tile C-RAW, partial-subband and other plane coding, multi-tile 0x200 and adaptive low-frequency gains, and those files fall back to the preview. All 110 CC0 CR3s on raw.pixls.us (31 folders) decode from sensor data, so none of these variants has a public sample; 26 CR3 bodies are verified (M50 / R100 / R8 exact, R5 Mark II pinned, 22 more pinned on one CC0 file each and checked against the camera JPEG, [cr3.md](cr3.md#further-bodies-one-cc0-file-each)). HEIF stills are `.HIF` files, not CR3; no CR3 sRAW / mRAW sample exists | measured: Canon's share whose camera fully works 73% β†’ 94% (raw-parity.md); 18 of 22 popular Canon bodies write CR3, all 18 now verified | +0.3 points of photographers; the variants surface only as user files that open as a preview | 10–25 | [raw-parity](raw-parity.md#remaining-work-ranked-by-photographers-unlocked-per-hour) | -| 3 B | **Render fidelity partial** (LR-BEHAV-RENDER-FIDELITY): calibrated camera-look Contrast and Blacks; other operators need measurement; from process V5 raw tone curves roll off into white in stops, so Exposure keeps recorded highlights (#1632); from V9 Whites, the tone curves, the colour mixer and Colour Grading are measured against Camera Raw ([curve-stage.md](curve-stage.md), [mixer-stage.md](mixer-stage.md), [grading-stage.md](grading-stage.md)), and a raw whose camera profile has no tone curve gets Lightroom's measured default base curve ([default-tone.md](default-tone.md)); from V9 Highlights acts relative to the frame's tonal range, fitted on photos ([hs-range.md](hs-range.md)) | process V3 reduces held-out response error from 0.136 to 0.038 stops for Contrast and 0.424 to 0.077 for Blacks on one Sony camera; Whites stays V2 in V4 to V8 | imported Lightroom edits still differ, especially on uncalibrated operators and cameras | 30–60 | [calibrated Light operators](light-v3.md), [process versions](process-versions.md) | +| 3 B | **Render fidelity partial** (LR-BEHAV-RENDER-FIDELITY): calibrated camera-look Contrast and Blacks; other operators need measurement; from process V5 raw tone curves roll off into white in stops, so Exposure keeps recorded highlights (#1632); from V9 Whites, the tone curves, the colour mixer and Colour Grading are measured against Camera Raw ([curve-stage.md](curve-stage.md), [mixer-stage.md](mixer-stage.md), [grading-stage.md](grading-stage.md)), and a raw whose camera profile has no tone curve gets Lightroom's measured default base curve ([default-tone.md](default-tone.md)); from V9 Highlights acts relative to the frame's tonal range, fitted on photos ([hs-range.md](hs-range.md)), and Calibration's primaries are measured ([mixer-stage.md](mixer-stage.md)) | process V3 reduces held-out response error from 0.136 to 0.038 stops for Contrast and 0.424 to 0.077 for Blacks on one Sony camera; Whites stays V2 in V4 to V8 | imported Lightroom edits still differ, especially on uncalibrated operators and cameras | 30–60 | [calibrated Light operators](light-v3.md), [process versions](process-versions.md) | | 4 | ~~Original-pixel detail at 100%~~ (LR-VIEW-ZOOM): closed 2026-10-12, see Closed recently | checklist row βœ… | β€” | 0 | [ui-parity](ui-parity.md) | | 5 B | **AI masks: Subject, Sky, People, Background, Landscape** are heuristics; Object / Describe run SAM 3 but its download has no mirror configured | `crates/segment`; ai-masks.md; MASK rows 67% | masking is how most Lightroom users edit today | 40–70 + model decision | [target-app-parity](target-app-parity.md#ai) | | 6 | **Compressed ORF** (support withdrawn) | #3775 decoder removed pending provenance review; uncompressed support remains | compressed files use embedded JPEG previews when available, not sensor data | pending review | [orf-compression](orf-compression.md) | @@ -90,6 +90,7 @@ Beta-blocking gaps (B) total **~230–430 h**; with the stability and platform w | Date | Change | Summary | |---|---|---| +| 2026-11-11 | minor | Gap 3: from process V9 Calibration's primaries are measured against Camera Raw ([mixer-stage.md](mixer-stage.md)); gap not closed | | 2026-11-11 | minor | Gap 3: from process V9 Highlights acts relative to the frame's tonal range, fitted on photos ([hs-range.md](hs-range.md)); gap not closed | | 2026-11-11 | minor | Gap 3: from process V9 a raw whose camera profile has no tone curve gets Lightroom's measured default base curve ([default-tone.md](default-tone.md)); gap not closed | | 2026-11-11 | minor | Gap 3: from process V9 Colour Grading is measured against Camera Raw ([grading-stage.md](grading-stage.md)); gap not closed | diff --git a/docs/mixer-stage.md b/docs/mixer-stage.md index 14ace979aad..7e59402514b 100644 --- a/docs/mixer-stage.md +++ b/docs/mixer-stage.md @@ -2,8 +2,8 @@ > **Changes:** [revision history](#revision-history) -Process V9 renders the colour mixer (Hue, Saturation and Luminance of the eight bands) the way Lightroom does, from -measurements of Camera Raw's output. V1 to V8 are unchanged (`docs/process-versions.md`). The code is +Process V9 renders the colour mixer (Hue, Saturation and Luminance of the eight bands) and Calibration's red, green +and blue primaries (Hue and Saturation) the way Lightroom does, from measurements of Camera Raw's output. V1 to V8 are unchanged (`docs/process-versions.md`). The code is `crates/pipeline/src/mixer_stage.rs`, its measured table `crates/pipeline/src/mixer_stage.bin`, and the GPU kernel's `mixer_stage` in `crates/gpu/src/wgsl/finish.wgsl`. @@ -30,30 +30,34 @@ fine colour charts: After the tone map and V4's calibrated Contrast and Blacks, before the curve stage ([curve-stage.md](curve-stage.md)): 1. Convert linear Rec.2020 to OkLCh. -2. Look up the response of every mixer slider that is set in Camera Raw's measured table: for the pixel's hue (72 +2. Calibration's primaries first: the lookup below with Calibration's six sliders. The mixer then acts on the colour + Calibration made. +3. Look up the response of every mixer slider that is set in Camera Raw's measured table: for the pixel's hue (72 bins of 5Β°), chroma and lightness, the hue shift, the relative chroma change and the lightness change. The table holds each slider at Β±25, Β±50, Β±75 and Β±100. Amounts in between are interpolated linearly, towards 0 below 25. Hue is interpolated linearly. Chroma and lightness are interpolated bilinearly between the three measured levels of each, and clamped outside them. Below the lowest measured chroma the lightness change fades out, so greys stay grey. -3. All sliders act on the same input colour. Their hue and lightness changes add and their chroma changes multiply +4. All mixer sliders act on the same input colour. Their hue and lightness changes add and their chroma changes multiply (charts with several sliders at once: closer than adding). -4. Convert back to linear Rec.2020. +5. Convert back to linear Rec.2020. -V8's mixer in `ColorOps` is off under V9 (`ColorOps::mixer`), so the mixer applies once. With the mixer neutral the -stage does not run. Calibration, Saturation, Vibrance, Point Color and B&W keep their V8 operators, after the -curves as before. Colour Grading also runs after the curves, through its own measured V9 stage +V8's mixer in `ColorOps` is off under V9 (`ColorOps::mixer`), and so is V8's calibration matrix before the tone map +(`FinishParams::calib`), so each applies once. With the mixer and Calibration's primaries neutral the stage does not +run. Calibration's Shadows tint, Saturation, Vibrance, Point Color and B&W keep their V8 operators, after the curves +as before. Colour Grading also runs after the curves, through its own measured V9 stage ([grading-stage.md](grading-stage.md)). ## How it was measured `tools/lr_mixer_charts.py charts OUT_DIR` writes linear DNG charts of OkLCh patches (72 hues Γ— 3 chroma levels Γ— 3 lightness levels, patches outside sRGB left out), with the settings in the DNG's XMP. It writes one neutral chart and -each band's Hue, Saturation and Luminance at each measured amount (193 charts). The charts are original test data. +each band's Hue, Saturation and Luminance and Calibration's red, green and blue Hue and Saturation at each measured +amount (241 charts). The charts are original test data. Every chart was rendered through Camera Raw to a 16-bit Adobe RGB (1998) TIFF. Only that output is measured, and nothing of Adobe's is copied or shipped. `tools/lr_mixer_charts.py table RENDER_DIR OUT_BIN` reads each render's patches as OkLab, takes each setting's response against Camera Raw's own neutral chart, and writes -`mixer_stage.bin` (format in the tool's docstring: per row a scale and 72 signed bytes, 394 KB). It needs numpy and +`mixer_stage.bin` (format in the tool's docstring: per row a scale and 72 signed bytes, 493 KB). It needs numpy and tifffile (`tools/requirements-lr-tone-charts.txt`). Running the tool again reproduces the committed charts and the committed table byte for byte. @@ -67,17 +71,26 @@ The order comes from separate check charts rendered while investigating: a stron settings. Predicting them from the single-setting renders leaves 1.17 (OkLab Γ— 100) with the mixer before the curves and 1.66 with it after. Those check charts are not part of the tool. +**Calibration on photos.** On the 5 held-out Panasonic Lumix DC-S9 photos (same method as +[default-tone.md](default-tone.md)), with Lightroom's default curve and Highlights relative to the frame in place, the +measured primaries take the mean a/b error over all edit groups from 0.59 to 0.56 (OkLab Γ— 100) and tone from 2.44 to +2.42. The Cool preset (Calibration Red Saturation +53, Blue Saturation +33) goes from 1.58 to 0.50. + ## Limits - Camera Raw's process version 2012 controls (`crs:ProcessVersion` 11.0), one chart layout, sRGB-gamut patches. More saturated colours than the top measured chroma level take its response. -- Calibration is not measured in. Its measured response matched the charts better than V8's matrix, but made the - held-out photos worse (OkLab colour error 1.316 to 1.331), so V9 keeps V8's Calibration. +- Calibration is measured on the same generic charts, not on charts made with a camera's own colour data. In + Lightroom it moves the camera's primaries before the profile, so its response on a real camera can differ. + On the held-out photos it helps overall (below), but the Sunset preset gets worse in colour (0.48 to 0.72). + An earlier attempt, on the base render before Lightroom's default curve ([default-tone.md](default-tone.md)), + made the photos worse (1.316 to 1.331), so it was left out then. - Masks' Hue and Saturation keep the earlier operators. ## Revision history | Date | Change | Summary | |---|---|---| +| 2026-11-11 | minor | Calibration's primaries measured too, applied before the mixer | | 2026-11-11 | patch | Colour Grading under V9 has its own measured stage, not V8's operator | | 2026-11-10 | minor | Process V9: the colour mixer measured against Lightroom, before the tone curves | diff --git a/docs/parity-checklist.md b/docs/parity-checklist.md index 61bcab082d9..357e2b3ba29 100644 --- a/docs/parity-checklist.md +++ b/docs/parity-checklist.md @@ -223,7 +223,7 @@ differences and missing bindings are in [ui-parity.md](ui-parity.md#shortcuts). | LR-EDIT-GEOM-CONSTRAIN | Constrain crop | P1 | βœ… | `crates/ui-egui/src/panels/right.rs` (checkbox β†’ `cmd:develop.merge`), `crates/engine/src/lib.rs` (`fit_constrained_crop`) | Ticking it, or changing Geometry, Upright or lens corrections while it is ticked, shrinks the stored crop about its centre until no blank corner is left, so the Crop tool shows it (it used to apply at render time only, outside the Crop tool: issue #1927; tests in `crates/engine/src/tests/constrain_crop.rs`). A crop drawn by hand is kept as drawn; unticking keeps the tighter crop | | LR-EDIT-GEOM-GRID | Grid while transforming | P2 | βœ… | `crates/ui-egui/src/panels/detail.rs` | a fine grid over the photo while a geometry slider is dragged | | LR-EDIT-LENSBLUR | Lens blur | P2 | 🟑 | `ctl:lensBlur.amount`, `ctl:lensBlur.boost`, `ctl:lensBlur.transition`, `cmd:section.lensBlur`, `cmd:lensBlur.brushStroke`, `cmd:lensBlur.brushReset`, `cmd:lensBlur.findSubject`, `crates/pipeline/src/lens_blur.rs`, `crates/ui-egui/src/panels/edit.rs` (`lens_blur`) | Lens Blur section: Apply, Blur Amount, Boost (bokeh highlights), what stays in focus (the subject: person mattes, else the saliency heuristic; or any mask, e.g. an SAM 3 Object mask; Find Subject makes one, clicked where the camera focused when the file records it, else at the likeliest subject, only when asked) and Brush Refinement (Focus / Blur brushes with Amount, Size, Feather, Flow, Auto Mask, βŒ₯ erases, Reset). Transition: the blur grows with the distance from the focus (a stand-in for depth), not a cut-out edge. Without a focus mask, Shape picks the focus area: Auto (the subject estimate), Round, Horizontal or Vertical oval, centred in the crop, and Move & Resize drags it on the photo (centre pin, side and bottom handles; one undo step per drag) (beyond Lightroom). The focus controls are disabled while Apply is off. Disc (circle) bokeh without halos, CPU for both renderers, zoomed windows match the whole render. Missing: an AI depth map (so Focal Range, the focus picker and Visualize Depth), bokeh shapes, crs XMP mapping | -| LR-EDIT-CALIB | Calibration [Classic] | P1 | βœ… | `ctl:calibration.*` | shadows tint, red/green/blue primary hue and saturation; read/written in XMP | +| LR-EDIT-CALIB | Calibration [Classic] | P1 | βœ… | `ctl:calibration.*` | shadows tint, red/green/blue primary hue and saturation; read/written in XMP; from process V9 the primaries' Hue and Saturation follow Camera Raw's measured response ([mixer-stage.md](mixer-stage.md)) | | LR-EDIT-SECTION-TOGGLE | Section on/off | P1 | βœ… | `cmd:develop.sectionEnabled`, `crates/develop/src/lib.rs` (`effective`) | the eye on a section header hides its adjustments: Light (with the curve), Color (white balance, presence, mixers, grading, point colour), Effects, Detail, Optics, Geometry, Calibration; masks stay on (issue #316 fixed Light, Color and Detail, which had no effect) | | LR-EDIT-SECTION-SOLO | Solo Mode for Edit sections | P2 | βœ… | `cmd:view.soloSections`, `cmd:section.calibration`, `crates/ui-egui/src/state.rs` (`toggle_section`, `set_single_panel`, `solo_section`), `crates/ui-egui/src/panels/edit.rs` (`section`), `crates/ui-egui/src/tests/solo_sections.rs` | Lightroom Classic's panel Solo Mode: while it is on, opening one Edit section (a header click or ⌘1β€“βŒ˜5) closes the others. Window β–Έ Edit Sections β–Έ Solo Mode (checked while on) or a right-click on any section header (`sectionMenu:solo`) turns it on and off; turning it on keeps only the section opened last. βŒ₯-click on a header opens just that section once, without turning the mode on (agents: `section.` `{solo: true}`, refused for a section the Edit panel has not got; header clicks run `section.` too, Calibration included). `view.soloSections` `{on?}` (no params toggles) answers `{soloSections}`. Kept with the UI state (`singlePanel`) | | LR-EDIT-RESET | Reset all / section / slider | P0 | βœ… | `cmd:develop.reset`, `cmd:develop.resetSection`, `cmd:develop.resetControl`, `crates/ui-egui/src/widgets.rs` (double-click) | no "reset to open" | @@ -467,7 +467,7 @@ differences and missing bindings are in [ui-parity.md](ui-parity.md#shortcuts). | LR-BEHAV-OFFLINE | Offline editing | P1 | βœ… | | local-first: everything works offline | | LR-BEHAV-WEB-SAFETY | Library safety in the browser build | P1 | 🟑 | `cmd:file.backupLibrary`, `cmd:file.restoreLibrary`, `apps/lightcraft-web/src/safety.rs`, `apps/lightcraft-web/src/backup.rs`, `apps/lightcraft-web/src/files.rs` | web only (experimental): Back Up Library (zip of the catalog and every stored original) and a non-destructive Restore; failed saves show as unsaved and are retried; a photo that can't be stored isn't added; one tab per library (Web Locks); notices for storage that isn't persistent and for a library that can't open; `?reset` asks first; a panic shows a message. Missing: `?safe` start, deleting originals of removed photos, zip64 (backups > 4 GB) | | LR-BEHAV-GPU | GPU acceleration | P0 | βœ… | `crates/gpu/src/render.rs`, `cmd:app.gpu`, `docs/gpu-pipeline.md`, `crates/ui-egui/src/panels/notices.rs` | CPU fallback per render on device limits, out of memory, device errors / loss, incomplete or black results (`perf.gpuReason`, `perf.gpuFallback`; each render reports its own reason β€” `lightcraft_gpu::try_render`, `gpuFallback` per exported file β€” issue #675); short submissions for slow iGPUs; backend choice (DX12 only on Windows, `LIGHTCRAFT_GPU_BACKEND` / `WGPU_BACKEND`), device created after the window opens, crash sentinel (issue #136); a GPU lost while LightCraft runs (driver reset) stops it with that message and turns GPU rendering off for the next start, which says why (issue #1337; the window's renderer can't survive the lost device); quitting waits (up to 2 s) for renders in flight and starts no new GPU work, so none is inside the driver when the process exits (`crates/gpu/src/exit.rs`, issue #620; seen crashing only on Linux + NVIDIA, other drivers unverified); with GPU rendering on and no adapter found at all (e.g. no Vulkan loader on NixOS outside `nix develop`), the desktop app says once per session that it renders on the CPU and points to Help β–Έ System Info (`gpu_notice`; not when the GPU is turned off or only a software adapter exists); no tiling beyond the buffer limit (CPU) | -| LR-BEHAV-RENDER-FIDELITY | Rendering matches Lightroom | P1 | 🟑 | `crates/pipeline/src/lib.rs`, `crates/pipeline/src/tone.rs` | Process V4 calibrates global camera-look Contrast and Blacks against black-box Lightroom exports of Sony ILCE-7CR photos. Held-out response errors are 0.038 and 0.077 stops; V1/V2 keep their rendering. Up to V8 Whites retains V2. Exposure, Highlights/Shadows, other operators and broader camera coverage remain open (`docs/light-v3.md`). From process V9 Whites, the parametric curve and the point curves follow Camera Raw's measured response on synthetic grey steps, the master curve hue-preserving ([curve-stage.md](curve-stage.md)). From V9 the colour mixer follows Camera Raw's measured response on synthetic colour charts ([mixer-stage.md](mixer-stage.md)), and Colour Grading too ([grading-stage.md](grading-stage.md)); Calibration, Saturation and Vibrance are not measured in yet. From V9 Highlights acts relative to the frame's tonal range, fitted on Lightroom's renders of photos ([hs-range.md](hs-range.md)). From V9 a raw whose camera profile has no tone curve of its own (Adobe Standard) gets Lightroom's default base curve measured on a synthetic chart, hue preserving on linear ProPhoto channels, with a per-camera exposure offset measured for the Panasonic Lumix DC-S9 only ([default-tone.md](default-tone.md)). From process V5 a raw's tone curve rolls off into white in stops (past a camera curve's last fitted knot, or from half a stop below the generic curve's white point instead of clipping), so Exposure +1 and +2 keep the highlights the sensor recorded: on 12 CC0 corpus raws and 6 CC0 DNGs on the generic curve, unclipped pixels whose luminance renders at 254 or more fall from up to 22.5 % to 0 at +1 EV and from up to 35 % to at most 0.03 % at +2 EV, apart from one sky that is mostly at the clip (#1632). Not compared with Lightroom's output | +| LR-BEHAV-RENDER-FIDELITY | Rendering matches Lightroom | P1 | 🟑 | `crates/pipeline/src/lib.rs`, `crates/pipeline/src/tone.rs` | Process V4 calibrates global camera-look Contrast and Blacks against black-box Lightroom exports of Sony ILCE-7CR photos. Held-out response errors are 0.038 and 0.077 stops; V1/V2 keep their rendering. Up to V8 Whites retains V2. Exposure, Highlights/Shadows, other operators and broader camera coverage remain open (`docs/light-v3.md`). From process V9 Whites, the parametric curve and the point curves follow Camera Raw's measured response on synthetic grey steps, the master curve hue-preserving ([curve-stage.md](curve-stage.md)). From V9 the colour mixer follows Camera Raw's measured response on synthetic colour charts ([mixer-stage.md](mixer-stage.md)), and Colour Grading too ([grading-stage.md](grading-stage.md)); From V9 Calibration's primaries are measured too, before the mixer ([mixer-stage.md](mixer-stage.md)); Saturation and Vibrance are not measured in yet. From V9 Highlights acts relative to the frame's tonal range, fitted on Lightroom's renders of photos ([hs-range.md](hs-range.md)). From V9 a raw whose camera profile has no tone curve of its own (Adobe Standard) gets Lightroom's default base curve measured on a synthetic chart, hue preserving on linear ProPhoto channels, with a per-camera exposure offset measured for the Panasonic Lumix DC-S9 only ([default-tone.md](default-tone.md)). From process V5 a raw's tone curve rolls off into white in stops (past a camera curve's last fitted knot, or from half a stop below the generic curve's white point instead of clipping), so Exposure +1 and +2 keep the highlights the sensor recorded: on 12 CC0 corpus raws and 6 CC0 DNGs on the generic curve, unclipped pixels whose luminance renders at 254 or more fall from up to 22.5 % to 0 at +1 EV and from up to 35 % to at most 0.03 % at +2 EV, apart from one sky that is mostly at the clip (#1632). Not compared with Lightroom's output | | LR-BEHAV-DRAGDROP | Drag and drop | P1 | βœ… | `crates/ui-egui/src/lib.rs`, `crates/ui-egui/src/panels/grid.rs` (`drag_feedback`), `crates/ui-egui/src/panels/left.rs` (`drop_target`, `album_drag_over`, `top_level_drop_target`, `drag_auto_scroll`), `crates/ui-egui/src/destination.rs`, `crates/ui-egui/src/widgets.rs` (`context_menu`), `crates/ui-egui/src/widgets/text_field.rs`, `crates/ui-egui/src/tests/carried_right_click.rs`, `crates/ui-egui/src/tests/carried_text_field_menu.rs` | a right-click while photos are carried opens no context menu (every menu opened through `widgets::context_menu`: sidebar rows, grid cells, lists; a text field's own Cut / Copy / Paste menu too); files β†’ app (a drop-target card while they hover, then the import review); grid photos β†’ an album row (adds the selection, with a count badge while dragging); sidebar album / folder rows β†’ a folder (moves it; its name follows the pointer); a drag of albums or grid photos near the top or bottom edge of the sidebar scrolls it (faster nearer the edge, only while the pointer is over the sidebar); when another folder has the same name, the dragged label, the Move question and the toast name the folder it is in (`home (/a)`); an album drop's toast does the same for an album of that name in another album folder (two in the same place have nothing to tell them apart and keep the plain name); only the primary button drags photos and drops them: a right-button drag over a grid cell neither picks photos up nor changes the selection, and a right-button release while photos are dragged neither drops them nor ends the drag | | LR-BEHAV-TOAST | Toast notifications | P1 | βœ… | `crates/ui-egui/src/panels.rs` | | | LR-BEHAV-DIALOGS | Dialogs fit the window | P1 | βœ… | `crates/ui-egui/src/dialogs.rs` (`dialog_body`, `list_height`), `crates/ui-egui/src/tests/dialog_fit.rs`, `crates/ui-egui/src/tests/dialog_copy.rs`, `crates/ui-egui/src/tests/dialogs.rs` (`a_click_outside_closes_the_dialog_when_settings_allow_it`) | a dialog taller than the window (Export on a 1366Γ—768 screen, issue #781) never runs off it: its options scroll while the title bar and the Cancel / confirm row stay on screen (the confirm button names its action: Create, Rename, Create Stacks, Export 3 Photos…, with "OK" kept only for a one-field prompt opened with a command that has no verb, `crates/ui-egui/src/tests/dialog_copy.rs`); lists that scroll on their own (What's New, All Metadata, shortcuts, smart-album rules, credits) get shorter first; dialogs that fit look as before; Import keeps its own resizable, scrolling window; Settings β†’ Dialogs β†’ Close a dialog by clicking outside it (off by default, so a stray click never throws away a dialog's choices): a click pressed and released on the dimmed backdrop closes the dialog like Esc and doesn't reach the panels below, while a drag that ends outside (a slider pulled past the edge) or a click that closes a dropdown keeps it; the import review never closes this way (`clicked_backdrop`); a one-line prompt (Rename Folder, New Folder on Disk, the preset and version names, New Library when its name can't be used, Auto-Tag from Tracklog) the engine refuses stays open with its text and shows the reason in a toast, so the name can be corrected, where it used to close without a word; a New Folder on Disk that works says so (β€œCreated folder β€œSelects” in β€œ2026/Shoot””, naming the parent by its last two folders as dialogs do) | @@ -802,6 +802,7 @@ Latin stays upright. Advanced Japanese composition remains open. Regression cove | Date | Change | Summary | |---|---|---| +| 2026-11-11 | minor | LR-EDIT-CALIB, LR-BEHAV-RENDER-FIDELITY: process V9 measures Calibration's primaries against Camera Raw ([mixer-stage.md](mixer-stage.md)); statuses unchanged | | 2026-11-11 | minor | LR-EDIT-LIGHT-HIGHLIGHTS, LR-BEHAV-RENDER-FIDELITY, LRC-DEV-PROCESS: process V9 makes Highlights relative to the frame's tonal range ([hs-range.md](hs-range.md)); statuses unchanged | | 2026-11-11 | minor | LR-BEHAV-RENDER-FIDELITY, LRC-DEV-PROCESS: process V9 gives a raw whose camera profile has no tone curve Lightroom's default base curve, measured ([default-tone.md](default-tone.md)); status unchanged | | 2026-11-07 | correction | Compressed ORF sensor support withdrawn pending provenance review; embedded preview fallback remains. Coverage regenerated without the removed decoder: 557 verified, 665 unverified, 187 preview-only, 37 unsupported; 94% use-weighted coverage. | diff --git a/docs/process-versions.md b/docs/process-versions.md index 98d9cbddece..f57bfba017e 100644 --- a/docs/process-versions.md +++ b/docs/process-versions.md @@ -17,7 +17,7 @@ stronger Light sliders, issue #196) without changing a single photo someone has | **V6** | V5 plus: colour noise reduction filters the linear colour differences Rβˆ’Y and Bβˆ’Y with the joint method (issue #815, `docs/nr-color-joint.md`): edge-aware weights from a denoised guide shared by both differences, anisotropic diffusion over scales, a brake for isolated colour specks; Y is kept exactly. V1 to V5 keep the blurred chromaticity (`local::denoise`). CPU (`local::denoise`) and GPU (`render::denoise`) branch on `local::joint_colour_nr`. Renders with Color 0 are the same as V2's. | | **V7** | V6 plus: film grain from crystal layers ([grain.md](grain.md), `crates/pipeline/src/crystal.rs`), after AurΓ©lien Pierre's model: resolution independent (a preview is the export's grain box-downscaled), fading out at black and white, calibrated to Lightroom Classic's strength and width at mid grey. V1 to V6 keep their two-octave value noise exactly (`finish::ValueGrain`; on the GPU `F_GRAIN_MODEL` 0); `finish::GrainModel::new` picks the model per process. Renders without grain don't depend on this. | | **V8** | V7 plus: Highlights and Shadows take their edge-aware filter of log luminance without its fine detail (`local::detail_free`: each value clamped between its separable median at the V2 radius and the median of a 3Γ— wider neighbourhood) instead of V2's plain median (`local::base_keeps_gaps`), so the gaps in dark lettering on a bright panel are not lifted into bright blocks (issue #3460). CPU (`local::tone_base`) and GPU (`render::tone_base`) branch on it; the base plane is keyed by process. Renders without Highlights or Shadows (global or local) are the same as V7's. | -| **V9** (the latest) | V8 plus: Whites, the parametric curve and the point curves as Lightroom applies them ([curve-stage.md](curve-stage.md), `crates/pipeline/src/curve_stage.rs`), measured on Camera Raw renders of synthetic grey steps. Whites leaves the tone map and, with the parametric curve, comes from measured tables (Whites reaches into the midtones; the regions are broad and add); the master curve acts hue-preserving on sRGB-encoded linear ProPhoto RGB (largest and smallest channel through the curve, the middle one in proportion in linear light), then the red, green and blue curves per channel, between the calibrated Contrast and Blacks and the colour stage. V1 to V8 keep Whites in the tone map and their per-channel curves on the output. CPU (`finish::finish_with`) and GPU (`finish.wgsl::curve_stage`) share the tables. Renders with Whites, the parametric curve and the point curves neutral are V7's. The colour mixer follows Camera Raw's measured response on synthetic OkLCh charts ([mixer-stage.md](mixer-stage.md), `crates/pipeline/src/mixer_stage.rs`): per band and slider the hue shift, chroma change and lightness change by input hue, chroma and lightness, applied before the tone curves; V1 to V8 keep their mixer model after the curves (`ColorOps::mixer`). Colour Grading follows Camera Raw's measured response ([grading-stage.md](grading-stage.md), `crates/pipeline/src/grading_stage.rs`): per wheel a tint by hue and saturation, a lightness profile by Blending and Balance, a damping for colours already leaning the tint's way, and Luminance as a lightness change; V1 to V8 keep their grading (`ColorOps::grading`). A raw whose camera profile has no tone curve of its own (a DCP without `ProfileToneCurve`, such as Adobe Standard) gets Lightroom's default base curve, measured on a synthetic chart, applied hue preserving on linear ProPhoto channels and shifted by the camera's measured exposure offset ([default-tone.md](default-tone.md), `crates/pipeline/src/default_tone.rs`); V1 to V8 keep the photo's own tone (the file's curve or the one fitted to its camera JPEG), scaled by luminance. Highlights acts relative to the frame's tonal range (the base layer's 2nd to 99th percentile, from a 384 px render of the whole frame): stronger and reaching further down on a wide range ([hs-range.md](hs-range.md), `crates/pipeline/src/hs_range.rs`); Shadows keeps V8's rule. | +| **V9** (the latest) | V8 plus: Whites, the parametric curve and the point curves as Lightroom applies them ([curve-stage.md](curve-stage.md), `crates/pipeline/src/curve_stage.rs`), measured on Camera Raw renders of synthetic grey steps. Whites leaves the tone map and, with the parametric curve, comes from measured tables (Whites reaches into the midtones; the regions are broad and add); the master curve acts hue-preserving on sRGB-encoded linear ProPhoto RGB (largest and smallest channel through the curve, the middle one in proportion in linear light), then the red, green and blue curves per channel, between the calibrated Contrast and Blacks and the colour stage. V1 to V8 keep Whites in the tone map and their per-channel curves on the output. CPU (`finish::finish_with`) and GPU (`finish.wgsl::curve_stage`) share the tables. Renders with Whites, the parametric curve and the point curves neutral are V7's. The colour mixer follows Camera Raw's measured response on synthetic OkLCh charts ([mixer-stage.md](mixer-stage.md), `crates/pipeline/src/mixer_stage.rs`): per band and slider the hue shift, chroma change and lightness change by input hue, chroma and lightness, applied before the tone curves; V1 to V8 keep their mixer model after the curves (`ColorOps::mixer`). Colour Grading follows Camera Raw's measured response ([grading-stage.md](grading-stage.md), `crates/pipeline/src/grading_stage.rs`): per wheel a tint by hue and saturation, a lightness profile by Blending and Balance, a damping for colours already leaning the tint's way, and Luminance as a lightness change; V1 to V8 keep their grading (`ColorOps::grading`). A raw whose camera profile has no tone curve of its own (a DCP without `ProfileToneCurve`, such as Adobe Standard) gets Lightroom's default base curve, measured on a synthetic chart, applied hue preserving on linear ProPhoto channels and shifted by the camera's measured exposure offset ([default-tone.md](default-tone.md), `crates/pipeline/src/default_tone.rs`); V1 to V8 keep the photo's own tone (the file's curve or the one fitted to its camera JPEG), scaled by luminance. Highlights acts relative to the frame's tonal range (the base layer's 2nd to 99th percentile, from a 384 px render of the whole frame): stronger and reaching further down on a wide range ([hs-range.md](hs-range.md), `crates/pipeline/src/hs_range.rs`); Shadows keeps V8's rule. Calibration's red, green and blue Hue and Saturation follow Camera Raw's measured response, applied before the mixer in the mixer stage instead of V8's matrix before the tone map ([mixer-stage.md](mixer-stage.md)); its Shadows tint is V8's. | ## The rule @@ -131,6 +131,7 @@ extra field and retain their existing cached renders. No cache-version bump is n | 2026-11-10 | minor | V9: the colour mixer measured against Lightroom, before the tone curves ([mixer-stage.md](mixer-stage.md)); V1 to V8 keep theirs | | 2026-11-10 | minor | V9: Colour Grading measured against Lightroom ([grading-stage.md](grading-stage.md)); V1 to V8 keep theirs | | 2026-11-11 | minor | V9: Lightroom's default base curve for a raw whose camera profile has none ([default-tone.md](default-tone.md)); V1 to V8 keep the photo's own tone | +| 2026-11-11 | minor | V9: Calibration's primaries measured against Lightroom ([mixer-stage.md](mixer-stage.md)); V1 to V8 keep theirs | | 2026-11-11 | minor | V9: Highlights relative to the frame's tonal range ([hs-range.md](hs-range.md)); V1 to V8 keep theirs | | 2026-11-08 | minor | V8: the Highlights/Shadows base keeps the gaps in dark lettering (#3460) | | 2026-11-07 | minor | V7: film grain from crystal layers ([grain.md](grain.md)); V1 to V6 keep their value noise | diff --git a/docs/whats-new.md b/docs/whats-new.md index c213f0ce8c6..581b00fc964 100644 --- a/docs/whats-new.md +++ b/docs/whats-new.md @@ -2,6 +2,12 @@ ## Unreleased +### Calibration behaves as in Lightroom (process V9) +- The Red, Green and Blue primary Hue and Saturation sliders in Calibration now follow Lightroom's measured response + and act as strongly as Lightroom's, so presets that lean on Calibration (strong blue skies, warm skin) look as they + do in Lightroom. Shadows tint is unchanged. This is part of rendering process 9: photos you already edited keep + their look until you choose Photo β–Έ Update to Current Process. See [The colour mixer](mixer-stage.md). + ### Highlights behaves as in Lightroom (process V9) - Highlights now adapts to the photo, as Lightroom's does: on a photo with a wide range from its darkest to its brightest tones it recovers more and reaches further into the upper midtones, and on a flat photo it acts more diff --git a/tools/lr_mixer_charts.py b/tools/lr_mixer_charts.py index bc97347029f..befe5f7bf2a 100644 --- a/tools/lr_mixer_charts.py +++ b/tools/lr_mixer_charts.py @@ -3,8 +3,8 @@ python3 tools/lr_mixer_charts.py charts OUT_DIR Writes linear DNG charts (OkLCh patches: 72 hues x 3 chroma x 3 lightness levels) with the settings embedded - as XMP: one neutral chart and every mixer band's Hue, Saturation and Luminance at -100, -75, -50, -25, 25, - 50, 75 and 100. + as XMP: one neutral chart and every mixer band's Hue, Saturation and Luminance and Calibration's red, green + and blue Hue and Saturation at -100, -75, -50, -25, 25, 50, 75 and 100. (render every DNG through Camera Raw to a 16-bit Adobe RGB (1998) TIFF with the same file name) python3 tools/lr_mixer_charts.py table RENDER_DIR OUT_BIN Reads the renders and writes the response table of `lightcraft_pipeline::mixer_stage` (format below). @@ -63,9 +63,13 @@ def chart(): return img, patches +CALIBRATION = ("RedHue", "RedSaturation", "GreenHue", "GreenSaturation", "BlueHue", "BlueSaturation") + + def sliders(): - """(chart name stem, XMP key) per slider, in the table's order: mixer bands x (Hue, Sat, Lum).""" - return [(f"mix_{b}{p}", k + b) for b in BANDS for p, k in MIXER] + """(chart name stem, XMP key) per slider, in the table's order: mixer bands x (Hue, Sat, Lum), then the + calibration primaries x (Hue, Saturation).""" + return [(f"mix_{b}{p}", k + b) for b in BANDS for p, k in MIXER] + [(f"cal_{k}", k) for k in CALIBRATION] def variants(): From fc55dde2269e0f436caeb4a86df3e7e425cb32ec Mon Sep 17 00:00:00 2001 From: smi-leonivkovic Date: Wed, 11 Nov 2026 09:12:56 +0100 Subject: [PATCH 12/51] LR-BEHAV-RENDER-FIDELITY: review fixes: neutral-render claims, Whites row, curve graph limit, Python version (#523) --- docs/curve-stage.md | 6 ++++-- docs/parity-checklist.md | 4 ++-- docs/process-versions.md | 2 +- tools/requirements-lr-tone-charts.txt | 1 + 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/docs/curve-stage.md b/docs/curve-stage.md index b676cb2ef0e..a79fe23fdc8 100644 --- a/docs/curve-stage.md +++ b/docs/curve-stage.md @@ -39,8 +39,8 @@ After the tone map and V4's calibrated Contrast and Blacks, before the colour st 6. Values above SDR white (an HDR render) continue with slope 1. The tone map no longer applies Whites under V9 (`finish::base_tone`), and the V8 output-curve tables are not built -(`FinishParams::curves` is `None`). With Whites, the parametric curve and the point curves all neutral, the stage -does not run and the render is V8's. +(`FinishParams::curves` is `None`). With Whites, the parametric curve and the point curves all neutral, the curve +stage does not run. ## How it was measured @@ -60,6 +60,8 @@ predicted from the grey-step curves under the hue-preserving rule in step 3. The ## Limits - The tables are measured with Lightroom's default splits. Moved splits use the earlier analytic model. +- The Edit panel's curve graph still draws the analytic parametric curve and drags against it. Under V9 at the + default splits the photo renders the measured regions, so the graph's shape can differ from the render's. - The point curves' shape between the points is LightCraft's spline, not measured. What is measured for them is how they apply: hue preserving, then the red, green and blue curves per channel. - Local (mask) Whites keeps the earlier processes' operator. diff --git a/docs/parity-checklist.md b/docs/parity-checklist.md index 20f276eff2c..ff73818452b 100644 --- a/docs/parity-checklist.md +++ b/docs/parity-checklist.md @@ -185,7 +185,7 @@ differences and missing bindings are in [ui-parity.md](ui-parity.md#shortcuts). | LR-EDIT-LIGHT-SHADOWS | Shadows | P0 | βœ… | `ctl:light.shadows` | From process V2, the same base as Highlights: dark areas keep their local contrast when lifted (#632); from process V8, the gaps in dark lettering on a bright panel are not lifted into bright blocks. Alt/Option-drag shows shadow clipping (white, clipped channels in colour) | | LR-EDIT-LIGHT-WHITES | Whites | P0 | 🟑 | `ctl:light.whites`, `crates/pipeline/src/visualize.rs` | From process V9 Whites is measured against Camera Raw renders of synthetic grey steps and reaches into the midtones as Lightroom's does ([curve-stage.md](curve-stage.md)); not yet compared on photos per camera. V4 to V8 preserve V2 Whites for both signs; measured V2 check response error is 0.075 stops on the Sony test photos (`docs/light-v3.md`). Alt/Option-drag shows highlight clipping (black, clipped channels in colour) | | LR-EDIT-LIGHT-BLACKS | Blacks | P0 | 🟑 | `ctl:light.blacks`, `crates/pipeline/src/visualize.rs` | From process V4, global Blacks on the camera-look path uses a fitted per-channel/luminance mix. Check response error 0.424 to 0.077 stops on six held-out Sony photos; deepest tones still differ. Other sources and local adjustments retain V2 (`docs/light-v3.md`). Alt/Option-drag shows shadow clipping (white, clipped channels in colour) | -| LR-EDIT-LIGHT-CURVE-PARAM | Parametric curve | P0 | βœ… | `ctl:curve.highlights`, `ctl:curve.lights`, `ctl:curve.darks`, `ctl:curve.shadows`, `ctl:curve.split*`, `crates/pipeline/src/curve.rs` | from process V9 the regions are Camera Raw's measured response at the default splits, broad and additive ([curve-stage.md](curve-stage.md)); the graph draws the renderer's own curve model; dragging the line moves the region under the pointer (one undo step) | +| LR-EDIT-LIGHT-CURVE-PARAM | Parametric curve | P0 | βœ… | `ctl:curve.highlights`, `ctl:curve.lights`, `ctl:curve.darks`, `ctl:curve.shadows`, `ctl:curve.split*`, `crates/pipeline/src/curve.rs` | from process V9 the regions are Camera Raw's measured response at the default splits, broad and additive ([curve-stage.md](curve-stage.md)); the graph draws the analytic model of V1 to V8, which under V9 at the default splits can differ from the measured regions the photo renders (follow-up); dragging the line moves the region under the pointer (one undo step) | | LR-EDIT-LIGHT-CURVE-POINT | Point curve | P0 | βœ… | `cmd:develop.curve`, `cmd:curve.reset`, `cmd:curve.presets`, `cmd:curve.applyPreset`, `cmd:curve.savePreset`, `cmd:curve.deletePreset`, `cmd:curve.importPresets`, `cmd:curve.exportPresets`, `cmd:file.importCurvePresets`, `cmd:file.exportCurvePresets`, `crates/engine/src/cmd/curves.rs`, `crates/ui-egui/src/panels/edit.rs` | click to add a point; drag a point in both axes (between its neighbours, input / output readout, one undo step per drag; βŒ₯-drag moves it a tenth as far for fine adjustment, issue #1363); drag empty space to add and drag; double-click removes; reset: double-click a channel selector (that channel), the Reset button under the graph (every curve incl. parametric) or right-click the graph (channel / all); Point Curve preset dropdown: own Linear / Medium Contrast / Strong Contrast, user presets (save the current point curves, delete by right-click; saved with the library), import / export as `.lccurve` JSON; from process V9 the master curve keeps hue as Lightroom's does (largest and smallest channel through the curve, the middle one in proportion), and the red, green and blue curves follow it per channel ([curve-stage.md](curve-stage.md)) | | LR-EDIT-LIGHT-CURVE-RGB | Per-channel curves | P0 | βœ… | `cmd:develop.curve` (`channel`) | | | LR-EDIT-LIGHT-CURVE-REFINESAT | Curve saturation compensation | P1 | βœ… | `ctl:curve.refineSaturation` | | @@ -467,7 +467,7 @@ differences and missing bindings are in [ui-parity.md](ui-parity.md#shortcuts). | LR-BEHAV-OFFLINE | Offline editing | P1 | βœ… | | local-first: everything works offline | | LR-BEHAV-WEB-SAFETY | Library safety in the browser build | P1 | 🟑 | `cmd:file.backupLibrary`, `cmd:file.restoreLibrary`, `apps/lightcraft-web/src/safety.rs`, `apps/lightcraft-web/src/backup.rs`, `apps/lightcraft-web/src/files.rs` | web only (experimental): Back Up Library (zip of the catalog and every stored original) and a non-destructive Restore; failed saves show as unsaved and are retried; a photo that can't be stored isn't added; one tab per library (Web Locks); notices for storage that isn't persistent and for a library that can't open; `?reset` asks first; a panic shows a message. Missing: `?safe` start, deleting originals of removed photos, zip64 (backups > 4 GB) | | LR-BEHAV-GPU | GPU acceleration | P0 | βœ… | `crates/gpu/src/render.rs`, `cmd:app.gpu`, `docs/gpu-pipeline.md`, `crates/ui-egui/src/panels/notices.rs` | CPU fallback per render on device limits, out of memory, device errors / loss, incomplete or black results (`perf.gpuReason`, `perf.gpuFallback`; each render reports its own reason β€” `lightcraft_gpu::try_render`, `gpuFallback` per exported file β€” issue #675); short submissions for slow iGPUs; backend choice (DX12 only on Windows, `LIGHTCRAFT_GPU_BACKEND` / `WGPU_BACKEND`), device created after the window opens, crash sentinel (issue #136); a GPU lost while LightCraft runs (driver reset) stops it with that message and turns GPU rendering off for the next start, which says why (issue #1337; the window's renderer can't survive the lost device); quitting waits (up to 2 s) for renders in flight and starts no new GPU work, so none is inside the driver when the process exits (`crates/gpu/src/exit.rs`, issue #620; seen crashing only on Linux + NVIDIA, other drivers unverified); with GPU rendering on and no adapter found at all (e.g. no Vulkan loader on NixOS outside `nix develop`), the desktop app says once per session that it renders on the CPU and points to Help β–Έ System Info (`gpu_notice`; not when the GPU is turned off or only a software adapter exists); no tiling beyond the buffer limit (CPU) | -| LR-BEHAV-RENDER-FIDELITY | Rendering matches Lightroom | P1 | 🟑 | `crates/pipeline/src/lib.rs`, `crates/pipeline/src/tone.rs` | Process V4 calibrates global camera-look Contrast and Blacks against black-box Lightroom exports of Sony ILCE-7CR photos. Held-out response errors are 0.038 and 0.077 stops; V1/V2 keep their rendering. Whites retains V2 and awaits a follow-up. Exposure, Highlights/Shadows, other operators and broader camera coverage remain open (`docs/light-v3.md`). From process V9 Whites, the parametric curve and the point curves follow Camera Raw's measured response on synthetic grey steps, the master curve hue-preserving ([curve-stage.md](curve-stage.md)). From process V5 a raw's tone curve rolls off into white in stops (past a camera curve's last fitted knot, or from half a stop below the generic curve's white point instead of clipping), so Exposure +1 and +2 keep the highlights the sensor recorded: on 12 CC0 corpus raws and 6 CC0 DNGs on the generic curve, unclipped pixels whose luminance renders at 254 or more fall from up to 22.5 % to 0 at +1 EV and from up to 35 % to at most 0.03 % at +2 EV, apart from one sky that is mostly at the clip (#1632). Not compared with Lightroom's output | +| LR-BEHAV-RENDER-FIDELITY | Rendering matches Lightroom | P1 | 🟑 | `crates/pipeline/src/lib.rs`, `crates/pipeline/src/tone.rs` | Process V4 calibrates global camera-look Contrast and Blacks against black-box Lightroom exports of Sony ILCE-7CR photos. Held-out response errors are 0.038 and 0.077 stops; V1/V2 keep their rendering. Up to V8 Whites retains V2. Exposure, Highlights/Shadows, other operators and broader camera coverage remain open (`docs/light-v3.md`). From process V9 Whites, the parametric curve and the point curves follow Camera Raw's measured response on synthetic grey steps, the master curve hue-preserving ([curve-stage.md](curve-stage.md)). From process V5 a raw's tone curve rolls off into white in stops (past a camera curve's last fitted knot, or from half a stop below the generic curve's white point instead of clipping), so Exposure +1 and +2 keep the highlights the sensor recorded: on 12 CC0 corpus raws and 6 CC0 DNGs on the generic curve, unclipped pixels whose luminance renders at 254 or more fall from up to 22.5 % to 0 at +1 EV and from up to 35 % to at most 0.03 % at +2 EV, apart from one sky that is mostly at the clip (#1632). Not compared with Lightroom's output | | LR-BEHAV-DRAGDROP | Drag and drop | P1 | βœ… | `crates/ui-egui/src/lib.rs`, `crates/ui-egui/src/panels/grid.rs` (`drag_feedback`), `crates/ui-egui/src/panels/left.rs` (`drop_target`, `album_drag_over`, `top_level_drop_target`, `drag_auto_scroll`), `crates/ui-egui/src/destination.rs`, `crates/ui-egui/src/widgets.rs` (`context_menu`), `crates/ui-egui/src/widgets/text_field.rs`, `crates/ui-egui/src/tests/carried_right_click.rs`, `crates/ui-egui/src/tests/carried_text_field_menu.rs` | a right-click while photos are carried opens no context menu (every menu opened through `widgets::context_menu`: sidebar rows, grid cells, lists; a text field's own Cut / Copy / Paste menu too); files β†’ app (a drop-target card while they hover, then the import review); grid photos β†’ an album row (adds the selection, with a count badge while dragging); sidebar album / folder rows β†’ a folder (moves it; its name follows the pointer); a drag of albums or grid photos near the top or bottom edge of the sidebar scrolls it (faster nearer the edge, only while the pointer is over the sidebar); when another folder has the same name, the dragged label, the Move question and the toast name the folder it is in (`home (/a)`); an album drop's toast does the same for an album of that name in another album folder (two in the same place have nothing to tell them apart and keep the plain name); only the primary button drags photos and drops them: a right-button drag over a grid cell neither picks photos up nor changes the selection, and a right-button release while photos are dragged neither drops them nor ends the drag | | LR-BEHAV-TOAST | Toast notifications | P1 | βœ… | `crates/ui-egui/src/panels.rs` | | | LR-BEHAV-DIALOGS | Dialogs fit the window | P1 | βœ… | `crates/ui-egui/src/dialogs.rs` (`dialog_body`, `list_height`), `crates/ui-egui/src/tests/dialog_fit.rs`, `crates/ui-egui/src/tests/dialog_copy.rs`, `crates/ui-egui/src/tests/dialogs.rs` (`a_click_outside_closes_the_dialog_when_settings_allow_it`) | a dialog taller than the window (Export on a 1366Γ—768 screen, issue #781) never runs off it: its options scroll while the title bar and the Cancel / confirm row stay on screen (the confirm button names its action: Create, Rename, Create Stacks, Export 3 Photos…, with "OK" kept only for a one-field prompt opened with a command that has no verb, `crates/ui-egui/src/tests/dialog_copy.rs`); lists that scroll on their own (What's New, All Metadata, shortcuts, smart-album rules, credits) get shorter first; dialogs that fit look as before; Import keeps its own resizable, scrolling window; Settings β†’ Dialogs β†’ Close a dialog by clicking outside it (off by default, so a stray click never throws away a dialog's choices): a click pressed and released on the dimmed backdrop closes the dialog like Esc and doesn't reach the panels below, while a drag that ends outside (a slider pulled past the edge) or a click that closes a dropdown keeps it; the import review never closes this way (`clicked_backdrop`); a one-line prompt (Rename Folder, New Folder on Disk, the preset and version names, New Library when its name can't be used, Auto-Tag from Tracklog) the engine refuses stays open with its text and shows the reason in a toast, so the name can be corrected, where it used to close without a word; a New Folder on Disk that works says so (β€œCreated folder β€œSelects” in β€œ2026/Shoot””, naming the parent by its last two folders as dialogs do) | diff --git a/docs/process-versions.md b/docs/process-versions.md index efc87d030ce..64af9269227 100644 --- a/docs/process-versions.md +++ b/docs/process-versions.md @@ -17,7 +17,7 @@ stronger Light sliders, issue #196) without changing a single photo someone has | **V6** | V5 plus: colour noise reduction filters the linear colour differences Rβˆ’Y and Bβˆ’Y with the joint method (issue #815, `docs/nr-color-joint.md`): edge-aware weights from a denoised guide shared by both differences, anisotropic diffusion over scales, a brake for isolated colour specks; Y is kept exactly. V1 to V5 keep the blurred chromaticity (`local::denoise`). CPU (`local::denoise`) and GPU (`render::denoise`) branch on `local::joint_colour_nr`. Renders with Color 0 are the same as V2's. | | **V7** | V6 plus: film grain from crystal layers ([grain.md](grain.md), `crates/pipeline/src/crystal.rs`), after AurΓ©lien Pierre's model: resolution independent (a preview is the export's grain box-downscaled), fading out at black and white, calibrated to Lightroom Classic's strength and width at mid grey. V1 to V6 keep their two-octave value noise exactly (`finish::ValueGrain`; on the GPU `F_GRAIN_MODEL` 0); `finish::GrainModel::new` picks the model per process. Renders without grain don't depend on this. | | **V8** | V7 plus: Highlights and Shadows take their edge-aware filter of log luminance without its fine detail (`local::detail_free`: each value clamped between its separable median at the V2 radius and the median of a 3Γ— wider neighbourhood) instead of V2's plain median (`local::base_keeps_gaps`), so the gaps in dark lettering on a bright panel are not lifted into bright blocks (issue #3460). CPU (`local::tone_base`) and GPU (`render::tone_base`) branch on it; the base plane is keyed by process. Renders without Highlights or Shadows (global or local) are the same as V7's. | -| **V9** (the latest) | V8 plus: Whites, the parametric curve and the point curves as Lightroom applies them ([curve-stage.md](curve-stage.md), `crates/pipeline/src/curve_stage.rs`), measured on Camera Raw renders of synthetic grey steps. Whites leaves the tone map and, with the parametric curve, comes from measured tables (Whites reaches into the midtones; the regions are broad and add); the master curve acts hue-preserving on sRGB-encoded linear ProPhoto RGB (largest and smallest channel through the curve, the middle one in proportion in linear light), then the red, green and blue curves per channel, between the calibrated Contrast and Blacks and the colour stage. V1 to V8 keep Whites in the tone map and their per-channel curves on the output. CPU (`finish::finish_with`) and GPU (`finish.wgsl::curve_stage`) share the tables. Renders with Whites, the parametric curve and the point curves neutral are V8's. | +| **V9** (the latest) | V8 plus: Whites, the parametric curve and the point curves as Lightroom applies them ([curve-stage.md](curve-stage.md), `crates/pipeline/src/curve_stage.rs`), measured on Camera Raw renders of synthetic grey steps. Whites leaves the tone map and, with the parametric curve, comes from measured tables (Whites reaches into the midtones; the regions are broad and add); the master curve acts hue-preserving on sRGB-encoded linear ProPhoto RGB (largest and smallest channel through the curve, the middle one in proportion in linear light), then the red, green and blue curves per channel, between the calibrated Contrast and Blacks and the colour stage. V1 to V8 keep Whites in the tone map and their per-channel curves on the output. CPU (`finish::finish_with`) and GPU (`finish.wgsl::curve_stage`) share the tables. With Whites, the parametric curve and the point curves neutral the curve stage does not run. | ## The rule diff --git a/tools/requirements-lr-tone-charts.txt b/tools/requirements-lr-tone-charts.txt index c91f37d19e9..290206bba41 100644 --- a/tools/requirements-lr-tone-charts.txt +++ b/tools/requirements-lr-tone-charts.txt @@ -1,4 +1,5 @@ # Python packages for tools/lr_tone_charts.py (crates/pipeline/src/curve_stage_tables.rs, docs/curve-stage.md). +# Needs Python 3.12 or newer (numpy 2.5); use a matching interpreter, e.g. python3.12 -m venv. # python3 -m venv .venv-lr-tone && .venv-lr-tone/bin/pip install -r tools/requirements-lr-tone-charts.txt numpy==2.5.4 tifffile==2026.11.8 From c7c5ee2e53d30750ad3c1fd6f785a09207b27ae0 Mon Sep 17 00:00:00 2001 From: smi-leonivkovic Date: Wed, 11 Nov 2026 09:13:58 +0100 Subject: [PATCH 13/51] LR-EDIT-COLOR-MIXER-HSL: review fixes: each slider's amount bracket once, V8 boundary test (#523) --- crates/pipeline/src/colorops.rs | 4 ++++ crates/pipeline/src/mixer_stage.rs | 8 +++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/crates/pipeline/src/colorops.rs b/crates/pipeline/src/colorops.rs index 46136cbbbc2..3765bd20b83 100644 --- a/crates/pipeline/src/colorops.rs +++ b/crates/pipeline/src/colorops.rs @@ -386,6 +386,10 @@ mod tests { let mut s = DevelopSettings { process: lightcraft_develop::Process::V7.version(), ..DevelopSettings::default() }; s.mixer.blue.sat = -100.0; assert!(ColorOps::new(&s).mixer); + // V8 (the Highlights/Shadows base change) still applies the earlier mixer, and has no mixer stage + s.process = lightcraft_develop::Process::V8.version(); + assert!(ColorOps::new(&s).mixer); + assert!(crate::mixer_stage::MixerStage::new(&s).is_none()); s.process = lightcraft_develop::Process::V9.version(); assert!(!ColorOps::new(&s).mixer); } diff --git a/crates/pipeline/src/mixer_stage.rs b/crates/pipeline/src/mixer_stage.rs index 3cf3d649c52..bc6ed3b8326 100644 --- a/crates/pipeline/src/mixer_stage.rs +++ b/crates/pipeline/src/mixer_stage.rs @@ -100,7 +100,9 @@ fn bracket(v: f32) -> (Option, Option, f32) { /// The combined table of `(slider, amount)` pairs: hue and lightness changes add, chroma changes multiply. fn combine(sliders: &[(usize, f32)]) -> Option> { - let active: Vec<_> = sliders.iter().filter(|(_, v)| *v != 0.0 && v.is_finite()).collect(); + // each slider's two measured amounts and weight, found once + let active: Vec<(usize, (Option, Option, f32))> = + sliders.iter().filter(|(_, v)| *v != 0.0 && v.is_finite()).map(|(s, v)| (*s, bracket(*v))).collect(); if active.is_empty() { return None; } @@ -109,8 +111,8 @@ fn combine(sliders: &[(usize, f32)]) -> Option> { for out in 0..OUTPUTS { for bin in 0..HUES { let mut acc = if out == 1 { 1.0 } else { 0.0 }; - for (slider, v) in &active { - let (a0, a1, f) = bracket(*v); + for (slider, (a0, a1, f)) in &active { + let (a0, a1, f) = (*a0, *a1, *f); let at = |a: Option| a.map_or(0.0, |a| measured(*slider, a, row, out, bin)); let r = at(a0) * (1.0 - f) + at(a1) * f; match out { From c920ecd424698a3c125cb90a6f8582525e6242e7 Mon Sep 17 00:00:00 2001 From: smi-leonivkovic Date: Wed, 11 Nov 2026 09:17:04 +0100 Subject: [PATCH 14/51] LR-EDIT-LIGHT-HIGHLIGHTS: review fixes: one proxy size for every output, every base value, documented limits (#523) --- crates/pipeline/src/hs_range.rs | 18 +++++++++++++++--- crates/pipeline/src/lib.rs | 6 +++--- crates/pipeline/src/tests_window.rs | 10 ++++++++++ 3 files changed, 28 insertions(+), 6 deletions(-) diff --git a/crates/pipeline/src/hs_range.rs b/crates/pipeline/src/hs_range.rs index 338870d19c8..e64e99aeec5 100644 --- a/crates/pipeline/src/hs_range.rs +++ b/crates/pipeline/src/hs_range.rs @@ -13,6 +13,8 @@ pub struct FrameRange { pub hi: f32, } +/// Long edge (px) of the whole-frame render the range is measured on, for every output size. +pub const PROXY_EDGE: usize = 384; /// Percentiles of the base layer that span the frame's range. const P_LO: f32 = 0.02; const P_HI: f32 = 0.99; @@ -39,10 +41,10 @@ impl FrameRange { FrameRange { lo: self.lo + ev, hi: self.hi + ev } } - /// The range of base-layer values `base` (logβ‚‚ luminance before exposure `ev`), from every 7th value; - /// `None` without a finite value. + /// The range of base-layer values `base` (logβ‚‚ luminance before exposure `ev`), from every value (a proxy of + /// [`PROXY_EDGE`] px holds about 100 000); `None` without a finite value. pub fn of(base: &[f32], ev: f32) -> Option { - let mut sample: Vec = base.iter().step_by(7).copied().filter(|v| v.is_finite()).collect(); + let mut sample: Vec = base.iter().copied().filter(|v| v.is_finite()).collect(); if sample.is_empty() { return None; } @@ -98,6 +100,16 @@ mod tests { assert!(FrameRange::of(&[f32::NAN], 0.0).is_none()); } + #[test] + fn a_thin_bright_stripe_does_not_flip_the_range_as_it_moves() { + // a 350 px wide frame with a 3 px bright stripe (under 1 % of it), one column apart + let frame = |x0: usize| -> Vec { + (0..350 * 200).map(|i| if (x0..x0 + 3).contains(&(i % 350)) { 3.0 } else { (i % 350) as f32 / 350.0 * 4.0 - 4.0 }).collect() + }; + let (a, b) = (FrameRange::of(&frame(140), 0.0).unwrap(), FrameRange::of(&frame(141), 0.0).unwrap()); + assert!((a.hi - b.hi).abs() < 1e-3 && (a.lo - b.lo).abs() < 1e-3, "{a:?} {b:?}"); + } + #[test] fn a_wider_range_makes_highlights_stronger_and_reach_further_down() { let narrow = FrameRange { lo: -3.0, hi: 2.0 }; diff --git a/crates/pipeline/src/lib.rs b/crates/pipeline/src/lib.rs index 6ffc0be5be8..77021b5f68e 100644 --- a/crates/pipeline/src/lib.rs +++ b/crates/pipeline/src/lib.rs @@ -505,10 +505,10 @@ pub fn plan<'a>(src: &Rgb32f, info: &SourceInfo, s: &'a DevelopSettings, req: &R let detail_scale = local::detail_scale(px_per_long, native_long); let mut fixed_air = None; let mut keep = None; + // a proxy of one fixed size whatever the output's, so a thumbnail, a preview, a window and an export share the range let hs_range = hs_range::wanted(s).then(|| { - let k = (AIRLIGHT_PROXY_EDGE as f64 / full_w.max(full_h) as f64).min(1.0); - let (pw, ph) = (((full_w as f64 * k).round() as usize).max(1), ((full_h as f64 * k).round() as usize).max(1)); - local::frame_range(src, info, s, &frame, pw, ph) + let (pw, ph) = RenderRequest::fit(hs_range::PROXY_EDGE, hs_range::PROXY_EDGE).size(&frame); + local::frame_range(src, info, s, &frame, pw.max(1), ph.max(1)) }); let hs_range = hs_range.flatten(); let full = (frame.clone(), full_w, full_h); diff --git a/crates/pipeline/src/tests_window.rs b/crates/pipeline/src/tests_window.rs index 316c9cf1c15..00984e8531e 100644 --- a/crates/pipeline/src/tests_window.rs +++ b/crates/pipeline/src/tests_window.rs @@ -145,6 +145,16 @@ fn highlights_take_the_frames_range_not_the_windows() { } } +// Given process V9's Highlights, a thumbnail and a large render measure the same frame range +#[test] +fn highlights_range_is_the_same_for_small_and_large_renders() { + let mut s = DevelopSettings::default(); + controls::set(&mut s, "light.highlights", -60.0); + let range = |w: usize, h: usize| crate::plan(&scene(), &SourceInfo::default(), &s, &RenderRequest::fit(w, h)).hs_range.expect("range"); + let (small, large) = (range(160, 120), range(W, H)); + assert!((small.lo - large.lo).abs() < 1e-4 && (small.hi - large.hi).abs() < 1e-4, "{small:?} {large:?}"); +} + // Given a huge virtual frame (48000 px: an 800 % zoom), only the window is rendered #[test] fn a_window_of_a_huge_frame_is_cheap() { From 51544671dc8f1e901db129183772578a85fe7d50 Mon Sep 17 00:00:00 2001 From: smi-leonivkovic Date: Wed, 11 Nov 2026 10:06:36 +0100 Subject: [PATCH 15/51] LR-BEHAV-RENDER-FIDELITY: review fixes: measured curve tables only at default splits, python3.12 setup command (#523) --- docs/parity-checklist.md | 2 +- docs/process-versions.md | 2 +- tools/requirements-lr-tone-charts.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/parity-checklist.md b/docs/parity-checklist.md index ff73818452b..f80837830c1 100644 --- a/docs/parity-checklist.md +++ b/docs/parity-checklist.md @@ -467,7 +467,7 @@ differences and missing bindings are in [ui-parity.md](ui-parity.md#shortcuts). | LR-BEHAV-OFFLINE | Offline editing | P1 | βœ… | | local-first: everything works offline | | LR-BEHAV-WEB-SAFETY | Library safety in the browser build | P1 | 🟑 | `cmd:file.backupLibrary`, `cmd:file.restoreLibrary`, `apps/lightcraft-web/src/safety.rs`, `apps/lightcraft-web/src/backup.rs`, `apps/lightcraft-web/src/files.rs` | web only (experimental): Back Up Library (zip of the catalog and every stored original) and a non-destructive Restore; failed saves show as unsaved and are retried; a photo that can't be stored isn't added; one tab per library (Web Locks); notices for storage that isn't persistent and for a library that can't open; `?reset` asks first; a panic shows a message. Missing: `?safe` start, deleting originals of removed photos, zip64 (backups > 4 GB) | | LR-BEHAV-GPU | GPU acceleration | P0 | βœ… | `crates/gpu/src/render.rs`, `cmd:app.gpu`, `docs/gpu-pipeline.md`, `crates/ui-egui/src/panels/notices.rs` | CPU fallback per render on device limits, out of memory, device errors / loss, incomplete or black results (`perf.gpuReason`, `perf.gpuFallback`; each render reports its own reason β€” `lightcraft_gpu::try_render`, `gpuFallback` per exported file β€” issue #675); short submissions for slow iGPUs; backend choice (DX12 only on Windows, `LIGHTCRAFT_GPU_BACKEND` / `WGPU_BACKEND`), device created after the window opens, crash sentinel (issue #136); a GPU lost while LightCraft runs (driver reset) stops it with that message and turns GPU rendering off for the next start, which says why (issue #1337; the window's renderer can't survive the lost device); quitting waits (up to 2 s) for renders in flight and starts no new GPU work, so none is inside the driver when the process exits (`crates/gpu/src/exit.rs`, issue #620; seen crashing only on Linux + NVIDIA, other drivers unverified); with GPU rendering on and no adapter found at all (e.g. no Vulkan loader on NixOS outside `nix develop`), the desktop app says once per session that it renders on the CPU and points to Help β–Έ System Info (`gpu_notice`; not when the GPU is turned off or only a software adapter exists); no tiling beyond the buffer limit (CPU) | -| LR-BEHAV-RENDER-FIDELITY | Rendering matches Lightroom | P1 | 🟑 | `crates/pipeline/src/lib.rs`, `crates/pipeline/src/tone.rs` | Process V4 calibrates global camera-look Contrast and Blacks against black-box Lightroom exports of Sony ILCE-7CR photos. Held-out response errors are 0.038 and 0.077 stops; V1/V2 keep their rendering. Up to V8 Whites retains V2. Exposure, Highlights/Shadows, other operators and broader camera coverage remain open (`docs/light-v3.md`). From process V9 Whites, the parametric curve and the point curves follow Camera Raw's measured response on synthetic grey steps, the master curve hue-preserving ([curve-stage.md](curve-stage.md)). From process V5 a raw's tone curve rolls off into white in stops (past a camera curve's last fitted knot, or from half a stop below the generic curve's white point instead of clipping), so Exposure +1 and +2 keep the highlights the sensor recorded: on 12 CC0 corpus raws and 6 CC0 DNGs on the generic curve, unclipped pixels whose luminance renders at 254 or more fall from up to 22.5 % to 0 at +1 EV and from up to 35 % to at most 0.03 % at +2 EV, apart from one sky that is mostly at the clip (#1632). Not compared with Lightroom's output | +| LR-BEHAV-RENDER-FIDELITY | Rendering matches Lightroom | P1 | 🟑 | `crates/pipeline/src/lib.rs`, `crates/pipeline/src/tone.rs` | Process V4 calibrates global camera-look Contrast and Blacks against black-box Lightroom exports of Sony ILCE-7CR photos. Held-out response errors are 0.038 and 0.077 stops; V1/V2 keep their rendering. Up to V8 Whites retains V2. Exposure, Highlights/Shadows, other operators and broader camera coverage remain open (`docs/light-v3.md`). From process V9 Whites, the parametric curve (at the default splits; moved splits keep the analytic model) and the point curves follow Camera Raw's measured response on synthetic grey steps, the master curve hue-preserving ([curve-stage.md](curve-stage.md)). From process V5 a raw's tone curve rolls off into white in stops (past a camera curve's last fitted knot, or from half a stop below the generic curve's white point instead of clipping), so Exposure +1 and +2 keep the highlights the sensor recorded: on 12 CC0 corpus raws and 6 CC0 DNGs on the generic curve, unclipped pixels whose luminance renders at 254 or more fall from up to 22.5 % to 0 at +1 EV and from up to 35 % to at most 0.03 % at +2 EV, apart from one sky that is mostly at the clip (#1632). Not compared with Lightroom's output | | LR-BEHAV-DRAGDROP | Drag and drop | P1 | βœ… | `crates/ui-egui/src/lib.rs`, `crates/ui-egui/src/panels/grid.rs` (`drag_feedback`), `crates/ui-egui/src/panels/left.rs` (`drop_target`, `album_drag_over`, `top_level_drop_target`, `drag_auto_scroll`), `crates/ui-egui/src/destination.rs`, `crates/ui-egui/src/widgets.rs` (`context_menu`), `crates/ui-egui/src/widgets/text_field.rs`, `crates/ui-egui/src/tests/carried_right_click.rs`, `crates/ui-egui/src/tests/carried_text_field_menu.rs` | a right-click while photos are carried opens no context menu (every menu opened through `widgets::context_menu`: sidebar rows, grid cells, lists; a text field's own Cut / Copy / Paste menu too); files β†’ app (a drop-target card while they hover, then the import review); grid photos β†’ an album row (adds the selection, with a count badge while dragging); sidebar album / folder rows β†’ a folder (moves it; its name follows the pointer); a drag of albums or grid photos near the top or bottom edge of the sidebar scrolls it (faster nearer the edge, only while the pointer is over the sidebar); when another folder has the same name, the dragged label, the Move question and the toast name the folder it is in (`home (/a)`); an album drop's toast does the same for an album of that name in another album folder (two in the same place have nothing to tell them apart and keep the plain name); only the primary button drags photos and drops them: a right-button drag over a grid cell neither picks photos up nor changes the selection, and a right-button release while photos are dragged neither drops them nor ends the drag | | LR-BEHAV-TOAST | Toast notifications | P1 | βœ… | `crates/ui-egui/src/panels.rs` | | | LR-BEHAV-DIALOGS | Dialogs fit the window | P1 | βœ… | `crates/ui-egui/src/dialogs.rs` (`dialog_body`, `list_height`), `crates/ui-egui/src/tests/dialog_fit.rs`, `crates/ui-egui/src/tests/dialog_copy.rs`, `crates/ui-egui/src/tests/dialogs.rs` (`a_click_outside_closes_the_dialog_when_settings_allow_it`) | a dialog taller than the window (Export on a 1366Γ—768 screen, issue #781) never runs off it: its options scroll while the title bar and the Cancel / confirm row stay on screen (the confirm button names its action: Create, Rename, Create Stacks, Export 3 Photos…, with "OK" kept only for a one-field prompt opened with a command that has no verb, `crates/ui-egui/src/tests/dialog_copy.rs`); lists that scroll on their own (What's New, All Metadata, shortcuts, smart-album rules, credits) get shorter first; dialogs that fit look as before; Import keeps its own resizable, scrolling window; Settings β†’ Dialogs β†’ Close a dialog by clicking outside it (off by default, so a stray click never throws away a dialog's choices): a click pressed and released on the dimmed backdrop closes the dialog like Esc and doesn't reach the panels below, while a drag that ends outside (a slider pulled past the edge) or a click that closes a dropdown keeps it; the import review never closes this way (`clicked_backdrop`); a one-line prompt (Rename Folder, New Folder on Disk, the preset and version names, New Library when its name can't be used, Auto-Tag from Tracklog) the engine refuses stays open with its text and shows the reason in a toast, so the name can be corrected, where it used to close without a word; a New Folder on Disk that works says so (β€œCreated folder β€œSelects” in β€œ2026/Shoot””, naming the parent by its last two folders as dialogs do) | diff --git a/docs/process-versions.md b/docs/process-versions.md index 64af9269227..3993fd7be04 100644 --- a/docs/process-versions.md +++ b/docs/process-versions.md @@ -17,7 +17,7 @@ stronger Light sliders, issue #196) without changing a single photo someone has | **V6** | V5 plus: colour noise reduction filters the linear colour differences Rβˆ’Y and Bβˆ’Y with the joint method (issue #815, `docs/nr-color-joint.md`): edge-aware weights from a denoised guide shared by both differences, anisotropic diffusion over scales, a brake for isolated colour specks; Y is kept exactly. V1 to V5 keep the blurred chromaticity (`local::denoise`). CPU (`local::denoise`) and GPU (`render::denoise`) branch on `local::joint_colour_nr`. Renders with Color 0 are the same as V2's. | | **V7** | V6 plus: film grain from crystal layers ([grain.md](grain.md), `crates/pipeline/src/crystal.rs`), after AurΓ©lien Pierre's model: resolution independent (a preview is the export's grain box-downscaled), fading out at black and white, calibrated to Lightroom Classic's strength and width at mid grey. V1 to V6 keep their two-octave value noise exactly (`finish::ValueGrain`; on the GPU `F_GRAIN_MODEL` 0); `finish::GrainModel::new` picks the model per process. Renders without grain don't depend on this. | | **V8** | V7 plus: Highlights and Shadows take their edge-aware filter of log luminance without its fine detail (`local::detail_free`: each value clamped between its separable median at the V2 radius and the median of a 3Γ— wider neighbourhood) instead of V2's plain median (`local::base_keeps_gaps`), so the gaps in dark lettering on a bright panel are not lifted into bright blocks (issue #3460). CPU (`local::tone_base`) and GPU (`render::tone_base`) branch on it; the base plane is keyed by process. Renders without Highlights or Shadows (global or local) are the same as V7's. | -| **V9** (the latest) | V8 plus: Whites, the parametric curve and the point curves as Lightroom applies them ([curve-stage.md](curve-stage.md), `crates/pipeline/src/curve_stage.rs`), measured on Camera Raw renders of synthetic grey steps. Whites leaves the tone map and, with the parametric curve, comes from measured tables (Whites reaches into the midtones; the regions are broad and add); the master curve acts hue-preserving on sRGB-encoded linear ProPhoto RGB (largest and smallest channel through the curve, the middle one in proportion in linear light), then the red, green and blue curves per channel, between the calibrated Contrast and Blacks and the colour stage. V1 to V8 keep Whites in the tone map and their per-channel curves on the output. CPU (`finish::finish_with`) and GPU (`finish.wgsl::curve_stage`) share the tables. With Whites, the parametric curve and the point curves neutral the curve stage does not run. | +| **V9** (the latest) | V8 plus: Whites, the parametric curve and the point curves as Lightroom applies them ([curve-stage.md](curve-stage.md), `crates/pipeline/src/curve_stage.rs`), measured on Camera Raw renders of synthetic grey steps. Whites leaves the tone map and, with the parametric curve at Lightroom's default splits, comes from measured tables (Whites reaches into the midtones; the regions are broad and add; moved splits keep the analytic model of V1 to V8); the master curve acts hue-preserving on sRGB-encoded linear ProPhoto RGB (largest and smallest channel through the curve, the middle one in proportion in linear light), then the red, green and blue curves per channel, between the calibrated Contrast and Blacks and the colour stage. V1 to V8 keep Whites in the tone map and their per-channel curves on the output. CPU (`finish::finish_with`) and GPU (`finish.wgsl::curve_stage`) share the tables. With Whites, the parametric curve and the point curves neutral the curve stage does not run. | ## The rule diff --git a/tools/requirements-lr-tone-charts.txt b/tools/requirements-lr-tone-charts.txt index 290206bba41..3763d03c1d7 100644 --- a/tools/requirements-lr-tone-charts.txt +++ b/tools/requirements-lr-tone-charts.txt @@ -1,5 +1,5 @@ # Python packages for tools/lr_tone_charts.py (crates/pipeline/src/curve_stage_tables.rs, docs/curve-stage.md). # Needs Python 3.12 or newer (numpy 2.5); use a matching interpreter, e.g. python3.12 -m venv. -# python3 -m venv .venv-lr-tone && .venv-lr-tone/bin/pip install -r tools/requirements-lr-tone-charts.txt +# python3.12 -m venv .venv-lr-tone && .venv-lr-tone/bin/pip install -r tools/requirements-lr-tone-charts.txt numpy==2.5.4 tifffile==2026.11.8 From dfede7bed2bf5708258333be8e6189ed7060b8d6 Mon Sep 17 00:00:00 2001 From: smi-leonivkovic Date: Wed, 11 Nov 2026 10:08:30 +0100 Subject: [PATCH 16/51] LR-EDIT-COLOR-GRADING: review fix: damping linear between its angle bins, no step along a hue gradient (#523) --- crates/gpu/src/wgsl/finish.wgsl | 16 +++++++++----- crates/pipeline/src/grading_stage.rs | 33 ++++++++++++++++++++++++++-- docs/grading-stage.md | 2 +- 3 files changed, 43 insertions(+), 8 deletions(-) diff --git a/crates/gpu/src/wgsl/finish.wgsl b/crates/gpu/src/wgsl/finish.wgsl index d8bd4d99dde..0bc30a411ca 100644 --- a/crates/gpu/src/wgsl/finish.wgsl +++ b/crates/gpu/src/wgsl/finish.wgsl @@ -402,19 +402,25 @@ fn measured_grade(lab: vec3) -> vec3 { let ta = aux[w]; let tb = aux[w + 1u]; let diff = abs(wrap_angle(hue - atan2(tb, ta))); - let bin = min(u32(diff * 57.29577951308232 / 30.0), 5u); + // linear between the 30Β° bins' centres (15Β°, 45Β° … 165Β°) + let pos = clamp(diff * 57.29577951308232 / 30.0 - 0.5, 0.0, 5.0); + let j = min(u32(pos), 4u); + let fa = pos - f32(j); + let d0 = aux[w + 2u + j] * (1.0 - fa) + aux[w + 3u + j] * fa; + let d1 = aux[w + 8u + j] * (1.0 - fa) + aux[w + 9u + j] * fa; + let d2 = aux[w + 14u + j] * (1.0 - fa) + aux[w + 15u + j] * fa; // the damping's chroma levels (`grading_stage_tables::CHROMA`) var damp = 1.0; if (c <= 0.04) { - damp = 1.0 + (aux[w + 2u + bin] - 1.0) * c / 0.04; + damp = 1.0 + (d0 - 1.0) * c / 0.04; } else if (c <= 0.08) { let f = (c - 0.04) / 0.04; - damp = aux[w + 2u + bin] * (1.0 - f) + aux[w + 8u + bin] * f; + damp = d0 * (1.0 - f) + d1 * f; } else if (c <= 0.12) { let f = (c - 0.08) / 0.04; - damp = aux[w + 8u + bin] * (1.0 - f) + aux[w + 14u + bin] * f; + damp = d1 * (1.0 - f) + d2 * f; } else { - damp = aux[w + 14u + bin]; + damp = d2; } out.y += p * ta * damp; out.z += p * tb * damp; diff --git a/crates/pipeline/src/grading_stage.rs b/crates/pipeline/src/grading_stage.rs index 08ec2bd2643..39aaf0c1580 100644 --- a/crates/pipeline/src/grading_stage.rs +++ b/crates/pipeline/src/grading_stage.rs @@ -157,8 +157,14 @@ impl GradingStage { continue; } let diff = (hue - w.tint[1].atan2(w.tint[0]) + std::f32::consts::PI).rem_euclid(std::f32::consts::TAU) - std::f32::consts::PI; - let bin = ((diff.abs().to_degrees() / 30.0) as usize).min(5); - let level = |k: usize| w.damping.get(k).and_then(|r| r.get(bin)).copied().unwrap_or(1.0); + // each angle bin is the mean over 30Β°: linear between the bins' centres (15Β°, 45Β° … 165Β°), so the + // damping has no step along a hue gradient + let pos = (diff.abs().to_degrees() / 30.0 - 0.5).clamp(0.0, 5.0); + let j = (pos as usize).min(4); + let fa = pos - j as f32; + let level = |k: usize| { + w.damping.get(k).map_or(1.0, |r| r[j] * (1.0 - fa) + r[j + 1] * fa) + }; let damp = if c <= t::CHROMA[0] { 1.0 + (level(0) - 1.0) * c / t::CHROMA[0] } else { @@ -232,6 +238,29 @@ mod tests { assert!(gain < 0.95 && gain > 0.3, "{gain}"); } + #[test] + fn the_damping_has_no_step_along_a_hue_gradient() { + // shadows at chroma 0.12: the measured bins 0Β° to 30Β° and 30Β° to 60Β° are 0.62 and 0.78 + let st = stage(|g| { + g.shadows.hue = 30.0; + g.shadows.sat = 100.0; + }); + let grey = st.apply([0.3, 0.0, 0.0]); + let tint = grey[2].atan2(grey[1]); + let added = |deg: f32| { + let h = tint + deg.to_radians(); + let lab = [0.3, 0.12 * h.cos(), 0.12 * h.sin()]; + let out = st.apply(lab); + (out[1] - lab[1]).hypot(out[2] - lab[2]) + }; + let mut prev = added(0.0); + for i in 1..=360 { + let now = added(i as f32 * 0.5); + assert!((now - prev).abs() < 0.02 * prev, "{}Β°: {prev} β†’ {now}", i as f32 * 0.5); + prev = now; + } + } + #[test] fn saturation_and_hue_interpolate() { let size = |sat: f64, hue: f64| { diff --git a/docs/grading-stage.md b/docs/grading-stage.md index 84ab52e1852..a1963709143 100644 --- a/docs/grading-stage.md +++ b/docs/grading-stage.md @@ -32,7 +32,7 @@ At the end of the colour tools, where V8 grades (`ColorOps::grade`), in OkLab: - The share comes from the profile measured at the pixel's Blending, plus the change that Balance makes (not for the global wheel). - The damping depends on the pixel's chroma (levels 0.04, 0.08 and 0.12, from none at 0) and on the angle between - its hue and the tint's (bins of 30Β°). + its hue and the tint's (measured in bins of 30Β°, linear between their centres). 2. Each wheel's Luminance adds a lightness change by lightness, measured at Β±50 and Β±100, linear in between. 3. The wheels act on the same input colour and their changes add. From 96b417c8bb43e8611fca0aa7e3b66b0b917f3fbc Mon Sep 17 00:00:00 2001 From: smi-leonivkovic Date: Wed, 11 Nov 2026 10:09:30 +0100 Subject: [PATCH 17/51] LR-EDIT-LIGHT-HIGHLIGHTS: review fix: the range's two percentiles by selection, not a full sort (#523) --- crates/pipeline/src/hs_range.rs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/crates/pipeline/src/hs_range.rs b/crates/pipeline/src/hs_range.rs index e64e99aeec5..f3d61c67964 100644 --- a/crates/pipeline/src/hs_range.rs +++ b/crates/pipeline/src/hs_range.rs @@ -48,9 +48,14 @@ impl FrameRange { if sample.is_empty() { return None; } - sample.sort_by(f32::total_cmp); - let at = |q: f32| sample[((q * (sample.len() - 1) as f32) as usize).min(sample.len() - 1)] + ev; - Some(FrameRange { lo: at(P_LO), hi: at(P_HI) }) + // the two percentiles by selection: no sort of the whole proxy on every render + let last = sample.len() - 1; + let mut at = |q: f32| { + let i = ((q * last as f32) as usize).min(last); + *sample.select_nth_unstable_by(i, f32::total_cmp).1 + ev + }; + let lo = at(P_LO); + Some(FrameRange { lo, hi: at(P_HI) }) } /// The change in logβ‚‚ luminance that Highlights (βˆ’1..1) makes at base-layer value `base`. From 30c8319e2f5137e111600b4853d7019ccab4dd84 Mon Sep 17 00:00:00 2001 From: smi-leonivkovic Date: Wed, 11 Nov 2026 10:10:44 +0100 Subject: [PATCH 18/51] LR-EDIT-COLOR-GRADING: rustfmt (#523) --- crates/pipeline/src/grading_stage.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/crates/pipeline/src/grading_stage.rs b/crates/pipeline/src/grading_stage.rs index 39aaf0c1580..7239df687f7 100644 --- a/crates/pipeline/src/grading_stage.rs +++ b/crates/pipeline/src/grading_stage.rs @@ -162,9 +162,7 @@ impl GradingStage { let pos = (diff.abs().to_degrees() / 30.0 - 0.5).clamp(0.0, 5.0); let j = (pos as usize).min(4); let fa = pos - j as f32; - let level = |k: usize| { - w.damping.get(k).map_or(1.0, |r| r[j] * (1.0 - fa) + r[j + 1] * fa) - }; + let level = |k: usize| w.damping.get(k).map_or(1.0, |r| r[j] * (1.0 - fa) + r[j + 1] * fa); let damp = if c <= t::CHROMA[0] { 1.0 + (level(0) - 1.0) * c / t::CHROMA[0] } else { From 7d20abdaaf11f5cb7baac54ed42164d5036f0134 Mon Sep 17 00:00:00 2001 From: smi-leonivkovic Date: Wed, 11 Nov 2026 11:11:40 +0100 Subject: [PATCH 19/51] LR-BEHAV-RENDER-FIDELITY: review fix: Calibration runs before the tone map, not after the curves (#523) --- docs/mixer-stage.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/mixer-stage.md b/docs/mixer-stage.md index 55de3526a6d..4e3a2187651 100644 --- a/docs/mixer-stage.md +++ b/docs/mixer-stage.md @@ -41,8 +41,9 @@ After the tone map and V4's calibrated Contrast and Blacks, before the curve sta 4. Convert back to linear Rec.2020. V8's mixer in `ColorOps` is off under V9 (`ColorOps::mixer`), so the mixer applies once. With the mixer neutral the -stage does not run. Calibration, Saturation, Vibrance, Point Color, B&W and Colour Grading keep their V8 operators, -now after the curve stage (V1 to V8 run them before the output curves). +stage does not run. Saturation, Vibrance, Point Color, B&W and Colour Grading keep their V8 operators, +now after the curve stage (V1 to V8 run them before the output curves). Calibration stays scene linear, before the +tone map. ## How it was measured From b1f6a6677c9fc935ecaee913fa371f59c87beb72 Mon Sep 17 00:00:00 2001 From: smi-leonivkovic Date: Wed, 11 Nov 2026 15:33:01 +0100 Subject: [PATCH 20/51] LR-EDIT-LIGHT-CURVE-PARAM: the parametric graph draws and drags the curve the photo renders, measured under process V9 (#523) --- crates/pipeline/src/curve.rs | 5 +- crates/pipeline/src/curve_stage.rs | 150 ++++++++++++++++++++++-- crates/pipeline/src/lib.rs | 1 + crates/ui-egui/src/panels/edit.rs | 2 +- crates/ui-egui/src/panels/edit/curve.rs | 20 ++-- crates/ui-egui/src/tests/curve.rs | 43 ++++--- docs/curve-stage.md | 11 +- docs/parity-checklist.md | 3 +- 8 files changed, 192 insertions(+), 43 deletions(-) diff --git a/crates/pipeline/src/curve.rs b/crates/pipeline/src/curve.rs index b2c2b0b1410..f9449a6d454 100644 --- a/crates/pipeline/src/curve.rs +++ b/crates/pipeline/src/curve.rs @@ -16,8 +16,9 @@ pub const PARAM_LUT: usize = 1024; /// The parametric (region) curve of a [`ToneCurve`]: the four region amounts, each a cosine bump /// over its window between two splits, summed and then forced monotone. /// -/// This is the renderer's curve, not an approximation of it β€” both `curve_luts` in the pipeline -/// and the curve editor in the UI use this struct so they can never disagree. +/// This is the renderer's curve, not an approximation of it: processes V1 to V8 render it, and V9 +/// renders it when the splits are moved. The curve editor draws it through +/// [`crate::curve_stage::ParametricGraph`], which picks the measured regions where V9 renders those. #[derive(Clone, Debug)] pub struct ParametricCurve { /// The curve, sampled and already forced monotone. diff --git a/crates/pipeline/src/curve_stage.rs b/crates/pipeline/src/curve_stage.rs index 954e0900aad..a427054c66b 100644 --- a/crates/pipeline/src/curve_stage.rs +++ b/crates/pipeline/src/curve_stage.rs @@ -19,6 +19,7 @@ use lightcraft_color::transfer::{linear_to_srgb, srgb_to_linear}; use lightcraft_develop::{DevelopSettings, Process, ToneCurve}; use lightcraft_geom::Point; +use crate::curve::ParametricCurve; use crate::curve_stage_tables as t; use crate::light_v3::PRO_Y; @@ -74,19 +75,106 @@ fn measured_delta(amounts: &[f32; K], tables: &[[f32; 257]; K], 0.0 } +/// Whether `c` holds Lightroom's default splits, the ones the region tables are measured with. +fn default_splits(c: &ToneCurve) -> bool { + [c.split_shadows, c.split_mid, c.split_highlights].iter().zip(DEFAULT_SPLITS).all(|(s, d)| (s - d).abs() <= 1e-6) +} + +/// The measured regions at `x`, before the curve is kept monotone: the four deltas added to the diagonal. +fn regions_at(amounts: [f32; 4], x: f32) -> f32 { + let d: f32 = amounts.iter().zip(t::REGIONS.iter()).map(|(a, r)| measured_delta(&t::REGION_AMOUNTS, r, *a, x)).sum(); + (x + d).clamp(0.0, 1.0) +} + +/// The measured parametric curve at the default splits. +fn measured_parametric(amounts: [f32; 4]) -> Lut1 { + let mut lut = Lut1::from_fn(N, |x| regions_at(amounts, x)); + monotone(&mut lut); + lut +} + /// The parametric curve: the measured regions at the default splits, else the analytic model of earlier processes. fn parametric(c: &ToneCurve) -> Lut1 { - let splits = [c.split_shadows, c.split_mid, c.split_highlights]; - if splits.iter().zip(DEFAULT_SPLITS).any(|(s, d)| (s - d).abs() > 1e-6) { - return crate::curve::ParametricCurve::new(c).to_lut(); + if !default_splits(c) { + return ParametricCurve::new(c).to_lut(); + } + measured_parametric([c.shadows, c.darks, c.lights, c.highlights].map(|v| v as f32)) +} + +/// The parametric curve as `s`'s process renders it, for the Edit panel's graph and its drag: the measured regions +/// under V9 at the default splits, else the analytic [`ParametricCurve`] (earlier processes, and V9 with moved +/// splits). Whites is left out, as Lightroom's graph leaves it out. +#[derive(Clone, Debug)] +pub struct ParametricGraph { + model: ParametricCurve, + /// The measured curve, when it is the one rendered. + measured: Option, +} + +impl ParametricGraph { + pub fn new(s: &DevelopSettings) -> ParametricGraph { + let model = ParametricCurve::new(&s.curve); + let measured = (s.process.process() >= Process::V9 && default_splits(&s.curve)).then(|| measured_parametric(model.amounts.map(|a| a as f32))); + ParametricGraph { model, measured } + } + + /// Whether the graph is the measured curve (else the analytic one). + pub fn is_measured(&self) -> bool { + self.measured.is_some() + } + + /// The curve at `x` (0 = black, 1 = white). + pub fn at(&self, x: f64) -> f64 { + match &self.measured { + Some(lut) => lut.eval(if x.is_nan() { 0.0 } else { x as f32 }) as f64, + None => self.model.at(x), + } + } + + /// The region that owns graph position `x` (the splits tile the graph: [`ParametricCurve::region_at`]). + pub fn region_at(&self, x: f64) -> usize { + self.model.region_at(x) + } + + /// Region `region`'s slider amount. + pub fn amount(&self, region: usize) -> f64 { + self.model.amounts.get(region).copied().unwrap_or(0.0) + } + + /// The amount for region `region` after a drag that grabbed the curve at `x`, with the region at `from`, and moved + /// it `delta` in output level (a fraction of the graph's height; up is positive). The other regions stay as they + /// are. A level the region cannot reach saturates at Β±100; no motion keeps `from`. + pub fn dragged_amount(&self, region: usize, x: f64, from: f64, delta: f64) -> f64 { + if delta == 0.0 || !delta.is_finite() { + return from; + } + if self.measured.is_none() { + let per_unit = self.model.level_per_unit(region, x); + return if per_unit.abs() > f64::EPSILON { (from + delta / per_unit).clamp(-100.0, 100.0).round() } else { from }; + } + // the measured regions are tables, not linear in the amount: search the amount whose level is the target, + // on the side of `from` the drag goes to (so a flat stretch never makes the slider jump back) + let x = x.clamp(0.0, 1.0) as f32; + let level = |a: f64| { + let mut amounts = self.model.amounts.map(|v| v as f32); + if let Some(v) = amounts.get_mut(region) { + *v = a as f32; + } + regions_at(amounts, x) as f64 + }; + let target = level(from) + delta; + let (mut lo, mut hi) = if delta > 0.0 { (from, 100.0) } else { (-100.0, from) }; + for _ in 0..40 { + let mid = (lo + hi) / 2.0; + if level(mid) < target { + lo = mid; + } else { + hi = mid; + } + } + let a = if delta > 0.0 { hi } else { lo }; + a.clamp(-100.0, 100.0).round() } - let amounts = [c.shadows, c.darks, c.lights, c.highlights].map(|v| v as f32); - let mut lut = Lut1::from_fn(N, |x| { - let d: f32 = amounts.iter().zip(t::REGIONS.iter()).map(|(a, r)| measured_delta(&t::REGION_AMOUNTS, r, *a, x)).sum(); - (x + d).clamp(0.0, 1.0) - }); - monotone(&mut lut); - lut } /// The measured Whites curve at `amount`, or `None` at 0. @@ -262,6 +350,48 @@ mod tests { assert_eq!(stage.base.v, crate::curve::ParametricCurve::new(&s.curve).to_lut().v); } + #[test] + fn the_graph_is_the_curve_the_stage_renders() { + let mut s = v9(); + (s.curve.shadows, s.curve.darks, s.curve.lights, s.curve.highlights) = (40.0, -30.0, 25.0, -60.0); + let graph = ParametricGraph::new(&s); + assert!(graph.is_measured()); + let stage = CurveStage::new(&s).expect("regions set"); + for i in 0..=64 { + let x = i as f32 / 64.0; + assert!((graph.at(x as f64) as f32 - stage.base.eval(x)).abs() < 1e-6, "{x}"); + } + // moved splits and earlier processes draw the analytic curve, as they render it + s.curve.split_mid = 40.0; + let moved = ParametricGraph::new(&s); + assert!(!moved.is_measured()); + assert_eq!(moved.at(0.6), ParametricCurve::new(&s.curve).at(0.6)); + s.curve.split_mid = 50.0; + let v8 = DevelopSettings { process: Process::V8.version(), ..s }; + assert!(!ParametricGraph::new(&v8).is_measured()); + } + + #[test] + fn a_graph_drag_puts_the_measured_curve_where_the_hand_is() { + let mut s = v9(); + s.curve.darks = 30.0; + let graph = ParametricGraph::new(&s); + for (region, x) in [(0usize, 0.15f64), (1, 0.375), (2, 0.625), (3, 0.85)] { + for delta in [-0.04, 0.03] { + let from = graph.amount(region); + let a = graph.dragged_amount(region, x, from, delta); + let mut after = s.clone(); + let c = &mut after.curve; + *[&mut c.shadows, &mut c.darks, &mut c.lights, &mut c.highlights][region] = a; + let got = ParametricGraph::new(&after).at(x) - graph.at(x); + assert!((got - delta).abs() < 0.004, "region {region} at {x}: moved {got}, wanted {delta} (amount {from} β†’ {a})"); + } + assert_eq!(graph.dragged_amount(region, x, graph.amount(region), 0.0), graph.amount(region), "no motion, no change"); + assert_eq!(graph.dragged_amount(region, x, 0.0, 1.0), 100.0, "out of reach saturates high"); + assert_eq!(graph.dragged_amount(region, x, 0.0, -1.0), -100.0, "and low"); + } + } + #[test] fn tone_order_never_reverses_and_every_table_fits_the_gpu() { for w in [-100.0, -50.0, 37.0, 100.0] { diff --git a/crates/pipeline/src/lib.rs b/crates/pipeline/src/lib.rs index 445e90b57e9..44426eed2d4 100644 --- a/crates/pipeline/src/lib.rs +++ b/crates/pipeline/src/lib.rs @@ -60,6 +60,7 @@ pub mod upright; pub mod visualize; pub use curve::{PARAM_AMOUNTS, PARAM_LUT, ParametricCurve}; +pub use curve_stage::ParametricGraph; pub use output::{DeepImage, DeepSamples, DisplaySpace, OutputDepth, OutputSpace, OutputTrc, Proof, ProofLut, proof_profile, register_proof_profile}; pub use visualize::{MaskView, Overlay}; diff --git a/crates/ui-egui/src/panels/edit.rs b/crates/ui-egui/src/panels/edit.rs index 195bcb6488c..9cc2a5c7a57 100644 --- a/crates/ui-egui/src/panels/edit.rs +++ b/crates/ui-egui/src/panels/edit.rs @@ -6,7 +6,7 @@ use egui::{Align2, Color32, Pos2, Rect, RichText, Sense, Stroke, pos2, vec2}; use lightcraft_catalog::PhotoId; use lightcraft_develop::{ControlSpec, DevelopSettings, Section, Track, WbMode, controls}; use lightcraft_geom::Point; -use lightcraft_pipeline::{PARAM_AMOUNTS, ParametricCurve}; +use lightcraft_pipeline::{PARAM_AMOUNTS, ParametricGraph}; use lightcraft_raster::Histogram; use serde_json::{Value, json}; diff --git a/crates/ui-egui/src/panels/edit/curve.rs b/crates/ui-egui/src/panels/edit/curve.rs index 0eec3a5e447..a15c7b5960f 100644 --- a/crates/ui-egui/src/panels/edit/curve.rs +++ b/crates/ui-egui/src/panels/edit/curve.rs @@ -1,7 +1,7 @@ use super::histogram::preview_histogram; use super::sliders::control; use super::{ - Align2, Color32, DevelopSettings, Icon, LightcraftApp, Mesh, PARAM_AMOUNTS, ParametricCurve, PhotoId, Point, Pos2, Rect, RichText, Sense, Stroke, + Align2, Color32, DevelopSettings, Icon, LightcraftApp, Mesh, PARAM_AMOUNTS, ParametricGraph, PhotoId, Point, Pos2, Rect, RichText, Sense, Stroke, Tokens, Vertex, controls, hex, json, paint, pos2, register, text_button, vec2, }; @@ -85,7 +85,7 @@ fn param_drag(app: &mut LightcraftApp, ui: &mut egui::Ui, r: Rect, resp: &egui:: return; } let t = Tokens::get(ui.ctx()); - let model = ParametricCurve::new(&d.curve); + let model = ParametricGraph::new(d); let to_screen = |x: f64, y: f64| pos2(r.left() + x as f32 * r.width(), r.bottom() - y as f32 * r.height()); let from_screen_x = |q: Pos2| ((q.x - r.left()) / r.width()).clamp(0.0, 1.0) as f64; // the graph x of a point, and how far it is from the drawn curve (in screen points) @@ -110,7 +110,7 @@ fn param_drag(app: &mut LightcraftApp, ui: &mut egui::Ui, r: Rect, resp: &egui:: let x = from_screen_x(q); let _ = app.run("develop.beginInteraction", json!({"label": "Parametric Curve"})); let region = model.region_at(x); - let initial_amount = model.amounts.get(region).copied().unwrap_or(0.0); + let initial_amount = model.amount(region); let start_pos = to_screen(x, model.at(x)); dragged = Some((region, x, initial_amount, start_pos.y)); ui.data_mut(|dd| dd.insert_temp(cursor_id, start_pos)); @@ -127,9 +127,7 @@ fn param_drag(app: &mut LightcraftApp, ui: &mut egui::Ui, r: Rect, resp: &egui:: ui.data_mut(|d| d.insert_temp(cursor_id, cursor)); let delta_y = start_y - cursor.y; let delta_level = (delta_y / r.height()) as f64; - let per_unit = model.level_per_unit(region, x); - let new_amount = - if per_unit.abs() > f64::EPSILON { (initial_amount + delta_level / per_unit).clamp(-100.0, 100.0).round() } else { initial_amount }; + let new_amount = model.dragged_amount(region, x, initial_amount, delta_level); if let Some(&id) = PARAM_AMOUNTS.get(region) { set = Some((id, new_amount)); } @@ -238,11 +236,11 @@ pub(super) fn curve_editor(app: &mut LightcraftApp, ui: &mut egui::Ui, id: Photo let to_screen = |x: f64, y: f64| pos2(r.left() + x as f32 * r.width(), r.bottom() - y as f32 * r.height()); let from_screen = |q: Pos2| (((q.x - r.left()) / r.width()).clamp(0.0, 1.0) as f64, ((r.bottom() - q.y) / r.height()).clamp(0.0, 1.0) as f64); if ch == "parametric" { - // The Effective curve: the model the renderer builds from the four region sliders, sampled - // here and rebuilt every frame. The graph holds no state of its own, so a slider moved by - // hand, a Reset or an Undo redraws it from the settings in the same frame it changes. - let c = &d.curve; - let model = ParametricCurve::new(c); + // The Effective curve: the one the renderer builds from the four region sliders for this + // process (the measured regions under V9 at the default splits), sampled here and rebuilt every + // frame. The graph holds no state of its own, so a slider moved by hand, a Reset or an Undo + // redraws it from the settings in the same frame it changes. + let model = ParametricGraph::new(d); let pts: Vec = (0..=CURVE_SAMPLES).map(|i| to_screen(i as f64 / CURVE_SAMPLES as f64, model.at(i as f64 / CURVE_SAMPLES as f64))).collect(); p.add(egui::Shape::line(pts, Stroke::new(2.0, Color32::from_gray(220)))); diff --git a/crates/ui-egui/src/tests/curve.rs b/crates/ui-egui/src/tests/curve.rs index a658ee9a829..f3618611460 100644 --- a/crates/ui-egui/src/tests/curve.rs +++ b/crates/ui-egui/src/tests/curve.rs @@ -6,7 +6,7 @@ use serde_json::json; use crate::headless::Headless; use crate::{LightcraftApp, Services}; -use lightcraft_pipeline::ParametricCurve; +use lightcraft_pipeline::{ParametricCurve, ParametricGraph}; const T: Duration = Duration::from_secs(20); @@ -36,6 +36,11 @@ fn exec(h: &mut Headless, command: &str, params: serde_json::Value) -> serde_jso r["result"].clone() } +/// The parametric graph the panel draws for the selected photo's settings (its process decides measured or analytic). +fn graph(h: &Headless) -> ParametricGraph { + ParametricGraph::new(&develop(h)) +} + fn develop(h: &Headless) -> lightcraft_develop::DevelopSettings { let id = h.app.session.active().expect("active photo"); (*h.app.session.develop_of(id).unwrap_or_default()).clone() @@ -272,9 +277,10 @@ fn the_parametric_graph_paints_the_model_the_renderer_uses() { h.step(); let settings = develop(&h).curve; assert_eq!(settings, c, "the sliders hold the folded shape"); - let graph = curve_graph_rect(&mut h); - let painted = painted_param_curve(&h, graph); - let model = ParametricCurve::new(&c); + let model = graph(&h); + let rect = curve_graph_rect(&mut h); + let painted = painted_param_curve(&h, rect); + assert!(model.is_measured(), "the demo photo is on the latest process, which renders the measured regions"); let mut checked = 0; for i in 0..=24 { let x = i as f64 / 24.0; @@ -397,8 +403,8 @@ fn one_graph_drag_that_moves_several_regions_is_one_undo_step() { } /// The screen point where a drag should grab the curve: graph fraction `fx`, on the line itself. -fn on_curve(r: [f32; 4], c: &lightcraft_develop::ToneCurve, fx: f32) -> [f32; 2] { - let y = ParametricCurve::new(c).at(fx as f64); +fn on_curve(r: [f32; 4], g: &ParametricGraph, fx: f32) -> [f32; 2] { + let y = g.at(fx as f64); [r[0] + fx * r[2], r[1] + (1.0 - y as f32) * r[3]] } @@ -411,9 +417,10 @@ fn dragging_the_curve_moves_the_region_slider() { h.step(); let r = curve_graph_rect(&mut h); let c = develop(&h).curve; + let g = graph(&h); let undo_before = h.app.session.undo.len(); // grab the line inside the Lights window (x = 0.625) and pull it down - let [x, y] = on_curve(r, &c, 0.625); + let [x, y] = on_curve(r, &g, 0.625); let d = h.request("ui.drag", json!({"x": x, "y": y, "toX": x, "toY": y + 0.08 * r[3], "steps": 8}), T); assert_eq!(d["ok"], true, "{d}"); h.step(); @@ -426,8 +433,12 @@ fn dragging_the_curve_moves_the_region_slider() { // the graph really is redrawn below where the line was let graph = curve_graph_rect(&mut h); let painted = painted_param_curve(&h, graph)(0.625); - let before_level = ParametricCurve::new(&c).at(0.625); + let before_level = g.at(0.625); assert!(painted < before_level - 0.02, "the painted line followed the drag down: {painted} vs before {before_level}"); + // and lands where the hand is: 0.08 lower, less the steps of the 8 that egui's drag threshold (6 points) swallows + let step = 0.08 * r[3] as f64 / 8.0; + let moved = 0.08 - (6.0 / step).floor() * step / r[3] as f64; + assert!((before_level - painted - moved).abs() < 0.006, "the line moved {} for a hand motion of {moved}", before_level - painted); // and Undo takes the whole gesture back to where it started exec(&mut h, "edit.undo", json!({})); assert_eq!(develop(&h).curve, c, "undo restores the value the drag started from"); @@ -445,7 +456,7 @@ fn a_horizontal_drag_with_zero_vertical_motion_changes_nothing() { assert_eq!(before.darks, 60.0); assert_eq!(before.lights, 0.0); let r = curve_graph_rect(&mut h); - let [x, y] = on_curve(r, &before, 0.51); + let [x, y] = on_curve(r, &graph(&h), 0.51); // Drag purely horizontally from x=0.51: dx = 20 px, dy = 0 let d = h.request("ui.drag", json!({"x": x, "y": y, "toX": x + 20.0, "toY": y, "steps": 6}), T); assert_eq!(d["ok"], true, "{d}"); @@ -461,16 +472,16 @@ fn a_horizontal_drag_with_zero_vertical_motion_changes_nothing() { fn dragging_the_curve_up_raises_the_region_slider() { let mut h = curve_open("parametric"); let r = curve_graph_rect(&mut h); - let c = develop(&h).curve; + let g = graph(&h); // x = 0.375 is inside the Darks window - let [x, y] = on_curve(r, &c, 0.375); + let [x, y] = on_curve(r, &g, 0.375); let d = h.request("ui.drag", json!({"x": x, "y": y, "toX": x, "toY": y - 0.08 * r[3], "steps": 8}), T); assert_eq!(d["ok"], true, "{d}"); h.step(); let after = develop(&h).curve; assert!(after.darks > 0.0, "the Darks slider follows the line up: {}", after.darks); assert_eq!((after.shadows, after.lights, after.highlights), (0.0, 0.0, 0.0), "the other regions stay put: {after:?}"); - assert!(ParametricCurve::new(&after).at(0.375) > ParametricCurve::new(&c).at(0.375), "the curve is drawn bent up at the Darks region"); + assert!(graph(&h).at(0.375) > g.at(0.375), "the curve is drawn bent up at the Darks region"); } /// Which region a drag moves is decided by where on the line it is grabbed: the same drag gesture @@ -482,9 +493,9 @@ fn the_region_dragged_is_the_one_under_the_pointer() { { let mut h = curve_open("parametric"); let r = curve_graph_rect(&mut h); - let c = develop(&h).curve; - assert_eq!(ParametricCurve::new(&c).region_at(fx as f64), region, "x = {fx} belongs to {control}"); - let [x, y] = on_curve(r, &c, fx); + let g = graph(&h); + assert_eq!(g.region_at(fx as f64), region, "x = {fx} belongs to {control}"); + let [x, y] = on_curve(r, &g, fx); let d = h.request("ui.drag", json!({"x": x, "y": y, "toX": x, "toY": y - 0.06 * r[3], "steps": 6}), T); assert_eq!(d["ok"], true, "{d}"); h.step(); @@ -531,7 +542,7 @@ fn hovering_the_line_names_the_region_it_would_move() { exec(&mut h, "develop.set", json!({"control": "curve.lights", "value": 60})); h.step(); let r = curve_graph_rect(&mut h); - let [x, y] = on_curve(r, &develop(&h).curve, 0.625); + let [x, y] = on_curve(r, &graph(&h), 0.625); let q = h.request("ui.move", json!({"x": x, "y": y}), T); assert_eq!(q["ok"], true, "{q}"); h.step(); diff --git a/docs/curve-stage.md b/docs/curve-stage.md index a79fe23fdc8..c6321f92d9e 100644 --- a/docs/curve-stage.md +++ b/docs/curve-stage.md @@ -42,6 +42,14 @@ The tone map no longer applies Whites under V9 (`finish::base_tone`), and the V8 (`FinishParams::curves` is `None`). With Whites, the parametric curve and the point curves all neutral, the curve stage does not run. +## The Edit panel's graph + +The parametric graph draws the curve the photo renders, from `curve_stage::ParametricGraph`: the measured regions +under V9 at the default splits, else the analytic model. Dragging the line moves the region under the pointer by +the amount that puts the drawn curve where the pointer is. The measured tables are not linear in the amount, so the +amount is searched for, on the side of the starting value the drag moves to. A level out of the region's reach +saturates at Β±100. Whites is not part of the graph, as in Lightroom. + ## How it was measured `tools/lr_tone_charts.py charts OUT_DIR` writes linear DNG charts: 48 grey steps from 0.002 to 1 and OkLCh colour @@ -60,8 +68,6 @@ predicted from the grey-step curves under the hue-preserving rule in step 3. The ## Limits - The tables are measured with Lightroom's default splits. Moved splits use the earlier analytic model. -- The Edit panel's curve graph still draws the analytic parametric curve and drags against it. Under V9 at the - default splits the photo renders the measured regions, so the graph's shape can differ from the render's. - The point curves' shape between the points is LightCraft's spline, not measured. What is measured for them is how they apply: hue preserving, then the red, green and blue curves per channel. - Local (mask) Whites keeps the earlier processes' operator. @@ -72,3 +78,4 @@ predicted from the grey-step curves under the hue-preserving rule in step 3. The | Date | Change | Summary | |---|---|---| | 2026-11-10 | minor | Process V9: measured Whites and parametric curve, hue-preserving master curve | +| 2026-11-11 | minor | The Edit panel's parametric graph draws and drags the measured regions under V9 | diff --git a/docs/parity-checklist.md b/docs/parity-checklist.md index f80837830c1..133f39bc24d 100644 --- a/docs/parity-checklist.md +++ b/docs/parity-checklist.md @@ -185,7 +185,7 @@ differences and missing bindings are in [ui-parity.md](ui-parity.md#shortcuts). | LR-EDIT-LIGHT-SHADOWS | Shadows | P0 | βœ… | `ctl:light.shadows` | From process V2, the same base as Highlights: dark areas keep their local contrast when lifted (#632); from process V8, the gaps in dark lettering on a bright panel are not lifted into bright blocks. Alt/Option-drag shows shadow clipping (white, clipped channels in colour) | | LR-EDIT-LIGHT-WHITES | Whites | P0 | 🟑 | `ctl:light.whites`, `crates/pipeline/src/visualize.rs` | From process V9 Whites is measured against Camera Raw renders of synthetic grey steps and reaches into the midtones as Lightroom's does ([curve-stage.md](curve-stage.md)); not yet compared on photos per camera. V4 to V8 preserve V2 Whites for both signs; measured V2 check response error is 0.075 stops on the Sony test photos (`docs/light-v3.md`). Alt/Option-drag shows highlight clipping (black, clipped channels in colour) | | LR-EDIT-LIGHT-BLACKS | Blacks | P0 | 🟑 | `ctl:light.blacks`, `crates/pipeline/src/visualize.rs` | From process V4, global Blacks on the camera-look path uses a fitted per-channel/luminance mix. Check response error 0.424 to 0.077 stops on six held-out Sony photos; deepest tones still differ. Other sources and local adjustments retain V2 (`docs/light-v3.md`). Alt/Option-drag shows shadow clipping (white, clipped channels in colour) | -| LR-EDIT-LIGHT-CURVE-PARAM | Parametric curve | P0 | βœ… | `ctl:curve.highlights`, `ctl:curve.lights`, `ctl:curve.darks`, `ctl:curve.shadows`, `ctl:curve.split*`, `crates/pipeline/src/curve.rs` | from process V9 the regions are Camera Raw's measured response at the default splits, broad and additive ([curve-stage.md](curve-stage.md)); the graph draws the analytic model of V1 to V8, which under V9 at the default splits can differ from the measured regions the photo renders (follow-up); dragging the line moves the region under the pointer (one undo step) | +| LR-EDIT-LIGHT-CURVE-PARAM | Parametric curve | P0 | βœ… | `ctl:curve.highlights`, `ctl:curve.lights`, `ctl:curve.darks`, `ctl:curve.shadows`, `ctl:curve.split*`, `crates/pipeline/src/curve.rs` | from process V9 the regions are Camera Raw's measured response at the default splits, broad and additive ([curve-stage.md](curve-stage.md)); the graph draws the curve the photo renders (`ParametricGraph`: the measured regions under V9 at the default splits, else the analytic model); dragging the line moves the region under the pointer (one undo step) | | LR-EDIT-LIGHT-CURVE-POINT | Point curve | P0 | βœ… | `cmd:develop.curve`, `cmd:curve.reset`, `cmd:curve.presets`, `cmd:curve.applyPreset`, `cmd:curve.savePreset`, `cmd:curve.deletePreset`, `cmd:curve.importPresets`, `cmd:curve.exportPresets`, `cmd:file.importCurvePresets`, `cmd:file.exportCurvePresets`, `crates/engine/src/cmd/curves.rs`, `crates/ui-egui/src/panels/edit.rs` | click to add a point; drag a point in both axes (between its neighbours, input / output readout, one undo step per drag; βŒ₯-drag moves it a tenth as far for fine adjustment, issue #1363); drag empty space to add and drag; double-click removes; reset: double-click a channel selector (that channel), the Reset button under the graph (every curve incl. parametric) or right-click the graph (channel / all); Point Curve preset dropdown: own Linear / Medium Contrast / Strong Contrast, user presets (save the current point curves, delete by right-click; saved with the library), import / export as `.lccurve` JSON; from process V9 the master curve keeps hue as Lightroom's does (largest and smallest channel through the curve, the middle one in proportion), and the red, green and blue curves follow it per channel ([curve-stage.md](curve-stage.md)) | | LR-EDIT-LIGHT-CURVE-RGB | Per-channel curves | P0 | βœ… | `cmd:develop.curve` (`channel`) | | | LR-EDIT-LIGHT-CURVE-REFINESAT | Curve saturation compensation | P1 | βœ… | `ctl:curve.refineSaturation` | | @@ -1056,3 +1056,4 @@ Latin stays upright. Advanced Japanese composition remains open. Regression cove | 2026-10-17 | minor | LR-EXP-DIALOG: built-in export presets for the issue #2104 delivery targets β€” Instagram Feed (1080 px, screen sharpening), Instagram Story / Reel (1920 px), Web / Portfolio (2048 px, copyright and creator metadata), Full Resolution Master (full size, Display P3, quality 95); LR-EXP-PREVIOUS drops its stale "no named export presets yet" note; status unchanged (βœ…) | | 2026-10-20 | patch | LR-EXP-DIALOG: the four built-in export presets are translated in all 17 catalogs (translations pending native-speaker review); Instagram Story / Reel states that it applies no crop to 9:16; status unchanged (βœ…) | | 2026-10-31 | patch | LRC-LIB-VISUALSEARCH: Find Similar Photos reads the photos on a worker thread under an activity row with βœ• instead of on the UI thread, where a large library left the window not responding (#3468). A stopped search leaves the view as it was and keeps what it read; a control request gets the same `{photos}` when the search ends. | +| 2026-11-11 | patch | LR-EDIT-LIGHT-CURVE-PARAM: the graph draws and drags the curve the photo renders, the measured regions under V9 at the default splits; status unchanged (βœ…) | From 0bbd0fcc6cd336cca012c8c664060bb64184133d Mon Sep 17 00:00:00 2001 From: smi-leonivkovic Date: Wed, 11 Nov 2026 17:17:31 +0100 Subject: [PATCH 21/51] LR-BEHAV-RENDER-FIDELITY: review fixes: the chart tool refuses renders that are not 16-bit Adobe RGB (1998) (#523) --- tools/lr_tone_charts.py | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/tools/lr_tone_charts.py b/tools/lr_tone_charts.py index 0657b769e3e..5aaf67d17da 100644 --- a/tools/lr_tone_charts.py +++ b/tools/lr_tone_charts.py @@ -134,11 +134,31 @@ def srgb_encode(v): return np.where(v <= 0.0031308, v * 12.92, 1.055 * v ** (1 / 2.4) - 0.055) +ADOBE_RGB_NAME = "Adobe RGB (1998)" + + +def read_render(path): + """A Camera Raw render as RGB 0..1, after checking it is the 16-bit Adobe RGB (1998) TIFF the tables assume. + + Another export setting would still give plausible numbers, but wrong ones, so it is refused. + """ + import tifffile + with tifffile.TiffFile(path) as t: + page = t.pages[0] + icc = page.tags.get(34675) # InterColorProfile + profile = bytes(icc.value) if icc is not None else b"" + a = page.asarray() + if a.dtype != np.uint16 or a.ndim != 3 or a.shape[2] != 3: + raise SystemExit(f"{path}: expected a 16-bit RGB TIFF, got {a.dtype} {a.shape}") + # the profile's description: ASCII in ICC v2, UTF-16 in v4 + if not any(n in profile for n in (ADOBE_RGB_NAME.encode(), ADOBE_RGB_NAME.encode("utf-16-be"))): + raise SystemExit(f"{path}: expected an embedded {ADOBE_RGB_NAME} profile (export from Camera Raw in that colour space)") + return a.astype(np.float64) / 65535.0 + + def grey_levels(path, patches): """The grey steps of a Camera Raw render as sRGB-encoded linear ProPhoto values (the curve stage's domain).""" - import tifffile - a = tifffile.imread(path).astype(np.float64) - a /= 65535.0 if a.max() > 255 else 255.0 + a = read_render(path) out = [] for q in patches: if q["kind"] != "grey" or not q["ok"]: From 6f565fec203b9de86512c11701122767eb42a308 Mon Sep 17 00:00:00 2001 From: smi-leonivkovic Date: Wed, 11 Nov 2026 17:23:27 +0100 Subject: [PATCH 22/51] LR-EDIT-LIGHT-CURVE-PARAM: review fixes: a graph drag searches the curve as drawn and leaves a region that cannot move it; the panel builds the graph once per frame (#523) --- crates/pipeline/src/curve_stage.rs | 82 +++++++++++++++++++++---- crates/ui-egui/src/panels/edit/curve.rs | 5 +- docs/curve-stage.md | 6 +- 3 files changed, 76 insertions(+), 17 deletions(-) diff --git a/crates/pipeline/src/curve_stage.rs b/crates/pipeline/src/curve_stage.rs index a427054c66b..21857197fbf 100644 --- a/crates/pipeline/src/curve_stage.rs +++ b/crates/pipeline/src/curve_stage.rs @@ -26,6 +26,9 @@ use crate::light_v3::PRO_Y; /// Entries per table (as the shipping curve tables). pub const N: usize = 1024; +/// The least a region must be able to move the drawn parametric curve for a drag to move its slider: half an 8-bit level. +const REACH_MIN: f64 = 0.5 / 255.0; + /// Lightroom's default parametric splits: the measured region tables hold for them only. const DEFAULT_SPLITS: [f64; 3] = [25.0, 50.0, 75.0]; @@ -82,8 +85,12 @@ fn default_splits(c: &ToneCurve) -> bool { /// The measured regions at `x`, before the curve is kept monotone: the four deltas added to the diagonal. fn regions_at(amounts: [f32; 4], x: f32) -> f32 { - let d: f32 = amounts.iter().zip(t::REGIONS.iter()).map(|(a, r)| measured_delta(&t::REGION_AMOUNTS, r, *a, x)).sum(); - (x + d).clamp(0.0, 1.0) + (x + regions_delta(amounts, x)).clamp(0.0, 1.0) +} + +/// The sum of the four measured region deltas at `x`. +fn regions_delta(amounts: [f32; 4], x: f32) -> f32 { + amounts.iter().zip(t::REGIONS.iter()).map(|(a, r)| measured_delta(&t::REGION_AMOUNTS, r, *a, x)).sum() } /// The measured parametric curve at the default splits. @@ -143,7 +150,8 @@ impl ParametricGraph { /// The amount for region `region` after a drag that grabbed the curve at `x`, with the region at `from`, and moved /// it `delta` in output level (a fraction of the graph's height; up is positive). The other regions stay as they - /// are. A level the region cannot reach saturates at Β±100; no motion keeps `from`. + /// are, and the level is the drawn curve's (kept monotone). A level the region cannot reach saturates at Β±100; no + /// motion, or a region that cannot visibly move the line in that direction, keeps `from`. pub fn dragged_amount(&self, region: usize, x: f64, from: f64, delta: f64) -> f64 { if delta == 0.0 || !delta.is_finite() { return from; @@ -152,19 +160,46 @@ impl ParametricGraph { let per_unit = self.model.level_per_unit(region, x); return if per_unit.abs() > f64::EPSILON { (from + delta / per_unit).clamp(-100.0, 100.0).round() } else { from }; } - // the measured regions are tables, not linear in the amount: search the amount whose level is the target, - // on the side of `from` the drag goes to (so a flat stretch never makes the slider jump back) - let x = x.clamp(0.0, 1.0) as f32; + // The measured regions are tables, not linear in the amount: search the amount that puts the drawn curve at the + // target, on the side of `from` the drag goes to (so a flat stretch never makes the slider jump back). The drawn + // curve is kept monotone, a running maximum, so its level at `x` reads the table entries up to `x`; the other + // regions' share of them is the same for every amount tried. + let Some(table) = t::REGIONS.get(region) else { return from }; + let pos = x.clamp(0.0, 1.0) as f32 * (N - 1) as f32; + let j = (pos as usize).min(N - 2); + let f = pos - j as f32; + let mut others = self.model.amounts.map(|v| v as f32); + if let Some(v) = others.get_mut(region) { + *v = 0.0; + } + let entries: Vec<(f32, f32)> = (0..=j + 1) + .map(|i| { + let g = i as f32 / (N - 1) as f32; + (g, regions_delta(others, g)) + }) + .collect(); let level = |a: f64| { - let mut amounts = self.model.amounts.map(|v| v as f32); - if let Some(v) = amounts.get_mut(region) { - *v = a as f32; + let (mut m, mut at) = (f32::NEG_INFINITY, [0.0f32; 2]); + for (i, (g, rest)) in entries.iter().enumerate() { + m = m.max((g + rest + measured_delta(&t::REGION_AMOUNTS, table, a as f32, *g)).clamp(0.0, 1.0)); + if let Some(v) = i.checked_sub(j).and_then(|k| at.get_mut(k)) { + *v = m; + } } - regions_at(amounts, x) as f64 + (at[0] + (at[1] - at[0]) * f) as f64 }; - let target = level(from) + delta; + let (start, end) = (level(from), if delta > 0.0 { 100.0 } else { -100.0 }); + let (target, reach) = (start + delta, level(end)); + // where the drawn line is held by a peak to its left, the region may hardly move it: then the slider stays + if (reach - start).abs() < REACH_MIN { + return from; + } + if (delta > 0.0 && reach < target) || (delta < 0.0 && reach > target) { + return end; + } let (mut lo, mut hi) = if delta > 0.0 { (from, 100.0) } else { (-100.0, from) }; - for _ in 0..40 { + // 20 halvings of the 200-wide range are well inside the rounding to whole amounts + for _ in 0..20 { let mid = (lo + hi) / 2.0; if level(mid) < target { lo = mid; @@ -392,6 +427,29 @@ mod tests { } } + #[test] + fn a_graph_drag_follows_the_drawn_curve_where_it_is_flattened() { + // Lights +100 and Highlights -100 fold the measured curve back above 0.75; the drawn curve is held flat there + let mut s = v9(); + (s.curve.shadows, s.curve.darks, s.curve.lights, s.curve.highlights) = (-50.0, 100.0, 100.0, -100.0); + let graph = ParametricGraph::new(&s); + let x = 0.86; + let raw = regions_at(graph.model.amounts.map(|v| v as f32), x as f32) as f64; + assert!(graph.at(x) - raw > 0.1, "the stretch is flattened, or this proves nothing: {} vs {raw}", graph.at(x)); + let drawn = |region: usize, a: f64| { + let mut after = s.clone(); + let c = &mut after.curve; + *[&mut c.shadows, &mut c.darks, &mut c.lights, &mut c.highlights][region] = a; + ParametricGraph::new(&after).at(x) + }; + // Lights lowers the peak that holds the line: the drawn line moves with the hand + let a = graph.dragged_amount(2, x, 100.0, -0.03); + assert!((drawn(2, a) - graph.at(x) + 0.03).abs() < 0.004, "Lights {a} moved the line {}", drawn(2, a) - graph.at(x)); + // Highlights hardly moves the held line at all, so its slider stays rather than running to the end + assert!(drawn(3, 100.0) - graph.at(x) < REACH_MIN, "Highlights cannot lift the held line"); + assert_eq!(graph.dragged_amount(3, x, -100.0, 0.03), -100.0); + } + #[test] fn tone_order_never_reverses_and_every_table_fits_the_gpu() { for w in [-100.0, -50.0, 37.0, 100.0] { diff --git a/crates/ui-egui/src/panels/edit/curve.rs b/crates/ui-egui/src/panels/edit/curve.rs index a15c7b5960f..159704927a7 100644 --- a/crates/ui-egui/src/panels/edit/curve.rs +++ b/crates/ui-egui/src/panels/edit/curve.rs @@ -80,12 +80,11 @@ const PARAM_GRAB: f32 = 14.0; /// The whole gesture runs inside one `develop` interaction, so it is one undo step (Ctrl+Z takes the /// gesture back, not the last frame of it), and every write goes through `develop.set`, so the /// slider, the curve and what is drawn are the same state rather than three things kept in step. -fn param_drag(app: &mut LightcraftApp, ui: &mut egui::Ui, r: Rect, resp: &egui::Response, d: &DevelopSettings) { +fn param_drag(app: &mut LightcraftApp, ui: &mut egui::Ui, r: Rect, resp: &egui::Response, d: &DevelopSettings, model: &ParametricGraph) { if r.width() <= 1.0 || r.height() <= 1.0 { return; } let t = Tokens::get(ui.ctx()); - let model = ParametricGraph::new(d); let to_screen = |x: f64, y: f64| pos2(r.left() + x as f32 * r.width(), r.bottom() - y as f32 * r.height()); let from_screen_x = |q: Pos2| ((q.x - r.left()) / r.width()).clamp(0.0, 1.0) as f64; // the graph x of a point, and how far it is from the drawn curve (in screen points) @@ -244,7 +243,7 @@ pub(super) fn curve_editor(app: &mut LightcraftApp, ui: &mut egui::Ui, id: Photo let pts: Vec = (0..=CURVE_SAMPLES).map(|i| to_screen(i as f64 / CURVE_SAMPLES as f64, model.at(i as f64 / CURVE_SAMPLES as f64))).collect(); p.add(egui::Shape::line(pts, Stroke::new(2.0, Color32::from_gray(220)))); - param_drag(app, ui, r, &resp, d); + param_drag(app, ui, r, &resp, d, &model); curve_footer(app, ui, d); for &c in PARAM_AMOUNTS.iter().rev() { control(app, ui, d, c, true); diff --git a/docs/curve-stage.md b/docs/curve-stage.md index c6321f92d9e..2fe3bde85eb 100644 --- a/docs/curve-stage.md +++ b/docs/curve-stage.md @@ -47,8 +47,10 @@ stage does not run. The parametric graph draws the curve the photo renders, from `curve_stage::ParametricGraph`: the measured regions under V9 at the default splits, else the analytic model. Dragging the line moves the region under the pointer by the amount that puts the drawn curve where the pointer is. The measured tables are not linear in the amount, so the -amount is searched for, on the side of the starting value the drag moves to. A level out of the region's reach -saturates at Β±100. Whites is not part of the graph, as in Lightroom. +amount is searched for, on the side of the starting value the drag moves to, on the curve as drawn (kept monotone, so +where opposite regions fold it back the line is held flat by the peak to its left). A level out of the region's reach +saturates at Β±100. A region that cannot move the line by half an 8-bit level in that direction keeps its value. +Whites is not part of the graph, as in Lightroom. ## How it was measured From a8b4d7efaef55186c0a3fda0df1f27ad2819ceb2 Mon Sep 17 00:00:00 2001 From: smi-leonivkovic Date: Wed, 11 Nov 2026 17:24:19 +0100 Subject: [PATCH 23/51] LR-BEHAV-RENDER-FIDELITY: review fixes: the measured tables are read without allocating per sample (#523) --- crates/pipeline/src/curve_stage.rs | 74 ++++++++++++++++++++++++------ 1 file changed, 59 insertions(+), 15 deletions(-) diff --git a/crates/pipeline/src/curve_stage.rs b/crates/pipeline/src/curve_stage.rs index 954e0900aad..2f7bab330d2 100644 --- a/crates/pipeline/src/curve_stage.rs +++ b/crates/pipeline/src/curve_stage.rs @@ -49,26 +49,29 @@ fn table_at(v: &[f32; 257], x: f32) -> f32 { } } -/// The delta at `x` of a setting measured at `amounts` (sorted, without 0), linearly between the measured amounts -/// and towards 0 below the smallest; clamped to the measured range. +/// The delta at `x` of a setting measured at `amounts` (ascending, without 0), linearly between the measured amounts +/// and towards 0 below the smallest; clamped to the measured range. Runs per table sample, so it allocates nothing. fn measured_delta(amounts: &[f32; K], tables: &[[f32; 257]; K], amount: f32, x: f32) -> f32 { if amount == 0.0 || K == 0 { return 0.0; } - // the measured amounts with 0 between the negative and positive ones - let mut keys: Vec<(f32, Option<&[f32; 257]>)> = amounts.iter().zip(tables.iter()).map(|(a, v)| (*a, Some(v))).collect(); - keys.push((0.0, None)); - keys.sort_by(|a, b| a.0.total_cmp(&b.0)); - let (lo, hi) = (keys.first().map_or(0.0, |k| k.0), keys.last().map_or(0.0, |k| k.0)); + // the measured amounts with 0 (delta 0) between the negative and positive ones: key `i` of K + 1 + let zero = amounts.partition_point(|a| *a < 0.0); + let key = |i: usize| -> (f32, f32) { + let k = match i.cmp(&zero) { + std::cmp::Ordering::Less => i, + std::cmp::Ordering::Equal => return (0.0, 0.0), + std::cmp::Ordering::Greater => i - 1, + }; + (amounts.get(k).copied().unwrap_or(0.0), tables.get(k).map_or(0.0, |v| table_at(v, x))) + }; + let (lo, hi) = (key(0).0, key(K).0); let a = amount.clamp(lo, hi); - let at = |k: &(f32, Option<&[f32; 257]>)| k.1.map_or(0.0, |v| table_at(v, x)); - for w in keys.windows(2) { - if let [k0, k1] = w - && a >= k0.0 - && a <= k1.0 - { - let f = if k1.0 > k0.0 { (a - k0.0) / (k1.0 - k0.0) } else { 0.0 }; - return at(k0) * (1.0 - f) + at(k1) * f; + for i in 0..K { + let ((a0, v0), (a1, v1)) = (key(i), key(i + 1)); + if a >= a0 && a <= a1 { + let f = if a1 > a0 { (a - a0) / (a1 - a0) } else { 0.0 }; + return v0 * (1.0 - f) + v1 * f; } } 0.0 @@ -262,6 +265,47 @@ mod tests { assert_eq!(stage.base.v, crate::curve::ParametricCurve::new(&s.curve).to_lut().v); } + /// The earlier implementation, which built and sorted the keys per call. + fn measured_delta_sorted(amounts: &[f32; K], tables: &[[f32; 257]; K], amount: f32, x: f32) -> f32 { + if amount == 0.0 || K == 0 { + return 0.0; + } + // the measured amounts with 0 between the negative and positive ones + let mut keys: Vec<(f32, Option<&[f32; 257]>)> = amounts.iter().zip(tables.iter()).map(|(a, v)| (*a, Some(v))).collect(); + keys.push((0.0, None)); + keys.sort_by(|a, b| a.0.total_cmp(&b.0)); + let (lo, hi) = (keys.first().map_or(0.0, |k| k.0), keys.last().map_or(0.0, |k| k.0)); + let a = amount.clamp(lo, hi); + let at = |k: &(f32, Option<&[f32; 257]>)| k.1.map_or(0.0, |v| table_at(v, x)); + for w in keys.windows(2) { + if let [k0, k1] = w + && a >= k0.0 + && a <= k1.0 + { + let f = if k1.0 > k0.0 { (a - k0.0) / (k1.0 - k0.0) } else { 0.0 }; + return at(k0) * (1.0 - f) + at(k1) * f; + } + } + 0.0 + } + + #[test] + fn measured_delta_reads_the_tables_as_the_sorting_version_did() { + assert!(t::REGION_AMOUNTS.windows(2).all(|w| w[0] < w[1]) && t::WHITES_AMOUNTS.windows(2).all(|w| w[0] < w[1])); + for amount in [-150.0f32, -100.0, -80.0, -75.0, -30.0, -1.0, 0.0, 0.5, 12.0, 25.0, 60.0, 100.0, 140.0] { + for i in 0..=40 { + let x = i as f32 / 40.0; + for r in &t::REGIONS { + assert_eq!(measured_delta(&t::REGION_AMOUNTS, r, amount, x), measured_delta_sorted(&t::REGION_AMOUNTS, r, amount, x)); + } + assert_eq!( + measured_delta(&t::WHITES_AMOUNTS, &t::WHITES, amount, x), + measured_delta_sorted(&t::WHITES_AMOUNTS, &t::WHITES, amount, x) + ); + } + } + } + #[test] fn tone_order_never_reverses_and_every_table_fits_the_gpu() { for w in [-100.0, -50.0, 37.0, 100.0] { From 8bec5c5d4f40931384bad8d6f7ef8bae6ba1fae2 Mon Sep 17 00:00:00 2001 From: smi-leonivkovic Date: Wed, 11 Nov 2026 18:35:08 +0100 Subject: [PATCH 24/51] LR-EDIT-LIGHT-CURVE-PARAM: review fixes: doc comments on the graph's constructor, the curve editor and the graph tests (#523) --- crates/pipeline/src/curve_stage.rs | 6 +++++- crates/ui-egui/src/panels/edit/curve.rs | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/crates/pipeline/src/curve_stage.rs b/crates/pipeline/src/curve_stage.rs index bc9f16b5515..605532b3bfd 100644 --- a/crates/pipeline/src/curve_stage.rs +++ b/crates/pipeline/src/curve_stage.rs @@ -122,6 +122,7 @@ pub struct ParametricGraph { } impl ParametricGraph { + /// The graph for `s`: measured when `s`'s process is V9 or later and the splits are the defaults. pub fn new(s: &DevelopSettings) -> ParametricGraph { let model = ParametricCurve::new(&s.curve); let measured = (s.process.process() >= Process::V9 && default_splits(&s.curve)).then(|| measured_parametric(model.amounts.map(|a| a as f32))); @@ -429,6 +430,7 @@ mod tests { } } + /// What the graph draws is the stage's base curve, and the analytic one where the stage uses that. #[test] fn the_graph_is_the_curve_the_stage_renders() { let mut s = v9(); @@ -450,6 +452,7 @@ mod tests { assert!(!ParametricGraph::new(&v8).is_measured()); } + /// In every region, the amount a drag picks moves the drawn curve by the drag's motion. #[test] fn a_graph_drag_puts_the_measured_curve_where_the_hand_is() { let mut s = v9(); @@ -471,9 +474,10 @@ mod tests { } } + /// Where opposite regions fold the measured curve back, the drag follows the curve as drawn (held flat by the peak + /// to its left): Lights +100 and Highlights βˆ’100 fold it above 0.75. #[test] fn a_graph_drag_follows_the_drawn_curve_where_it_is_flattened() { - // Lights +100 and Highlights -100 fold the measured curve back above 0.75; the drawn curve is held flat there let mut s = v9(); (s.curve.shadows, s.curve.darks, s.curve.lights, s.curve.highlights) = (-50.0, 100.0, 100.0, -100.0); let graph = ParametricGraph::new(&s); diff --git a/crates/ui-egui/src/panels/edit/curve.rs b/crates/ui-egui/src/panels/edit/curve.rs index 159704927a7..a7ea96bc5c5 100644 --- a/crates/ui-egui/src/panels/edit/curve.rs +++ b/crates/ui-egui/src/panels/edit/curve.rs @@ -159,6 +159,8 @@ fn param_drag(app: &mut LightcraftApp, ui: &mut egui::Ui, r: Rect, resp: &egui:: } } +/// The Tone Curve flyout: the channel row, the graph of the selected channel (the parametric curve, or a point curve +/// with its points) with its drag, the presets row and the sliders below. pub(super) fn curve_editor(app: &mut LightcraftApp, ui: &mut egui::Ui, id: PhotoId, d: &DevelopSettings) { let t = Tokens::get(ui.ctx()); // channel selector From 14909c49141bc8c4b569c87645417638620e06c3 Mon Sep 17 00:00:00 2001 From: smi-leonivkovic Date: Wed, 18 Nov 2026 17:27:45 +0100 Subject: [PATCH 25/51] curve_stage: say in apply's doc that values above white are added back after the curves (review on #4076) --- crates/pipeline/src/curve_stage.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/crates/pipeline/src/curve_stage.rs b/crates/pipeline/src/curve_stage.rs index 2f7bab330d2..cfc5e4c25a8 100644 --- a/crates/pipeline/src/curve_stage.rs +++ b/crates/pipeline/src/curve_stage.rs @@ -143,7 +143,11 @@ impl CurveStage { Some(CurveStage { chan, base, refine }) } - /// Linear Rec.2020 in and out (display referred, after the tone map). Values above white keep slope 1. + /// Linear Rec.2020 in and out (display referred, after the tone map). + /// + /// The curves are looked up on the colour clamped to [0, 1] in linear ProPhoto; whatever a channel had + /// above white is added back after them, so HDR input keeps slope 1 above white and is not clipped by an + /// active curve (`hdr_values_keep_slope_one_above_white`). pub fn apply(&self, d: [f32; 3]) -> [f32; 3] { let (to, from) = matrices(); let p = mul3(to, d); From 789c1a0467e962d15f3969834269bab02482dd9a Mon Sep 17 00:00:00 2001 From: smi-leonivkovic Date: Tue, 24 Nov 2026 08:18:38 +0100 Subject: [PATCH 26/51] LR-BEHAV-RENDER-FIDELITY: Whites and the parametric regions are a fitted model, not measured tables (#523) Review on #4076: the clean-room standard's Assets section rules out tables sampled from another app's output. `curve_stage_tables.rs` and the tool step that wrote it (`lr_tone_charts.py tables`) are gone. - `curve_stage_model.rs` holds only the model's 140 constants, written by `lr_tone_charts.py fit` from the same chart renders. Per slider direction, two smooth bumps whose gain, position and width change with the amount; the fit keeps every response growing with the amount. - Against the measured responses, as rendered: 0.05 to 0.52 8-bit levels RMS, 2.29 at most (table in docs/curve-stage.md). - Held-out photos, this branch's table build vs the model: tone 7.094 -> 7.079, colour 1.332 -> 1.327 (OkLab x 100). - Tests stay relational: responses grow with the slider and stay inside black and white, the regions peak in tone order; the folded-curve drag test uses settings where the held line sits below white. - Code comments and the release note describe the stage in our own words; provenance stays in docs/curve-stage.md and the tool. --- crates/develop/src/settings.rs | 7 +- crates/pipeline/src/curve_stage.rs | 223 ++++++++++------------ crates/pipeline/src/curve_stage_model.rs | 19 ++ crates/pipeline/src/curve_stage_tables.rs | 57 ------ crates/pipeline/src/finish.rs | 5 +- crates/pipeline/src/lib.rs | 2 +- crates/ui-egui/src/panels/edit/curve.rs | 2 +- crates/ui-egui/src/tests/curve.rs | 4 +- docs/curve-stage.md | 60 ++++-- docs/parity-checklist.md | 2 +- docs/process-versions.md | 2 +- docs/whats-new.md | 13 +- tools/lr_tone_charts.py | 116 ++++++++--- tools/requirements-lr-tone-charts.txt | 3 +- 14 files changed, 281 insertions(+), 234 deletions(-) create mode 100644 crates/pipeline/src/curve_stage_model.rs delete mode 100644 crates/pipeline/src/curve_stage_tables.rs diff --git a/crates/develop/src/settings.rs b/crates/develop/src/settings.rs index 941e6013a4e..6a2c3895fc8 100644 --- a/crates/develop/src/settings.rs +++ b/crates/develop/src/settings.rs @@ -102,9 +102,10 @@ pub enum Process { /// V7, with the Highlights/Shadows base taken of log luminance without its fine detail (clamped /// between a fine and a 3Γ— wider median), so gaps in dark lettering aren't lifted into bright blocks. V8, - /// V8, with Whites and the parametric curve measured against Lightroom, and the tone curves applied as - /// Lightroom does: Whites, the parametric and point curve hue-preserving in linear ProPhoto RGB, then the - /// red, green and blue curves per channel, before the colour stage (`lightcraft_pipeline::curve_stage`). + /// V8, with Whites and the parametric curve from a fitted model, and the tone curves applied + /// hue-preserving: Whites, the parametric and point curve in linear ProPhoto RGB, then the red, green and + /// blue curves per channel, before the colour stage (`lightcraft_pipeline::curve_stage`, + /// `docs/curve-stage.md`). V9, } diff --git a/crates/pipeline/src/curve_stage.rs b/crates/pipeline/src/curve_stage.rs index 116a5e8b304..135ba3b3fe6 100644 --- a/crates/pipeline/src/curve_stage.rs +++ b/crates/pipeline/src/curve_stage.rs @@ -1,15 +1,14 @@ -//! Process V9's tone-curve stage ([`lightcraft_develop::Process::V9`], `docs/curve-stage.md`): Whites, the -//! parametric curve and the point curves, applied the way Lightroom applies them. +//! Process V9's tone-curve stage ([`lightcraft_develop::Process::V9`]): Whites, the parametric curve and the point +//! curves. `docs/curve-stage.md` records how the model was measured and fitted. //! -//! Measured on Camera Raw renders of synthetic charts (`tools/lr_tone_charts.py`): //! - Whites, the parametric curve, the master point curve, Contrast and Blacks act hue-preserving on linear ProPhoto //! RGB: the curve maps the largest and the smallest channel (on sRGB-encoded values), and the middle channel keeps -//! its relative position between them in linear light. Predicting coloured patches from the curve measured on -//! grey steps this way leaves 0.03 to 0.16 (OkLab Γ— 100), against 0.3 to 3.4 for V8. +//! its relative position between them in linear light. //! - The red, green and blue curves act per channel on sRGB-encoded linear ProPhoto RGB, after the master curve. -//! - Whites and the four parametric regions are tables of Camera Raw's measured output (`curve_stage_tables`): -//! Whites reaches into the midtones (Whites βˆ’50 lowers encoded 0.6 by about 10/255), and each region is broad and -//! overlapping. The regions add: the sum of single regions reproduces three at once within 1/255. +//! - Whites reaches into the midtones, and each parametric region is broad and overlapping; the regions add. +//! - Whites and the four regions come from a fitted model (`curve_stage_model`, written by `tools/lr_tone_charts.py +//! fit`): per slider direction, two smooth bumps whose gain, position and width change with the amount +//! ([`response`]). //! //! The stage runs after the tone map and Process V4's calibrated Contrast and Blacks, before the colour stage. It //! replaces V8's curves on encoded output values; the tone map leaves Whites to it. @@ -20,7 +19,7 @@ use lightcraft_develop::{DevelopSettings, Process, ToneCurve}; use lightcraft_geom::Point; use crate::curve::ParametricCurve; -use crate::curve_stage_tables as t; +use crate::curve_stage_model as m; use crate::light_v3::PRO_Y; /// Entries per table (as the shipping curve tables). @@ -29,7 +28,7 @@ pub const N: usize = 1024; /// The least a region must be able to move the drawn parametric curve for a drag to move its slider: half an 8-bit level. const REACH_MIN: f64 = 0.5 / 255.0; -/// Lightroom's default parametric splits: the measured region tables hold for them only. +/// The default parametric splits (25, 50, 75): the fitted regions hold for them only. const DEFAULT_SPLITS: [f64; 3] = [25.0, 50.0, 75.0]; /// The stage's tables: `base` (Whites, then the parametric curve, then the master point curve) acts hue-preserving, @@ -42,101 +41,88 @@ pub struct CurveStage { pub refine: f32, } -/// A measured delta table (257 entries over 0..1) at `x`. -fn table_at(v: &[f32; 257], x: f32) -> f32 { - let p = x.clamp(0.0, 1.0) * 256.0; - let i = (p as usize).min(255); - let f = p - i as f32; - match (v.get(i), v.get(i + 1)) { - (Some(a), Some(b)) => a + (b - a) * f, - _ => 0.0, +/// A bump of peak 1 at `p / (p + q)`, 0 at black and white and outside them. +fn bump(x: f64, p: f64, q: f64) -> f64 { + if x <= 0.0 || x >= 1.0 { + return 0.0; } + let peak = p / (p + q); + (p * (x / peak).ln() + q * ((1.0 - x) / (1.0 - peak)).ln()).exp() } -/// The delta at `x` of a setting measured at `amounts` (ascending, without 0), linearly between the measured amounts -/// and towards 0 below the smallest; clamped to the measured range. Runs per table sample, so it allocates nothing. -fn measured_delta(amounts: &[f32; K], tables: &[[f32; 257]; K], amount: f32, x: f32) -> f32 { - if amount == 0.0 || K == 0 { +/// The fitted response of a slider at `amount` (βˆ’100 to 100, clamped) for input `x`: output minus input on +/// sRGB-encoded values. Per direction, two bumps with gain `a1 t + a2 tΒ² + a3 tΒ³` (t = |amount| / 100) and shape +/// exponents `e^(p0 + p1 t)`, `e^(q0 + q1 t)`. +fn response(fit: &[m::Response; 2], amount: f32, x: f32) -> f32 { + if amount == 0.0 || !amount.is_finite() { return 0.0; } - // the measured amounts with 0 (delta 0) between the negative and positive ones: key `i` of K + 1 - let zero = amounts.partition_point(|a| *a < 0.0); - let key = |i: usize| -> (f32, f32) { - let k = match i.cmp(&zero) { - std::cmp::Ordering::Less => i, - std::cmp::Ordering::Equal => return (0.0, 0.0), - std::cmp::Ordering::Greater => i - 1, - }; - (amounts.get(k).copied().unwrap_or(0.0), tables.get(k).map_or(0.0, |v| table_at(v, x))) - }; - let (lo, hi) = (key(0).0, key(K).0); - let a = amount.clamp(lo, hi); - for i in 0..K { - let ((a0, v0), (a1, v1)) = (key(i), key(i + 1)); - if a >= a0 && a <= a1 { - let f = if a1 > a0 { (a - a0) / (a1 - a0) } else { 0.0 }; - return v0 * (1.0 - f) + v1 * f; - } - } - 0.0 + let [negative, positive] = fit; + let side = if amount < 0.0 { negative } else { positive }; + let (t, x) = ((f64::from(amount) / 100.0).abs().min(1.0), f64::from(x)); + let r: f64 = side + .iter() + .map(|[a1, a2, a3, p0, p1, q0, q1]| (a1 * t + a2 * t * t + a3 * t * t * t) * bump(x, (p0 + p1 * t).exp(), (q0 + q1 * t).exp())) + .sum(); + r as f32 } -/// Whether `c` holds Lightroom's default splits, the ones the region tables are measured with. +/// Whether `c` holds the default splits, the ones the regions are fitted for. fn default_splits(c: &ToneCurve) -> bool { [c.split_shadows, c.split_mid, c.split_highlights].iter().zip(DEFAULT_SPLITS).all(|(s, d)| (s - d).abs() <= 1e-6) } -/// The measured regions at `x`, before the curve is kept monotone: the four deltas added to the diagonal. +/// The fitted regions at `x`, before the curve is kept monotone: the four responses added to the diagonal. fn regions_at(amounts: [f32; 4], x: f32) -> f32 { (x + regions_delta(amounts, x)).clamp(0.0, 1.0) } -/// The sum of the four measured region deltas at `x`. +/// The sum of the four fitted region responses at `x`. fn regions_delta(amounts: [f32; 4], x: f32) -> f32 { - amounts.iter().zip(t::REGIONS.iter()).map(|(a, r)| measured_delta(&t::REGION_AMOUNTS, r, *a, x)).sum() + amounts.iter().zip(m::REGIONS.iter()).map(|(a, r)| response(r, *a, x)).sum() } -/// The measured parametric curve at the default splits. -fn measured_parametric(amounts: [f32; 4]) -> Lut1 { +/// The fitted parametric curve at the default splits. +fn fitted_parametric(amounts: [f32; 4]) -> Lut1 { let mut lut = Lut1::from_fn(N, |x| regions_at(amounts, x)); monotone(&mut lut); lut } -/// The parametric curve: the measured regions at the default splits, else the analytic model of earlier processes. +/// The parametric curve: the fitted regions at the default splits, else the analytic model of earlier processes. fn parametric(c: &ToneCurve) -> Lut1 { if !default_splits(c) { return ParametricCurve::new(c).to_lut(); } - measured_parametric([c.shadows, c.darks, c.lights, c.highlights].map(|v| v as f32)) + fitted_parametric([c.shadows, c.darks, c.lights, c.highlights].map(|v| v as f32)) } -/// The parametric curve as `s`'s process renders it, for the Edit panel's graph and its drag: the measured regions +/// The parametric curve as `s`'s process renders it, for the Edit panel's graph and its drag: the fitted regions /// under V9 at the default splits, else the analytic [`ParametricCurve`] (earlier processes, and V9 with moved -/// splits). Whites is left out, as Lightroom's graph leaves it out. +/// splits). Whites is left out of the graph. #[derive(Clone, Debug)] pub struct ParametricGraph { model: ParametricCurve, - /// The measured curve, when it is the one rendered. - measured: Option, + /// The fitted curve, when it is the one rendered. + fitted: Option, } impl ParametricGraph { - /// The graph for `s`: measured when `s`'s process is V9 or later and the splits are the defaults. + /// The graph for `s`: the fitted curve when `s`'s process is V9 or later and the splits are the defaults. pub fn new(s: &DevelopSettings) -> ParametricGraph { let model = ParametricCurve::new(&s.curve); - let measured = (s.process.process() >= Process::V9 && default_splits(&s.curve)).then(|| measured_parametric(model.amounts.map(|a| a as f32))); - ParametricGraph { model, measured } + let fitted = (s.process.process() >= Process::V9 && default_splits(&s.curve)).then(|| fitted_parametric(model.amounts.map(|a| a as f32))); + ParametricGraph { model, fitted } } - /// Whether the graph is the measured curve (else the analytic one). - pub fn is_measured(&self) -> bool { - self.measured.is_some() + /// Whether the graph is the fitted curve (else the analytic one). + pub fn is_fitted(&self) -> bool { + self.fitted.is_some() } /// The curve at `x` (0 = black, 1 = white). pub fn at(&self, x: f64) -> f64 { - match &self.measured { + match &self.fitted { Some(lut) => lut.eval(if x.is_nan() { 0.0 } else { x as f32 }) as f64, None => self.model.at(x), } @@ -160,15 +146,15 @@ impl ParametricGraph { if delta == 0.0 || !delta.is_finite() { return from; } - if self.measured.is_none() { + if self.fitted.is_none() { let per_unit = self.model.level_per_unit(region, x); return if per_unit.abs() > f64::EPSILON { (from + delta / per_unit).clamp(-100.0, 100.0).round() } else { from }; } - // The measured regions are tables, not linear in the amount: search the amount that puts the drawn curve at the - // target, on the side of `from` the drag goes to (so a flat stretch never makes the slider jump back). The drawn - // curve is kept monotone, a running maximum, so its level at `x` reads the table entries up to `x`; the other + // The fitted regions are not linear in the amount: search the amount that puts the drawn curve at the target, + // on the side of `from` the drag goes to (so a flat stretch never makes the slider jump back). The drawn curve + // is kept monotone, a running maximum, so its level at `x` reads the curve's entries up to `x`; the other // regions' share of them is the same for every amount tried. - let Some(table) = t::REGIONS.get(region) else { return from }; + let Some(fit) = m::REGIONS.get(region) else { return from }; let pos = x.clamp(0.0, 1.0) as f32 * (N - 1) as f32; let j = (pos as usize).min(N - 2); let f = pos - j as f32; @@ -185,7 +171,7 @@ impl ParametricGraph { let level = |a: f64| { let (mut m, mut at) = (f32::NEG_INFINITY, [0.0f32; 2]); for (i, (g, rest)) in entries.iter().enumerate() { - m = m.max((g + rest + measured_delta(&t::REGION_AMOUNTS, table, a as f32, *g)).clamp(0.0, 1.0)); + m = m.max((g + rest + response(fit, a as f32, *g)).clamp(0.0, 1.0)); if let Some(v) = i.checked_sub(j).and_then(|k| at.get_mut(k)) { *v = m; } @@ -216,12 +202,12 @@ impl ParametricGraph { } } -/// The measured Whites curve at `amount`, or `None` at 0. +/// The fitted Whites curve at `amount`, or `None` at 0. fn whites(amount: f64) -> Option { if amount == 0.0 { return None; } - let mut lut = Lut1::from_fn(N, |x| (x + measured_delta(&t::WHITES_AMOUNTS, &t::WHITES, amount as f32, x)).clamp(0.0, 1.0)); + let mut lut = Lut1::from_fn(N, |x| (x + response(&m::WHITES, amount as f32, x)).clamp(0.0, 1.0)); monotone(&mut lut); Some(lut) } @@ -393,45 +379,44 @@ mod tests { assert_eq!(stage.base.v, crate::curve::ParametricCurve::new(&s.curve).to_lut().v); } - /// The earlier implementation, which built and sorted the keys per call. - fn measured_delta_sorted(amounts: &[f32; K], tables: &[[f32; 257]; K], amount: f32, x: f32) -> f32 { - if amount == 0.0 || K == 0 { - return 0.0; - } - // the measured amounts with 0 between the negative and positive ones - let mut keys: Vec<(f32, Option<&[f32; 257]>)> = amounts.iter().zip(tables.iter()).map(|(a, v)| (*a, Some(v))).collect(); - keys.push((0.0, None)); - keys.sort_by(|a, b| a.0.total_cmp(&b.0)); - let (lo, hi) = (keys.first().map_or(0.0, |k| k.0), keys.last().map_or(0.0, |k| k.0)); - let a = amount.clamp(lo, hi); - let at = |k: &(f32, Option<&[f32; 257]>)| k.1.map_or(0.0, |v| table_at(v, x)); - for w in keys.windows(2) { - if let [k0, k1] = w - && a >= k0.0 - && a <= k1.0 - { - let f = if k1.0 > k0.0 { (a - k0.0) / (k1.0 - k0.0) } else { 0.0 }; - return at(k0) * (1.0 - f) + at(k1) * f; + /// Every fitted response grows with its slider in the slider's direction, never acts against it, and is 0 at black, + /// at white and at amount 0; amounts beyond Β±100 act as Β±100. + #[test] + fn fitted_responses_grow_with_the_slider_and_stay_inside_black_and_white() { + let fits = std::iter::once(&m::WHITES).chain(m::REGIONS.iter()); + for (i, fit) in fits.enumerate() { + for sign in [-1.0f32, 1.0] { + for k in 0..=64 { + let x = k as f32 / 64.0; + let mut prev = 0.0f32; + for a in (0..=20).map(|j| sign * 5.0 * j as f32) { + let r = sign * response(fit, a, x); + // steadily: never back by more than a twentieth of an 8-bit level + assert!(r >= -1e-6 && r + 0.05 / 255.0 >= prev, "fit {i} at {x}, amount {a}: {r} after {prev}"); + prev = r; + } + assert_eq!(response(fit, sign * 150.0, x), response(fit, sign * 100.0, x)); + } + assert_eq!(response(fit, sign * 60.0, 0.0), 0.0); + assert_eq!(response(fit, sign * 60.0, 1.0), 0.0); } + assert_eq!(response(fit, 0.0, 0.5), 0.0); + assert_eq!(response(fit, f32::NAN, 0.5), 0.0); } - 0.0 } + /// The four regions peak in tone order: Shadows lowest, then Darks, Lights, Highlights, each one's strongest lift + /// above the one before's. #[test] - fn measured_delta_reads_the_tables_as_the_sorting_version_did() { - assert!(t::REGION_AMOUNTS.windows(2).all(|w| w[0] < w[1]) && t::WHITES_AMOUNTS.windows(2).all(|w| w[0] < w[1])); - for amount in [-150.0f32, -100.0, -80.0, -75.0, -30.0, -1.0, 0.0, 0.5, 12.0, 25.0, 60.0, 100.0, 140.0] { - for i in 0..=40 { - let x = i as f32 / 40.0; - for r in &t::REGIONS { - assert_eq!(measured_delta(&t::REGION_AMOUNTS, r, amount, x), measured_delta_sorted(&t::REGION_AMOUNTS, r, amount, x)); - } - assert_eq!( - measured_delta(&t::WHITES_AMOUNTS, &t::WHITES, amount, x), - measured_delta_sorted(&t::WHITES_AMOUNTS, &t::WHITES, amount, x) - ); - } - } + fn the_regions_peak_in_tone_order() { + let peak = |fit: &[m::Response; 2]| { + (0..=256) + .map(|k| k as f32 / 256.0) + .fold((0.0f32, 0.0f32), |b, x| if response(fit, 50.0, x) > b.1 { (x, response(fit, 50.0, x)) } else { b }) + .0 + }; + let peaks = m::REGIONS.each_ref().map(peak); + assert!(peaks.windows(2).all(|w| w[0] < w[1]), "{peaks:?}"); } /// What the graph draws is the stage's base curve, and the analytic one where the stage uses that. @@ -440,7 +425,7 @@ mod tests { let mut s = v9(); (s.curve.shadows, s.curve.darks, s.curve.lights, s.curve.highlights) = (40.0, -30.0, 25.0, -60.0); let graph = ParametricGraph::new(&s); - assert!(graph.is_measured()); + assert!(graph.is_fitted()); let stage = CurveStage::new(&s).expect("regions set"); for i in 0..=64 { let x = i as f32 / 64.0; @@ -449,16 +434,16 @@ mod tests { // moved splits and earlier processes draw the analytic curve, as they render it s.curve.split_mid = 40.0; let moved = ParametricGraph::new(&s); - assert!(!moved.is_measured()); + assert!(!moved.is_fitted()); assert_eq!(moved.at(0.6), ParametricCurve::new(&s.curve).at(0.6)); s.curve.split_mid = 50.0; let v8 = DevelopSettings { process: Process::V8.version(), ..s }; - assert!(!ParametricGraph::new(&v8).is_measured()); + assert!(!ParametricGraph::new(&v8).is_fitted()); } /// In every region, the amount a drag picks moves the drawn curve by the drag's motion. #[test] - fn a_graph_drag_puts_the_measured_curve_where_the_hand_is() { + fn a_graph_drag_puts_the_fitted_curve_where_the_hand_is() { let mut s = v9(); s.curve.darks = 30.0; let graph = ParametricGraph::new(&s); @@ -478,28 +463,32 @@ mod tests { } } - /// Where opposite regions fold the measured curve back, the drag follows the curve as drawn (held flat by the peak - /// to its left): Lights +100 and Highlights βˆ’100 fold it above 0.75. + /// Where opposite regions fold the fitted curve back, the drag follows the curve as drawn (held flat by the peak + /// to its left): Lights +80 and Highlights βˆ’100 fold it above 0.75. A region that reaches the peak moves the held + /// line with the hand; one that cannot reach it keeps its value instead of running to the end. #[test] fn a_graph_drag_follows_the_drawn_curve_where_it_is_flattened() { let mut s = v9(); - (s.curve.shadows, s.curve.darks, s.curve.lights, s.curve.highlights) = (-50.0, 100.0, 100.0, -100.0); + (s.curve.shadows, s.curve.darks, s.curve.lights, s.curve.highlights) = (-50.0, 100.0, 80.0, -100.0); let graph = ParametricGraph::new(&s); let x = 0.86; let raw = regions_at(graph.model.amounts.map(|v| v as f32), x as f32) as f64; - assert!(graph.at(x) - raw > 0.1, "the stretch is flattened, or this proves nothing: {} vs {raw}", graph.at(x)); + assert!(graph.at(x) - raw > 0.05, "the stretch is flattened, or this proves nothing: {} vs {raw}", graph.at(x)); let drawn = |region: usize, a: f64| { let mut after = s.clone(); let c = &mut after.curve; *[&mut c.shadows, &mut c.darks, &mut c.lights, &mut c.highlights][region] = a; ParametricGraph::new(&after).at(x) }; - // Lights lowers the peak that holds the line: the drawn line moves with the hand - let a = graph.dragged_amount(2, x, 100.0, -0.03); - assert!((drawn(2, a) - graph.at(x) + 0.03).abs() < 0.004, "Lights {a} moved the line {}", drawn(2, a) - graph.at(x)); - // Highlights hardly moves the held line at all, so its slider stays rather than running to the end - assert!(drawn(3, 100.0) - graph.at(x) < REACH_MIN, "Highlights cannot lift the held line"); - assert_eq!(graph.dragged_amount(3, x, -100.0, 0.03), -100.0); + for (region, delta) in [(2usize, -0.03), (3, 0.03)] { + let from = graph.amount(region); + let a = graph.dragged_amount(region, x, from, delta); + let moved = drawn(region, a) - graph.at(x); + assert!((moved - delta).abs() < 0.004, "region {region}: {from} β†’ {a} moved the line {moved}"); + } + // Shadows does not reach the peak that holds the line, so its slider stays + assert!((drawn(0, 100.0) - graph.at(x)).abs() < REACH_MIN, "Shadows cannot move the held line"); + assert_eq!(graph.dragged_amount(0, x, -50.0, 0.03), -50.0); } #[test] diff --git a/crates/pipeline/src/curve_stage_model.rs b/crates/pipeline/src/curve_stage_model.rs new file mode 100644 index 00000000000..aae839e7df8 --- /dev/null +++ b/crates/pipeline/src/curve_stage_model.rs @@ -0,0 +1,19 @@ +// Written by `tools/lr_tone_charts.py fit`: LightCraft's model of Whites and the parametric regions, fitted to the +// tool's grey-step charts (provenance in docs/curve-stage.md). Constants of the model only. + +/// One bump of a response: `[a1, a2, a3, p0, p1, q0, q1]`, gain `a1 t + a2 tΒ² + a3 tΒ³` (t = |amount| / 100), shape +/// exponents `e^(p0 + p1 t)` and `e^(q0 + q1 t)` ([`crate::curve_stage`]). +pub type Bump = [f64; 7]; +/// A slider direction's response: two bumps, added. +pub type Response = [Bump; 2]; + +/// Whites: negative, positive. +pub const WHITES: [Response; 2] = [[[-8.677986e-02, 2.059910e-02, -1.475161e-03, 1.084063e+00, -7.146165e-02, 7.463740e-01, -1.101123e+00], [-6.097932e-02, 2.162057e-02, -1.096353e-02, 1.843174e+00, 7.765309e-01, -1.820367e-01, 2.624658e-01]], [[4.491106e-02, 2.338704e-01, -4.586305e-02, 9.656835e-01, -4.030916e-01, -1.003725e+00, 5.542276e-01], [1.938421e-02, -8.766121e-02, 1.285831e-01, 4.062532e+00, -2.298370e+00, 3.928699e+00, -2.151902e+00]]]; + +/// Shadows, Darks, Lights, Highlights at the default splits (25, 50, 75): negative, positive. +pub const REGIONS: [[Response; 2]; 4] = [ + [[[-2.304904e-01, 5.397332e-01, -6.521258e-01, 5.201966e-01, -2.332761e+00, 2.029401e+00, 3.919508e-01], [2.322669e-02, -2.558633e-01, 1.479527e-01, 1.186677e+00, 5.075634e-01, 2.511894e+00, 3.430482e-01]], [[6.250307e-02, -3.253250e-03, 1.768197e-03, -5.212752e-01, -7.111264e-02, 2.313180e+00, -1.136211e-01], [6.286758e-02, 2.093856e-02, 8.466331e-03, 1.302920e+00, 1.043781e-01, 2.604516e+00, 8.384981e-02]]], + [[[2.129550e-01, -1.408218e+00, 2.309347e+00, 4.947582e-01, -1.714892e+00, 1.699307e+00, -6.420795e-01], [-5.249287e-01, 1.634143e+00, -2.399744e+00, 7.555377e-02, -1.304895e+00, 6.002093e-01, 2.401095e-01]], [[1.031476e-01, 3.281627e-02, 1.671911e-02, 5.258136e-01, 3.590506e-01, 9.760341e-01, 2.054602e-01], [6.812073e-02, 1.988377e-03, 5.246361e-03, -1.268885e+00, 1.303334e-01, 3.041567e-01, -9.264136e-02]]], + [[[-1.891098e-01, -2.287609e-02, 4.896024e-03, 1.011762e+00, -7.761107e-02, 4.262329e-02, -9.366133e-02], [-1.171421e-02, -1.146297e-02, -1.531020e-02, 1.645838e+00, 5.732118e-02, 1.456855e+00, 1.833067e-01]], [[-1.125586e-01, 1.431238e+00, -2.702337e+00, 1.792564e+00, -2.246400e-01, 4.144821e-01, -6.849247e-01], [5.280858e-01, -1.775048e+00, 2.776570e+00, 9.675963e-01, 3.076062e-01, 5.110037e-01, -9.632875e-01]]], + [[[-1.081283e-01, -3.328262e-02, -1.114034e-03, 1.725021e+00, -4.534782e-02, 8.818974e-02, -8.042736e-03], [2.358962e-02, 9.943229e-03, 1.375851e-03, 2.617848e+00, -4.358847e-02, 2.360366e+00, -4.425145e-02]], [[-6.006532e-02, 4.574089e-01, -2.733591e-01, 2.232173e+00, 5.657972e-01, 7.143387e-01, 9.022714e-01], [2.802296e-01, -7.070198e-01, 5.853124e-01, 2.094691e+00, 5.061273e-01, 7.808968e-01, -1.635143e+00]]], +]; diff --git a/crates/pipeline/src/curve_stage_tables.rs b/crates/pipeline/src/curve_stage_tables.rs deleted file mode 100644 index 768fcb7ef51..00000000000 --- a/crates/pipeline/src/curve_stage_tables.rs +++ /dev/null @@ -1,57 +0,0 @@ -// @generated by tools/lr_tone_charts.py from Camera Raw renders of its synthetic grey steps (docs/curve-stage.md). -// Output minus input of each setting on sRGB-encoded linear ProPhoto values, 257 evenly spaced inputs from 0 to 1. - -pub const WHITES_AMOUNTS: [f32; 6] = [-100.0, -50.0, -25.0, 25.0, 50.0, 100.0]; -pub static WHITES: [[f32; 257]; 6] = [ - [0.000000, 0.000000, 0.000000, -0.000115, -0.000262, -0.000282, -0.000280, -0.000241, -0.000213, -0.000216, -0.000229, -0.000303, -0.000375, -0.000435, -0.000492, -0.000540, -0.000588, -0.000634, -0.000679, -0.000739, -0.000800, -0.000869, -0.000949, -0.001028, -0.001128, -0.001240, -0.001352, -0.001477, -0.001619, -0.001762, -0.001904, -0.002002, -0.002093, -0.002185, -0.002276, -0.002425, -0.002578, -0.002731, -0.002884, -0.003029, -0.003167, -0.003305, -0.003443, -0.003582, -0.003749, -0.003925, -0.004101, -0.004276, -0.004452, -0.004625, -0.004797, -0.004968, -0.005139, -0.005311, -0.005482, -0.005703, -0.005924, -0.006145, -0.006365, -0.006586, -0.006807, -0.007026, -0.007246, -0.007466, -0.007686, -0.007906, -0.008126, -0.008373, -0.008635, -0.008897, -0.009159, -0.009421, -0.009683, -0.009945, -0.010238, -0.010534, -0.010830, -0.011127, -0.011423, -0.011719, -0.012016, -0.012349, -0.012699, -0.013049, -0.013399, -0.013749, -0.014099, -0.014449, -0.014799, -0.015189, -0.015580, -0.015970, -0.016360, -0.016750, -0.017141, -0.017531, -0.017921, -0.018365, -0.018821, -0.019277, -0.019733, -0.020189, -0.020645, -0.021101, -0.021557, -0.022017, -0.022533, -0.023050, -0.023566, -0.024083, -0.024599, -0.025116, -0.025632, -0.026149, -0.026665, -0.027240, -0.027837, -0.028434, -0.029031, -0.029627, -0.030224, -0.030821, -0.031418, -0.032015, -0.032612, -0.033245, -0.033891, -0.034538, -0.035184, -0.035830, -0.036477, -0.037123, -0.037769, -0.038416, -0.039062, -0.039694, -0.040247, -0.040800, -0.041354, -0.041907, -0.042461, -0.043014, -0.043567, -0.044121, -0.044674, -0.045228, -0.045801, -0.046389, -0.046978, -0.047567, -0.048156, -0.048744, -0.049333, -0.049922, -0.050510, -0.051099, -0.051692, -0.052335, -0.052977, -0.053620, -0.054263, -0.054905, -0.055548, -0.056190, -0.056833, -0.057476, -0.058118, -0.058807, -0.059508, -0.060209, -0.060911, -0.061612, -0.062313, -0.063014, -0.063716, -0.064417, -0.065118, -0.065860, -0.066614, -0.067368, -0.068122, -0.068877, -0.069631, -0.070385, -0.071139, -0.071894, -0.072650, -0.073448, -0.074245, -0.075042, -0.075839, -0.076636, -0.077434, -0.078231, -0.079028, -0.079825, -0.080644, -0.081470, -0.082296, -0.083121, -0.083947, -0.084772, -0.085598, -0.086424, -0.087249, -0.088070, -0.088891, -0.089713, -0.090534, -0.091355, -0.092176, -0.092997, -0.093818, -0.094591, -0.095338, -0.096086, -0.096833, -0.097581, -0.098329, -0.099076, -0.099824, -0.100370, -0.100889, -0.101407, -0.101925, -0.102443, -0.102962, -0.103480, -0.103672, -0.103685, -0.103698, -0.103711, -0.103724, -0.103737, -0.103750, -0.102762, -0.101769, -0.100777, -0.099784, -0.098791, -0.097798, -0.095053, -0.092290, -0.089527, -0.086764, -0.084001, -0.079339, -0.073815, -0.068290, -0.062766, -0.056620, -0.047795, -0.038970, -0.030145, -0.020499, -0.010248, 0.000000], - [0.000000, 0.000000, 0.000000, -0.000115, -0.000262, -0.000282, -0.000280, -0.000241, -0.000213, -0.000216, -0.000229, -0.000303, -0.000362, -0.000342, -0.000361, -0.000481, -0.000584, -0.000629, -0.000675, -0.000737, -0.000799, -0.000867, -0.000942, -0.001016, -0.001114, -0.001228, -0.001342, -0.001450, -0.001552, -0.001653, -0.001755, -0.001854, -0.001952, -0.002051, -0.002149, -0.002281, -0.002416, -0.002551, -0.002686, -0.002827, -0.002972, -0.003118, -0.003263, -0.003408, -0.003547, -0.003685, -0.003822, -0.003960, -0.004098, -0.004249, -0.004411, -0.004572, -0.004733, -0.004894, -0.005056, -0.005261, -0.005466, -0.005671, -0.005876, -0.006080, -0.006285, -0.006462, -0.006638, -0.006814, -0.006991, -0.007167, -0.007343, -0.007550, -0.007772, -0.007994, -0.008217, -0.008439, -0.008661, -0.008884, -0.009132, -0.009384, -0.009636, -0.009888, -0.010140, -0.010392, -0.010643, -0.010911, -0.011186, -0.011462, -0.011737, -0.012012, -0.012288, -0.012563, -0.012838, -0.013154, -0.013470, -0.013786, -0.014102, -0.014418, -0.014734, -0.015050, -0.015366, -0.015714, -0.016071, -0.016427, -0.016783, -0.017140, -0.017496, -0.017852, -0.018209, -0.018567, -0.018960, -0.019353, -0.019746, -0.020140, -0.020533, -0.020926, -0.021319, -0.021712, -0.022105, -0.022531, -0.022969, -0.023407, -0.023846, -0.024284, -0.024722, -0.025160, -0.025599, -0.026037, -0.026475, -0.026923, -0.027375, -0.027827, -0.028279, -0.028731, -0.029183, -0.029634, -0.030086, -0.030538, -0.030990, -0.031423, -0.031754, -0.032085, -0.032417, -0.032748, -0.033079, -0.033411, -0.033742, -0.034073, -0.034405, -0.034736, -0.035069, -0.035404, -0.035739, -0.036073, -0.036408, -0.036743, -0.037077, -0.037412, -0.037747, -0.038082, -0.038416, -0.038748, -0.039080, -0.039412, -0.039744, -0.040076, -0.040408, -0.040740, -0.041072, -0.041404, -0.041736, -0.042057, -0.042374, -0.042692, -0.043009, -0.043326, -0.043644, -0.043961, -0.044279, -0.044596, -0.044913, -0.045210, -0.045500, -0.045790, -0.046080, -0.046370, -0.046661, -0.046951, -0.047241, -0.047531, -0.047818, -0.048053, -0.048289, -0.048524, -0.048760, -0.048995, -0.049231, -0.049466, -0.049702, -0.049937, -0.050104, -0.050252, -0.050400, -0.050548, -0.050695, -0.050843, -0.050991, -0.051139, -0.051287, -0.051339, -0.051388, -0.051437, -0.051486, -0.051535, -0.051584, -0.051633, -0.051683, -0.051635, -0.051537, -0.051439, -0.051341, -0.051243, -0.051146, -0.051048, -0.050950, -0.050664, -0.050351, -0.050038, -0.049725, -0.049412, -0.049099, -0.048786, -0.048276, -0.047660, -0.047043, -0.046427, -0.045810, -0.045194, -0.044577, -0.043540, -0.042501, -0.041462, -0.040423, -0.039384, -0.038345, -0.036747, -0.035143, -0.033539, -0.031934, -0.030330, -0.028242, -0.025934, -0.023626, -0.021318, -0.018876, -0.015857, -0.012837, -0.009818, -0.006628, -0.003314, 0.000000], - [0.000000, 0.000000, 0.000000, -0.000096, -0.000224, -0.000267, -0.000245, -0.000104, -0.000027, -0.000130, -0.000228, -0.000300, -0.000357, -0.000337, -0.000338, -0.000392, -0.000441, -0.000477, -0.000512, -0.000549, -0.000585, -0.000641, -0.000721, -0.000802, -0.000869, -0.000929, -0.000988, -0.001060, -0.001151, -0.001242, -0.001332, -0.001401, -0.001466, -0.001531, -0.001596, -0.001706, -0.001818, -0.001931, -0.002044, -0.002140, -0.002224, -0.002308, -0.002392, -0.002476, -0.002571, -0.002669, -0.002768, -0.002866, -0.002964, -0.003073, -0.003190, -0.003306, -0.003423, -0.003540, -0.003656, -0.003790, -0.003925, -0.004059, -0.004193, -0.004327, -0.004461, -0.004584, -0.004706, -0.004829, -0.004952, -0.005074, -0.005197, -0.005321, -0.005447, -0.005573, -0.005698, -0.005824, -0.005950, -0.006075, -0.006233, -0.006394, -0.006556, -0.006717, -0.006879, -0.007040, -0.007202, -0.007371, -0.007545, -0.007718, -0.007891, -0.008064, -0.008238, -0.008411, -0.008584, -0.008777, -0.008969, -0.009161, -0.009354, -0.009546, -0.009739, -0.009931, -0.010123, -0.010331, -0.010542, -0.010753, -0.010964, -0.011175, -0.011386, -0.011597, -0.011808, -0.012019, -0.012243, -0.012468, -0.012692, -0.012916, -0.013140, -0.013364, -0.013588, -0.013813, -0.014037, -0.014283, -0.014536, -0.014790, -0.015044, -0.015298, -0.015552, -0.015806, -0.016060, -0.016314, -0.016568, -0.016806, -0.017038, -0.017269, -0.017501, -0.017733, -0.017965, -0.018197, -0.018429, -0.018660, -0.018892, -0.019112, -0.019271, -0.019429, -0.019587, -0.019745, -0.019904, -0.020062, -0.020220, -0.020379, -0.020537, -0.020695, -0.020846, -0.020990, -0.021135, -0.021280, -0.021425, -0.021569, -0.021714, -0.021859, -0.022004, -0.022148, -0.022292, -0.022427, -0.022561, -0.022695, -0.022830, -0.022964, -0.023098, -0.023233, -0.023367, -0.023502, -0.023636, -0.023754, -0.023867, -0.023981, -0.024094, -0.024207, -0.024321, -0.024434, -0.024548, -0.024661, -0.024774, -0.024866, -0.024951, -0.025036, -0.025121, -0.025206, -0.025292, -0.025377, -0.025462, -0.025547, -0.025629, -0.025670, -0.025711, -0.025752, -0.025793, -0.025834, -0.025875, -0.025916, -0.025957, -0.025998, -0.025998, -0.025986, -0.025975, -0.025963, -0.025951, -0.025939, -0.025928, -0.025916, -0.025904, -0.025834, -0.025762, -0.025689, -0.025617, -0.025545, -0.025473, -0.025401, -0.025328, -0.025208, -0.025064, -0.024920, -0.024775, -0.024631, -0.024487, -0.024342, -0.024198, -0.023963, -0.023714, -0.023466, -0.023217, -0.022968, -0.022720, -0.022471, -0.022140, -0.021764, -0.021387, -0.021011, -0.020634, -0.020258, -0.019881, -0.019330, -0.018779, -0.018227, -0.017676, -0.017124, -0.016573, -0.015824, -0.015074, -0.014323, -0.013572, -0.012822, -0.011889, -0.010874, -0.009859, -0.008844, -0.007785, -0.006538, -0.005290, -0.004043, -0.002728, -0.001364, 0.000000], - [0.000000, 0.000000, 0.000004, 0.000007, 0.000012, 0.000032, 0.000045, 0.000043, 0.000043, 0.000043, 0.000042, 0.000036, 0.000043, 0.000120, 0.000175, 0.000171, 0.000179, 0.000226, 0.000273, 0.000311, 0.000349, 0.000381, 0.000405, 0.000429, 0.000479, 0.000545, 0.000612, 0.000660, 0.000680, 0.000700, 0.000719, 0.000776, 0.000838, 0.000900, 0.000962, 0.001031, 0.001099, 0.001168, 0.001237, 0.001297, 0.001353, 0.001408, 0.001463, 0.001518, 0.001577, 0.001636, 0.001696, 0.001755, 0.001815, 0.001891, 0.001980, 0.002068, 0.002156, 0.002244, 0.002332, 0.002395, 0.002458, 0.002521, 0.002584, 0.002648, 0.002711, 0.002808, 0.002906, 0.003004, 0.003102, 0.003200, 0.003297, 0.003400, 0.003505, 0.003611, 0.003716, 0.003821, 0.003926, 0.004032, 0.004151, 0.004273, 0.004395, 0.004516, 0.004638, 0.004760, 0.004881, 0.005011, 0.005145, 0.005278, 0.005412, 0.005545, 0.005679, 0.005812, 0.005946, 0.006092, 0.006237, 0.006383, 0.006529, 0.006674, 0.006820, 0.006966, 0.007112, 0.007278, 0.007449, 0.007620, 0.007791, 0.007962, 0.008133, 0.008304, 0.008475, 0.008647, 0.008834, 0.009021, 0.009208, 0.009396, 0.009583, 0.009770, 0.009958, 0.010145, 0.010332, 0.010538, 0.010750, 0.010963, 0.011175, 0.011388, 0.011600, 0.011812, 0.012025, 0.012237, 0.012450, 0.012632, 0.012804, 0.012975, 0.013147, 0.013318, 0.013490, 0.013661, 0.013833, 0.014004, 0.014175, 0.014343, 0.014493, 0.014642, 0.014791, 0.014941, 0.015090, 0.015240, 0.015389, 0.015538, 0.015688, 0.015837, 0.015989, 0.016144, 0.016299, 0.016454, 0.016609, 0.016764, 0.016919, 0.017074, 0.017229, 0.017384, 0.017539, 0.017690, 0.017841, 0.017992, 0.018144, 0.018295, 0.018446, 0.018597, 0.018749, 0.018900, 0.019051, 0.019198, 0.019344, 0.019490, 0.019635, 0.019781, 0.019927, 0.020073, 0.020219, 0.020364, 0.020510, 0.020649, 0.020785, 0.020921, 0.021057, 0.021194, 0.021330, 0.021466, 0.021602, 0.021739, 0.021874, 0.021991, 0.022108, 0.022225, 0.022342, 0.022459, 0.022576, 0.022693, 0.022810, 0.022927, 0.023029, 0.023128, 0.023227, 0.023326, 0.023425, 0.023523, 0.023622, 0.023721, 0.023820, 0.023898, 0.023976, 0.024053, 0.024131, 0.024209, 0.024287, 0.024365, 0.024442, 0.024500, 0.024547, 0.024595, 0.024642, 0.024689, 0.024737, 0.024784, 0.024832, 0.024839, 0.024842, 0.024844, 0.024846, 0.024849, 0.024851, 0.024853, 0.024802, 0.024721, 0.024641, 0.024560, 0.024480, 0.024399, 0.024319, 0.024114, 0.023909, 0.023704, 0.023499, 0.023293, 0.023088, 0.022686, 0.022283, 0.021879, 0.021475, 0.021072, 0.020448, 0.019725, 0.019001, 0.018278, 0.017293, 0.015181, 0.013069, 0.010956, 0.007812, 0.003905, 0.000000], - [0.000000, 0.000074, 0.000125, 0.000231, 0.000267, 0.000269, 0.000316, 0.000448, 0.000536, 0.000503, 0.000469, 0.000429, 0.000417, 0.000552, 0.000665, 0.000728, 0.000803, 0.000921, 0.001038, 0.001193, 0.001351, 0.001497, 0.001630, 0.001762, 0.001902, 0.002047, 0.002192, 0.002339, 0.002490, 0.002641, 0.002792, 0.003019, 0.003256, 0.003493, 0.003731, 0.003912, 0.004089, 0.004267, 0.004444, 0.004658, 0.004898, 0.005139, 0.005379, 0.005619, 0.005873, 0.006130, 0.006388, 0.006645, 0.006902, 0.007164, 0.007429, 0.007694, 0.007959, 0.008224, 0.008489, 0.008774, 0.009058, 0.009343, 0.009628, 0.009912, 0.010197, 0.010532, 0.010867, 0.011202, 0.011538, 0.011873, 0.012208, 0.012575, 0.012959, 0.013343, 0.013727, 0.014111, 0.014495, 0.014879, 0.015296, 0.015716, 0.016137, 0.016557, 0.016978, 0.017398, 0.017819, 0.018281, 0.018764, 0.019247, 0.019729, 0.020212, 0.020694, 0.021177, 0.021660, 0.022208, 0.022756, 0.023304, 0.023852, 0.024401, 0.024949, 0.025497, 0.026045, 0.026634, 0.027233, 0.027832, 0.028430, 0.029029, 0.029628, 0.030227, 0.030825, 0.031429, 0.032111, 0.032793, 0.033474, 0.034156, 0.034838, 0.035520, 0.036201, 0.036883, 0.037565, 0.038266, 0.038975, 0.039684, 0.040393, 0.041102, 0.041811, 0.042520, 0.043228, 0.043937, 0.044646, 0.045200, 0.045698, 0.046195, 0.046693, 0.047190, 0.047688, 0.048186, 0.048683, 0.049181, 0.049679, 0.050172, 0.050642, 0.051112, 0.051581, 0.052051, 0.052521, 0.052991, 0.053460, 0.053930, 0.054400, 0.054870, 0.055335, 0.055795, 0.056256, 0.056717, 0.057178, 0.057639, 0.058099, 0.058560, 0.059021, 0.059482, 0.059940, 0.060371, 0.060802, 0.061232, 0.061663, 0.062094, 0.062525, 0.062955, 0.063386, 0.063817, 0.064247, 0.064643, 0.065028, 0.065414, 0.065800, 0.066185, 0.066571, 0.066957, 0.067342, 0.067728, 0.068114, 0.068443, 0.068753, 0.069064, 0.069374, 0.069685, 0.069995, 0.070306, 0.070616, 0.070927, 0.071233, 0.071471, 0.071709, 0.071946, 0.072184, 0.072422, 0.072660, 0.072897, 0.073135, 0.073373, 0.073549, 0.073708, 0.073868, 0.074027, 0.074186, 0.074346, 0.074505, 0.074664, 0.074823, 0.074873, 0.074920, 0.074966, 0.075013, 0.075059, 0.075106, 0.075152, 0.075199, 0.075137, 0.075020, 0.074903, 0.074786, 0.074670, 0.074553, 0.074436, 0.074319, 0.073978, 0.073606, 0.073233, 0.072861, 0.072488, 0.072115, 0.071743, 0.071119, 0.070356, 0.069593, 0.068831, 0.068068, 0.067306, 0.066543, 0.065205, 0.063864, 0.062523, 0.061182, 0.059841, 0.058501, 0.055362, 0.052205, 0.049048, 0.045891, 0.042734, 0.039062, 0.035155, 0.031249, 0.027343, 0.023437, 0.019530, 0.015624, 0.011718, 0.007812, 0.003905, 0.000000], - [0.000000, 0.000500, 0.001050, 0.001608, 0.002124, 0.002641, 0.003061, 0.003303, 0.003534, 0.003731, 0.003895, 0.003860, 0.003920, 0.004480, 0.005071, 0.005740, 0.006429, 0.007182, 0.007935, 0.008852, 0.009777, 0.010736, 0.011738, 0.012740, 0.013790, 0.014871, 0.015953, 0.017110, 0.018378, 0.019646, 0.020914, 0.022253, 0.023603, 0.024952, 0.026301, 0.027757, 0.029220, 0.030684, 0.032148, 0.033662, 0.035214, 0.036765, 0.038316, 0.039868, 0.041479, 0.043107, 0.044734, 0.046362, 0.047990, 0.049693, 0.051446, 0.053199, 0.054951, 0.056704, 0.058458, 0.060353, 0.062248, 0.064143, 0.066038, 0.067933, 0.069828, 0.071984, 0.074141, 0.076298, 0.078455, 0.080612, 0.082769, 0.085098, 0.087516, 0.089934, 0.092353, 0.094771, 0.097190, 0.099608, 0.102268, 0.104958, 0.107648, 0.110338, 0.113028, 0.115718, 0.118408, 0.121306, 0.124302, 0.127299, 0.130295, 0.133292, 0.136288, 0.139284, 0.142281, 0.145455, 0.148629, 0.151804, 0.154979, 0.158153, 0.161328, 0.164503, 0.167677, 0.170547, 0.173344, 0.176141, 0.178938, 0.181735, 0.184532, 0.187329, 0.190126, 0.192895, 0.195221, 0.197546, 0.199871, 0.202196, 0.204522, 0.206847, 0.209172, 0.211497, 0.213823, 0.215741, 0.217504, 0.219267, 0.221030, 0.222793, 0.224556, 0.226319, 0.228082, 0.229845, 0.231608, 0.232962, 0.234169, 0.235376, 0.236582, 0.237789, 0.238996, 0.240202, 0.241409, 0.242616, 0.243822, 0.244972, 0.245824, 0.246675, 0.247527, 0.248378, 0.249229, 0.250081, 0.250932, 0.251784, 0.252635, 0.253487, 0.254150, 0.254663, 0.255176, 0.255689, 0.256201, 0.256714, 0.257227, 0.257740, 0.258253, 0.258766, 0.259249, 0.259381, 0.259513, 0.259645, 0.259777, 0.259909, 0.260041, 0.260173, 0.260305, 0.260437, 0.260570, 0.260342, 0.260015, 0.259689, 0.259363, 0.259036, 0.258710, 0.258383, 0.258057, 0.257731, 0.257404, 0.256644, 0.255745, 0.254845, 0.253946, 0.253046, 0.252147, 0.251248, 0.250348, 0.249449, 0.248501, 0.246825, 0.245149, 0.243472, 0.241796, 0.240119, 0.238443, 0.236767, 0.235090, 0.233414, 0.230383, 0.226974, 0.223565, 0.220155, 0.216746, 0.213337, 0.209928, 0.206518, 0.203109, 0.199218, 0.195312, 0.191405, 0.187499, 0.183593, 0.179687, 0.175780, 0.171874, 0.167968, 0.164062, 0.160155, 0.156249, 0.152343, 0.148437, 0.144530, 0.140624, 0.136718, 0.132812, 0.128905, 0.124999, 0.121093, 0.117187, 0.113280, 0.109374, 0.105468, 0.101562, 0.097655, 0.093749, 0.089843, 0.085937, 0.082030, 0.078124, 0.074218, 0.070312, 0.066405, 0.062499, 0.058593, 0.054687, 0.050780, 0.046874, 0.042968, 0.039062, 0.035155, 0.031249, 0.027343, 0.023437, 0.019530, 0.015624, 0.011718, 0.007812, 0.003905, 0.000000], -]; - -/// Shadows, Darks, Lights, Highlights at the default splits (25, 50, 75). -pub const REGION_AMOUNTS: [f32; 8] = [-100.0, -75.0, -50.0, -25.0, 25.0, 50.0, 75.0, 100.0]; -pub static REGIONS: [[[f32; 257]; 8]; 4] = [ - [ - [0.000000, -0.003906, -0.007812, -0.011719, -0.015625, -0.019531, -0.023438, -0.027344, -0.031250, -0.035156, -0.039062, -0.042969, -0.046875, -0.050781, -0.054687, -0.058593, -0.062499, -0.066404, -0.070310, -0.074214, -0.078119, -0.082020, -0.085917, -0.089814, -0.093689, -0.097549, -0.101408, -0.105222, -0.108969, -0.112716, -0.116463, -0.119858, -0.123204, -0.126550, -0.129896, -0.132087, -0.134192, -0.136297, -0.138402, -0.139029, -0.138591, -0.138153, -0.137715, -0.137277, -0.136208, -0.134968, -0.133728, -0.132488, -0.131248, -0.130007, -0.128764, -0.127522, -0.126280, -0.125038, -0.123793, -0.122191, -0.120589, -0.118988, -0.117386, -0.115784, -0.114182, -0.112299, -0.110414, -0.108530, -0.106645, -0.104760, -0.102875, -0.100853, -0.098758, -0.096664, -0.094569, -0.092474, -0.090380, -0.088285, -0.086074, -0.083848, -0.081623, -0.079397, -0.077171, -0.074945, -0.072719, -0.070470, -0.068210, -0.065950, -0.063690, -0.061429, -0.059169, -0.056909, -0.054648, -0.052496, -0.050343, -0.048191, -0.046039, -0.043887, -0.041734, -0.039582, -0.037430, -0.035503, -0.033629, -0.031756, -0.029882, -0.028009, -0.026135, -0.024262, -0.022388, -0.020543, -0.019148, -0.017753, -0.016358, -0.014963, -0.013569, -0.012174, -0.010779, -0.009384, -0.007989, -0.007096, -0.006394, -0.005692, -0.004989, -0.004287, -0.003585, -0.002883, -0.002181, -0.001479, -0.000777, -0.000550, -0.000494, -0.000438, -0.000382, -0.000326, -0.000270, -0.000214, -0.000159, -0.000103, -0.000047, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000], - [0.000000, -0.003906, -0.007810, -0.011714, -0.015617, -0.019520, -0.023420, -0.027317, -0.031213, -0.035106, -0.038996, -0.042869, -0.046738, -0.050579, -0.054409, -0.058210, -0.061993, -0.065718, -0.069443, -0.072985, -0.076518, -0.079914, -0.083141, -0.086369, -0.089272, -0.091958, -0.094644, -0.096916, -0.098582, -0.100248, -0.101914, -0.102339, -0.102591, -0.102842, -0.103094, -0.102809, -0.102485, -0.102160, -0.101836, -0.101648, -0.101559, -0.101469, -0.101380, -0.101290, -0.100926, -0.100488, -0.100049, -0.099610, -0.099171, -0.098507, -0.097696, -0.096884, -0.096073, -0.095261, -0.094447, -0.093356, -0.092265, -0.091174, -0.090084, -0.088993, -0.087902, -0.086539, -0.085174, -0.083810, -0.082445, -0.081080, -0.079715, -0.078211, -0.076633, -0.075055, -0.073477, -0.071899, -0.070321, -0.068743, -0.067045, -0.065333, -0.063620, -0.061908, -0.060195, -0.058482, -0.056770, -0.055028, -0.053272, -0.051517, -0.049761, -0.048005, -0.046250, -0.044494, -0.042738, -0.041056, -0.039375, -0.037694, -0.036012, -0.034331, -0.032650, -0.030969, -0.029287, -0.027782, -0.026319, -0.024855, -0.023392, -0.021929, -0.020466, -0.019003, -0.017539, -0.016098, -0.015009, -0.013919, -0.012830, -0.011740, -0.010651, -0.009561, -0.008472, -0.007382, -0.006293, -0.005591, -0.005039, -0.004486, -0.003933, -0.003380, -0.002827, -0.002274, -0.001722, -0.001169, -0.000616, -0.000437, -0.000392, -0.000348, -0.000304, -0.000259, -0.000215, -0.000170, -0.000126, -0.000082, -0.000037, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000], - [0.000000, -0.003889, -0.007766, -0.011628, -0.015484, -0.019325, -0.023153, -0.026956, -0.030743, -0.034487, -0.038207, -0.041789, -0.045327, -0.048632, -0.051842, -0.054816, -0.057642, -0.059991, -0.062341, -0.063894, -0.065409, -0.066430, -0.066845, -0.067260, -0.067075, -0.066490, -0.065904, -0.065464, -0.065235, -0.065006, -0.064777, -0.064648, -0.064532, -0.064417, -0.064302, -0.063994, -0.063672, -0.063350, -0.063027, -0.062616, -0.062141, -0.061666, -0.061190, -0.060715, -0.060164, -0.059592, -0.059020, -0.058449, -0.057877, -0.057219, -0.056506, -0.055792, -0.055079, -0.054365, -0.053651, -0.052854, -0.052057, -0.051260, -0.050464, -0.049667, -0.048870, -0.047994, -0.047118, -0.046242, -0.045365, -0.044489, -0.043613, -0.042704, -0.041779, -0.040854, -0.039928, -0.039003, -0.038078, -0.037152, -0.036206, -0.035257, -0.034309, -0.033360, -0.032411, -0.031463, -0.030514, -0.029568, -0.028622, -0.027676, -0.026731, -0.025785, -0.024839, -0.023894, -0.022948, -0.022057, -0.021166, -0.020276, -0.019385, -0.018494, -0.017603, -0.016712, -0.015821, -0.015026, -0.014254, -0.013482, -0.012710, -0.011938, -0.011166, -0.010394, -0.009622, -0.008861, -0.008269, -0.007678, -0.007087, -0.006495, -0.005904, -0.005312, -0.004721, -0.004129, -0.003538, -0.003150, -0.002841, -0.002531, -0.002221, -0.001912, -0.001602, -0.001292, -0.000983, -0.000673, -0.000363, -0.000262, -0.000235, -0.000209, -0.000182, -0.000155, -0.000129, -0.000102, -0.000076, -0.000049, -0.000022, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000], - [0.000000, -0.003216, -0.006332, -0.009343, -0.012326, -0.015215, -0.018012, -0.020640, -0.023188, -0.025512, -0.027735, -0.029351, -0.030826, -0.031553, -0.032123, -0.032295, -0.032353, -0.032045, -0.031737, -0.032000, -0.032289, -0.032629, -0.033031, -0.033434, -0.033802, -0.034148, -0.034493, -0.034792, -0.035021, -0.035251, -0.035480, -0.035605, -0.035715, -0.035825, -0.035935, -0.035913, -0.035882, -0.035851, -0.035820, -0.035735, -0.035609, -0.035484, -0.035359, -0.035234, -0.035025, -0.034794, -0.034563, -0.034332, -0.034101, -0.033801, -0.033455, -0.033109, -0.032763, -0.032417, -0.032070, -0.031651, -0.031232, -0.030812, -0.030393, -0.029974, -0.029555, -0.029057, -0.028559, -0.028061, -0.027563, -0.027065, -0.026567, -0.026037, -0.025490, -0.024943, -0.024396, -0.023849, -0.023303, -0.022756, -0.022183, -0.021607, -0.021032, -0.020456, -0.019880, -0.019304, -0.018729, -0.018149, -0.017566, -0.016984, -0.016402, -0.015820, -0.015238, -0.014655, -0.014073, -0.013525, -0.012977, -0.012429, -0.011880, -0.011332, -0.010784, -0.010236, -0.009688, -0.009199, -0.008724, -0.008250, -0.007775, -0.007301, -0.006826, -0.006352, -0.005877, -0.005409, -0.005050, -0.004690, -0.004331, -0.003971, -0.003612, -0.003253, -0.002893, -0.002534, -0.002174, -0.001938, -0.001748, -0.001559, -0.001369, -0.001180, -0.000990, -0.000801, -0.000611, -0.000422, -0.000232, -0.000169, -0.000152, -0.000135, -0.000118, -0.000101, -0.000083, -0.000066, -0.000049, -0.000032, -0.000014, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000], - [0.000000, 0.003646, 0.006659, 0.009375, 0.011731, 0.013420, 0.014676, 0.015142, 0.015370, 0.014932, 0.014561, 0.014594, 0.014704, 0.015220, 0.015721, 0.016189, 0.016651, 0.017095, 0.017538, 0.017972, 0.018404, 0.018805, 0.019166, 0.019527, 0.019867, 0.020193, 0.020519, 0.020826, 0.021106, 0.021387, 0.021667, 0.021886, 0.022098, 0.022309, 0.022520, 0.022666, 0.022807, 0.022948, 0.023088, 0.023182, 0.023242, 0.023302, 0.023362, 0.023422, 0.023400, 0.023355, 0.023310, 0.023265, 0.023221, 0.023123, 0.022990, 0.022858, 0.022725, 0.022592, 0.022459, 0.022224, 0.021989, 0.021754, 0.021519, 0.021284, 0.021049, 0.020741, 0.020433, 0.020124, 0.019816, 0.019508, 0.019199, 0.018846, 0.018470, 0.018094, 0.017718, 0.017341, 0.016965, 0.016589, 0.016177, 0.015761, 0.015345, 0.014929, 0.014513, 0.014097, 0.013681, 0.013261, 0.012839, 0.012416, 0.011994, 0.011572, 0.011150, 0.010728, 0.010306, 0.009902, 0.009498, 0.009094, 0.008689, 0.008285, 0.007881, 0.007477, 0.007073, 0.006710, 0.006356, 0.006003, 0.005650, 0.005297, 0.004943, 0.004590, 0.004237, 0.003889, 0.003626, 0.003364, 0.003102, 0.002840, 0.002577, 0.002315, 0.002053, 0.001791, 0.001528, 0.001357, 0.001221, 0.001085, 0.000948, 0.000812, 0.000676, 0.000540, 0.000404, 0.000267, 0.000131, 0.000088, 0.000079, 0.000070, 0.000061, 0.000052, 0.000043, 0.000034, 0.000026, 0.000017, 0.000008, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000], - [0.000000, 0.009101, 0.016045, 0.021283, 0.025025, 0.026425, 0.027479, 0.027901, 0.028224, 0.028275, 0.028387, 0.028865, 0.029436, 0.030492, 0.031508, 0.032421, 0.033364, 0.034399, 0.035435, 0.036317, 0.037192, 0.038050, 0.038889, 0.039728, 0.040518, 0.041276, 0.042034, 0.042754, 0.043416, 0.044078, 0.044741, 0.045302, 0.045849, 0.046396, 0.046943, 0.047349, 0.047744, 0.048140, 0.048536, 0.048827, 0.049044, 0.049260, 0.049476, 0.049693, 0.049744, 0.049751, 0.049758, 0.049765, 0.049772, 0.049646, 0.049434, 0.049222, 0.049010, 0.048798, 0.048584, 0.048137, 0.047690, 0.047243, 0.046796, 0.046348, 0.045901, 0.045257, 0.044610, 0.043964, 0.043318, 0.042672, 0.042026, 0.041275, 0.040470, 0.039665, 0.038860, 0.038055, 0.037250, 0.036444, 0.035538, 0.034620, 0.033702, 0.032783, 0.031865, 0.030947, 0.030028, 0.029095, 0.028155, 0.027215, 0.026275, 0.025335, 0.024395, 0.023455, 0.022515, 0.021619, 0.020723, 0.019827, 0.018931, 0.018034, 0.017138, 0.016242, 0.015346, 0.014552, 0.013783, 0.013014, 0.012245, 0.011476, 0.010707, 0.009938, 0.009168, 0.008411, 0.007845, 0.007278, 0.006712, 0.006145, 0.005579, 0.005012, 0.004445, 0.003879, 0.003312, 0.002945, 0.002654, 0.002363, 0.002071, 0.001780, 0.001489, 0.001198, 0.000906, 0.000615, 0.000324, 0.000229, 0.000206, 0.000183, 0.000159, 0.000136, 0.000113, 0.000090, 0.000066, 0.000043, 0.000020, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000], - [0.000000, 0.016424, 0.026872, 0.032718, 0.036179, 0.037852, 0.039251, 0.040147, 0.040939, 0.041440, 0.042015, 0.043039, 0.044157, 0.045770, 0.047360, 0.048891, 0.050438, 0.052038, 0.053639, 0.055094, 0.056543, 0.057972, 0.059376, 0.060780, 0.062128, 0.063438, 0.064749, 0.066005, 0.067181, 0.068356, 0.069532, 0.070566, 0.071581, 0.072595, 0.073610, 0.074423, 0.075221, 0.076019, 0.076817, 0.077447, 0.077957, 0.078467, 0.078977, 0.079487, 0.079717, 0.079872, 0.080026, 0.080181, 0.080336, 0.080261, 0.080036, 0.079811, 0.079586, 0.079361, 0.079132, 0.078488, 0.077845, 0.077201, 0.076558, 0.075914, 0.075270, 0.074259, 0.073245, 0.072231, 0.071217, 0.070203, 0.069189, 0.067969, 0.066640, 0.065312, 0.063983, 0.062655, 0.061327, 0.059998, 0.058504, 0.056989, 0.055474, 0.053959, 0.052444, 0.050929, 0.049414, 0.047861, 0.046290, 0.044719, 0.043148, 0.041577, 0.040006, 0.038435, 0.036864, 0.035383, 0.033902, 0.032421, 0.030940, 0.029460, 0.027979, 0.026498, 0.025017, 0.023711, 0.022447, 0.021184, 0.019920, 0.018656, 0.017392, 0.016128, 0.014864, 0.013620, 0.012702, 0.011785, 0.010867, 0.009949, 0.009031, 0.008113, 0.007195, 0.006278, 0.005360, 0.004765, 0.004294, 0.003823, 0.003353, 0.002882, 0.002411, 0.001940, 0.001469, 0.000998, 0.000527, 0.000374, 0.000336, 0.000298, 0.000260, 0.000222, 0.000184, 0.000146, 0.000108, 0.000070, 0.000032, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000], - [0.000000, 0.025013, 0.036949, 0.042838, 0.046705, 0.048947, 0.050910, 0.052362, 0.053694, 0.054690, 0.055763, 0.057303, 0.058964, 0.061264, 0.063530, 0.065707, 0.067897, 0.070128, 0.072358, 0.074526, 0.076691, 0.078814, 0.080885, 0.082956, 0.084966, 0.086934, 0.088903, 0.090823, 0.092674, 0.094525, 0.096376, 0.098048, 0.099696, 0.101343, 0.102991, 0.104385, 0.105761, 0.107137, 0.108512, 0.109656, 0.110634, 0.111611, 0.112588, 0.113565, 0.114129, 0.114580, 0.115032, 0.115483, 0.115935, 0.116025, 0.115879, 0.115733, 0.115587, 0.115441, 0.115289, 0.114462, 0.113635, 0.112808, 0.111982, 0.111155, 0.110328, 0.108885, 0.107438, 0.105990, 0.104543, 0.103096, 0.101648, 0.099869, 0.097916, 0.095962, 0.094009, 0.092055, 0.090102, 0.088148, 0.085917, 0.083652, 0.081387, 0.079122, 0.076857, 0.074592, 0.072327, 0.070013, 0.067676, 0.065339, 0.063001, 0.060664, 0.058327, 0.055990, 0.053653, 0.051465, 0.049278, 0.047092, 0.044905, 0.042718, 0.040531, 0.038344, 0.036158, 0.034252, 0.032414, 0.030575, 0.028737, 0.026898, 0.025060, 0.023222, 0.021383, 0.019575, 0.018249, 0.016923, 0.015598, 0.014272, 0.012946, 0.011621, 0.010295, 0.008969, 0.007644, 0.006791, 0.006119, 0.005447, 0.004775, 0.004103, 0.003431, 0.002759, 0.002087, 0.001415, 0.000743, 0.000525, 0.000472, 0.000418, 0.000365, 0.000312, 0.000258, 0.000205, 0.000152, 0.000098, 0.000045, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000], - ], - [ - [0.000000, -0.003906, -0.007812, -0.011719, -0.015625, -0.019531, -0.023438, -0.027344, -0.031250, -0.035156, -0.039062, -0.042969, -0.046875, -0.050781, -0.054688, -0.058594, -0.062500, -0.066406, -0.070312, -0.074219, -0.078125, -0.082031, -0.085938, -0.089844, -0.093750, -0.097656, -0.101562, -0.105469, -0.109375, -0.113281, -0.117187, -0.121093, -0.124999, -0.128906, -0.132812, -0.136717, -0.140621, -0.144526, -0.148431, -0.152333, -0.156234, -0.160135, -0.164036, -0.167937, -0.171819, -0.175697, -0.179574, -0.183452, -0.187329, -0.191141, -0.194911, -0.198680, -0.202449, -0.206219, -0.209984, -0.213377, -0.216770, -0.220162, -0.223555, -0.226947, -0.230340, -0.232560, -0.234772, -0.236984, -0.239196, -0.241409, -0.243621, -0.244545, -0.244792, -0.245038, -0.245285, -0.245532, -0.245779, -0.246025, -0.246172, -0.246307, -0.246442, -0.246576, -0.246711, -0.246845, -0.246980, -0.246882, -0.246673, -0.246464, -0.246254, -0.246045, -0.245836, -0.245627, -0.245418, -0.244803, -0.244185, -0.243568, -0.242951, -0.242334, -0.241716, -0.241099, -0.240482, -0.239553, -0.238550, -0.237547, -0.236544, -0.235540, -0.234537, -0.233534, -0.232531, -0.231509, -0.230200, -0.228890, -0.227580, -0.226271, -0.224961, -0.223651, -0.222342, -0.221032, -0.219723, -0.218225, -0.216656, -0.215087, -0.213517, -0.211948, -0.210379, -0.208810, -0.207241, -0.205671, -0.204102, -0.202374, -0.200589, -0.198804, -0.197019, -0.195235, -0.193450, -0.191665, -0.189880, -0.188095, -0.186310, -0.184500, -0.182559, -0.180619, -0.178678, -0.176738, -0.174798, -0.172857, -0.170917, -0.168976, -0.167036, -0.165095, -0.163099, -0.161058, -0.159017, -0.156976, -0.154936, -0.152895, -0.150854, -0.148813, -0.146772, -0.144731, -0.142686, -0.140594, -0.138502, -0.136410, -0.134318, -0.132226, -0.130134, -0.128042, -0.125950, -0.123858, -0.121766, -0.119682, -0.117600, -0.115518, -0.113436, -0.111355, -0.109273, -0.107191, -0.105109, -0.103027, -0.100945, -0.098905, -0.096878, -0.094851, -0.092824, -0.090797, -0.088770, -0.086743, -0.084717, -0.082690, -0.080669, -0.078748, -0.076826, -0.074905, -0.072983, -0.071062, -0.069140, -0.067219, -0.065297, -0.063375, -0.061571, -0.059799, -0.058027, -0.056255, -0.054484, -0.052712, -0.050940, -0.049168, -0.047396, -0.045808, -0.044226, -0.042644, -0.041063, -0.039481, -0.037899, -0.036317, -0.034735, -0.033291, -0.031918, -0.030545, -0.029173, -0.027800, -0.026427, -0.025054, -0.023681, -0.022501, -0.021348, -0.020196, -0.019043, -0.017890, -0.016738, -0.015585, -0.014581, -0.013657, -0.012734, -0.011811, -0.010888, -0.009964, -0.009041, -0.008335, -0.007630, -0.006925, -0.006220, -0.005514, -0.004809, -0.004309, -0.003811, -0.003313, -0.002815, -0.002317, -0.001941, -0.001619, -0.001297, -0.000976, -0.000683, -0.000518, -0.000353, -0.000188, -0.000092, -0.000046, 0.000000], - [0.000000, -0.003906, -0.007812, -0.011717, -0.015622, -0.019528, -0.023434, -0.027338, -0.031242, -0.035145, -0.039048, -0.042950, -0.046852, -0.050752, -0.054650, -0.058542, -0.062434, -0.066322, -0.070211, -0.074086, -0.077960, -0.081820, -0.085661, -0.089502, -0.093311, -0.097100, -0.100888, -0.104624, -0.108282, -0.111941, -0.115599, -0.119092, -0.122562, -0.126032, -0.129502, -0.132580, -0.135629, -0.138678, -0.141728, -0.144400, -0.146802, -0.149204, -0.151605, -0.154007, -0.155625, -0.157031, -0.158436, -0.159842, -0.161247, -0.162285, -0.163082, -0.163880, -0.164677, -0.165474, -0.166274, -0.167365, -0.168456, -0.169547, -0.170638, -0.171729, -0.172819, -0.173662, -0.174504, -0.175345, -0.176186, -0.177028, -0.177869, -0.178537, -0.179113, -0.179690, -0.180267, -0.180843, -0.181420, -0.181997, -0.182333, -0.182640, -0.182947, -0.183253, -0.183560, -0.183867, -0.184174, -0.184268, -0.184262, -0.184256, -0.184250, -0.184244, -0.184238, -0.184232, -0.184226, -0.183930, -0.183633, -0.183336, -0.183039, -0.182742, -0.182445, -0.182148, -0.181851, -0.181319, -0.180731, -0.180143, -0.179554, -0.178966, -0.178378, -0.177789, -0.177201, -0.176597, -0.175739, -0.174881, -0.174023, -0.173166, -0.172308, -0.171450, -0.170592, -0.169734, -0.168876, -0.167842, -0.166740, -0.165638, -0.164537, -0.163435, -0.162333, -0.161232, -0.160130, -0.159028, -0.157927, -0.156676, -0.155371, -0.154066, -0.152762, -0.151457, -0.150152, -0.148847, -0.147543, -0.146238, -0.144933, -0.143603, -0.142137, -0.140671, -0.139205, -0.137739, -0.136274, -0.134808, -0.133342, -0.131876, -0.130410, -0.128944, -0.127420, -0.125848, -0.124276, -0.122704, -0.121133, -0.119561, -0.117989, -0.116417, -0.114845, -0.113274, -0.111698, -0.110072, -0.108446, -0.106820, -0.105194, -0.103568, -0.101942, -0.100316, -0.098690, -0.097064, -0.095438, -0.093809, -0.092180, -0.090550, -0.088921, -0.087291, -0.085662, -0.084032, -0.082403, -0.080773, -0.079144, -0.077546, -0.075959, -0.074372, -0.072785, -0.071198, -0.069611, -0.068024, -0.066437, -0.064850, -0.063268, -0.061761, -0.060254, -0.058748, -0.057241, -0.055735, -0.054228, -0.052722, -0.051215, -0.049709, -0.048298, -0.046915, -0.045531, -0.044148, -0.042764, -0.041380, -0.039997, -0.038613, -0.037230, -0.035986, -0.034747, -0.033507, -0.032268, -0.031029, -0.029789, -0.028550, -0.027310, -0.026179, -0.025103, -0.024027, -0.022951, -0.021875, -0.020798, -0.019722, -0.018646, -0.017719, -0.016812, -0.015906, -0.014999, -0.014093, -0.013186, -0.012280, -0.011490, -0.010765, -0.010040, -0.009316, -0.008591, -0.007866, -0.007141, -0.006584, -0.006028, -0.005472, -0.004916, -0.004360, -0.003804, -0.003410, -0.003017, -0.002625, -0.002233, -0.001840, -0.001542, -0.001286, -0.001030, -0.000774, -0.000541, -0.000410, -0.000279, -0.000148, -0.000072, -0.000036, 0.000000], - [0.000000, -0.003896, -0.007794, -0.011686, -0.015574, -0.019462, -0.023345, -0.027217, -0.031086, -0.034947, -0.038802, -0.042626, -0.046444, -0.050238, -0.054009, -0.057720, -0.061406, -0.065011, -0.068615, -0.072035, -0.075446, -0.078709, -0.081790, -0.084872, -0.087704, -0.090369, -0.093035, -0.095368, -0.097214, -0.099060, -0.100906, -0.101989, -0.102964, -0.103939, -0.104914, -0.105335, -0.105714, -0.106094, -0.106474, -0.107069, -0.107820, -0.108570, -0.109321, -0.110071, -0.110713, -0.111326, -0.111938, -0.112550, -0.113163, -0.113641, -0.114032, -0.114423, -0.114814, -0.115205, -0.115595, -0.115822, -0.116050, -0.116277, -0.116505, -0.116732, -0.116960, -0.116991, -0.117021, -0.117052, -0.117082, -0.117112, -0.117142, -0.117070, -0.116945, -0.116820, -0.116695, -0.116570, -0.116444, -0.116319, -0.116069, -0.115804, -0.115539, -0.115274, -0.115009, -0.114743, -0.114478, -0.114121, -0.113720, -0.113318, -0.112917, -0.112516, -0.112114, -0.111713, -0.111312, -0.110791, -0.110269, -0.109748, -0.109226, -0.108704, -0.108183, -0.107661, -0.107140, -0.106545, -0.105933, -0.105321, -0.104709, -0.104096, -0.103484, -0.102872, -0.102260, -0.101643, -0.100944, -0.100245, -0.099546, -0.098846, -0.098147, -0.097448, -0.096749, -0.096050, -0.095351, -0.094604, -0.093838, -0.093073, -0.092308, -0.091542, -0.090777, -0.090012, -0.089246, -0.088481, -0.087716, -0.086909, -0.086088, -0.085266, -0.084445, -0.083623, -0.082802, -0.081980, -0.081159, -0.080337, -0.079516, -0.078688, -0.077828, -0.076968, -0.076109, -0.075249, -0.074389, -0.073529, -0.072669, -0.071810, -0.070950, -0.070090, -0.069215, -0.068328, -0.067441, -0.066554, -0.065667, -0.064781, -0.063894, -0.063007, -0.062120, -0.061233, -0.060346, -0.059456, -0.058566, -0.057676, -0.056786, -0.055896, -0.055006, -0.054116, -0.053226, -0.052336, -0.051447, -0.050570, -0.049697, -0.048824, -0.047950, -0.047077, -0.046204, -0.045331, -0.044458, -0.043585, -0.042712, -0.041861, -0.041019, -0.040176, -0.039333, -0.038490, -0.037647, -0.036804, -0.035962, -0.035119, -0.034279, -0.033476, -0.032674, -0.031871, -0.031069, -0.030266, -0.029463, -0.028661, -0.027858, -0.027056, -0.026307, -0.025573, -0.024839, -0.024105, -0.023371, -0.022638, -0.021904, -0.021170, -0.020436, -0.019767, -0.019101, -0.018435, -0.017768, -0.017102, -0.016435, -0.015769, -0.015102, -0.014491, -0.013909, -0.013326, -0.012744, -0.012161, -0.011579, -0.010996, -0.010414, -0.009906, -0.009408, -0.008910, -0.008412, -0.007914, -0.007417, -0.006919, -0.006483, -0.006081, -0.005679, -0.005277, -0.004875, -0.004473, -0.004071, -0.003755, -0.003438, -0.003122, -0.002806, -0.002490, -0.002174, -0.001953, -0.001733, -0.001512, -0.001292, -0.001072, -0.000900, -0.000750, -0.000601, -0.000451, -0.000316, -0.000241, -0.000165, -0.000090, -0.000045, -0.000023, 0.000000], - [0.000000, -0.003245, -0.006451, -0.009562, -0.012604, -0.015620, -0.018545, -0.021305, -0.024020, -0.026613, -0.029128, -0.031179, -0.033102, -0.034352, -0.035460, -0.036218, -0.036875, -0.037210, -0.037546, -0.037927, -0.038310, -0.038883, -0.039689, -0.040494, -0.041371, -0.042295, -0.043219, -0.044099, -0.044914, -0.045729, -0.046543, -0.047334, -0.048121, -0.048909, -0.049696, -0.050409, -0.051117, -0.051824, -0.052532, -0.053184, -0.053796, -0.054408, -0.055020, -0.055632, -0.056188, -0.056729, -0.057271, -0.057812, -0.058353, -0.058826, -0.059254, -0.059683, -0.060111, -0.060540, -0.060967, -0.061309, -0.061650, -0.061992, -0.062333, -0.062675, -0.063016, -0.063236, -0.063455, -0.063673, -0.063892, -0.064110, -0.064329, -0.064479, -0.064594, -0.064708, -0.064823, -0.064937, -0.065051, -0.065166, -0.065188, -0.065199, -0.065210, -0.065221, -0.065232, -0.065243, -0.065254, -0.065196, -0.065105, -0.065014, -0.064923, -0.064833, -0.064742, -0.064651, -0.064560, -0.064371, -0.064181, -0.063992, -0.063802, -0.063612, -0.063423, -0.063233, -0.063043, -0.062789, -0.062520, -0.062250, -0.061981, -0.061712, -0.061442, -0.061173, -0.060903, -0.060629, -0.060277, -0.059925, -0.059573, -0.059221, -0.058870, -0.058518, -0.058166, -0.057814, -0.057462, -0.057064, -0.056648, -0.056232, -0.055816, -0.055400, -0.054984, -0.054568, -0.054152, -0.053736, -0.053320, -0.052863, -0.052392, -0.051922, -0.051451, -0.050980, -0.050509, -0.050038, -0.049568, -0.049097, -0.048626, -0.048148, -0.047635, -0.047122, -0.046608, -0.046095, -0.045582, -0.045068, -0.044555, -0.044042, -0.043529, -0.043015, -0.042489, -0.041953, -0.041418, -0.040882, -0.040346, -0.039810, -0.039274, -0.038738, -0.038202, -0.037666, -0.037130, -0.036584, -0.036039, -0.035494, -0.034948, -0.034403, -0.033858, -0.033312, -0.032767, -0.032222, -0.031676, -0.031135, -0.030594, -0.030053, -0.029512, -0.028972, -0.028431, -0.027890, -0.027349, -0.026809, -0.026268, -0.025741, -0.025218, -0.024695, -0.024173, -0.023650, -0.023127, -0.022604, -0.022082, -0.021559, -0.021038, -0.020543, -0.020047, -0.019552, -0.019057, -0.018562, -0.018066, -0.017571, -0.017076, -0.016580, -0.016117, -0.015661, -0.015206, -0.014751, -0.014296, -0.013841, -0.013386, -0.012931, -0.012476, -0.012068, -0.011661, -0.011255, -0.010848, -0.010441, -0.010035, -0.009628, -0.009222, -0.008848, -0.008491, -0.008134, -0.007776, -0.007419, -0.007062, -0.006705, -0.006348, -0.006035, -0.005729, -0.005423, -0.005116, -0.004810, -0.004503, -0.004197, -0.003931, -0.003687, -0.003444, -0.003200, -0.002957, -0.002713, -0.002469, -0.002280, -0.002092, -0.001903, -0.001714, -0.001526, -0.001337, -0.001202, -0.001067, -0.000933, -0.000798, -0.000664, -0.000555, -0.000457, -0.000359, -0.000262, -0.000174, -0.000132, -0.000090, -0.000047, -0.000023, -0.000011, 0.000000], - [0.000000, 0.003733, 0.006885, 0.009623, 0.011999, 0.013697, 0.014974, 0.015479, 0.015753, 0.015382, 0.015074, 0.015142, 0.015300, 0.015928, 0.016523, 0.017035, 0.017575, 0.018207, 0.018839, 0.019385, 0.019926, 0.020457, 0.020973, 0.021490, 0.022018, 0.022555, 0.023091, 0.023617, 0.024128, 0.024639, 0.025149, 0.025657, 0.026163, 0.026670, 0.027177, 0.027654, 0.028129, 0.028604, 0.029079, 0.029548, 0.030014, 0.030480, 0.030946, 0.031412, 0.031837, 0.032250, 0.032663, 0.033077, 0.033490, 0.033884, 0.034267, 0.034649, 0.035031, 0.035414, 0.035795, 0.036135, 0.036474, 0.036813, 0.037152, 0.037491, 0.037830, 0.038118, 0.038406, 0.038694, 0.038982, 0.039270, 0.039557, 0.039805, 0.040033, 0.040260, 0.040487, 0.040714, 0.040941, 0.041168, 0.041329, 0.041483, 0.041637, 0.041790, 0.041944, 0.042097, 0.042251, 0.042362, 0.042453, 0.042544, 0.042635, 0.042727, 0.042818, 0.042909, 0.043000, 0.043004, 0.043007, 0.043010, 0.043013, 0.043017, 0.043020, 0.043023, 0.043027, 0.042961, 0.042879, 0.042797, 0.042716, 0.042634, 0.042552, 0.042470, 0.042388, 0.042302, 0.042144, 0.041986, 0.041828, 0.041670, 0.041512, 0.041354, 0.041196, 0.041039, 0.040881, 0.040665, 0.040428, 0.040191, 0.039954, 0.039717, 0.039480, 0.039243, 0.039005, 0.038768, 0.038531, 0.038245, 0.037941, 0.037637, 0.037333, 0.037030, 0.036726, 0.036422, 0.036118, 0.035814, 0.035510, 0.035198, 0.034841, 0.034484, 0.034127, 0.033770, 0.033413, 0.033055, 0.032698, 0.032341, 0.031984, 0.031627, 0.031251, 0.030860, 0.030469, 0.030078, 0.029686, 0.029295, 0.028904, 0.028513, 0.028122, 0.027731, 0.027339, 0.026936, 0.026534, 0.026132, 0.025729, 0.025327, 0.024925, 0.024522, 0.024120, 0.023717, 0.023315, 0.022911, 0.022506, 0.022101, 0.021696, 0.021291, 0.020886, 0.020481, 0.020076, 0.019671, 0.019266, 0.018872, 0.018481, 0.018090, 0.017700, 0.017309, 0.016919, 0.016528, 0.016137, 0.015747, 0.015358, 0.014991, 0.014624, 0.014257, 0.013890, 0.013523, 0.013156, 0.012789, 0.012423, 0.012056, 0.011713, 0.011377, 0.011041, 0.010705, 0.010370, 0.010034, 0.009698, 0.009362, 0.009026, 0.008726, 0.008427, 0.008128, 0.007830, 0.007531, 0.007232, 0.006933, 0.006634, 0.006361, 0.006101, 0.005841, 0.005580, 0.005320, 0.005060, 0.004800, 0.004540, 0.004318, 0.004101, 0.003884, 0.003668, 0.003451, 0.003235, 0.003018, 0.002826, 0.002648, 0.002469, 0.002290, 0.002112, 0.001933, 0.001755, 0.001621, 0.001487, 0.001353, 0.001219, 0.001085, 0.000951, 0.000849, 0.000749, 0.000648, 0.000547, 0.000446, 0.000373, 0.000313, 0.000253, 0.000193, 0.000138, 0.000106, 0.000075, 0.000043, 0.000023, 0.000011, 0.000000], - [0.000000, 0.009208, 0.016334, 0.021551, 0.025264, 0.026740, 0.027861, 0.028333, 0.028707, 0.028808, 0.028974, 0.029541, 0.030206, 0.031393, 0.032549, 0.033632, 0.034735, 0.035905, 0.037075, 0.038197, 0.039317, 0.040428, 0.041528, 0.042628, 0.043718, 0.044802, 0.045887, 0.046964, 0.048033, 0.049102, 0.050170, 0.051216, 0.052258, 0.053300, 0.054342, 0.055360, 0.056375, 0.057391, 0.058407, 0.059397, 0.060370, 0.061342, 0.062315, 0.063287, 0.064219, 0.065139, 0.066059, 0.066979, 0.067900, 0.068793, 0.069668, 0.070544, 0.071419, 0.072295, 0.073169, 0.073942, 0.074715, 0.075488, 0.076261, 0.077035, 0.077808, 0.078506, 0.079203, 0.079900, 0.080598, 0.081295, 0.081993, 0.082610, 0.083185, 0.083760, 0.084335, 0.084910, 0.085485, 0.086060, 0.086515, 0.086956, 0.087396, 0.087836, 0.088276, 0.088717, 0.089157, 0.089497, 0.089789, 0.090081, 0.090373, 0.090665, 0.090957, 0.091249, 0.091541, 0.091651, 0.091761, 0.091871, 0.091980, 0.092090, 0.092200, 0.092310, 0.092419, 0.092373, 0.092290, 0.092206, 0.092122, 0.092039, 0.091955, 0.091872, 0.091788, 0.091693, 0.091414, 0.091134, 0.090854, 0.090575, 0.090295, 0.090016, 0.089736, 0.089456, 0.089177, 0.088761, 0.088293, 0.087825, 0.087356, 0.086888, 0.086420, 0.085952, 0.085484, 0.085016, 0.084547, 0.083951, 0.083309, 0.082666, 0.082024, 0.081382, 0.080739, 0.080097, 0.079454, 0.078812, 0.078170, 0.077506, 0.076729, 0.075953, 0.075177, 0.074400, 0.073624, 0.072847, 0.072071, 0.071295, 0.070518, 0.069742, 0.068918, 0.068057, 0.067196, 0.066335, 0.065474, 0.064612, 0.063751, 0.062890, 0.062029, 0.061168, 0.060304, 0.059402, 0.058501, 0.057600, 0.056699, 0.055798, 0.054897, 0.053995, 0.053094, 0.052193, 0.051292, 0.050390, 0.049487, 0.048584, 0.047681, 0.046779, 0.045876, 0.044973, 0.044070, 0.043167, 0.042265, 0.041387, 0.040518, 0.039649, 0.038780, 0.037910, 0.037041, 0.036172, 0.035303, 0.034433, 0.033568, 0.032758, 0.031948, 0.031139, 0.030329, 0.029519, 0.028710, 0.027900, 0.027090, 0.026280, 0.025526, 0.024786, 0.024047, 0.023308, 0.022568, 0.021829, 0.021090, 0.020350, 0.019611, 0.018953, 0.018297, 0.017641, 0.016985, 0.016330, 0.015674, 0.015018, 0.014362, 0.013769, 0.013206, 0.012644, 0.012082, 0.011520, 0.010958, 0.010396, 0.009833, 0.009349, 0.008876, 0.008402, 0.007929, 0.007455, 0.006982, 0.006509, 0.006094, 0.005712, 0.005330, 0.004948, 0.004566, 0.004184, 0.003802, 0.003509, 0.003217, 0.002925, 0.002633, 0.002341, 0.002049, 0.001834, 0.001621, 0.001407, 0.001193, 0.000980, 0.000822, 0.000691, 0.000559, 0.000427, 0.000307, 0.000234, 0.000162, 0.000090, 0.000046, 0.000023, 0.000000], - [0.000000, 0.016424, 0.027008, 0.032906, 0.036341, 0.038091, 0.039557, 0.040504, 0.041346, 0.041896, 0.042523, 0.043617, 0.044814, 0.046556, 0.048276, 0.049941, 0.051629, 0.053393, 0.055157, 0.056839, 0.058518, 0.060201, 0.061890, 0.063580, 0.065239, 0.066879, 0.068519, 0.070164, 0.071818, 0.073472, 0.075127, 0.076752, 0.078373, 0.079994, 0.081615, 0.083234, 0.084852, 0.086471, 0.088089, 0.089686, 0.091267, 0.092848, 0.094429, 0.096010, 0.097533, 0.099041, 0.100548, 0.102055, 0.103562, 0.105039, 0.106496, 0.107952, 0.109409, 0.110866, 0.112321, 0.113668, 0.115015, 0.116362, 0.117709, 0.119057, 0.120404, 0.121643, 0.122882, 0.124121, 0.125360, 0.126599, 0.127838, 0.128971, 0.130047, 0.131123, 0.132199, 0.133276, 0.134352, 0.135428, 0.136325, 0.137200, 0.138075, 0.138950, 0.139825, 0.140700, 0.141575, 0.142288, 0.142924, 0.143560, 0.144197, 0.144833, 0.145469, 0.146105, 0.146741, 0.147086, 0.147430, 0.147774, 0.148117, 0.148461, 0.148804, 0.149148, 0.149492, 0.149568, 0.149580, 0.149592, 0.149604, 0.149616, 0.149628, 0.149640, 0.149652, 0.149643, 0.149297, 0.148951, 0.148605, 0.148259, 0.147913, 0.147567, 0.147221, 0.146875, 0.146529, 0.145923, 0.145218, 0.144513, 0.143807, 0.143102, 0.142397, 0.141692, 0.140986, 0.140281, 0.139576, 0.138635, 0.137610, 0.136584, 0.135559, 0.134534, 0.133508, 0.132483, 0.131457, 0.130432, 0.129407, 0.128340, 0.127060, 0.125779, 0.124498, 0.123217, 0.121937, 0.120656, 0.119375, 0.118094, 0.116814, 0.115533, 0.114162, 0.112719, 0.111277, 0.109834, 0.108391, 0.106948, 0.105506, 0.104063, 0.102620, 0.101177, 0.099729, 0.098216, 0.096703, 0.095190, 0.093677, 0.092163, 0.090650, 0.089137, 0.087624, 0.086111, 0.084597, 0.083086, 0.081575, 0.080065, 0.078554, 0.077043, 0.075532, 0.074022, 0.072511, 0.071000, 0.069490, 0.068024, 0.066574, 0.065123, 0.063672, 0.062222, 0.060771, 0.059321, 0.057870, 0.056419, 0.054975, 0.053631, 0.052286, 0.050941, 0.049597, 0.048252, 0.046907, 0.045563, 0.044218, 0.042874, 0.041628, 0.040410, 0.039193, 0.037975, 0.036757, 0.035540, 0.034322, 0.033104, 0.031886, 0.030809, 0.029736, 0.028662, 0.027589, 0.026516, 0.025443, 0.024369, 0.023296, 0.022324, 0.021403, 0.020482, 0.019561, 0.018641, 0.017720, 0.016799, 0.015878, 0.015091, 0.014324, 0.013556, 0.012788, 0.012020, 0.011252, 0.010485, 0.009816, 0.009200, 0.008585, 0.007970, 0.007355, 0.006740, 0.006125, 0.005652, 0.005180, 0.004708, 0.004236, 0.003764, 0.003292, 0.002949, 0.002607, 0.002265, 0.001924, 0.001582, 0.001330, 0.001118, 0.000907, 0.000695, 0.000500, 0.000380, 0.000260, 0.000140, 0.000069, 0.000034, 0.000000], - [0.000000, 0.025013, 0.036949, 0.042838, 0.046717, 0.049017, 0.051023, 0.052492, 0.053831, 0.054810, 0.055876, 0.057465, 0.059174, 0.061515, 0.063827, 0.066068, 0.068332, 0.070669, 0.073007, 0.075282, 0.077555, 0.079832, 0.082114, 0.084397, 0.086660, 0.088911, 0.091163, 0.093429, 0.095718, 0.098006, 0.100295, 0.102560, 0.104823, 0.107085, 0.109347, 0.111619, 0.113892, 0.116165, 0.118438, 0.120705, 0.122967, 0.125229, 0.127492, 0.129754, 0.131964, 0.134161, 0.136358, 0.138554, 0.140751, 0.142934, 0.145107, 0.147280, 0.149453, 0.151626, 0.153799, 0.155865, 0.157932, 0.159999, 0.162066, 0.164132, 0.166199, 0.168152, 0.170103, 0.172055, 0.174007, 0.175958, 0.177910, 0.179744, 0.181516, 0.183287, 0.185059, 0.186831, 0.188603, 0.190374, 0.191918, 0.193433, 0.194948, 0.196463, 0.197978, 0.199494, 0.201009, 0.202300, 0.203485, 0.204670, 0.205854, 0.207039, 0.208224, 0.209409, 0.210593, 0.211345, 0.212094, 0.212843, 0.213593, 0.214342, 0.215091, 0.215841, 0.216590, 0.216921, 0.217152, 0.217382, 0.217613, 0.217844, 0.218075, 0.218306, 0.218537, 0.218734, 0.218389, 0.218045, 0.217700, 0.217355, 0.217011, 0.216666, 0.216321, 0.215977, 0.215632, 0.214856, 0.213914, 0.212973, 0.212031, 0.211090, 0.210148, 0.209207, 0.208266, 0.207324, 0.206383, 0.205037, 0.203546, 0.202055, 0.200563, 0.199072, 0.197581, 0.196090, 0.194598, 0.193107, 0.191616, 0.190057, 0.188143, 0.186229, 0.184315, 0.182401, 0.180487, 0.178573, 0.176659, 0.174745, 0.172831, 0.170917, 0.168855, 0.166676, 0.164496, 0.162316, 0.160136, 0.157956, 0.155777, 0.153597, 0.151417, 0.149237, 0.147049, 0.144765, 0.142480, 0.140195, 0.137910, 0.135626, 0.133341, 0.131056, 0.128772, 0.126487, 0.124202, 0.121930, 0.119662, 0.117393, 0.115125, 0.112856, 0.110588, 0.108319, 0.106051, 0.103783, 0.101514, 0.099329, 0.097170, 0.095011, 0.092852, 0.090693, 0.088534, 0.086375, 0.084216, 0.082057, 0.079908, 0.077921, 0.075933, 0.073945, 0.071958, 0.069970, 0.067983, 0.065995, 0.064008, 0.062020, 0.060192, 0.058408, 0.056624, 0.054840, 0.053056, 0.051272, 0.049488, 0.047705, 0.045921, 0.044355, 0.042796, 0.041237, 0.039678, 0.038119, 0.036559, 0.035000, 0.033441, 0.032034, 0.030704, 0.029375, 0.028045, 0.026715, 0.025386, 0.024056, 0.022726, 0.021598, 0.020498, 0.019398, 0.018299, 0.017199, 0.016099, 0.014999, 0.014039, 0.013155, 0.012271, 0.011388, 0.010504, 0.009620, 0.008736, 0.008061, 0.007386, 0.006711, 0.006037, 0.005362, 0.004687, 0.004199, 0.003713, 0.003226, 0.002740, 0.002253, 0.001892, 0.001589, 0.001285, 0.000981, 0.000702, 0.000532, 0.000362, 0.000191, 0.000092, 0.000046, 0.000000], - ], - [ - [0.000000, -0.000071, -0.000200, -0.000235, -0.000293, -0.000455, -0.000599, -0.000710, -0.000810, -0.000879, -0.000962, -0.001118, -0.001254, -0.001285, -0.001372, -0.001597, -0.001824, -0.002054, -0.002285, -0.002534, -0.002783, -0.003057, -0.003360, -0.003664, -0.004024, -0.004422, -0.004821, -0.005246, -0.005710, -0.006174, -0.006637, -0.007191, -0.007758, -0.008324, -0.008890, -0.009557, -0.010232, -0.010907, -0.011581, -0.012338, -0.013153, -0.013968, -0.014783, -0.015598, -0.016560, -0.017562, -0.018564, -0.019566, -0.020568, -0.021673, -0.022846, -0.024019, -0.025192, -0.026365, -0.027540, -0.028933, -0.030326, -0.031720, -0.033113, -0.034507, -0.035900, -0.037518, -0.039138, -0.040758, -0.042378, -0.043997, -0.045617, -0.047383, -0.049224, -0.051066, -0.052908, -0.054750, -0.056592, -0.058434, -0.060469, -0.062528, -0.064588, -0.066647, -0.068706, -0.070765, -0.072825, -0.074998, -0.077226, -0.079454, -0.081682, -0.083910, -0.086138, -0.088366, -0.090593, -0.092945, -0.095297, -0.097649, -0.100002, -0.102354, -0.104706, -0.107058, -0.109410, -0.111792, -0.114181, -0.116570, -0.118959, -0.121348, -0.123737, -0.126127, -0.128516, -0.130900, -0.133205, -0.135510, -0.137815, -0.140121, -0.142426, -0.144731, -0.147036, -0.149341, -0.151646, -0.153810, -0.155920, -0.158030, -0.160140, -0.162250, -0.164360, -0.166470, -0.168580, -0.170690, -0.172800, -0.174685, -0.176489, -0.178293, -0.180097, -0.181901, -0.183705, -0.185509, -0.187312, -0.189116, -0.190920, -0.192661, -0.194070, -0.195480, -0.196889, -0.198298, -0.199708, -0.201117, -0.202526, -0.203936, -0.205345, -0.206754, -0.207929, -0.208916, -0.209902, -0.210889, -0.211875, -0.212862, -0.213849, -0.214835, -0.215822, -0.216809, -0.217761, -0.218302, -0.218843, -0.219385, -0.219926, -0.220468, -0.221009, -0.221550, -0.222092, -0.222633, -0.223175, -0.223373, -0.223477, -0.223581, -0.223685, -0.223790, -0.223894, -0.223998, -0.224102, -0.224206, -0.224311, -0.224079, -0.223739, -0.223399, -0.223059, -0.222719, -0.222379, -0.222039, -0.221699, -0.221359, -0.220991, -0.220197, -0.219404, -0.218610, -0.217817, -0.217023, -0.216229, -0.215436, -0.214642, -0.213849, -0.212686, -0.211419, -0.210153, -0.208886, -0.207620, -0.206353, -0.205087, -0.203820, -0.202554, -0.200796, -0.199022, -0.197249, -0.195476, -0.193703, -0.191929, -0.190156, -0.188383, -0.186241, -0.183909, -0.181578, -0.179246, -0.176915, -0.174583, -0.172252, -0.169920, -0.167052, -0.164108, -0.161163, -0.158218, -0.155273, -0.152329, -0.149384, -0.146004, -0.142384, -0.138765, -0.135145, -0.131526, -0.127906, -0.124287, -0.119928, -0.115565, -0.111202, -0.106840, -0.102477, -0.098114, -0.092973, -0.087825, -0.082676, -0.077527, -0.072378, -0.066647, -0.060652, -0.054657, -0.048662, -0.042520, -0.035744, -0.028969, -0.022193, -0.015000, -0.007499, 0.000000], - [0.000000, -0.000071, -0.000200, -0.000235, -0.000293, -0.000455, -0.000556, -0.000546, -0.000562, -0.000649, -0.000735, -0.000816, -0.000892, -0.000944, -0.001027, -0.001188, -0.001343, -0.001475, -0.001608, -0.001785, -0.001965, -0.002163, -0.002381, -0.002600, -0.002850, -0.003120, -0.003391, -0.003676, -0.003983, -0.004291, -0.004598, -0.004989, -0.005392, -0.005795, -0.006198, -0.006651, -0.007109, -0.007566, -0.008024, -0.008549, -0.009124, -0.009698, -0.010272, -0.010847, -0.011506, -0.012189, -0.012871, -0.013554, -0.014237, -0.014997, -0.015807, -0.016617, -0.017428, -0.018238, -0.019050, -0.020006, -0.020963, -0.021920, -0.022877, -0.023833, -0.024790, -0.025892, -0.026996, -0.028099, -0.029202, -0.030305, -0.031408, -0.032613, -0.033871, -0.035128, -0.036386, -0.037644, -0.038902, -0.040160, -0.041546, -0.042949, -0.044352, -0.045755, -0.047157, -0.048560, -0.049963, -0.051442, -0.052958, -0.054474, -0.055990, -0.057506, -0.059022, -0.060538, -0.062054, -0.063673, -0.065292, -0.066911, -0.068530, -0.070149, -0.071768, -0.073387, -0.075006, -0.076653, -0.078308, -0.079962, -0.081616, -0.083271, -0.084925, -0.086579, -0.088234, -0.089887, -0.091517, -0.093148, -0.094778, -0.096408, -0.098039, -0.099669, -0.101300, -0.102930, -0.104560, -0.106122, -0.107657, -0.109192, -0.110727, -0.112262, -0.113797, -0.115332, -0.116867, -0.118402, -0.119937, -0.121342, -0.122700, -0.124058, -0.125417, -0.126775, -0.128133, -0.129492, -0.130850, -0.132208, -0.133566, -0.134886, -0.136005, -0.137123, -0.138242, -0.139361, -0.140479, -0.141598, -0.142716, -0.143835, -0.144953, -0.146072, -0.147033, -0.147870, -0.148706, -0.149542, -0.150379, -0.151215, -0.152051, -0.152888, -0.153724, -0.154560, -0.155373, -0.155900, -0.156427, -0.156954, -0.157482, -0.158009, -0.158536, -0.159063, -0.159591, -0.160118, -0.160645, -0.160913, -0.161109, -0.161306, -0.161502, -0.161698, -0.161895, -0.162091, -0.162288, -0.162484, -0.162681, -0.162615, -0.162465, -0.162315, -0.162166, -0.162016, -0.161866, -0.161716, -0.161566, -0.161416, -0.161244, -0.160734, -0.160225, -0.159715, -0.159205, -0.158696, -0.158186, -0.157676, -0.157167, -0.156657, -0.155846, -0.154951, -0.154056, -0.153161, -0.152266, -0.151371, -0.150476, -0.149581, -0.148686, -0.147397, -0.146095, -0.144794, -0.143493, -0.142192, -0.140890, -0.139589, -0.138288, -0.136696, -0.134955, -0.133214, -0.131473, -0.129731, -0.127990, -0.126249, -0.124508, -0.122358, -0.120149, -0.117940, -0.115731, -0.113523, -0.111314, -0.109105, -0.106572, -0.103860, -0.101149, -0.098438, -0.095726, -0.093015, -0.090303, -0.087065, -0.083824, -0.080584, -0.077343, -0.074102, -0.070861, -0.067083, -0.063300, -0.059516, -0.055733, -0.051949, -0.047772, -0.043416, -0.039060, -0.034704, -0.030257, -0.025414, -0.020571, -0.015729, -0.010617, -0.005308, 0.000000], - [0.000000, -0.000071, -0.000200, -0.000235, -0.000262, -0.000282, -0.000288, -0.000268, -0.000281, -0.000384, -0.000475, -0.000498, -0.000529, -0.000602, -0.000680, -0.000772, -0.000851, -0.000891, -0.000930, -0.001038, -0.001149, -0.001270, -0.001403, -0.001537, -0.001702, -0.001887, -0.002072, -0.002263, -0.002465, -0.002666, -0.002867, -0.003103, -0.003344, -0.003585, -0.003826, -0.004107, -0.004390, -0.004674, -0.004958, -0.005280, -0.005629, -0.005978, -0.006327, -0.006676, -0.007079, -0.007498, -0.007916, -0.008334, -0.008752, -0.009219, -0.009717, -0.010215, -0.010714, -0.011212, -0.011711, -0.012287, -0.012864, -0.013440, -0.014016, -0.014592, -0.015168, -0.015840, -0.016513, -0.017185, -0.017858, -0.018530, -0.019203, -0.019937, -0.020703, -0.021470, -0.022237, -0.023003, -0.023770, -0.024537, -0.025378, -0.026230, -0.027081, -0.027932, -0.028783, -0.029634, -0.030485, -0.031388, -0.032315, -0.033241, -0.034168, -0.035095, -0.036022, -0.036948, -0.037875, -0.038874, -0.039873, -0.040873, -0.041872, -0.042871, -0.043870, -0.044870, -0.045869, -0.046896, -0.047930, -0.048965, -0.049999, -0.051033, -0.052067, -0.053101, -0.054135, -0.055169, -0.056203, -0.057238, -0.058272, -0.059306, -0.060340, -0.061374, -0.062408, -0.063443, -0.064477, -0.065483, -0.066478, -0.067473, -0.068468, -0.069464, -0.070459, -0.071454, -0.072449, -0.073444, -0.074440, -0.075371, -0.076280, -0.077188, -0.078097, -0.079006, -0.079914, -0.080823, -0.081732, -0.082641, -0.083549, -0.084436, -0.085211, -0.085985, -0.086759, -0.087534, -0.088308, -0.089082, -0.089856, -0.090631, -0.091405, -0.092179, -0.092858, -0.093459, -0.094061, -0.094662, -0.095264, -0.095866, -0.096467, -0.097069, -0.097670, -0.098272, -0.098859, -0.099267, -0.099676, -0.100084, -0.100493, -0.100901, -0.101310, -0.101718, -0.102127, -0.102535, -0.102944, -0.103183, -0.103377, -0.103570, -0.103763, -0.103957, -0.104150, -0.104343, -0.104537, -0.104730, -0.104923, -0.104933, -0.104884, -0.104835, -0.104787, -0.104738, -0.104689, -0.104640, -0.104591, -0.104542, -0.104477, -0.104176, -0.103874, -0.103573, -0.103271, -0.102969, -0.102668, -0.102366, -0.102064, -0.101763, -0.101250, -0.100679, -0.100108, -0.099536, -0.098965, -0.098394, -0.097822, -0.097251, -0.096680, -0.095835, -0.094983, -0.094130, -0.093278, -0.092425, -0.091573, -0.090720, -0.089867, -0.088813, -0.087656, -0.086499, -0.085342, -0.084185, -0.083028, -0.081871, -0.080714, -0.079281, -0.077808, -0.076336, -0.074863, -0.073390, -0.071917, -0.070445, -0.068766, -0.066974, -0.065182, -0.063389, -0.061597, -0.059805, -0.058013, -0.055884, -0.053753, -0.051623, -0.049492, -0.047361, -0.045231, -0.042779, -0.040323, -0.037868, -0.035412, -0.032957, -0.030269, -0.027474, -0.024680, -0.021886, -0.019040, -0.015973, -0.012905, -0.009838, -0.006628, -0.003314, 0.000000], - [0.000000, -0.000071, -0.000067, 0.000000, -0.000034, -0.000192, -0.000245, -0.000104, -0.000027, -0.000130, -0.000226, -0.000285, -0.000334, -0.000330, -0.000338, -0.000378, -0.000407, -0.000401, -0.000395, -0.000475, -0.000559, -0.000627, -0.000675, -0.000723, -0.000795, -0.000883, -0.000971, -0.001062, -0.001157, -0.001251, -0.001346, -0.001450, -0.001555, -0.001660, -0.001765, -0.001892, -0.002021, -0.002150, -0.002278, -0.002425, -0.002584, -0.002743, -0.002902, -0.003061, -0.003250, -0.003447, -0.003645, -0.003842, -0.004039, -0.004252, -0.004475, -0.004697, -0.004920, -0.005142, -0.005366, -0.005633, -0.005901, -0.006169, -0.006437, -0.006705, -0.006973, -0.007278, -0.007583, -0.007889, -0.008194, -0.008499, -0.008805, -0.009136, -0.009481, -0.009825, -0.010170, -0.010515, -0.010860, -0.011205, -0.011595, -0.011990, -0.012386, -0.012782, -0.013177, -0.013573, -0.013969, -0.014383, -0.014807, -0.015231, -0.015654, -0.016078, -0.016502, -0.016926, -0.017349, -0.017813, -0.018278, -0.018742, -0.019206, -0.019671, -0.020135, -0.020599, -0.021063, -0.021543, -0.022027, -0.022510, -0.022994, -0.023478, -0.023961, -0.024445, -0.024928, -0.025412, -0.025906, -0.026399, -0.026892, -0.027385, -0.027879, -0.028372, -0.028865, -0.029358, -0.029852, -0.030339, -0.030823, -0.031307, -0.031792, -0.032276, -0.032760, -0.033245, -0.033729, -0.034214, -0.034698, -0.035159, -0.035611, -0.036063, -0.036516, -0.036968, -0.037420, -0.037873, -0.038325, -0.038777, -0.039230, -0.039673, -0.040067, -0.040461, -0.040856, -0.041250, -0.041644, -0.042039, -0.042433, -0.042827, -0.043222, -0.043616, -0.043968, -0.044287, -0.044605, -0.044923, -0.045241, -0.045560, -0.045878, -0.046196, -0.046515, -0.046833, -0.047144, -0.047369, -0.047595, -0.047821, -0.048046, -0.048272, -0.048497, -0.048723, -0.048948, -0.049174, -0.049399, -0.049541, -0.049658, -0.049776, -0.049894, -0.050012, -0.050130, -0.050248, -0.050366, -0.050484, -0.050602, -0.050629, -0.050627, -0.050624, -0.050622, -0.050620, -0.050618, -0.050616, -0.050614, -0.050611, -0.050601, -0.050463, -0.050325, -0.050187, -0.050049, -0.049911, -0.049774, -0.049636, -0.049498, -0.049360, -0.049114, -0.048838, -0.048561, -0.048285, -0.048009, -0.047733, -0.047457, -0.047180, -0.046904, -0.046486, -0.046064, -0.045642, -0.045220, -0.044797, -0.044375, -0.043953, -0.043530, -0.043006, -0.042430, -0.041854, -0.041278, -0.040702, -0.040125, -0.039549, -0.038973, -0.038261, -0.037530, -0.036799, -0.036068, -0.035337, -0.034606, -0.033876, -0.033046, -0.032162, -0.031278, -0.030394, -0.029510, -0.028626, -0.027742, -0.026702, -0.025662, -0.024622, -0.023582, -0.022542, -0.021501, -0.020316, -0.019129, -0.017942, -0.016754, -0.015567, -0.014280, -0.012947, -0.011614, -0.010281, -0.008927, -0.007484, -0.006041, -0.004599, -0.003095, -0.001547, 0.000000], - [0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000043, 0.000166, 0.000256, 0.000255, 0.000252, 0.000231, 0.000235, 0.000373, 0.000470, 0.000463, 0.000477, 0.000559, 0.000641, 0.000711, 0.000781, 0.000858, 0.000943, 0.001029, 0.001133, 0.001250, 0.001368, 0.001484, 0.001599, 0.001714, 0.001830, 0.001979, 0.002132, 0.002286, 0.002440, 0.002629, 0.002822, 0.003014, 0.003206, 0.003414, 0.003633, 0.003851, 0.004070, 0.004289, 0.004536, 0.004792, 0.005048, 0.005304, 0.005559, 0.005847, 0.006155, 0.006463, 0.006772, 0.007080, 0.007389, 0.007748, 0.008108, 0.008467, 0.008827, 0.009187, 0.009546, 0.009966, 0.010387, 0.010808, 0.011228, 0.011649, 0.012069, 0.012530, 0.013013, 0.013496, 0.013978, 0.014461, 0.014943, 0.015426, 0.015957, 0.016494, 0.017031, 0.017569, 0.018106, 0.018643, 0.019180, 0.019766, 0.020375, 0.020984, 0.021593, 0.022202, 0.022811, 0.023420, 0.024029, 0.024692, 0.025355, 0.026018, 0.026682, 0.027345, 0.028008, 0.028671, 0.029335, 0.030037, 0.030749, 0.031461, 0.032172, 0.032884, 0.033596, 0.034307, 0.035019, 0.035733, 0.036480, 0.037228, 0.037976, 0.038723, 0.039471, 0.040218, 0.040966, 0.041713, 0.042461, 0.043221, 0.043986, 0.044752, 0.045517, 0.046282, 0.047047, 0.047813, 0.048578, 0.049343, 0.050108, 0.050863, 0.051614, 0.052364, 0.053115, 0.053866, 0.054616, 0.055367, 0.056118, 0.056869, 0.057619, 0.058361, 0.059055, 0.059749, 0.060443, 0.061138, 0.061832, 0.062526, 0.063220, 0.063915, 0.064609, 0.065303, 0.065945, 0.066545, 0.067145, 0.067745, 0.068345, 0.068945, 0.069545, 0.070145, 0.070745, 0.071345, 0.071934, 0.072388, 0.072842, 0.073295, 0.073749, 0.074203, 0.074657, 0.075111, 0.075564, 0.076018, 0.076472, 0.076782, 0.077053, 0.077324, 0.077595, 0.077866, 0.078137, 0.078408, 0.078679, 0.078950, 0.079220, 0.079325, 0.079376, 0.079426, 0.079477, 0.079528, 0.079579, 0.079630, 0.079680, 0.079731, 0.079767, 0.079572, 0.079377, 0.079181, 0.078986, 0.078791, 0.078596, 0.078401, 0.078206, 0.078010, 0.077612, 0.077157, 0.076702, 0.076247, 0.075792, 0.075336, 0.074881, 0.074426, 0.073971, 0.073262, 0.072545, 0.071828, 0.071111, 0.070394, 0.069677, 0.068960, 0.068242, 0.067354, 0.066377, 0.065401, 0.064424, 0.063448, 0.062471, 0.061495, 0.060518, 0.059328, 0.058107, 0.056887, 0.055666, 0.054446, 0.053225, 0.052004, 0.050635, 0.049183, 0.047732, 0.046281, 0.044829, 0.043378, 0.041927, 0.040273, 0.038619, 0.036964, 0.035310, 0.033655, 0.032001, 0.030165, 0.028327, 0.026490, 0.024652, 0.022814, 0.020876, 0.018893, 0.016909, 0.014926, 0.012917, 0.010800, 0.008684, 0.006567, 0.004401, 0.002200, 0.000000], - [0.000000, 0.000000, 0.000000, 0.000116, 0.000261, 0.000266, 0.000316, 0.000448, 0.000536, 0.000503, 0.000469, 0.000429, 0.000415, 0.000533, 0.000639, 0.000717, 0.000803, 0.000918, 0.001034, 0.001185, 0.001339, 0.001483, 0.001615, 0.001748, 0.001909, 0.002090, 0.002270, 0.002452, 0.002636, 0.002821, 0.003005, 0.003238, 0.003477, 0.003717, 0.003957, 0.004272, 0.004592, 0.004912, 0.005233, 0.005576, 0.005935, 0.006293, 0.006652, 0.007011, 0.007417, 0.007836, 0.008255, 0.008674, 0.009093, 0.009564, 0.010069, 0.010573, 0.011078, 0.011583, 0.012088, 0.012669, 0.013249, 0.013829, 0.014409, 0.014989, 0.015570, 0.016260, 0.016950, 0.017641, 0.018332, 0.019023, 0.019713, 0.020466, 0.021253, 0.022039, 0.022825, 0.023611, 0.024397, 0.025183, 0.026060, 0.026949, 0.027837, 0.028726, 0.029615, 0.030503, 0.031392, 0.032356, 0.033356, 0.034356, 0.035356, 0.036355, 0.037355, 0.038355, 0.039355, 0.040455, 0.041556, 0.042657, 0.043758, 0.044859, 0.045960, 0.047061, 0.048161, 0.049341, 0.050540, 0.051738, 0.052937, 0.054135, 0.055334, 0.056532, 0.057731, 0.058934, 0.060213, 0.061492, 0.062771, 0.064050, 0.065329, 0.066608, 0.067887, 0.069166, 0.070445, 0.071756, 0.073079, 0.074402, 0.075725, 0.077048, 0.078371, 0.079694, 0.081017, 0.082340, 0.083663, 0.084991, 0.086321, 0.087651, 0.088981, 0.090311, 0.091641, 0.092971, 0.094301, 0.095631, 0.096961, 0.098280, 0.099536, 0.100792, 0.102048, 0.103305, 0.104561, 0.105817, 0.107074, 0.108330, 0.109586, 0.110842, 0.112015, 0.113122, 0.114228, 0.115335, 0.116441, 0.117548, 0.118654, 0.119761, 0.120867, 0.121974, 0.123061, 0.123922, 0.124784, 0.125645, 0.126506, 0.127368, 0.128229, 0.129090, 0.129952, 0.130813, 0.131674, 0.132273, 0.132801, 0.133328, 0.133855, 0.134382, 0.134909, 0.135437, 0.135964, 0.136491, 0.137018, 0.137241, 0.137366, 0.137491, 0.137616, 0.137741, 0.137866, 0.137990, 0.138115, 0.138240, 0.138337, 0.138001, 0.137666, 0.137330, 0.136995, 0.136659, 0.136323, 0.135988, 0.135652, 0.135317, 0.134606, 0.133791, 0.132976, 0.132160, 0.131345, 0.130530, 0.129714, 0.128899, 0.128084, 0.126801, 0.125504, 0.124207, 0.122911, 0.121614, 0.120317, 0.119020, 0.117723, 0.116126, 0.114376, 0.112625, 0.110875, 0.109124, 0.107374, 0.105623, 0.103872, 0.101753, 0.099582, 0.097411, 0.095239, 0.093068, 0.090896, 0.088725, 0.086311, 0.083765, 0.081218, 0.078672, 0.076125, 0.073579, 0.071032, 0.068169, 0.065305, 0.062440, 0.059576, 0.056711, 0.053847, 0.050711, 0.047573, 0.044435, 0.041297, 0.038159, 0.034875, 0.031526, 0.028176, 0.024826, 0.021444, 0.017921, 0.014399, 0.010876, 0.007285, 0.003642, 0.000000], - [0.000000, 0.000000, 0.000000, 0.000116, 0.000261, 0.000266, 0.000359, 0.000615, 0.000826, 0.000914, 0.000981, 0.000924, 0.000898, 0.001030, 0.001153, 0.001249, 0.001375, 0.001596, 0.001816, 0.002025, 0.002233, 0.002461, 0.002715, 0.002968, 0.003250, 0.003550, 0.003850, 0.004177, 0.004542, 0.004907, 0.005272, 0.005691, 0.006117, 0.006544, 0.006970, 0.007500, 0.008037, 0.008574, 0.009111, 0.009716, 0.010370, 0.011024, 0.011678, 0.012331, 0.013073, 0.013839, 0.014604, 0.015370, 0.016135, 0.017003, 0.017939, 0.018875, 0.019810, 0.020746, 0.021683, 0.022781, 0.023878, 0.024976, 0.026074, 0.027171, 0.028269, 0.029576, 0.030884, 0.032192, 0.033500, 0.034808, 0.036116, 0.037556, 0.039064, 0.040573, 0.042082, 0.043591, 0.045099, 0.046608, 0.048311, 0.050037, 0.051764, 0.053490, 0.055217, 0.056943, 0.058670, 0.060552, 0.062507, 0.064463, 0.066419, 0.068374, 0.070330, 0.072286, 0.074241, 0.076403, 0.078566, 0.080729, 0.082892, 0.085055, 0.087218, 0.089381, 0.091544, 0.093844, 0.096176, 0.098509, 0.100841, 0.103174, 0.105506, 0.107838, 0.110171, 0.112509, 0.114945, 0.117381, 0.119816, 0.122252, 0.124687, 0.127123, 0.129558, 0.131994, 0.134429, 0.136848, 0.139261, 0.141673, 0.144086, 0.146499, 0.148911, 0.151324, 0.153736, 0.156149, 0.158561, 0.160827, 0.163040, 0.165253, 0.167466, 0.169680, 0.171893, 0.174106, 0.176319, 0.178532, 0.180745, 0.182893, 0.184697, 0.186501, 0.188305, 0.190109, 0.191913, 0.193717, 0.195521, 0.197325, 0.199129, 0.200933, 0.202403, 0.203606, 0.204810, 0.206013, 0.207216, 0.208420, 0.209623, 0.210826, 0.212030, 0.213233, 0.214380, 0.214852, 0.215324, 0.215797, 0.216269, 0.216741, 0.217214, 0.217686, 0.218158, 0.218631, 0.219103, 0.218971, 0.218672, 0.218374, 0.218075, 0.217777, 0.217479, 0.217180, 0.216882, 0.216584, 0.216285, 0.215432, 0.214400, 0.213368, 0.212336, 0.211304, 0.210272, 0.209240, 0.208208, 0.207177, 0.206105, 0.204435, 0.202765, 0.201095, 0.199424, 0.197754, 0.196084, 0.194414, 0.192744, 0.191073, 0.188989, 0.186789, 0.184589, 0.182389, 0.180188, 0.177988, 0.175788, 0.173588, 0.171388, 0.168782, 0.166163, 0.163545, 0.160927, 0.158308, 0.155690, 0.153071, 0.150453, 0.147620, 0.144677, 0.141734, 0.138791, 0.135848, 0.132905, 0.129962, 0.127019, 0.123855, 0.120660, 0.117464, 0.114269, 0.111073, 0.107878, 0.104682, 0.101365, 0.097982, 0.094599, 0.091216, 0.087832, 0.084449, 0.081066, 0.077534, 0.074001, 0.070468, 0.066935, 0.063402, 0.059869, 0.056220, 0.052570, 0.048920, 0.045269, 0.041619, 0.037910, 0.034174, 0.030439, 0.026703, 0.022954, 0.019145, 0.015337, 0.011529, 0.007697, 0.003848, 0.000000], - [0.000000, 0.000000, 0.000125, 0.000228, 0.000293, 0.000443, 0.000634, 0.000899, 0.001109, 0.001164, 0.001202, 0.001141, 0.001121, 0.001314, 0.001494, 0.001642, 0.001818, 0.002085, 0.002351, 0.002575, 0.002797, 0.003071, 0.003409, 0.003747, 0.004100, 0.004463, 0.004827, 0.005230, 0.005691, 0.006153, 0.006614, 0.007157, 0.007710, 0.008264, 0.008818, 0.009477, 0.010144, 0.010811, 0.011478, 0.012241, 0.013074, 0.013906, 0.014739, 0.015572, 0.016516, 0.017490, 0.018464, 0.019438, 0.020412, 0.021520, 0.022715, 0.023911, 0.025107, 0.026302, 0.027500, 0.028906, 0.030311, 0.031717, 0.033123, 0.034529, 0.035934, 0.037616, 0.039299, 0.040982, 0.042665, 0.044349, 0.046032, 0.047894, 0.049851, 0.051807, 0.053764, 0.055720, 0.057677, 0.059633, 0.061852, 0.064104, 0.066356, 0.068608, 0.070860, 0.073112, 0.075364, 0.077831, 0.080401, 0.082970, 0.085540, 0.088110, 0.090679, 0.093249, 0.095818, 0.098683, 0.101550, 0.104416, 0.107283, 0.110149, 0.113016, 0.115882, 0.118749, 0.121821, 0.124942, 0.128063, 0.131185, 0.134306, 0.137427, 0.140548, 0.143670, 0.146800, 0.150080, 0.153359, 0.156639, 0.159919, 0.163198, 0.166478, 0.169758, 0.173038, 0.176317, 0.179575, 0.182824, 0.186074, 0.189323, 0.192573, 0.195822, 0.199072, 0.202321, 0.205571, 0.208820, 0.211836, 0.214768, 0.217699, 0.220631, 0.223563, 0.226495, 0.229426, 0.232358, 0.235290, 0.238222, 0.241045, 0.243296, 0.245546, 0.247797, 0.250048, 0.252299, 0.254550, 0.256801, 0.259052, 0.261303, 0.263553, 0.265259, 0.266529, 0.267799, 0.269068, 0.270338, 0.271608, 0.272878, 0.274148, 0.275417, 0.276687, 0.277867, 0.277989, 0.278110, 0.278231, 0.278353, 0.278474, 0.278595, 0.278717, 0.278838, 0.278959, 0.279081, 0.278317, 0.277310, 0.276304, 0.275297, 0.274291, 0.273284, 0.272278, 0.271272, 0.270265, 0.269259, 0.267528, 0.265565, 0.263601, 0.261638, 0.259675, 0.257712, 0.255748, 0.253785, 0.251822, 0.249814, 0.247126, 0.244439, 0.241752, 0.239064, 0.236377, 0.233689, 0.231002, 0.228314, 0.225627, 0.222547, 0.219357, 0.216167, 0.212978, 0.209788, 0.206598, 0.203409, 0.200219, 0.197029, 0.193530, 0.190022, 0.186513, 0.183005, 0.179496, 0.175988, 0.172479, 0.168971, 0.165337, 0.161638, 0.157940, 0.154241, 0.150543, 0.146844, 0.143146, 0.139448, 0.135657, 0.131852, 0.128048, 0.124244, 0.120440, 0.116635, 0.112831, 0.108987, 0.105122, 0.101256, 0.097391, 0.093525, 0.089659, 0.085794, 0.081907, 0.078019, 0.074132, 0.070244, 0.066357, 0.062469, 0.058569, 0.054668, 0.050768, 0.046867, 0.042966, 0.039062, 0.035155, 0.031249, 0.027343, 0.023437, 0.019530, 0.015624, 0.011718, 0.007812, 0.003905, 0.000000], - ], - [ - [0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, -0.000170, -0.000401, -0.000631, -0.000862, -0.001093, -0.001324, -0.001555, -0.001786, -0.002017, -0.002248, -0.002629, -0.003800, -0.004971, -0.006143, -0.007314, -0.008485, -0.009656, -0.010827, -0.011999, -0.013170, -0.014341, -0.015931, -0.017854, -0.019778, -0.021701, -0.023625, -0.025548, -0.027472, -0.029395, -0.031319, -0.033242, -0.035202, -0.037590, -0.039978, -0.042366, -0.044754, -0.047142, -0.049530, -0.051918, -0.054306, -0.056694, -0.059082, -0.061595, -0.064142, -0.066690, -0.069237, -0.071784, -0.074332, -0.076879, -0.079426, -0.081974, -0.084521, -0.086958, -0.089360, -0.091762, -0.094164, -0.096566, -0.098968, -0.101370, -0.103772, -0.106174, -0.108550, -0.110533, -0.112515, -0.114498, -0.116481, -0.118464, -0.120447, -0.122430, -0.124413, -0.126396, -0.127877, -0.129218, -0.130559, -0.131900, -0.133241, -0.134582, -0.135923, -0.137264, -0.138605, -0.139159, -0.139689, -0.140219, -0.140748, -0.141278, -0.141807, -0.142337, -0.142867, -0.142785, -0.142391, -0.141997, -0.141603, -0.141208, -0.140814, -0.140420, -0.140026, -0.138758, -0.137365, -0.135972, -0.134580, -0.133187, -0.131794, -0.130401, -0.128338, -0.125908, -0.123477, -0.121047, -0.118616, -0.116186, -0.113755, -0.110258, -0.106756, -0.103253, -0.099751, -0.096248, -0.092746, -0.088181, -0.083606, -0.079030, -0.074455, -0.069879, -0.064569, -0.058924, -0.053280, -0.047636, -0.041810, -0.035207, -0.028604, -0.022001, -0.014908, -0.007453, 0.000000], - [0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, -0.000119, -0.000282, -0.000445, -0.000607, -0.000770, -0.000932, -0.001095, -0.001257, -0.001420, -0.001582, -0.001850, -0.002671, -0.003492, -0.004313, -0.005134, -0.005955, -0.006776, -0.007597, -0.008418, -0.009239, -0.010060, -0.011173, -0.012519, -0.013866, -0.015212, -0.016559, -0.017905, -0.019252, -0.020598, -0.021945, -0.023291, -0.024663, -0.026331, -0.027999, -0.029667, -0.031336, -0.033004, -0.034672, -0.036340, -0.038008, -0.039677, -0.041345, -0.043102, -0.044885, -0.046667, -0.048449, -0.050231, -0.052013, -0.053795, -0.055577, -0.057359, -0.059141, -0.060847, -0.062528, -0.064209, -0.065890, -0.067571, -0.069252, -0.070933, -0.072614, -0.074295, -0.075959, -0.077358, -0.078758, -0.080157, -0.081557, -0.082956, -0.084356, -0.085755, -0.087155, -0.088555, -0.089611, -0.090571, -0.091531, -0.092492, -0.093452, -0.094412, -0.095373, -0.096333, -0.097293, -0.097711, -0.098112, -0.098512, -0.098913, -0.099314, -0.099714, -0.100115, -0.100515, -0.100489, -0.100243, -0.099998, -0.099752, -0.099507, -0.099261, -0.099016, -0.098770, -0.097900, -0.096940, -0.095980, -0.095020, -0.094060, -0.093100, -0.092141, -0.090700, -0.088994, -0.087289, -0.085584, -0.083879, -0.082174, -0.080469, -0.077998, -0.075524, -0.073051, -0.070577, -0.068103, -0.065629, -0.062390, -0.059143, -0.055896, -0.052649, -0.049403, -0.045639, -0.041641, -0.037642, -0.033643, -0.029518, -0.024848, -0.020178, -0.015508, -0.010503, -0.005251, 0.000000], - [0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, -0.000074, -0.000175, -0.000275, -0.000376, -0.000477, -0.000577, -0.000678, -0.000779, -0.000879, -0.000980, -0.001147, -0.001660, -0.002173, -0.002687, -0.003200, -0.003713, -0.004227, -0.004740, -0.005253, -0.005767, -0.006280, -0.006971, -0.007803, -0.008636, -0.009468, -0.010301, -0.011133, -0.011966, -0.012798, -0.013631, -0.014463, -0.015311, -0.016344, -0.017377, -0.018410, -0.019442, -0.020475, -0.021508, -0.022540, -0.023573, -0.024606, -0.025639, -0.026726, -0.027829, -0.028932, -0.030035, -0.031137, -0.032240, -0.033343, -0.034446, -0.035548, -0.036651, -0.037711, -0.038756, -0.039802, -0.040847, -0.041893, -0.042939, -0.043984, -0.045030, -0.046076, -0.047111, -0.047989, -0.048867, -0.049745, -0.050623, -0.051501, -0.052379, -0.053257, -0.054135, -0.055012, -0.055682, -0.056292, -0.056903, -0.057514, -0.058125, -0.058735, -0.059346, -0.059957, -0.060568, -0.060842, -0.061107, -0.061371, -0.061635, -0.061899, -0.062163, -0.062427, -0.062691, -0.062689, -0.062551, -0.062412, -0.062273, -0.062135, -0.061996, -0.061857, -0.061719, -0.061187, -0.060599, -0.060011, -0.059423, -0.058834, -0.058246, -0.057658, -0.056765, -0.055704, -0.054643, -0.053582, -0.052521, -0.051460, -0.050399, -0.048848, -0.047296, -0.045743, -0.044190, -0.042637, -0.041084, -0.039057, -0.037025, -0.034993, -0.032961, -0.030929, -0.028563, -0.026045, -0.023528, -0.021010, -0.018416, -0.015497, -0.012577, -0.009657, -0.006537, -0.003268, 0.000000], - [0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, -0.000035, -0.000082, -0.000130, -0.000178, -0.000225, -0.000273, -0.000320, -0.000368, -0.000415, -0.000463, -0.000541, -0.000777, -0.001013, -0.001249, -0.001485, -0.001722, -0.001958, -0.002194, -0.002430, -0.002666, -0.002903, -0.003222, -0.003608, -0.003994, -0.004381, -0.004767, -0.005153, -0.005539, -0.005925, -0.006311, -0.006697, -0.007090, -0.007569, -0.008048, -0.008526, -0.009005, -0.009483, -0.009962, -0.010441, -0.010919, -0.011398, -0.011877, -0.012381, -0.012892, -0.013404, -0.013915, -0.014426, -0.014938, -0.015449, -0.015960, -0.016472, -0.016983, -0.017477, -0.017964, -0.018452, -0.018940, -0.019427, -0.019915, -0.020403, -0.020890, -0.021378, -0.021861, -0.022268, -0.022676, -0.023084, -0.023492, -0.023899, -0.024307, -0.024715, -0.025123, -0.025531, -0.025846, -0.026137, -0.026427, -0.026717, -0.027007, -0.027297, -0.027588, -0.027878, -0.028168, -0.028302, -0.028431, -0.028559, -0.028688, -0.028817, -0.028946, -0.029074, -0.029203, -0.029209, -0.029151, -0.029093, -0.029035, -0.028977, -0.028919, -0.028861, -0.028803, -0.028558, -0.028287, -0.028016, -0.027745, -0.027474, -0.027203, -0.026931, -0.026515, -0.026020, -0.025524, -0.025029, -0.024533, -0.024038, -0.023542, -0.022817, -0.022090, -0.021364, -0.020638, -0.019911, -0.019185, -0.018235, -0.017283, -0.016331, -0.015379, -0.014426, -0.013321, -0.012146, -0.010971, -0.009796, -0.008586, -0.007226, -0.005865, -0.004505, -0.003049, -0.001525, 0.000000], - [0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000050, 0.000117, 0.000184, 0.000252, 0.000319, 0.000387, 0.000454, 0.000522, 0.000589, 0.000656, 0.000766, 0.001096, 0.001427, 0.001757, 0.002087, 0.002417, 0.002748, 0.003078, 0.003408, 0.003739, 0.004069, 0.004518, 0.005061, 0.005605, 0.006148, 0.006691, 0.007235, 0.007778, 0.008322, 0.008865, 0.009408, 0.009962, 0.010631, 0.011301, 0.011971, 0.012641, 0.013310, 0.013980, 0.014650, 0.015320, 0.015989, 0.016659, 0.017370, 0.018091, 0.018813, 0.019535, 0.020256, 0.020978, 0.021700, 0.022421, 0.023143, 0.023865, 0.024567, 0.025263, 0.025959, 0.026656, 0.027352, 0.028048, 0.028744, 0.029440, 0.030137, 0.030827, 0.031423, 0.032019, 0.032615, 0.033211, 0.033807, 0.034403, 0.034999, 0.035595, 0.036191, 0.036657, 0.037087, 0.037517, 0.037946, 0.038376, 0.038806, 0.039235, 0.039665, 0.040095, 0.040305, 0.040509, 0.040713, 0.040916, 0.041120, 0.041323, 0.041527, 0.041731, 0.041753, 0.041683, 0.041613, 0.041543, 0.041473, 0.041402, 0.041332, 0.041262, 0.040922, 0.040544, 0.040166, 0.039787, 0.039409, 0.039031, 0.038653, 0.038058, 0.037345, 0.036632, 0.035920, 0.035207, 0.034494, 0.033781, 0.032735, 0.031687, 0.030640, 0.029592, 0.028545, 0.027497, 0.026120, 0.024740, 0.023359, 0.021979, 0.020598, 0.019008, 0.017322, 0.015636, 0.013950, 0.012215, 0.010269, 0.008323, 0.006376, 0.004310, 0.002155, 0.000000], - [0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000080, 0.000189, 0.000299, 0.000408, 0.000517, 0.000626, 0.000735, 0.000844, 0.000953, 0.001063, 0.001242, 0.001787, 0.002333, 0.002879, 0.003425, 0.003971, 0.004517, 0.005063, 0.005609, 0.006154, 0.006700, 0.007438, 0.008329, 0.009220, 0.010111, 0.011002, 0.011893, 0.012784, 0.013675, 0.014566, 0.015457, 0.016365, 0.017469, 0.018573, 0.019676, 0.020780, 0.021884, 0.022988, 0.024092, 0.025195, 0.026299, 0.027403, 0.028573, 0.029761, 0.030948, 0.032136, 0.033324, 0.034512, 0.035700, 0.036888, 0.038076, 0.039263, 0.040424, 0.041575, 0.042727, 0.043878, 0.045030, 0.046181, 0.047333, 0.048484, 0.049636, 0.050778, 0.051774, 0.052771, 0.053767, 0.054764, 0.055761, 0.056757, 0.057754, 0.058750, 0.059747, 0.060528, 0.061250, 0.061971, 0.062693, 0.063414, 0.064136, 0.064857, 0.065579, 0.066300, 0.066662, 0.067012, 0.067362, 0.067712, 0.068062, 0.068412, 0.068762, 0.069112, 0.069160, 0.069053, 0.068946, 0.068839, 0.068732, 0.068625, 0.068518, 0.068411, 0.067854, 0.067232, 0.066611, 0.065990, 0.065368, 0.064747, 0.064125, 0.063141, 0.061957, 0.060774, 0.059590, 0.058406, 0.057223, 0.056039, 0.054292, 0.052542, 0.050792, 0.049041, 0.047291, 0.045541, 0.043250, 0.040953, 0.038657, 0.036360, 0.034063, 0.031426, 0.028634, 0.025842, 0.023050, 0.020178, 0.016957, 0.013737, 0.010517, 0.007105, 0.003552, 0.000000], - [0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000141, 0.000333, 0.000525, 0.000718, 0.000910, 0.001102, 0.001294, 0.001486, 0.001678, 0.001870, 0.002192, 0.003198, 0.004204, 0.005210, 0.006216, 0.007222, 0.008228, 0.009234, 0.010240, 0.011246, 0.012252, 0.013647, 0.015354, 0.017061, 0.018768, 0.020474, 0.022181, 0.023888, 0.025595, 0.027302, 0.029009, 0.030749, 0.032879, 0.035009, 0.037140, 0.039270, 0.041400, 0.043531, 0.045661, 0.047791, 0.049922, 0.052052, 0.054258, 0.056485, 0.058711, 0.060938, 0.063165, 0.065392, 0.067619, 0.069845, 0.072072, 0.074299, 0.076337, 0.078313, 0.080290, 0.082267, 0.084244, 0.086221, 0.088198, 0.090174, 0.092151, 0.094094, 0.095519, 0.096944, 0.098369, 0.099794, 0.101219, 0.102644, 0.104069, 0.105494, 0.106919, 0.107739, 0.108391, 0.109042, 0.109694, 0.110345, 0.110997, 0.111648, 0.112299, 0.112951, 0.112758, 0.112539, 0.112320, 0.112101, 0.111883, 0.111664, 0.111445, 0.111226, 0.110443, 0.109371, 0.108299, 0.107227, 0.106156, 0.105084, 0.104012, 0.102940, 0.101213, 0.099393, 0.097572, 0.095752, 0.093931, 0.092111, 0.090290, 0.088075, 0.085643, 0.083211, 0.080779, 0.078347, 0.075915, 0.073483, 0.070586, 0.067687, 0.064788, 0.061889, 0.058989, 0.056090, 0.052849, 0.049604, 0.046360, 0.043115, 0.039870, 0.036455, 0.032962, 0.029468, 0.025975, 0.022446, 0.018760, 0.015074, 0.011388, 0.007628, 0.003814, 0.000000], - [0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000178, 0.000421, 0.000664, 0.000906, 0.001149, 0.001392, 0.001634, 0.001877, 0.002120, 0.002362, 0.002773, 0.004064, 0.005355, 0.006646, 0.007937, 0.009228, 0.010519, 0.011810, 0.013101, 0.014392, 0.015683, 0.017484, 0.019691, 0.021898, 0.024106, 0.026313, 0.028521, 0.030728, 0.032935, 0.035143, 0.037350, 0.039601, 0.042371, 0.045140, 0.047909, 0.050679, 0.053448, 0.056218, 0.058987, 0.061756, 0.064526, 0.067295, 0.070147, 0.073022, 0.075896, 0.078771, 0.081645, 0.084520, 0.087394, 0.090269, 0.093143, 0.096018, 0.098611, 0.101113, 0.103616, 0.106118, 0.108621, 0.111123, 0.113625, 0.116128, 0.118630, 0.121083, 0.122773, 0.124462, 0.126152, 0.127842, 0.129532, 0.131221, 0.132911, 0.134601, 0.136291, 0.137119, 0.137708, 0.138296, 0.138884, 0.139472, 0.140060, 0.140649, 0.141237, 0.141825, 0.141254, 0.140648, 0.140041, 0.139434, 0.138827, 0.138220, 0.137613, 0.137007, 0.135669, 0.133956, 0.132244, 0.130531, 0.128819, 0.127106, 0.125393, 0.123681, 0.121195, 0.118600, 0.116004, 0.113408, 0.110812, 0.108217, 0.105621, 0.102623, 0.099405, 0.096186, 0.092968, 0.089749, 0.086531, 0.083312, 0.079721, 0.076129, 0.072536, 0.068944, 0.065351, 0.061758, 0.057965, 0.054171, 0.050376, 0.046581, 0.042786, 0.038937, 0.035063, 0.031190, 0.027316, 0.023437, 0.019530, 0.015624, 0.011718, 0.007812, 0.003905, 0.000000], - ], -]; diff --git a/crates/pipeline/src/finish.rs b/crates/pipeline/src/finish.rs index f736e519858..0a595c61758 100644 --- a/crates/pipeline/src/finish.rs +++ b/crates/pipeline/src/finish.rs @@ -415,8 +415,7 @@ pub fn base_tone(s: &DevelopSettings, info: &SourceInfo, peak: f32) -> ToneMap { None if info.raw => ToneMap::rolloff_hdr(l.contrast, l.whites, l.blacks, peak), None => ToneMap::display_hdr(l.contrast, l.whites, l.blacks, peak), }, - // V7, with Whites moved out of the tone map: the curve stage applies Whites as measured against - // Lightroom (`crate::curve_stage`) + // V7, with Whites moved out of the tone map: the curve stage applies Whites (`crate::curve_stage`) Process::V9 => match info.camera_tone.as_ref().filter(|_| info.raw) { Some(curve) => ToneMap::camera_rolloff_hdr(curve, 0.0, 0.0, 0.0, peak), None if info.raw => ToneMap::rolloff_hdr(l.contrast, 0.0, l.blacks, peak), @@ -568,7 +567,7 @@ pub(crate) fn finish_with( // --- process V4: calibrated Contrast, Blacks (ProPhoto with the sRGB transfer) d = apply_light(d, light.as_ref(), preview_light.as_ref(), exact, srgb); - // --- process V9: Whites and the tone curves, as Lightroom applies them + // --- process V9: Whites and the tone curves, hue-preserving d = fp.curve_stage.as_ref().map_or(d, |stage| stage.apply(d)); // --- colour diff --git a/crates/pipeline/src/lib.rs b/crates/pipeline/src/lib.rs index 89c2e9f2d4e..a7a4152f01e 100644 --- a/crates/pipeline/src/lib.rs +++ b/crates/pipeline/src/lib.rs @@ -32,7 +32,7 @@ pub mod cull; pub mod curve; pub mod curve_stage; #[rustfmt::skip] -mod curve_stage_tables; +mod curve_stage_model; pub mod dust; pub mod finish; pub mod geometry; diff --git a/crates/ui-egui/src/panels/edit/curve.rs b/crates/ui-egui/src/panels/edit/curve.rs index a7ea96bc5c5..1711a8db54e 100644 --- a/crates/ui-egui/src/panels/edit/curve.rs +++ b/crates/ui-egui/src/panels/edit/curve.rs @@ -238,7 +238,7 @@ pub(super) fn curve_editor(app: &mut LightcraftApp, ui: &mut egui::Ui, id: Photo let from_screen = |q: Pos2| (((q.x - r.left()) / r.width()).clamp(0.0, 1.0) as f64, ((r.bottom() - q.y) / r.height()).clamp(0.0, 1.0) as f64); if ch == "parametric" { // The Effective curve: the one the renderer builds from the four region sliders for this - // process (the measured regions under V9 at the default splits), sampled here and rebuilt every + // process (the fitted regions under V9 at the default splits), sampled here and rebuilt every // frame. The graph holds no state of its own, so a slider moved by hand, a Reset or an Undo // redraws it from the settings in the same frame it changes. let model = ParametricGraph::new(d); diff --git a/crates/ui-egui/src/tests/curve.rs b/crates/ui-egui/src/tests/curve.rs index f3618611460..7c7a0e2162f 100644 --- a/crates/ui-egui/src/tests/curve.rs +++ b/crates/ui-egui/src/tests/curve.rs @@ -36,7 +36,7 @@ fn exec(h: &mut Headless, command: &str, params: serde_json::Value) -> serde_jso r["result"].clone() } -/// The parametric graph the panel draws for the selected photo's settings (its process decides measured or analytic). +/// The parametric graph the panel draws for the selected photo's settings (its process decides fitted or analytic). fn graph(h: &Headless) -> ParametricGraph { ParametricGraph::new(&develop(h)) } @@ -280,7 +280,7 @@ fn the_parametric_graph_paints_the_model_the_renderer_uses() { let model = graph(&h); let rect = curve_graph_rect(&mut h); let painted = painted_param_curve(&h, rect); - assert!(model.is_measured(), "the demo photo is on the latest process, which renders the measured regions"); + assert!(model.is_fitted(), "the demo photo is on the latest process, which renders the fitted regions"); let mut checked = 0; for i in 0..=24 { let x = i as f64 / 24.0; diff --git a/docs/curve-stage.md b/docs/curve-stage.md index 2fe3bde85eb..fea592dfb99 100644 --- a/docs/curve-stage.md +++ b/docs/curve-stage.md @@ -2,10 +2,10 @@ > **Changes:** [revision history](#revision-history) -Process V9 renders Whites, the parametric curve and the point curves the way Lightroom does, from measurements of -Camera Raw's output. V1 to V8 are unchanged (`docs/process-versions.md`). The code is -`crates/pipeline/src/curve_stage.rs`, its measured tables `crates/pipeline/src/curve_stage_tables.rs`, and the GPU -kernel's `curve_stage` in `crates/gpu/src/wgsl/finish.wgsl`. +Process V9 renders Whites, the parametric curve and the point curves the way Lightroom does, with LightCraft's own +model fitted to measurements of Camera Raw's output. V1 to V8 are unchanged (`docs/process-versions.md`). The code is +`crates/pipeline/src/curve_stage.rs`, the model's fitted constants `crates/pipeline/src/curve_stage_model.rs`, and the +GPU kernel's `curve_stage` in `crates/gpu/src/wgsl/finish.wgsl`. ## What was wrong @@ -26,11 +26,10 @@ After the tone map and V4's calibrated Contrast and Blacks, before the colour st 1. Convert linear Rec.2020 to linear ProPhoto RGB (D50, Bradford) and encode with the sRGB curve, as the V4 operators do (`light_v3::prophoto_matrices`). -2. Build the base table: Whites, then the parametric curve, then the master point curve. Whites and the four regions - are Camera Raw's measured output minus input (257 inputs each). Whites is measured at Β±25, Β±50 and Β±100, the - regions at Β±25, Β±50, Β±75 and Β±100, and amounts in between are interpolated linearly, towards 0 below 25. The - tables hold for Lightroom's default splits (25, 50, 75). With other splits the parametric curve is the analytic - model of the earlier processes. The table is kept non-decreasing. +2. Build the base table: Whites, then the parametric curve, then the master point curve. Whites and each of the four + regions add a fitted response to the diagonal (below). The regions are fitted for Lightroom's default splits + (25, 50, 75). With other splits the parametric curve is the analytic model of the earlier processes. The table is + kept non-decreasing. 3. Apply the base table to the largest and smallest channel. The middle channel keeps its relative position between them in linear light. 4. Apply the red, green and blue point curves to each channel. @@ -42,11 +41,24 @@ The tone map no longer applies Whites under V9 (`finish::base_tone`), and the V8 (`FinishParams::curves` is `None`). With Whites, the parametric curve and the point curves all neutral, the curve stage does not run. +## The model + +Each slider direction (negative and positive) of Whites and of each region has its own response, output minus input +on sRGB-encoded values: the sum of two smooth bumps. With `t` = |amount| / 100, + + response(x) = Ξ£ (a1 t + a2 tΒ² + a3 tΒ³) Β· bump(x, e^(p0 + p1 t), e^(q0 + q1 t)) + bump(x, p, q) = (x / m)^p Β· ((1 βˆ’ x) / (1 βˆ’ m))^q, m = p / (p + q) + +A bump is 0 at black and white and 1 at its peak `m`. The gain grows faster than linearly with the amount, and the +bump's position and width move with the amount, as Lightroom's regions widen and move when pushed harder. That is 7 +constants per bump, 14 per slider direction and 140 in all. The fit keeps every response growing with the amount at +every input and never acting against the slider, so dragging the graph moves the slider steadily. + ## The Edit panel's graph -The parametric graph draws the curve the photo renders, from `curve_stage::ParametricGraph`: the measured regions +The parametric graph draws the curve the photo renders, from `curve_stage::ParametricGraph`: the fitted regions under V9 at the default splits, else the analytic model. Dragging the line moves the region under the pointer by -the amount that puts the drawn curve where the pointer is. The measured tables are not linear in the amount, so the +the amount that puts the drawn curve where the pointer is. The fitted regions are not linear in the amount, so the amount is searched for, on the side of the starting value the drag moves to, on the curve as drawn (kept monotone, so where opposite regions fold it back the line is held flat by the peak to its left). A level out of the region's reach saturates at Β±100. A region that cannot move the line by half an 8-bit level in that direction keeps its value. @@ -58,18 +70,31 @@ Whites is not part of the graph, as in Lightroom. patches, with the settings in the DNG's XMP. It writes one neutral chart, Whites at each measured amount, and each parametric region at each measured amount. The charts are original test data. Every chart was rendered through Camera Raw to a 16-bit Adobe RGB (1998) TIFF. Only that output is measured, and nothing of Adobe's is copied or -shipped. `tools/lr_tone_charts.py tables RENDER_DIR OUT_RS` reads the grey steps of each render as sRGB-encoded -linear ProPhoto values and writes `curve_stage_tables.rs`. It needs numpy and tifffile -(`tools/requirements-lr-tone-charts.txt`). Running the tool again reproduces the committed charts and the committed -tables byte for byte. +shipped, and no measurement is committed. `tools/lr_tone_charts.py fit RENDER_DIR OUT_RS` reads the grey steps of +each render as sRGB-encoded linear ProPhoto values, fits the model to them and writes only its constants, +`curve_stage_model.rs`. It needs numpy, scipy and tifffile (`tools/requirements-lr-tone-charts.txt`). Running the +tool again reproduces the committed charts byte for byte, and the constants with the pinned packages. + +How close the model is to the measured response, as the stage renders it (both clamped to 0..1), over 257 inputs and +every measured amount, in 8-bit levels of the sRGB-encoded output: + +| Setting | negative: RMS | max | positive: RMS | max | +|---|---|---|---|---| +| Whites | 0.15 | 0.88 | 0.27 | 1.62 | +| Shadows | 0.39 | 2.18 | 0.34 | 1.37 | +| Darks | 0.33 | 1.73 | 0.19 | 1.32 | +| Lights | 0.05 | 0.17 | 0.37 | 1.04 | +| Highlights | 0.15 | 0.64 | 0.52 | 2.29 | + +Every largest error but one (Darks +50, at black) is at Β±75 or Β±100. -The grey-step tables leave out how colour is treated. To check that, the colour patches of the same renders were +The grey steps leave out how colour is treated. To check that, the colour patches of the same renders were predicted from the grey-step curves under the hue-preserving rule in step 3. The prediction is within 0.03 to 0.16 (OkLab Γ— 100) of Camera Raw's patches, against 0.3 to 3.4 for V8's per-channel curves. ## Limits -- The tables are measured with Lightroom's default splits. Moved splits use the earlier analytic model. +- The regions are fitted with Lightroom's default splits. Moved splits use the earlier analytic model. - The point curves' shape between the points is LightCraft's spline, not measured. What is measured for them is how they apply: hue preserving, then the red, green and blue curves per channel. - Local (mask) Whites keeps the earlier processes' operator. @@ -81,3 +106,4 @@ predicted from the grey-step curves under the hue-preserving rule in step 3. The |---|---|---| | 2026-11-10 | minor | Process V9: measured Whites and parametric curve, hue-preserving master curve | | 2026-11-11 | minor | The Edit panel's parametric graph draws and drags the measured regions under V9 | +| 2026-11-24 | minor | Whites and the regions are a fitted model instead of measured tables | diff --git a/docs/parity-checklist.md b/docs/parity-checklist.md index d115d21e547..da4aedf1646 100644 --- a/docs/parity-checklist.md +++ b/docs/parity-checklist.md @@ -185,7 +185,7 @@ differences and missing bindings are in [ui-parity.md](ui-parity.md#shortcuts). | LR-EDIT-LIGHT-SHADOWS | Shadows | P0 | βœ… | `ctl:light.shadows` | From process V2, the same base as Highlights: dark areas keep their local contrast when lifted (#632); from process V8, the gaps in dark lettering on a bright panel are not lifted into bright blocks. Alt/Option-drag shows shadow clipping (white, clipped channels in colour) | | LR-EDIT-LIGHT-WHITES | Whites | P0 | 🟑 | `ctl:light.whites`, `crates/pipeline/src/visualize.rs` | From process V9 Whites is measured against Camera Raw renders of synthetic grey steps and reaches into the midtones as Lightroom's does ([curve-stage.md](curve-stage.md)); not yet compared on photos per camera. V4 to V8 preserve V2 Whites for both signs; measured V2 check response error is 0.075 stops on the Sony test photos (`docs/light-v3.md`). Alt/Option-drag shows highlight clipping (black, clipped channels in colour) | | LR-EDIT-LIGHT-BLACKS | Blacks | P0 | 🟑 | `ctl:light.blacks`, `crates/pipeline/src/visualize.rs` | From process V4, global Blacks on the camera-look path uses a fitted per-channel/luminance mix. Check response error 0.424 to 0.077 stops on six held-out Sony photos; deepest tones still differ. Other sources and local adjustments retain V2 (`docs/light-v3.md`). Alt/Option-drag shows shadow clipping (white, clipped channels in colour) | -| LR-EDIT-LIGHT-CURVE-PARAM | Parametric curve | P0 | βœ… | `ctl:curve.highlights`, `ctl:curve.lights`, `ctl:curve.darks`, `ctl:curve.shadows`, `ctl:curve.split*`, `crates/pipeline/src/curve.rs` | from process V9 the regions are Camera Raw's measured response at the default splits, broad and additive ([curve-stage.md](curve-stage.md)); the graph draws the curve the photo renders (`ParametricGraph`: the measured regions under V9 at the default splits, else the analytic model); dragging the line moves the region under the pointer (one undo step) | +| LR-EDIT-LIGHT-CURVE-PARAM | Parametric curve | P0 | βœ… | `ctl:curve.highlights`, `ctl:curve.lights`, `ctl:curve.darks`, `ctl:curve.shadows`, `ctl:curve.split*`, `crates/pipeline/src/curve.rs` | from process V9 the regions are LightCraft's model fitted to Camera Raw's measured response at the default splits, broad and additive ([curve-stage.md](curve-stage.md)); the graph draws the curve the photo renders (`ParametricGraph`: the fitted regions under V9 at the default splits, else the analytic model); dragging the line moves the region under the pointer (one undo step) | | LR-EDIT-LIGHT-CURVE-POINT | Point curve | P0 | βœ… | `cmd:develop.curve`, `cmd:curve.reset`, `cmd:curve.presets`, `cmd:curve.applyPreset`, `cmd:curve.savePreset`, `cmd:curve.deletePreset`, `cmd:curve.importPresets`, `cmd:curve.exportPresets`, `cmd:file.importCurvePresets`, `cmd:file.exportCurvePresets`, `crates/engine/src/cmd/curves.rs`, `crates/ui-egui/src/panels/edit.rs` | click to add a point; drag a point in both axes (between its neighbours, input / output readout, one undo step per drag; βŒ₯-drag moves it a tenth as far for fine adjustment, issue #1363); drag empty space to add and drag; double-click removes; reset: double-click a channel selector (that channel), the Reset button under the graph (every curve incl. parametric) or right-click the graph (channel / all); Point Curve preset dropdown: own Linear / Medium Contrast / Strong Contrast, user presets (save the current point curves, delete by right-click; saved with the library), import / export as `.lccurve` JSON; from process V9 the master curve keeps hue as Lightroom's does (largest and smallest channel through the curve, the middle one in proportion), and the red, green and blue curves follow it per channel ([curve-stage.md](curve-stage.md)) | | LR-EDIT-LIGHT-CURVE-RGB | Per-channel curves | P0 | βœ… | `cmd:develop.curve` (`channel`) | | | LR-EDIT-LIGHT-CURVE-REFINESAT | Curve saturation compensation | P1 | βœ… | `ctl:curve.refineSaturation` | | diff --git a/docs/process-versions.md b/docs/process-versions.md index 3993fd7be04..4e2b73b3fdf 100644 --- a/docs/process-versions.md +++ b/docs/process-versions.md @@ -17,7 +17,7 @@ stronger Light sliders, issue #196) without changing a single photo someone has | **V6** | V5 plus: colour noise reduction filters the linear colour differences Rβˆ’Y and Bβˆ’Y with the joint method (issue #815, `docs/nr-color-joint.md`): edge-aware weights from a denoised guide shared by both differences, anisotropic diffusion over scales, a brake for isolated colour specks; Y is kept exactly. V1 to V5 keep the blurred chromaticity (`local::denoise`). CPU (`local::denoise`) and GPU (`render::denoise`) branch on `local::joint_colour_nr`. Renders with Color 0 are the same as V2's. | | **V7** | V6 plus: film grain from crystal layers ([grain.md](grain.md), `crates/pipeline/src/crystal.rs`), after AurΓ©lien Pierre's model: resolution independent (a preview is the export's grain box-downscaled), fading out at black and white, calibrated to Lightroom Classic's strength and width at mid grey. V1 to V6 keep their two-octave value noise exactly (`finish::ValueGrain`; on the GPU `F_GRAIN_MODEL` 0); `finish::GrainModel::new` picks the model per process. Renders without grain don't depend on this. | | **V8** | V7 plus: Highlights and Shadows take their edge-aware filter of log luminance without its fine detail (`local::detail_free`: each value clamped between its separable median at the V2 radius and the median of a 3Γ— wider neighbourhood) instead of V2's plain median (`local::base_keeps_gaps`), so the gaps in dark lettering on a bright panel are not lifted into bright blocks (issue #3460). CPU (`local::tone_base`) and GPU (`render::tone_base`) branch on it; the base plane is keyed by process. Renders without Highlights or Shadows (global or local) are the same as V7's. | -| **V9** (the latest) | V8 plus: Whites, the parametric curve and the point curves as Lightroom applies them ([curve-stage.md](curve-stage.md), `crates/pipeline/src/curve_stage.rs`), measured on Camera Raw renders of synthetic grey steps. Whites leaves the tone map and, with the parametric curve at Lightroom's default splits, comes from measured tables (Whites reaches into the midtones; the regions are broad and add; moved splits keep the analytic model of V1 to V8); the master curve acts hue-preserving on sRGB-encoded linear ProPhoto RGB (largest and smallest channel through the curve, the middle one in proportion in linear light), then the red, green and blue curves per channel, between the calibrated Contrast and Blacks and the colour stage. V1 to V8 keep Whites in the tone map and their per-channel curves on the output. CPU (`finish::finish_with`) and GPU (`finish.wgsl::curve_stage`) share the tables. With Whites, the parametric curve and the point curves neutral the curve stage does not run. | +| **V9** (the latest) | V8 plus: Whites, the parametric curve and the point curves as Lightroom applies them ([curve-stage.md](curve-stage.md), `crates/pipeline/src/curve_stage.rs`), measured on Camera Raw renders of synthetic grey steps. Whites leaves the tone map and, with the parametric curve at Lightroom's default splits, comes from LightCraft's model fitted to those measurements (Whites reaches into the midtones; the regions are broad and add; moved splits keep the analytic model of V1 to V8); the master curve acts hue-preserving on sRGB-encoded linear ProPhoto RGB (largest and smallest channel through the curve, the middle one in proportion in linear light), then the red, green and blue curves per channel, between the calibrated Contrast and Blacks and the colour stage. V1 to V8 keep Whites in the tone map and their per-channel curves on the output. CPU (`finish::finish_with`) and GPU (`finish.wgsl::curve_stage`) share the curve tables built from the model. With Whites, the parametric curve and the point curves neutral the curve stage does not run. | ## The rule diff --git a/docs/whats-new.md b/docs/whats-new.md index 0d61768f01e..20f50a4bcc0 100644 --- a/docs/whats-new.md +++ b/docs/whats-new.md @@ -2,13 +2,12 @@ ## Unreleased -### Whites and the tone curves behave as in Lightroom (process V9) -- Whites now reaches into the upper midtones as Lightroom's does, and the Highlights, Lights, Darks and Shadows - regions of the parametric curve are as broad as Lightroom's and add up the same way: both follow Lightroom's - measured response. A contrast curve no longer turns orange towards red: the point curve keeps colours' hue, and - the red, green and blue curves act on their channel after it. This is rendering process 9: new photos (and Reset) - get it, photos you already edited keep their look until you choose Photo β–Έ Update to Current Process. See - [Whites and the tone curves](curve-stage.md). +### Broader Whites and parametric curve, hue-preserving tone curves (process 9) +- Whites now reaches into the upper midtones, and the Highlights, Lights, Darks and Shadows regions of the + parametric curve are broader, overlap and add up when several are set. A contrast curve no longer turns orange + towards red: the point curve keeps colours' hue, and the red, green and blue curves act on their channel after it. + This is rendering process 9: new photos (and Reset) get it, photos you already edited keep their look until you + choose Photo β–Έ Update to Current Process. See [Whites and the tone curves](curve-stage.md). ### Flatpak updates - Help β–Έ Check for Updates can now reach the release service and update standalone Flatpak bundles. diff --git a/tools/lr_tone_charts.py b/tools/lr_tone_charts.py index 5aaf67d17da..3fb4fbf7716 100644 --- a/tools/lr_tone_charts.py +++ b/tools/lr_tone_charts.py @@ -5,11 +5,12 @@ Writes linear DNG charts (48 grey steps plus colour patches) with the settings embedded as XMP: one neutral chart, Whites at +-25/50/100 and each parametric region at +-25/50/75/100 (default splits). (render every DNG through Camera Raw to a 16-bit Adobe RGB (1998) TIFF with the same file name) - python3 tools/lr_tone_charts.py tables RENDER_DIR OUT_RS - Reads the renders and writes the Rust tables of `lightcraft_pipeline::curve_stage`. + python3 tools/lr_tone_charts.py fit RENDER_DIR OUT_RS + Reads the renders, fits LightCraft's model of each setting to them and writes the model's constants + (`lightcraft_pipeline::curve_stage_model`). The measurements themselves are not written out. The charts are original test data generated here; nothing in them comes from Adobe. Only Camera Raw's output is -measured. Requires numpy and tifffile (tools/requirements-lr-tone-charts.txt). +measured. Requires numpy, scipy and tifffile (tools/requirements-lr-tone-charts.txt). """ import json import os @@ -119,7 +120,7 @@ def variants(): return v -# ---- tables ------------------------------------------------------------------------------------------------- +# ---- measuring ---------------------------------------------------------------------------------------------- ADOBE_TO_XYZ = np.array([[0.5767309, 0.1855540, 0.1881852], [0.2973769, 0.6273491, 0.0752741], [0.0270343, 0.0706872, 0.9911085]]) # XYZ (D65) -> linear ProPhoto RGB (D50, Bradford), as `RgbSpace::to_space` @@ -138,7 +139,7 @@ def srgb_encode(v): def read_render(path): - """A Camera Raw render as RGB 0..1, after checking it is the 16-bit Adobe RGB (1998) TIFF the tables assume. + """A Camera Raw render as RGB 0..1, after checking it is the 16-bit Adobe RGB (1998) TIFF the fit assumes. Another export setting would still give plausible numbers, but wrong ones, so it is refused. """ @@ -181,33 +182,102 @@ def delta_table(neutral, edited): return d -def tables(render_dir, out_rs): - """Measure the Camera Raw renders in `render_dir` and write the Rust tables to `out_rs`.""" +# ---- fit ---------------------------------------------------------------------------------------------------- +# +# LightCraft's own model of each setting, fitted to the measured grey steps. Nothing measured is written out: only +# the model's constants. Per slider direction (negative, positive) the response (output minus input) is the sum of +# two bumps, each with a gain over the amount and a shape whose position and width change with the amount: +# +# t = |amount| / 100 +# response(x) = sum over the two bumps of (a1 t + a2 t^2 + a3 t^3) * bump(x, e^(p0 + p1 t), e^(q0 + q1 t)) +# bump(x, p, q) = (x / m)^p ((1 - x) / (1 - m))^q with m = p / (p + q): 0 at black and white, 1 at its peak m +# +# The fit keeps every response growing with the amount at every input, and never acting against the slider. + +FIT_SEED = 7 +FIT_STARTS = 16 +FIT_AMOUNTS = np.linspace(0, 1, 21) +GRID = np.linspace(0, 1, 257) + + +def bump(x, p, q): + """A bump of peak 1 at p / (p + q), 0 at black and white.""" + m = p / (p + q) + return np.exp(p * np.log(np.clip(x, 1e-12, 1) / m) + q * np.log(np.clip(1 - x, 1e-12, 1) / (1 - m))) + + +def response(params, t, x=GRID): + """The model's response of one slider direction at amount `t` (0..1) for inputs `x`.""" + out = 0.0 + for a1, a2, a3, p0, p1, q0, q1 in np.reshape(params, (2, 7)): + out = out + (a1 * t + a2 * t * t + a3 * t ** 3) * bump(x, np.exp(p0 + p1 * t), np.exp(q0 + q1 * t)) + return out + + +def fit_direction(amounts, deltas, sign): + """Fit one slider direction to its measured deltas (257 inputs each); returns the constants and the error.""" + from scipy.optimize import least_squares + rows = [(abs(a) / 100, d) for a, d in zip(amounts, deltas) if np.sign(a) == sign] + + def err(params): + """Error of the rendered curve in 8-bit levels, both sides clamped to 0..1 as the stage clamps.""" + return np.concatenate([(np.clip(GRID + response(params, t), 0, 1) - np.clip(GRID + d, 0, 1)) * 255 for t, d in rows]) + + def residual(params): + grow = np.array([sign * response(params, t) for t in FIT_AMOUNTS]) + return np.concatenate([err(params), 30 * 255 * np.minimum(np.diff(grow, axis=0), 0).ravel(), + 30 * 255 * np.minimum(grow, 0).ravel()]) + + rng = np.random.default_rng(FIT_SEED) + starts = [np.ravel([[sign * rng.uniform(0, 0.3), 0, 0, rng.uniform(-1.5, 2.5), 0, rng.uniform(-1.5, 2.5), 0] + for _ in range(2)]) for _ in range(FIT_STARTS)] + best = min((least_squares(residual, s, max_nfev=3000) for s in starts), key=lambda r: r.cost) + e = err(best.x) + return best.x, float(np.sqrt((e ** 2).mean())), float(np.abs(e).max()) + + +def fit(render_dir, out_rs): + """Fit the model to the Camera Raw renders in `render_dir` and write its constants to `out_rs`.""" patches = json.load(open(os.path.join(render_dir, "manifest.json")))["patches"] tif = lambda n: os.path.join(render_dir, f"curve__{n}.tif") n0 = grey_levels(tif("neutral"), patches) rows = lambda names: [delta_table(n0, grey_levels(tif(n), patches)) for n in names] - whites = rows([f"whites{a:+d}" for a in WHITES]) - regions = [rows([f"par_{r.lower()}{a:+d}" for a in REGION_AMOUNTS]) for r in REGIONS] - fmt = lambda t: "[" + ", ".join(f"{v:.6f}" for v in t) + "]" - s = ["// @generated by tools/lr_tone_charts.py from Camera Raw renders of its synthetic grey steps (docs/curve-stage.md).", - "// Output minus input of each setting on sRGB-encoded linear ProPhoto values, 257 evenly spaced inputs from 0 to 1.", + sets = [("Whites", WHITES, rows([f"whites{a:+d}" for a in WHITES]))] + sets += [(r, REGION_AMOUNTS, rows([f"par_{r.lower()}{a:+d}" for a in REGION_AMOUNTS])) for r in REGIONS] + from concurrent.futures import ProcessPoolExecutor + jobs = [(name, sign, amounts, deltas) for name, amounts, deltas in sets for sign in (-1, 1)] + with ProcessPoolExecutor() as pool: + done = list(pool.map(fit_direction, *zip(*[(a, d, s) for _, s, a, d in jobs]))) + fitted = {} + for (name, sign, _, _), (params, rms, worst) in zip(jobs, done): + fitted[name, sign] = params + print(f"{name:10s} {'+' if sign > 0 else '-'} rms {rms:.2f} max {worst:.2f} (8-bit levels)") + num = lambda v: f"{v:.6e}" + resp = lambda name, sign: "[" + ", ".join("[" + ", ".join(num(v) for v in b) + "]" for b in np.reshape(fitted[name, sign], (2, 7))) + "]" + pair = lambda name: f"[{resp(name, -1)}, {resp(name, 1)}]" + s = ["// Written by `tools/lr_tone_charts.py fit`: LightCraft's model of Whites and the parametric regions, fitted to the", + "// tool's grey-step charts (provenance in docs/curve-stage.md). Constants of the model only.", + "", + "/// One bump of a response: `[a1, a2, a3, p0, p1, q0, q1]`, gain `a1 t + a2 tΒ² + a3 tΒ³` (t = |amount| / 100), shape", + "/// exponents `e^(p0 + p1 t)` and `e^(q0 + q1 t)` ([`crate::curve_stage`]).", + "pub type Bump = [f64; 7];", + "/// A slider direction's response: two bumps, added.", + "pub type Response = [Bump; 2];", "", - f"pub const WHITES_AMOUNTS: [f32; {len(WHITES)}] = [{', '.join(f'{a}.0' for a in WHITES)}];", - f"pub static WHITES: [[f32; 257]; {len(WHITES)}] = [", *[f" {fmt(t)}," for t in whites], "];", + "/// Whites: negative, positive.", + f"pub const WHITES: [Response; 2] = {pair('Whites')};", "", - "/// Shadows, Darks, Lights, Highlights at the default splits (25, 50, 75).", - f"pub const REGION_AMOUNTS: [f32; {len(REGION_AMOUNTS)}] = [{', '.join(f'{a}.0' for a in REGION_AMOUNTS)}];", - f"pub static REGIONS: [[[f32; 257]; {len(REGION_AMOUNTS)}]; 4] = ["] - for r in regions: - s += [" ["] + [f" {fmt(t)}," for t in r] + [" ],"] - s += ["];", ""] + "/// Shadows, Darks, Lights, Highlights at the default splits (25, 50, 75): negative, positive.", + "pub const REGIONS: [[Response; 2]; 4] = [", + *[f" {pair(r)}," for r in REGIONS], + "];", + ""] with open(out_rs, "w") as f: f.write("\n".join(s)) def main(): - """Command line: `charts OUT_DIR` or `tables RENDER_DIR OUT_RS`.""" + """Command line: `charts OUT_DIR` or `fit RENDER_DIR OUT_RS`.""" if len(sys.argv) == 3 and sys.argv[1] == "charts": out = sys.argv[2] os.makedirs(out, exist_ok=True) @@ -215,8 +285,8 @@ def main(): json.dump(dict(patches=patches), open(os.path.join(out, "manifest.json"), "w")) for name, settings in variants().items(): write_dng(os.path.join(out, f"curve__{name}.dng"), img, xmp(**settings)) - elif len(sys.argv) == 4 and sys.argv[1] == "tables": - tables(sys.argv[2], sys.argv[3]) + elif len(sys.argv) == 4 and sys.argv[1] == "fit": + fit(sys.argv[2], sys.argv[3]) else: sys.exit(__doc__) diff --git a/tools/requirements-lr-tone-charts.txt b/tools/requirements-lr-tone-charts.txt index 3763d03c1d7..8391b1cd899 100644 --- a/tools/requirements-lr-tone-charts.txt +++ b/tools/requirements-lr-tone-charts.txt @@ -1,5 +1,6 @@ -# Python packages for tools/lr_tone_charts.py (crates/pipeline/src/curve_stage_tables.rs, docs/curve-stage.md). +# Python packages for tools/lr_tone_charts.py (crates/pipeline/src/curve_stage_model.rs, docs/curve-stage.md). # Needs Python 3.12 or newer (numpy 2.5); use a matching interpreter, e.g. python3.12 -m venv. # python3.12 -m venv .venv-lr-tone && .venv-lr-tone/bin/pip install -r tools/requirements-lr-tone-charts.txt numpy==2.5.4 +scipy==1.18.1 tifffile==2026.11.8 From c9dfb533cc9401d641eefa6b9ecaead1845eaecc Mon Sep 17 00:00:00 2001 From: smi-leonivkovic Date: Tue, 24 Nov 2026 08:49:38 +0100 Subject: [PATCH 27/51] LR-EDIT-COLOR-MIXER-HSL: the colour mixer is a fitted model, not a measured table (#523) Review on #4081: `mixer_stage.bin` (394 KB, `include_bytes!`) is gone, and so is the tool step that wrote it (`lr_mixer_charts.py table`). - `mixer_stage_model.rs` holds the model's 168 constants, written by `lr_mixer_charts.py fit` from the same chart renders: per band a centre and a width on each side, shared by its three sliders; per kind of slider and output a gain over the amount and a chroma/lightness dependence; per band, kind and output an amplitude. - Held-out photos, the measured table vs the model: tone 7.008 -> 7.015, colour 1.314 -> 1.288 (OkLab x 100). On the charts the model is coarser (0.35 / 0.24 / 0.55 against 0.04 / 0.05 / 0.12 for the table); a 1,584-constant model was closer on the charts and no better on photos. - Tests are relational: responses stay finite and in range, each band acts around its own centre, small amounts do little, sliders combine. - Code comments and the release note describe the mixer in our own words. --- crates/pipeline/src/lib.rs | 2 + crates/pipeline/src/mixer_stage.bin | Bin 394092 -> 0 bytes crates/pipeline/src/mixer_stage.rs | 173 ++++++++++------------- crates/pipeline/src/mixer_stage_model.rs | 28 ++++ docs/mixer-stage.md | 70 ++++++--- docs/parity-checklist.md | 2 +- docs/whats-new.md | 12 +- tools/lr_mixer_charts.py | 144 +++++++++++++++---- tools/requirements-lr-tone-charts.txt | 2 +- 9 files changed, 281 insertions(+), 152 deletions(-) delete mode 100644 crates/pipeline/src/mixer_stage.bin create mode 100644 crates/pipeline/src/mixer_stage_model.rs diff --git a/crates/pipeline/src/lib.rs b/crates/pipeline/src/lib.rs index a78955ffce8..aa06141a8c2 100644 --- a/crates/pipeline/src/lib.rs +++ b/crates/pipeline/src/lib.rs @@ -48,6 +48,8 @@ pub mod lut; pub mod mask_space; pub mod masks; pub mod mixer_stage; +#[rustfmt::skip] +mod mixer_stage_model; pub mod nrc_joint; #[cfg(test)] mod nrc_joint_reference; diff --git a/crates/pipeline/src/mixer_stage.bin b/crates/pipeline/src/mixer_stage.bin deleted file mode 100644 index 1a82ee5333d23757494afeaf2a10812c55bb4afb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 394092 zcmb@P30O_r`}lYBgi@LZsiZ+8>728hM52g9LL|u?A~Ns06O~e-lxUDrBn={^d8Sl| zq=__&GDI}~*E-$%{fYa(*V*fy=ZVff`|S3+*Sp^JS?_w^cP*Yb&xQ@dFbVL(3x4>( z4+r>J2!1fEtN_C_+l|=0;Wdvkapi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().ok()).map(f32::from_le_bytes) -} - -/// The little-endian `u32` at byte `off` of the table, if it is inside. -fn u32_at(off: usize) -> Option { - TABLE.get(off..off + 4).and_then(|b| b.try_into().ok()).map(u32::from_le_bytes) -} - -/// The table's level keys (chroma per lightness level, lightness), when its header and size match this code. -fn levels() -> Option<([[f32; 3]; 3], [f32; 3])> { - let dims = [1, SLIDERS, AMOUNTS.len(), ROWS, OUTPUTS, HUES]; - let header_ok = TABLE.get(..4) == Some(b"LCCS") - && dims.iter().enumerate().all(|(i, d)| u32_at(4 + 4 * i) == Some(*d as u32)) - && AMOUNTS.iter().enumerate().all(|(i, a)| f32_at(28 + 4 * i) == Some(*a)); - if !header_ok || TABLE.len() != HEADER + SLIDERS * AMOUNTS.len() * ROWS * OUTPUTS * ROW_BYTES { - return None; - } - let at = |i: usize| f32_at(28 + 4 * AMOUNTS.len() + 4 * i); - let chroma = [[at(0)?, at(1)?, at(2)?], [at(3)?, at(4)?, at(5)?], [at(6)?, at(7)?, at(8)?]]; - let light = [at(9)?, at(10)?, at(11)?]; - Some((chroma, light)) -} - -/// Measured response of `slider` at measured amount `amount`, row `row`, output `out`, hue bin `bin`. -fn measured(slider: usize, amount: usize, row: usize, out: usize, bin: usize) -> f32 { - let off = HEADER + (((slider * AMOUNTS.len() + amount) * ROWS + row) * OUTPUTS + out) * ROW_BYTES; - let scale = f32_at(off).unwrap_or(0.0); - TABLE.get(off + 4 + bin).map_or(0.0, |q| scale * f32::from(i8::from_le_bytes([*q]))) -} - -/// The two measured amounts around `v` and the weight of the upper: `None` stands for the unedited 0. -fn bracket(v: f32) -> (Option, Option, f32) { - let v = v.clamp(AMOUNTS[0], AMOUNTS[AMOUNTS.len() - 1]); - let mut keys: Vec<(f32, Option)> = AMOUNTS.iter().enumerate().map(|(i, a)| (*a, Some(i))).collect(); - keys.push((0.0, None)); - keys.sort_by(|a, b| a.0.total_cmp(&b.0)); - for w in keys.windows(2) { - if let [k0, k1] = w - && v >= k0.0 - && v <= k1.0 - { - let f = if k1.0 > k0.0 { (v - k0.0) / (k1.0 - k0.0) } else { 0.0 }; - return (k0.1, k1.1, f); - } - } - (None, None, 0.0) +/// The fitted response of slider `slider` (band Γ— 3 + kind) output `out` at amount `t` (βˆ’1 to 1) for OkLCh chroma `c`, +/// lightness `l` and hue `h` (degrees): a hue shift in degrees, a relative chroma change or a lightness change. +/// `amp Β· gain(t) Β· band(h) Β· level(dc, dl)` with the band's shape shared by its three sliders, and the gain and level +/// dependence shared by all bands' sliders of one kind (docs/mixer-stage.md). +fn response(slider: usize, out: usize, t: f64, c: f64, l: f64, h: f64) -> f64 { + let (band, kind) = (slider / 3, slider % 3); + let (Some([centre, left, right]), Some(k), Some(amp)) = + (m::BANDS.get(band), m::KINDS.get(kind).and_then(|k| k.get(out)), m::AMPS.get(band).and_then(|a| a.get(kind)).and_then(|a| a.get(out))) + else { + return 0.0; + }; + let [g1, g2, g3, g4, g5, g6, ac, al] = *k; + let (at, dc, dl) = (t.abs(), (c - m::REF_CHROMA.0) / m::REF_CHROMA.1, (l - m::REF_LIGHT.0) / m::REF_LIGHT.1); + let gain = if t < 0.0 { g1 * at + g2 * at * at + g3 * at * at * at } else { g4 * at + g5 * at * at + g6 * at * at * at }; + let d = (h - centre + 180.0).rem_euclid(360.0) - 180.0; + let z = d / (if d < 0.0 { *left } else { *right }).exp(); + amp * gain * (-0.5 * z * z).exp() * (ac * dc + al * dl).exp() } /// The combined table of `(slider, amount)` pairs: hue and lightness changes add, chroma changes multiply. fn combine(sliders: &[(usize, f32)]) -> Option> { - // each slider's two measured amounts and weight, found once - let active: Vec<(usize, (Option, Option, f32))> = - sliders.iter().filter(|(_, v)| *v != 0.0 && v.is_finite()).map(|(s, v)| (*s, bracket(*v))).collect(); + let active: Vec<(usize, f64)> = sliders + .iter() + .filter(|(i, v)| *v != 0.0 && v.is_finite() && *i < SLIDERS) + .map(|(i, v)| (*i, (f64::from(*v) / 100.0).clamp(-1.0, 1.0))) + .collect(); if active.is_empty() { return None; } let mut t = Box::new([0.0f32; TABLE_LEN]); for row in 0..ROWS { + let (li, ci) = (row / 3, row % 3); + let l = f64::from(LIGHT.get(li).copied().unwrap_or(0.0)); + let c = f64::from(CHROMA.get(li).and_then(|r| r.get(ci)).copied().unwrap_or(0.0)); for out in 0..OUTPUTS { for bin in 0..HUES { + let h = bin as f64 * (360.0 / HUES as f64); let mut acc = if out == 1 { 1.0 } else { 0.0 }; - for (slider, (a0, a1, f)) in &active { - let (a0, a1, f) = (*a0, *a1, *f); - let at = |a: Option| a.map_or(0.0, |a| measured(*slider, a, row, out, bin)); - let r = at(a0) * (1.0 - f) + at(a1) * f; + for (slider, t) in &active { + let r = response(*slider, out, *t, c, l, h) as f32; match out { 0 => acc += r.to_radians(), 1 => acc *= (1.0 + r).max(0.0), @@ -130,7 +100,7 @@ fn combine(sliders: &[(usize, f32)]) -> Option> { Some(t) } -/// Position of `x` between the three measured levels `keys`: (lower, upper, weight of the upper), clamped. +/// Position of `x` between the three levels `keys`: (lower, upper, weight of the upper), clamped. fn level(keys: &[f32; 3], x: f32) -> (usize, usize, f32) { if x <= keys[0] { (0, 0, 0.0) @@ -149,13 +119,12 @@ impl MixerStage { if s.process.process() < Process::V9 { return None; } - let (chroma, light) = levels()?; let sliders: Vec<(usize, f32)> = s.mixer.bands().iter().flat_map(|b| [b.hue, b.sat, b.lum]).enumerate().map(|(i, v)| (i, v as f32)).collect(); - combine(&sliders).map(|table| MixerStage { chroma, light, table }) + combine(&sliders).map(|table| MixerStage { chroma: CHROMA, light: LIGHT, table }) } /// The (hue shift, chroma factor, lightness change) for OkLCh `l`, `c`, `h`: linear in hue, bilinear in the chroma - /// and lightness levels, clamped to the measured ones. Below the lowest measured chroma the lightness change fades + /// and lightness levels, clamped to the table's. Below the lowest chroma level the lightness change fades /// out towards neutral. pub fn look(&self, l: f32, c: f32, h: f32) -> [f32; 3] { let hd = h.to_degrees().rem_euclid(360.0) / 5.0; @@ -216,25 +185,39 @@ mod tests { (d + 180.0).rem_euclid(360.0) - 180.0 } + /// Every slider's fitted response stays finite and within plausible ranges over the colours the table samples, + /// and is 0 at amount 0. #[test] - fn the_table_matches_this_code() { - let (chroma, light) = levels().expect("table header"); - assert!(chroma.iter().all(|c| c.windows(2).all(|w| w[0] < w[1])) && light.windows(2).all(|w| w[0] < w[1]), "{chroma:?} {light:?}"); - // every scale is finite and the values stay within plausible ranges + fn the_fitted_responses_stay_plausible() { for slider in 0..SLIDERS { - for a in 0..AMOUNTS.len() { - for row in 0..ROWS { - for out in 0..OUTPUTS { - let m = (0..HUES).map(|b| measured(slider, a, row, out, b).abs()).fold(0.0, f32::max); - // Blue Luminance βˆ’100 darkens pale blues and raises their chroma about sixfold - let limit = [180.0, 8.0, 0.5][out]; - assert!(m.is_finite() && m <= limit, "slider {slider} amount {a} row {row} out {out}: {m}"); + for out in 0..OUTPUTS { + // Blue Luminance βˆ’100 darkens pale blues and raises their chroma severalfold + let limit = [180.0, 8.0, 0.5][out]; + for t in [-1.0, -0.6, -0.25, 0.3, 0.75, 1.0] { + for (li, row) in CHROMA.iter().enumerate() { + for c in row { + for bin in 0..HUES { + let r = response(slider, out, t, f64::from(*c), f64::from(LIGHT[li]), bin as f64 * 5.0); + assert!(r.is_finite() && r.abs() <= limit, "slider {slider} out {out} at {t}: {r}"); + } + } } } + assert_eq!(response(slider, out, 0.0, 0.1, 0.7, 50.0), 0.0); } } } + /// Each band acts around its own centre: a slider moves colours at its band's centre more than colours half the + /// hue circle away. + #[test] + fn each_band_acts_around_its_own_centre() { + for (band, [centre, ..]) in m::BANDS.iter().enumerate() { + let at = |h: f64| response(band * 3 + 1, 1, 1.0, 0.09, 0.75, h).abs(); + assert!(at(*centre) > 5.0 * at(centre + 180.0), "band {band}: {} vs {}", at(*centre), at(centre + 180.0)); + } + } + #[test] fn only_v8_with_a_mixer_gets_the_stage() { assert!(MixerStage::new(&v9()).is_none()); @@ -252,7 +235,7 @@ mod tests { let mut s = v9(); s.mixer.orange = Hsl { hue: 0.0, sat: -60.0, lum: 0.0 }; let st = MixerStage::new(&s).expect("stage"); - // Lightroom's Orange centre sits near OkLab hue 51 + // the Orange band's centre sits near OkLab hue 51 let orange = colour(0.7, 0.1, 55.0); let out = st.apply(orange); assert!(lch_of(out)[1] < lch_of(orange)[1] * 0.7, "{:?} -> {:?}", lch_of(orange), lch_of(out)); @@ -267,7 +250,7 @@ mod tests { s.mixer.blue.hue = -100.0; let st = MixerStage::new(&s).expect("stage"); let blue = colour(0.6, 0.1, 255.0); - // Lightroom's Blue Hue βˆ’100 turns blue towards aqua (lower OkLab hue) + // Blue Hue βˆ’100 turns blue towards aqua (lower OkLab hue) assert!(hue_shift(blue, st.apply(blue)) < -10.0, "{}", hue_shift(blue, st.apply(blue))); let mut s = v9(); s.mixer.green.lum = -80.0; @@ -287,7 +270,7 @@ mod tests { }; let (a, b, c, d) = (shift(10.0), shift(25.0), shift(60.0), shift(100.0)); assert!(a < b && b < c && c < d, "{a} {b} {c} {d}"); - assert!((a - b * 0.4).abs() < 0.05 * b.max(1.0), "below 25 the effect fades linearly: {a} vs {b}"); + assert!(a < b * 0.5, "a small amount does little: {a} vs {b}"); } #[test] @@ -303,7 +286,7 @@ mod tests { s.mixer.orange.sat = 40.0; s.mixer.orange.lum = -30.0; }); - // on a measured node (lightness and chroma level 1, hue bin 11), where no interpolation blurs the rule + // on a table node (lightness and chroma level 1, hue bin 11), where no interpolation blurs the rule let (l, c, h) = (a.light[1], a.chroma[1][1], 55f32.to_radians()); let (ra, rb, r) = (a.look(l, c, h), b.look(l, c, h), both.look(l, c, h)); assert!((r[1] - ra[1] * rb[1]).abs() < 1e-5, "chroma changes multiply: {ra:?} {rb:?} {r:?}"); diff --git a/crates/pipeline/src/mixer_stage_model.rs b/crates/pipeline/src/mixer_stage_model.rs new file mode 100644 index 00000000000..2259bd359cf --- /dev/null +++ b/crates/pipeline/src/mixer_stage_model.rs @@ -0,0 +1,28 @@ +// Written by `tools/lr_mixer_charts.py fit`: LightCraft's model of the colour mixer, fitted to the tool's OkLCh +// charts (provenance in docs/mixer-stage.md). Constants of the model only. + +/// The model's reference chroma and lightness: `dc = (C - centre) / scale`, `dl` likewise. +pub const REF_CHROMA: (f64, f64) = (0.09, 0.05); +pub const REF_LIGHT: (f64, f64) = (0.75, 0.15); + +/// Per band (Red, Orange, Yellow, Green, Aqua, Blue, Purple, Magenta): centre (OkLab hue, degrees), and the log +/// width below and above it. +pub const BANDS: [[f64; 3]; 8] = [[1.056355e+01, 2.142675e+00, 2.882902e+00], [5.235518e+01, 2.955835e+00, 2.924987e+00], [9.557576e+01, 2.870749e+00, 2.863375e+00], [1.376844e+02, 2.921264e+00, 2.829833e+00], [1.765499e+02, 2.695884e+00, 3.410620e+00], [2.508539e+02, 3.546682e+00, 3.470813e+00], [3.203744e+02, 3.494201e+00, 2.515159e+00], [3.506300e+02, 2.465887e+00, 2.192506e+00]]; +/// Per kind of slider (Hue, Saturation, Luminance) and output (hue shift, chroma change, lightness change): +/// `[g1, g2, g3, g4, g5, g6, ac, al]`, the gain over the amount and the dependence on chroma and lightness. +pub const KINDS: [[[f64; 8]; 3]; 3] = [ + [[-4.323290e+01, 1.140123e+01, -1.971998e+00, 3.579899e+01, -3.396945e+00, 1.139293e-01, 3.039906e-03, -1.299506e-02], [1.632521e-01, 1.817798e-01, -1.448031e-01, -2.445462e-01, 1.451632e-01, 3.425786e-03, -4.306765e-02, 2.213804e-02], [1.531619e-02, 1.438906e-02, -1.266002e-02, -1.390940e-02, 1.278640e-02, -4.338112e-03, 3.129566e-01, 2.375574e-02]], + [[3.273785e+00, -1.244630e+00, 4.423037e-01, -1.170054e+00, -2.740789e-01, 3.109724e-01, 1.016000e-01, -4.698930e-02], [-9.942227e-01, 8.075213e-02, -1.624837e-02, 4.043782e-01, 8.378880e-02, 7.812639e-02, -4.461127e-02, 2.679039e-02], [3.407854e-02, -7.774084e-03, 1.181682e-03, -2.030212e-02, -4.497270e-03, -3.568729e-03, 3.405041e-01, 6.932380e-02]], + [[1.668229e+00, 2.247261e+00, -2.874728e+00, -1.670834e+00, 9.233549e-01, -1.132851e-01, 2.303680e-01, 2.692762e-01], [2.692747e-01, 8.645293e-01, -6.701797e-01, -4.049544e-01, 1.613264e-01, -3.954560e-02, 3.810795e-01, 7.054621e-01], [-1.357489e-01, -6.734327e-02, 1.574065e-04, 1.379849e-01, -4.921972e-02, 9.846145e-03, 2.549411e-01, 1.667821e-01]], +]; +/// Per band, kind and output: the amplitude. +pub const AMPS: [[[f64; 3]; 3]; 8] = [ + [[7.783745e-01, 1.463725e+00, -1.045525e+00], [-1.586499e+00, 9.551631e-01, 7.593528e-01], [1.374411e+00, 5.434142e-01, 1.060449e+00]], + [[1.204791e+00, 2.029242e+00, -3.439860e+00], [-3.753353e+00, 9.458131e-01, 1.418248e-01], [1.840221e+00, 4.050216e-01, 1.224534e+00]], + [[1.138206e+00, -7.413565e-01, -1.493105e+00], [-1.771401e+00, 9.581541e-01, -6.985713e-01], [4.703549e-01, 4.010265e-01, 1.161590e+00]], + [[1.035375e+00, -1.813417e+00, 1.526335e+00], [3.710304e-01, 1.051789e+00, -2.632189e-01], [-3.499853e-01, 6.077505e-01, 1.123950e+00]], + [[1.157134e+00, 1.099041e+00, 1.051931e+00], [2.990588e-01, 1.028351e+00, 3.761758e-01], [-7.947505e-01, 1.878065e+00, 8.466702e-01]], + [[2.147215e+00, 1.369851e+00, 3.388000e+00], [3.167160e+00, 1.241693e+00, 2.524865e+00], [-5.042469e+00, 2.143033e+00, 1.455712e+00]], + [[1.409940e+00, -1.366548e+00, -1.691332e+00], [-5.005204e-02, 1.027433e+00, 1.797208e+00], [-1.925561e-01, 1.178752e+00, 1.173833e+00]], + [[6.165394e-01, -9.364707e-02, -3.676874e-01], [-1.062197e-01, 1.043411e+00, 8.290845e-01], [5.187354e-02, 8.899672e-01, 1.035930e+00]], +]; diff --git a/docs/mixer-stage.md b/docs/mixer-stage.md index 4e3a2187651..321fe53ab51 100644 --- a/docs/mixer-stage.md +++ b/docs/mixer-stage.md @@ -2,10 +2,10 @@ > **Changes:** [revision history](#revision-history) -Process V9 renders the colour mixer (Hue, Saturation and Luminance of the eight bands) the way Lightroom does, from -measurements of Camera Raw's output. V1 to V8 are unchanged (`docs/process-versions.md`). The code is -`crates/pipeline/src/mixer_stage.rs`, its measured table `crates/pipeline/src/mixer_stage.bin`, and the GPU kernel's -`mixer_stage` in `crates/gpu/src/wgsl/finish.wgsl`. +Process V9 renders the colour mixer (Hue, Saturation and Luminance of the eight bands) the way Lightroom does, with +LightCraft's own model fitted to measurements of Camera Raw's output. V1 to V8 are unchanged +(`docs/process-versions.md`). The code is `crates/pipeline/src/mixer_stage.rs`, the model's fitted constants +`crates/pipeline/src/mixer_stage_model.rs`, and the GPU kernel's `mixer_stage` in `crates/gpu/src/wgsl/finish.wgsl`. ## What was wrong @@ -30,12 +30,11 @@ fine colour charts: After the tone map and V4's calibrated Contrast and Blacks, before the curve stage ([curve-stage.md](curve-stage.md)): 1. Convert linear Rec.2020 to OkLCh. -2. Look up the response of every mixer slider that is set in Camera Raw's measured table: for the pixel's hue (72 - bins of 5Β°), chroma and lightness, the hue shift, the relative chroma change and the lightness change. The table - holds each slider at Β±25, Β±50, Β±75 and Β±100. Amounts in between are interpolated linearly, towards 0 below 25. - Hue is interpolated linearly. Chroma and lightness are interpolated bilinearly between the three measured levels - of each, and clamped outside them. Below the lowest measured chroma the lightness change fades out, so greys stay - grey. +2. Look up the response of every mixer slider that is set, from the model (below), sampled once per render into a + table: for the pixel's hue (72 bins of 5Β°), chroma and lightness, the hue shift, the relative chroma change and + the lightness change. Hue is interpolated linearly. Chroma and lightness are interpolated bilinearly between three + levels of each (lightness 0.55, 0.78 and 0.92, chroma levels lower for brighter colours), and clamped outside + them. Below the lowest chroma level the lightness change fades out, so greys stay grey. 3. All sliders act on the same input colour. Their hue and lightness changes add and their chroma changes multiply (charts with several sliders at once: closer than adding). 4. Convert back to linear Rec.2020. @@ -45,28 +44,60 @@ stage does not run. Saturation, Vibrance, Point Color, B&W and Colour Grading ke now after the curve stage (V1 to V8 run them before the output curves). Calibration stays scene linear, before the tone map. +## The model + +168 constants (`mixer_stage_model.rs`). For slider kind `k` (Hue, Saturation, Luminance) of band `b` and output `o` +(hue shift in degrees, relative chroma change, lightness change), with `t` = amount / 100, `dc` = (C βˆ’ 0.09) / 0.05 +and `dl` = (L βˆ’ 0.75) / 0.15 for the colour's OkLCh chroma and lightness: + + response = amp[b][k][o] Β· gain[k][o](t) Β· band[b](h) Β· exp(ac dc + al dl) + gain(t) = g1 |t| + g2 tΒ² + g3 |t|Β³ (g4, g5, g6 for positive amounts) + band(h) = exp(βˆ’zΒ² / 2), z = wrap(h βˆ’ centre) / e^(left or right of the centre) + +- **Per band** (24 constants): its centre on the OkLab hue circle and its width on each side, shared by the band's + Hue, Saturation and Luminance sliders. +- **Per kind and output** (72 constants): the gain over the amount, which grows faster than linearly, and the + dependence on the colour's chroma and lightness, shared by all eight bands. +- **Per band, kind and output** (72 constants): an amplitude. + ## How it was measured `tools/lr_mixer_charts.py charts OUT_DIR` writes linear DNG charts of OkLCh patches (72 hues Γ— 3 chroma levels Γ— 3 lightness levels, patches outside sRGB left out), with the settings in the DNG's XMP. It writes one neutral chart and each band's Hue, Saturation and Luminance at each measured amount (193 charts). The charts are original test data. Every chart was rendered through Camera Raw to a 16-bit Adobe RGB (1998) TIFF. Only that output is measured, and -nothing of Adobe's is copied or shipped. `tools/lr_mixer_charts.py table RENDER_DIR OUT_BIN` reads each render's -patches as OkLab, takes each setting's response against Camera Raw's own neutral chart, and writes -`mixer_stage.bin` (format in the tool's docstring: per row a scale and 72 signed bytes, 394 KB). It needs numpy and -tifffile (`tools/requirements-lr-tone-charts.txt`). Running the tool again reproduces the committed charts and the -committed table byte for byte. +nothing of Adobe's is copied or shipped. `tools/lr_mixer_charts.py fit RENDER_DIR OUT_RS` reads each render's +patches as OkLab, takes each setting's response against Camera Raw's own neutral chart, fits the model to it and +writes only the model's constants, `mixer_stage_model.rs`. No measurement is committed. It needs numpy, scipy and +tifffile (`tools/requirements-lr-tone-charts.txt`). Running the tool again reproduces the committed charts byte for +byte, and the constants with the pinned packages. Camera Raw's neutral render desaturates bright colours: patches of one nominal chroma come out about three times -less chromatic at the top lightness level than at the bottom. The table therefore keeps chroma keys per lightness -level. Predicting Camera Raw's edited charts from its neutral chart with the stage's rules leaves 0.04 (Hue), 0.04 -(Saturation) and 0.10 (Luminance) OkLab Γ— 100, against average effects of 0.57, 0.51 and 1.27. That covers Β±10 too, -which the table does not hold. With one set of chroma keys for all lightness levels it leaves 0.07, 0.08 and 0.28. +less chromatic at the top lightness level than at the bottom. The model therefore takes the colour's chroma and +lightness as they are, and the table it is sampled into keeps lower chroma levels for brighter colours. + +How close the model is: predicting Camera Raw's edited charts (each slider at Β±25, Β±50, Β±75 and Β±100) from its +neutral chart with the stage's rules leaves 0.35 (Hue), 0.24 (Saturation) and 0.55 (Luminance) OkLab Γ— 100, against +average effects of 0.68, 0.62 and 1.54. The measured responses themselves, used the same way, would leave 0.04, +0.05 and 0.12. A model with a band shape per slider and output (1,584 constants) leaves 0.15, 0.16 and 0.37, but +does no better on photos than this one. On photos: see +[Results](#results). The order comes from separate check charts rendered while investigating: a strong curve together with mixer settings. Predicting them from the single-setting renders leaves 1.17 (OkLab Γ— 100) with the mixer before the curves and 1.66 with it after. Those check charts are not part of the tool. +## Results + +Held-out Panasonic Lumix DC-S9 photos (5 raws, 24 edits each plus Neutral, 1,500 px, aligned against Camera Raw's +renders), with the curve stage of [curve-stage.md](curve-stage.md). Tone is RMS lightness error, colour the mean a/b +error (OkLab Γ— 100), all edit groups weighted equally. Lower is better. + +| Mixer | Tone | Colour | +|---|---|---| +| Measured table (before) | 7.008 | 1.314 | +| This model | 7.015 | 1.288 | + ## Limits - Camera Raw's process version 2012 controls (`crs:ProcessVersion` 11.0), one chart layout, sRGB-gamut patches. More @@ -80,3 +111,4 @@ and 1.66 with it after. Those check charts are not part of the tool. | Date | Change | Summary | |---|---|---| | 2026-11-10 | minor | Process V9: the colour mixer measured against Lightroom, before the tone curves | +| 2026-11-24 | minor | The mixer is a fitted model of 168 constants instead of a measured table | diff --git a/docs/parity-checklist.md b/docs/parity-checklist.md index 4f57442b8e8..b5c2123b6f3 100644 --- a/docs/parity-checklist.md +++ b/docs/parity-checklist.md @@ -196,7 +196,7 @@ differences and missing bindings are in [ui-parity.md](ui-parity.md#shortcuts). | LR-EDIT-COLOR-TINT | Tint | P0 | βœ… | `ctl:wb.tint`, `docs/tint-direction.md` | DNG / Lightroom sign: negative (left) adds green, positive (right) magenta; XMP `crs:Tint` values render as in Lightroom (issue #188); CPU/GPU regression tests | | LR-EDIT-COLOR-VIBRANCE | Vibrance | P0 | βœ… | `ctl:color.vibrance` | | | LR-EDIT-COLOR-SATURATION | Saturation | P0 | βœ… | `ctl:color.saturation` | | -| LR-EDIT-COLOR-MIXER-HSL | 8-band colour mixer | P0 | βœ… | `ctl:mixer.*`, `crates/pipeline/src/mixer_stage.rs` | from process V9 each slider follows Camera Raw's measured response on synthetic OkLCh charts (band centres, widths, the non-linear amount, side effects on lightness), applied before the tone curves ([mixer-stage.md](mixer-stage.md)); no targeted (drag-on-image) mode | +| LR-EDIT-COLOR-MIXER-HSL | 8-band colour mixer | P0 | βœ… | `ctl:mixer.*`, `crates/pipeline/src/mixer_stage.rs` | from process V9 each slider follows LightCraft's model fitted to Camera Raw's measured response on synthetic OkLCh charts (band centres, widths, the non-linear amount, side effects on lightness), applied before the tone curves ([mixer-stage.md](mixer-stage.md)); no targeted (drag-on-image) mode | | LR-EDIT-COLOR-MIXER-BW | B&W mix | P1 | βœ… | `ctl:bw.*`, `cmd:develop.autoBwMix` | eight bands; Auto pushes each hue band's colourful pixels away from the mean lightness (own rule) | | LR-EDIT-COLOR-POINTCOLOR | Point colour | P1 | βœ… | `cmd:pointColor.pick`, `cmd:pointColor.delete` | | | LR-EDIT-COLOR-GRADING | Colour grading wheels | P0 | βœ… | `ctl:grading.*`, `crates/ui-egui/src/panels/edit.rs` (`grading`) | 3-Way / Shadows / Midtones / Highlights tabs; a range tab shows one large wheel with Hue, Saturation and Luminance sliders; Blending and Balance in every tab; 3-Way shows the hovered wheel's hue and saturation; every wheel marks its neutral centre; wheel modifiers as in Lightroom: Shift-drag keeps the puck's hue and changes saturation only (the spoke is the guide; a puck at the centre has no hue, so it takes the angle where the pointer pressed), Cmd/Ctrl-drag keeps the saturation and changes hue only (the circle is the guide), Alt/Option-drag fine-adjusts at 0.1x and combines with either lock, and a hover tooltip lists them (issues #559, #1160; tests `shift_dragging_across_the_tangent_keeps_the_hue_and_moves_saturation`, `shift_drag_keeps_the_pucks_hue_wherever_the_pointer_grabs`, `cmd_drag_keeps_the_saturation_and_changes_only_the_hue`, `alt_drag_fine_adjusts_to_a_tenth_of_the_pointers_travel`, `alt_works_with_shift_and_cmd_constraints` in `crates/ui-egui/src/tests/grading.rs`); a wheel drag holds the pointer as in Lightroom: hidden while dragging (the puck follows the mouse's travel; on macOS the pointer is locked in place), back where the button went down on release, and given back at once on Esc, a lost window focus or a wheel that goes away mid-drag; the browser can't move the pointer, so there it only shows again where the drag ended (issue #1899; tests `a_held_wheel_follows_the_mouses_motion_not_where_the_pointer_sits`, `a_wheel_drag_hides_the_pointer_and_releasing_puts_it_back_where_it_was_pressed`, `escape_or_losing_focus_gives_the_pointer_back_mid_drag`, `a_wheel_that_goes_away_mid_drag_gives_the_pointer_back`); the large wheel adds 25/50/75 % saturation rings (issue #559); each wheel's eye hides its effect for viewing only (`RenderJob::with_hidden_grading`, not saved, export unaffected) (issue #737). No Global wheel tab yet | diff --git a/docs/whats-new.md b/docs/whats-new.md index 6dfbd859607..d625f11b637 100644 --- a/docs/whats-new.md +++ b/docs/whats-new.md @@ -2,12 +2,12 @@ ## Unreleased -### The colour mixer behaves as in Lightroom (process V9) -- Each band of the colour mixer now covers the colours Lightroom's does (a red-orange such as skin answers to - Orange, Blue reaches further towards aqua and purple), and Hue, Saturation and Luminance follow Lightroom's - measured response, including how strongly they act at large amounts. The mixer works before the tone curves, as in - Lightroom. This is part of rendering process 9: photos you already edited keep their look until you choose - Photo β–Έ Update to Current Process. See [The colour mixer](mixer-stage.md). +### Colour mixer bands in new places, stronger at large amounts (process 9) +- Each band of the colour mixer now covers different colours (a red-orange such as skin answers to Orange, Blue + reaches further towards aqua and purple), and Hue, Saturation and Luminance act more strongly at large amounts + than at small ones. The mixer now works before the tone curves. This is part of rendering process 9: photos you + already edited keep their look until you choose Photo β–Έ Update to Current Process. See + [The colour mixer](mixer-stage.md). ### Broader Whites and parametric curve, hue-preserving tone curves (process 9) - Whites now reaches into the upper midtones, and the Highlights, Lights, Darks and Shadows regions of the diff --git a/tools/lr_mixer_charts.py b/tools/lr_mixer_charts.py index bc97347029f..0c2112b82cc 100644 --- a/tools/lr_mixer_charts.py +++ b/tools/lr_mixer_charts.py @@ -6,20 +6,15 @@ as XMP: one neutral chart and every mixer band's Hue, Saturation and Luminance at -100, -75, -50, -25, 25, 50, 75 and 100. (render every DNG through Camera Raw to a 16-bit Adobe RGB (1998) TIFF with the same file name) - python3 tools/lr_mixer_charts.py table RENDER_DIR OUT_BIN - Reads the renders and writes the response table of `lightcraft_pipeline::mixer_stage` (format below). + python3 tools/lr_mixer_charts.py fit RENDER_DIR OUT_RS + Reads the renders, fits LightCraft's model of each mixer slider to them and writes the model's constants + (`lightcraft_pipeline::mixer_stage_model`). The measurements themselves are not written out. The charts are original test data generated here; nothing in them comes from Adobe. Only Camera Raw's output is -measured. Requires numpy and tifffile (tools/requirements-lr-tone-charts.txt). - -Table format, little-endian: b"LCCS", u32 version 1, u32 sliders, amounts, rows per amount (9), outputs (3), hue -bins (72); f32 amounts; f32 chroma levels (3 per lightness level, 9); f32 lightness levels (3). Then for each slider, amount, lightness -level, chroma level and output: f32 scale and 72 i8 (value = scale x i8). Outputs per OkLab hue bin (5 degrees): -hue shift in degrees, relative chroma change, lightness change. +measured. Requires numpy, scipy and tifffile (tools/requirements-lr-tone-charts.txt). """ import json import os -import struct import sys import numpy as np @@ -129,37 +124,126 @@ def response(lab0, lab, light, chroma): return out -def table(render_dir, out_bin): - """Measure the Camera Raw renders in `render_dir` and write the binary table to `out_bin`.""" +# ---- fit ---------------------------------------------------------------------------------------------------- +# +# LightCraft's own model of the colour mixer, fitted to the measured chart responses. Nothing measured is written +# out: only the model's 168 constants. For slider `kind` (Hue, Saturation, Luminance) of band `b` and output `o` (hue +# shift in degrees, relative chroma change, lightness change), with t = amount / 100, dc = (C - 0.09) / 0.05 and +# dl = (L - 0.75) / 0.15 for an OkLCh colour: +# +# response = amp[b][kind][o] * gain[kind][o](t) * band[b](h) * exp(ac dc + al dl) +# gain(t) = g1 |t| + g2 t^2 + g3 |t|^3 (g4..g6 for positive amounts) +# band(h) = exp(-z^2 / 2), z = wrap(h - centre) / e^(left or right) +# +# Each band's centre and widths are shared by its three sliders; each kind's gain curve and level dependence are +# shared by all bands. + +FIT_C, FIT_L = (0.09, 0.05), (0.75, 0.15) +CENTRES = (10, 50, 95, 140, 180, 255, 320, 350) + + +def unpack(p): + """(bands 8 x [centre, left, right], kinds 3 x 3 x [g1..g6, ac, al], amps 8 x 3 x 3).""" + return p[:24].reshape(8, 3), p[24:96].reshape(3, 3, 8), p[96:168].reshape(8, 3, 3) + + +def model(p, t, dc, dl): + """The responses (slider, output, amount, level, hue) at amounts `t` and level coordinates `dc`, `dl`.""" + bands, kinds, amps = unpack(p) + hue = np.arange(HUES) * (360 / HUES) + at, neg = np.abs(t), t < 0 + out = np.zeros((24, 3, len(t), len(dc), HUES)) + for b in range(8): + centre, left, right = bands[b] + d = (hue - centre + 180) % 360 - 180 + shape = np.exp(-0.5 * (d / np.exp(np.where(d < 0, left, right))) ** 2) + for k in range(3): + for o in range(3): + g = kinds[k, o] + gain = np.where(neg, g[0] * at + g[1] * at ** 2 + g[2] * at ** 3, g[3] * at + g[4] * at ** 2 + g[5] * at ** 3) + level = np.exp(g[6] * dc + g[7] * dl) + out[b * 3 + k, o] = amps[b, k, o] * gain[:, None, None] * level[None, :, None] * shape[None, None, :] + return out + + +def fit_model(measured, chroma, dc, dl): + """Fit the model to the measured responses (slider, amount, level, output, hue); returns the constants.""" + from scipy.optimize import least_squares + t = np.array(AMOUNTS) / 100 + + def oklab(v, o): + """A response in OkLab x 100 at each level's chroma: hue shift and chroma change scale with chroma.""" + return (np.radians(v) * chroma[None, :, None] if o == 0 else v * chroma[None, :, None] if o == 1 else v) * 100 + + target = np.stack([np.stack([oklab(measured[s, :, :, o], o) for o in range(3)]) for s in range(24)]) + + def residual(p): + m = model(p, t, dc, dl) + return (np.stack([np.stack([oklab(m[s, o], o) for o in range(3)]) for s in range(24)]) - target).ravel() + + kinds = np.zeros((3, 3, 8)) + # starting signs and sizes: each kind's main output, then its smaller side effects + for (k, o), (neg, pos) in {(0, 0): (-40, 40), (0, 1): (0.1, 0.1), (0, 2): (0.01, 0.01), (1, 0): (1, -1), (1, 1): (-0.6, 0.6), + (1, 2): (0.01, -0.01), (2, 0): (1, -1), (2, 1): (0.1, -0.1), (2, 2): (-0.1, 0.1)}.items(): + kinds[k, o, 0], kinds[k, o, 3] = neg, pos + p0 = np.r_[np.ravel([[c, 3.0, 3.0] for c in CENTRES]), kinds.ravel(), np.ones(72)] + return least_squares(residual, p0, max_nfev=3000).x, residual + + +def fit(render_dir, out_rs): + """Fit the model to the Camera Raw renders in `render_dir` and write its constants to `out_rs`.""" patches = [p for p in json.load(open(os.path.join(render_dir, "manifest.json")))["patches"] if p["ok"]] tif = lambda n: os.path.join(render_dir, f"mixer__{n}.tif") lab0 = oklab_patches(tif("neutral"), patches) light = np.array([p["L"] for p in patches]) chroma = np.array([p["C"] for p in patches]) c0 = np.hypot(lab0[:, 1], lab0[:, 2]) - # Camera Raw's neutral render desaturates bright colours, so each lightness level has its own chroma keys - chroma_levels = [] + # each level's chroma and lightness on Camera Raw's neutral render (it desaturates bright colours), as the fit's + # coordinates of the measured rows + level_c, level_l = [], [] for v in LIGHTNESS: for c in CHROMA: m = (light == v) & (chroma == c) - chroma_levels.append(float(c0[m].mean() if m.sum() else c0[chroma == c].mean())) - light_levels = [float(lab0[light == v, 0].mean()) for v in LIGHTNESS] - names = sliders() - out = bytearray(b"LCCS" + struct.pack("<6I", 1, len(names), len(AMOUNTS), 9, 3, HUES)) - out += struct.pack(f"<{len(AMOUNTS)}f", *AMOUNTS) + struct.pack("<9f", *chroma_levels) + struct.pack("<3f", *light_levels) - for stem, _ in names: - for a in AMOUNTS: - t = response(lab0, oklab_patches(tif(f"{stem}{a:+d}"), patches), light, chroma) - for row in t.reshape(-1, HUES): - scale = float(np.abs(row).max()) / 127.0 - q = np.zeros(HUES) if scale == 0 else np.round(row / scale) - out += struct.pack(" Date: Tue, 24 Nov 2026 08:52:08 +0100 Subject: [PATCH 28/51] LR-EDIT-COLOR-GRADING: Colour Grading is a fitted model, not measured tables (#523) Review on #4084: `grading_stage_tables.rs` is gone, and so is the tool step that wrote it (`lr_grading_charts.py tables`). - `grading_stage_model.rs` holds the model's 262 constants, written by `lr_grading_charts.py fit` from the same chart renders: one tint shape around the hue circle shared by the wheels (Fourier series for direction and size) with a size and saturation curve per wheel; per wheel a share by lightness (two bumps, quadratic in Blending and Balance), Luminance (two bumps per direction) and a 4-constant damping. - Against the measurements: tints 0.57 RMS of an average 6.94 (OkLab x 100), shares 0.7 to 2.6 RMS (x 100), Luminance 0.01 to 0.27 RMS. - Tests are relational; the one that relied on the table's linear saturation steps now checks that the tint grows with saturation. - Code comments and the release note describe Colour Grading in our own words. --- crates/gpu/src/wgsl/finish.wgsl | 2 +- crates/pipeline/src/colorops.rs | 2 +- crates/pipeline/src/grading_stage.rs | 139 +++++++----- crates/pipeline/src/grading_stage_model.rs | 29 +++ crates/pipeline/src/grading_stage_tables.rs | 188 ---------------- crates/pipeline/src/lib.rs | 2 +- docs/grading-stage.md | 51 +++-- docs/whats-new.md | 10 +- tools/lr_grading_charts.py | 235 +++++++++++++++----- tools/requirements-lr-tone-charts.txt | 5 +- 10 files changed, 337 insertions(+), 326 deletions(-) create mode 100644 crates/pipeline/src/grading_stage_model.rs delete mode 100644 crates/pipeline/src/grading_stage_tables.rs diff --git a/crates/gpu/src/wgsl/finish.wgsl b/crates/gpu/src/wgsl/finish.wgsl index 0bc30a411ca..75cff09e68a 100644 --- a/crates/gpu/src/wgsl/finish.wgsl +++ b/crates/gpu/src/wgsl/finish.wgsl @@ -409,7 +409,7 @@ fn measured_grade(lab: vec3) -> vec3 { let d0 = aux[w + 2u + j] * (1.0 - fa) + aux[w + 3u + j] * fa; let d1 = aux[w + 8u + j] * (1.0 - fa) + aux[w + 9u + j] * fa; let d2 = aux[w + 14u + j] * (1.0 - fa) + aux[w + 15u + j] * fa; - // the damping's chroma levels (`grading_stage_tables::CHROMA`) + // the damping's chroma levels (`grading_stage::CHROMA`) var damp = 1.0; if (c <= 0.04) { damp = 1.0 + (d0 - 1.0) * c / 0.04; diff --git a/crates/pipeline/src/colorops.rs b/crates/pipeline/src/colorops.rs index 94f16e8fc2c..1e670e99650 100644 --- a/crates/pipeline/src/colorops.rs +++ b/crates/pipeline/src/colorops.rs @@ -144,7 +144,7 @@ pub struct ColorOps { pub grading: Option<([WheelK; 4], f32, f32)>, /// OkLCh hue of skin tones (protected by vibrance). pub skin: f32, - /// Process V9's Colour Grading, measured against Lightroom (`grading` is `None` from V9 on). + /// Process V9's Colour Grading from its fitted model (`grading` is `None` from V9 on). pub measured_grading: Option, } diff --git a/crates/pipeline/src/grading_stage.rs b/crates/pipeline/src/grading_stage.rs index 7239df687f7..b2e20c2dff8 100644 --- a/crates/pipeline/src/grading_stage.rs +++ b/crates/pipeline/src/grading_stage.rs @@ -1,11 +1,10 @@ -//! Process V9's Colour Grading ([`lightcraft_develop::Process::V9`], `docs/grading-stage.md`), applied the way -//! Lightroom applies it. -//! -//! Measured on Camera Raw renders of synthetic charts (`tools/lr_grading_charts.py`, tables in -//! `grading_stage_tables`). Per wheel (shadows, midtones, highlights, global): -//! - an OkLab tint (a, b) by wheel hue (12 steps of 30Β°) and saturation (25, 50, 100); -//! - a lightness profile, the share of the tint each lightness gets, by Blending and Balance. Lightroom's shadows -//! wheel reaches well into the midtones and its global wheel peaks in the midtones; +//! Process V9's Colour Grading ([`lightcraft_develop::Process::V9`]), from a fitted model (`grading_stage_model`, +//! written by `tools/lr_grading_charts.py fit`). `docs/grading-stage.md` records how it was measured and fitted. Per +//! wheel (shadows, midtones, highlights, global): +//! - an OkLab tint (a, b) by wheel hue and saturation: one smooth shape around the hue circle shared by the wheels, +//! a size per wheel and a saturation curve per wheel; +//! - a lightness profile, the share of the tint each lightness gets, by Blending and Balance. The shadows wheel +//! reaches well into the midtones and the global wheel peaks in the midtones; //! - a damping: colours that already lean the tint's way get less of it (55 to 87% for saturated colours in the same //! direction), by their chroma and the angle between their hue and the tint's; //! - the wheel's Luminance as a lightness change by lightness. @@ -15,7 +14,11 @@ use lightcraft_develop::{ColorGrading, DevelopSettings, Process, Wheel}; -use crate::grading_stage_tables as t; +use crate::grading_stage_model as m; + +/// The damping's chroma levels: the chart's colour patches (`tools/lr_grading_charts.py`), where the stage samples +/// the model. +pub const CHROMA: [f32; 3] = [0.04, 0.08, 0.12]; /// Lightness grid entries (0 to 1). pub const GRID: usize = 65; @@ -27,7 +30,7 @@ pub struct WheelStage { pub tint: [f32; 2], /// Share of the tint by lightness. pub profile: [f32; GRID], - /// Share by chroma level and angle bin (see [`t::DAMPING`]). + /// Share by chroma level ([`CHROMA`]) and angle (6 bins of 30Β°, sampled at their centres). pub damping: [[f32; 6]; 3], } @@ -64,58 +67,75 @@ fn bracket(keys: &[f32], x: f32) -> (usize, usize, f32) { } } -/// Linear blend of two lightness grids, `f` = 0 gives `a`. -fn lerp_grid(a: &[f32; GRID], b: &[f32; GRID], f: f32) -> [f32; GRID] { - std::array::from_fn(|i| a[i] * (1.0 - f) + b[i] * f) +/// `c0 + Ξ£ c[2kβˆ’1] cos(k h) + c[2k] sin(k h)`. +fn fourier(c: &[f64], h: f64) -> f64 { + let (first, rest) = c.split_first().map_or((0.0, &[][..]), |(f, r)| (*f, r)); + first + rest.chunks_exact(2).enumerate().map(|(k, p)| p[0] * ((k + 1) as f64 * h).cos() + p[1] * ((k + 1) as f64 * h).sin()).sum::() +} + +/// A bump of peak 1 at `p / (p + q)`, 0 at black and white and outside them. +fn bump(x: f64, p: f64, q: f64) -> f64 { + if x <= 0.0 || x >= 1.0 { + return 0.0; + } + let peak = p / (p + q); + (p * (x / peak).ln() + q * ((1.0 - x) / (1.0 - peak)).ln()).exp() } -/// The tint of wheel `w` at `hue` (degrees) and `sat` (0..100): linear in hue around the circle, and in saturation -/// from none at 0 through the measured saturations. +/// The tint of wheel `w` at `hue` (degrees) and `sat` (0..100): the shared direction and size around the hue circle, +/// the wheel's size and its saturation curve `s (1 + g1 (s βˆ’ 1) + g2 (s βˆ’ 1)Β²)`, `s` = sat / 100. fn tint(w: usize, hue: f32, sat: f32) -> [f32; 2] { - let Some(table) = t::TINT.get(w) else { return [0.0; 2] }; - let n = t::HUES.len(); - let step = 360.0 / n as f32; - let h = hue.rem_euclid(360.0); - let i = (h / step) as usize % n; - let fh = h / step - (h / step).floor(); - let at = |hi: usize| -> [f32; 2] { - let s = sat.clamp(0.0, t::SATS[t::SATS.len() - 1]); - let row = &table[hi % n]; - let k = t::SATS.iter().position(|v| s <= *v).unwrap_or(t::SATS.len() - 1); - let (s0, v0) = if k == 0 { (0.0, [0.0; 2]) } else { (t::SATS[k - 1], row[k - 1]) }; - let (s1, v1) = (t::SATS[k], row[k]); - let f = if s1 > s0 { (s - s0) / (s1 - s0) } else { 1.0 }; - [v0[0] + (v1[0] - v0[0]) * f, v0[1] + (v1[1] - v0[1]) * f] - }; - let (a, b) = (at(i), at(i + 1)); - [a[0] * (1.0 - fh) + b[0] * fh, a[1] * (1.0 - fh) + b[1] * fh] + let (Some(scale), Some([g1, g2])) = (m::WHEEL_SIZE.get(w), m::WHEEL_SAT.get(w)) else { return [0.0; 2] }; + let h = f64::from(hue).to_radians(); + let s = (f64::from(sat) / 100.0).clamp(0.0, 1.0); + let angle = h + fourier(&m::TINT_ANGLE, h); + let size = (fourier(&m::TINT_SIZE, h) + scale).exp() * s * (1.0 + g1 * (s - 1.0) + g2 * (s - 1.0) * (s - 1.0)); + [(size * angle.cos()) as f32, (size * angle.sin()) as f32] } -/// The share of wheel `w`'s tint by lightness: the Blending profile, shifted by Balance (not for the global wheel). +/// Two bumps whose gain and exponents are quadratic in `b` and `c`, at lightness `l` ([`m::SHARE`]). +fn share(p: &[f64; 30], b: f64, c: f64, l: f64) -> f64 { + p.chunks_exact(15) + .map(|q| { + let f = |i: usize| q[i] + q[i + 1] * b + q[i + 2] * b * b + q[i + 3] * c + q[i + 4] * c * c; + f(0) * bump(l, f(5).exp(), f(10).exp()) + }) + .sum() +} + +/// The share of wheel `w`'s tint by lightness, at Blending and Balance (the global wheel ignores Balance). fn profile(w: usize, blending: f32, balance: f32) -> [f32; GRID] { - let (Some(pb), Some(pa)) = (t::PROFILE_BLEND.get(w), t::PROFILE_BALANCE.get(w)) else { return [0.0; GRID] }; - let (b0, b1, fb) = bracket(&t::BLENDS, blending); - let blend = lerp_grid(&pb[b0], &pb[b1], fb); - if w == 3 { - return blend.map(|v| v.max(0.0)); - } - let (a0, a1, fa) = bracket(&t::BALANCES, balance); - let bal = lerp_grid(&pa[a0], &pa[a1], fa); - let zero = t::BALANCES.iter().position(|v| *v == 0.0).unwrap_or(0); - std::array::from_fn(|i| (blend[i] + bal[i] - pa[zero][i]).max(0.0)) + let Some(p) = m::SHARE.get(w) else { return [0.0; GRID] }; + let b = f64::from(blending.clamp(0.0, 100.0)) / 100.0 - 0.5; + let c = if w == 3 { 0.0 } else { f64::from(balance.clamp(-100.0, 100.0)) / 100.0 }; + std::array::from_fn(|i| share(p, b, c, i as f64 / (GRID - 1) as f64).max(0.0) as f32) } -/// Wheel `w`'s Luminance `v` as a lightness change by lightness (measured at Β±50 and Β±100, 0 in between). +/// Wheel `w`'s Luminance `v` (βˆ’100..100) as a lightness change by lightness: per direction two bumps, gain and +/// exponents changing with the amount ([`m::LUM`]). fn luminance(w: usize, v: f32) -> [f32; GRID] { - let Some(table) = t::LUM.get(w) else { return [0.0; GRID] }; - let mut keys: Vec<(f32, Option<&[f32; GRID]>)> = t::LUMS.iter().zip(table.iter()).map(|(a, c)| (*a, Some(c))).collect(); - keys.push((0.0, None)); - keys.sort_by(|a, b| a.0.total_cmp(&b.0)); - let amounts: Vec = keys.iter().map(|k| k.0).collect(); - let (i0, i1, f) = bracket(&amounts, v); - let zero = [0.0; GRID]; - let at = |i: usize| keys.get(i).and_then(|k| k.1).unwrap_or(&zero); - lerp_grid(at(i0), at(i1), f) + let Some(p) = m::LUM.get(w) else { return [0.0; GRID] }; + let t = (f64::from(v) / 100.0).clamp(-1.0, 1.0); + let (a, side) = (t.abs(), if t < 0.0 { 0 } else { 12 }); + std::array::from_fn(|i| { + let l = i as f64 / (GRID - 1) as f64; + let r: f64 = + p[side..side + 12].chunks_exact(6).map(|q| (q[0] * a + q[1] * a * a) * bump(l, (q[2] + q[3] * a).exp(), (q[4] + q[5] * a).exp())).sum(); + (t.signum() * r) as f32 + }) +} + +/// Wheel `w`'s damping by chroma level and angle bin: `1 + (C / 0.12)^e (d0 + d1 cos a + d2 cos 2a)` at the bins' +/// centres (15Β°, 45Β° … 165Β°). +fn damping(w: usize) -> [[f32; 6]; 3] { + let Some([d0, d1, d2, e]) = m::DAMPING.get(w).copied() else { return [[1.0; 6]; 3] }; + std::array::from_fn(|k| { + let c = f64::from(CHROMA.get(k).copied().unwrap_or(0.0)) / 0.12; + std::array::from_fn(|j| { + let a = (15.0 + 30.0 * j as f64).to_radians(); + (1.0 + c.powf(e.exp()) * (d0 + d1 * a.cos() + d2 * (2.0 * a).cos())) as f32 + }) + }) } impl GradingStage { @@ -134,7 +154,7 @@ impl GradingStage { out.push(WheelStage { tint: tint(w, wheel.hue as f32, wheel.sat as f32), profile: profile(w, blending, balance), - damping: t::DAMPING.get(w).copied().unwrap_or([[1.0; 6]; 3]), + damping: damping(w), }); } if wheel.lum != 0.0 && wheel.lum.is_finite() { @@ -163,10 +183,10 @@ impl GradingStage { let j = (pos as usize).min(4); let fa = pos - j as f32; let level = |k: usize| w.damping.get(k).map_or(1.0, |r| r[j] * (1.0 - fa) + r[j + 1] * fa); - let damp = if c <= t::CHROMA[0] { - 1.0 + (level(0) - 1.0) * c / t::CHROMA[0] + let damp = if c <= CHROMA[0] { + 1.0 + (level(0) - 1.0) * c / CHROMA[0] } else { - let (k0, k1, f) = bracket(&t::CHROMA, c); + let (k0, k1, f) = bracket(&CHROMA, c); level(k0) * (1.0 - f) + level(k1) * f }; a += p * w.tint[0] * damp; @@ -216,7 +236,7 @@ mod tests { let bright = st.apply([0.95, 0.0, 0.0]); let size = |x: [f32; 3]| x[1].hypot(x[2]); assert!(dark[1] > 0.0 && dark[2] > 0.0, "warm: {dark:?}"); - assert!(size(mid) > 0.3 * size(dark), "Lightroom's shadows wheel reaches the midtones: {mid:?} vs {dark:?}"); + assert!(size(mid) > 0.3 * size(dark), "the shadows wheel reaches the midtones: {mid:?} vs {dark:?}"); assert!(size(bright) < 0.3 * size(dark), "{bright:?}"); assert_eq!(dark[0], 0.3, "the tint leaves lightness alone"); } @@ -238,7 +258,7 @@ mod tests { #[test] fn the_damping_has_no_step_along_a_hue_gradient() { - // shadows at chroma 0.12: the measured bins 0Β° to 30Β° and 30Β° to 60Β° are 0.62 and 0.78 + // shadows at chroma 0.12, where the damping changes most with the angle let st = stage(|g| { g.shadows.hue = 30.0; g.shadows.sat = 100.0; @@ -273,7 +293,6 @@ mod tests { let (s25, h25) = size(25.0, 120.0); let (s75, _) = size(75.0, 120.0); assert!(s10 < s25 && s25 < s75, "{s10} {s25} {s75}"); - assert!((s10 - 0.4 * s25).abs() < 1e-4, "below 25 the tint grows linearly from none"); let (_, h_mid) = size(25.0, 135.0); let (_, h150) = size(25.0, 150.0); assert!((h25.min(h150)..=h25.max(h150)).contains(&h_mid), "{h25} {h_mid} {h150}"); diff --git a/crates/pipeline/src/grading_stage_model.rs b/crates/pipeline/src/grading_stage_model.rs new file mode 100644 index 00000000000..59782079fab --- /dev/null +++ b/crates/pipeline/src/grading_stage_model.rs @@ -0,0 +1,29 @@ +// Written by `tools/lr_grading_charts.py fit`: LightCraft's model of Colour Grading, fitted to the tool's charts +// (provenance in docs/grading-stage.md). Constants of the model only. Wheels: shadows, midtones, highlights, global. + +/// The tint's direction around the hue circle, as an offset from the wheel hue (radians): a Fourier series of the +/// wheel hue, `c0 + c1 cos h + c2 sin h + c3 cos 2h + ...`. +pub const TINT_ANGLE: [f64; 9] = [4.537397e-01, 4.685374e-02, 3.516632e-02, -2.941264e-01, -6.525125e-02, -2.285195e-02, -5.390789e-03, 2.384883e-02, -3.397357e-02]; +/// The tint's log size around the hue circle, the same kind of series. +pub const TINT_SIZE: [f64; 9] = [9.016546e+00, -2.308289e-02, -1.193683e-02, 5.711376e-02, -2.991360e-01, 2.256077e-02, -1.541201e-02, 4.477781e-02, 5.903262e-02]; +/// Each wheel's log size, added to [`TINT_SIZE`]. +pub const WHEEL_SIZE: [f64; 4] = [-1.122302e+01, -1.114375e+01, -1.127223e+01, -1.113500e+01]; +/// Each wheel's saturation curve `[g1, g2]`: size `s (1 + g1 (s - 1) + g2 (s - 1)Β²)` at saturation `s` (0 to 1). +pub const WHEEL_SAT: [[f64; 2]; 4] = [[-5.099721e-01, -3.733126e-01], [-5.285381e-03, -3.145074e-03], [-1.233650e-01, -9.725189e-02], [-1.128777e-02, -6.350617e-03]]; +/// Each wheel's share of the tint by lightness: two bumps of 15 constants, `[g, gb, gb2, gc, gc2, p, pb, ..., q, ...]`, +/// each value quadratic in Blending (`b` = Blending / 100 - 0.5) and Balance (`c` = Balance / 100). +pub const SHARE: [[f64; 30]; 4] = [ + [5.727402e-01, 1.796601e-01, 2.844851e-01, -2.035986e-01, -2.285662e-01, -4.321244e-01, -5.602665e-01, 1.568028e+00, -2.424290e-01, -3.241123e-01, 6.053978e-01, -1.695886e+00, 1.969183e+00, 2.848613e-01, 2.521213e-01, 4.019223e-01, -5.052266e-03, 1.105097e+00, -5.266974e-01, 4.437433e-01, 1.749971e+00, -8.663990e-01, -1.420143e-01, 1.269084e-01, -4.439682e-01, 2.451509e+00, -1.520918e+00, -1.678961e+00, 1.398612e+00, -2.388321e-01], + [5.147531e-01, -1.249462e-01, -8.910247e-01, 1.684162e-01, -2.229180e-01, 2.100216e+00, -2.969117e-01, 1.688835e-01, 2.983615e-02, -5.530777e-01, 1.753003e+00, -2.956195e-01, 6.032166e-01, 1.072575e+00, -1.061905e-01, 5.090626e-01, 1.089723e-01, 9.146510e-01, -1.904599e-01, -2.414139e-01, 1.523251e+00, -5.576709e-01, 2.254867e-01, -5.251367e-01, 4.181351e-01, 9.500922e-01, -5.285901e-01, 3.261999e-01, 4.481717e-01, 7.667991e-02], + [-3.429880e-01, 2.072252e-03, 5.462619e-01, -4.017026e-02, -1.844514e-01, 2.507969e+00, -2.002773e+00, -2.033001e+00, -3.134357e-01, -7.954968e-01, 1.761763e+00, -2.033995e+00, -1.717121e+00, 1.173802e+00, -4.993600e-01, 1.111279e+00, 7.601260e-01, 8.073856e-01, 8.132208e-01, 3.199555e-01, 1.597379e+00, -8.727681e-01, 4.703415e-01, -5.751525e-01, -3.463468e-01, 1.260884e-01, -1.566368e-01, 4.284988e-01, 1.729485e-01, -1.623375e-01], + [1.000379e+00, -5.600347e-10, -1.412064e-10, -1.279783e+02, 7.097896e+01, 3.170903e-01, -4.148178e-09, -2.497543e-08, -2.456334e+01, -6.616531e+01, -1.259770e-01, -3.764265e-09, -8.380342e-09, -2.805683e+01, 6.243955e+00, 1.928859e-01, 2.365470e-10, 2.691471e-08, 3.856527e+00, -4.947252e+00, 7.187187e-01, 3.656593e-08, 1.100689e-06, -4.644110e+01, 1.973927e+01, 3.282210e+00, 3.513006e-08, 9.391124e-07, -9.284069e+01, -9.615467e+01], +]; +/// Each wheel's Luminance, negative then positive: two bumps of `[g1, g2, p0, p1, q0, q1]` each. +pub const LUM: [[f64; 24]; 4] = [ + [1.317930e-01, -9.660312e-02, 2.384303e-01, -7.957007e-01, 1.751565e+00, -1.253591e+00, -7.438407e-02, 1.856952e-01, 5.387669e+00, -4.716013e+00, 5.282639e+00, -3.222175e+00, 2.402675e-01, -1.409104e-01, 5.609386e-01, 1.938077e-01, 3.763936e+00, 1.097849e-01, 1.391984e-01, -1.854798e-02, -1.881605e-01, -3.710358e-01, 1.455610e+00, -1.538185e-01], + [3.394504e-02, -6.074374e-03, 2.140452e+00, 1.407142e-01, 1.823146e+00, 1.595518e-01, 4.265653e-02, 8.080533e-03, 1.650195e+00, 4.501870e-02, 1.039394e+00, 3.850345e-03, 4.204713e-02, -6.589058e-03, 1.645483e+00, -1.255438e-01, 1.031704e+00, -5.808203e-02, 3.448076e-02, 7.553287e-03, 2.150151e+00, -3.481531e-02, 1.827579e+00, -3.995998e-02], + [3.711674e-02, -1.485479e-02, 2.734528e+00, 8.404184e-02, 8.434023e-01, 1.167529e-01, 9.407997e-02, -2.112981e-03, 1.245802e+00, -3.251068e-02, -5.239417e+00, -4.203818e-01, 8.289980e-03, 6.834684e-04, 2.423068e+00, 8.895512e-04, 2.537429e+00, -2.344666e-02, 7.604731e-02, 7.278265e-03, 2.015782e+00, 7.895969e-02, 2.639166e-01, 6.995097e-02], + [1.759469e-02, -4.413933e-04, 1.056872e+00, -3.032456e-01, 3.439023e+00, -4.108334e-01, 7.496469e-02, 2.163202e-03, 3.727577e-01, 4.360411e-02, -1.068520e-01, -1.071032e-01, 1.765972e-02, 1.011221e-03, 7.901337e-01, 1.540931e-01, 3.231144e+00, 2.850728e-01, 7.502087e-02, 1.785074e-03, 3.835838e-01, -4.661289e-02, -1.037254e-01, 9.842938e-02], +]; +/// Each wheel's damping `[d0, d1, d2, e]`: `1 + (C / 0.12)^(e^e) (d0 + d1 cos a + d2 cos 2a)`. +pub const DAMPING: [[f64; 4]; 4] = [[-8.600308e-02, -2.343227e-01, -2.969460e-02, 2.451045e-02], [-6.245100e-02, -1.852009e-02, 1.932367e-02, -1.237717e+00], [-9.249844e-02, -4.322517e-02, 2.915900e-02, 2.210430e-01], [-7.574510e-02, -4.579070e-02, -6.333758e-03, 8.455495e-02]]; diff --git a/crates/pipeline/src/grading_stage_tables.rs b/crates/pipeline/src/grading_stage_tables.rs deleted file mode 100644 index 3e7cf3485e4..00000000000 --- a/crates/pipeline/src/grading_stage_tables.rs +++ /dev/null @@ -1,188 +0,0 @@ -// @generated by tools/lr_grading_charts.py from Camera Raw renders of its synthetic charts (docs/grading-stage.md). -// OkLab. Wheels: shadows, midtones, highlights, global. Lightness grids: 65 steps from 0 to 1. -// Measured values, which can come close to a mathematical constant by chance. -#![allow(clippy::approx_constant)] - -pub const HUES: [f32; 12] = [0.0, 30.0, 60.0, 90.0, 120.0, 150.0, 180.0, 210.0, 240.0, 270.0, 300.0, 330.0]; -pub const SATS: [f32; 3] = [25.0, 50.0, 100.0]; -pub const BLENDS: [f32; 5] = [0.0, 25.0, 50.0, 75.0, 100.0]; -pub const BALANCES: [f32; 5] = [-100.0, -50.0, 0.0, 50.0, 100.0]; -pub const LUMS: [f32; 4] = [-100.0, -50.0, 50.0, 100.0]; -/// Nominal chroma of the damping's levels. -pub const CHROMA: [f32; 3] = [0.04, 0.08, 0.12]; - -/// Tint (a, b) per wheel, hue and saturation. -pub static TINT: [[[[f32; 2]; 3]; 12]; 4] = [ - [ - [[0.035477, 0.007008], [0.067495, 0.014511], [0.120858, 0.032836]], - [[0.016530, 0.016464], [0.030564, 0.034663], [0.049958, 0.061038]], - [[-0.003467, 0.026660], [-0.008795, 0.052789], [-0.014649, 0.081209]], - [[-0.021924, 0.022847], [-0.046296, 0.048465], [-0.072994, 0.075344]], - [[-0.041227, 0.019131], [-0.085552, 0.041121], [-0.139628, 0.069983]], - [[-0.039813, 0.005828], [-0.080372, 0.012503], [-0.125646, 0.022998]], - [[-0.039139, -0.006464], [-0.077075, -0.011604], [-0.115741, -0.016271]], - [[-0.018811, -0.015007], [-0.039547, -0.028853], [-0.073277, -0.051632]], - [[0.000727, -0.023073], [-0.000561, -0.043844], [-0.018201, -0.096857]], - [[0.019587, -0.019996], [0.037305, -0.037976], [0.076139, -0.076771]], - [[0.037447, -0.016737], [0.071573, -0.031647], [0.129916, -0.056564]], - [[0.036773, -0.005253], [0.070633, -0.009973], [0.129164, -0.016548]], - ], - [ - [[0.034533, 0.006497], [0.068746, 0.013474], [0.135767, 0.028979]], - [[0.016188, 0.014446], [0.031995, 0.028715], [0.062971, 0.056809]], - [[-0.002257, 0.022493], [-0.005244, 0.044342], [-0.012751, 0.086235]], - [[-0.019392, 0.019541], [-0.039284, 0.038802], [-0.080522, 0.076571]], - [[-0.036491, 0.016696], [-0.072974, 0.033661], [-0.145512, 0.068292]], - [[-0.035492, 0.005410], [-0.070778, 0.011365], [-0.140379, 0.024872]], - [[-0.034730, -0.006069], [-0.069530, -0.011744], [-0.138936, -0.022060]], - [[-0.016699, -0.014669], [-0.034074, -0.029584], [-0.071567, -0.060347]], - [[0.001282, -0.023171], [0.001288, -0.047049], [-0.004307, -0.097089]], - [[0.018871, -0.019847], [0.037170, -0.040017], [0.071813, -0.081473]], - [[0.036392, -0.016398], [0.072573, -0.032465], [0.143903, -0.063563]], - [[0.035580, -0.004852], [0.071137, -0.009115], [0.141714, -0.015784]], - ], - [ - [[0.031880, 0.005921], [0.064455, 0.012285], [0.120601, 0.023985]], - [[0.014907, 0.012973], [0.029775, 0.025458], [0.059221, 0.049030]], - [[-0.001861, 0.020009], [-0.004063, 0.038627], [-0.009679, 0.076361]], - [[-0.017413, 0.017437], [-0.034806, 0.034002], [-0.071480, 0.066638]], - [[-0.032804, 0.014965], [-0.064863, 0.029745], [-0.126885, 0.058800]], - [[-0.031943, 0.004917], [-0.063077, 0.010291], [-0.123044, 0.022234]], - [[-0.031200, -0.005524], [-0.061747, -0.010689], [-0.120966, -0.020088]], - [[-0.014996, -0.013544], [-0.030147, -0.027738], [-0.057983, -0.054546]], - [[0.001387, -0.021648], [0.002067, -0.043878], [0.000855, -0.084329]], - [[0.017399, -0.018460], [0.034367, -0.037701], [0.062083, -0.072173]], - [[0.033580, -0.015169], [0.067997, -0.030569], [0.128711, -0.057386]], - [[0.032789, -0.004413], [0.066479, -0.008259], [0.125718, -0.013603]], - ], - [ - [[0.034903, 0.006624], [0.069372, 0.013825], [0.136319, 0.030090]], - [[0.016316, 0.014612], [0.032149, 0.029052], [0.063052, 0.057453]], - [[-0.002342, 0.022695], [-0.005511, 0.044628], [-0.013436, 0.086330]], - [[-0.019644, 0.019750], [-0.039797, 0.039175], [-0.081640, 0.077130]], - [[-0.036917, 0.016915], [-0.073782, 0.034146], [-0.146699, 0.069284]], - [[-0.035877, 0.005507], [-0.071474, 0.011626], [-0.141222, 0.025621]], - [[-0.035127, -0.006102], [-0.070276, -0.011731], [-0.139885, -0.021805]], - [[-0.016972, -0.014850], [-0.034820, -0.029966], [-0.074050, -0.061267]], - [[0.001193, -0.023501], [0.000792, -0.047852], [-0.007409, -0.099200]], - [[0.019061, -0.020104], [0.037499, -0.040589], [0.071907, -0.082860]], - [[0.036796, -0.016558], [0.073284, -0.032708], [0.144743, -0.063697]], - [[0.035995, -0.004866], [0.071902, -0.009058], [0.142730, -0.015253]], - ], -]; - -/// Share of the tint by lightness, per wheel and Blending (at Balance 0). -pub static PROFILE_BLEND: [[[f32; 65]; 5]; 4] = [ - [ - [0.00000, 0.10577, 0.21155, 0.30588, 0.38577, 0.43526, 0.46277, 0.48157, 0.50133, 0.52624, 0.56814, 0.62302, 0.67820, 0.73254, 0.78566, 0.83529, 0.87612, 0.89994, 0.91275, 0.92123, 0.92608, 0.91934, 0.90085, 0.87388, 0.83376, 0.78122, 0.72236, 0.64932, 0.57260, 0.49000, 0.40699, 0.32369, 0.24854, 0.17628, 0.12049, 0.06966, 0.03807, 0.01473, 0.00271, 0.00117, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000], - [0.00000, 0.10577, 0.21155, 0.30588, 0.38577, 0.43526, 0.46277, 0.48157, 0.50133, 0.52624, 0.56814, 0.62332, 0.67834, 0.73293, 0.78634, 0.83715, 0.88013, 0.90741, 0.92254, 0.93384, 0.94270, 0.94113, 0.92892, 0.90910, 0.87758, 0.83473, 0.78614, 0.72473, 0.65985, 0.58943, 0.51771, 0.44515, 0.37854, 0.31404, 0.26247, 0.21479, 0.18281, 0.15755, 0.14151, 0.13398, 0.12659, 0.11964, 0.11270, 0.10560, 0.09850, 0.09120, 0.08385, 0.07662, 0.06944, 0.06235, 0.05531, 0.04866, 0.04220, 0.03624, 0.03044, 0.02529, 0.02035, 0.01571, 0.01180, 0.00832, 0.00537, 0.00310, 0.00136, 0.00038, 0.00000], - [0.00000, 0.10577, 0.21155, 0.30588, 0.38577, 0.43526, 0.46277, 0.48157, 0.50133, 0.52624, 0.56814, 0.62334, 0.67914, 0.73383, 0.78757, 0.83922, 0.88508, 0.91696, 0.93625, 0.95181, 0.96571, 0.97149, 0.96806, 0.95815, 0.93834, 0.90900, 0.87476, 0.82905, 0.77999, 0.72558, 0.66911, 0.61132, 0.55643, 0.50257, 0.45718, 0.41435, 0.38210, 0.35436, 0.33305, 0.31767, 0.30212, 0.28604, 0.26997, 0.25300, 0.23602, 0.21868, 0.20124, 0.18385, 0.16650, 0.14959, 0.13296, 0.11709, 0.10160, 0.08714, 0.07301, 0.06045, 0.04859, 0.03771, 0.02829, 0.01995, 0.01294, 0.00745, 0.00327, 0.00088, 0.00000], - [0.00000, 0.11208, 0.22417, 0.31664, 0.39332, 0.44281, 0.46742, 0.48722, 0.50728, 0.53400, 0.57791, 0.63550, 0.69248, 0.74927, 0.80512, 0.85992, 0.91214, 0.95518, 0.98551, 1.00978, 1.03139, 1.04991, 1.06149, 1.06821, 1.06750, 1.05903, 1.04659, 1.02434, 0.99869, 0.96762, 0.93290, 0.89585, 0.85729, 0.81820, 0.78086, 0.74407, 0.71105, 0.67964, 0.65040, 0.62314, 0.59508, 0.56450, 0.53393, 0.50070, 0.46746, 0.43330, 0.39892, 0.36472, 0.33061, 0.29715, 0.26409, 0.23243, 0.20150, 0.17281, 0.14485, 0.11986, 0.09628, 0.07467, 0.05606, 0.03958, 0.02566, 0.01458, 0.00648, 0.00177, 0.00000], - [0.00000, 0.11223, 0.22446, 0.32431, 0.40164, 0.44885, 0.47214, 0.49064, 0.51323, 0.54185, 0.58886, 0.64823, 0.70646, 0.76510, 0.82328, 0.88130, 0.93967, 0.99534, 1.04449, 1.08642, 1.12325, 1.15973, 1.19511, 1.22905, 1.25978, 1.28655, 1.31128, 1.32993, 1.34572, 1.35688, 1.36223, 1.36394, 1.35771, 1.34874, 1.33045, 1.30941, 1.27965, 1.24619, 1.20663, 1.16142, 1.11387, 1.05898, 1.00411, 0.94291, 0.88169, 0.81784, 0.75336, 0.68877, 0.62413, 0.56075, 0.49812, 0.43824, 0.37976, 0.32543, 0.27245, 0.22528, 0.18078, 0.14000, 0.10505, 0.07411, 0.04797, 0.02720, 0.01222, 0.00339, 0.00000], - ], - [ - [0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00033, 0.00222, 0.00412, 0.00689, 0.01224, 0.01814, 0.02782, 0.04103, 0.05813, 0.07947, 0.10526, 0.13780, 0.17654, 0.21976, 0.26968, 0.32529, 0.38381, 0.44842, 0.51442, 0.58254, 0.64989, 0.71677, 0.77835, 0.83806, 0.88669, 0.93200, 0.96248, 0.98663, 0.99748, 0.99606, 0.98822, 0.96052, 0.93286, 0.88388, 0.83487, 0.77446, 0.71131, 0.64379, 0.57422, 0.50485, 0.43562, 0.37010, 0.30646, 0.24980, 0.19542, 0.15078, 0.11056, 0.07648, 0.05103, 0.03075, 0.01615, 0.00698, 0.00214, 0.00034, 0.00000], - [0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00091, 0.00327, 0.00391, 0.00636, 0.00987, 0.01432, 0.02080, 0.02953, 0.04170, 0.05666, 0.07580, 0.09914, 0.12671, 0.16077, 0.20050, 0.24438, 0.29455, 0.34961, 0.40722, 0.47021, 0.53435, 0.60028, 0.66514, 0.72931, 0.78833, 0.84555, 0.89204, 0.93531, 0.96436, 0.98733, 0.99770, 0.99644, 0.98909, 0.96291, 0.93677, 0.89013, 0.84346, 0.78558, 0.72500, 0.65992, 0.59269, 0.52521, 0.45758, 0.39289, 0.32971, 0.27266, 0.21764, 0.17142, 0.12924, 0.09268, 0.06451, 0.04129, 0.02360, 0.01160, 0.00437, 0.00099, 0.00000], - [0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00101, 0.00438, 0.00671, 0.00602, 0.00783, 0.01078, 0.01670, 0.02363, 0.03315, 0.04439, 0.05928, 0.07763, 0.09986, 0.12626, 0.15676, 0.19255, 0.23356, 0.27828, 0.32845, 0.38291, 0.43955, 0.50044, 0.56211, 0.62495, 0.68648, 0.74718, 0.80247, 0.85586, 0.89932, 0.93981, 0.96702, 0.98855, 0.99833, 0.99726, 0.99056, 0.96642, 0.94233, 0.89897, 0.85560, 0.80129, 0.74436, 0.68259, 0.61853, 0.55355, 0.48803, 0.42461, 0.36227, 0.30470, 0.24875, 0.20031, 0.15546, 0.11559, 0.08334, 0.05595, 0.03411, 0.01811, 0.00754, 0.00185, 0.00000], - [0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00079, 0.00477, 0.00810, 0.01104, 0.01284, 0.01319, 0.02048, 0.02729, 0.03750, 0.05117, 0.06674, 0.08637, 0.10905, 0.13586, 0.16649, 0.20061, 0.23939, 0.28272, 0.32905, 0.37947, 0.43283, 0.48768, 0.54548, 0.60347, 0.66174, 0.71820, 0.77352, 0.82352, 0.87167, 0.91049, 0.94652, 0.97075, 0.98994, 0.99886, 0.99830, 0.99273, 0.97164, 0.95060, 0.91218, 0.87375, 0.82476, 0.77323, 0.71649, 0.65726, 0.59611, 0.53383, 0.47216, 0.41082, 0.35251, 0.29528, 0.24352, 0.19463, 0.14974, 0.11157, 0.07795, 0.04978, 0.02778, 0.01228, 0.00321, 0.00000], - [0.00000, 0.00000, 0.00000, 0.00000, 0.00066, 0.00513, 0.00921, 0.01309, 0.01903, 0.02240, 0.02251, 0.03193, 0.04515, 0.06088, 0.08071, 0.10302, 0.13041, 0.16018, 0.19397, 0.23135, 0.27175, 0.31577, 0.36257, 0.41118, 0.46223, 0.51434, 0.56692, 0.61969, 0.67173, 0.72262, 0.77083, 0.81734, 0.85847, 0.89770, 0.92889, 0.95767, 0.97705, 0.99243, 0.99987, 0.99999, 0.99620, 0.98026, 0.96436, 0.93404, 0.90372, 0.86365, 0.82124, 0.77283, 0.72157, 0.66674, 0.60980, 0.55107, 0.49146, 0.43184, 0.37238, 0.31506, 0.25947, 0.20629, 0.15826, 0.11436, 0.07577, 0.04399, 0.02027, 0.00553, 0.00000], - ], - [ - [0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00279, 0.00817, 0.01987, 0.05113, 0.08240, 0.14073, 0.19918, 0.27339, 0.35148, 0.43526, 0.52180, 0.60551, 0.68753, 0.75901, 0.82517, 0.87100, 0.91020, 0.91982, 0.91492, 0.88973, 0.83302, 0.75053, 0.63710, 0.49259, 0.33811, 0.17347, 0.00000], - [0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00132, 0.00243, 0.00225, 0.00353, 0.00425, 0.00590, 0.00795, 0.00982, 0.01225, 0.01501, 0.01796, 0.02136, 0.02541, 0.02978, 0.03444, 0.03942, 0.04461, 0.05070, 0.05700, 0.06362, 0.07052, 0.07759, 0.08503, 0.09260, 0.10024, 0.10790, 0.11544, 0.12292, 0.13260, 0.14430, 0.16126, 0.19445, 0.22764, 0.28283, 0.33811, 0.40592, 0.47680, 0.55153, 0.62811, 0.70109, 0.77192, 0.83212, 0.88694, 0.92226, 0.95124, 0.95189, 0.93879, 0.90649, 0.84442, 0.75655, 0.63851, 0.49321, 0.33830, 0.17352, 0.00000], - [0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00093, 0.00181, 0.00324, 0.00353, 0.00648, 0.00817, 0.01093, 0.01442, 0.01879, 0.02370, 0.02944, 0.03572, 0.04257, 0.05106, 0.06044, 0.07060, 0.08207, 0.09443, 0.10728, 0.12144, 0.13621, 0.15191, 0.16837, 0.18531, 0.20284, 0.22059, 0.23861, 0.25672, 0.27462, 0.29244, 0.31153, 0.33178, 0.35581, 0.39155, 0.42729, 0.47854, 0.52986, 0.58909, 0.65027, 0.71267, 0.77566, 0.83390, 0.88929, 0.93401, 0.97335, 0.99397, 1.00855, 0.99675, 0.97230, 0.93020, 0.86044, 0.76501, 0.64059, 0.49412, 0.33861, 0.17352, 0.00000], - [0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00103, 0.00351, 0.00354, 0.00529, 0.00547, 0.00906, 0.01200, 0.01564, 0.02193, 0.02833, 0.03648, 0.04600, 0.05748, 0.07030, 0.08428, 0.10059, 0.11938, 0.13965, 0.16172, 0.18586, 0.21110, 0.23893, 0.26791, 0.29866, 0.33069, 0.36353, 0.39755, 0.43200, 0.46687, 0.50185, 0.53636, 0.57066, 0.60509, 0.63962, 0.67594, 0.71773, 0.75953, 0.80763, 0.85577, 0.90546, 0.95555, 1.00270, 1.04847, 1.08724, 1.12186, 1.14478, 1.16179, 1.16055, 1.15345, 1.12153, 1.07787, 1.01784, 0.92137, 0.80098, 0.65817, 0.50723, 0.34749, 0.17816, 0.00000], - [0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00088, 0.00460, 0.00848, 0.00828, 0.01076, 0.01083, 0.01584, 0.02209, 0.03039, 0.04038, 0.05331, 0.06766, 0.08594, 0.10688, 0.13065, 0.15728, 0.18774, 0.22216, 0.25929, 0.30031, 0.34494, 0.39155, 0.44327, 0.49673, 0.55290, 0.61123, 0.67094, 0.73262, 0.79502, 0.85805, 0.92128, 0.98339, 1.04504, 1.10474, 1.16265, 1.21890, 1.26988, 1.32094, 1.36239, 1.40388, 1.43523, 1.46415, 1.48276, 1.49644, 1.49895, 1.49479, 1.47744, 1.45342, 1.41230, 1.36583, 1.29858, 1.21739, 1.11678, 0.97982, 0.83461, 0.68359, 0.52572, 0.35971, 0.18444, 0.00000], - ], - [ - [0.00000, 0.07290, 0.14580, 0.21663, 0.27556, 0.32040, 0.35186, 0.36099, 0.35907, 0.35802, 0.36274, 0.38305, 0.41188, 0.44438, 0.47755, 0.51028, 0.54236, 0.57401, 0.60492, 0.63535, 0.66536, 0.69441, 0.72245, 0.74981, 0.77616, 0.80126, 0.82567, 0.84819, 0.86987, 0.89022, 0.90887, 0.92644, 0.94169, 0.95613, 0.96772, 0.97846, 0.98614, 0.99254, 0.99651, 0.99824, 0.99866, 0.99494, 0.99126, 0.98207, 0.97290, 0.95879, 0.94352, 0.92415, 0.90284, 0.87749, 0.84975, 0.81768, 0.78348, 0.74381, 0.70251, 0.65475, 0.60408, 0.54931, 0.48795, 0.42243, 0.35181, 0.27486, 0.19093, 0.09914, 0.00000], - [0.00000, 0.07290, 0.14580, 0.21663, 0.27556, 0.32040, 0.35186, 0.36099, 0.35907, 0.35802, 0.36274, 0.38305, 0.41188, 0.44438, 0.47755, 0.51028, 0.54236, 0.57401, 0.60492, 0.63535, 0.66536, 0.69441, 0.72245, 0.74981, 0.77616, 0.80126, 0.82567, 0.84819, 0.86987, 0.89022, 0.90887, 0.92644, 0.94169, 0.95613, 0.96772, 0.97846, 0.98614, 0.99254, 0.99651, 0.99824, 0.99866, 0.99494, 0.99126, 0.98207, 0.97290, 0.95879, 0.94352, 0.92415, 0.90284, 0.87749, 0.84975, 0.81768, 0.78348, 0.74381, 0.70251, 0.65475, 0.60408, 0.54931, 0.48795, 0.42243, 0.35181, 0.27486, 0.19093, 0.09914, 0.00000], - [0.00000, 0.07290, 0.14580, 0.21663, 0.27556, 0.32040, 0.35186, 0.36099, 0.35907, 0.35802, 0.36274, 0.38305, 0.41188, 0.44438, 0.47755, 0.51028, 0.54236, 0.57401, 0.60492, 0.63535, 0.66536, 0.69441, 0.72245, 0.74981, 0.77616, 0.80126, 0.82567, 0.84819, 0.86987, 0.89022, 0.90887, 0.92644, 0.94169, 0.95613, 0.96772, 0.97846, 0.98614, 0.99254, 0.99651, 0.99824, 0.99866, 0.99494, 0.99126, 0.98207, 0.97290, 0.95879, 0.94352, 0.92415, 0.90284, 0.87749, 0.84975, 0.81768, 0.78348, 0.74381, 0.70251, 0.65475, 0.60408, 0.54931, 0.48795, 0.42243, 0.35181, 0.27486, 0.19093, 0.09914, 0.00000], - [0.00000, 0.07290, 0.14580, 0.21663, 0.27556, 0.32040, 0.35186, 0.36099, 0.35907, 0.35802, 0.36274, 0.38305, 0.41188, 0.44438, 0.47755, 0.51028, 0.54236, 0.57401, 0.60492, 0.63535, 0.66536, 0.69441, 0.72245, 0.74981, 0.77616, 0.80126, 0.82567, 0.84819, 0.86987, 0.89022, 0.90887, 0.92644, 0.94169, 0.95613, 0.96772, 0.97846, 0.98614, 0.99254, 0.99651, 0.99824, 0.99866, 0.99494, 0.99126, 0.98207, 0.97290, 0.95879, 0.94352, 0.92415, 0.90284, 0.87749, 0.84975, 0.81768, 0.78348, 0.74381, 0.70251, 0.65475, 0.60408, 0.54931, 0.48795, 0.42243, 0.35181, 0.27486, 0.19093, 0.09914, 0.00000], - [0.00000, 0.07290, 0.14580, 0.21663, 0.27556, 0.32040, 0.35186, 0.36099, 0.35907, 0.35802, 0.36274, 0.38305, 0.41188, 0.44438, 0.47755, 0.51028, 0.54236, 0.57401, 0.60492, 0.63535, 0.66536, 0.69441, 0.72245, 0.74981, 0.77616, 0.80126, 0.82567, 0.84819, 0.86987, 0.89022, 0.90887, 0.92644, 0.94169, 0.95613, 0.96772, 0.97846, 0.98614, 0.99254, 0.99651, 0.99824, 0.99866, 0.99494, 0.99126, 0.98207, 0.97290, 0.95879, 0.94352, 0.92415, 0.90284, 0.87749, 0.84975, 0.81768, 0.78348, 0.74381, 0.70251, 0.65475, 0.60408, 0.54931, 0.48795, 0.42243, 0.35181, 0.27486, 0.19093, 0.09914, 0.00000], - ], -]; - -/// Share of the tint by lightness, per wheel and Balance (at Blending 50; the global wheel ignores Balance). -pub static PROFILE_BALANCE: [[[f32; 65]; 5]; 4] = [ - [ - [0.00000, 0.10577, 0.21155, 0.30588, 0.38602, 0.43656, 0.46225, 0.48063, 0.50085, 0.52609, 0.56785, 0.62400, 0.67946, 0.73543, 0.79090, 0.84565, 0.89997, 0.95414, 1.00717, 1.05967, 1.11190, 1.16331, 1.21336, 1.26280, 1.31176, 1.35914, 1.40577, 1.45075, 1.49503, 1.53819, 1.57872, 1.61764, 1.64158, 1.66017, 1.67358, 1.68542, 1.68888, 1.68876, 1.68101, 1.66622, 1.64718, 1.61501, 1.58288, 1.53179, 1.48071, 1.41420, 1.34405, 1.26190, 1.17416, 1.07767, 0.97615, 0.86907, 0.75940, 0.64895, 0.53904, 0.43621, 0.34059, 0.25473, 0.19016, 0.13893, 0.09989, 0.06442, 0.03324, 0.01020, 0.00000], - [0.00000, 0.10577, 0.21155, 0.30588, 0.38602, 0.43656, 0.46225, 0.48063, 0.50165, 0.52660, 0.56753, 0.62371, 0.67981, 0.73543, 0.79067, 0.84503, 0.89971, 0.95301, 1.00519, 1.05674, 1.10722, 1.15359, 1.18777, 1.21579, 1.23796, 1.25647, 1.27261, 1.27972, 1.28242, 1.27818, 1.26576, 1.24819, 1.22002, 1.18822, 1.14524, 1.09903, 1.04351, 0.98409, 0.91978, 0.85091, 0.78150, 0.71007, 0.63873, 0.57286, 0.50706, 0.45153, 0.39854, 0.35661, 0.32001, 0.29074, 0.26584, 0.24070, 0.21544, 0.19005, 0.16466, 0.13995, 0.11583, 0.09254, 0.07133, 0.05187, 0.03464, 0.02019, 0.00939, 0.00262, 0.00000], - [0.00000, 0.10577, 0.21155, 0.30588, 0.38577, 0.43526, 0.46277, 0.48157, 0.50133, 0.52624, 0.56814, 0.62334, 0.67914, 0.73383, 0.78757, 0.83922, 0.88508, 0.91696, 0.93625, 0.95181, 0.96571, 0.97149, 0.96806, 0.95815, 0.93834, 0.90900, 0.87476, 0.82905, 0.77999, 0.72558, 0.66911, 0.61132, 0.55643, 0.50257, 0.45718, 0.41435, 0.38210, 0.35436, 0.33305, 0.31767, 0.30212, 0.28604, 0.26997, 0.25300, 0.23602, 0.21868, 0.20124, 0.18385, 0.16650, 0.14959, 0.13296, 0.11709, 0.10160, 0.08714, 0.07301, 0.06045, 0.04859, 0.03771, 0.02829, 0.01995, 0.01294, 0.00745, 0.00327, 0.00088, 0.00000], - [0.00000, 0.10577, 0.21155, 0.30588, 0.38577, 0.43505, 0.46183, 0.48135, 0.50154, 0.52492, 0.56397, 0.61359, 0.65360, 0.67586, 0.67735, 0.67005, 0.65960, 0.63728, 0.60374, 0.56176, 0.51391, 0.46261, 0.41415, 0.36916, 0.33133, 0.30378, 0.28161, 0.27156, 0.26183, 0.25259, 0.24259, 0.23210, 0.22120, 0.21015, 0.19886, 0.18749, 0.17619, 0.16492, 0.15385, 0.14297, 0.13225, 0.12201, 0.11178, 0.10249, 0.09320, 0.08445, 0.07584, 0.06790, 0.06028, 0.05315, 0.04631, 0.04005, 0.03408, 0.02884, 0.02383, 0.01956, 0.01555, 0.01189, 0.00871, 0.00600, 0.00384, 0.00223, 0.00105, 0.00023, 0.00000], - [0.00000, 0.10577, 0.21155, 0.30315, 0.37857, 0.42084, 0.43468, 0.42680, 0.40202, 0.35999, 0.29189, 0.23017, 0.18884, 0.16149, 0.15006, 0.14305, 0.13681, 0.12934, 0.12152, 0.11362, 0.10580, 0.09834, 0.09146, 0.08484, 0.07841, 0.07245, 0.06676, 0.06181, 0.05708, 0.05267, 0.04855, 0.04461, 0.04110, 0.03774, 0.03485, 0.03210, 0.02942, 0.02677, 0.02441, 0.02230, 0.02027, 0.01843, 0.01660, 0.01512, 0.01363, 0.01221, 0.01081, 0.00957, 0.00841, 0.00730, 0.00623, 0.00534, 0.00454, 0.00381, 0.00311, 0.00257, 0.00204, 0.00155, 0.00108, 0.00072, 0.00048, 0.00032, 0.00028, 0.00000, 0.00000], - ], - [ - [0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00002, 0.00085, 0.00087, 0.00216, 0.00273, 0.00340, 0.00493, 0.00618, 0.00746, 0.00897, 0.01078, 0.01338, 0.01629, 0.01931, 0.02280, 0.02662, 0.03157, 0.03691, 0.04285, 0.04974, 0.05723, 0.06613, 0.07554, 0.08661, 0.09818, 0.11160, 0.12583, 0.14166, 0.15897, 0.17714, 0.19796, 0.21879, 0.24276, 0.26676, 0.29289, 0.31958, 0.34720, 0.37532, 0.40311, 0.43079, 0.45633, 0.48095, 0.50010, 0.51756, 0.52389, 0.52268, 0.51077, 0.47505, 0.42083, 0.34389, 0.24225, 0.12860, 0.03675, 0.00000], - [0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00132, 0.00279, 0.00319, 0.00550, 0.00689, 0.00987, 0.01317, 0.01729, 0.02285, 0.02950, 0.03730, 0.04629, 0.05705, 0.07044, 0.08557, 0.10314, 0.12353, 0.14553, 0.17216, 0.20097, 0.23316, 0.26870, 0.30638, 0.34823, 0.39159, 0.43831, 0.48609, 0.53541, 0.58545, 0.63490, 0.68385, 0.73132, 0.77405, 0.81688, 0.84793, 0.87905, 0.89613, 0.90985, 0.90909, 0.90141, 0.87892, 0.84759, 0.80131, 0.74749, 0.67875, 0.60578, 0.52161, 0.43595, 0.34818, 0.26450, 0.18703, 0.11881, 0.06417, 0.02670, 0.00643, 0.00000], - [0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00101, 0.00438, 0.00671, 0.00602, 0.00783, 0.01078, 0.01670, 0.02363, 0.03315, 0.04439, 0.05928, 0.07763, 0.09986, 0.12626, 0.15676, 0.19255, 0.23356, 0.27828, 0.32845, 0.38291, 0.43955, 0.50044, 0.56211, 0.62495, 0.68648, 0.74718, 0.80247, 0.85586, 0.89932, 0.93981, 0.96702, 0.98855, 0.99833, 0.99726, 0.99056, 0.96642, 0.94233, 0.89897, 0.85560, 0.80129, 0.74436, 0.68259, 0.61853, 0.55355, 0.48803, 0.42461, 0.36227, 0.30470, 0.24875, 0.20031, 0.15546, 0.11559, 0.08334, 0.05595, 0.03411, 0.01811, 0.00754, 0.00185, 0.00000], - [0.00000, 0.00000, 0.00000, 0.00000, 0.00066, 0.00513, 0.00921, 0.01398, 0.02168, 0.02649, 0.02990, 0.04604, 0.06717, 0.09567, 0.13148, 0.17327, 0.22438, 0.28248, 0.34558, 0.41270, 0.48262, 0.55311, 0.62011, 0.68358, 0.74039, 0.78645, 0.82643, 0.84920, 0.86402, 0.86649, 0.85718, 0.84036, 0.81216, 0.77997, 0.74020, 0.69822, 0.65314, 0.60679, 0.56054, 0.51437, 0.46903, 0.42600, 0.38305, 0.34465, 0.30632, 0.27208, 0.23887, 0.20903, 0.18081, 0.15558, 0.13214, 0.11151, 0.09231, 0.07609, 0.06077, 0.04843, 0.03723, 0.02759, 0.01994, 0.01348, 0.00836, 0.00458, 0.00197, 0.00047, 0.00000], - [0.00000, 0.00308, 0.00615, 0.01813, 0.04020, 0.07201, 0.11173, 0.15030, 0.18391, 0.20533, 0.24870, 0.31569, 0.38298, 0.43956, 0.47965, 0.49813, 0.49751, 0.48108, 0.45480, 0.42319, 0.38891, 0.35402, 0.32105, 0.28963, 0.26068, 0.23468, 0.21026, 0.18945, 0.17006, 0.15285, 0.13749, 0.12332, 0.11115, 0.09969, 0.08996, 0.08075, 0.07277, 0.06532, 0.05862, 0.05262, 0.04692, 0.04214, 0.03736, 0.03347, 0.02958, 0.02627, 0.02311, 0.02028, 0.01761, 0.01523, 0.01302, 0.01111, 0.00934, 0.00779, 0.00631, 0.00516, 0.00407, 0.00305, 0.00226, 0.00158, 0.00103, 0.00062, 0.00029, 0.00009, 0.00000], - ], - [ - [0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00055, 0.00070, 0.00099, 0.00161, 0.00187, 0.00222, 0.00270, 0.00328, 0.00409, 0.00522, 0.00639, 0.00740, 0.00855, 0.00980, 0.01146, 0.01322, 0.01512, 0.01724, 0.01950, 0.02213, 0.02489, 0.02802, 0.03126, 0.03484, 0.03858, 0.04267, 0.04710, 0.05163, 0.05648, 0.06132, 0.06704, 0.07275, 0.07872, 0.08475, 0.09097, 0.09727, 0.10365, 0.11005, 0.11627, 0.12239, 0.12779, 0.13295, 0.13690, 0.13979, 0.14121, 0.13930, 0.13642, 0.13626, 0.14939, 0.16753, 0.13743, 0.00000], - [0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00043, 0.00102, 0.00225, 0.00239, 0.00412, 0.00435, 0.00648, 0.00857, 0.01048, 0.01268, 0.01537, 0.01867, 0.02246, 0.02661, 0.03131, 0.03645, 0.04188, 0.04839, 0.05527, 0.06271, 0.07095, 0.07970, 0.08924, 0.09906, 0.10970, 0.12059, 0.13225, 0.14424, 0.15661, 0.16933, 0.18211, 0.19511, 0.20810, 0.22097, 0.23383, 0.24568, 0.25728, 0.26755, 0.27719, 0.28751, 0.29825, 0.31795, 0.34218, 0.37608, 0.41260, 0.45368, 0.49196, 0.52633, 0.54279, 0.54120, 0.51441, 0.45145, 0.32949, 0.17194, 0.00000], - [0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00093, 0.00181, 0.00324, 0.00353, 0.00648, 0.00817, 0.01093, 0.01442, 0.01879, 0.02370, 0.02944, 0.03572, 0.04257, 0.05106, 0.06044, 0.07060, 0.08207, 0.09443, 0.10728, 0.12144, 0.13621, 0.15191, 0.16837, 0.18531, 0.20284, 0.22059, 0.23861, 0.25672, 0.27462, 0.29244, 0.31153, 0.33178, 0.35581, 0.39155, 0.42729, 0.47854, 0.52986, 0.58909, 0.65027, 0.71267, 0.77566, 0.83390, 0.88929, 0.93401, 0.97335, 0.99397, 1.00855, 0.99675, 0.97230, 0.93020, 0.86044, 0.76501, 0.64059, 0.49412, 0.33861, 0.17352, 0.00000], - [0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00088, 0.00405, 0.00407, 0.00701, 0.01022, 0.00981, 0.01384, 0.01971, 0.02689, 0.03464, 0.04530, 0.05603, 0.06910, 0.08374, 0.09960, 0.11658, 0.13514, 0.15490, 0.17537, 0.19672, 0.21864, 0.24100, 0.26537, 0.29547, 0.33449, 0.38449, 0.44151, 0.51055, 0.58390, 0.66625, 0.75138, 0.83991, 0.92998, 1.01874, 1.10632, 1.19133, 1.26818, 1.34512, 1.40487, 1.46460, 1.50650, 1.54404, 1.56483, 1.57756, 1.57420, 1.56122, 1.53179, 1.49406, 1.43752, 1.37529, 1.29284, 1.19627, 1.08004, 0.94247, 0.79942, 0.65191, 0.49910, 0.34020, 0.17378, 0.00000], - [0.00000, 0.00000, 0.00000, 0.00562, 0.01306, 0.01805, 0.02930, 0.03822, 0.04720, 0.05387, 0.05855, 0.07747, 0.09941, 0.12178, 0.14802, 0.18453, 0.24197, 0.31781, 0.40878, 0.51092, 0.62144, 0.73976, 0.86201, 0.98601, 1.11085, 1.23280, 1.35300, 1.46653, 1.57579, 1.67829, 1.77206, 1.86024, 1.93615, 2.00771, 2.06511, 2.11827, 2.15778, 2.19145, 2.21484, 2.22875, 2.23792, 2.23244, 2.22698, 2.20359, 2.18016, 2.14289, 2.10229, 2.05123, 1.99519, 1.92973, 1.85871, 1.77861, 1.69400, 1.59870, 1.49907, 1.36670, 1.23177, 1.09313, 0.94988, 0.80384, 0.65427, 0.50013, 0.34054, 0.17384, 0.00000], - ], - [ - [0.00000, 0.07290, 0.14580, 0.21663, 0.27556, 0.32040, 0.35186, 0.36099, 0.35907, 0.35802, 0.36274, 0.38305, 0.41188, 0.44438, 0.47755, 0.51028, 0.54236, 0.57401, 0.60492, 0.63535, 0.66536, 0.69441, 0.72245, 0.74981, 0.77616, 0.80126, 0.82567, 0.84819, 0.86987, 0.89022, 0.90887, 0.92644, 0.94169, 0.95613, 0.96772, 0.97846, 0.98614, 0.99254, 0.99651, 0.99824, 0.99866, 0.99494, 0.99126, 0.98207, 0.97290, 0.95879, 0.94352, 0.92415, 0.90284, 0.87749, 0.84975, 0.81768, 0.78348, 0.74381, 0.70251, 0.65475, 0.60408, 0.54931, 0.48795, 0.42243, 0.35181, 0.27486, 0.19093, 0.09914, 0.00000], - [0.00000, 0.07290, 0.14580, 0.21663, 0.27556, 0.32040, 0.35186, 0.36099, 0.35907, 0.35802, 0.36274, 0.38305, 0.41188, 0.44438, 0.47755, 0.51028, 0.54236, 0.57401, 0.60492, 0.63535, 0.66536, 0.69441, 0.72245, 0.74981, 0.77616, 0.80126, 0.82567, 0.84819, 0.86987, 0.89022, 0.90887, 0.92644, 0.94169, 0.95613, 0.96772, 0.97846, 0.98614, 0.99254, 0.99651, 0.99824, 0.99866, 0.99494, 0.99126, 0.98207, 0.97290, 0.95879, 0.94352, 0.92415, 0.90284, 0.87749, 0.84975, 0.81768, 0.78348, 0.74381, 0.70251, 0.65475, 0.60408, 0.54931, 0.48795, 0.42243, 0.35181, 0.27486, 0.19093, 0.09914, 0.00000], - [0.00000, 0.07290, 0.14580, 0.21663, 0.27556, 0.32040, 0.35186, 0.36099, 0.35907, 0.35802, 0.36274, 0.38305, 0.41188, 0.44438, 0.47755, 0.51028, 0.54236, 0.57401, 0.60492, 0.63535, 0.66536, 0.69441, 0.72245, 0.74981, 0.77616, 0.80126, 0.82567, 0.84819, 0.86987, 0.89022, 0.90887, 0.92644, 0.94169, 0.95613, 0.96772, 0.97846, 0.98614, 0.99254, 0.99651, 0.99824, 0.99866, 0.99494, 0.99126, 0.98207, 0.97290, 0.95879, 0.94352, 0.92415, 0.90284, 0.87749, 0.84975, 0.81768, 0.78348, 0.74381, 0.70251, 0.65475, 0.60408, 0.54931, 0.48795, 0.42243, 0.35181, 0.27486, 0.19093, 0.09914, 0.00000], - [0.00000, 0.07290, 0.14580, 0.21663, 0.27556, 0.32040, 0.35186, 0.36099, 0.35907, 0.35802, 0.36274, 0.38305, 0.41188, 0.44438, 0.47755, 0.51028, 0.54236, 0.57401, 0.60492, 0.63535, 0.66536, 0.69441, 0.72245, 0.74981, 0.77616, 0.80126, 0.82567, 0.84819, 0.86987, 0.89022, 0.90887, 0.92644, 0.94169, 0.95613, 0.96772, 0.97846, 0.98614, 0.99254, 0.99651, 0.99824, 0.99866, 0.99494, 0.99126, 0.98207, 0.97290, 0.95879, 0.94352, 0.92415, 0.90284, 0.87749, 0.84975, 0.81768, 0.78348, 0.74381, 0.70251, 0.65475, 0.60408, 0.54931, 0.48795, 0.42243, 0.35181, 0.27486, 0.19093, 0.09914, 0.00000], - [0.00000, 0.07290, 0.14580, 0.21663, 0.27556, 0.32040, 0.35186, 0.36099, 0.35907, 0.35802, 0.36274, 0.38305, 0.41188, 0.44438, 0.47755, 0.51028, 0.54236, 0.57401, 0.60492, 0.63535, 0.66536, 0.69441, 0.72245, 0.74981, 0.77616, 0.80126, 0.82567, 0.84819, 0.86987, 0.89022, 0.90887, 0.92644, 0.94169, 0.95613, 0.96772, 0.97846, 0.98614, 0.99254, 0.99651, 0.99824, 0.99866, 0.99494, 0.99126, 0.98207, 0.97290, 0.95879, 0.94352, 0.92415, 0.90284, 0.87749, 0.84975, 0.81768, 0.78348, 0.74381, 0.70251, 0.65475, 0.60408, 0.54931, 0.48795, 0.42243, 0.35181, 0.27486, 0.19093, 0.09914, 0.00000], - ], -]; - -/// Lightness change by lightness, per wheel and Luminance. -pub static LUM: [[[f32; 65]; 4]; 4] = [ - [ - [-0.000000, -0.015625, -0.031250, -0.046875, -0.062500, -0.077380, -0.090185, -0.105006, -0.118033, -0.129777, -0.139887, -0.147565, -0.151420, -0.152247, -0.149120, -0.142476, -0.132786, -0.124434, -0.120218, -0.117058, -0.113333, -0.108705, -0.103438, -0.097790, -0.091678, -0.085253, -0.078696, -0.072065, -0.065541, -0.059181, -0.053202, -0.047466, -0.042438, -0.037663, -0.033849, -0.030324, -0.027742, -0.025562, -0.023897, -0.022706, -0.021512, -0.020308, -0.019104, -0.017863, -0.016621, -0.015376, -0.014131, -0.012908, -0.011695, -0.010511, -0.009344, -0.008228, -0.007137, -0.006129, -0.005146, -0.004257, -0.003421, -0.002660, -0.001998, -0.001410, -0.000912, -0.000511, -0.000242, -0.000063, 0.000000], - [-0.000000, -0.005827, -0.011655, -0.017659, -0.023540, -0.029054, -0.034205, -0.038794, -0.042181, -0.043852, -0.041327, -0.037318, -0.036876, -0.038858, -0.041000, -0.042834, -0.044332, -0.045401, -0.046047, -0.046299, -0.046178, -0.045542, -0.044432, -0.043010, -0.041155, -0.038970, -0.036621, -0.033966, -0.031279, -0.028541, -0.025875, -0.023256, -0.020902, -0.018642, -0.016802, -0.015088, -0.013828, -0.012762, -0.011949, -0.011370, -0.010786, -0.010190, -0.009594, -0.008976, -0.008358, -0.007730, -0.007101, -0.006484, -0.005873, -0.005279, -0.004694, -0.004130, -0.003578, -0.003069, -0.002573, -0.002131, -0.001716, -0.001336, -0.001006, -0.000712, -0.000462, -0.000267, -0.000132, -0.000026, 0.000000], - [0.000000, 0.062484, 0.124967, 0.126772, 0.115550, 0.104858, 0.094968, 0.085945, 0.078067, 0.071546, 0.067596, 0.065365, 0.063180, 0.061127, 0.059107, 0.057118, 0.055157, 0.053163, 0.051185, 0.049147, 0.047020, 0.044793, 0.042447, 0.040016, 0.037457, 0.034781, 0.032051, 0.029256, 0.026469, 0.023692, 0.021040, 0.018468, 0.016194, 0.014026, 0.012336, 0.010789, 0.009767, 0.008968, 0.008376, 0.007975, 0.007571, 0.007159, 0.006746, 0.006317, 0.005887, 0.005452, 0.005016, 0.004576, 0.004136, 0.003712, 0.003299, 0.002909, 0.002530, 0.002170, 0.001816, 0.001505, 0.001211, 0.000938, 0.000707, 0.000497, 0.000316, 0.000178, 0.000086, 0.000027, 0.000000], - [0.000000, 0.091464, 0.182928, 0.189871, 0.178253, 0.167231, 0.156849, 0.147256, 0.138416, 0.130253, 0.124233, 0.119695, 0.115351, 0.111150, 0.107063, 0.103130, 0.099225, 0.095428, 0.091685, 0.087923, 0.084107, 0.080199, 0.076152, 0.071991, 0.067645, 0.063119, 0.058502, 0.053703, 0.048901, 0.044091, 0.039448, 0.034910, 0.030862, 0.026988, 0.023980, 0.021232, 0.019382, 0.017915, 0.016795, 0.015995, 0.015190, 0.014373, 0.013557, 0.012683, 0.011808, 0.010932, 0.010057, 0.009184, 0.008312, 0.007465, 0.006632, 0.005837, 0.005062, 0.004343, 0.003642, 0.003007, 0.002412, 0.001875, 0.001405, 0.000991, 0.000647, 0.000374, 0.000155, 0.000043, 0.000000], - ], - [ - [0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, -0.000171, -0.000467, -0.000302, -0.000426, -0.000516, -0.000879, -0.001144, -0.001631, -0.002287, -0.003056, -0.004063, -0.005334, -0.006868, -0.008677, -0.010940, -0.013583, -0.016521, -0.019936, -0.023805, -0.027906, -0.032487, -0.037199, -0.042116, -0.047057, -0.052013, -0.056642, -0.061153, -0.064945, -0.068521, -0.071124, -0.073310, -0.074607, -0.075083, -0.075138, -0.073893, -0.072648, -0.069906, -0.067157, -0.063506, -0.059634, -0.055275, -0.050682, -0.045873, -0.040936, -0.036010, -0.031090, -0.026411, -0.021819, -0.017716, -0.013883, -0.010426, -0.007577, -0.005124, -0.003136, -0.001663, -0.000718, -0.000185, 0.000000], - [0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, -0.000192, -0.000220, -0.000343, -0.000510, -0.000682, -0.000914, -0.001176, -0.001649, -0.002183, -0.002873, -0.003704, -0.004668, -0.005849, -0.007222, -0.008749, -0.010526, -0.012496, -0.014567, -0.016862, -0.019215, -0.021656, -0.024084, -0.026503, -0.028747, -0.030928, -0.032743, -0.034449, -0.035661, -0.036662, -0.037223, -0.037378, -0.037316, -0.036586, -0.035855, -0.034388, -0.032918, -0.030995, -0.028960, -0.026701, -0.024332, -0.021891, -0.019406, -0.016954, -0.014517, -0.012247, -0.010033, -0.008093, -0.006293, -0.004688, -0.003386, -0.002273, -0.001380, -0.000731, -0.000309, -0.000080, 0.000000], - [0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000155, 0.000334, 0.000277, 0.000342, 0.000570, 0.000802, 0.001135, 0.001535, 0.002013, 0.002664, 0.003470, 0.004427, 0.005529, 0.006818, 0.008331, 0.009993, 0.011865, 0.013918, 0.016062, 0.018397, 0.020772, 0.023209, 0.025591, 0.027938, 0.030096, 0.032188, 0.033874, 0.035438, 0.036492, 0.037329, 0.037696, 0.037628, 0.037339, 0.036365, 0.035392, 0.033671, 0.031947, 0.029806, 0.027563, 0.025142, 0.022636, 0.020125, 0.017613, 0.015204, 0.012848, 0.010718, 0.008661, 0.006918, 0.005313, 0.003902, 0.002800, 0.001868, 0.001128, 0.000595, 0.000243, 0.000060, 0.000000], - [0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000172, 0.000570, 0.000438, 0.000525, 0.000688, 0.000898, 0.001331, 0.001806, 0.002556, 0.003435, 0.004586, 0.005972, 0.007722, 0.009778, 0.012112, 0.014891, 0.018067, 0.021527, 0.025412, 0.029634, 0.034024, 0.038741, 0.043516, 0.048378, 0.053133, 0.057820, 0.062078, 0.066184, 0.069466, 0.072501, 0.074455, 0.075947, 0.076469, 0.076094, 0.075261, 0.073012, 0.070763, 0.067006, 0.063243, 0.058701, 0.053967, 0.048966, 0.043835, 0.038754, 0.033703, 0.028937, 0.024314, 0.020185, 0.016213, 0.012886, 0.009849, 0.007217, 0.005149, 0.003416, 0.002058, 0.001082, 0.000441, 0.000116, 0.000000], - ], - [ - [0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, -0.000220, -0.000173, -0.000368, -0.000461, -0.000503, -0.000714, -0.000955, -0.001198, -0.001492, -0.001826, -0.002196, -0.002633, -0.003123, -0.003656, -0.004261, -0.004912, -0.005588, -0.006337, -0.007114, -0.007937, -0.008794, -0.009674, -0.010590, -0.011520, -0.012457, -0.013397, -0.014331, -0.015261, -0.016253, -0.017302, -0.018579, -0.020556, -0.022534, -0.025877, -0.029226, -0.033357, -0.037679, -0.042337, -0.047157, -0.052000, -0.056857, -0.061518, -0.066080, -0.070196, -0.074170, -0.077543, -0.080622, -0.083291, -0.085303, -0.086889, -0.087970, -0.088471, -0.088327, -0.087427, -0.085841], - [0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, -0.000170, -0.000145, -0.000212, -0.000305, -0.000343, -0.000485, -0.000600, -0.000765, -0.000934, -0.001101, -0.001341, -0.001577, -0.001827, -0.002119, -0.002453, -0.002805, -0.003170, -0.003548, -0.003949, -0.004378, -0.004824, -0.005280, -0.005741, -0.006216, -0.006696, -0.007167, -0.007634, -0.008135, -0.008668, -0.009340, -0.010441, -0.011543, -0.013408, -0.015276, -0.017594, -0.020022, -0.022658, -0.025394, -0.028165, -0.030957, -0.033624, -0.036227, -0.038554, -0.040788, -0.042593, -0.044181, -0.045465, -0.046256, -0.046730, -0.046830, -0.046496, -0.045687, -0.044389, -0.042685], - [0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000057, 0.000170, 0.000223, 0.000341, 0.000421, 0.000558, 0.000691, 0.000856, 0.001043, 0.001287, 0.001582, 0.001867, 0.002214, 0.002592, 0.002999, 0.003448, 0.003919, 0.004453, 0.005010, 0.005606, 0.006220, 0.006845, 0.007507, 0.008180, 0.008865, 0.009552, 0.010230, 0.010904, 0.011636, 0.012421, 0.013355, 0.014745, 0.016135, 0.018172, 0.020212, 0.022600, 0.025074, 0.027632, 0.030232, 0.032673, 0.035019, 0.036923, 0.038603, 0.039504, 0.040150, 0.039665, 0.038642, 0.036868, 0.033959, 0.030332, 0.025883, 0.020562, 0.014392, 0.007495, 0.000000], - [0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000224, 0.000206, 0.000342, 0.000494, 0.000582, 0.000832, 0.001087, 0.001320, 0.001696, 0.002124, 0.002604, 0.003136, 0.003720, 0.004398, 0.005137, 0.005965, 0.006869, 0.007815, 0.008871, 0.009975, 0.011150, 0.012374, 0.013628, 0.014949, 0.016293, 0.017675, 0.019068, 0.020459, 0.021849, 0.023349, 0.024950, 0.026858, 0.029717, 0.032576, 0.036764, 0.040958, 0.045964, 0.051169, 0.056612, 0.062170, 0.067442, 0.072543, 0.076752, 0.080512, 0.082567, 0.084067, 0.083083, 0.080908, 0.077072, 0.070756, 0.062937, 0.053423, 0.042161, 0.029311, 0.015150, 0.000000], - ], - [ - [-0.000000, -0.004569, -0.009138, -0.014034, -0.017927, -0.022037, -0.025798, -0.028851, -0.031400, -0.032176, -0.029285, -0.026541, -0.028029, -0.030356, -0.032685, -0.034893, -0.037233, -0.039447, -0.041656, -0.043841, -0.045988, -0.048089, -0.050178, -0.052242, -0.054246, -0.056190, -0.058104, -0.059955, -0.061749, -0.063454, -0.065085, -0.066671, -0.068130, -0.069544, -0.070816, -0.072046, -0.073103, -0.074087, -0.074914, -0.075595, -0.076192, -0.076528, -0.076863, -0.076780, -0.076694, -0.076255, -0.075729, -0.074856, -0.073817, -0.072426, -0.070824, -0.068813, -0.066594, -0.063840, -0.060918, -0.057316, -0.053404, -0.049058, -0.043982, -0.038431, -0.032302, -0.025456, -0.017850, -0.009341, 0.000000], - [-0.000000, -0.002195, -0.004389, -0.007324, -0.009611, -0.011721, -0.013330, -0.014787, -0.015819, -0.015831, -0.013341, -0.013294, -0.014396, -0.015597, -0.016732, -0.017866, -0.019049, -0.020183, -0.021294, -0.022392, -0.023482, -0.024584, -0.025620, -0.026632, -0.027635, -0.028610, -0.029568, -0.030471, -0.031343, -0.032167, -0.032949, -0.033705, -0.034390, -0.035049, -0.035626, -0.036177, -0.036632, -0.037046, -0.037379, -0.037636, -0.037844, -0.037900, -0.037956, -0.037795, -0.037632, -0.037279, -0.036880, -0.036316, -0.035673, -0.034853, -0.033928, -0.032807, -0.031589, -0.030117, -0.028566, -0.026713, -0.024728, -0.022559, -0.020080, -0.017407, -0.014504, -0.011328, -0.007877, -0.004080, 0.000000], - [0.000000, 0.003048, 0.006097, 0.008608, 0.011185, 0.013335, 0.014867, 0.015929, 0.015529, 0.013610, 0.013035, 0.014337, 0.015581, 0.016832, 0.018111, 0.019329, 0.020531, 0.021697, 0.022906, 0.024091, 0.025223, 0.026306, 0.027390, 0.028452, 0.029448, 0.030403, 0.031337, 0.032208, 0.033045, 0.033830, 0.034541, 0.035205, 0.035790, 0.036347, 0.036788, 0.037196, 0.037485, 0.037723, 0.037858, 0.037896, 0.037882, 0.037709, 0.037536, 0.037130, 0.036723, 0.036126, 0.035482, 0.034663, 0.033759, 0.032702, 0.031552, 0.030225, 0.028810, 0.027200, 0.025529, 0.023624, 0.021621, 0.019482, 0.017151, 0.014691, 0.012081, 0.009311, 0.006362, 0.003256, 0.000000], - [0.000000, 0.006390, 0.012781, 0.019032, 0.024288, 0.028362, 0.031377, 0.031926, 0.029747, 0.026964, 0.027527, 0.030215, 0.032920, 0.035586, 0.038222, 0.040816, 0.043315, 0.045814, 0.048280, 0.050685, 0.053026, 0.055296, 0.057482, 0.059605, 0.061633, 0.063547, 0.065400, 0.067104, 0.068726, 0.070219, 0.071554, 0.072787, 0.073817, 0.074775, 0.075490, 0.076131, 0.076503, 0.076760, 0.076802, 0.076645, 0.076377, 0.075761, 0.075146, 0.074066, 0.072984, 0.071513, 0.069947, 0.068052, 0.066000, 0.063658, 0.061142, 0.058315, 0.055330, 0.052002, 0.048567, 0.044733, 0.040737, 0.036518, 0.031980, 0.027247, 0.022291, 0.017091, 0.011626, 0.005929, 0.000000], - ], -]; - -/// Share of the tint a colour gets, per wheel, chroma level and angle between its hue and the tint's (30 degree bins). -pub static DAMPING: [[[f32; 6]; 3]; 4] = [ - [ - [0.8972, 0.8972, 0.9472, 0.9883, 1.0299, 1.0456], - [0.8114, 0.8132, 0.8666, 0.9618, 0.9899, 1.0505], - [0.6237, 0.7830, 0.9143, 1.0750, 1.0236, 1.1827], - ], - [ - [0.9589, 0.9558, 0.9740, 0.9837, 0.9933, 0.9900], - [0.8359, 0.8761, 0.8829, 0.9179, 0.9269, 0.9107], - [1.0203, 0.9884, 0.9041, 0.9244, 0.9580, 1.0181], - ], - [ - [0.9719, 0.9822, 0.9888, 0.9888, 0.9830, 0.9826], - [0.9058, 0.8993, 0.9260, 0.9398, 0.9448, 0.9848], - [0.9056, 0.8774, 0.8967, 0.8801, 0.9082, 1.0064], - ], - [ - [0.9575, 0.9652, 0.9784, 0.9858, 0.9994, 0.9953], - [0.9106, 0.9254, 0.9445, 0.9744, 0.9827, 0.9793], - [0.8952, 0.8732, 0.9261, 0.9346, 0.9503, 0.9545], - ], -]; diff --git a/crates/pipeline/src/lib.rs b/crates/pipeline/src/lib.rs index f1a2cffff68..4bceccfe3bb 100644 --- a/crates/pipeline/src/lib.rs +++ b/crates/pipeline/src/lib.rs @@ -39,7 +39,7 @@ pub mod finish; pub mod geometry; pub mod grading_stage; #[rustfmt::skip] -mod grading_stage_tables; +mod grading_stage_model; pub mod lens_blur; pub mod light_v3; // generated (`light_v3_params.rs`), kept in its own compact layout diff --git a/docs/grading-stage.md b/docs/grading-stage.md index a1963709143..4979187fee8 100644 --- a/docs/grading-stage.md +++ b/docs/grading-stage.md @@ -3,9 +3,10 @@ > **Changes:** [revision history](#revision-history) Process V9 renders Colour Grading (the shadows, midtones, highlights and global wheels with Blending and Balance) the -way Lightroom does, from measurements of Camera Raw's output. V1 to V8 are unchanged (`docs/process-versions.md`). -The code is `crates/pipeline/src/grading_stage.rs`, its measured tables `crates/pipeline/src/grading_stage_tables.rs`, -and the GPU kernel's `measured_grade` in `crates/gpu/src/wgsl/finish.wgsl`. +way Lightroom does, with LightCraft's own model fitted to measurements of Camera Raw's output. V1 to V8 are unchanged +(`docs/process-versions.md`). The code is `crates/pipeline/src/grading_stage.rs`, the model's fitted constants +`crates/pipeline/src/grading_stage_model.rs`, and the GPU kernel's `measured_grade` in +`crates/gpu/src/wgsl/finish.wgsl`. ## What was wrong @@ -27,17 +28,31 @@ patches: At the end of the colour tools, where V8 grades (`ColorOps::grade`), in OkLab: 1. Each wheel with a saturation above 0 adds its tint times its share at the pixel's lightness, times the damping. - - The tint comes from the measured table: 12 hues of 30Β°, saturation 25, 50 and 100, linear in between, and - from none at saturation 0. - - The share comes from the profile measured at the pixel's Blending, plus the change that Balance makes (not for - the global wheel). + - The tint comes from the model (below): its direction and size around the hue circle, the wheel's size and its + saturation curve, from none at saturation 0. + - The share comes from the model's profile at the pixel's lightness, for the Blending and Balance set (the global + wheel ignores Balance). - The damping depends on the pixel's chroma (levels 0.04, 0.08 and 0.12, from none at 0) and on the angle between - its hue and the tint's (measured in bins of 30Β°, linear between their centres). -2. Each wheel's Luminance adds a lightness change by lightness, measured at Β±50 and Β±100, linear in between. + its hue and the tint's (the model sampled at the centres of bins of 30Β°, linear between them). +2. Each wheel's Luminance adds a lightness change by lightness, from the model. 3. The wheels act on the same input colour and their changes add. V8's grading is off under V9 (`ColorOps::grading` is `None`). With Colour Grading neutral the stage does not run. +## The model + +262 constants (`grading_stage_model.rs`): + +- **Tint.** All four wheels share one shape around the hue circle: a Fourier series of the wheel hue (4 harmonics) for + the tint's direction as an offset from the wheel hue, and one for its log size. Each wheel adds its own size and a + saturation curve `s (1 + g1 (s βˆ’ 1) + g2 (s βˆ’ 1)Β²)`, `s` = saturation / 100. 30 constants. +- **Share by lightness.** Per wheel, two bumps of the kind the curve stage uses ([curve-stage.md](curve-stage.md)), + whose gain and exponents are quadratic in Blending and in Balance. 30 constants per wheel. +- **Luminance.** Per wheel and direction, two bumps whose gain and exponents change with the amount. 24 constants + per wheel. +- **Damping.** Per wheel, `1 + (C / 0.12)^e (d0 + d1 cos a + d2 cos 2a)` for chroma `C` and angle `a` between the + colour's hue and the tint's. 4 constants per wheel. + ## How it was measured `tools/lr_grading_charts.py charts OUT_DIR` writes linear DNG charts with the grey steps and colour patches of @@ -52,20 +67,23 @@ V8's grading is off under V9 (`ColorOps::grading` is `None`). With Colour Gradin The charts are original test data. Every chart was rendered through Camera Raw to a 16-bit Adobe RGB (1998) TIFF. Only that output is measured, and nothing of Adobe's is copied or shipped. -`tools/lr_grading_charts.py tables RENDER_DIR OUT_RS` reads each render's patches as OkLab and writes -`grading_stage_tables.rs`: +`tools/lr_grading_charts.py fit RENDER_DIR OUT_RS` reads each render's patches as OkLab, measures the following in +memory, fits the model to it and writes only the model's constants, `grading_stage_model.rs`. No measurement is +committed. - The tints and profiles are fitted on the grey steps: the profile's shape is the mean tint size over the hues, and each tint is the least-squares scale of its grey-step change against that shape. - The damping comes from the colour patches. - The Luminance curves are the grey steps' lightness change. -It needs numpy and tifffile (`tools/requirements-lr-tone-charts.txt`). Running the tool again reproduces the -committed charts and the committed tables byte for byte. +It needs numpy, scipy and tifffile (`tools/requirements-lr-tone-charts.txt`). Running the tool again reproduces the +committed charts byte for byte, and the constants with the pinned packages. -Predicting Camera Raw's edited charts from its neutral chart with the stage's rules leaves 1.26 (OkLab Γ— 100) on -average, against an average effect of 3.12. By kind: wheel hue and saturation 1.18 against 3.05, Luminance 0.79 -against 2.84, Blending 1.89 against 3.82, Balance 1.60 against 3.27, the two combinations 1.43 against 2.67. +How close the model is to those measurements: the tints within 0.57 RMS (OkLab Γ— 100) of an average tint of 6.94; +the share by lightness within 0.7 to 2.6 RMS (Γ— 100, the shadows wheel worst); Luminance within 0.01 to 0.27 RMS +(OkLab L Γ— 100); the damping within 1.0 to 4.7 RMS (Γ— 100). The damping's measurements do not change steadily with the +angle (the midtones wheel's at chroma 0.12 go 1.02, 0.99, 0.90, 0.92, 0.96, 1.02), so the smooth model leaves part of +that out. On 5 held-out Panasonic DC-S9 photos with 19 presets, rendered at 1,500 px and compared with Camera Raw's renders after aligning the two engines' geometry, the mean OkLab a/b error falls from 1.32 to 1.19 (OkLab Γ— 100) over all @@ -83,3 +101,4 @@ edit groups, and on the Teal & Orange preset from 2.66 to 1.34. | Date | Change | Summary | |---|---|---| | 2026-11-10 | minor | Process V9: Colour Grading measured against Lightroom | +| 2026-11-24 | minor | Colour Grading is a fitted model of 262 constants instead of measured tables | diff --git a/docs/whats-new.md b/docs/whats-new.md index dab71c4f1be..3c475e53f4c 100644 --- a/docs/whats-new.md +++ b/docs/whats-new.md @@ -2,12 +2,12 @@ ## Unreleased -### Colour Grading behaves as in Lightroom (process V9) -- The colour grading wheels now tint as strongly and in the same direction as Lightroom's, reach the same tones (the - shadows wheel spares the deepest blacks and reaches into the midtones, the global wheel acts most on the +### Colour Grading wheels reach different tones and spare colours already leaning their way (process 9) +- The colour grading wheels now tint with a strength and direction that depend on the wheel's hue, reach different + tones (the shadows wheel spares the deepest blacks and reaches into the midtones, the global wheel acts most on the midtones), and give less tint to colours that already lean its way, so a warm grade no longer oversaturates warm - colours. Blending, Balance and Luminance follow Lightroom's measured response too. This is part of rendering - process 9: photos you already edited keep their look until you choose Photo β–Έ Update to Current Process. See + colours. Blending, Balance and Luminance change with them. This is part of rendering process 9: photos you + already edited keep their look until you choose Photo β–Έ Update to Current Process. See [Colour Grading](grading-stage.md). ### Colour mixer bands in new places, stronger at large amounts (process 9) diff --git a/tools/lr_grading_charts.py b/tools/lr_grading_charts.py index ee4a5346726..e2f4116c127 100644 --- a/tools/lr_grading_charts.py +++ b/tools/lr_grading_charts.py @@ -7,11 +7,12 @@ saturations, at Luminance -100/-50/50/100, at Blending 0/25/75/100 and (not global) at Balance -100/-50/50/100; and two combinations used only as checks. (render every DNG through Camera Raw to a 16-bit Adobe RGB (1998) TIFF with the same file name) - python3 tools/lr_grading_charts.py tables RENDER_DIR OUT_RS - Reads the renders and writes the Rust tables of `lightcraft_pipeline::grading_stage`. + python3 tools/lr_grading_charts.py fit RENDER_DIR OUT_RS + Reads the renders, fits LightCraft's model of Colour Grading to them and writes the model's constants + (`lightcraft_pipeline::grading_stage_model`). The measurements themselves are not written out. The charts are original test data generated here; nothing in them comes from Adobe. Only Camera Raw's output is -measured. Requires numpy and tifffile (tools/requirements-lr-tone-charts.txt). +measured. Requires numpy, scipy and tifffile (tools/requirements-lr-tone-charts.txt). The model, per wheel: an OkLab tint (a, b) by wheel hue and saturation; a lightness profile (how much of the tint each lightness gets) by Blending and Balance; a damping of the tint for colours that already lean its way, by their @@ -94,8 +95,9 @@ def oklab_patches(path, patches): return np.array(out) -def tables(render_dir, out_rs): - """Measure the Camera Raw renders in `render_dir` and write the Rust tables to `out_rs`.""" +def measure(render_dir): + """Measure the Camera Raw renders in `render_dir`: tints, profiles by Blending and by Balance, Luminance curves and + damping per wheel, as dictionaries (kept in memory, never written out).""" patches = json.load(open(os.path.join(render_dir, "manifest.json")))["patches"] ok = np.array([p["ok"] for p in patches]) grey = ok & np.array([p["kind"] == "grey" for p in patches]) @@ -163,56 +165,185 @@ def offsets(n): cnt[i, j] += 1 att[w] = np.where(cnt > 0, acc / np.maximum(cnt, 1), 1.0) - f = lambda v, p=6: f"{v:.{p}f}" - row = lambda vs, p=6: "[" + ", ".join(f(v, p) for v in vs) + "]" + return tint, pblend, pbal, lum, att + + +# ---- fit ---------------------------------------------------------------------------------------------------- +# +# LightCraft's own model of Colour Grading, fitted to the measurements above. Nothing measured is written out: only +# the model's constants (docs/grading-stage.md has the formulas). +# +# - Tint: the same shape around the hue circle for every wheel, a Fourier series of the wheel hue for the tint's +# direction (offset from the wheel hue) and for its log size, times a size per wheel and a saturation curve per +# wheel: size(s) = s (1 + g1 (s - 1) + g2 (s - 1)^2), s = saturation / 100. +# - Share by lightness: two bumps (as the tone curve stage's), whose gain and exponents are quadratic in Blending and +# in Balance. +# - Luminance: two bumps per direction, gain and exponents changing with the amount. +# - Damping: 1 + (C / 0.12)^e (d0 + d1 cos a + d2 cos 2a), a the angle between the colour's hue and the tint's. + +HARMONICS = 4 +FIT_SEED = 3 +FIT_STARTS = 24 + + +def fourier(c, h): + """c0 + sum of c[2k-1] cos(k h) + c[2k] sin(k h).""" + return c[0] + sum(c[2 * k - 1] * np.cos(k * h) + c[2 * k] * np.sin(k * h) for k in range(1, (len(c) - 1) // 2 + 1)) + + +def bump(x, p, q): + """A bump of peak 1 at p / (p + q), 0 at black and white.""" + m = p / (p + q) + return np.exp(p * np.log(np.clip(x, 1e-12, 1) / m) + q * np.log(np.clip(1 - x, 1e-12, 1) / (1 - m))) + + +def tint_model(params, hue, sat): + """Tints (wheel, hue, saturation, a/b) for hues in radians and saturations 0..1.""" + n = 2 * HARMONICS + 1 + angle = hue + fourier(params[:n], hue) + size = np.exp(fourier(params[n:2 * n], hue)) + out = np.zeros((4, len(hue), len(sat), 2)) + for w in range(4): + scale, g1, g2 = np.exp(params[2 * n + w]), params[2 * n + 4 + 2 * w], params[2 * n + 5 + 2 * w] + for i, s in enumerate(sat): + m = scale * size * s * (1 + g1 * (s - 1) + g2 * (s - 1) ** 2) + out[w, :, i] = np.stack([m * np.cos(angle), m * np.sin(angle)], 1) + return out + + +def share_model(params, blend, balance, light): + """Share of the tint at lightness `light` for Blending and Balance as fractions (Blending 0.5 and Balance 0 at the default).""" + b, c = blend - 0.5, balance + out = 0.0 + for k in range(2): + q = params[15 * k:15 * k + 15] + f = lambda i: q[i] + q[i + 1] * b + q[i + 2] * b * b + q[i + 3] * c + q[i + 4] * c * c + out = out + f(0) * bump(light, np.exp(f(5)), np.exp(f(10))) + return out + + +def lum_model(params, amount, light): + """Lightness change at `light` for Luminance `amount` (-1..1).""" + a, side = abs(amount), 0 if amount < 0 else 1 + out = 0.0 + for k in range(2): + q = params[12 * side + 6 * k:12 * side + 6 * k + 6] + out = out + (q[0] * a + q[1] * a * a) * bump(light, np.exp(q[2] + q[3] * a), np.exp(q[4] + q[5] * a)) + return np.sign(amount) * out + + +def damping_model(params, chroma, angle): + """Share of the tint a colour of `chroma` gets at `angle` (radians) from the tint's direction.""" + d0, d1, d2, e = params + return 1 + (chroma / 0.12) ** np.exp(e) * (d0 + d1 * np.cos(angle) + d2 * np.cos(2 * angle)) + + +def multistart(residual, starts): + """The best least-squares solution over `starts`.""" + from scipy.optimize import least_squares + return min((least_squares(residual, s, max_nfev=4000) for s in starts), key=lambda r: r.cost).x + + +def fit_share(job): + """One wheel's share profiles (by Blending, by Balance) on the lightness grid.""" + blends, balances, light = job + def residual(p): + return np.concatenate([share_model(p, b, 0.0, light) - v for b, v in blends] + + [share_model(p, 0.5, a, light) - v for a, v in balances]) * 100 + rng = np.random.default_rng(FIT_SEED) + starts = [] + for _ in range(FIT_STARTS): + s = np.zeros(30) + for k in range(2): + s[15 * k], s[15 * k + 5], s[15 * k + 10] = rng.uniform(0.2, 1), rng.uniform(-1, 2.5), rng.uniform(-1, 2.5) + starts.append(s) + return multistart(residual, starts) + + +def fit_lum(job): + """One wheel's Luminance responses on the lightness grid.""" + lums, light = job + residual = lambda p: np.concatenate([lum_model(p, a, light) - v for a, v in lums]) * 100 + rng = np.random.default_rng(FIT_SEED) + starts = [] + for _ in range(FIT_STARTS): + s = np.zeros(24) + for side in range(2): + for k in range(2): + o = 12 * side + 6 * k + s[o], s[o + 2], s[o + 4] = rng.uniform(0, 0.1), rng.uniform(-1, 2.5), rng.uniform(-1, 2.5) + starts.append(s) + return multistart(residual, starts) + + +def fit_damping(table): + """One wheel's damping (chroma level x 6 angle bins) as 4 constants.""" + angle = np.radians(np.arange(15, 180, 30)) + c = np.array(CHROMA)[:, None] + return multistart(lambda p: (damping_model(p, c, angle[None, :]) - table).ravel() * 100, [np.zeros(4)]) + + +def fit(render_dir, out_rs): + """Fit the model to the Camera Raw renders in `render_dir` and write its constants to `out_rs`.""" + from concurrent.futures import ProcessPoolExecutor + tint, pblend, pbal, lum, att = measure(render_dir) names = list(WHEELS) - s = ["// @generated by tools/lr_grading_charts.py from Camera Raw renders of its synthetic charts (docs/grading-stage.md).", - "// OkLab. Wheels: shadows, midtones, highlights, global. Lightness grids: 65 steps from 0 to 1.", - "// Measured values, which can come close to a mathematical constant by chance.", - "#![allow(clippy::approx_constant)]", - "", - f"pub const HUES: [f32; {len(HUES)}] = [{', '.join(f'{h}.0' for h in HUES)}];", - f"pub const SATS: [f32; {len(SATS)}] = [{', '.join(f'{x}.0' for x in SATS)}];", - f"pub const BLENDS: [f32; {len(BLENDS)}] = [{', '.join(f'{x}.0' for x in BLENDS)}];", - f"pub const BALANCES: [f32; {len(BALANCES)}] = [{', '.join(f'{x}.0' for x in BALANCES)}];", - f"pub const LUMS: [f32; {len(LUMS)}] = [{', '.join(f'{x}.0' for x in LUMS)}];", - f"/// Nominal chroma of the damping's levels.", - f"pub const CHROMA: [f32; 3] = [{', '.join(str(c) for c in CHROMA)}];", + light = np.linspace(0, 1, GRID) + hue, sat = np.radians(np.array(HUES, float)), np.array(SATS) / 100 + measured = np.array([[[tint[(w, h, s)] for s in SATS] for h in HUES] for w in names]) + n = 2 * HARMONICS + 1 + start = np.zeros(2 * n + 12) + start[n] = np.log(np.hypot(*measured.reshape(-1, 2).T).mean()) + tp = multistart(lambda p: ((tint_model(p, hue, sat) - measured) * 100).ravel(), [start]) + e = np.linalg.norm(tint_model(tp, hue, sat) - measured, axis=-1) * 100 + print(f"tint: rms {np.sqrt((e ** 2).mean()):.3f} of {np.linalg.norm(measured, axis=-1).mean() * 100:.3f} (OkLab x 100)") + share_jobs = [([(b / 100, pblend[(w, b)]) for b in BLENDS], [] if w == "global" else [(a / 100, pbal[(w, a)]) for a in BALANCES], light) + for w in names] + lum_jobs = [([(v / 100, lum[(w, v)]) for v in LUMS], light) for w in names] + with ProcessPoolExecutor() as pool: + shares = list(pool.map(fit_share, share_jobs)) + lums = list(pool.map(fit_lum, lum_jobs)) + damps = [fit_damping(att[w]) for w in names] + for i, w in enumerate(names): + blends, balances, _ = share_jobs[i] + es = np.concatenate([share_model(shares[i], b, 0.0, light) - v for b, v in blends] + + [share_model(shares[i], 0.5, a, light) - v for a, v in balances]) * 100 + el = np.concatenate([lum_model(lums[i], a, light) - v for a, v in lum_jobs[i][0]]) * 100 + ed = (damping_model(damps[i], np.array(CHROMA)[:, None], np.radians(np.arange(15, 180, 30))[None, :]) - att[w]) * 100 + print(f"{w:10s} share rms {np.sqrt((es ** 2).mean()):.2f} (x 100), Luminance rms {np.sqrt((el ** 2).mean()):.3f} (OkLab L x 100), " + f"damping rms {np.sqrt((ed ** 2).mean()):.2f} (x 100)") + num = lambda v: f"{v:.6e}" + row = lambda vs: "[" + ", ".join(num(v) for v in vs) + "]" + s = ["// Written by `tools/lr_grading_charts.py fit`: LightCraft's model of Colour Grading, fitted to the tool's charts", + "// (provenance in docs/grading-stage.md). Constants of the model only. Wheels: shadows, midtones, highlights, global.", "", - "/// Tint (a, b) per wheel, hue and saturation.", - f"pub static TINT: [[[[f32; 2]; {len(SATS)}]; {len(HUES)}]; 4] = ["] - for w in names: - s.append(" [") - for h in HUES: - s.append(" [" + ", ".join(row(tint[(w, h, x)]) for x in SATS) + "],") - s.append(" ],") - s += ["];", "", - "/// Share of the tint by lightness, per wheel and Blending (at Balance 0).", - f"pub static PROFILE_BLEND: [[[f32; {GRID}]; {len(BLENDS)}]; 4] = ["] - for w in names: - s += [" ["] + [f" {row(pblend[(w, b)], 5)}," for b in BLENDS] + [" ],"] - s += ["];", "", - "/// Share of the tint by lightness, per wheel and Balance (at Blending 50; the global wheel ignores Balance).", - f"pub static PROFILE_BALANCE: [[[f32; {GRID}]; {len(BALANCES)}]; 4] = ["] - for w in names: - s += [" ["] + [f" {row(pbal[(w, a)], 5)}," for a in BALANCES] + [" ],"] - s += ["];", "", - "/// Lightness change by lightness, per wheel and Luminance.", - f"pub static LUM: [[[f32; {GRID}]; {len(LUMS)}]; 4] = ["] - for w in names: - s += [" ["] + [f" {row(lum[(w, v)])}," for v in LUMS] + [" ],"] - s += ["];", "", - "/// Share of the tint a colour gets, per wheel, chroma level and angle between its hue and the tint's (30 degree bins).", - "pub static DAMPING: [[[f32; 6]; 3]; 4] = ["] - for w in names: - s += [" ["] + [f" {row(att[w][i], 4)}," for i in range(3)] + [" ],"] - s += ["];", ""] - with open(out_rs, "w") as fh: - fh.write("\n".join(s)) + "/// The tint's direction around the hue circle, as an offset from the wheel hue (radians): a Fourier series of the", + "/// wheel hue, `c0 + c1 cos h + c2 sin h + c3 cos 2h + ...`.", + f"pub const TINT_ANGLE: [f64; {n}] = {row(tp[:n])};", + "/// The tint's log size around the hue circle, the same kind of series.", + f"pub const TINT_SIZE: [f64; {n}] = {row(tp[n:2 * n])};", + "/// Each wheel's log size, added to [`TINT_SIZE`].", + f"pub const WHEEL_SIZE: [f64; 4] = {row(tp[2 * n:2 * n + 4])};", + "/// Each wheel's saturation curve `[g1, g2]`: size `s (1 + g1 (s - 1) + g2 (s - 1)Β²)` at saturation `s` (0 to 1).", + "pub const WHEEL_SAT: [[f64; 2]; 4] = [" + ", ".join(row(tp[2 * n + 4 + 2 * w:2 * n + 6 + 2 * w]) for w in range(4)) + "];", + "/// Each wheel's share of the tint by lightness: two bumps of 15 constants, `[g, gb, gb2, gc, gc2, p, pb, ..., q, ...]`,", + "/// each value quadratic in Blending (`b` = Blending / 100 - 0.5) and Balance (`c` = Balance / 100).", + "pub const SHARE: [[f64; 30]; 4] = [", + *[f" {row(p)}," for p in shares], + "];", + "/// Each wheel's Luminance, negative then positive: two bumps of `[g1, g2, p0, p1, q0, q1]` each.", + "pub const LUM: [[f64; 24]; 4] = [", + *[f" {row(p)}," for p in lums], + "];", + "/// Each wheel's damping `[d0, d1, d2, e]`: `1 + (C / 0.12)^(e^e) (d0 + d1 cos a + d2 cos 2a)`.", + "pub const DAMPING: [[f64; 4]; 4] = [" + ", ".join(row(p) for p in damps) + "];", + ""] + with open(out_rs, "w") as f: + f.write("\n".join(s)) def main(): - """Command line: `charts OUT_DIR` or `tables RENDER_DIR OUT_RS`.""" + """Command line: `charts OUT_DIR` or `fit RENDER_DIR OUT_RS`.""" if len(sys.argv) == 3 and sys.argv[1] == "charts": out = sys.argv[2] os.makedirs(out, exist_ok=True) @@ -220,8 +351,8 @@ def main(): json.dump(dict(patches=patches), open(os.path.join(out, "manifest.json"), "w")) for name, settings in variants().items(): write_dng(os.path.join(out, f"grade__{name}.dng"), img, xmp(**settings)) - elif len(sys.argv) == 4 and sys.argv[1] == "tables": - tables(sys.argv[2], sys.argv[3]) + elif len(sys.argv) == 4 and sys.argv[1] == "fit": + fit(sys.argv[2], sys.argv[3]) else: sys.exit(__doc__) diff --git a/tools/requirements-lr-tone-charts.txt b/tools/requirements-lr-tone-charts.txt index 3c90409e3d9..3828d64e39c 100644 --- a/tools/requirements-lr-tone-charts.txt +++ b/tools/requirements-lr-tone-charts.txt @@ -1,5 +1,6 @@ -# Python packages for tools/lr_tone_charts.py (crates/pipeline/src/curve_stage_model.rs, docs/curve-stage.md) -# and tools/lr_mixer_charts.py (crates/pipeline/src/mixer_stage_model.rs, docs/mixer-stage.md). +# Python packages for tools/lr_tone_charts.py (crates/pipeline/src/curve_stage_model.rs, docs/curve-stage.md), +# tools/lr_mixer_charts.py (crates/pipeline/src/mixer_stage_model.rs, docs/mixer-stage.md) and +# tools/lr_grading_charts.py (crates/pipeline/src/grading_stage_model.rs, docs/grading-stage.md). # Needs Python 3.12 or newer (numpy 2.5); use a matching interpreter, e.g. python3.12 -m venv. # python3.12 -m venv .venv-lr-tone && .venv-lr-tone/bin/pip install -r tools/requirements-lr-tone-charts.txt numpy==2.5.4 From fde6f70875dab50c93a0c068cdd3f10dcf8f6654 Mon Sep 17 00:00:00 2001 From: smi-leonivkovic Date: Tue, 24 Nov 2026 08:55:00 +0100 Subject: [PATCH 29/51] LR-BEHAV-RENDER-FIDELITY: the default base curve is 12 fitted knots, not sampled grey steps (#523) Review on #4099: `default_tone_table.rs` (the neutral chart's 48 grey steps) is gone. `lr_tone_charts.py base` now fits 12 knots, evenly spaced in stops from the chart's darkest step (0) to white (1), with LightCraft's own monotone spline, and writes only the knots to `default_tone_model.rs`. - Against the grey steps: 0.29 RMS and 1.08 at most, in 8-bit levels of the sRGB-encoded output. - The rule for when the curve applies (a profile without `ProfileToneCurve`), the V5-style roll-off past the last knot, the hue-preserving application and the per-camera offsets are unchanged. - The curve test is relational now: monotone, near black and white at the ends, a toe below the midtones, the offset shifts the scene. - Code comments and the release note describe the curve in our own words. --- crates/engine/src/files/load.rs | 2 +- crates/engine/src/tests/dcp.rs | 4 +- crates/gpu/src/wgsl/finish.wgsl | 2 +- crates/pipeline/src/default_tone.rs | 64 +++++++++++++---------- crates/pipeline/src/default_tone_model.rs | 7 +++ crates/pipeline/src/default_tone_table.rs | 53 ------------------- crates/pipeline/src/finish.rs | 4 +- crates/pipeline/src/lib.rs | 6 +-- crates/pipeline/src/light_v3.rs | 2 +- docs/default-tone.md | 28 +++++----- docs/whats-new.md | 12 ++--- tools/lr_tone_charts.py | 10 ++-- 12 files changed, 79 insertions(+), 115 deletions(-) create mode 100644 crates/pipeline/src/default_tone_model.rs delete mode 100644 crates/pipeline/src/default_tone_table.rs diff --git a/crates/engine/src/files/load.rs b/crates/engine/src/files/load.rs index e67f1889847..0a3510b3294 100644 --- a/crates/engine/src/files/load.rs +++ b/crates/engine/src/files/load.rs @@ -246,7 +246,7 @@ fn load_bytes_now( kept_tone, ); let local_tone = local_tone(&raw); - // From process V9 a profile without a tone curve of its own (Adobe Standard) renders with Lightroom's + // From process V9 a profile without a tone curve of its own (Adobe Standard) renders with the fitted // default curve, shifted by the camera's measured exposure offset (`lightcraft_pipeline::default_tone`). let default_tone = dcp.filter(|p| p.color.profile.tone_curve.is_none()).map(|_| { let m = &raw.metadata; diff --git a/crates/engine/src/tests/dcp.rs b/crates/engine/src/tests/dcp.rs index 0add58739d1..286eead7a31 100644 --- a/crates/engine/src/tests/dcp.rs +++ b/crates/engine/src/tests/dcp.rs @@ -70,11 +70,11 @@ fn a_profile_without_a_tone_curve_keeps_the_photos_contrast() { assert!((tone.apply(0.18) - 0.45).abs() < 0.01, "{}", tone.apply(0.18)); } -/// Process V9 (`lightcraft_pipeline::default_tone`): a profile without a tone curve marks the source for Lightroom's +/// Process V9 (`lightcraft_pipeline::default_tone`): a profile without a tone curve marks the source for the fitted /// default curve (a camera with no measured offset: 0 stops); a profile with a curve, or no profile, does not. Up to /// V7 the base tone stays the file's own. #[test] -fn a_profile_without_a_tone_curve_gets_lightrooms_default_curve_from_v9() { +fn a_profile_without_a_tone_curve_gets_the_default_curve_from_v9() { use lightcraft_develop::{DevelopSettings, Process}; use lightcraft_raw::profile::ToneCurve; let dng = crate::tests_xmp::synthetic_dng_with(None, Default::default()); diff --git a/crates/gpu/src/wgsl/finish.wgsl b/crates/gpu/src/wgsl/finish.wgsl index bdaa6323280..882eb2ac10e 100644 --- a/crates/gpu/src/wgsl/finish.wgsl +++ b/crates/gpu/src/wgsl/finish.wgsl @@ -94,7 +94,7 @@ fn light_channel(k: u32, x: f32) -> f32 { } // `default_tone::rgb_tone`: the base tone on the largest and smallest linear ProPhoto channel, the middle -// channel keeping its place between them (process V9 with Lightroom's default curve). +// channel keeping its place between them (process V9 with the fitted default curve). fn rgb_tone(c: vec3) -> vec3 { let p = max(mul3(PRO_FROM_2020, c), vec3(0.0)); let a = max(p.x, max(p.y, p.z)); diff --git a/crates/pipeline/src/default_tone.rs b/crates/pipeline/src/default_tone.rs index 5515557434d..435cb2c3822 100644 --- a/crates/pipeline/src/default_tone.rs +++ b/crates/pipeline/src/default_tone.rs @@ -1,24 +1,23 @@ -//! Lightroom's default base curve, measured (process V9, `docs/default-tone.md`). +//! The default base curve for a profile without a tone curve of its own (process V9). `docs/default-tone.md` +//! records how it was measured and fitted. //! -//! A camera profile without a tone curve of its own (a DCP without `ProfileToneCurve`, such as the Adobe Standard -//! profiles) leaves the base tone to the raw converter. Lightroom then applies its default curve, hue preserving on -//! linear ProPhoto channels. Up to V8 LightCraft keeps the photo's own tone instead (the curve fitted to its camera -//! JPEG, `lightcraft_engine::files`), so the same profile renders brighter and flatter than in Lightroom. -//! -//! From V9 such a raw ([`SourceInfo::default_tone`]) gets the curve measured on Camera Raw's render of a synthetic -//! chart of grey steps (`tools/lr_tone_charts.py base`, [`crate::default_tone_table`]), applied the way Lightroom -//! applies it ([`rgb_tone`]). The chart is a DNG without a baseline exposure. Camera Raw gives a raw of another format -//! its own exposure offset per camera, which LightCraft does not know: [`camera_ev`] holds the offsets measured on -//! photos, and other cameras get none. +//! A camera profile without a tone curve of its own (a DCP without `ProfileToneCurve`) leaves the base tone to the +//! raw converter. Up to V8 LightCraft keeps the photo's own tone (the curve fitted to its camera JPEG, +//! `lightcraft_engine::files`). From V9 such a raw ([`SourceInfo::default_tone`]) gets a fitted default curve +//! (`tools/lr_tone_charts.py base`, [`crate::default_tone_model`]): a monotone curve through 12 knots evenly spaced +//! in stops, applied hue preserving on linear ProPhoto channels ([`rgb_tone`]). The curve is fitted to a chart +//! without a baseline exposure, and raws of other formats need an exposure offset per camera: [`camera_ev`] holds +//! the offsets measured on photos, and other cameras get none. use crate::SourceInfo; -use crate::default_tone_table::GREY; +use crate::default_tone_model as m; use crate::tone::CameraTone; +use lightcraft_color::spline::MonotoneCurve; use lightcraft_develop::{DevelopSettings, Process}; /// Exposure offsets per camera (make, model, stops) for a raw rendered through its Adobe Standard profile: the shift -/// of the chart's curve that leaves Lightroom's unedited renders of the camera's photos no brighter or darker on -/// average, measured per camera (`docs/default-tone.md`). +/// of the curve that leaves the camera's unedited photos no brighter or darker on average than the reference renders +/// they were measured against (`docs/default-tone.md`). const CAMERA_EV: [(&str, &str, f32); 4] = [("Panasonic", "DC-S9", -0.10), ("Panasonic", "DC-S5", -0.04), ("Panasonic", "DC-S5M2", -0.03), ("Panasonic", "DC-S5M2X", -0.05)]; @@ -36,15 +35,16 @@ pub fn for_source(s: &DevelopSettings, info: &SourceInfo) -> Option curve(info.default_tone.filter(|_| v9 && info.raw)?) } -/// The measured curve with the scene shifted by `ev` stops: 32 knots, evenly spaced in stops over the chart's grey -/// steps. Below the first knot the curve runs straight to black; past the last it rolls off into white +/// The fitted curve with the scene shifted by `ev` stops: 32 knots, evenly spaced in stops over the fitted range. +/// Below the first knot the curve runs straight to black; past the last it rolls off into white /// ([`CameraTone::apply_rolloff`]). pub fn curve(ev: f32) -> Option { if !ev.is_finite() { return None; } let gain = 2f32.powf(ev); - let (x0, x1) = (GREY[0][0].ln(), GREY[GREY.len() - 1][0].ln()); + let ln2 = std::f32::consts::LN_2; + let (x0, x1) = (m::STOPS.0 as f32 * ln2, m::STOPS.1 as f32 * ln2); let knots: [[f32; 2]; 32] = std::array::from_fn(|i| { let x = (x0 + (x1 - x0) * i as f32 / 31.0).exp(); [x / gain, grey(x).min(0.9995)] @@ -52,16 +52,21 @@ pub fn curve(ev: f32) -> Option { CameraTone::new(knots) } -/// The chart's output at chart value `x` (linear in log `x` between the grey steps). +/// The fitted curve's output at chart value `x`: a monotone curve through [`m::KNOTS`], evenly spaced in stops from +/// [`m::STOPS`]`.0` to [`m::STOPS`]`.1`, held at the first knot's value below it. fn grey(x: f32) -> f32 { - let l = x.max(GREY[0][0]).ln(); - let i = GREY.partition_point(|g| g[0].ln() <= l).clamp(1, GREY.len() - 1); - let (a, b) = (GREY[i - 1], GREY[i]); - let t = ((l - a[0].ln()) / (b[0].ln() - a[0].ln())).clamp(0.0, 1.0); - a[1] + (b[1] - a[1]) * t + static CURVE: std::sync::OnceLock = std::sync::OnceLock::new(); + let curve = CURVE.get_or_init(|| { + let n = m::KNOTS.len().max(2) - 1; + let pts: Vec<(f64, f64)> = + m::KNOTS.iter().enumerate().map(|(i, y)| (m::STOPS.0 + (m::STOPS.1 - m::STOPS.0) * i as f64 / n as f64, *y)).collect(); + MonotoneCurve::new(&pts) + }); + let stops = f64::from(x).max(2f64.powf(m::STOPS.0)).log2(); + curve.eval(stops) as f32 } -/// The base tone as Lightroom applies it: `tone` on the largest and smallest channel in linear ProPhoto, the middle +/// The base tone, hue preserving: `tone` on the largest and smallest channel in linear ProPhoto, the middle /// channel keeping its place between them (linear Rec.2020 in and out). pub fn rgb_tone(c: [f32; 3], tone: impl Fn(f32) -> f32) -> [f32; 3] { let (to, from) = matrices(); @@ -117,11 +122,14 @@ mod tests { } #[test] - fn the_curve_follows_the_chart_and_the_offset_shifts_it() { + fn the_curve_rises_with_contrast_and_the_offset_shifts_it() { let c = curve(0.0).unwrap(); - for g in GREY.iter().filter(|g| g[0] > 0.01 && g[0] < 0.9) { - assert!((c.apply(g[0]) - g[1]).abs() < 0.01, "{g:?} -> {}", c.apply(g[0])); - } + // tone order never reverses, and the curve runs from near black to near white over the chart's range + let xs: Vec = (0..=60).map(|i| 2f32.powf(-9.0 + 9.0 * i as f32 / 60.0)).collect(); + assert!(xs.windows(2).all(|w| c.apply(w[0]) <= c.apply(w[1]))); + assert!(c.apply(0.002) < 0.002 && c.apply(1.0) > 0.99, "{} {}", c.apply(0.002), c.apply(1.0)); + // a toe: deep shadows are darker than the scene, the midtones brighter + assert!(c.apply(0.004) < 0.004 && c.apply(0.05) > 0.05); // the chart's mid grey (scene 0.18) lands well above display 0.18: a base curve with contrast and lift let mid = c.apply(0.18); assert!(mid > 0.35 && mid < 0.45, "{mid}"); diff --git a/crates/pipeline/src/default_tone_model.rs b/crates/pipeline/src/default_tone_model.rs new file mode 100644 index 00000000000..9ce6a39cddb --- /dev/null +++ b/crates/pipeline/src/default_tone_model.rs @@ -0,0 +1,7 @@ +// Written by `tools/lr_tone_charts.py base`: LightCraft's default base curve, fitted to the tool's neutral +// grey-step chart (provenance in docs/default-tone.md). Knots of the curve only. + +/// The knots' range in stops of the chart's linear value: from the darkest grey step to white. +pub const STOPS: (f64, f64) = (-8.965784e+00, 0.0); +/// The curve's linear ProPhoto output at the knots, evenly spaced over [`STOPS`]. +pub const KNOTS: [f64; 12] = [0.000000e+00, 8.133183e-04, 3.366455e-03, 7.031622e-03, 1.633029e-02, 3.958236e-02, 9.053161e-02, 1.968403e-01, 3.887485e-01, 6.233585e-01, 8.545124e-01, 1.000000e+00]; diff --git a/crates/pipeline/src/default_tone_table.rs b/crates/pipeline/src/default_tone_table.rs deleted file mode 100644 index 3176dba93ad..00000000000 --- a/crates/pipeline/src/default_tone_table.rs +++ /dev/null @@ -1,53 +0,0 @@ -// @generated by tools/lr_tone_charts.py from Camera Raw's render of its neutral synthetic chart (docs/default-tone.md). -// Grey steps: the chart's linear value in, the render's linear ProPhoto value out. - -pub const GREY: [[f32; 2]; 48] = [ - [0.002000, 0.000040], - [0.002283, 0.000104], - [0.002605, 0.000219], - [0.002974, 0.000424], - [0.003394, 0.000717], - [0.003874, 0.001144], - [0.004422, 0.001707], - [0.005047, 0.002339], - [0.005760, 0.002980], - [0.006574, 0.003607], - [0.007504, 0.004265], - [0.008565, 0.005058], - [0.009775, 0.006037], - [0.011157, 0.007229], - [0.012734, 0.008741], - [0.014535, 0.010636], - [0.016589, 0.012987], - [0.018934, 0.015945], - [0.021611, 0.019623], - [0.024666, 0.024203], - [0.028153, 0.029793], - [0.032133, 0.036603], - [0.036676, 0.044853], - [0.041860, 0.054620], - [0.047778, 0.066304], - [0.054532, 0.080238], - [0.062241, 0.096812], - [0.071040, 0.116504], - [0.081082, 0.139933], - [0.092545, 0.167734], - [0.105627, 0.200785], - [0.120560, 0.239611], - [0.137603, 0.282620], - [0.157055, 0.329237], - [0.179257, 0.379123], - [0.204598, 0.431716], - [0.233521, 0.486391], - [0.266533, 0.542321], - [0.304212, 0.598742], - [0.347217, 0.654951], - [0.396302, 0.710310], - [0.452325, 0.764074], - [0.516268, 0.815565], - [0.589251, 0.863751], - [0.672551, 0.907644], - [0.767627, 0.945887], - [0.876143, 0.977265], - [1.000000, 0.999998], -]; diff --git a/crates/pipeline/src/finish.rs b/crates/pipeline/src/finish.rs index 849e1b9223a..e98ea19c538 100644 --- a/crates/pipeline/src/finish.rs +++ b/crates/pipeline/src/finish.rs @@ -239,7 +239,7 @@ pub struct FinishParams { /// A LUT profile and its amount (0..2), applied to the display-encoded colour. pub lut: Option<(std::sync::Arc, f32)>, pub tone: ToneMap, - /// Process V9 with Lightroom's default curve ([`crate::default_tone`]): the tone map applies hue preserving + /// Process V9 with the fitted default curve ([`crate::default_tone`]): the tone map applies hue preserving /// on linear ProPhoto channels ([`crate::default_tone::rgb_tone`]) instead of scaling by luminance. pub rgb_tone: bool, /// Process V4's calibrated Contrast and Blacks on the camera-look path, applied after @@ -433,7 +433,7 @@ pub fn base_tone(s: &DevelopSettings, info: &SourceInfo, peak: f32) -> ToneMap { } /// The base tone map applied to colour `c` (linear Rec.2020, luminance `yl`, tone-mapped luminance `o`): scaled by -/// the luminance change, or from process V9 on Lightroom's default curve hue preserving on linear ProPhoto channels +/// the luminance change, or from process V9 on the fitted default curve hue preserving on linear ProPhoto channels /// ([`FinishParams::rgb_tone`]). fn tone_mapped(fp: &FinishParams, c: [f32; 3], yl: f32, o: f32) -> [f32; 3] { if fp.rgb_tone { diff --git a/crates/pipeline/src/lib.rs b/crates/pipeline/src/lib.rs index f79269b25d2..15f83ebb1e0 100644 --- a/crates/pipeline/src/lib.rs +++ b/crates/pipeline/src/lib.rs @@ -36,7 +36,7 @@ pub mod curve_stage; mod curve_stage_model; pub mod default_tone; #[rustfmt::skip] -mod default_tone_table; +mod default_tone_model; pub mod dust; pub mod finish; pub mod geometry; @@ -116,8 +116,8 @@ pub struct SourceInfo { pub camera_color: Option>, pub camera_tone: Option, /// The raw is rendered through a camera profile without a tone curve of its own (a DCP without - /// `ProfileToneCurve`, such as Adobe Standard): from process V9 its base tone is Lightroom's default curve, - /// measured, with the scene shifted by this many stops, the camera's measured exposure offset + /// `ProfileToneCurve`, such as Adobe Standard): from process V9 its base tone is the fitted default curve, + /// with the scene shifted by this many stops, the camera's measured exposure offset /// ([`default_tone`]; 0 for a camera not measured). `None`: the profile has its own curve, or no profile. pub default_tone: Option, /// Segmentation mattes stored in the file (DNG semantic masks): AI masks use them. diff --git a/crates/pipeline/src/light_v3.rs b/crates/pipeline/src/light_v3.rs index 6b1a126ee15..2880db189b3 100644 --- a/crates/pipeline/src/light_v3.rs +++ b/crates/pipeline/src/light_v3.rs @@ -285,7 +285,7 @@ pub fn applies(s: &DevelopSettings, info: &SourceInfo) -> bool { match s.process.process() { Process::V1 | Process::V2 | Process::V3 => false, Process::V4 | Process::V5 | Process::V6 | Process::V7 | Process::V8 => camera_look, - // a raw on Lightroom's default curve has a camera curve too, even when no tone was fitted to its JPEG + // a raw on the fitted default curve has a camera curve too, even when no tone was fitted to its JPEG Process::V9 => camera_look || crate::default_tone::for_source(s, info).is_some(), } } diff --git a/docs/default-tone.md b/docs/default-tone.md index 1574a72f394..f37982ae5ff 100644 --- a/docs/default-tone.md +++ b/docs/default-tone.md @@ -1,11 +1,11 @@ -# Lightroom's default base curve, measured (process V9) +# The default base curve for profiles without one (process V9) > **Changes:** [revision history](#revision-history) Process V9 gives a raw rendered through a camera profile without a tone curve of its own the base tone Lightroom -gives it, from measurements of Camera Raw's output. V1 to V8 are unchanged (`docs/process-versions.md`). The code is -`crates/pipeline/src/default_tone.rs`, its measured table `crates/pipeline/src/default_tone_table.rs`, and the GPU -kernel's `rgb_tone` in `crates/gpu/src/wgsl/finish.wgsl`. +gives it, with LightCraft's own curve fitted to measurements of Camera Raw's output. V1 to V8 are unchanged +(`docs/process-versions.md`). The code is `crates/pipeline/src/default_tone.rs`, the curve's fitted knots +`crates/pipeline/src/default_tone_model.rs`, and the GPU kernel's `rgb_tone` in `crates/gpu/src/wgsl/finish.wgsl`. ## What was wrong @@ -28,8 +28,9 @@ photo's own tone instead: the file's DNG tone curve, or else the curve fitted to For a raw whose profile has no tone curve (`SourceInfo::default_tone`, set by `files::load` when a camera profile without `ProfileToneCurve` is chosen): -1. The base tone map's camera curve is the measured default curve (`default_tone::curve`): 32 knots evenly spaced in - stops over the chart's grey steps, the scene shifted by the camera's exposure offset. Past the last knot it rolls +1. The base tone map's camera curve is the fitted default curve (`default_tone::curve`): a monotone curve through 12 + fitted knots, evenly spaced in stops from the chart's darkest grey step (0.002) to its white, sampled into 32 + knots of the camera curve, the scene shifted by the camera's exposure offset. Past the last knot it rolls off into white in stops, as V5 extends every camera curve (#1632). 2. The tone map applies hue preserving on linear ProPhoto channels (`default_tone::rgb_tone`), not by luminance. 3. Contrast and Blacks keep V4's calibrated operators, and Whites, the curves, the colour mixer and Colour Grading @@ -60,11 +61,13 @@ camera not measured can be off by about that much. ## How it was measured `tools/lr_tone_charts.py base RENDER_DIR OUT_RS` reads Camera Raw's render of the neutral chart of -`tools/lr_tone_charts.py charts` (48 grey steps, geometric from 0.002 to 1, linear DNG, settings neutral) and writes -the grey steps (chart value in, linear ProPhoto value out) to `default_tone_table.rs`. The chart is original test -data. It was rendered through Camera Raw to a 16-bit Adobe RGB (1998) TIFF, and only that output is measured. Nothing -of Adobe's is copied or shipped, and no profile's contents are read: the only fact taken from a profile is whether it -has a tone curve. Running the tool again writes the committed table byte for byte. +`tools/lr_tone_charts.py charts` (48 grey steps, geometric from 0.002 to 1, linear DNG, settings neutral), fits the +12 knots to its grey steps (chart value in, linear ProPhoto value out) with LightCraft's own monotone spline, and +writes only the knots, `default_tone_model.rs`. No measurement is committed. The fit ends the curve at exactly 1 at +the chart's white and minimises the error in 8-bit levels of the sRGB-encoded output: 0.29 RMS and 1.08 at most over +the 48 steps. The chart is original test data. It was rendered through Camera Raw to a 16-bit Adobe RGB (1998) TIFF, +and only that output is measured. Nothing of Adobe's is copied or shipped, and no profile's contents are read: the +only fact taken from a profile is whether it has a tone curve. The offset was fitted on 5 training photos of the DC-S9 and checked on 5 others held out from fitting. @@ -89,7 +92,7 @@ lighter before). No preset gets worse in tone or in colour. - Four cameras' offsets are measured (the Lumix S9, S5, S5 II and S5 IIX). Other cameras render with the chart's curve as it is, which on these four would be 0.3 to 1.2 lighter than Lightroom. -- The curve is measured for Camera Raw's process version 2012 (`crs:ProcessVersion` 11.0), one chart, grey steps up to +- The curve is fitted for Camera Raw's process version 2012 (`crs:ProcessVersion` 11.0), one chart, grey steps up to the DNG's white. Above white it rolls off as V5's camera curves do, not as measured. - Smart previews are built without the imported camera profile, so a photo whose original is offline renders without the profile, and so without this curve, until the original is back (as before). @@ -99,3 +102,4 @@ lighter before). No preset gets worse in tone or in colour. | Date | Change | Summary | |---|---|---| | 2026-11-11 | minor | Process V9: Lightroom's default base curve for a raw whose camera profile has none | +| 2026-11-24 | minor | The base curve is 12 fitted knots instead of the measured grey steps | diff --git a/docs/whats-new.md b/docs/whats-new.md index bb40814d796..94a8b7f8e7a 100644 --- a/docs/whats-new.md +++ b/docs/whats-new.md @@ -2,14 +2,12 @@ ## Unreleased -### Adobe Standard profiles look as in Lightroom (process V9) +### A default base curve for camera profiles without one (process 9) - A raw developed with an imported camera profile that has no tone curve of its own, such as Adobe Standard, now gets - Lightroom's base tone curve, applied the way Lightroom applies it, instead of the tone of the camera's JPEG. An - unedited photo then matches Lightroom's in brightness, contrast and colour far more closely. Panasonic Lumix S9, - S5, S5 II and S5 IIX raws (RW2) are measured and match closely; other cameras get the same curve without a per-camera exposure offset, - so they can come out a little lighter or darker than in Lightroom. This is part of rendering process 9: photos you - already edited keep their look until you choose Photo β–Έ Update to Current Process. See - [Lightroom's default base curve](default-tone.md). + a default base tone curve, applied hue preserving, instead of the tone of the camera's JPEG. Panasonic Lumix S9, + S5, S5 II and S5 IIX raws (RW2) have a measured exposure offset; other cameras get the same curve without one, so + they can come out a little lighter or darker. This is part of rendering process 9: photos you already edited keep + their look until you choose Photo β–Έ Update to Current Process. See [The default base curve](default-tone.md). ### Colour Grading wheels reach different tones and spare colours already leaning their way (process 9) - The colour grading wheels now tint with a strength and direction that depend on the wheel's hue, reach different diff --git a/tools/lr_tone_charts.py b/tools/lr_tone_charts.py index 565e11be790..cf617a9e4db 100644 --- a/tools/lr_tone_charts.py +++ b/tools/lr_tone_charts.py @@ -312,7 +312,7 @@ def at(q): def base(render_dir, out_rs): """Fit the default base curve's knots to the neutral render's grey steps (chart value in, linear ProPhoto out) and - write them to `out_rs`: 12 knots evenly spaced in stops from the darkest step to white, ending at 1.""" + write them to `out_rs`: 12 knots evenly spaced in stops from the darkest step (0) to white (1).""" from scipy.optimize import least_squares patches = json.load(open(os.path.join(render_dir, "manifest.json")))["patches"] steps = np.array([q["v"] for q in patches if q["kind"] == "grey" and q["ok"]]) @@ -323,12 +323,12 @@ def base(render_dir, out_rs): kx = np.linspace(stops.min(), 0.0, BASE_KNOTS) def knots(p): - w = np.exp(p[1:]) - y0 = 0.01 / (1 + np.exp(-p[0])) - return np.concatenate([[y0], y0 + (1 - y0) * np.cumsum(w) / w.sum()]) + """Increasing knots from 0 at the darkest step to exactly 1 at white.""" + w = np.exp(p) + return np.concatenate([[0.0], np.cumsum(w) / w.sum()]) err = lambda p: (srgb_encode(monotone(kx, knots(p))(stops)) - srgb_encode(lin)) * 255 - p0 = np.concatenate([[0.0], np.log(np.maximum(np.diff(np.interp(kx, stops, lin)), 1e-5))]) + p0 = np.log(np.maximum(np.diff(np.interp(kx, stops, lin)), 1e-5)) ky = knots(least_squares(err, p0, max_nfev=20000).x) e = (srgb_encode(monotone(kx, ky)(stops)) - srgb_encode(lin)) * 255 print(f"base curve: rms {np.sqrt((e ** 2).mean()):.2f} max {np.abs(e).max():.2f} (8-bit levels)") From c19fa4fb1bed1d9a5c8ef1a5e592899fcf9b34f2 Mon Sep 17 00:00:00 2001 From: smi-leonivkovic Date: Tue, 24 Nov 2026 08:59:02 +0100 Subject: [PATCH 30/51] LR-EDIT-LIGHT-HIGHLIGHTS: measure the frame's range after the camera's local tone map (#523) Review on #4100 (CodeRabbit at local.rs:940): `frame_range` built its base from a white-balanced proxy only, while the base V9 Highlights adjusts comes after the profile's local tone map, so with the map on the range described other tones than the ones it adjusts. - `local_tone::apply_framed` applies the map to any render of a frame; `apply` (the render) and `frame_range` (the 384 px proxy) both use it, in the same order as `lin_cpu`: local tone map, then white balance. - Test: with a map brightening the right of the frame up to 4x, the measured range's top rises by more than a stop when the map is on (it fails without the change). With the map off nothing changes. - The module doc describes the rule in our own words. --- crates/pipeline/src/hs_range.rs | 6 ++--- crates/pipeline/src/local.rs | 45 ++++++++++++++++++++++++++++++- crates/pipeline/src/local_tone.rs | 10 +++++-- 3 files changed, 55 insertions(+), 6 deletions(-) diff --git a/crates/pipeline/src/hs_range.rs b/crates/pipeline/src/hs_range.rs index f3d61c67964..72261f98edb 100644 --- a/crates/pipeline/src/hs_range.rs +++ b/crates/pipeline/src/hs_range.rs @@ -1,8 +1,8 @@ //! Highlights relative to the photo's own tonal range (process V9, `docs/hs-range.md`). //! -//! Up to V8 Highlights moves the base layer's log luminance by a fixed weight of its absolute level. Lightroom's acts -//! relative to the frame: on a photo with a wide tonal range it reaches further down and works harder. From V9 -//! Highlights takes the frame's range from the base layer's percentiles ([`FrameRange`]). Shadows keeps V8's rule. +//! Up to V8 Highlights moves the base layer's log luminance by a fixed weight of its absolute level. From V9 it acts +//! relative to the frame: on a photo with a wide tonal range it reaches further down and works harder. It takes the +//! frame's range from the base layer's percentiles ([`FrameRange`]). Shadows keeps V8's rule (`docs/hs-range.md`). use lightcraft_develop::Process; diff --git a/crates/pipeline/src/local.rs b/crates/pipeline/src/local.rs index 499dd6d8397..0e13af1a16c 100644 --- a/crates/pipeline/src/local.rs +++ b/crates/pipeline/src/local.rs @@ -925,7 +925,8 @@ pub(crate) fn frame_airlight(src: &Rgb32f, info: &SourceInfo, s: &DevelopSetting /// The tonal range of the whole output frame for process V9's Highlights ([`crate::hs_range`]): the base layer's /// percentiles on a small render of it (`proxy_w` px wide), so that a window, a preview and an export of one photo -/// share it. Before exposure, like [`Prepared::base`](crate::Prepared). +/// share it. Before exposure, like [`Prepared::base`](crate::Prepared), and after the same stages before it that +/// change tone: the camera's local tone mapping when it is on, then the white balance (as `lin_cpu`). pub(crate) fn frame_range( src: &Rgb32f, info: &SourceInfo, @@ -935,6 +936,7 @@ pub(crate) fn frame_range( proxy_h: usize, ) -> Option { let mut img = Rgb32f::clone(&frame_proxy(src, frame, proxy_w, proxy_h)); + crate::local_tone::apply_framed(&mut img, info, s, frame); white_balance(&mut img, info, s); let ppl = frame.px_per_long(proxy_w); let base = tone_base(&img.map(log_lum), (0.015 * ppl as f32).max(1.0), tone_base_detail(s, ppl), base_keeps_gaps(s)); @@ -985,6 +987,47 @@ pub fn airlight_of(mut v: Vec) -> f32 { #[cfg(test)] mod tests { + /// Highlights' range is measured on the tones it adjusts: with the camera's local tone mapping on, the range proxy + /// gets the same gain as the render before its base (review on #4100). + #[test] + fn the_range_is_measured_after_the_local_tone_map() { + use lightcraft_develop::{DevelopSettings, Process}; + use lightcraft_raw::gaintable::{GainTableMap, SourcePlacement}; + let src = Rgb32f::from_fn(192, 128, |x, y| { + let t = 0.02 + 0.2 * ((x * 5 + y * 3) % 192) as f32 / 192.0; + [t, t, t] + }); + // a gain rising from 1 at the left of the frame to 4 at the right + let local_tone = crate::local_tone::LocalTone { + map: GainTableMap { + points_v: 1, + points_h: 2, + points_n: 1, + spacing_v: 1.0, + spacing_h: 1.0, + origin_v: 0.0, + origin_h: 0.0, + weights: [1.0 / 3.0, 1.0 / 3.0, 1.0 / 3.0, 0.0, 0.0], + gamma: 1.0, + gains: vec![1.0, 4.0], + }, + placement: SourcePlacement { rect: [0.0, 0.0, 1.0, 1.0], orientation: lightcraft_geom::Orientation::Normal }, + }; + let info = SourceInfo { raw: true, local_tone: Some(Arc::new(local_tone)), ..Default::default() }; + let mut s = DevelopSettings { process: Process::V9.version(), ..Default::default() }; + s.light.highlights = -60.0; + let range = |on: bool| { + let mut s = s.clone(); + s.profile.camera_local_tone = on; + let frame = crate::frame_for(&src, &info, &s, true); + frame_range(&src, &info, &s, &frame, 96, 64).expect("a range") + }; + let (off, on) = (range(false), range(true)); + // the brightened right lifts the top of the range by up to log2(4) = 2 stops, the dark end by less + assert!(on.hi - off.hi > 1.0, "{off:?} -> {on:?}"); + assert!(on.hi - off.hi > on.lo - off.lo, "{off:?} -> {on:?}"); + } + /// Edits saved under V1 to V5 keep main's colour noise reduction (blurred chromaticity); V6 gets /// the joint method of `nrc_joint`. #[test] diff --git a/crates/pipeline/src/local_tone.rs b/crates/pipeline/src/local_tone.rs index cb2d7d3c290..56244fa22b5 100644 --- a/crates/pipeline/src/local_tone.rs +++ b/crates/pipeline/src/local_tone.rs @@ -15,6 +15,7 @@ use lightcraft_geom::Point; use lightcraft_raster::Rgb32f; use lightcraft_raw::gaintable::{GainTableMap, GainTableMapApply, SourcePlacement}; +use crate::geometry::Frame; use crate::{Plan, SourceInfo}; use lightcraft_develop::DevelopSettings; @@ -33,10 +34,15 @@ pub fn enabled(info: &SourceInfo, s: &DevelopSettings) -> bool { /// Multiply the resampled, not yet white-balanced source `img` (the output frame of `p`) by the /// local tone gain at each pixel. Blank canvas (outside a lens / perspective warp) is left alone. pub fn apply(img: &mut Rgb32f, info: &SourceInfo, p: &Plan<'_>) { - let Some(lt) = info.local_tone.as_deref().filter(|_| enabled(info, &p.settings)) else { return }; + apply_framed(img, info, &p.settings, &p.frame); +} + +/// [`apply`] for any render of `frame` at `img`'s size, such as the small whole-frame proxy Highlights measures its +/// range on ([`crate::local::frame_range`]). +pub fn apply_framed(img: &mut Rgb32f, info: &SourceInfo, s: &DevelopSettings, frame: &Frame) { + let Some(lt) = info.local_tone.as_deref().filter(|_| enabled(info, s)) else { return }; let Some(eval) = lt.map.evaluator() else { return }; let (w, h) = (img.width, img.height); - let frame = &p.frame; let (ow, oh) = (frame.ow.max(1e-9), frame.oh.max(1e-9)); let o2t = frame.out_to_oriented(w, h); let user = frame.orient.inverse(); From 77309c51d8dc7ce6ae80b585e527750c2f1eff42 Mon Sep 17 00:00:00 2001 From: smi-leonivkovic Date: Tue, 24 Nov 2026 09:28:56 +0100 Subject: [PATCH 31/51] LR-EDIT-COLOR-CALIB: Calibration's primaries are a fitted 3x3 matrix, not bands (#523) A primary shifts every colour, so the band form fitted the charts poorly (71% of the effect left, against 28% for a matrix) and cost the held-out photos 0.06 in colour. Each slider is now I + A t + Q t^2 on linear ProPhoto RGB, rows summing to 0 so greys stay grey (108 constants), sampled into the stage's calibration table, so the GPU path is unchanged. Held-out photos, full stack: tables 2.418 / 0.556, fitted 2.424 / 0.557 (tone / colour, OkLab x 100). --- crates/pipeline/src/mixer_stage.rs | 120 +++++++++++++++++------ crates/pipeline/src/mixer_stage_model.rs | 21 ++-- tools/lr_mixer_charts.py | 71 +++++++++----- 3 files changed, 146 insertions(+), 66 deletions(-) diff --git a/crates/pipeline/src/mixer_stage.rs b/crates/pipeline/src/mixer_stage.rs index 8498b04048d..35788500f35 100644 --- a/crates/pipeline/src/mixer_stage.rs +++ b/crates/pipeline/src/mixer_stage.rs @@ -9,8 +9,9 @@ //! - The bands differ from V8's: their centres sit elsewhere on the hue circle (Orange at OkLab hue 50, not 82), Blue //! is wider and Red and Magenta narrower. //! - All 24 mixer sliders act on the same input colour: their hue and lightness changes add and their chroma changes -//! multiply. Calibration's 6 sliders have a model of the same form (each primary a band) and combine the same way, -//! in a pass of their own before the mixer. +//! multiply. +//! - Calibration's 6 sliders are a fitted 3 Γ— 3 matrix on linear ProPhoto RGB that keeps greys grey +//! ([`calibration_matrix`]), sampled into a table of the same form and applied in a pass of its own before the mixer. //! - The mixer acts before the tone curves. //! //! The stage runs after the tone map and Process V4's calibrated Contrast and Blacks, before the curve stage @@ -32,9 +33,7 @@ const OUTPUTS: usize = 3; pub const TABLE_LEN: usize = ROWS * OUTPUTS * HUES; /// Mixer sliders: bands (red … magenta) Γ— (hue, saturation, luminance). const SLIDERS: usize = 24; -/// The first calibration slider: then the primaries (red, green, blue) Γ— (hue, saturation). -const CALIBRATION: usize = SLIDERS; -/// Calibration sliders. +/// Calibration's sliders: the primaries (red, green, blue) Γ— (hue, saturation). const CAL_SLIDERS: usize = 6; /// Where the combined table samples the model: OkLab lightness levels. const LIGHT: [f32; 3] = [0.55, 0.78, 0.92]; @@ -55,27 +54,17 @@ pub struct MixerStage { pub table: Option>, } -/// The fitted response of slider `slider` (a mixer band Γ— 3 + kind, or [`CALIBRATION`] + primary Γ— 2 + kind) output -/// `out` at amount `t` (βˆ’1 to 1) for OkLCh chroma `c`, lightness `l` and hue `h` (degrees): a hue shift in degrees, a -/// relative chroma change or a lightness change. `amp Β· gain(t) Β· band(h) Β· level(dc, dl)` with the band's shape -/// shared by its sliders, and the gain and level dependence shared by all bands' sliders of one kind -/// (docs/mixer-stage.md). +/// The fitted response of mixer slider `slider` (band Γ— 3 + kind) output `out` at amount `t` (βˆ’1 to 1) for OkLCh +/// chroma `c`, lightness `l` and hue `h` (degrees): a hue shift in degrees, a relative chroma change or a lightness +/// change. `amp Β· gain(t) Β· band(h) Β· level(dc, dl)` with the band's shape shared by its three sliders, and the gain +/// and level dependence shared by all bands' sliders of one kind (docs/mixer-stage.md). fn response(slider: usize, out: usize, t: f64, c: f64, l: f64, h: f64) -> f64 { - let fitted = match slider.checked_sub(CALIBRATION) { - None => { - let (band, kind) = (slider / 3, slider % 3); - (m::BANDS.get(band), m::KINDS.get(kind).and_then(|k| k.get(out)), m::AMPS.get(band).and_then(|a| a.get(kind)).and_then(|a| a.get(out))) - } - Some(i) => { - let (band, kind) = (i / 2, i % 2); - ( - m::CAL_BANDS.get(band), - m::CAL_KINDS.get(kind).and_then(|k| k.get(out)), - m::CAL_AMPS.get(band).and_then(|a| a.get(kind)).and_then(|a| a.get(out)), - ) - } + let (band, kind) = (slider / 3, slider % 3); + let (Some([centre, left, right]), Some(k), Some(amp)) = + (m::BANDS.get(band), m::KINDS.get(kind).and_then(|k| k.get(out)), m::AMPS.get(band).and_then(|a| a.get(kind)).and_then(|a| a.get(out))) + else { + return 0.0; }; - let (Some([centre, left, right]), Some(k), Some(amp)) = fitted else { return 0.0 }; let [g1, g2, g3, g4, g5, g6, ac, al] = *k; let (at, dc, dl) = (t.abs(), (c - m::REF_CHROMA.0) / m::REF_CHROMA.1, (l - m::REF_LIGHT.0) / m::REF_LIGHT.1); let gain = if t < 0.0 { g1 * at + g2 * at * at + g3 * at * at * at } else { g4 * at + g5 * at * at + g6 * at * at * at }; @@ -84,11 +73,66 @@ fn response(slider: usize, out: usize, t: f64, c: f64, l: f64, h: f64) -> f64 { amp * gain * (-0.5 * z * z).exp() * (ac * dc + al * dl).exp() } +/// Calibration's primaries as one 3 Γ— 3 matrix on linear ProPhoto RGB: `I + Ξ£ (A t + Q tΒ²)` over the six sliders at +/// amounts `t` (βˆ’1 to 1), `Q` the slider's positive or negative curvature. Every row of `A` and `Q` sums to 0, so greys +/// stay grey ([`m::CALIBRATION`]). +fn calibration_matrix(primaries: &[f64; CAL_SLIDERS]) -> [[f64; 3]; 3] { + let mut out = [[1.0, 0.0, 0.0], [0.0, 1.0, 0.0], [0.0, 0.0, 1.0]]; + for (fit, a) in m::CALIBRATION.iter().zip(primaries) { + let t = (a / 100.0).clamp(-1.0, 1.0); + if t == 0.0 || !t.is_finite() { + continue; + } + let curve = if t > 0.0 { &fit[6..12] } else { &fit[12..18] }; + for (r, row) in out.iter_mut().enumerate() { + let (a0, a1, q0, q1) = (fit[2 * r], fit[2 * r + 1], curve[2 * r], curve[2 * r + 1]); + let d = [a0 * t + q0 * t * t, a1 * t + q1 * t * t]; + row[0] += d[0]; + row[1] += d[1]; + row[2] -= d[0] + d[1]; + } + } + out +} + +/// Calibration's matrix sampled into the stage's table: at every row's lightness and chroma and every hue bin, the hue +/// shift (radians), chroma factor and lightness change the matrix gives that colour. `None` when every primary is 0. +fn calibration_table(primaries: &[f64; CAL_SLIDERS]) -> Option> { + if primaries.iter().all(|v| *v == 0.0 || !v.is_finite()) { + return None; + } + let cal = calibration_matrix(primaries); + let (to, from) = crate::light_v3::prophoto_matrices(); + let mul = |m: &[[f64; 3]; 3], v: [f64; 3]| -> [f64; 3] { std::array::from_fn(|r| m[r][0] * v[0] + m[r][1] * v[1] + m[r][2] * v[2]) }; + let f = |m: &[[f32; 3]; 3]| -> [[f64; 3]; 3] { m.map(|r| r.map(f64::from)) }; + let (to, from) = (f(&to), f(&from)); + let mut t = Box::new([0.0f32; TABLE_LEN]); + for row in 0..ROWS { + let (li, ci) = (row / 3, row % 3); + let l = LIGHT.get(li).copied().unwrap_or(0.0); + let c = CHROMA.get(li).and_then(|r| r.get(ci)).copied().unwrap_or(0.0); + for bin in 0..HUES { + let h = (bin as f32 * (360.0 / HUES as f32)).to_radians(); + let lin = oklab_to_2020(lch_to_lab([l, c, h])).map(f64::from); + let out = mul(&from, mul(&cal, mul(&to, lin))).map(|v| v.max(0.0) as f32); + let [l1, c1, h1] = lab_to_lch(oklab_from_2020(out)); + let dh = (h1 - h + std::f32::consts::PI).rem_euclid(std::f32::consts::TAU) - std::f32::consts::PI; + let values = [dh, if c > 0.0 { c1 / c } else { 1.0 }, l1 - l]; + for (out, v) in values.into_iter().enumerate() { + if let Some(slot) = t.get_mut((row * OUTPUTS + out) * HUES + bin) { + *slot = v; + } + } + } + } + Some(t) +} + /// The combined table of `(slider, amount)` pairs: hue and lightness changes add, chroma changes multiply. fn combine(sliders: &[(usize, f32)]) -> Option> { let active: Vec<(usize, f64)> = sliders .iter() - .filter(|(i, v)| *v != 0.0 && v.is_finite() && *i < CALIBRATION + CAL_SLIDERS) + .filter(|(i, v)| *v != 0.0 && v.is_finite() && *i < SLIDERS) .map(|(i, v)| (*i, (f64::from(*v) / 100.0).clamp(-1.0, 1.0))) .collect(); if active.is_empty() { @@ -140,12 +184,13 @@ impl MixerStage { return None; } let sliders: Vec<(usize, f32)> = s.mixer.bands().iter().flat_map(|b| [b.hue, b.sat, b.lum]).enumerate().map(|(i, v)| (i, v as f32)).collect(); - let primaries: Vec<(usize, f32)> = if s.section_enabled("calibration") { - s.calibration.primaries().iter().flat_map(|(h, sat)| [*h, *sat]).enumerate().map(|(i, v)| (CALIBRATION + i, v as f32)).collect() - } else { - Vec::new() - }; - let (calibration, table) = (combine(&primaries), combine(&sliders)); + let mut primaries = [0.0f64; CAL_SLIDERS]; + if s.section_enabled("calibration") { + for (slot, v) in primaries.iter_mut().zip(s.calibration.primaries().iter().flat_map(|(h, sat)| [*h, *sat])) { + *slot = v; + } + } + let (calibration, table) = (calibration_table(&primaries), combine(&sliders)); (calibration.is_some() || table.is_some()).then_some(MixerStage { chroma: CHROMA, light: LIGHT, calibration, table }) } @@ -224,7 +269,7 @@ mod tests { /// and is 0 at amount 0. #[test] fn the_fitted_responses_stay_plausible() { - for slider in 0..CALIBRATION + CAL_SLIDERS { + for slider in 0..SLIDERS { for out in 0..OUTPUTS { // Blue Luminance βˆ’100 darkens pale blues and raises their chroma severalfold let limit = [180.0, 8.0, 0.5][out]; @@ -243,6 +288,17 @@ mod tests { } } + /// Calibration keeps greys grey at any setting, and is the identity at 0. + #[test] + fn calibration_keeps_greys_grey() { + let m = calibration_matrix(&[40.0, -70.0, 100.0, 25.0, -100.0, 60.0]); + for row in m { + assert!((row.iter().sum::() - 1.0).abs() < 1e-12, "{m:?}"); + } + assert_eq!(calibration_matrix(&[0.0; CAL_SLIDERS]), [[1.0, 0.0, 0.0], [0.0, 1.0, 0.0], [0.0, 0.0, 1.0]]); + assert!(calibration_table(&[0.0; CAL_SLIDERS]).is_none()); + } + /// Each band acts around its own centre: a slider moves colours at its band's centre more than colours half the /// hue circle away. #[test] diff --git a/crates/pipeline/src/mixer_stage_model.rs b/crates/pipeline/src/mixer_stage_model.rs index f6834441a26..0f10c4eca0b 100644 --- a/crates/pipeline/src/mixer_stage_model.rs +++ b/crates/pipeline/src/mixer_stage_model.rs @@ -27,16 +27,13 @@ pub const AMPS: [[[f64; 3]; 3]; 8] = [ [[6.165394e-01, -9.364707e-02, -3.676874e-01], [-1.062197e-01, 1.043411e+00, 8.290845e-01], [5.187354e-02, 8.899672e-01, 1.035930e+00]], ]; -/// Calibration's primaries (Red, Green, Blue) as bands of the same form: centre and log widths. -pub const CAL_BANDS: [[f64; 3]; 3] = [[3.999999e+01, 4.267717e+00, 3.948867e+00], [1.671219e+02, 4.608938e+00, 4.451903e+00], [2.619083e+02, 3.841599e+00, 3.797270e+00]]; -/// Per kind (Hue, Saturation) and output: the gain over the amount and the dependence on chroma and lightness. -pub const CAL_KINDS: [[[f64; 8]; 3]; 2] = [ - [[-1.981125e+01, 4.992592e+00, -2.294678e-01, 1.964325e+01, -4.660403e+00, 6.778580e-03, 1.024378e-02, -1.104250e-02], [2.296903e-02, 4.392539e-01, -1.560214e-01, -3.091204e-03, 3.499960e-01, -9.763516e-02, 2.272062e-01, 4.335262e-01], [4.957661e-03, -3.238994e-03, 2.313091e-03, -5.463871e-03, -3.737579e-04, 4.616495e-04, 3.888798e-01, 4.969148e-02]], - [[1.894732e+00, -8.825173e-01, 1.847529e-01, -2.158583e+00, 1.455028e+00, -3.103105e-01, 2.910110e-01, 1.100701e-01], [-7.183286e-01, 1.327981e-01, -1.497383e-02, 7.229650e-01, 6.571578e-02, -4.699914e-02, 1.326878e-01, 2.140370e-01], [4.500621e-02, -1.104972e-02, 1.337810e-03, -4.503449e-02, -1.199622e-02, 8.538315e-03, 6.121292e-01, 3.919996e-01]], -]; -/// Per primary, kind and output: the amplitude. -pub const CAL_AMPS: [[[f64; 3]; 2]; 3] = [ - [[1.428114e+00, 2.578505e-01, -3.388025e+00], [-1.860319e+00, 8.905843e-01, 5.898592e-01]], - [[1.177049e-01, 1.500618e-01, 8.430742e-01], [-1.288242e-01, 8.455871e-01, 1.980348e-01]], - [[3.469202e+00, 2.133365e+00, 2.288765e+00], [3.536941e+00, 1.479606e+00, 1.852951e+00]], +/// Calibration's sliders (Red Hue, Red Saturation, Green Hue, Green Saturation, Blue Hue, Blue Saturation): the +/// first two columns of each row of `A`, `Q` positive and `Q` negative, row by row (the third makes the row sum 0). +pub const CALIBRATION: [[f64; 18]; 6] = [ + [-1.547327e-02, 7.273707e-03, 3.003955e-01, -3.141921e-01, -3.547121e-01, 8.008446e-03, 6.935667e-03, -7.792929e-03, 2.029963e-02, -1.740525e-02, -2.006661e-02, 2.188926e-02, 3.881001e-02, -4.040656e-02, 8.184881e-02, -8.200394e-02, 3.469710e-02, -4.347991e-02], + [2.520522e-02, -2.911590e-02, -3.236732e-01, 3.224201e-01, -4.149347e-01, -8.872622e-03, -8.368878e-03, 8.915103e-03, -2.868974e-02, 2.127309e-02, 1.015934e-02, 2.404494e-02, 3.876153e-02, -4.077181e-02, 9.883450e-02, -9.681622e-02, 7.449019e-03, -3.080938e-02], + [3.328950e-01, -3.393788e-01, -1.064849e-03, 5.987962e-04, 4.704683e-03, 3.021927e-01, -7.476490e-03, 1.398283e-02, 3.786902e-03, 2.856996e-05, 2.019210e-03, 2.583290e-02, 7.961440e-03, -1.983197e-02, -2.959773e-04, -8.417476e-03, -4.189491e-03, -4.796613e-02], + [3.805201e-01, -3.841547e-01, -9.527065e-03, 2.706720e-03, -5.380324e-03, -3.832431e-01, -1.536930e-02, 5.849154e-03, -3.183861e-04, -8.004644e-03, 2.275380e-03, -3.298019e-02, -5.730492e-03, 7.926343e-03, -3.462981e-03, 1.976804e-03, -5.708280e-04, 1.256778e-02], + [-2.973140e-01, -4.055447e-02, 3.490484e-02, 2.601315e-01, 1.323616e-02, -3.520959e-02, -6.811879e-03, 2.059578e-02, -4.826043e-03, 3.879553e-02, -3.158784e-03, 1.682270e-02, -4.887552e-02, -6.842565e-02, 2.271657e-02, -9.742929e-02, 1.153665e-02, -4.635382e-02], + [4.600597e-01, -1.233363e-01, 6.205999e-02, 3.475854e-01, 4.962375e-02, -7.383271e-02, -2.210173e-01, 2.544553e-01, -7.015484e-02, 1.150436e-01, -2.853037e-02, 2.724819e-01, 8.851418e-02, -1.654652e-01, 7.762547e-02, -7.895161e-02, 5.364671e-02, -9.522255e-02], ]; diff --git a/tools/lr_mixer_charts.py b/tools/lr_mixer_charts.py index 6f0dafabbc9..4160299fd5a 100644 --- a/tools/lr_mixer_charts.py +++ b/tools/lr_mixer_charts.py @@ -20,7 +20,7 @@ import numpy as np sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) -from lr_tone_charts import ADOBE_TO_XYZ, H, W, write_dng, xmp # noqa: E402 +from lr_tone_charts import ADOBE_TO_XYZ, XYZ_TO_PROPHOTO, H, W, write_dng, xmp # noqa: E402 CELL = 60 BANDS = ("Red", "Orange", "Yellow", "Green", "Aqua", "Blue", "Purple", "Magenta") @@ -78,6 +78,14 @@ def variants(): # ---- table -------------------------------------------------------------------------------------------------- +def rgb_patches(path, patches): + """Mean encoded Adobe RGB of each in-gamut patch of a Camera Raw render, 0..1.""" + import tifffile + a = tifffile.imread(path).astype(np.float64) + a /= 65535.0 if a.max() > 255 else 255.0 + return np.array([a[q["y"] + 10:q["y"] + q["h"] - 10, q["x"] + 10:q["x"] + q["w"] - 10].reshape(-1, 3).mean(0) for q in patches]) + + def oklab_patches(path, patches): """Mean colour of each in-gamut patch of a Camera Raw render, as OkLab.""" import tifffile @@ -140,18 +148,17 @@ def response(lab0, lab, light, chroma): # band(h) = exp(-z^2 / 2), z = wrap(h - centre) / e^(left or right) # # Each band's centre and widths are shared by its three sliders; each kind's gain curve and level dependence are -# shared by all bands. Calibration's primaries (red, green, blue) get a model of the same form: each primary a band, -# with two kinds (Hue, Saturation), 75 constants. +# shared by all bands. +# +# Calibration's primaries act on every colour, not on a band: each of its six sliders is a 3 x 3 matrix on linear +# ProPhoto RGB, I + A t + Q t^2 (Q for positive or negative amounts), every row of A and Q summing to 0 so greys stay +# grey. 18 constants per slider. FIT_C, FIT_L = (0.09, 0.05), (0.75, 0.15) CENTRES = (10, 50, 95, 140, 180, 255, 320, 350) -CAL_CENTRES = (29, 142, 264) # starting signs and sizes per (kind, output): each kind's main output, then its smaller side effects MIXER_START = {(0, 0): (-40, 40), (0, 1): (0.1, 0.1), (0, 2): (0.01, 0.01), (1, 0): (1, -1), (1, 1): (-0.6, 0.6), (1, 2): (0.01, -0.01), (2, 0): (1, -1), (2, 1): (0.1, -0.1), (2, 2): (-0.1, 0.1)} -CAL_START = {(0, 0): (-20, 20), (0, 1): (0.05, 0.05), (0, 2): (0.01, 0.01), (1, 0): (1, -1), (1, 1): (-0.3, 0.3), - (1, 2): (0.01, -0.01)} - def unpack(p, nb=8, nk=3): """(bands nb x [centre, left, right], kinds nk x 3 x [g1..g6, ac, al], amps nb x nk x 3).""" @@ -178,6 +185,27 @@ def model(p, t, dc, dl, nb=8, nk=3): return out +def calibration_matrix(p, t): + """One calibration slider's matrix at amount `t` (-1..1) from its 18 constants [A, Q positive, Q negative].""" + rows = lambda v: np.c_[np.reshape(v, (3, 2)), -np.reshape(v, (3, 2)).sum(1)] + return np.eye(3) + rows(p[:6]) * t + rows(p[6:12] if t > 0 else p[12:18]) * t * t + + +def fit_calibration(neutral, edited): + """Fit one calibration slider's matrix to linear ProPhoto patches: `neutral` (n x 3) and `edited` {amount: n x 3}; + returns the constants and the mean OkLab x 100 error and effect.""" + from scipy.optimize import least_squares + to_lab = lambda p: (M2 @ np.cbrt(np.clip(M1 @ (p @ np.linalg.inv(XYZ_TO_PROPHOTO).T).T, 0, None))).T + lab0 = to_lab(neutral) + target = {a: to_lab(e) for a, e in edited.items()} + residual = lambda p: np.concatenate([((to_lab(np.clip(neutral @ calibration_matrix(p, a / 100).T, 0, None)) - target[a]) * 100).ravel() + for a in edited]) + p = least_squares(residual, np.zeros(18)).x + e = residual(p).reshape(len(edited), -1, 3) + effect = np.mean([np.linalg.norm((target[a] - lab0) * 100, axis=1).mean() for a in edited]) + return p, float(np.linalg.norm(e, axis=2).mean()), float(effect) + + def fit_model(measured, chroma, dc, dl, centres=CENTRES, nk=3, start=MIXER_START): """Fit the model to the measured responses (slider, amount, level, output, hue); returns the constants.""" from scipy.optimize import least_squares @@ -224,13 +252,17 @@ def fit(render_dir, out_rs): measure = lambda stems: np.stack([np.stack([response(lab0, oklab_patches(tif(f"{stem}{a:+d}"), patches), light, chroma) for a in AMOUNTS]) for stem in stems]) params, residual = fit_model(measure(every[:24]), level_c, dc, dl) - cal, cal_residual = fit_model(measure(every[24:]), level_c, dc, dl, CAL_CENTRES, 2, CAL_START) - for stems, e in ((every[:24], residual(params)), (every[24:], cal_residual(cal))): - e = e.reshape(len(stems), 3, -1) - for i, stem in enumerate(stems): - print(f"{stem:22s} rms " + " ".join(f"{np.sqrt((e[i, o] ** 2).mean()):.3f}" for o in range(3)) + " (hue, chroma, lightness; OkLab x 100)") + e = residual(params).reshape(24, 3, -1) + for i, stem in enumerate(every[:24]): + print(f"{stem:22s} rms " + " ".join(f"{np.sqrt((e[i, o] ** 2).mean()):.3f}" for o in range(3)) + " (hue, chroma, lightness; OkLab x 100)") + pro = lambda n: (rgb_patches(tif(n), patches) ** (563 / 256)) @ ADOBE_TO_XYZ.T @ XYZ_TO_PROPHOTO.T + neutral = pro("neutral") + cal = [] + for stem in every[24:]: + p, err, effect = fit_calibration(neutral, {a: pro(f"{stem}{a:+d}") for a in AMOUNTS}) + cal.append(p) + print(f"{stem:22s} mean error {err:.3f} of an effect of {effect:.3f} (OkLab x 100)") bands, kinds, amps = unpack(params) - cal_bands, cal_kinds, cal_amps = unpack(cal, 3, 2) num = lambda v: f"{v:.6e}" row = lambda vs: "[" + ", ".join(num(v) for v in vs) + "]" s = ["// Written by `tools/lr_mixer_charts.py fit`: LightCraft's model of the colour mixer, fitted to the tool's OkLCh", @@ -253,15 +285,10 @@ def fit(render_dir, out_rs): *[f" [{', '.join(row(k) for k in a)}]," for a in amps], "];", "", - "/// Calibration's primaries (Red, Green, Blue) as bands of the same form: centre and log widths.", - "pub const CAL_BANDS: [[f64; 3]; 3] = [" + ", ".join(row(b) for b in cal_bands) + "];", - "/// Per kind (Hue, Saturation) and output: the gain over the amount and the dependence on chroma and lightness.", - "pub const CAL_KINDS: [[[f64; 8]; 3]; 2] = [", - *[f" [{', '.join(row(o) for o in k)}]," for k in cal_kinds], - "];", - "/// Per primary, kind and output: the amplitude.", - "pub const CAL_AMPS: [[[f64; 3]; 2]; 3] = [", - *[f" [{', '.join(row(k) for k in a)}]," for a in cal_amps], + "/// Calibration's sliders (Red Hue, Red Saturation, Green Hue, Green Saturation, Blue Hue, Blue Saturation): the", + "/// first two columns of each row of `A`, `Q` positive and `Q` negative, row by row (the third makes the row sum 0).", + "pub const CALIBRATION: [[f64; 18]; 6] = [", + *[f" {row(p)}," for p in cal], "];", ""] with open(out_rs, "w") as f: From 0fd66684f95c43a06785ef221614b8c0d60022e5 Mon Sep 17 00:00:00 2001 From: smi-leonivkovic Date: Tue, 24 Nov 2026 11:30:43 +0100 Subject: [PATCH 32/51] LR-EDIT-COLOR-GRADING: grading-stage.md reports the fitted series on the held-out photos (#523) --- docs/grading-stage.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/grading-stage.md b/docs/grading-stage.md index 4979187fee8..b700799a86f 100644 --- a/docs/grading-stage.md +++ b/docs/grading-stage.md @@ -85,9 +85,10 @@ the share by lightness within 0.7 to 2.6 RMS (Γ— 100, the shadows wheel worst); angle (the midtones wheel's at chroma 0.12 go 1.02, 0.99, 0.90, 0.92, 0.96, 1.02), so the smooth model leaves part of that out. -On 5 held-out Panasonic DC-S9 photos with 19 presets, rendered at 1,500 px and compared with Camera Raw's renders -after aligning the two engines' geometry, the mean OkLab a/b error falls from 1.32 to 1.19 (OkLab Γ— 100) over all -edit groups, and on the Teal & Orange preset from 2.66 to 1.34. +On 5 held-out Panasonic DC-S9 photos (24 edits each plus Neutral, 1,500 px, aligned against Camera Raw's renders), +the whole V9 series with every stage's fitted model (curves, mixer, this stage, the default base curve, Highlights and +Calibration) is 2.424 in tone and 0.557 in colour (OkLab Γ— 100, lower is better), against 2.418 and 0.556 with the +measured tables it replaces, and 6.98 and 1.52 before the series (V7). ## Limits From cd6195b1cf5debc1ab531f29eee9c28af6c1fd2e Mon Sep 17 00:00:00 2001 From: smi-leonivkovic Date: Tue, 24 Nov 2026 11:30:50 +0100 Subject: [PATCH 33/51] LR-BEHAV-RENDER-FIDELITY: default-tone.md reports the fitted series on the held-out photos (#523) --- docs/default-tone.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/docs/default-tone.md b/docs/default-tone.md index f37982ae5ff..781d649936d 100644 --- a/docs/default-tone.md +++ b/docs/default-tone.md @@ -73,20 +73,20 @@ The offset was fitted on 5 training photos of the DC-S9 and checked on 5 others ## Results -Held-out Panasonic Lumix DC-S9 photos (RW2, Adobe Standard profile, 1,500 px, aligned against Camera Raw's renders), -lightness RMS and mean a/b error (OkLab Γ— 100), lower is better: +Held-out Panasonic Lumix DC-S9 photos (RW2, Adobe Standard profile, 24 edits each plus Neutral, 1,500 px, aligned +against Camera Raw's renders), lightness RMS and mean a/b error (OkLab Γ— 100), lower is better. "Before" is LightCraft +before the V9 series (V7); "V9" is the whole series with every stage's fitted model, this curve included. -| Edits | Tone: before β†’ this | Colour: before β†’ this | +| Edits | Tone: before β†’ V9 | Colour: before β†’ V9 | |---|---|---| -| Unedited | 5.03 β†’ 0.69 | 1.00 β†’ 0.27 | -| Highlights, Shadows | 6.20 β†’ 3.26 | 1.02 β†’ 0.38 | -| Highlights and Shadows together | 8.66 β†’ 6.59 | 1.01 β†’ 0.62 | -| 19 presets (7 groups) | 6.38 β†’ 2.61 | 1.26 β†’ 0.73 | - -"Before" is process V9 without this change. - -Unedited, the five photos are off by 0.44 to 1.10 in lightness and on average 0.09 darker than Lightroom (2.41 -lighter before). No preset gets worse in tone or in colour. +| Unedited | 5.03 β†’ 0.70 | 1.00 β†’ 0.27 | +| Highlights | 6.68 β†’ 2.16 | 0.89 β†’ 0.27 | +| Shadows | 5.71 β†’ 3.24 | 1.14 β†’ 0.39 | +| Highlights and Shadows together | 8.66 β†’ 4.03 | 1.01 β†’ 0.43 | +| 19 presets (7 groups, equal weight) | 6.96 β†’ 2.12 | 1.74 β†’ 0.64 | + +With the measured grey steps instead of the fitted knots the series gives 0.69 and 0.27 unedited, and 2.418 and +0.556 over all groups against 2.424 and 0.557 with them. ## Limits From 69e90ef7eb711e4928d08b144e7ebde5b6ebb76e Mon Sep 17 00:00:00 2001 From: smi-leonivkovic Date: Tue, 24 Nov 2026 11:31:01 +0100 Subject: [PATCH 34/51] LR-EDIT-COLOR-CALIB: mixer-stage.md describes Calibration's matrix and the series results (#523) --- docs/mixer-stage.md | 39 ++++++++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/docs/mixer-stage.md b/docs/mixer-stage.md index 0fb351c164d..5f6c7da33e0 100644 --- a/docs/mixer-stage.md +++ b/docs/mixer-stage.md @@ -31,8 +31,8 @@ fine colour charts: After the tone map and V4's calibrated Contrast and Blacks, before the curve stage ([curve-stage.md](curve-stage.md)): 1. Convert linear Rec.2020 to OkLCh. -2. Calibration's primaries first: the lookup below with Calibration's six sliders, from their own model of the same - form (each primary a band, two kinds of slider). The mixer then acts on the colour Calibration made. +2. Calibration's primaries first: their fitted matrix on linear ProPhoto RGB (below), sampled into a table of the + same form as the mixer's and looked up the same way. The mixer then acts on the colour Calibration made. 3. Look up the response of every mixer slider that is set, from the model (below), sampled once per render into a table: for the pixel's hue (72 bins of 5Β°), chroma and lightness, the hue shift, the relative chroma change and the lightness change. Hue is interpolated linearly. Chroma and lightness are interpolated bilinearly between three @@ -65,18 +65,23 @@ and `dl` = (L βˆ’ 0.75) / 0.15 for the colour's OkLCh chroma and lightness: dependence on the colour's chroma and lightness, shared by all eight bands. - **Per band, kind and output** (72 constants): an amplitude. +**Calibration.** A primary shifts every colour, not one band, so each of Calibration's six sliders is a 3 Γ— 3 matrix +on linear ProPhoto RGB, `I + A t + Q tΒ²` (`Q` for positive or negative amounts), every row of `A` and `Q` summing to 0 +so greys stay grey: 18 constants per slider, 108 in all. Predicting Camera Raw's calibration charts with it leaves +0.48 to 1.24 (OkLab Γ— 100) against effects of 1.85 to 3.67, a quarter to a third of the effect. + ## How it was measured `tools/lr_mixer_charts.py charts OUT_DIR` writes linear DNG charts of OkLCh patches (72 hues Γ— 3 chroma levels Γ— 3 lightness levels, patches outside sRGB left out), with the settings in the DNG's XMP. It writes one neutral chart and each band's Hue, Saturation and Luminance and Calibration's red, green and blue Hue and Saturation at each measured -amount (241 charts). The charts are original test data. -Every chart was rendered through Camera Raw to a 16-bit Adobe RGB (1998) TIFF. Only that output is measured, and -nothing of Adobe's is copied or shipped. `tools/lr_mixer_charts.py fit RENDER_DIR OUT_RS` reads each render's -patches as OkLab, takes each setting's response against Camera Raw's own neutral chart, fits the model to it and -writes only the models' constants (the mixer's and calibration's), `mixer_stage_model.rs`. No measurement is committed. It needs numpy, scipy and -tifffile (`tools/requirements-lr-tone-charts.txt`). Running the tool again reproduces the committed charts byte for -byte, and the constants with the pinned packages. +amount (241 charts). The charts are original test data. Every chart was rendered through Camera Raw to a 16-bit Adobe +RGB (1998) TIFF. Only that output is measured, and nothing of Adobe's is copied or shipped. `tools/lr_mixer_charts.py +fit RENDER_DIR OUT_RS` reads each render's patches as OkLab, takes each setting's response against Camera Raw's own +neutral chart, fits the model to it and writes only the models' constants (the mixer's and calibration's), +`mixer_stage_model.rs`. No measurement is committed. It needs numpy, scipy and tifffile +(`tools/requirements-lr-tone-charts.txt`). Running the tool again reproduces the committed charts byte for byte, and +the constants with the pinned packages. Camera Raw's neutral render desaturates bright colours: patches of one nominal chroma come out about three times less chromatic at the top lightness level than at the bottom. The model therefore takes the colour's chroma and @@ -96,13 +101,17 @@ and 1.66 with it after. Those check charts are not part of the tool. ## Results Held-out Panasonic Lumix DC-S9 photos (5 raws, 24 edits each plus Neutral, 1,500 px, aligned against Camera Raw's -renders), with the curve stage of [curve-stage.md](curve-stage.md). Tone is RMS lightness error, colour the mean a/b -error (OkLab Γ— 100), all edit groups weighted equally. Lower is better. +renders). Tone is RMS lightness error, colour the mean a/b error (OkLab Γ— 100), all edit groups weighted equally. Lower +is better. -| Mixer | Tone | Colour | +| Build | Tone | Colour | |---|---|---| -| Measured table (before) | 7.008 | 1.314 | -| This model | 7.015 | 1.288 | +| With the curve stage, mixer table (before) | 7.008 | 1.314 | +| With the curve stage, this mixer model | 7.015 | 1.288 | +| Whole V9 series, measured tables | 2.418 | 0.556 | +| Whole V9 series, every stage's fitted model (this mixer and Calibration included) | 2.424 | 0.557 | + +A band-shaped model of Calibration (the mixer's form) cost the whole series 0.06 in colour; the matrix leaves none. ## Limits @@ -122,4 +131,4 @@ error (OkLab Γ— 100), all edit groups weighted equally. Lower is better. | 2026-11-11 | minor | Calibration's primaries measured too, applied before the mixer | | 2026-11-11 | patch | Colour Grading under V9 has its own measured stage, not V8's operator | | 2026-11-10 | minor | Process V9: the colour mixer measured against Lightroom, before the tone curves | -| 2026-11-24 | minor | The mixer is a fitted model of 168 constants instead of a measured table | +| 2026-11-24 | minor | The mixer is a fitted model of 168 constants instead of a measured table; Calibration a fitted matrix | From cfc8c22b8b133d27b80dc1c3b8c66e0dfc0e5e40 Mon Sep 17 00:00:00 2001 From: smi-leonivkovic Date: Tue, 24 Nov 2026 11:36:15 +0100 Subject: [PATCH 35/51] LR-EDIT-COLOR-GRADING: as_chunks for the model's constant groups (clippy) (#523) --- crates/pipeline/src/grading_stage.rs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/crates/pipeline/src/grading_stage.rs b/crates/pipeline/src/grading_stage.rs index b2e20c2dff8..01f1bbc424e 100644 --- a/crates/pipeline/src/grading_stage.rs +++ b/crates/pipeline/src/grading_stage.rs @@ -70,7 +70,7 @@ fn bracket(keys: &[f32], x: f32) -> (usize, usize, f32) { /// `c0 + Ξ£ c[2kβˆ’1] cos(k h) + c[2k] sin(k h)`. fn fourier(c: &[f64], h: f64) -> f64 { let (first, rest) = c.split_first().map_or((0.0, &[][..]), |(f, r)| (*f, r)); - first + rest.chunks_exact(2).enumerate().map(|(k, p)| p[0] * ((k + 1) as f64 * h).cos() + p[1] * ((k + 1) as f64 * h).sin()).sum::() + first + rest.as_chunks::<2>().0.iter().enumerate().map(|(k, [c, s])| c * ((k + 1) as f64 * h).cos() + s * ((k + 1) as f64 * h).sin()).sum::() } /// A bump of peak 1 at `p / (p + q)`, 0 at black and white and outside them. @@ -95,7 +95,9 @@ fn tint(w: usize, hue: f32, sat: f32) -> [f32; 2] { /// Two bumps whose gain and exponents are quadratic in `b` and `c`, at lightness `l` ([`m::SHARE`]). fn share(p: &[f64; 30], b: f64, c: f64, l: f64) -> f64 { - p.chunks_exact(15) + p.as_chunks::<15>() + .0 + .iter() .map(|q| { let f = |i: usize| q[i] + q[i + 1] * b + q[i + 2] * b * b + q[i + 3] * c + q[i + 4] * c * c; f(0) * bump(l, f(5).exp(), f(10).exp()) @@ -119,8 +121,12 @@ fn luminance(w: usize, v: f32) -> [f32; GRID] { let (a, side) = (t.abs(), if t < 0.0 { 0 } else { 12 }); std::array::from_fn(|i| { let l = i as f64 / (GRID - 1) as f64; - let r: f64 = - p[side..side + 12].chunks_exact(6).map(|q| (q[0] * a + q[1] * a * a) * bump(l, (q[2] + q[3] * a).exp(), (q[4] + q[5] * a).exp())).sum(); + let r: f64 = p[side..side + 12] + .as_chunks::<6>() + .0 + .iter() + .map(|[g1, g2, p0, p1, q0, q1]| (g1 * a + g2 * a * a) * bump(l, (p0 + p1 * a).exp(), (q0 + q1 * a).exp())) + .sum(); (t.signum() * r) as f32 }) } From e18b7a3312c7aaceccee858d60556cfc9b528f9f Mon Sep 17 00:00:00 2001 From: smi-leonivkovic Date: Sun, 29 Nov 2026 12:47:15 +0100 Subject: [PATCH 36/51] perf(gpu): one OkLCh round trip for Calibration and the mixer Both passes of process V9's colour stage now share the conversion, as MixerStage::apply does on the CPU. The equivalence test adds both stages on saturated colours. --- crates/gpu/src/wgsl/finish.wgsl | 32 +++++++++++++++++------------- crates/gpu/tests/it/equivalence.rs | 10 ++++++++++ 2 files changed, 28 insertions(+), 14 deletions(-) diff --git a/crates/gpu/src/wgsl/finish.wgsl b/crates/gpu/src/wgsl/finish.wgsl index 2c271d12c86..25f1421c257 100644 --- a/crates/gpu/src/wgsl/finish.wgsl +++ b/crates/gpu/src/wgsl/finish.wgsl @@ -198,17 +198,26 @@ fn mstage_look(keys: u32, l: f32, c: f32, h: f32) -> vec3 { return r[0] * (1.0 - lb.f) + r[1] * lb.f; } -// One pass of `MixerStage::apply` (calibration or the mixer), through OkLCh: the keys and table at `keys` in `aux`. -fn mixer_stage(d: vec3, keys: u32) -> vec3 { +// One pass of `MixerStage::apply` (calibration or the mixer) on OkLCh: the keys and table at `keys` in `aux`. +fn mixer_pass(lch: vec3, keys: u32) -> vec3 { + let r = mstage_look(keys, lch.x, lch.y, lch.z); + return vec3(max(lch.x + r.z, 0.0), lch.y * r.y, lch.z + r.x); +} + +// `MixerStage::apply`: calibration's primaries (`cal`), then the mixer (`mix`), with one conversion to +// OkLCh and back for both passes, as on the CPU. +fn mixer_stage(d: vec3, cal: bool, mix: bool) -> vec3 { let lab = oklab(d); - let l = lab.x; let c = sqrt(lab.y * lab.y + lab.z * lab.z); // atan2(0, 0) is undefined in WGSL; the CPU's gives 0 - let h = select(atan2(lab.z, lab.y), 0.0, c == 0.0); - let r = mstage_look(keys, l, c, h); - let h2 = h + r.x; - let c2 = c * r.y; - return oklab_inv(vec3(max(l + r.z, 0.0), c2 * cos(h2), c2 * sin(h2))); + var lch = vec3(lab.x, c, select(atan2(lab.z, lab.y), 0.0, c == 0.0)); + if (cal) { + lch = mixer_pass(lch, pu(F_MSTAGE_CAL_OFF)); + } + if (mix) { + lch = mixer_pass(lch, pu(F_MSTAGE_OFF)); + } + return oklab_inv(vec3(lch.x, lch.y * cos(lch.z), lch.y * sin(lch.z))); } // A table of process V9's curve stage (`Lut1::eval`) at offset `o` in `aux`. @@ -881,12 +890,7 @@ fn main(@builtin(global_invocation_id) gid: vec3) { // --- process V9: the colour mixer, then Whites and the tone curves if (pu(F_MSTAGE) != 0u) { // calibration's primaries first, then the mixer (`MixerStage::apply`) - if (pu(F_MSTAGE_CAL) != 0u) { - d = mixer_stage(d, pu(F_MSTAGE_CAL_OFF)); - } - if (pu(F_MSTAGE_MIX) != 0u) { - d = mixer_stage(d, pu(F_MSTAGE_OFF)); - } + d = mixer_stage(d, pu(F_MSTAGE_CAL) != 0u, pu(F_MSTAGE_MIX) != 0u); } if (pu(F_STAGE) != 0u) { d = curve_stage(d); diff --git a/crates/gpu/tests/it/equivalence.rs b/crates/gpu/tests/it/equivalence.rs index 03e31477bb4..962dcf41c79 100644 --- a/crates/gpu/tests/it/equivalence.rs +++ b/crates/gpu/tests/it/equivalence.rs @@ -871,6 +871,16 @@ fn mixer_stage_matches() { s.calibration.blue_sat = 60.0; s.calibration.shadows_tint = 30.0; check("V9 mixer and calibration", &src, &raw, &s, &req); + // saturated colours into both passes: the mixer reads calibration's hue and chroma straight from OkLCh + let mut sat = s.clone(); + sat.light.exposure = 0.3; + sat.color.vibrance = 60.0; + sat.calibration.red_sat = 80.0; + sat.calibration.green_sat = 70.0; + sat.calibration.blue_sat = 90.0; + sat.mixer.red.sat = 50.0; + sat.mixer.aqua.hue = -60.0; + check("V9 mixer and calibration, saturated", &src, &raw, &sat, &req); let mut c = v9(); c.calibration.green_hue = -30.0; c.calibration.red_sat = 50.0; From bb22f940b111e9d061d51e3f29e75aacb578871e Mon Sep 17 00:00:00 2001 From: smi-leonivkovic Date: Thu, 3 Dec 2026 12:37:05 +0100 Subject: [PATCH 37/51] test(finish): pin the legacy render test to process V16 (#523) From V17 Highlights scales with the frame's tonal range, which the test's 8 px chart barely has, so Highlights -30 no longer pulls its green edge out of the clip. The test checks the legacy pipeline, so it now names that process instead of the latest. --- crates/pipeline/src/finish.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/pipeline/src/finish.rs b/crates/pipeline/src/finish.rs index 922783b9439..94e46b60fb7 100644 --- a/crates/pipeline/src/finish.rs +++ b/crates/pipeline/src/finish.rs @@ -1197,7 +1197,9 @@ mod tests { src.data[16 + x] = [0.01, 1.5, 0.02]; // row 2: green edge src.data[24 + x] = [0.02, 0.05, 1.8]; // row 3: blue edge } - let mut s = DevelopSettings::default(); + // the legacy pipeline: from V17 Highlights scales with the frame's tonal range (`crate::hs_range`), which + // this 8 px chart barely has, so -30 no longer pulls the green edge out of the clip + let mut s = DevelopSettings { process: Process::V16.version(), ..Default::default() }; s.light.highlights = -30.0; s.light.shadows = 20.0; s.curve.master = vec![Point::new(0.0, 0.04), Point::new(0.5, 0.56), Point::new(1.0, 0.96)]; From 849551202cf49c6304a73612fdb01a32ec4a8ab2 Mon Sep 17 00:00:00 2001 From: smi-leonivkovic Date: Thu, 3 Dec 2026 12:41:30 +0100 Subject: [PATCH 38/51] refactor(default_tone): from V17 as a comparison, as the curve stage gates (#523) --- crates/pipeline/src/default_tone.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/crates/pipeline/src/default_tone.rs b/crates/pipeline/src/default_tone.rs index a342d5238b1..6c3c7e48c69 100644 --- a/crates/pipeline/src/default_tone.rs +++ b/crates/pipeline/src/default_tone.rs @@ -28,10 +28,7 @@ pub fn camera_ev(make: &str, model: &str) -> f32 { /// The default curve of `info` under `s`: from process V17, for a raw whose profile has no tone curve. pub fn for_source(s: &DevelopSettings, info: &SourceInfo) -> Option { - let v17 = match s.process.process() { - Process::V1 | Process::V2 | Process::V3 | Process::V4 | Process::V5 | Process::V6 | Process::V7 | Process::V8 | Process::V10 | Process::V13 | Process::V14 | Process::V15 | Process::V16 => false, - Process::V17 => true, - }; + let v17 = s.process.process() >= Process::V17; curve(info.default_tone.filter(|_| v17 && info.raw)?) } From cedbc2d6d31815802997256eb7b522a6432d6860 Mon Sep 17 00:00:00 2001 From: smi-leonivkovic Date: Thu, 3 Dec 2026 12:41:43 +0100 Subject: [PATCH 39/51] refactor(hs_range): from V17 as a comparison, as the curve stage gates (#523) --- crates/pipeline/src/hs_range.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/crates/pipeline/src/hs_range.rs b/crates/pipeline/src/hs_range.rs index 4820f42e3ab..a74fde6b28d 100644 --- a/crates/pipeline/src/hs_range.rs +++ b/crates/pipeline/src/hs_range.rs @@ -28,11 +28,8 @@ pub const H_AMP_RANGE: (f32, f32) = (0.2, 8.0); /// Whether `s` uses the frame's range: process V17 with Highlights, globally or in a visible mask. pub fn wanted(s: &lightcraft_develop::DevelopSettings) -> bool { - let v8 = match s.process.process() { - Process::V1 | Process::V2 | Process::V3 | Process::V4 | Process::V5 | Process::V6 | Process::V7 | Process::V8 | Process::V10 | Process::V13 | Process::V14 | Process::V15 | Process::V16 => false, - Process::V17 => true, - }; - v8 && (s.light.highlights != 0.0 || s.masks.iter().any(|m| m.visible && !m.components.is_empty() && m.adjust.highlights != 0.0)) + let v17 = s.process.process() >= Process::V17; + v17 && (s.light.highlights != 0.0 || s.masks.iter().any(|m| m.visible && !m.components.is_empty() && m.adjust.highlights != 0.0)) } impl FrameRange { From 1f5347593552c6b53abdcb1d05a47aa3ddfb1f2f Mon Sep 17 00:00:00 2001 From: smi-leonivkovic Date: Thu, 3 Dec 2026 15:22:46 +0100 Subject: [PATCH 40/51] test(curve): the drag test allows the framework's drag threshold, not a fixed step count (#523) After the Craft UI port the threshold swallows a different number of the drag's 8 steps. The test now checks that the line moves no further than the hand and no less than the hand minus the 6-point threshold. --- crates/ui-egui/src/tests/curve.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/crates/ui-egui/src/tests/curve.rs b/crates/ui-egui/src/tests/curve.rs index 76a629acadb..a9819e99819 100644 --- a/crates/ui-egui/src/tests/curve.rs +++ b/crates/ui-egui/src/tests/curve.rs @@ -439,10 +439,11 @@ fn dragging_the_curve_moves_the_region_slider() { let painted = painted_param_curve(&h, graph)(0.625); let before_level = g.at(0.625); assert!(painted < before_level - 0.02, "the painted line followed the drag down: {painted} vs before {before_level}"); - // and lands where the hand is: 0.08 lower, less the steps of the 8 that egui's drag threshold (6 points) swallows - let step = 0.08 * r[3] as f64 / 8.0; - let moved = 0.08 - (6.0 / step).floor() * step / r[3] as f64; - assert!((before_level - painted - moved).abs() < 0.006, "the line moved {} for a hand motion of {moved}", before_level - painted); + // and lands where the hand is: at most 0.08 lower, and at least that less the drag threshold (6 points), which + // swallows the hand's first steps (how many depends on how the framework starts a drag) + let moved = before_level - painted; + let threshold = 6.0 / r[3] as f64; + assert!(moved < 0.08 + 0.006 && moved > 0.08 - threshold - 0.006, "the line moved {moved} for a hand motion of 0.08"); // and Undo takes the whole gesture back to where it started exec(&mut h, "edit.undo", json!({})); assert_eq!(develop(&h).curve, c, "undo restores the value the drag started from"); From a85845dff4e0375cc5dc393a8d46b557c8267595 Mon Sep 17 00:00:00 2001 From: smi-leonivkovic Date: Thu, 3 Dec 2026 15:58:55 +0100 Subject: [PATCH 41/51] test(proraw): V18's curve stage leaves Whites to the ProRAW chain; V17 asserts allow a later default (#523) --- crates/pipeline/src/proraw.rs | 4 +++- crates/pipeline/src/tests_proraw.rs | 12 ++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/crates/pipeline/src/proraw.rs b/crates/pipeline/src/proraw.rs index ae7c2e848e5..07e34015565 100644 --- a/crates/pipeline/src/proraw.rs +++ b/crates/pipeline/src/proraw.rs @@ -919,7 +919,9 @@ mod tests { let tone = std::sync::Arc::new(curve(PRORAW_TONE_KNOTS, |x| x.powf(0.6))); let info = SourceInfo { raw: true, proraw: Some(tone), ..Default::default() }; let mut s = DevelopSettings::default(); - assert_eq!(s.process.process(), Process::V17); + assert!(s.process.process() >= Process::V17); + assert!(active(&s, &info).is_some(), "the latest process activates ProRAW"); + s.process = Process::V17.version(); assert!(active(&s, &info).is_some(), "V17 activates ProRAW"); s.process = Process::V16.version(); assert!(active(&s, &info).is_none(), "V16 keeps the camera-curve path"); diff --git a/crates/pipeline/src/tests_proraw.rs b/crates/pipeline/src/tests_proraw.rs index 31a57ad7c45..410d4fd543e 100644 --- a/crates/pipeline/src/tests_proraw.rs +++ b/crates/pipeline/src/tests_proraw.rs @@ -75,6 +75,18 @@ fn v17_renders_everything_else_as_v16() { } } +/// V18's curve stage leaves Whites to the ProRAW chain, which applies it itself: Whites alone renders a ProRAW +/// photo as on V17, where a second Whites would brighten it again. +#[test] +fn v18_leaves_proraw_whites_to_the_chain() { + let info = proraw_info(); + let mut s = DevelopSettings::for_raw(5200.0, 4.0); + controls::set(&mut s, "light.whites", 40.0); + let at = |p: Process| deep(&info, &DevelopSettings { process: p.version(), ..s.clone() }); + assert!(at(Process::V18) == at(Process::V17), "Whites applies once"); + assert!(at(Process::V17) != deep(&info, &DevelopSettings { process: Process::V17.version(), ..DevelopSettings::for_raw(5200.0, 4.0) })); +} + #[test] fn v17_keeps_checked_white_balance_and_v9_fallback() { let info = SourceInfo { as_shot_temp: 5500.0, as_shot_tint: 0.0, proraw: None, ..proraw_info() }; From 2722f9793831d6fd20223948b3aa3b59f718787d Mon Sep 17 00:00:00 2001 From: smi-leonivkovic Date: Thu, 3 Dec 2026 16:03:22 +0100 Subject: [PATCH 42/51] fix(curve_stage): Refine Saturation restores the colour after Whites (#523) With Whites alone Refine Saturation did nothing, but with a curve it pulled saturation back to the colour before Whites, so the same Whites setting gave different saturation. Lightroom's Refine Saturation belongs to the tone curve, after Whites, so the stage now keeps a Whites-only table when Refine Saturation is below 100 and restores towards the colour after it, on the CPU and the GPU. Test: refine_saturation_keeps_what_whites_did; curve_stage_matches covers the GPU path. --- crates/gpu/src/params.rs | 5 ++- crates/gpu/src/wgsl/finish.wgsl | 39 ++++++++++++++------- crates/pipeline/src/curve_stage.rs | 56 ++++++++++++++++++++++++------ docs/curve-stage.md | 7 ++-- 4 files changed, 82 insertions(+), 25 deletions(-) diff --git a/crates/gpu/src/params.rs b/crates/gpu/src/params.rs index fbc7eae413f..2b9db6179b4 100644 --- a/crates/gpu/src/params.rs +++ b/crates/gpu/src/params.rs @@ -26,6 +26,7 @@ const FIELDS: &[(&str, usize)] = &[ ("STAGE", 1), ("STAGE_OFF", 1), ("STAGE_REFINE", 1), + ("STAGE_WHITES", 1), ("GAIN", 1), ("EV", 1), ("AIR", 1), @@ -301,7 +302,8 @@ pub fn finish_block(fp: &FinishParams, masks: &[[f32; MASK_TERMS]], present: &Pr let curve_off = aux.len(); let stage_off = curve_off + fp.curves.as_ref().map_or(0, |c| c.len() * CURVE_N as usize); // process V18's stage (red, green, blue, then the base table) or the earlier processes' curves - let tables = fp.curves.iter().flatten().chain(fp.curve_stage.iter().flat_map(|c| c.chan.iter().chain([&c.base]))); + // (and Whites alone after the base table, when Refine Saturation needs it) + let tables = fp.curves.iter().flatten().chain(fp.curve_stage.iter().flat_map(|c| c.chan.iter().chain([&c.base]).chain(c.whites.iter()))); for l in tables { if l.v.len() != CURVE_N as usize { // a wrong-length curve would shift every later aux offset (CURVE_OFF, MASK_OFF and @@ -365,6 +367,7 @@ pub fn finish_block(fp: &FinishParams, masks: &[[f32; MASK_TERMS]], present: &Pr p.b("STAGE", fp.curve_stage.is_some()); p.u("STAGE_OFF", stage_off as u32); p.f("STAGE_REFINE", fp.curve_stage.as_ref().map_or(1.0, |c| c.refine)); + p.b("STAGE_WHITES", fp.curve_stage.as_ref().is_some_and(|c| c.whites.is_some())); p.f("REFINE_SAT", fp.refine_sat); p.f("GAIN", fp.gain); p.f("EV", fp.ev); diff --git a/crates/gpu/src/wgsl/finish.wgsl b/crates/gpu/src/wgsl/finish.wgsl index f42486b12c4..1798b11d355 100644 --- a/crates/gpu/src/wgsl/finish.wgsl +++ b/crates/gpu/src/wgsl/finish.wgsl @@ -137,6 +137,24 @@ fn stage_lut(o: u32, x: f32) -> f32 { // `CurveStage::apply`: the base table on the largest and smallest channel of sRGB-encoded linear ProPhoto, the // middle one keeping its place between them in linear light, then the red, green and blue curves per channel. +// `curve_stage::hue_preserving`: the table at `o` on the largest and smallest channel of `e`, the middle one keeping +// its place between them in linear light (`pc`). Linear, in [0, 1]. +fn stage_hue_preserving(o: u32, e: vec3, pc: vec3, hi: u32, lo: u32) -> vec3 { + let la = srgb_linear(stage_lut(o, e[hi])); + let lb = srgb_linear(stage_lut(o, e[lo])); + let pa = pc[hi]; + let pb = pc[lo]; + var out = vec3(0.0); + for (var k = 0u; k < 3u; k++) { + var t = 1.0; + if (pa > pb) { + t = (pc[k] - pb) / (pa - pb); + } + out[k] = clamp(lb + (la - lb) * t, 0.0, 1.0); + } + return out; +} + fn curve_stage(d: vec3) -> vec3 { let p = mul3(PRO_FROM_2020, d); var pc = clamp(p, vec3(0.0), vec3(1.0)); @@ -152,18 +170,10 @@ fn curve_stage(d: vec3) -> vec3 { } } let off = pu(F_STAGE_OFF); - let base = off + 3u * CURVE_N; - let la = srgb_linear(stage_lut(base, e[hi])); - let lb = srgb_linear(stage_lut(base, e[lo])); - let pa = pc[hi]; - let pb = pc[lo]; + let base = stage_hue_preserving(off + 3u * CURVE_N, e, pc, hi, lo); var curved = vec3(0.0); for (var k = 0u; k < 3u; k++) { - var t = 1.0; - if (pa > pb) { - t = (pc[k] - pb) / (pa - pb); - } - curved[k] = stage_lut(off + k * CURVE_N, srgb_exact(clamp(lb + (la - lb) * t, 0.0, 1.0))); + curved[k] = stage_lut(off + k * CURVE_N, srgb_exact(base[k])); } var q = vec3(0.0); for (var k = 0u; k < 3u; k++) { @@ -171,8 +181,13 @@ fn curve_stage(d: vec3) -> vec3 { } let rs = pf(F_STAGE_REFINE); if (rs < 1.0) { - // the saturation back towards the input's, at the curves' luminance - let rr = refine_saturation(e, curved, rs); + // the saturation back towards the input's after Whites, at the curves' luminance + var reference = e; + if (pu(F_STAGE_WHITES) != 0u) { + let w = stage_hue_preserving(off + 4u * CURVE_N, e, pc, hi, lo); + reference = vec3(srgb_exact(w.x), srgb_exact(w.y), srgb_exact(w.z)); + } + let rr = refine_saturation(reference, curved, rs); var r = vec3(0.0); for (var k = 0u; k < 3u; k++) { r[k] = srgb_linear(clamp(rr[k], 0.0, 1.0)); diff --git a/crates/pipeline/src/curve_stage.rs b/crates/pipeline/src/curve_stage.rs index e7de40c3450..44d983e3eb2 100644 --- a/crates/pipeline/src/curve_stage.rs +++ b/crates/pipeline/src/curve_stage.rs @@ -39,6 +39,9 @@ pub struct CurveStage { pub base: Lut1, /// Refine Saturation, 0..1, on what the curves did (1 when only Whites is set). pub refine: f32, + /// Whites alone, when Refine Saturation is below 1: the saturation it restores is the colour's after Whites, as + /// Lightroom's Refine Saturation belongs to the tone curve and Whites comes before it. + pub whites: Option, } /// A bump of peak 1 at `p / (p + q)`, 0 at black and white and outside them. @@ -250,7 +253,8 @@ impl CurveStage { }); let curves_on = parametric_on || master || chans.iter().any(|b| *b); let refine = if curves_on { (c.refine_saturation / 100.0).clamp(0.0, 1.0) as f32 } else { 1.0 }; - Some(CurveStage { chan, base, refine }) + let whites = w.filter(|_| refine < 1.0); + Some(CurveStage { chan, base, refine, whites }) } /// Linear Rec.2020 in and out (display referred, after the tone map). @@ -272,18 +276,17 @@ impl CurveStage { lo = k; } } - // the base curve on the largest and smallest channel; the middle one keeps its place in linear light - let (la, lb) = (srgb_to_linear(self.base.eval(e[hi])), srgb_to_linear(self.base.eval(e[lo]))); - let (pa, pb) = (pc[hi], pc[lo]); - let curved: [f32; 3] = std::array::from_fn(|k| { - let t = if pa > pb { (pc[k] - pb) / (pa - pb) } else { 1.0 }; - self.chan[k].eval(linear_to_srgb((lb + (la - lb) * t).clamp(0.0, 1.0))) - }); + let base = hue_preserving(&self.base, e, pc, hi, lo); + let curved: [f32; 3] = std::array::from_fn(|k| self.chan[k].eval(linear_to_srgb(base[k]))); let lin = |v: [f32; 3]| v.map(|x| srgb_to_linear(x.clamp(0.0, 1.0))); let mut q = lin(curved); if self.refine < 1.0 { - // the saturation back towards the input's, at the curves' luminance - let r = lin(crate::finish::refine_saturation(e, curved, self.refine)); + // the saturation back towards the input's after Whites, at the curves' luminance + let reference = match &self.whites { + Some(w) => hue_preserving(w, e, pc, hi, lo).map(linear_to_srgb), + None => e, + }; + let r = lin(crate::finish::refine_saturation(reference, curved, self.refine)); let y = |v: [f32; 3]| PRO_Y[0] * v[0] + PRO_Y[1] * v[1] + PRO_Y[2] * v[2]; let (yq, yr) = (y(q), y(r)); q = if yr > 1e-6 { r.map(|v| v * yq / yr) } else { r }; @@ -297,6 +300,17 @@ impl CurveStage { } } +/// `table` on the largest and smallest channel of the encoded colour `e` (`pc` in linear light, `hi` and `lo` its +/// largest and smallest channel); the middle one keeps its place between them in linear light. Linear, in [0, 1]. +fn hue_preserving(table: &Lut1, e: [f32; 3], pc: [f32; 3], hi: usize, lo: usize) -> [f32; 3] { + let (la, lb) = (srgb_to_linear(table.eval(e[hi])), srgb_to_linear(table.eval(e[lo]))); + let (pa, pb) = (pc[hi], pc[lo]); + std::array::from_fn(|k| { + let t = if pa > pb { (pc[k] - pb) / (pa - pb) } else { 1.0 }; + (lb + (la - lb) * t).clamp(0.0, 1.0) + }) +} + /// Linear Rec.2020 to linear ProPhoto and back, built once. fn matrices() -> &'static ([[f32; 3]; 3], [[f32; 3]; 3]) { static M: std::sync::OnceLock<([[f32; 3]; 3], [[f32; 3]; 3])> = std::sync::OnceLock::new(); @@ -441,6 +455,28 @@ mod tests { assert!(!ParametricGraph::new(&v17).is_fitted()); } + /// Refine Saturation restores the colour after Whites, not before it: at 0, a curve on top of Whites leaves the + /// saturation Whites gives a colour, as Whites alone does (review on #4099). + #[test] + fn refine_saturation_keeps_what_whites_did() { + let sat = |d: [f32; 3]| { + let p = mul3(&matrices().0, d); + let (hi, lo) = (p[0].max(p[1]).max(p[2]), p[0].min(p[1]).min(p[2])); + (hi - lo) / hi + }; + let colour = mul3(&matrices().1, [0.9, 0.6, 0.3]); + let mut s = v18(); + s.light.whites = 80.0; + let alone = CurveStage::new(&s).expect("Whites").apply(colour); + s.curve.master = vec![Point { x: 0.0, y: 0.0 }, Point { x: 0.5, y: 0.56 }, Point { x: 1.0, y: 1.0 }]; + s.curve.refine_saturation = 0.0; + let refined = CurveStage::new(&s).expect("Whites and a curve").apply(colour); + let whites_did = (sat(alone) - sat(colour)).abs(); + assert!(whites_did > 0.05, "Whites changes the saturation: {} vs {}", sat(alone), sat(colour)); + // close to Whites alone, not pulled back towards the colour before Whites + assert!((sat(refined) - sat(alone)).abs() < 0.3 * whites_did, "refined {} vs Whites alone {}", sat(refined), sat(alone)); + } + /// In every region, the amount a drag picks moves the drawn curve by the drag's motion. #[test] fn a_graph_drag_puts_the_fitted_curve_where_the_hand_is() { diff --git a/docs/curve-stage.md b/docs/curve-stage.md index 0fa6cdd39a3..bae39227000 100644 --- a/docs/curve-stage.md +++ b/docs/curve-stage.md @@ -33,8 +33,10 @@ After the tone map and V4's calibrated Contrast and Blacks, before the colour st 3. Apply the base table to the largest and smallest channel. The middle channel keeps its relative position between them in linear light. 4. Apply the red, green and blue point curves to each channel. -5. Refine Saturation (below 100) moves saturation back towards the input's, as in V17, and then rescales to the - curves' linear luminance, so the tone change stays. +5. Refine Saturation (below 100) moves saturation back towards the colour after Whites, and then rescales to the + curves' linear luminance, so the tone change stays. In Lightroom it belongs to the tone curve, and Whites comes + before it, so Whites keeps its saturation change whether a curve is set or not (V17 and earlier refine on encoded + output, where there is no Whites). 6. Values above SDR white (an HDR render) continue with slope 1. The tone map no longer applies Whites under V18 (`finish::base_tone`), and the V17 output-curve tables are not built @@ -111,3 +113,4 @@ predicted from the grey-step curves under the hue-preserving rule in step 3. The | 2026-12-02 | patch | Renumbered from V9 to V17, on top of V16: main retired 9 | | 2026-11-24 | minor | Whites and the regions are a fitted model instead of measured tables | | 2026-12-03 | patch | Renumbered from V17 to V18, on top of V17: main took 17 for Apple ProRAW (#4196) | +| 2026-12-03 | patch | Refine Saturation restores the colour after Whites, so Whites alone and Whites with a curve agree (review on #4099) | From 5a58233158f51ca335b495e86b6ecf38b5900d7c Mon Sep 17 00:00:00 2001 From: smi-leonivkovic Date: Thu, 3 Dec 2026 16:13:51 +0100 Subject: [PATCH 43/51] fix(curve_input): under V18 sample where the curve stage reads (#523) The V18 curves act on sRGB-encoded linear ProPhoto right after the tone map, but the curve editor's input histogram was taken after the colour tools, gamut mapping and output encoding. Under V18 the sample is now taken right after the stage built from the curve's predecessors, in its domain, with headroom kept above 1. The output-domain tests name V17, where that domain still holds. Test: v18_samples_where_the_curve_stage_reads_not_after_the_colour_tools. --- crates/pipeline/src/curve_input.rs | 5 ++++- crates/pipeline/src/curve_input_tests.rs | 25 +++++++++++++++++++++--- crates/pipeline/src/finish.rs | 11 +++++++++++ 3 files changed, 37 insertions(+), 4 deletions(-) diff --git a/crates/pipeline/src/curve_input.rs b/crates/pipeline/src/curve_input.rs index 400740d9014..a846f184b2a 100644 --- a/crates/pipeline/src/curve_input.rs +++ b/crates/pipeline/src/curve_input.rs @@ -111,6 +111,8 @@ pub(crate) fn finish( let predecessors = DevelopSettings { curve: input.predecessors(&settings.curve), ..settings.clone() }; fp.curves = if settings.process.process() < Process::V18 { crate::finish::curve_luts(&predecessors.curve) } else { None }; fp.curve_stage = crate::curve_stage::CurveStage::new(&predecessors); + // V18's curves read sRGB-encoded linear ProPhoto after the tone map: sample there, not after the colour tools + fp.sample_at_curve_stage = settings.process.process() >= Process::V18; fp.refine_sat = 1.0; // the samples, and the 8-bit pixels as `finish` dithers them at the same place in the output let samples = crate::finish::finish_with(p, &fp, false, true, |x, y, e| { @@ -118,7 +120,8 @@ pub(crate) fn finish( (e, [crate::finish::enc(e[0], d), crate::finish::enc(e[1], d), crate::finish::enc(e[2], d), 255]) }); let (samples, data): (Vec<[f32; 3]>, Vec<[u8; 4]>) = samples.into_iter().unzip(); - let histogram = of_encoded(&samples, fp.out_luma); + let weights = if fp.sample_at_curve_stage { crate::light_v3::PRO_Y } else { fp.out_luma }; + let histogram = of_encoded(&samples, weights); let image = Rgba8 { width: w, height: h, data }; Rendered { image, histogram, deep: None } } diff --git a/crates/pipeline/src/curve_input_tests.rs b/crates/pipeline/src/curve_input_tests.rs index 5426374ccf1..5b50dbb923e 100644 --- a/crates/pipeline/src/curve_input_tests.rs +++ b/crates/pipeline/src/curve_input_tests.rs @@ -55,9 +55,11 @@ fn input_follows_exposure_but_not_its_own_curve_or_later_curves() { assert_ne!(a.image, b.image); } +/// Up to V17 the curves act on the encoded output, so a curve's input is the output of its predecessors. (V18: +/// `v18_samples_where_the_curve_stage_reads_not_after_the_colour_tools`.) #[test] fn each_curve_sees_exactly_its_predecessors_including_profile_contributions() { - let mut s = DevelopSettings::default(); + let mut s = DevelopSettings { process: lightcraft_develop::Process::V17.version(), ..DevelopSettings::default() }; s.profile.id = "lc.film.golden-hour".into(); s.curve.shadows = 45.0; s.curve.master = bent(); @@ -171,7 +173,8 @@ fn diagnostic_and_normal_renders_share_spatial_cache_without_changing_pixels() { fn input_uses_the_display_primaries_and_effective_edit() { let src = source(); let info = SourceInfo::default(); - let mut s = DevelopSettings::default(); + // up to V17 the curves act on the encoded output, in the display's primaries (V18's read ProPhoto) + let mut s = DevelopSettings { process: lightcraft_develop::Process::V17.version(), ..DevelopSettings::default() }; s.light.exposure = 1.0; s.curve.lights = 55.0; s.curve.master = bent(); @@ -181,7 +184,7 @@ fn input_uses_the_display_primaries_and_effective_edit() { let mut effective = s.effective().into_owned(); effective.curve = CurveInput::Red.predecessors(&effective.curve); assert_eq!(disabled.image, crate::render(&src, &info, &effective, &req).image); - let mut previous = DevelopSettings::default(); + let mut previous = DevelopSettings { process: lightcraft_develop::Process::V17.version(), ..DevelopSettings::default() }; previous.curve.lights = 45.0; let srgb = render(&src, &info, &previous, &req, None, CurveInput::Red).unwrap(); for space in [OutputSpace::DisplayP3, OutputSpace::Rec2020] { @@ -220,3 +223,19 @@ fn an_over_budget_brush_mask_fails_the_sample_instead_of_dropping_strokes() { s.masks.push(brush(vec![stroke(0.2, 0.6)])); assert!(render(&source(), &SourceInfo::default(), &s, &full_size, None, CurveInput::Master).is_ok()); } + +/// Under V18 the curves read the colour where the curve stage runs, after the tone map and before the colour tools: +/// Saturation, which comes after them, leaves every curve's input alone; on V17 it is part of it (review on #4076). +#[test] +fn v18_samples_where_the_curve_stage_reads_not_after_the_colour_tools() { + use lightcraft_develop::Process; + for ch in [CurveInput::Parametric, CurveInput::Master, CurveInput::Red] { + let on = |p: Process, saturation: f64| { + let mut s = DevelopSettings { process: p.version(), ..DevelopSettings::default() }; + s.color.saturation = saturation; + sample(&s, ch).histogram + }; + assert_eq!(on(Process::V18, -100.0), on(Process::V18, 0.0), "V18 {ch:?}: Saturation is after the curves"); + assert_ne!(on(Process::V17, -100.0), on(Process::V17, 0.0), "V17 {ch:?}: the curves read the encoded output"); + } +} diff --git a/crates/pipeline/src/finish.rs b/crates/pipeline/src/finish.rs index fc43dcb741e..3491a41e19f 100644 --- a/crates/pipeline/src/finish.rs +++ b/crates/pipeline/src/finish.rs @@ -275,6 +275,9 @@ pub struct FinishParams { pub curves: Option<[Lut1; 3]>, /// Process V18's Whites and tone curves (they replace `curves`, which stays `None` from V18 on). pub curve_stage: Option, + /// A curve-input sample ([`crate::curve_input`]) under V18 is taken where the curve stage reads: right after it, as + /// sRGB-encoded linear ProPhoto, before the colour tools and the output. + pub sample_at_curve_stage: bool, /// Refine Saturation as 0..1 (1 = the curves' own saturation). pub refine_sat: f32, pub vig: Option, @@ -368,6 +371,7 @@ impl FinishParams { ops: ColorOps::new(s), curves: if s.process.process() < Process::V18 { curve_luts(&s.curve) } else { None }, // Apple ProRAW's chain applies Whites itself (`crate::proraw`), so its curve stage keeps only the curves + sample_at_curve_stage: false, curve_stage: match &proraw { Some(_) => { let mut no_whites = s.clone(); @@ -608,6 +612,7 @@ pub(crate) fn finish_with( let preview_light = if exact { None } else { light.as_ref().and_then(|lo| crate::light_v3::PreviewOps::new(lo, &|v| encode_srgb(srgb, v))) }; let peak = fp.peak; let hdr = peak > 1.0; + let to_pro = crate::light_v3::prophoto_matrices().0; let mut out = vec![T::default(); w * h]; // the vignette splits into a column term and a row term, so each is computed once let vig_fall = vig.as_ref().map(|v| VigFalloff::new(v, aspect)); @@ -653,6 +658,12 @@ pub(crate) fn finish_with( // --- process V18: Whites and the tone curves, hue-preserving d = fp.curve_stage.as_ref().map_or(d, |stage| stage.apply(d)); + if stop_after_curves && fp.sample_at_curve_stage { + let pro = mul3(&to_pro, d); + // (above SDR white stays above 1, beyond the curve's axes, as on the output path) + *px = store(vx_u + x, vy_u + y, pro.map(|v| linear_to_srgb(v.max(0.0)))); + continue; + } // --- colour d = fp.ops.apply(d, l_sat, l_hue); From de0c5a8dc332d53073530fed7e180e7b7ed52e71 Mon Sep 17 00:00:00 2001 From: smi-leonivkovic Date: Thu, 3 Dec 2026 16:14:18 +0100 Subject: [PATCH 44/51] fix(tools): the tone charts' manifest carries the tool's prefix and fit can read it from the chart folder (#523) fit read manifest.json from RENDER_DIR while charts wrote it to OUT_DIR, and a second chart tool in the same folder overwrote it. charts now writes curve__manifest.json, as its DNGs are named, and fit takes an optional CHART_DIR. --- docs/curve-stage.md | 3 ++- tools/lr_tone_charts.py | 19 ++++++++++--------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/docs/curve-stage.md b/docs/curve-stage.md index bae39227000..4f679b508c9 100644 --- a/docs/curve-stage.md +++ b/docs/curve-stage.md @@ -72,7 +72,8 @@ Whites is not part of the graph, as in Lightroom. patches, with the settings in the DNG's XMP. It writes one neutral chart, Whites at each measured amount, and each parametric region at each measured amount. The charts are original test data. Every chart was rendered through Camera Raw to a 16-bit Adobe RGB (1998) TIFF. Only that output is measured, and nothing of Adobe's is copied or -shipped, and no measurement is committed. `tools/lr_tone_charts.py fit RENDER_DIR OUT_RS` reads the grey steps of +shipped, and no measurement is committed. `tools/lr_tone_charts.py fit RENDER_DIR OUT_RS [CHART_DIR]` takes the charts' `curve__manifest.json` from CHART_DIR +(RENDER_DIR when the renders sit beside the charts), reads the grey steps of each render as sRGB-encoded linear ProPhoto values, fits the model to them and writes only its constants, `curve_stage_model.rs`. It needs numpy, scipy and tifffile (`tools/requirements-lr-tone-charts.txt`). Running the tool again reproduces the committed charts byte for byte, and the constants with the pinned packages. diff --git a/tools/lr_tone_charts.py b/tools/lr_tone_charts.py index 3fb4fbf7716..4526334ba1e 100644 --- a/tools/lr_tone_charts.py +++ b/tools/lr_tone_charts.py @@ -1,12 +1,12 @@ #!/usr/bin/env python3 -"""Measure Lightroom's Whites and parametric curve on synthetic grey steps (process V9, docs/curve-stage.md). +"""Measure Lightroom's Whites and parametric curve on synthetic grey steps (process V18, docs/curve-stage.md). python3 tools/lr_tone_charts.py charts OUT_DIR Writes linear DNG charts (48 grey steps plus colour patches) with the settings embedded as XMP: one neutral chart, Whites at +-25/50/100 and each parametric region at +-25/50/75/100 (default splits). (render every DNG through Camera Raw to a 16-bit Adobe RGB (1998) TIFF with the same file name) - python3 tools/lr_tone_charts.py fit RENDER_DIR OUT_RS - Reads the renders, fits LightCraft's model of each setting to them and writes the model's constants + python3 tools/lr_tone_charts.py fit RENDER_DIR OUT_RS [CHART_DIR] + Reads the renders (and the charts' `curve__manifest.json` from CHART_DIR, by default RENDER_DIR), fits LightCraft's model of each setting to them and writes the model's constants (`lightcraft_pipeline::curve_stage_model`). The measurements themselves are not written out. The charts are original test data generated here; nothing in them comes from Adobe. Only Camera Raw's output is @@ -236,9 +236,10 @@ def residual(params): return best.x, float(np.sqrt((e ** 2).mean())), float(np.abs(e).max()) -def fit(render_dir, out_rs): +def fit(render_dir, out_rs, chart_dir=None): """Fit the model to the Camera Raw renders in `render_dir` and write its constants to `out_rs`.""" - patches = json.load(open(os.path.join(render_dir, "manifest.json")))["patches"] + # the manifest carries the tool's prefix, as its charts do, so another chart tool's in the same folder is left alone + patches = json.load(open(os.path.join(chart_dir or render_dir, "curve__manifest.json")))["patches"] tif = lambda n: os.path.join(render_dir, f"curve__{n}.tif") n0 = grey_levels(tif("neutral"), patches) rows = lambda names: [delta_table(n0, grey_levels(tif(n), patches)) for n in names] @@ -277,16 +278,16 @@ def fit(render_dir, out_rs): def main(): - """Command line: `charts OUT_DIR` or `fit RENDER_DIR OUT_RS`.""" + """Command line: `charts OUT_DIR` or `fit RENDER_DIR OUT_RS [CHART_DIR]`.""" if len(sys.argv) == 3 and sys.argv[1] == "charts": out = sys.argv[2] os.makedirs(out, exist_ok=True) img, patches = chart() - json.dump(dict(patches=patches), open(os.path.join(out, "manifest.json"), "w")) + json.dump(dict(patches=patches), open(os.path.join(out, "curve__manifest.json"), "w")) for name, settings in variants().items(): write_dng(os.path.join(out, f"curve__{name}.dng"), img, xmp(**settings)) - elif len(sys.argv) == 4 and sys.argv[1] == "fit": - fit(sys.argv[2], sys.argv[3]) + elif len(sys.argv) in (4, 5) and sys.argv[1] == "fit": + fit(*sys.argv[2:]) else: sys.exit(__doc__) From 023c93c0e03f4a77eaa41d6c54c05195ded8ad63 Mon Sep 17 00:00:00 2001 From: smi-leonivkovic Date: Thu, 3 Dec 2026 16:46:11 +0100 Subject: [PATCH 45/51] test(gpu): the curve-input prefix test names V17, where the sample is the predecessors' output (#523) --- crates/gpu/tests/it/equivalence.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/gpu/tests/it/equivalence.rs b/crates/gpu/tests/it/equivalence.rs index 4ae1b6a2883..2aade0e3e05 100644 --- a/crates/gpu/tests/it/equivalence.rs +++ b/crates/gpu/tests/it/equivalence.rs @@ -233,7 +233,9 @@ fn curve_input_matches_the_gpu_prefix_and_keeps_later_operations_out() { let v = 0.01 + x as f32 / 500.0; [v, v * (0.25 + y as f32 / 100.0), v * 0.4] })); - let mut s = DevelopSettings::default(); + // up to V17 the curves act on the encoded output, so a curve's input is the output of its predecessors; V18 samples + // where its curve stage reads (`lightcraft_pipeline` `v18_samples_where_the_curve_stage_reads_not_after_the_colour_tools`) + let mut s = DevelopSettings { process: Process::V17.version(), ..DevelopSettings::default() }; s.light.exposure = 0.5; s.curve.shadows = 45.0; s.curve.master = vec![Point::new(0.0, 0.04), Point::new(0.25, 0.65), Point::new(1.0, 0.95)]; From f9caf1d0d922a3a6ddb5df2c1974e5a23ae79ccd Mon Sep 17 00:00:00 2001 From: smi-leonivkovic Date: Thu, 3 Dec 2026 16:46:30 +0100 Subject: [PATCH 46/51] fix(local_tone): drop the import apply_framed needed; main's apply_in replaced it (#523) --- crates/pipeline/src/local_tone.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/crates/pipeline/src/local_tone.rs b/crates/pipeline/src/local_tone.rs index 7cbf3b9a706..9771ae9718a 100644 --- a/crates/pipeline/src/local_tone.rs +++ b/crates/pipeline/src/local_tone.rs @@ -5,7 +5,6 @@ use lightcraft_geom::Point; use lightcraft_raster::Rgb32f; use lightcraft_raw::gaintable::{GainTableMap, SourcePlacement}; -use crate::geometry::Frame; use crate::{Plan, SourceInfo}; /// A raw's gain table map and where its developed source sits in the active area. From a8872ab7242dc1df10d9b385d8a759afebfd3ad0 Mon Sep 17 00:00:00 2001 From: smi-leonivkovic Date: Thu, 3 Dec 2026 17:49:00 +0100 Subject: [PATCH 47/51] fix(curve_input): on ProRAW the sample's curve stage leaves Whites to the chain, as the render's does; docs say V4 to V17 keep V2 Whites (#523) curve_input rebuilt the curve stage from the predecessors with Whites in it, so on Apple ProRAW under V18 the editor's input histogram applied Whites twice. Both now build it with finish::curve_stage_for. Test: proraw_curve_input_applies_whites_once. Gaps, parity-checklist and process-versions no longer call Whites a pending follow-up and name the ProRAW exception (review on #4076). --- crates/pipeline/src/curve_input.rs | 2 +- crates/pipeline/src/curve_input_tests.rs | 17 +++++++++++++++++ crates/pipeline/src/finish.rs | 23 ++++++++++++++--------- docs/gaps.md | 2 +- docs/parity-checklist.md | 4 ++-- docs/process-versions.md | 2 +- 6 files changed, 36 insertions(+), 14 deletions(-) diff --git a/crates/pipeline/src/curve_input.rs b/crates/pipeline/src/curve_input.rs index a846f184b2a..134184a7c46 100644 --- a/crates/pipeline/src/curve_input.rs +++ b/crates/pipeline/src/curve_input.rs @@ -110,7 +110,7 @@ pub(crate) fn finish( // only the predecessors, wherever the process applies its curves (encoded output, or V18's curve stage) let predecessors = DevelopSettings { curve: input.predecessors(&settings.curve), ..settings.clone() }; fp.curves = if settings.process.process() < Process::V18 { crate::finish::curve_luts(&predecessors.curve) } else { None }; - fp.curve_stage = crate::curve_stage::CurveStage::new(&predecessors); + fp.curve_stage = crate::finish::curve_stage_for(&predecessors, fp.proraw.is_some()); // V18's curves read sRGB-encoded linear ProPhoto after the tone map: sample there, not after the colour tools fp.sample_at_curve_stage = settings.process.process() >= Process::V18; fp.refine_sat = 1.0; diff --git a/crates/pipeline/src/curve_input_tests.rs b/crates/pipeline/src/curve_input_tests.rs index 5b50dbb923e..f0c1caba7a0 100644 --- a/crates/pipeline/src/curve_input_tests.rs +++ b/crates/pipeline/src/curve_input_tests.rs @@ -239,3 +239,20 @@ fn v18_samples_where_the_curve_stage_reads_not_after_the_colour_tools() { assert_ne!(on(Process::V17, -100.0), on(Process::V17, 0.0), "V17 {ch:?}: the curves read the encoded output"); } } + +/// On Apple ProRAW the chain applies Whites, so the curve stage the sample is built with leaves it out, as the render's +/// does: Whites alone gives no stage, a curve a stage of its own (review on #4076). +#[test] +fn proraw_curve_input_applies_whites_once() { + use lightcraft_develop::Process; + let mut s = DevelopSettings { process: Process::V18.version(), ..DevelopSettings::default() }; + s.light.whites = 40.0; + assert!(crate::finish::curve_stage_for(&s, false).is_some(), "elsewhere the stage applies Whites"); + assert!(crate::finish::curve_stage_for(&s, true).is_none(), "on ProRAW the chain does"); + s.curve.master = bent(); + let with_curve = crate::finish::curve_stage_for(&s, true).expect("the curve"); + let mut alone = s.clone(); + alone.light.whites = 0.0; + let curve_only = crate::finish::curve_stage_for(&alone, false).expect("the curve"); + assert_eq!(with_curve.base.v, curve_only.base.v, "the ProRAW stage is the curve without Whites"); +} diff --git a/crates/pipeline/src/finish.rs b/crates/pipeline/src/finish.rs index 3491a41e19f..dca1fdf0d2c 100644 --- a/crates/pipeline/src/finish.rs +++ b/crates/pipeline/src/finish.rs @@ -370,16 +370,8 @@ impl FinishParams { lut: crate::lut::get(&s.profile.id).map(|l| (l, (s.profile.amount / 100.0).clamp(0.0, 2.0) as f32)), ops: ColorOps::new(s), curves: if s.process.process() < Process::V18 { curve_luts(&s.curve) } else { None }, - // Apple ProRAW's chain applies Whites itself (`crate::proraw`), so its curve stage keeps only the curves sample_at_curve_stage: false, - curve_stage: match &proraw { - Some(_) => { - let mut no_whites = s.clone(); - no_whites.light.whites = 0.0; - crate::curve_stage::CurveStage::new(&no_whites) - } - None => crate::curve_stage::CurveStage::new(s), - }, + curve_stage: curve_stage_for(s, proraw.is_some()), refine_sat: (s.curve.refine_saturation / 100.0).clamp(0.0, 1.0) as f32, vig: if effects { vignette(s) } else { None }, to_out: space.from_working(), @@ -515,6 +507,19 @@ pub fn base_tone(s: &DevelopSettings, info: &SourceInfo, peak: f32) -> ToneMap { } } +/// The curve stage of `s` ([`crate::curve_stage`]). Apple ProRAW's chain applies Whites itself (`crate::proraw`), so +/// on ProRAW (`proraw`) the stage keeps only the curves. The render and the curve editor's input sample +/// ([`crate::curve_input`]) both build it here, so Whites applies once in each. +pub(crate) fn curve_stage_for(s: &DevelopSettings, proraw: bool) -> Option { + if proraw && s.light.whites != 0.0 { + let mut no_whites = s.clone(); + no_whites.light.whites = 0.0; + crate::curve_stage::CurveStage::new(&no_whites) + } else { + crate::curve_stage::CurveStage::new(s) + } +} + /// Finish the prepared pipeline stages into an 8-bit RGBA image in `space` (or `display`). pub(crate) fn finish(p: &Prepared, s: &DevelopSettings, frame: &Frame, info: &SourceInfo, req: &crate::RenderRequest) -> Rgba8 { let (space, display, proof) = (req.space, req.display.as_ref(), req.proof); diff --git a/docs/gaps.md b/docs/gaps.md index e66efd85c1b..4691d3e25a9 100644 --- a/docs/gaps.md +++ b/docs/gaps.md @@ -17,7 +17,7 @@ Hours are Opus 5.5 agent wall-clock hours (see [target-app-parity.md](target-app |---:|---|---|---|---:|---| | 1 B | **Camera colour is estimated, not measured** (LR-PROF-CAMERACOLOR). Raws start from a per-file fit to the camera JPEG, 10 bundled profiles, 52 spectral matrices (plus same-sensor bodies, e.g. the X-T30 through the X-T3) or chart-measured matrices (the EOS D60); others use a neutral matrix (a black-and-white camera JPEG gives its tone curve only, #577; dark JPEG tones also guide the toe, #1307) | Ξ”E vs camera JPEG 2.9–10 after fitting (raw-parity.md); 1 chart-calibrated model (EOS D60: its Kelvin scale and fallback colour, the look stays the JPEG fit) vs 1,500 Adobe Standard profiles | every raw shooter sees colour that is close but not Lightroom's; some get neutral-matrix colour | 50–90 | [raw-parity](raw-parity.md#colour) | | 2 B | **CR3 variants no public file uses** (LR-IMP-FORMATS): `crx.rs` refuses vertical-tile C-RAW, partial-subband and other plane coding, multi-tile 0x200 and adaptive low-frequency gains, and those files fall back to the preview. All 110 CC0 CR3s on raw.pixls.us (31 folders) decode from sensor data, so none of these variants has a public sample; 26 CR3 bodies are verified (M50 / R100 / R8 exact, R5 Mark II pinned, 22 more pinned on one CC0 file each and checked against the camera JPEG, [cr3.md](cr3.md#further-bodies-one-cc0-file-each)). HEIF stills are `.HIF` files, not CR3; no CR3 sRAW / mRAW sample exists | measured: Canon's share whose camera fully works 73% β†’ 94% (raw-parity.md); 18 of 22 popular Canon bodies write CR3, all 18 now verified | +0.3 points of photographers; the variants surface only as user files that open as a preview | 10–25 | [raw-parity](raw-parity.md#remaining-work-ranked-by-photographers-unlocked-per-hour) | -| 3 B | **Render fidelity partial** (LR-BEHAV-RENDER-FIDELITY): calibrated camera-look Contrast and Blacks; other operators need measurement; from process V5 raw tone curves roll off into white in stops, so Exposure keeps recorded highlights (#1632); from process V17 Apple ProRAW takes Lightroom's fitted tone chain; from V18 Whites and the parametric curve at its default splits are measured against Camera Raw, and the point curves (still LightCraft's spline) apply hue preserving as Lightroom's do ([curve-stage.md](curve-stage.md)) | process V3 reduces held-out response error from 0.136 to 0.038 stops for Contrast and 0.424 to 0.077 for Blacks on one Sony camera; Whites remains V2 pending a follow-up | imported Lightroom edits still differ, especially on uncalibrated operators and cameras | 30–60 | [calibrated Light operators](light-v3.md), [process versions](process-versions.md) | +| 3 B | **Render fidelity partial** (LR-BEHAV-RENDER-FIDELITY): calibrated camera-look Contrast and Blacks; other operators need measurement; from process V5 raw tone curves roll off into white in stops, so Exposure keeps recorded highlights (#1632); from process V17 Apple ProRAW takes Lightroom's fitted tone chain; from V18 Whites and the parametric curve at its default splits are measured against Camera Raw, and the point curves (still LightCraft's spline) apply hue preserving as Lightroom's do ([curve-stage.md](curve-stage.md)) | process V3 reduces held-out response error from 0.136 to 0.038 stops for Contrast and 0.424 to 0.077 for Blacks on one Sony camera; V4 to V17 keep V2 Whites; V18's Whites is fitted to Camera Raw's grey-step charts, not yet checked on photos per camera | imported Lightroom edits still differ, especially on uncalibrated operators and cameras | 30–60 | [calibrated Light operators](light-v3.md), [process versions](process-versions.md) | | 4 | ~~Original-pixel detail at 100%~~ (LR-VIEW-ZOOM): closed 2026-10-12, see Closed recently | checklist row βœ… | β€” | 0 | [ui-parity](ui-parity.md) | | 5 B | **AI masks: Subject, Sky, People, Background, Landscape** are heuristics; Object / Describe run SAM 3 but its download has no mirror configured | `crates/segment`; ai-masks.md; MASK rows 67% | masking is how most Lightroom users edit today | 40–70 + model decision | [target-app-parity](target-app-parity.md#ai) | | 6 | **Compressed ORF** (support withdrawn) | #3775 decoder removed pending provenance review; uncompressed support remains | compressed files use embedded JPEG previews when available, not sensor data | pending review | [orf-compression](orf-compression.md) | diff --git a/docs/parity-checklist.md b/docs/parity-checklist.md index ceac64a8484..579f433283d 100644 --- a/docs/parity-checklist.md +++ b/docs/parity-checklist.md @@ -188,7 +188,7 @@ differences and missing bindings are in [ui-parity.md](ui-parity.md#shortcuts). | LR-EDIT-LIGHT-CONTRAST | Contrast | P0 | 🟑 | `ctl:light.contrast` | From process V4, global Contrast on the camera-look path is fitted per channel in ProPhoto with the sRGB transfer. Check response error 0.136 to 0.038 stops on six held-out Sony photos. Other sources and local adjustments retain V2; broader parity remains unverified (`docs/light-v3.md`). | | LR-EDIT-LIGHT-HIGHLIGHTS | Highlights | P0 | βœ… | `ctl:light.highlights`, `crates/raw/src/highlight.rs` | sensor-clipped highlights stay neutral when Highlights (or Exposure, Whites) darkens them: fully clipped content is rebuilt to the neutral of the colour model applied after it, partly clipped content takes its colour from reliable unclipped content nearby (not from dark objects, lens fringes or another surface beside it) and white where there is none, and pale partly clipped content (a white sky) turns white on its way to clipping (#523); binned previews and thumbnails decide clipping per sample before averaging (`develop_binned_masked`, `highlight::reconstruct_masked`), so a block with one clipped specular sample keeps its mean instead of jumping to the clip level, which reconstruction turned into green speckles at 500 px (#548) From process V2 the Highlights/Shadows base is the edge-aware filter of the 0.15 %-of-long-edge median of log luminance: twigs and fine texture take their surroundings' shift, so bright areas keep their local contrast as with Exposure (V1's base kept ~0.6 of it at βˆ’100, #632); region edges stay sharp; from process V8 (`local::detail_free`: clamped between the median at that radius and one 3Γ— wider) lettering keeps clean gaps (the median alone turned them into blocks of the letters' tone). Alt/Option-drag shows highlight clipping | | LR-EDIT-LIGHT-SHADOWS | Shadows | P0 | βœ… | `ctl:light.shadows` | From process V2, the same base as Highlights: dark areas keep their local contrast when lifted (#632); from process V8, the gaps in dark lettering on a bright panel are not lifted into bright blocks. Alt/Option-drag shows shadow clipping (white, clipped channels in colour). From process V13 the global amount eases off as it grows: the operator's strength is `a / (1 + 1.33Β·abs(a))` for `a` = slider / 100 (0.43 at +100, against 1 up to V10), fitted to Lightroom exports (#523). | -| LR-EDIT-LIGHT-WHITES | Whites | P0 | 🟑 | `ctl:light.whites`, `crates/pipeline/src/visualize.rs` | From process V18 Whites is measured against Camera Raw renders of synthetic grey steps and reaches into the midtones as Lightroom's does ([curve-stage.md](curve-stage.md)); not yet compared on photos per camera. V4 to V17 preserve V2 Whites for both signs; measured V2 check response error is 0.075 stops on the Sony test photos (`docs/light-v3.md`). Alt/Option-drag shows highlight clipping (black, clipped channels in colour) | +| LR-EDIT-LIGHT-WHITES | Whites | P0 | 🟑 | `ctl:light.whites`, `crates/pipeline/src/visualize.rs` | From process V18 Whites is measured against Camera Raw renders of synthetic grey steps and reaches into the midtones as Lightroom's does ([curve-stage.md](curve-stage.md)); not yet compared on photos per camera. V4 to V17 preserve V2 Whites for both signs, and Apple ProRAW keeps Whites in V17's chain under V18 too; measured V2 check response error is 0.075 stops on the Sony test photos (`docs/light-v3.md`). Alt/Option-drag shows highlight clipping (black, clipped channels in colour) | | LR-EDIT-LIGHT-BLACKS | Blacks | P0 | 🟑 | `ctl:light.blacks`, `crates/pipeline/src/visualize.rs` | From process V4, global Blacks on the camera-look path uses a fitted per-channel/luminance mix. Check response error 0.424 to 0.077 stops on six held-out Sony photos; deepest tones still differ. Other sources and local adjustments retain V2 (`docs/light-v3.md`). Alt/Option-drag shows shadow clipping (white, clipped channels in colour) | | LR-EDIT-LIGHT-CURVE-PARAM | Parametric curve | P0 | βœ… | `ctl:curve.highlights`, `ctl:curve.lights`, `ctl:curve.darks`, `ctl:curve.shadows`, `ctl:curve.split*`, `crates/pipeline/src/curve.rs` | from process V18 the regions are LightCraft's model fitted to Camera Raw's measured response at the default splits, broad and additive ([curve-stage.md](curve-stage.md)); the graph draws the curve the photo renders (`ParametricGraph`: the fitted regions under V18 at the default splits, else the analytic model); dragging the line moves the region under the pointer (one undo step); sampled selected-curve input backdrop (#987); [stage and sampling limits](tone-curve-input.md) | | LR-EDIT-LIGHT-CURVE-POINT | Point curve | P0 | βœ… | `cmd:develop.curve`, `cmd:curve.reset`, `cmd:curve.presets`, `cmd:curve.applyPreset`, `cmd:curve.savePreset`, `cmd:curve.deletePreset`, `cmd:curve.importPresets`, `cmd:curve.exportPresets`, `cmd:file.importCurvePresets`, `cmd:file.exportCurvePresets`, `crates/engine/src/cmd/curves.rs`, `crates/ui-egui/src/panels/edit.rs` | click to add a point; drag a point in both axes (between its neighbours, input / output readout, one undo step per drag; βŒ₯-drag moves it a tenth as far for fine adjustment, issue #1363); drag empty space to add and drag; double-click removes; reset: double-click a channel selector (that channel), the Reset button under the graph (every curve incl. parametric) or right-click the graph (channel / all); Point Curve preset dropdown: own Linear / Medium Contrast / Strong Contrast, user presets (save the current point curves, delete by right-click; saved with the library), import / export as `.lccurve` JSON; from process V18 the master curve keeps hue as Lightroom's does (largest and smallest channel through the curve, the middle one in proportion), and the red, green and blue curves follow it per channel ([curve-stage.md](curve-stage.md)); sampled input after Parametric, independent of this curve (#987); [stage and sampling limits](tone-curve-input.md) | @@ -472,7 +472,7 @@ differences and missing bindings are in [ui-parity.md](ui-parity.md#shortcuts). | LR-BEHAV-OFFLINE | Offline editing | P1 | βœ… | | local-first: everything works offline | | LR-BEHAV-WEB-SAFETY | Library safety in the browser build | P1 | 🟑 | `cmd:file.backupLibrary`, `cmd:file.restoreLibrary`, `apps/lightcraft-web/src/safety.rs`, `apps/lightcraft-web/src/backup.rs`, `apps/lightcraft-web/src/files.rs` | web only (experimental): Back Up Library (zip of the catalog and every stored original) and a non-destructive Restore; failed saves show as unsaved and are retried; a photo that can't be stored isn't added; one tab per library (Web Locks); notices for storage that isn't persistent and for a library that can't open; `?reset` asks first; a panic shows a message. Missing: `?safe` start, deleting originals of removed photos, zip64 (backups > 4 GB) | | LR-BEHAV-GPU | GPU acceleration | P0 | βœ… | `crates/gpu/src/render.rs`, `cmd:app.gpu`, `docs/gpu-pipeline.md`, `crates/ui-egui/src/panels/notices.rs` | CPU fallback per render on device limits, out of memory, device errors / loss, incomplete or black results (`perf.gpuReason`, `perf.gpuFallback`; each render reports its own reason β€” `lightcraft_gpu::try_render`, `gpuFallback` per exported file β€” issue #675); short submissions for slow iGPUs; backend choice (DX12 only on Windows, `LIGHTCRAFT_GPU_BACKEND` / `WGPU_BACKEND`), device created after the window opens, crash sentinel (issue #136); a GPU lost while LightCraft runs (driver reset) stops it with that message and turns GPU rendering off for the next start, which says why (issue #1337; the window's renderer can't survive the lost device); quitting waits (up to 2 s) for renders in flight and starts no new GPU work, so none is inside the driver when the process exits (`crates/gpu/src/exit.rs`, issue #620; seen crashing only on Linux + NVIDIA, other drivers unverified); with GPU rendering on and no adapter found at all (e.g. no Vulkan loader on NixOS outside `nix develop`), the desktop app says once per session that it renders on the CPU and points to Help β–Έ System Info (`gpu_notice`; not when the GPU is turned off or only a software adapter exists); no tiling beyond the buffer limit (CPU) | -| LR-BEHAV-RENDER-FIDELITY | Rendering matches Lightroom | P1 | 🟑 | `crates/pipeline/src/lib.rs`, `crates/pipeline/src/tone.rs`, `crates/pipeline/src/proraw.rs` | Process V4 calibrates global camera-look Contrast and Blacks against black-box Lightroom exports of Sony ILCE-7CR photos. Held-out response errors are 0.038 and 0.077 stops; V1/V2 keep their rendering. Whites retains V2 and awaits a follow-up. Exposure, Highlights/Shadows, other operators and broader camera coverage remain open (`docs/light-v3.md`). From process V18 Whites, the parametric curve (at the default splits; moved splits keep the analytic model) and the point curves follow Camera Raw's measured response on synthetic grey steps, the master curve hue-preserving ([curve-stage.md](curve-stage.md)). From process V5 a raw's tone curve rolls off into white in stops (past a camera curve's last fitted knot, or from half a stop below the generic curve's white point instead of clipping), so Exposure +1 and +2 keep the highlights the sensor recorded: on 12 CC0 corpus raws and 6 CC0 DNGs on the generic curve, unclipped pixels whose luminance renders at 254 or more fall from up to 22.5 % to 0 at +1 EV and from up to 35 % to at most 0.03 % at +2 EV, apart from one sky that is mostly at the clip (#1632). Not compared with Lightroom's output. From process V13 global Shadows eases off at large amounts (`finish::tone_slider`, +100 at 0.43 of V6), fitted to 56 Lightroom exports of real Canon portrait edits at Shadows +40 to +100; with negative Texture and the Global wheel, mean Ξ”E on those exports 9.5 β†’ 9.0. Global Highlights stays linear: on those edits V6 renders the brightest tones about 5 L* too dark, but single-slider exports show Lightroom's Highlights response close to linear and dependent on the frame's content (#3923), so that coverage-dependent strength, and smaller Shadows amounts, remain open. From process V17 Apple ProRAW (Make Apple and a `ProfileToneCurve`) takes Lightroom Classic's tone chain: base operator, Highlights / Shadows on a neighbourhood of the photo, Whites, Blacks, the profile curve per channel, Contrast adapting to the image; closed-form operators fitted on one CC0 iPhone 12 Pro file against Lightroom Classic 15.6 exports, mean CIEDE2000 unedited 2.93 β†’ 1.05 and the 12 single tone-slider renders 3.73 β†’ 1.22 (#613). Other cameras keep the operators above | +| LR-BEHAV-RENDER-FIDELITY | Rendering matches Lightroom | P1 | 🟑 | `crates/pipeline/src/lib.rs`, `crates/pipeline/src/tone.rs`, `crates/pipeline/src/proraw.rs` | Process V4 calibrates global camera-look Contrast and Blacks against black-box Lightroom exports of Sony ILCE-7CR photos. Held-out response errors are 0.038 and 0.077 stops; V1/V2 keep their rendering. V4 to V17 keep V2 Whites (V18 measures it, below; Apple ProRAW keeps V17's chain). Exposure, Highlights/Shadows, other operators and broader camera coverage remain open (`docs/light-v3.md`). From process V18 Whites, the parametric curve (at the default splits; moved splits keep the analytic model) and the point curves follow Camera Raw's measured response on synthetic grey steps, the master curve hue-preserving ([curve-stage.md](curve-stage.md)). From process V5 a raw's tone curve rolls off into white in stops (past a camera curve's last fitted knot, or from half a stop below the generic curve's white point instead of clipping), so Exposure +1 and +2 keep the highlights the sensor recorded: on 12 CC0 corpus raws and 6 CC0 DNGs on the generic curve, unclipped pixels whose luminance renders at 254 or more fall from up to 22.5 % to 0 at +1 EV and from up to 35 % to at most 0.03 % at +2 EV, apart from one sky that is mostly at the clip (#1632). Not compared with Lightroom's output. From process V13 global Shadows eases off at large amounts (`finish::tone_slider`, +100 at 0.43 of V6), fitted to 56 Lightroom exports of real Canon portrait edits at Shadows +40 to +100; with negative Texture and the Global wheel, mean Ξ”E on those exports 9.5 β†’ 9.0. Global Highlights stays linear: on those edits V6 renders the brightest tones about 5 L* too dark, but single-slider exports show Lightroom's Highlights response close to linear and dependent on the frame's content (#3923), so that coverage-dependent strength, and smaller Shadows amounts, remain open. From process V17 Apple ProRAW (Make Apple and a `ProfileToneCurve`) takes Lightroom Classic's tone chain: base operator, Highlights / Shadows on a neighbourhood of the photo, Whites, Blacks, the profile curve per channel, Contrast adapting to the image; closed-form operators fitted on one CC0 iPhone 12 Pro file against Lightroom Classic 15.6 exports, mean CIEDE2000 unedited 2.93 β†’ 1.05 and the 12 single tone-slider renders 3.73 β†’ 1.22 (#613). Other cameras keep the operators above | | LR-BEHAV-DRAGDROP | Drag and drop | P1 | βœ… | `crates/ui-egui/src/lib.rs`, `crates/ui-egui/src/panels/grid.rs` (`drag_feedback`), `crates/ui-egui/src/panels/left.rs` (`drop_target`, `album_drag_over`, `top_level_drop_target`, `drag_auto_scroll`), `crates/ui-egui/src/tests/drag_contract.rs`, `crates/ui-egui/src/destination.rs`, `crates/ui-egui/src/widgets.rs` (`context_menu`), `crates/ui-egui/src/widgets/text_field.rs`, `crates/ui-egui/src/tests/carried_right_click.rs`, `crates/ui-egui/src/tests/carried_text_field_menu.rs` | a right-click while photos are carried opens no context menu (every menu opened through `widgets::context_menu`: sidebar rows, grid cells, lists; a text field's own Cut / Copy / Paste menu too); files β†’ app (a drop-target card while they hover, then the import review); grid photos β†’ an album row (the dragged label says how many photos it adds, or that they are all there already, and a drop then does nothing, with no undo step; a drop that finds some there says so in its toast); a smart album, an album folder and the sidebar's Keywords rows refuse photos with the not-allowed cursor and a reason, on the label and in the toast; Esc gives up any drag (photos, albums, sidebar sections, keywords) and does nothing else; sidebar album / folder rows β†’ a folder (moves it; its name follows the pointer); a drag of albums or grid photos near the top or bottom edge of the sidebar scrolls it (faster nearer the edge, only while the pointer is over the sidebar); when another folder has the same name, the dragged label, the Move question and the toast name the folder it is in (`home (/a)`); an album drop's toast does the same for an album of that name in another album folder (two in the same place have nothing to tell them apart and keep the plain name); only the primary button drags photos and drops them: a right-button drag over a grid cell neither picks photos up nor changes the selection, and a right-button release while photos are dragged neither drops them nor ends the drag | | LR-BEHAV-TOAST | Toast notifications | P1 | βœ… | `crates/ui-egui/src/panels.rs` | | | LR-BEHAV-DIALOGS | Dialogs fit the window | P1 | βœ… | `crates/ui-egui/src/dialogs.rs` (`dialog_body`, `list_height`), `crates/ui-egui/src/tests/dialog_fit.rs`, `crates/ui-egui/src/tests/dialog_copy.rs`, `crates/ui-egui/src/tests/dialogs.rs` (`a_click_outside_closes_the_dialog_when_settings_allow_it`) | a dialog taller than the window (Export on a 1366Γ—768 screen, issue #781) never runs off it: its options scroll while the title bar and the Cancel / confirm row stay on screen (the confirm button names its action: Create, Rename, Create Stacks, Export 3 Photos…, with "OK" kept only for a one-field prompt opened with a command that has no verb, `crates/ui-egui/src/tests/dialog_copy.rs`); lists that scroll on their own (What's New, All Metadata, shortcuts, smart-album rules, credits) get shorter first; dialogs that fit look as before; Import keeps its own resizable, scrolling window; Settings β†’ Dialogs β†’ Close a dialog by clicking outside it (off by default, so a stray click never throws away a dialog's choices): a click pressed and released on the dimmed backdrop closes the dialog like Esc and doesn't reach the panels below, while a drag that ends outside (a slider pulled past the edge) or a click that closes a dropdown keeps it; the import review never closes this way (`clicked_backdrop`); a one-line prompt (Rename Folder, New Folder on Disk, the preset and version names, New Library when its name can't be used, Auto-Tag from Tracklog) the engine refuses stays open with its text and shows the reason in a toast, so the name can be corrected, where it used to close without a word; a New Folder on Disk that works says so (β€œCreated folder β€œSelects” in β€œ2026/Shoot””, naming the parent by its last two folders as dialogs do) | diff --git a/docs/process-versions.md b/docs/process-versions.md index 208d6d565b9..40ac7579e79 100644 --- a/docs/process-versions.md +++ b/docs/process-versions.md @@ -25,7 +25,7 @@ stronger Light sliders, issue #196) without changing a single photo someone has | **V15** | V14 plus: brush Flow is the coverage a stroke adds per brush radius it travels, as in Lightroom Classic (#4045): each dab adds `1 βˆ’ (1 βˆ’ flow)^(d / r)` for a dab `d` past the previous one (the first dab counts one radius, so a click paints its flow), `masks::travel_flow`. A point a stroke passes over for a length `L` is then covered by `1 βˆ’ (1 βˆ’ flow)^(L / r)` however densely the dabs lie: a straight stroke's centre by 44 % at Flow 25 and 75 % at Flow 50, where Lightroom Classic measures 41 % and 76 % on a grey card. V1 to V14 add the full flow per dab (r/4 apart on a fast drag, closer on a slow one): 90 % at Flow 25 on a fast stroke, more on a slow one. CPU (`masks::brush_dabs_within`), GPU (a flow per dab in the `shape` kernel's brush data) and the live stroke (`brush_live`, the masking and Lens Blur brushes) all branch on `masks::flow_per_radius`. Renders without brush strokes, or with Flow 100 only, are the same as V14's. | | **V16** | V15 plus: a brush stroke's edge is feathered as one dab's is. Each stroke keeps its Flow build-up (every dab that reaches a pixel adds its flow, `masks::feather_dab`) apart from its edge (the highest falloff of those dabs), and covers their product up to Density (`masks::stroke_coverage`). V1 to V15 accumulate each dab's falloff times its flow, so the soft edges of dabs r/4 apart piled up: at Feather 100 and Flow 100 a straight stroke covered 0.90 halfway out from its centre line, where one dab covers 0.50; V16 covers 0.50. Below Flow 100 the centre now builds up by Flow per radius travelled whatever the Feather (a straight stroke's 44 % at Flow 25), where V15 also weakened a soft brush's centre (25 %). CPU (`masks::rasterize_brush`), GPU (a stroke-record word in the `shape` kernel's brush data) and the live stroke (`brush_live`, the masking and Lens Blur brushes) branch on `masks::stroke_feather`. Auto Mask strokes keep V15's accumulation (their edge follows the photo's edges, not the feather). Renders without brush strokes, or with Feather 0 or Auto Mask brushes only, are the same as V15's; a saved V1 to V15 photo keeps its strokes until Update to Current Process. | | **V17** | V16 plus: Apple ProRAW (Make `Apple` and a DNG `ProfileToneCurve`) renders its Light sliders through Lightroom Classic's fitted tone chain (`crates/pipeline/src/proraw.rs`, #613): base operator (BaselineExposure + Exposure), Highlights / Shadows on a Gaussian neighbourhood at 6.4 % of the long edge, Whites, Blacks, the 128-knot profile tone curve per channel (hue-preserving in linear ProPhoto), then Contrast adapting to the image's key. HDR keeps the chain through the midtones and lifts highlights past white (`camera_hdr_lift`). V1 to V16 keep the 32-knot camera curve on luminance; non-ProRAW photos and older offline smart previews without the curve render identically to V16. CPU and GPU share the stage tables and Highlights / Shadows curves. | -| **V18** (the latest) | V17 plus: Whites, the parametric curve and the point curves as Lightroom applies them ([curve-stage.md](curve-stage.md), `crates/pipeline/src/curve_stage.rs`), measured on Camera Raw renders of synthetic grey steps. Whites leaves the tone map and, with the parametric curve at Lightroom's default splits, comes from LightCraft's model fitted to those measurements (Whites reaches into the midtones; the regions are broad and add; moved splits keep the analytic model of V1 to V17); the master curve acts hue-preserving on sRGB-encoded linear ProPhoto RGB (largest and smallest channel through the curve, the middle one in proportion in linear light), then the red, green and blue curves per channel, between the calibrated Contrast and Blacks and the colour stage. V1 to V17 keep Whites in the tone map and their per-channel curves on the output. CPU (`finish::finish_with`) and GPU (`finish.wgsl::curve_stage`) share the curve tables built from the model. With Whites, the parametric curve and the point curves neutral the curve stage does not run. | +| **V18** (the latest) | V17 plus: Whites, the parametric curve and the point curves as Lightroom applies them ([curve-stage.md](curve-stage.md), `crates/pipeline/src/curve_stage.rs`), measured on Camera Raw renders of synthetic grey steps. Whites leaves the tone map (Apple ProRAW keeps Whites in V17's chain, and the stage then applies only the curves) and, with the parametric curve at Lightroom's default splits, comes from LightCraft's model fitted to those measurements (Whites reaches into the midtones; the regions are broad and add; moved splits keep the analytic model of V1 to V17); the master curve acts hue-preserving on sRGB-encoded linear ProPhoto RGB (largest and smallest channel through the curve, the middle one in proportion in linear light), then the red, green and blue curves per channel, between the calibrated Contrast and Blacks and the colour stage. V1 to V17 keep Whites in the tone map and their per-channel curves on the output. CPU (`finish::finish_with`) and GPU (`finish.wgsl::curve_stage`) share the curve tables built from the model. With Whites, the parametric curve and the point curves neutral the curve stage does not run. | ## The rule From e2261e1bd532b0ea5644a2fb26cad97dbdc1fde2 Mon Sep 17 00:00:00 2001 From: smi-leonivkovic Date: Thu, 3 Dec 2026 17:51:13 +0100 Subject: [PATCH 48/51] docs(parity): the default curve's exposure offsets cover four Lumix bodies (#523) --- docs/parity-checklist.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/parity-checklist.md b/docs/parity-checklist.md index a853e842458..2c1e0a83b8d 100644 --- a/docs/parity-checklist.md +++ b/docs/parity-checklist.md @@ -472,7 +472,7 @@ differences and missing bindings are in [ui-parity.md](ui-parity.md#shortcuts). | LR-BEHAV-OFFLINE | Offline editing | P1 | βœ… | | local-first: everything works offline | | LR-BEHAV-WEB-SAFETY | Library safety in the browser build | P1 | 🟑 | `cmd:file.backupLibrary`, `cmd:file.restoreLibrary`, `apps/lightcraft-web/src/safety.rs`, `apps/lightcraft-web/src/backup.rs`, `apps/lightcraft-web/src/files.rs` | web only (experimental): Back Up Library (zip of the catalog and every stored original) and a non-destructive Restore; failed saves show as unsaved and are retried; a photo that can't be stored isn't added; one tab per library (Web Locks); notices for storage that isn't persistent and for a library that can't open; `?reset` asks first; a panic shows a message. Missing: `?safe` start, deleting originals of removed photos, zip64 (backups > 4 GB) | | LR-BEHAV-GPU | GPU acceleration | P0 | βœ… | `crates/gpu/src/render.rs`, `cmd:app.gpu`, `docs/gpu-pipeline.md`, `crates/ui-egui/src/panels/notices.rs` | CPU fallback per render on device limits, out of memory, device errors / loss, incomplete or black results (`perf.gpuReason`, `perf.gpuFallback`; each render reports its own reason β€” `lightcraft_gpu::try_render`, `gpuFallback` per exported file β€” issue #675); short submissions for slow iGPUs; backend choice (DX12 only on Windows, `LIGHTCRAFT_GPU_BACKEND` / `WGPU_BACKEND`), device created after the window opens, crash sentinel (issue #136); a GPU lost while LightCraft runs (driver reset) stops it with that message and turns GPU rendering off for the next start, which says why (issue #1337; the window's renderer can't survive the lost device); quitting waits (up to 2 s) for renders in flight and starts no new GPU work, so none is inside the driver when the process exits (`crates/gpu/src/exit.rs`, issue #620; seen crashing only on Linux + NVIDIA, other drivers unverified); with GPU rendering on and no adapter found at all (e.g. no Vulkan loader on NixOS outside `nix develop`), the desktop app says once per session that it renders on the CPU and points to Help β–Έ System Info (`gpu_notice`; not when the GPU is turned off or only a software adapter exists); no tiling beyond the buffer limit (CPU) | -| LR-BEHAV-RENDER-FIDELITY | Rendering matches Lightroom | P1 | 🟑 | `crates/pipeline/src/lib.rs`, `crates/pipeline/src/tone.rs`, `crates/pipeline/src/proraw.rs` | Process V4 calibrates global camera-look Contrast and Blacks against black-box Lightroom exports of Sony ILCE-7CR photos. Held-out response errors are 0.038 and 0.077 stops; V1/V2 keep their rendering. V4 to V17 keep V2 Whites (V18 measures it, below; Apple ProRAW keeps V17's chain). Exposure, Highlights/Shadows, other operators and broader camera coverage remain open (`docs/light-v3.md`). From process V18 Whites, the parametric curve (at the default splits; moved splits keep the analytic model) and the point curves follow Camera Raw's measured response on synthetic grey steps, the master curve hue-preserving ([curve-stage.md](curve-stage.md)). From V18 the colour mixer follows Camera Raw's measured response on synthetic colour charts ([mixer-stage.md](mixer-stage.md)), and Colour Grading too ([grading-stage.md](grading-stage.md)); from V18 Calibration's primaries are measured too, before the mixer ([mixer-stage.md](mixer-stage.md)); Saturation and Vibrance are not measured in yet. From V18 Highlights acts relative to the frame's tonal range, fitted on Lightroom's renders of photos ([hs-range.md](hs-range.md)). From V18 a raw whose camera profile has no tone curve of its own (Adobe Standard) gets Lightroom's default base curve measured on a synthetic chart, hue preserving on linear ProPhoto channels, with a per-camera exposure offset measured for the Panasonic Lumix DC-S9 only ([default-tone.md](default-tone.md)). From process V5 a raw's tone curve rolls off into white in stops (past a camera curve's last fitted knot, or from half a stop below the generic curve's white point instead of clipping), so Exposure +1 and +2 keep the highlights the sensor recorded: on 12 CC0 corpus raws and 6 CC0 DNGs on the generic curve, unclipped pixels whose luminance renders at 254 or more fall from up to 22.5 % to 0 at +1 EV and from up to 35 % to at most 0.03 % at +2 EV, apart from one sky that is mostly at the clip (#1632). Not compared with Lightroom's output. From process V13 global Shadows eases off at large amounts (`finish::tone_slider`, +100 at 0.43 of V6), fitted to 56 Lightroom exports of real Canon portrait edits at Shadows +40 to +100; with negative Texture and the Global wheel, mean Ξ”E on those exports 9.5 β†’ 9.0. Global Highlights stays linear: on those edits V6 renders the brightest tones about 5 L* too dark, but single-slider exports show Lightroom's Highlights response close to linear and dependent on the frame's content (#3923), so that coverage-dependent strength, and smaller Shadows amounts, remain open. From process V17 Apple ProRAW (Make Apple and a `ProfileToneCurve`) takes Lightroom Classic's tone chain: base operator, Highlights / Shadows on a neighbourhood of the photo, Whites, Blacks, the profile curve per channel, Contrast adapting to the image; closed-form operators fitted on one CC0 iPhone 12 Pro file against Lightroom Classic 15.6 exports, mean CIEDE2000 unedited 2.93 β†’ 1.05 and the 12 single tone-slider renders 3.73 β†’ 1.22 (#613). Other cameras keep the operators above | +| LR-BEHAV-RENDER-FIDELITY | Rendering matches Lightroom | P1 | 🟑 | `crates/pipeline/src/lib.rs`, `crates/pipeline/src/tone.rs`, `crates/pipeline/src/proraw.rs` | Process V4 calibrates global camera-look Contrast and Blacks against black-box Lightroom exports of Sony ILCE-7CR photos. Held-out response errors are 0.038 and 0.077 stops; V1/V2 keep their rendering. V4 to V17 keep V2 Whites (V18 measures it, below; Apple ProRAW keeps V17's chain). Exposure, Highlights/Shadows, other operators and broader camera coverage remain open (`docs/light-v3.md`). From process V18 Whites, the parametric curve (at the default splits; moved splits keep the analytic model) and the point curves follow Camera Raw's measured response on synthetic grey steps, the master curve hue-preserving ([curve-stage.md](curve-stage.md)). From V18 the colour mixer follows Camera Raw's measured response on synthetic colour charts ([mixer-stage.md](mixer-stage.md)), and Colour Grading too ([grading-stage.md](grading-stage.md)); from V18 Calibration's primaries are measured too, before the mixer ([mixer-stage.md](mixer-stage.md)); Saturation and Vibrance are not measured in yet. From V18 Highlights acts relative to the frame's tonal range, fitted on Lightroom's renders of photos ([hs-range.md](hs-range.md)). From V18 a raw whose camera profile has no tone curve of its own (Adobe Standard) gets Lightroom's default base curve measured on a synthetic chart, hue preserving on linear ProPhoto channels, with a per-camera exposure offset measured for the Panasonic Lumix S9, S5, S5 II and S5 IIX only ([default-tone.md](default-tone.md)). From process V5 a raw's tone curve rolls off into white in stops (past a camera curve's last fitted knot, or from half a stop below the generic curve's white point instead of clipping), so Exposure +1 and +2 keep the highlights the sensor recorded: on 12 CC0 corpus raws and 6 CC0 DNGs on the generic curve, unclipped pixels whose luminance renders at 254 or more fall from up to 22.5 % to 0 at +1 EV and from up to 35 % to at most 0.03 % at +2 EV, apart from one sky that is mostly at the clip (#1632). Not compared with Lightroom's output. From process V13 global Shadows eases off at large amounts (`finish::tone_slider`, +100 at 0.43 of V6), fitted to 56 Lightroom exports of real Canon portrait edits at Shadows +40 to +100; with negative Texture and the Global wheel, mean Ξ”E on those exports 9.5 β†’ 9.0. Global Highlights stays linear: on those edits V6 renders the brightest tones about 5 L* too dark, but single-slider exports show Lightroom's Highlights response close to linear and dependent on the frame's content (#3923), so that coverage-dependent strength, and smaller Shadows amounts, remain open. From process V17 Apple ProRAW (Make Apple and a `ProfileToneCurve`) takes Lightroom Classic's tone chain: base operator, Highlights / Shadows on a neighbourhood of the photo, Whites, Blacks, the profile curve per channel, Contrast adapting to the image; closed-form operators fitted on one CC0 iPhone 12 Pro file against Lightroom Classic 15.6 exports, mean CIEDE2000 unedited 2.93 β†’ 1.05 and the 12 single tone-slider renders 3.73 β†’ 1.22 (#613). Other cameras keep the operators above | | LR-BEHAV-DRAGDROP | Drag and drop | P1 | βœ… | `crates/ui-egui/src/lib.rs`, `crates/ui-egui/src/panels/grid.rs` (`drag_feedback`), `crates/ui-egui/src/panels/left.rs` (`drop_target`, `album_drag_over`, `top_level_drop_target`, `drag_auto_scroll`), `crates/ui-egui/src/tests/drag_contract.rs`, `crates/ui-egui/src/destination.rs`, `crates/ui-egui/src/widgets.rs` (`context_menu`), `crates/ui-egui/src/widgets/text_field.rs`, `crates/ui-egui/src/tests/carried_right_click.rs`, `crates/ui-egui/src/tests/carried_text_field_menu.rs` | a right-click while photos are carried opens no context menu (every menu opened through `widgets::context_menu`: sidebar rows, grid cells, lists; a text field's own Cut / Copy / Paste menu too); files β†’ app (a drop-target card while they hover, then the import review); grid photos β†’ an album row (the dragged label says how many photos it adds, or that they are all there already, and a drop then does nothing, with no undo step; a drop that finds some there says so in its toast); a smart album, an album folder and the sidebar's Keywords rows refuse photos with the not-allowed cursor and a reason, on the label and in the toast; Esc gives up any drag (photos, albums, sidebar sections, keywords) and does nothing else; sidebar album / folder rows β†’ a folder (moves it; its name follows the pointer); a drag of albums or grid photos near the top or bottom edge of the sidebar scrolls it (faster nearer the edge, only while the pointer is over the sidebar); when another folder has the same name, the dragged label, the Move question and the toast name the folder it is in (`home (/a)`); an album drop's toast does the same for an album of that name in another album folder (two in the same place have nothing to tell them apart and keep the plain name); only the primary button drags photos and drops them: a right-button drag over a grid cell neither picks photos up nor changes the selection, and a right-button release while photos are dragged neither drops them nor ends the drag | | LR-BEHAV-TOAST | Toast notifications | P1 | βœ… | `crates/ui-egui/src/panels.rs` | | | LR-BEHAV-DIALOGS | Dialogs fit the window | P1 | βœ… | `crates/ui-egui/src/dialogs.rs` (`dialog_body`, `list_height`), `crates/ui-egui/src/tests/dialog_fit.rs`, `crates/ui-egui/src/tests/dialog_copy.rs`, `crates/ui-egui/src/tests/dialogs.rs` (`a_click_outside_closes_the_dialog_when_settings_allow_it`) | a dialog taller than the window (Export on a 1366Γ—768 screen, issue #781) never runs off it: its options scroll while the title bar and the Cancel / confirm row stay on screen (the confirm button names its action: Create, Rename, Create Stacks, Export 3 Photos…, with "OK" kept only for a one-field prompt opened with a command that has no verb, `crates/ui-egui/src/tests/dialog_copy.rs`); lists that scroll on their own (What's New, All Metadata, shortcuts, smart-album rules, credits) get shorter first; dialogs that fit look as before; Import keeps its own resizable, scrolling window; Settings β†’ Dialogs β†’ Close a dialog by clicking outside it (off by default, so a stray click never throws away a dialog's choices): a click pressed and released on the dimmed backdrop closes the dialog like Esc and doesn't reach the panels below, while a drag that ends outside (a slider pulled past the edge) or a click that closes a dropdown keeps it; the import review never closes this way (`clicked_backdrop`); a one-line prompt (Rename Folder, New Folder on Disk, the preset and version names, New Library when its name can't be used, Auto-Tag from Tracklog) the engine refuses stays open with its text and shows the reason in a toast, so the name can be corrected, where it used to close without a word; a New Folder on Disk that works says so (β€œCreated folder β€œSelects” in β€œ2026/Shoot””, naming the parent by its last two folders as dialogs do) | From 3a86623869b473534d0d0c33d1c8fcb46d80e9ee Mon Sep 17 00:00:00 2001 From: smi-leonivkovic Date: Thu, 3 Dec 2026 17:51:19 +0100 Subject: [PATCH 49/51] docs(parity): the default curve's exposure offsets cover four Lumix bodies (#523) --- docs/parity-checklist.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/parity-checklist.md b/docs/parity-checklist.md index 94666d46eb0..9b6f2d33e8c 100644 --- a/docs/parity-checklist.md +++ b/docs/parity-checklist.md @@ -472,7 +472,7 @@ differences and missing bindings are in [ui-parity.md](ui-parity.md#shortcuts). | LR-BEHAV-OFFLINE | Offline editing | P1 | βœ… | | local-first: everything works offline | | LR-BEHAV-WEB-SAFETY | Library safety in the browser build | P1 | 🟑 | `cmd:file.backupLibrary`, `cmd:file.restoreLibrary`, `apps/lightcraft-web/src/safety.rs`, `apps/lightcraft-web/src/backup.rs`, `apps/lightcraft-web/src/files.rs` | web only (experimental): Back Up Library (zip of the catalog and every stored original) and a non-destructive Restore; failed saves show as unsaved and are retried; a photo that can't be stored isn't added; one tab per library (Web Locks); notices for storage that isn't persistent and for a library that can't open; `?reset` asks first; a panic shows a message. Missing: `?safe` start, deleting originals of removed photos, zip64 (backups > 4 GB) | | LR-BEHAV-GPU | GPU acceleration | P0 | βœ… | `crates/gpu/src/render.rs`, `cmd:app.gpu`, `docs/gpu-pipeline.md`, `crates/ui-egui/src/panels/notices.rs` | CPU fallback per render on device limits, out of memory, device errors / loss, incomplete or black results (`perf.gpuReason`, `perf.gpuFallback`; each render reports its own reason β€” `lightcraft_gpu::try_render`, `gpuFallback` per exported file β€” issue #675); short submissions for slow iGPUs; backend choice (DX12 only on Windows, `LIGHTCRAFT_GPU_BACKEND` / `WGPU_BACKEND`), device created after the window opens, crash sentinel (issue #136); a GPU lost while LightCraft runs (driver reset) stops it with that message and turns GPU rendering off for the next start, which says why (issue #1337; the window's renderer can't survive the lost device); quitting waits (up to 2 s) for renders in flight and starts no new GPU work, so none is inside the driver when the process exits (`crates/gpu/src/exit.rs`, issue #620; seen crashing only on Linux + NVIDIA, other drivers unverified); with GPU rendering on and no adapter found at all (e.g. no Vulkan loader on NixOS outside `nix develop`), the desktop app says once per session that it renders on the CPU and points to Help β–Έ System Info (`gpu_notice`; not when the GPU is turned off or only a software adapter exists); no tiling beyond the buffer limit (CPU) | -| LR-BEHAV-RENDER-FIDELITY | Rendering matches Lightroom | P1 | 🟑 | `crates/pipeline/src/lib.rs`, `crates/pipeline/src/tone.rs`, `crates/pipeline/src/proraw.rs` | Process V4 calibrates global camera-look Contrast and Blacks against black-box Lightroom exports of Sony ILCE-7CR photos. Held-out response errors are 0.038 and 0.077 stops; V1/V2 keep their rendering. V4 to V17 keep V2 Whites (V18 measures it, below; Apple ProRAW keeps V17's chain). Exposure, Highlights/Shadows, other operators and broader camera coverage remain open (`docs/light-v3.md`). From process V18 Whites, the parametric curve (at the default splits; moved splits keep the analytic model) and the point curves follow Camera Raw's measured response on synthetic grey steps, the master curve hue-preserving ([curve-stage.md](curve-stage.md)). From V18 the colour mixer follows Camera Raw's measured response on synthetic colour charts ([mixer-stage.md](mixer-stage.md)), and Colour Grading too ([grading-stage.md](grading-stage.md)); Calibration, Saturation and Vibrance are not measured in yet. From V18 Highlights acts relative to the frame's tonal range, fitted on Lightroom's renders of photos ([hs-range.md](hs-range.md)). From V18 a raw whose camera profile has no tone curve of its own (Adobe Standard) gets Lightroom's default base curve measured on a synthetic chart, hue preserving on linear ProPhoto channels, with a per-camera exposure offset measured for the Panasonic Lumix DC-S9 only ([default-tone.md](default-tone.md)). From process V5 a raw's tone curve rolls off into white in stops (past a camera curve's last fitted knot, or from half a stop below the generic curve's white point instead of clipping), so Exposure +1 and +2 keep the highlights the sensor recorded: on 12 CC0 corpus raws and 6 CC0 DNGs on the generic curve, unclipped pixels whose luminance renders at 254 or more fall from up to 22.5 % to 0 at +1 EV and from up to 35 % to at most 0.03 % at +2 EV, apart from one sky that is mostly at the clip (#1632). Not compared with Lightroom's output. From process V13 global Shadows eases off at large amounts (`finish::tone_slider`, +100 at 0.43 of V6), fitted to 56 Lightroom exports of real Canon portrait edits at Shadows +40 to +100; with negative Texture and the Global wheel, mean Ξ”E on those exports 9.5 β†’ 9.0. Global Highlights stays linear: on those edits V6 renders the brightest tones about 5 L* too dark, but single-slider exports show Lightroom's Highlights response close to linear and dependent on the frame's content (#3923), so that coverage-dependent strength, and smaller Shadows amounts, remain open. From process V17 Apple ProRAW (Make Apple and a `ProfileToneCurve`) takes Lightroom Classic's tone chain: base operator, Highlights / Shadows on a neighbourhood of the photo, Whites, Blacks, the profile curve per channel, Contrast adapting to the image; closed-form operators fitted on one CC0 iPhone 12 Pro file against Lightroom Classic 15.6 exports, mean CIEDE2000 unedited 2.93 β†’ 1.05 and the 12 single tone-slider renders 3.73 β†’ 1.22 (#613). Other cameras keep the operators above | +| LR-BEHAV-RENDER-FIDELITY | Rendering matches Lightroom | P1 | 🟑 | `crates/pipeline/src/lib.rs`, `crates/pipeline/src/tone.rs`, `crates/pipeline/src/proraw.rs` | Process V4 calibrates global camera-look Contrast and Blacks against black-box Lightroom exports of Sony ILCE-7CR photos. Held-out response errors are 0.038 and 0.077 stops; V1/V2 keep their rendering. V4 to V17 keep V2 Whites (V18 measures it, below; Apple ProRAW keeps V17's chain). Exposure, Highlights/Shadows, other operators and broader camera coverage remain open (`docs/light-v3.md`). From process V18 Whites, the parametric curve (at the default splits; moved splits keep the analytic model) and the point curves follow Camera Raw's measured response on synthetic grey steps, the master curve hue-preserving ([curve-stage.md](curve-stage.md)). From V18 the colour mixer follows Camera Raw's measured response on synthetic colour charts ([mixer-stage.md](mixer-stage.md)), and Colour Grading too ([grading-stage.md](grading-stage.md)); Calibration, Saturation and Vibrance are not measured in yet. From V18 Highlights acts relative to the frame's tonal range, fitted on Lightroom's renders of photos ([hs-range.md](hs-range.md)). From V18 a raw whose camera profile has no tone curve of its own (Adobe Standard) gets Lightroom's default base curve measured on a synthetic chart, hue preserving on linear ProPhoto channels, with a per-camera exposure offset measured for the Panasonic Lumix S9, S5, S5 II and S5 IIX only ([default-tone.md](default-tone.md)). From process V5 a raw's tone curve rolls off into white in stops (past a camera curve's last fitted knot, or from half a stop below the generic curve's white point instead of clipping), so Exposure +1 and +2 keep the highlights the sensor recorded: on 12 CC0 corpus raws and 6 CC0 DNGs on the generic curve, unclipped pixels whose luminance renders at 254 or more fall from up to 22.5 % to 0 at +1 EV and from up to 35 % to at most 0.03 % at +2 EV, apart from one sky that is mostly at the clip (#1632). Not compared with Lightroom's output. From process V13 global Shadows eases off at large amounts (`finish::tone_slider`, +100 at 0.43 of V6), fitted to 56 Lightroom exports of real Canon portrait edits at Shadows +40 to +100; with negative Texture and the Global wheel, mean Ξ”E on those exports 9.5 β†’ 9.0. Global Highlights stays linear: on those edits V6 renders the brightest tones about 5 L* too dark, but single-slider exports show Lightroom's Highlights response close to linear and dependent on the frame's content (#3923), so that coverage-dependent strength, and smaller Shadows amounts, remain open. From process V17 Apple ProRAW (Make Apple and a `ProfileToneCurve`) takes Lightroom Classic's tone chain: base operator, Highlights / Shadows on a neighbourhood of the photo, Whites, Blacks, the profile curve per channel, Contrast adapting to the image; closed-form operators fitted on one CC0 iPhone 12 Pro file against Lightroom Classic 15.6 exports, mean CIEDE2000 unedited 2.93 β†’ 1.05 and the 12 single tone-slider renders 3.73 β†’ 1.22 (#613). Other cameras keep the operators above | | LR-BEHAV-DRAGDROP | Drag and drop | P1 | βœ… | `crates/ui-egui/src/lib.rs`, `crates/ui-egui/src/panels/grid.rs` (`drag_feedback`), `crates/ui-egui/src/panels/left.rs` (`drop_target`, `album_drag_over`, `top_level_drop_target`, `drag_auto_scroll`), `crates/ui-egui/src/tests/drag_contract.rs`, `crates/ui-egui/src/destination.rs`, `crates/ui-egui/src/widgets.rs` (`context_menu`), `crates/ui-egui/src/widgets/text_field.rs`, `crates/ui-egui/src/tests/carried_right_click.rs`, `crates/ui-egui/src/tests/carried_text_field_menu.rs` | a right-click while photos are carried opens no context menu (every menu opened through `widgets::context_menu`: sidebar rows, grid cells, lists; a text field's own Cut / Copy / Paste menu too); files β†’ app (a drop-target card while they hover, then the import review); grid photos β†’ an album row (the dragged label says how many photos it adds, or that they are all there already, and a drop then does nothing, with no undo step; a drop that finds some there says so in its toast); a smart album, an album folder and the sidebar's Keywords rows refuse photos with the not-allowed cursor and a reason, on the label and in the toast; Esc gives up any drag (photos, albums, sidebar sections, keywords) and does nothing else; sidebar album / folder rows β†’ a folder (moves it; its name follows the pointer); a drag of albums or grid photos near the top or bottom edge of the sidebar scrolls it (faster nearer the edge, only while the pointer is over the sidebar); when another folder has the same name, the dragged label, the Move question and the toast name the folder it is in (`home (/a)`); an album drop's toast does the same for an album of that name in another album folder (two in the same place have nothing to tell them apart and keep the plain name); only the primary button drags photos and drops them: a right-button drag over a grid cell neither picks photos up nor changes the selection, and a right-button release while photos are dragged neither drops them nor ends the drag | | LR-BEHAV-TOAST | Toast notifications | P1 | βœ… | `crates/ui-egui/src/panels.rs` | | | LR-BEHAV-DIALOGS | Dialogs fit the window | P1 | βœ… | `crates/ui-egui/src/dialogs.rs` (`dialog_body`, `list_height`), `crates/ui-egui/src/tests/dialog_fit.rs`, `crates/ui-egui/src/tests/dialog_copy.rs`, `crates/ui-egui/src/tests/dialogs.rs` (`a_click_outside_closes_the_dialog_when_settings_allow_it`) | a dialog taller than the window (Export on a 1366Γ—768 screen, issue #781) never runs off it: its options scroll while the title bar and the Cancel / confirm row stay on screen (the confirm button names its action: Create, Rename, Create Stacks, Export 3 Photos…, with "OK" kept only for a one-field prompt opened with a command that has no verb, `crates/ui-egui/src/tests/dialog_copy.rs`); lists that scroll on their own (What's New, All Metadata, shortcuts, smart-album rules, credits) get shorter first; dialogs that fit look as before; Import keeps its own resizable, scrolling window; Settings β†’ Dialogs β†’ Close a dialog by clicking outside it (off by default, so a stray click never throws away a dialog's choices): a click pressed and released on the dimmed backdrop closes the dialog like Esc and doesn't reach the panels below, while a drag that ends outside (a slider pulled past the edge) or a click that closes a dropdown keeps it; the import review never closes this way (`clicked_backdrop`); a one-line prompt (Rename Folder, New Folder on Disk, the preset and version names, New Library when its name can't be used, Auto-Tag from Tracklog) the engine refuses stays open with its text and shows the reason in a toast, so the name can be corrected, where it used to close without a word; a New Folder on Disk that works says so (β€œCreated folder β€œSelects” in β€œ2026/Shoot””, naming the parent by its last two folders as dialogs do) | From 587ed534debc7c3366069bdaff955e04b93d5d4c Mon Sep 17 00:00:00 2001 From: smi-leonivkovic Date: Thu, 3 Dec 2026 18:17:24 +0100 Subject: [PATCH 50/51] docs: V17's Apple ProRAW uses its chain's fitted Whites, not V2 Whites (review on #4076) --- docs/gaps.md | 2 +- docs/parity-checklist.md | 4 ++-- docs/process-versions.md | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/gaps.md b/docs/gaps.md index 4691d3e25a9..d16d5c7fb9a 100644 --- a/docs/gaps.md +++ b/docs/gaps.md @@ -17,7 +17,7 @@ Hours are Opus 5.5 agent wall-clock hours (see [target-app-parity.md](target-app |---:|---|---|---|---:|---| | 1 B | **Camera colour is estimated, not measured** (LR-PROF-CAMERACOLOR). Raws start from a per-file fit to the camera JPEG, 10 bundled profiles, 52 spectral matrices (plus same-sensor bodies, e.g. the X-T30 through the X-T3) or chart-measured matrices (the EOS D60); others use a neutral matrix (a black-and-white camera JPEG gives its tone curve only, #577; dark JPEG tones also guide the toe, #1307) | Ξ”E vs camera JPEG 2.9–10 after fitting (raw-parity.md); 1 chart-calibrated model (EOS D60: its Kelvin scale and fallback colour, the look stays the JPEG fit) vs 1,500 Adobe Standard profiles | every raw shooter sees colour that is close but not Lightroom's; some get neutral-matrix colour | 50–90 | [raw-parity](raw-parity.md#colour) | | 2 B | **CR3 variants no public file uses** (LR-IMP-FORMATS): `crx.rs` refuses vertical-tile C-RAW, partial-subband and other plane coding, multi-tile 0x200 and adaptive low-frequency gains, and those files fall back to the preview. All 110 CC0 CR3s on raw.pixls.us (31 folders) decode from sensor data, so none of these variants has a public sample; 26 CR3 bodies are verified (M50 / R100 / R8 exact, R5 Mark II pinned, 22 more pinned on one CC0 file each and checked against the camera JPEG, [cr3.md](cr3.md#further-bodies-one-cc0-file-each)). HEIF stills are `.HIF` files, not CR3; no CR3 sRAW / mRAW sample exists | measured: Canon's share whose camera fully works 73% β†’ 94% (raw-parity.md); 18 of 22 popular Canon bodies write CR3, all 18 now verified | +0.3 points of photographers; the variants surface only as user files that open as a preview | 10–25 | [raw-parity](raw-parity.md#remaining-work-ranked-by-photographers-unlocked-per-hour) | -| 3 B | **Render fidelity partial** (LR-BEHAV-RENDER-FIDELITY): calibrated camera-look Contrast and Blacks; other operators need measurement; from process V5 raw tone curves roll off into white in stops, so Exposure keeps recorded highlights (#1632); from process V17 Apple ProRAW takes Lightroom's fitted tone chain; from V18 Whites and the parametric curve at its default splits are measured against Camera Raw, and the point curves (still LightCraft's spline) apply hue preserving as Lightroom's do ([curve-stage.md](curve-stage.md)) | process V3 reduces held-out response error from 0.136 to 0.038 stops for Contrast and 0.424 to 0.077 for Blacks on one Sony camera; V4 to V17 keep V2 Whites; V18's Whites is fitted to Camera Raw's grey-step charts, not yet checked on photos per camera | imported Lightroom edits still differ, especially on uncalibrated operators and cameras | 30–60 | [calibrated Light operators](light-v3.md), [process versions](process-versions.md) | +| 3 B | **Render fidelity partial** (LR-BEHAV-RENDER-FIDELITY): calibrated camera-look Contrast and Blacks; other operators need measurement; from process V5 raw tone curves roll off into white in stops, so Exposure keeps recorded highlights (#1632); from process V17 Apple ProRAW takes Lightroom's fitted tone chain; from V18 Whites and the parametric curve at its default splits are measured against Camera Raw, and the point curves (still LightCraft's spline) apply hue preserving as Lightroom's do ([curve-stage.md](curve-stage.md)) | process V3 reduces held-out response error from 0.136 to 0.038 stops for Contrast and 0.424 to 0.077 for Blacks on one Sony camera; V4 to V16, and V17 except Apple ProRAW (fitted Whites in its own chain), keep V2 Whites; for other photos V18's Whites is fitted to Camera Raw's grey-step charts, not yet checked on photos per camera | imported Lightroom edits still differ, especially on uncalibrated operators and cameras | 30–60 | [calibrated Light operators](light-v3.md), [process versions](process-versions.md) | | 4 | ~~Original-pixel detail at 100%~~ (LR-VIEW-ZOOM): closed 2026-10-12, see Closed recently | checklist row βœ… | β€” | 0 | [ui-parity](ui-parity.md) | | 5 B | **AI masks: Subject, Sky, People, Background, Landscape** are heuristics; Object / Describe run SAM 3 but its download has no mirror configured | `crates/segment`; ai-masks.md; MASK rows 67% | masking is how most Lightroom users edit today | 40–70 + model decision | [target-app-parity](target-app-parity.md#ai) | | 6 | **Compressed ORF** (support withdrawn) | #3775 decoder removed pending provenance review; uncompressed support remains | compressed files use embedded JPEG previews when available, not sensor data | pending review | [orf-compression](orf-compression.md) | diff --git a/docs/parity-checklist.md b/docs/parity-checklist.md index 579f433283d..476f810c3b2 100644 --- a/docs/parity-checklist.md +++ b/docs/parity-checklist.md @@ -188,7 +188,7 @@ differences and missing bindings are in [ui-parity.md](ui-parity.md#shortcuts). | LR-EDIT-LIGHT-CONTRAST | Contrast | P0 | 🟑 | `ctl:light.contrast` | From process V4, global Contrast on the camera-look path is fitted per channel in ProPhoto with the sRGB transfer. Check response error 0.136 to 0.038 stops on six held-out Sony photos. Other sources and local adjustments retain V2; broader parity remains unverified (`docs/light-v3.md`). | | LR-EDIT-LIGHT-HIGHLIGHTS | Highlights | P0 | βœ… | `ctl:light.highlights`, `crates/raw/src/highlight.rs` | sensor-clipped highlights stay neutral when Highlights (or Exposure, Whites) darkens them: fully clipped content is rebuilt to the neutral of the colour model applied after it, partly clipped content takes its colour from reliable unclipped content nearby (not from dark objects, lens fringes or another surface beside it) and white where there is none, and pale partly clipped content (a white sky) turns white on its way to clipping (#523); binned previews and thumbnails decide clipping per sample before averaging (`develop_binned_masked`, `highlight::reconstruct_masked`), so a block with one clipped specular sample keeps its mean instead of jumping to the clip level, which reconstruction turned into green speckles at 500 px (#548) From process V2 the Highlights/Shadows base is the edge-aware filter of the 0.15 %-of-long-edge median of log luminance: twigs and fine texture take their surroundings' shift, so bright areas keep their local contrast as with Exposure (V1's base kept ~0.6 of it at βˆ’100, #632); region edges stay sharp; from process V8 (`local::detail_free`: clamped between the median at that radius and one 3Γ— wider) lettering keeps clean gaps (the median alone turned them into blocks of the letters' tone). Alt/Option-drag shows highlight clipping | | LR-EDIT-LIGHT-SHADOWS | Shadows | P0 | βœ… | `ctl:light.shadows` | From process V2, the same base as Highlights: dark areas keep their local contrast when lifted (#632); from process V8, the gaps in dark lettering on a bright panel are not lifted into bright blocks. Alt/Option-drag shows shadow clipping (white, clipped channels in colour). From process V13 the global amount eases off as it grows: the operator's strength is `a / (1 + 1.33Β·abs(a))` for `a` = slider / 100 (0.43 at +100, against 1 up to V10), fitted to Lightroom exports (#523). | -| LR-EDIT-LIGHT-WHITES | Whites | P0 | 🟑 | `ctl:light.whites`, `crates/pipeline/src/visualize.rs` | From process V18 Whites is measured against Camera Raw renders of synthetic grey steps and reaches into the midtones as Lightroom's does ([curve-stage.md](curve-stage.md)); not yet compared on photos per camera. V4 to V17 preserve V2 Whites for both signs, and Apple ProRAW keeps Whites in V17's chain under V18 too; measured V2 check response error is 0.075 stops on the Sony test photos (`docs/light-v3.md`). Alt/Option-drag shows highlight clipping (black, clipped channels in colour) | +| LR-EDIT-LIGHT-WHITES | Whites | P0 | 🟑 | `ctl:light.whites`, `crates/pipeline/src/visualize.rs` | From process V18 Whites is measured against Camera Raw renders of synthetic grey steps and reaches into the midtones as Lightroom's does ([curve-stage.md](curve-stage.md)); not yet compared on photos per camera. V4 to V16, and V17 except Apple ProRAW, preserve V2 Whites for both signs; ProRAW uses its chain's fitted Whites from V17, under V18 too; measured V2 check response error is 0.075 stops on the Sony test photos (`docs/light-v3.md`). Alt/Option-drag shows highlight clipping (black, clipped channels in colour) | | LR-EDIT-LIGHT-BLACKS | Blacks | P0 | 🟑 | `ctl:light.blacks`, `crates/pipeline/src/visualize.rs` | From process V4, global Blacks on the camera-look path uses a fitted per-channel/luminance mix. Check response error 0.424 to 0.077 stops on six held-out Sony photos; deepest tones still differ. Other sources and local adjustments retain V2 (`docs/light-v3.md`). Alt/Option-drag shows shadow clipping (white, clipped channels in colour) | | LR-EDIT-LIGHT-CURVE-PARAM | Parametric curve | P0 | βœ… | `ctl:curve.highlights`, `ctl:curve.lights`, `ctl:curve.darks`, `ctl:curve.shadows`, `ctl:curve.split*`, `crates/pipeline/src/curve.rs` | from process V18 the regions are LightCraft's model fitted to Camera Raw's measured response at the default splits, broad and additive ([curve-stage.md](curve-stage.md)); the graph draws the curve the photo renders (`ParametricGraph`: the fitted regions under V18 at the default splits, else the analytic model); dragging the line moves the region under the pointer (one undo step); sampled selected-curve input backdrop (#987); [stage and sampling limits](tone-curve-input.md) | | LR-EDIT-LIGHT-CURVE-POINT | Point curve | P0 | βœ… | `cmd:develop.curve`, `cmd:curve.reset`, `cmd:curve.presets`, `cmd:curve.applyPreset`, `cmd:curve.savePreset`, `cmd:curve.deletePreset`, `cmd:curve.importPresets`, `cmd:curve.exportPresets`, `cmd:file.importCurvePresets`, `cmd:file.exportCurvePresets`, `crates/engine/src/cmd/curves.rs`, `crates/ui-egui/src/panels/edit.rs` | click to add a point; drag a point in both axes (between its neighbours, input / output readout, one undo step per drag; βŒ₯-drag moves it a tenth as far for fine adjustment, issue #1363); drag empty space to add and drag; double-click removes; reset: double-click a channel selector (that channel), the Reset button under the graph (every curve incl. parametric) or right-click the graph (channel / all); Point Curve preset dropdown: own Linear / Medium Contrast / Strong Contrast, user presets (save the current point curves, delete by right-click; saved with the library), import / export as `.lccurve` JSON; from process V18 the master curve keeps hue as Lightroom's does (largest and smallest channel through the curve, the middle one in proportion), and the red, green and blue curves follow it per channel ([curve-stage.md](curve-stage.md)); sampled input after Parametric, independent of this curve (#987); [stage and sampling limits](tone-curve-input.md) | @@ -472,7 +472,7 @@ differences and missing bindings are in [ui-parity.md](ui-parity.md#shortcuts). | LR-BEHAV-OFFLINE | Offline editing | P1 | βœ… | | local-first: everything works offline | | LR-BEHAV-WEB-SAFETY | Library safety in the browser build | P1 | 🟑 | `cmd:file.backupLibrary`, `cmd:file.restoreLibrary`, `apps/lightcraft-web/src/safety.rs`, `apps/lightcraft-web/src/backup.rs`, `apps/lightcraft-web/src/files.rs` | web only (experimental): Back Up Library (zip of the catalog and every stored original) and a non-destructive Restore; failed saves show as unsaved and are retried; a photo that can't be stored isn't added; one tab per library (Web Locks); notices for storage that isn't persistent and for a library that can't open; `?reset` asks first; a panic shows a message. Missing: `?safe` start, deleting originals of removed photos, zip64 (backups > 4 GB) | | LR-BEHAV-GPU | GPU acceleration | P0 | βœ… | `crates/gpu/src/render.rs`, `cmd:app.gpu`, `docs/gpu-pipeline.md`, `crates/ui-egui/src/panels/notices.rs` | CPU fallback per render on device limits, out of memory, device errors / loss, incomplete or black results (`perf.gpuReason`, `perf.gpuFallback`; each render reports its own reason β€” `lightcraft_gpu::try_render`, `gpuFallback` per exported file β€” issue #675); short submissions for slow iGPUs; backend choice (DX12 only on Windows, `LIGHTCRAFT_GPU_BACKEND` / `WGPU_BACKEND`), device created after the window opens, crash sentinel (issue #136); a GPU lost while LightCraft runs (driver reset) stops it with that message and turns GPU rendering off for the next start, which says why (issue #1337; the window's renderer can't survive the lost device); quitting waits (up to 2 s) for renders in flight and starts no new GPU work, so none is inside the driver when the process exits (`crates/gpu/src/exit.rs`, issue #620; seen crashing only on Linux + NVIDIA, other drivers unverified); with GPU rendering on and no adapter found at all (e.g. no Vulkan loader on NixOS outside `nix develop`), the desktop app says once per session that it renders on the CPU and points to Help β–Έ System Info (`gpu_notice`; not when the GPU is turned off or only a software adapter exists); no tiling beyond the buffer limit (CPU) | -| LR-BEHAV-RENDER-FIDELITY | Rendering matches Lightroom | P1 | 🟑 | `crates/pipeline/src/lib.rs`, `crates/pipeline/src/tone.rs`, `crates/pipeline/src/proraw.rs` | Process V4 calibrates global camera-look Contrast and Blacks against black-box Lightroom exports of Sony ILCE-7CR photos. Held-out response errors are 0.038 and 0.077 stops; V1/V2 keep their rendering. V4 to V17 keep V2 Whites (V18 measures it, below; Apple ProRAW keeps V17's chain). Exposure, Highlights/Shadows, other operators and broader camera coverage remain open (`docs/light-v3.md`). From process V18 Whites, the parametric curve (at the default splits; moved splits keep the analytic model) and the point curves follow Camera Raw's measured response on synthetic grey steps, the master curve hue-preserving ([curve-stage.md](curve-stage.md)). From process V5 a raw's tone curve rolls off into white in stops (past a camera curve's last fitted knot, or from half a stop below the generic curve's white point instead of clipping), so Exposure +1 and +2 keep the highlights the sensor recorded: on 12 CC0 corpus raws and 6 CC0 DNGs on the generic curve, unclipped pixels whose luminance renders at 254 or more fall from up to 22.5 % to 0 at +1 EV and from up to 35 % to at most 0.03 % at +2 EV, apart from one sky that is mostly at the clip (#1632). Not compared with Lightroom's output. From process V13 global Shadows eases off at large amounts (`finish::tone_slider`, +100 at 0.43 of V6), fitted to 56 Lightroom exports of real Canon portrait edits at Shadows +40 to +100; with negative Texture and the Global wheel, mean Ξ”E on those exports 9.5 β†’ 9.0. Global Highlights stays linear: on those edits V6 renders the brightest tones about 5 L* too dark, but single-slider exports show Lightroom's Highlights response close to linear and dependent on the frame's content (#3923), so that coverage-dependent strength, and smaller Shadows amounts, remain open. From process V17 Apple ProRAW (Make Apple and a `ProfileToneCurve`) takes Lightroom Classic's tone chain: base operator, Highlights / Shadows on a neighbourhood of the photo, Whites, Blacks, the profile curve per channel, Contrast adapting to the image; closed-form operators fitted on one CC0 iPhone 12 Pro file against Lightroom Classic 15.6 exports, mean CIEDE2000 unedited 2.93 β†’ 1.05 and the 12 single tone-slider renders 3.73 β†’ 1.22 (#613). Other cameras keep the operators above | +| LR-BEHAV-RENDER-FIDELITY | Rendering matches Lightroom | P1 | 🟑 | `crates/pipeline/src/lib.rs`, `crates/pipeline/src/tone.rs`, `crates/pipeline/src/proraw.rs` | Process V4 calibrates global camera-look Contrast and Blacks against black-box Lightroom exports of Sony ILCE-7CR photos. Held-out response errors are 0.038 and 0.077 stops; V1/V2 keep their rendering. V4 to V16, and V17 except Apple ProRAW, keep V2 Whites; ProRAW uses its chain's fitted Whites from V17, and V18 measures Whites for other photos (below). Exposure, Highlights/Shadows, other operators and broader camera coverage remain open (`docs/light-v3.md`). From process V18 Whites, the parametric curve (at the default splits; moved splits keep the analytic model) and the point curves follow Camera Raw's measured response on synthetic grey steps, the master curve hue-preserving ([curve-stage.md](curve-stage.md)). From process V5 a raw's tone curve rolls off into white in stops (past a camera curve's last fitted knot, or from half a stop below the generic curve's white point instead of clipping), so Exposure +1 and +2 keep the highlights the sensor recorded: on 12 CC0 corpus raws and 6 CC0 DNGs on the generic curve, unclipped pixels whose luminance renders at 254 or more fall from up to 22.5 % to 0 at +1 EV and from up to 35 % to at most 0.03 % at +2 EV, apart from one sky that is mostly at the clip (#1632). Not compared with Lightroom's output. From process V13 global Shadows eases off at large amounts (`finish::tone_slider`, +100 at 0.43 of V6), fitted to 56 Lightroom exports of real Canon portrait edits at Shadows +40 to +100; with negative Texture and the Global wheel, mean Ξ”E on those exports 9.5 β†’ 9.0. Global Highlights stays linear: on those edits V6 renders the brightest tones about 5 L* too dark, but single-slider exports show Lightroom's Highlights response close to linear and dependent on the frame's content (#3923), so that coverage-dependent strength, and smaller Shadows amounts, remain open. From process V17 Apple ProRAW (Make Apple and a `ProfileToneCurve`) takes Lightroom Classic's tone chain: base operator, Highlights / Shadows on a neighbourhood of the photo, Whites, Blacks, the profile curve per channel, Contrast adapting to the image; closed-form operators fitted on one CC0 iPhone 12 Pro file against Lightroom Classic 15.6 exports, mean CIEDE2000 unedited 2.93 β†’ 1.05 and the 12 single tone-slider renders 3.73 β†’ 1.22 (#613). Other cameras keep the operators above | | LR-BEHAV-DRAGDROP | Drag and drop | P1 | βœ… | `crates/ui-egui/src/lib.rs`, `crates/ui-egui/src/panels/grid.rs` (`drag_feedback`), `crates/ui-egui/src/panels/left.rs` (`drop_target`, `album_drag_over`, `top_level_drop_target`, `drag_auto_scroll`), `crates/ui-egui/src/tests/drag_contract.rs`, `crates/ui-egui/src/destination.rs`, `crates/ui-egui/src/widgets.rs` (`context_menu`), `crates/ui-egui/src/widgets/text_field.rs`, `crates/ui-egui/src/tests/carried_right_click.rs`, `crates/ui-egui/src/tests/carried_text_field_menu.rs` | a right-click while photos are carried opens no context menu (every menu opened through `widgets::context_menu`: sidebar rows, grid cells, lists; a text field's own Cut / Copy / Paste menu too); files β†’ app (a drop-target card while they hover, then the import review); grid photos β†’ an album row (the dragged label says how many photos it adds, or that they are all there already, and a drop then does nothing, with no undo step; a drop that finds some there says so in its toast); a smart album, an album folder and the sidebar's Keywords rows refuse photos with the not-allowed cursor and a reason, on the label and in the toast; Esc gives up any drag (photos, albums, sidebar sections, keywords) and does nothing else; sidebar album / folder rows β†’ a folder (moves it; its name follows the pointer); a drag of albums or grid photos near the top or bottom edge of the sidebar scrolls it (faster nearer the edge, only while the pointer is over the sidebar); when another folder has the same name, the dragged label, the Move question and the toast name the folder it is in (`home (/a)`); an album drop's toast does the same for an album of that name in another album folder (two in the same place have nothing to tell them apart and keep the plain name); only the primary button drags photos and drops them: a right-button drag over a grid cell neither picks photos up nor changes the selection, and a right-button release while photos are dragged neither drops them nor ends the drag | | LR-BEHAV-TOAST | Toast notifications | P1 | βœ… | `crates/ui-egui/src/panels.rs` | | | LR-BEHAV-DIALOGS | Dialogs fit the window | P1 | βœ… | `crates/ui-egui/src/dialogs.rs` (`dialog_body`, `list_height`), `crates/ui-egui/src/tests/dialog_fit.rs`, `crates/ui-egui/src/tests/dialog_copy.rs`, `crates/ui-egui/src/tests/dialogs.rs` (`a_click_outside_closes_the_dialog_when_settings_allow_it`) | a dialog taller than the window (Export on a 1366Γ—768 screen, issue #781) never runs off it: its options scroll while the title bar and the Cancel / confirm row stay on screen (the confirm button names its action: Create, Rename, Create Stacks, Export 3 Photos…, with "OK" kept only for a one-field prompt opened with a command that has no verb, `crates/ui-egui/src/tests/dialog_copy.rs`); lists that scroll on their own (What's New, All Metadata, shortcuts, smart-album rules, credits) get shorter first; dialogs that fit look as before; Import keeps its own resizable, scrolling window; Settings β†’ Dialogs β†’ Close a dialog by clicking outside it (off by default, so a stray click never throws away a dialog's choices): a click pressed and released on the dimmed backdrop closes the dialog like Esc and doesn't reach the panels below, while a drag that ends outside (a slider pulled past the edge) or a click that closes a dropdown keeps it; the import review never closes this way (`clicked_backdrop`); a one-line prompt (Rename Folder, New Folder on Disk, the preset and version names, New Library when its name can't be used, Auto-Tag from Tracklog) the engine refuses stays open with its text and shows the reason in a toast, so the name can be corrected, where it used to close without a word; a New Folder on Disk that works says so (β€œCreated folder β€œSelects” in β€œ2026/Shoot””, naming the parent by its last two folders as dialogs do) | diff --git a/docs/process-versions.md b/docs/process-versions.md index 40ac7579e79..89165f78e0a 100644 --- a/docs/process-versions.md +++ b/docs/process-versions.md @@ -25,7 +25,7 @@ stronger Light sliders, issue #196) without changing a single photo someone has | **V15** | V14 plus: brush Flow is the coverage a stroke adds per brush radius it travels, as in Lightroom Classic (#4045): each dab adds `1 βˆ’ (1 βˆ’ flow)^(d / r)` for a dab `d` past the previous one (the first dab counts one radius, so a click paints its flow), `masks::travel_flow`. A point a stroke passes over for a length `L` is then covered by `1 βˆ’ (1 βˆ’ flow)^(L / r)` however densely the dabs lie: a straight stroke's centre by 44 % at Flow 25 and 75 % at Flow 50, where Lightroom Classic measures 41 % and 76 % on a grey card. V1 to V14 add the full flow per dab (r/4 apart on a fast drag, closer on a slow one): 90 % at Flow 25 on a fast stroke, more on a slow one. CPU (`masks::brush_dabs_within`), GPU (a flow per dab in the `shape` kernel's brush data) and the live stroke (`brush_live`, the masking and Lens Blur brushes) all branch on `masks::flow_per_radius`. Renders without brush strokes, or with Flow 100 only, are the same as V14's. | | **V16** | V15 plus: a brush stroke's edge is feathered as one dab's is. Each stroke keeps its Flow build-up (every dab that reaches a pixel adds its flow, `masks::feather_dab`) apart from its edge (the highest falloff of those dabs), and covers their product up to Density (`masks::stroke_coverage`). V1 to V15 accumulate each dab's falloff times its flow, so the soft edges of dabs r/4 apart piled up: at Feather 100 and Flow 100 a straight stroke covered 0.90 halfway out from its centre line, where one dab covers 0.50; V16 covers 0.50. Below Flow 100 the centre now builds up by Flow per radius travelled whatever the Feather (a straight stroke's 44 % at Flow 25), where V15 also weakened a soft brush's centre (25 %). CPU (`masks::rasterize_brush`), GPU (a stroke-record word in the `shape` kernel's brush data) and the live stroke (`brush_live`, the masking and Lens Blur brushes) branch on `masks::stroke_feather`. Auto Mask strokes keep V15's accumulation (their edge follows the photo's edges, not the feather). Renders without brush strokes, or with Feather 0 or Auto Mask brushes only, are the same as V15's; a saved V1 to V15 photo keeps its strokes until Update to Current Process. | | **V17** | V16 plus: Apple ProRAW (Make `Apple` and a DNG `ProfileToneCurve`) renders its Light sliders through Lightroom Classic's fitted tone chain (`crates/pipeline/src/proraw.rs`, #613): base operator (BaselineExposure + Exposure), Highlights / Shadows on a Gaussian neighbourhood at 6.4 % of the long edge, Whites, Blacks, the 128-knot profile tone curve per channel (hue-preserving in linear ProPhoto), then Contrast adapting to the image's key. HDR keeps the chain through the midtones and lifts highlights past white (`camera_hdr_lift`). V1 to V16 keep the 32-knot camera curve on luminance; non-ProRAW photos and older offline smart previews without the curve render identically to V16. CPU and GPU share the stage tables and Highlights / Shadows curves. | -| **V18** (the latest) | V17 plus: Whites, the parametric curve and the point curves as Lightroom applies them ([curve-stage.md](curve-stage.md), `crates/pipeline/src/curve_stage.rs`), measured on Camera Raw renders of synthetic grey steps. Whites leaves the tone map (Apple ProRAW keeps Whites in V17's chain, and the stage then applies only the curves) and, with the parametric curve at Lightroom's default splits, comes from LightCraft's model fitted to those measurements (Whites reaches into the midtones; the regions are broad and add; moved splits keep the analytic model of V1 to V17); the master curve acts hue-preserving on sRGB-encoded linear ProPhoto RGB (largest and smallest channel through the curve, the middle one in proportion in linear light), then the red, green and blue curves per channel, between the calibrated Contrast and Blacks and the colour stage. V1 to V17 keep Whites in the tone map and their per-channel curves on the output. CPU (`finish::finish_with`) and GPU (`finish.wgsl::curve_stage`) share the curve tables built from the model. With Whites, the parametric curve and the point curves neutral the curve stage does not run. | +| **V18** (the latest) | V17 plus: Whites, the parametric curve and the point curves as Lightroom applies them ([curve-stage.md](curve-stage.md), `crates/pipeline/src/curve_stage.rs`), measured on Camera Raw renders of synthetic grey steps. Whites leaves the tone map (Apple ProRAW keeps Whites in V17's chain, and the stage then applies only the curves) and, with the parametric curve at Lightroom's default splits, comes from LightCraft's model fitted to those measurements (Whites reaches into the midtones; the regions are broad and add; moved splits keep the analytic model of V1 to V17); the master curve acts hue-preserving on sRGB-encoded linear ProPhoto RGB (largest and smallest channel through the curve, the middle one in proportion in linear light), then the red, green and blue curves per channel, between the calibrated Contrast and Blacks and the colour stage. V1 to V17 keep Whites in the tone map (Apple ProRAW from V17: in its own chain) and their per-channel curves on the output. CPU (`finish::finish_with`) and GPU (`finish.wgsl::curve_stage`) share the curve tables built from the model. With Whites, the parametric curve and the point curves neutral the curve stage does not run. | ## The rule From e382eef1c2a342ba88b8ac037cef7847fbd0fe82 Mon Sep 17 00:00:00 2001 From: smi-leonivkovic Date: Thu, 3 Dec 2026 19:13:13 +0100 Subject: [PATCH 51/51] docs(parity): the point curves keep LightCraft's spline shape; only how they apply is measured (review on #4084) --- docs/parity-checklist.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/parity-checklist.md b/docs/parity-checklist.md index 476f810c3b2..22ed80d8cd5 100644 --- a/docs/parity-checklist.md +++ b/docs/parity-checklist.md @@ -472,7 +472,7 @@ differences and missing bindings are in [ui-parity.md](ui-parity.md#shortcuts). | LR-BEHAV-OFFLINE | Offline editing | P1 | βœ… | | local-first: everything works offline | | LR-BEHAV-WEB-SAFETY | Library safety in the browser build | P1 | 🟑 | `cmd:file.backupLibrary`, `cmd:file.restoreLibrary`, `apps/lightcraft-web/src/safety.rs`, `apps/lightcraft-web/src/backup.rs`, `apps/lightcraft-web/src/files.rs` | web only (experimental): Back Up Library (zip of the catalog and every stored original) and a non-destructive Restore; failed saves show as unsaved and are retried; a photo that can't be stored isn't added; one tab per library (Web Locks); notices for storage that isn't persistent and for a library that can't open; `?reset` asks first; a panic shows a message. Missing: `?safe` start, deleting originals of removed photos, zip64 (backups > 4 GB) | | LR-BEHAV-GPU | GPU acceleration | P0 | βœ… | `crates/gpu/src/render.rs`, `cmd:app.gpu`, `docs/gpu-pipeline.md`, `crates/ui-egui/src/panels/notices.rs` | CPU fallback per render on device limits, out of memory, device errors / loss, incomplete or black results (`perf.gpuReason`, `perf.gpuFallback`; each render reports its own reason β€” `lightcraft_gpu::try_render`, `gpuFallback` per exported file β€” issue #675); short submissions for slow iGPUs; backend choice (DX12 only on Windows, `LIGHTCRAFT_GPU_BACKEND` / `WGPU_BACKEND`), device created after the window opens, crash sentinel (issue #136); a GPU lost while LightCraft runs (driver reset) stops it with that message and turns GPU rendering off for the next start, which says why (issue #1337; the window's renderer can't survive the lost device); quitting waits (up to 2 s) for renders in flight and starts no new GPU work, so none is inside the driver when the process exits (`crates/gpu/src/exit.rs`, issue #620; seen crashing only on Linux + NVIDIA, other drivers unverified); with GPU rendering on and no adapter found at all (e.g. no Vulkan loader on NixOS outside `nix develop`), the desktop app says once per session that it renders on the CPU and points to Help β–Έ System Info (`gpu_notice`; not when the GPU is turned off or only a software adapter exists); no tiling beyond the buffer limit (CPU) | -| LR-BEHAV-RENDER-FIDELITY | Rendering matches Lightroom | P1 | 🟑 | `crates/pipeline/src/lib.rs`, `crates/pipeline/src/tone.rs`, `crates/pipeline/src/proraw.rs` | Process V4 calibrates global camera-look Contrast and Blacks against black-box Lightroom exports of Sony ILCE-7CR photos. Held-out response errors are 0.038 and 0.077 stops; V1/V2 keep their rendering. V4 to V16, and V17 except Apple ProRAW, keep V2 Whites; ProRAW uses its chain's fitted Whites from V17, and V18 measures Whites for other photos (below). Exposure, Highlights/Shadows, other operators and broader camera coverage remain open (`docs/light-v3.md`). From process V18 Whites, the parametric curve (at the default splits; moved splits keep the analytic model) and the point curves follow Camera Raw's measured response on synthetic grey steps, the master curve hue-preserving ([curve-stage.md](curve-stage.md)). From process V5 a raw's tone curve rolls off into white in stops (past a camera curve's last fitted knot, or from half a stop below the generic curve's white point instead of clipping), so Exposure +1 and +2 keep the highlights the sensor recorded: on 12 CC0 corpus raws and 6 CC0 DNGs on the generic curve, unclipped pixels whose luminance renders at 254 or more fall from up to 22.5 % to 0 at +1 EV and from up to 35 % to at most 0.03 % at +2 EV, apart from one sky that is mostly at the clip (#1632). Not compared with Lightroom's output. From process V13 global Shadows eases off at large amounts (`finish::tone_slider`, +100 at 0.43 of V6), fitted to 56 Lightroom exports of real Canon portrait edits at Shadows +40 to +100; with negative Texture and the Global wheel, mean Ξ”E on those exports 9.5 β†’ 9.0. Global Highlights stays linear: on those edits V6 renders the brightest tones about 5 L* too dark, but single-slider exports show Lightroom's Highlights response close to linear and dependent on the frame's content (#3923), so that coverage-dependent strength, and smaller Shadows amounts, remain open. From process V17 Apple ProRAW (Make Apple and a `ProfileToneCurve`) takes Lightroom Classic's tone chain: base operator, Highlights / Shadows on a neighbourhood of the photo, Whites, Blacks, the profile curve per channel, Contrast adapting to the image; closed-form operators fitted on one CC0 iPhone 12 Pro file against Lightroom Classic 15.6 exports, mean CIEDE2000 unedited 2.93 β†’ 1.05 and the 12 single tone-slider renders 3.73 β†’ 1.22 (#613). Other cameras keep the operators above | +| LR-BEHAV-RENDER-FIDELITY | Rendering matches Lightroom | P1 | 🟑 | `crates/pipeline/src/lib.rs`, `crates/pipeline/src/tone.rs`, `crates/pipeline/src/proraw.rs` | Process V4 calibrates global camera-look Contrast and Blacks against black-box Lightroom exports of Sony ILCE-7CR photos. Held-out response errors are 0.038 and 0.077 stops; V1/V2 keep their rendering. V4 to V16, and V17 except Apple ProRAW, keep V2 Whites; ProRAW uses its chain's fitted Whites from V17, and V18 measures Whites for other photos (below). Exposure, Highlights/Shadows, other operators and broader camera coverage remain open (`docs/light-v3.md`). From process V18 Whites, the parametric curve (at the default splits; moved splits keep the analytic model) follow Camera Raw's measured response on synthetic grey steps; the point curves keep LightCraft's spline shape and apply as Lightroom applies them (measured on the same steps), the master curve hue-preserving ([curve-stage.md](curve-stage.md)). From process V5 a raw's tone curve rolls off into white in stops (past a camera curve's last fitted knot, or from half a stop below the generic curve's white point instead of clipping), so Exposure +1 and +2 keep the highlights the sensor recorded: on 12 CC0 corpus raws and 6 CC0 DNGs on the generic curve, unclipped pixels whose luminance renders at 254 or more fall from up to 22.5 % to 0 at +1 EV and from up to 35 % to at most 0.03 % at +2 EV, apart from one sky that is mostly at the clip (#1632). Not compared with Lightroom's output. From process V13 global Shadows eases off at large amounts (`finish::tone_slider`, +100 at 0.43 of V6), fitted to 56 Lightroom exports of real Canon portrait edits at Shadows +40 to +100; with negative Texture and the Global wheel, mean Ξ”E on those exports 9.5 β†’ 9.0. Global Highlights stays linear: on those edits V6 renders the brightest tones about 5 L* too dark, but single-slider exports show Lightroom's Highlights response close to linear and dependent on the frame's content (#3923), so that coverage-dependent strength, and smaller Shadows amounts, remain open. From process V17 Apple ProRAW (Make Apple and a `ProfileToneCurve`) takes Lightroom Classic's tone chain: base operator, Highlights / Shadows on a neighbourhood of the photo, Whites, Blacks, the profile curve per channel, Contrast adapting to the image; closed-form operators fitted on one CC0 iPhone 12 Pro file against Lightroom Classic 15.6 exports, mean CIEDE2000 unedited 2.93 β†’ 1.05 and the 12 single tone-slider renders 3.73 β†’ 1.22 (#613). Other cameras keep the operators above | | LR-BEHAV-DRAGDROP | Drag and drop | P1 | βœ… | `crates/ui-egui/src/lib.rs`, `crates/ui-egui/src/panels/grid.rs` (`drag_feedback`), `crates/ui-egui/src/panels/left.rs` (`drop_target`, `album_drag_over`, `top_level_drop_target`, `drag_auto_scroll`), `crates/ui-egui/src/tests/drag_contract.rs`, `crates/ui-egui/src/destination.rs`, `crates/ui-egui/src/widgets.rs` (`context_menu`), `crates/ui-egui/src/widgets/text_field.rs`, `crates/ui-egui/src/tests/carried_right_click.rs`, `crates/ui-egui/src/tests/carried_text_field_menu.rs` | a right-click while photos are carried opens no context menu (every menu opened through `widgets::context_menu`: sidebar rows, grid cells, lists; a text field's own Cut / Copy / Paste menu too); files β†’ app (a drop-target card while they hover, then the import review); grid photos β†’ an album row (the dragged label says how many photos it adds, or that they are all there already, and a drop then does nothing, with no undo step; a drop that finds some there says so in its toast); a smart album, an album folder and the sidebar's Keywords rows refuse photos with the not-allowed cursor and a reason, on the label and in the toast; Esc gives up any drag (photos, albums, sidebar sections, keywords) and does nothing else; sidebar album / folder rows β†’ a folder (moves it; its name follows the pointer); a drag of albums or grid photos near the top or bottom edge of the sidebar scrolls it (faster nearer the edge, only while the pointer is over the sidebar); when another folder has the same name, the dragged label, the Move question and the toast name the folder it is in (`home (/a)`); an album drop's toast does the same for an album of that name in another album folder (two in the same place have nothing to tell them apart and keep the plain name); only the primary button drags photos and drops them: a right-button drag over a grid cell neither picks photos up nor changes the selection, and a right-button release while photos are dragged neither drops them nor ends the drag | | LR-BEHAV-TOAST | Toast notifications | P1 | βœ… | `crates/ui-egui/src/panels.rs` | | | LR-BEHAV-DIALOGS | Dialogs fit the window | P1 | βœ… | `crates/ui-egui/src/dialogs.rs` (`dialog_body`, `list_height`), `crates/ui-egui/src/tests/dialog_fit.rs`, `crates/ui-egui/src/tests/dialog_copy.rs`, `crates/ui-egui/src/tests/dialogs.rs` (`a_click_outside_closes_the_dialog_when_settings_allow_it`) | a dialog taller than the window (Export on a 1366Γ—768 screen, issue #781) never runs off it: its options scroll while the title bar and the Cancel / confirm row stay on screen (the confirm button names its action: Create, Rename, Create Stacks, Export 3 Photos…, with "OK" kept only for a one-field prompt opened with a command that has no verb, `crates/ui-egui/src/tests/dialog_copy.rs`); lists that scroll on their own (What's New, All Metadata, shortcuts, smart-album rules, credits) get shorter first; dialogs that fit look as before; Import keeps its own resizable, scrolling window; Settings β†’ Dialogs β†’ Close a dialog by clicking outside it (off by default, so a stray click never throws away a dialog's choices): a click pressed and released on the dimmed backdrop closes the dialog like Esc and doesn't reach the panels below, while a drag that ends outside (a slider pulled past the edge) or a click that closes a dropdown keeps it; the import review never closes this way (`clicked_backdrop`); a one-line prompt (Rename Folder, New Folder on Disk, the preset and version names, New Library when its name can't be used, Auto-Tag from Tracklog) the engine refuses stays open with its text and shows the reason in a toast, so the name can be corrected, where it used to close without a word; a New Folder on Disk that works says so (β€œCreated folder β€œSelects” in β€œ2026/Shoot””, naming the parent by its last two folders as dialogs do) |