Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
c739e1b
LR-CI: fix Rust 1.95 lints and standard-font menu hints
r3d42-git Oct 27, 2026
8975b2e
LR-PROF-CAMERACOLOR: align CR3 calibration with resolved lens profiles
r3d42-git Oct 27, 2026
8f3412c
LR-CI: document functions touched by readiness fixes
r3d42-git Oct 27, 2026
979461b
LR-PROF-CAMERACOLOR: document calibration geometry and regression hel…
r3d42-git Oct 27, 2026
49f4cd6
LR-PROF-CAMERACOLOR: report unavailable CR3 diagnostic proxies
r3d42-git Oct 27, 2026
c0f1aa3
LR-PROF-CAMERACOLOR: synchronize CR3 calibration with current main
r3d42-git Oct 28, 2026
4486c1b
LR-PROF-CAMERACOLOR: synchronize CR3 geometry with main
r3d42-git Nov 1, 2026
3a8dbe9
LR-PROF-CAMERACOLOR: exercise as-shot WB with vignetted CR3 geometry
r3d42-git Nov 1, 2026
71ceb01
LR-PROF-CAMERACOLOR: compare geometry proposals on common edges
r3d42-git Nov 1, 2026
eee56f1
LR-PROF-CAMERACOLOR: verify CR3 geometry mask coverage
r3d42-git Nov 2, 2026
ca329e6
LR-PROF-CAMERACOLOR: reconcile CR3 proposal with current main
r3d42-git Nov 3, 2026
be5ebcc
LR-PROF-CAMERACOLOR: synchronize CR3 proposal with current upstream
r3d42-git Nov 4, 2026
d01b48e
LR-PROF-CAMERACOLOR: retain CR3 scope alongside upstream mask geometry
r3d42-git Nov 4, 2026
25b6ce0
LR-PROF-CAMERACOLOR: reconcile renewed CR3 upstream conflicts
r3d42-git Nov 4, 2026
1031d05
LR-PROF-CAMERACOLOR: synchronize CR3 proposal with current upstream
r3d42-git Nov 5, 2026
61b4c49
LR-PROF-CAMERACOLOR: preserve CR3 scope with prepared culling views
r3d42-git Nov 5, 2026
109011e
LR-PROF-CAMERACOLOR: retain raw decode options in CR3 proxy refresh
r3d42-git Nov 5, 2026
0cf64ff
LR-PROF-CAMERACOLOR: integrate current main and retain geometry regre…
r3d42-git Nov 5, 2026
25d29d7
LR-PROF-CAMERACOLOR: publish known activity totals before worker disp…
r3d42-git Nov 5, 2026
147cda1
LR-PROF-CAMERACOLOR: narrow standalone cr3 geometry scope
r3d42-git Nov 6, 2026
9eb05fa
LR-PROF-CAMERACOLOR: avoid CR3 correspondence buffer clones
r3d42-git Nov 8, 2026
2a8f8da
LR-PROF-CAMERACOLOR: fit CR3 DNG tags without external shading
r3d42-git Nov 16, 2026
642e924
LR-PROF-CAMERACOLOR: merge current main and retain CR3 contracts
r3d42-git Nov 18, 2026
3135bd9
LR-PROF-CAMERACOLOR: keep CR3 diagnostic reports unambiguous
r3d42-git Nov 18, 2026
099b62d
Merge upstream main and retain camera profile cache invalidation
r3d42-git Nov 19, 2026
a680985
Keep the loaded camera profile fingerprint across lens reloads
r3d42-git Nov 19, 2026
971deb7
Preserve pooled CR3 color pairs when profile geometry falls back
r3d42-git Nov 19, 2026
d7dd445
Merge upstream main and preserve Smart Preview provenance
r3d42-git Nov 25, 2026
e7f55d5
Keep Smart Preview scans valid across LensDB changes
r3d42-git Nov 25, 2026
2e54242
Port CR3 profile alignment to current camera calibration
r3d42-git Nov 26, 2026
5e4e4f2
Keep CR3 diagnostic PNGs keyed by the native filename
r3d42-git Nov 26, 2026
da832f0
Preserve valid CR3 correspondence samples at invalid borders
r3d42-git Nov 27, 2026
23eabbb
Start the CR3 port from main after the shared preview changes landed
r3d42-git Nov 28, 2026
b7c3877
Align CR3 camera preview samples against the resolved lens and framin…
r3d42-git Nov 28, 2026
3295921
Refresh Smart Previews and cached renders after the CR3 look changes
r3d42-git Nov 28, 2026
055fba8
Clarify CR3 shading and surface corpus fixture read errors
r3d42-git Nov 28, 2026
8443441
Merge main into r3d/cr3-profile-alignment
FredApps Dec 2, 2026
1e5d829
Compare pooled CR3 warps with the unshaded fallback and isolate diagn…
r3d42-git Dec 2, 2026
4a43918
Synchronize denoiser model-change tests with worker completion
r3d42-git Dec 2, 2026
a5c5311
Verify fixed-mount CR3 correspondence through the shared lens lookup
r3d42-git Dec 2, 2026
95fa914
Distinguish frame and calibration crop factors in CR3 lookup
r3d42-git Dec 2, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion crates/engine/src/camera_preview.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ use tone::{HighlightCheck, ToneFit, fit_tone, fit_tone_conditional, highlights};
/// dark, with skewed colour. The same for a DNG's tone fit; a CR3 proxy gets the gain where its framed pixels come from.
/// 27: geometry-gated external lens and camera framing for JPEG calibration correspondences.
/// 28: a fitted matrix whose rows aren't led by their own channel is refused (#3973).
pub const LOOK_VERSION: u32 = 28;
/// 29: resolved lens geometry can align CR3 camera-JPEG colour and tone samples against the existing framing fallback.
pub const LOOK_VERSION: u32 = 29;

#[derive(Clone, Debug)]
pub(crate) struct CameraLook {
Expand Down
7 changes: 2 additions & 5 deletions crates/engine/src/camera_preview/colour.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,8 @@ pub(super) fn starting_colour_with(
(xy, t, look.or_else(|| dark(raw, &t)))
}

/// Additional profile resolution for this proposal's pooled/DNG routes; CR3 keeps Main's route.
/// Resolve the file or database correction before the pooled and DNG colour fits remove lens opcodes.
pub(crate) fn correspondence_correction(raw: &RawImage, bytes: &[u8]) -> Option<lightcraft_develop::EmbeddedLens> {
if raw.format == RawFormat::Cr3 {
return None;
}
crate::lens_profiles::for_raw(&raw.info(), || lightcraft_meta::extract(bytes))
Comment thread
r3d42-git marked this conversation as resolved.
Resolved
}

Expand All @@ -152,7 +149,7 @@ pub(super) fn starting_colour_tags_with_correction(
bytes: &[u8],
correction: Option<&lightcraft_develop::EmbeddedLens>,
) -> Option<ColorData> {
let correction = correction.filter(|_| raw.format != RawFormat::Cr3).map(|correction| lightcraft_develop::EmbeddedLens {
let correction = correction.map(|correction| lightcraft_develop::EmbeddedLens {
vignette: crate::files::embedded_lens(&raw.info()).and_then(|lens| lens.vignette),
..*correction
});
Expand Down
21 changes: 13 additions & 8 deletions crates/engine/src/camera_preview/look_fit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ pub(super) fn database_vignetting(
reference: &Rgb32f,
clipped: &[bool],
vignette: &lightcraft_develop::EmbeddedVignette,
frame: ProxyFrame,
frame: ProxyFrame<'_>,
) {
let amount = camera_vignetting_amount(sensor, reference, clipped, vignette, frame);
apply_vignetting(sensor, vignette, frame, amount);
Expand All @@ -338,15 +338,17 @@ pub(super) fn database_vignetting(
/// moved to its camera JPEG's framing, [`super::proxy::framed_proxies`]) takes each pixel to the position it shows, and
/// `orientation` maps that position to the oriented frame.
#[derive(Clone, Copy, Debug)]
pub(super) struct ProxyFrame {
pub(super) struct ProxyFrame<'a> {
pub(super) orientation: lightcraft_geom::Orientation,
pub(super) framing: Option<Cr3Framing>,
/// Accepted lens warp in the oriented CR3 crop, applied after the JPEG framing.
pub(super) lens: Option<&'a lightcraft_develop::EmbeddedLens>,
}

impl ProxyFrame {
impl ProxyFrame<'_> {
/// A proxy whose pixels are where they were sampled, in the frame `orientation` maps to the oriented one.
pub(super) fn new(orientation: lightcraft_geom::Orientation) -> Self {
Self { orientation, framing: None }
Self { orientation, framing: None, lens: None }
}
}

Expand Down Expand Up @@ -404,7 +406,7 @@ pub(super) fn camera_vignetting_amount(
reference: &Rgb32f,
clipped: &[bool],
vignette: &lightcraft_develop::EmbeddedVignette,
frame: ProxyFrame,
frame: ProxyFrame<'_>,
) -> f64 {
vignetting_amount_from_gains(sensor, reference, clipped, vignetting_gains(sensor, vignette, frame))
}
Expand Down Expand Up @@ -450,10 +452,11 @@ pub(super) fn vignetting_amount_from_gains(sensor: &Rgb32f, reference: &Rgb32f,

/// The render's vignetting gain (`optics::embedded_vignette_gain`) at each pixel of `sensor`, at the position `frame`
/// gives it in the oriented, cropped frame `vignette` is in.
pub(super) fn vignetting_gains(sensor: &Rgb32f, vignette: &lightcraft_develop::EmbeddedVignette, frame: ProxyFrame) -> Vec<f64> {
pub(super) fn vignetting_gains(sensor: &Rgb32f, vignette: &lightcraft_develop::EmbeddedVignette, frame: ProxyFrame<'_>) -> Vec<f64> {
let (w, h) = (sensor.width as f64, sensor.height as f64);
let (ow, oh) = if frame.orientation.swaps_axes() { (h, w) } else { (w, h) };
let width = sensor.width.max(1);
let warp = frame.lens.map(|lens| super::proxy::profile_warp(lens, ow, oh));
(0..sensor.data.len())
.map(|i| {
let (px, py) = ((i % width) as f64 + 0.5, (i / width) as f64 + 0.5);
Expand All @@ -465,13 +468,15 @@ pub(super) fn vignetting_gains(sensor: &Rgb32f, vignette: &lightcraft_develop::E
None => (px, py),
};
let (x, y) = frame.orientation.map(px, py, w, h);
lightcraft_pipeline::optics::embedded_vignette_gain(vignette, lightcraft_geom::Point::new(x, y), ow, oh)
let point = lightcraft_geom::Point::new(x, y);
let point = warp.as_ref().map_or(point, |warp| warp.corrected_to_source(point, 1));
lightcraft_pipeline::optics::embedded_vignette_gain(vignette, point, ow, oh)
})
.collect()
}

/// Multiply `sensor` by `amount` of `vignette`'s correction, as the Vignetting amount slider scales it.
pub(super) fn apply_vignetting(sensor: &mut Rgb32f, vignette: &lightcraft_develop::EmbeddedVignette, frame: ProxyFrame, amount: f64) {
pub(super) fn apply_vignetting(sensor: &mut Rgb32f, vignette: &lightcraft_develop::EmbeddedVignette, frame: ProxyFrame<'_>, amount: f64) {
let gains = vignetting_gains(sensor, vignette, frame);
for (p, g) in sensor.data.iter_mut().zip(gains) {
let gain = (1.0 + (g - 1.0) * amount) as f32;
Expand Down
Loading
Loading