mirror of
https://github.com/storytold/lightcraft.git
synced 2026-12-01 18:35:04 -06:00
Merge current main into library folder safety work
This commit is contained in:
+12
-5
@@ -6,8 +6,13 @@ through Metal on macOS, on the CPU elsewhere (for now). If the Mac's GPU can't r
|
||||
the CPU (see the worker below).
|
||||
|
||||
**The model is optional.** It is not part of LightCraft, and nothing requires it: without it,
|
||||
Object and Describe offer to download it, every other feature (and every existing mask, see
|
||||
below) works, and no render, export or command ever waits for it.
|
||||
Object, Describe and Lens Blur's **Find Subject** offer to download it, every other feature (and
|
||||
every existing mask, see below) works, and no render, export or command ever waits for it.
|
||||
|
||||
Lens Blur reuses this same optional SAM 3 model for **Find Subject**; it does not add or download a
|
||||
separate model. The automatic subject estimate used before Find Subject finishes (or when **Auto**
|
||||
is selected) uses existing person mattes when available, otherwise a local saliency heuristic, so
|
||||
that fallback does not require SAM 3.
|
||||
|
||||
## Using them
|
||||
|
||||
@@ -74,7 +79,9 @@ ssh -N -T -o ExitOnForwardFailure=yes -L 127.0.0.1:8793:127.0.0.1:8793 user@your
|
||||
LIGHTCRAFT_SAM3_REMOTE=127.0.0.1:8793 lightcraft
|
||||
```
|
||||
|
||||
Object clicks, Describe prompts, and detail refinement use the remote worker. Only the
|
||||
Object clicks, Describe prompts, detail refinement and Lens Blur's Find Subject (people and animals,
|
||||
from the camera's focus point when the file records it) use the remote worker; a worker older than the
|
||||
app rejects a request it doesn't know with an error, so update both together. Only the
|
||||
rendered model input (long edge at most 1008 pixels) and prompts cross the tunnel. The
|
||||
worker caches the current photo; detail crops do not replace that cache. Returned masks
|
||||
stay in the local library, so later adjustments and exports work without the connection.
|
||||
@@ -96,9 +103,9 @@ not RAW development, denoising, or upscaling. The model licence below still appl
|
||||
|
||||
### In the app (recommended)
|
||||
|
||||
The first time you pick Object or Describe without the model, LightCraft asks:
|
||||
The first time you pick Object, Describe or Lens Blur's Find Subject without the model, LightCraft asks:
|
||||
|
||||
> **Download the SAM 3 model?** Object and Describe masks use SAM 3, Meta's segmentation model.
|
||||
> **Download the SAM 3 model?** Object, Describe and Lens Blur's Find Subject use SAM 3, Meta's segmentation model.
|
||||
> It isn't part of LightCraft, and everything else works without it. Download it once (about
|
||||
> 3.4 GB) · *folder*. Licence: SAM License (Meta) — Meta's terms, not LightCraft's. Downloading
|
||||
> it means accepting them. [Read the SAM License] — **Not Now** / **Download**
|
||||
|
||||
@@ -8,7 +8,8 @@ the AI models named in `Co-Authored-By` trailers.
|
||||
- Two files, both **compiled into the binary** by the UI crate's `build.rs` (nothing is read from
|
||||
disk or the network at run time; the web build has them too):
|
||||
- [`contributors/contributors.json`](../contributors/contributors.json): commit stats per GitHub
|
||||
username.
|
||||
username. Release builds regenerate it for the release commit
|
||||
(`.github/workflows/release.yml`, `credits` job); the copy in the repository is not updated.
|
||||
- [`contributors/people.toml`](../contributors/people.toml): the names people chose for
|
||||
themselves. **Each contributor adds only their own entry**, in their own PR.
|
||||
- Each contributor gets one line: GitHub username (always), display name (opt-in, or their synced
|
||||
|
||||
@@ -19,7 +19,7 @@ import and export formats. Ours come from `crates/codecs/src/sniff.rs`, `crates/
|
||||
| TIFF | ✅ 8/16/32-bit | ✅ 8/16-bit, LZW/ZIP | ✅ 1–64-bit integer, 16–64-bit float, bilevel, CCITT fax, WhiteIsZero | ✅ 8/16-bit, 32-bit float linear, none / LZW / ZIP | `crates/tiff`, `crates/codecs/src/tiff_codec.rs` |
|
||||
| PNG | ✅ | ✅ | ✅ | ✅ | |
|
||||
| PSD / PSB | ✅ (maximized-compatibility composite) | ✅ (Classic: PSD export, edit-in round trip) | ✅ merged composite | ⬜ (external-editor round trip writes 16-bit TIFF) | `crates/codecs/src/psd.rs` |
|
||||
| HEIC / HEIF | ✅ | ⬜ (Classic) / HDR only | ✅ in every release build (`crates/heif`, heic-rs) | ⬜ | `heif` feature on by packaging scripts |
|
||||
| HEIC / HEIF | ✅ | ⬜ (Classic) / HDR only | ✅ in every release build (`craft-heif` from craft-libs, heic-rs) | ⬜ | `heif` feature on by packaging scripts |
|
||||
| AVIF | ✅ | ✅ (HDR) | ⬜ recognised, not decoded (no permissive pure-Rust AV1 decoder) | ✅ 8/10-bit, PQ HDR | |
|
||||
| JPEG XL | ✅ | ✅ | ✅ (`jxl-oxide`) incl. DNG 1.7 JXL tiles | ✅ lossy / lossless, 8/16-bit, PQ HDR (`jixel`, native only; ⬜ web) | `crates/engine/src/tests/export.rs` |
|
||||
| WebP | not in its document types | ⬜ | ✅ | ✅ | beyond target |
|
||||
@@ -27,7 +27,7 @@ import and export formats. Ours come from `crates/codecs/src/sniff.rs`, `crates/
|
||||
| DNG (from raw) | ✅ | ✅ incl. lossy, embedded original | ✅ | ✅ uncompressed, LJ92, Deflate or lossy (JPEG tiles, optional long edge); ⬜ embedded original | `crates/raw/src/dngwrite.rs` |
|
||||
| Render to DNG (15.5) | — | ✅ | — | 🟡 export format "Rendered DNG" (linear float DNG, edit baked in); not yet added to the catalog | `crates/raw/src/dngwrite.rs` (`write_rendered_dng`) |
|
||||
| Original + sidecar | — | ✅ | — | ✅ | |
|
||||
| HDR gain map JPEG (ISO 21496-1) | ✅ | ✅ | ✅ (gain map read) | ✅ | `crates/codecs/src/gainmap.rs` |
|
||||
| HDR gain map JPEG (ISO 21496-1) | ✅ | ✅ | ✅ (gain map read) | ✅ | `crates/codecs/src/gainmap.rs` (JPEG layout), `craft-gainmap` (metadata, compute, apply) |
|
||||
| PQ / HLG HDR | ✅ | ✅ AVIF, JXL, TIFF | — | 🟡 PQ AVIF, PQ JPEG XL, float TIFF; no HLG | |
|
||||
| Contact sheet / print PDF | — | ✅ (Print module: PDF / JPEG / printer) | — | 🟡 paginated contact-sheet PDF (A4 / Letter, 150 dpi, sRGB) | `crates/engine/src/contact_sheet.rs` |
|
||||
| Video (MP4, MOV, AVCHD…) | ✅ playback, trim, edit | ✅ export | 🟡 catalogued (kind, duration) | ⬜ | see video gap |
|
||||
|
||||
+2
-1
@@ -27,7 +27,7 @@ Hours are Opus 5.5 agent wall-clock hours (see [target-app-parity.md](target-app
|
||||
| 10 B | **Per-model verification thin, plus cheap per-body decode fixes**: 557 of 1,446 Adobe models verified (39%), ~86% of photographers on a verified body; Nikon 5 bodies verified, Canon 34, Leica 14 (the Q3 by a recorded check of 38 private DNGs). Cheap fixes: Z 6II packed 14-bit NEF (#769, PR #671), Sony A100 regression (#702); F828 SRF now discovered and imported as preview-only, sensor decoding still missing, DSLR-A200…A390 / A850 12-bit ARW (#535) | measured: [raw/coverage.tsv](raw/coverage.tsv) | per-body bugs (levels, crops, WB) surface only from users | 25–45 | [raw-parity](raw-parity.md#by-maker-measured) |
|
||||
| 11 | **Enhance: Raw Details, Super Resolution; trained denoise weights and X-Trans** | ENH rows 0%; denoise Bayer only; the built-in denoiser is classical (block-matching collaborative filtering), RawNIND weights GPL and opt-in | Fujifilm users get no AI denoise; very noisy files gain less than from a trained model | 30–60 + model decision | [raw-parity](raw-parity.md#demosaic-levels-crops-and-lens-metadata) |
|
||||
| 12 | **Content-aware / generative remove, detect distractions, reflections removal** | REM rows 75%; patch synthesis missing | cleanup work goes back to Photoshop | 25–45 (+ generative model) | [target-app-parity](target-app-parity.md#ai) |
|
||||
| 13 | **Lightroom catalog migration is one-way and approximate**: unsupported Adobe profiles / AI settings archived, history kept as data; main-file pages read on demand up to 16 GiB, with dense-table and WAL bounds retained (#798); offline record counts and destination are now shown in a lasting import result; catalog VIDEO records match the Videos filter, with older classification repaired on reimport; before an import the app asks whether the catalog merges into the open library or goes into a new library (opt-out in Settings, #2672) | lightroom-catalog-import.md | switching users lose some looks | 8–12 | [file-format-parity](file-format-parity.md) |
|
||||
| 13 | **Lightroom catalog migration is one-way and approximate**: unsupported Adobe profiles / AI settings archived, history kept as data; main-file pages read on demand up to 16 GiB, with dense-table and WAL bounds retained (#798); offline record counts and destination are now shown in a lasting import result; catalog VIDEO records match the Videos filter, with older classification repaired on reimport; before an import the app asks whether the catalog merges into the open library or goes into a new library (opt-out in Settings, #2672); Lightroom's backup zips import directly (#2592) | lightroom-catalog-import.md | switching users lose some looks | 8–12 | [file-format-parity](file-format-parity.md) |
|
||||
| 14 | **HDR display** (EDR / Windows HDR); the headroom limit and SDR rendition from `crs` XMP (the HDR switch, `HDREditMode`, is read). HLG AVIF export done; the display's SDR/HDR decision is tested, blocked on eframe's 8-bit surface | HDR rows 70%; LR-VIEW-HDR-DISPLAY ⬜ | HDR editing works blind on HDR monitors | 12–25 | [hardware-parity](hardware-parity.md) |
|
||||
| 15 | **Print module**: identity plate / watermark / photo info overlays, Cut Guides for the packages, Custom Package Auto Layout, printer-driver Page Setup and direct printing, JPEG file output (the Print dialog writes a colour-managed PDF) | LRC-PRINT rows | Classic users who print | 15–25 | [target-app-parity](target-app-parity.md#features) |
|
||||
| 16 | **Map view, Book, Slideshow module, publish services** | LRC-MAP / BOOK / SS rows ⬜ | Classic users; publish services matter for Flickr / SmugMug workflows | 60–100 | [target-app-parity](target-app-parity.md#features) |
|
||||
@@ -90,6 +90,7 @@ Beta-blocking gaps (B) total **~230–430 h**; with the stability and platform w
|
||||
|
||||
| Date | Change | Summary |
|
||||
|---|---|---|
|
||||
| 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). |
|
||||
| 2026-11-05 | minor | Gap 3: process V5 rolls a raw's tone curve off into white in stops, so raising Exposure keeps the highlights the sensor recorded (#1632); the gap stays open (no Lightroom comparison) and hours are unchanged |
|
||||
|
||||
@@ -310,7 +310,7 @@ real failure still stops the whole process. Such a test asserts on its own rende
|
||||
`crates/gpu/tests/it/equivalence.rs` renders the same settings on both and compares 8-bit sRGB:
|
||||
bounds **mean |Δ| < 0.5 LSB and max |Δ| ≤ 3 LSB** per channel. Measured (Apple M4 Pro, Metal):
|
||||
**max 1 LSB, mean ≤ 0.0003 LSB** for every case — 26 settings cases (all tone/colour/effects tools,
|
||||
3 vignette styles, grain, curves, grading, B&W, WB, NR, crop/straighten/flip, lens + perspective,
|
||||
3 vignette styles, grain (value noise and crystal layers), curves, grading, B&W, WB, NR, crop/straighten/flip, lens + perspective,
|
||||
three mask sets incl. CPU-evaluated shapes, spots + defringe), all 8 orientations ± crop, embedded
|
||||
DNG lens data, display-referred sources, draft quality, full-size renders; the 24 MP export in
|
||||
`render_bench` also differs by max 1 LSB. Cached (slider-drag) GPU renders are bit-identical to
|
||||
|
||||
+147
@@ -0,0 +1,147 @@
|
||||
# Film grain
|
||||
|
||||
The Effects panel's Grain (`ctl:grain.amount`, `ctl:grain.size`, `ctl:grain.roughness`; XMP
|
||||
`crs:GrainAmount`, `crs:GrainSize`, `crs:GrainFrequency`) draws grain from a simulated emulsion of
|
||||
crystal layers: `crates/pipeline/src/crystal.rs` on the CPU, the same tables read by the GPU
|
||||
kernel (`crates/gpu/src/wgsl/finish.wgsl`).
|
||||
|
||||
This is the grain of **process V7** and later ([process-versions.md](process-versions.md)). Photos on
|
||||
V1 to V6 keep the two-octave value noise they were edited with (`finish::ValueGrain`), so opening an
|
||||
older catalog never changes a photo's grain; Update to Current Process moves a photo to the crystal
|
||||
grain. The sliders, their ranges and their XMP names are unchanged.
|
||||
|
||||
## Model
|
||||
|
||||
After Aurélien Pierre, [*Stochastic photographic grain synthesis from crystallographic structure
|
||||
simulation*](https://eng.aurelienpierre.com/2023/07/stochastic-photographic-grain-synthesis-from-crystallographic-structure-simulation/)
|
||||
(2023). Implemented from the article's description of the method; no code was taken from it or from
|
||||
any other implementation.
|
||||
|
||||
- **Emulsion.** A stack of layers. Each layer has one crystal shape: a regular polygon of
|
||||
`round(4.5 + z)` vertices (3–8), a random rotation, and a width (circumscribed diameter) drawn from a
|
||||
log-normal distribution. The layers' widths are the quantiles of that distribution, dealt out in an
|
||||
order the seed shuffles, so every seed has the same mix of sizes (the same grain strength and
|
||||
width) in a different arrangement.
|
||||
- **Crystals.** Each layer is a Boolean model: Poisson seeds grown into crystals, at the density
|
||||
`λ = −ln(1 − F)/A` (crystal area `A`) that leaves a fraction `F = ½` of the layer covered.
|
||||
- **Capture.** A point's grain is the number of layers covering it less the mean: many independent
|
||||
layers of different crystal sizes add up to dense, soft, cloudy grain with no hard particle edges.
|
||||
- **Print.** The light a crystal captures is proportional to the light falling on it, and a print
|
||||
shows less grain towards paper white: the grain is `Y·(1 − Y)·g` in linear light (`Y` the pixel's
|
||||
luminance), zero at black and at white. It is applied in the display-encoded domain, to first
|
||||
order: each channel `v` moves by `k·lift(v)·(1 − Y)·g`, where `lift(v) = Y·dv/dY` of the sRGB curve.
|
||||
In that domain the grain is symmetric, so it neither darkens shadows (the article's model in
|
||||
linear light does, through the concave encoding) nor greys blown highlights, and it keeps hue.
|
||||
- **Colour:** monochrome, as in Lightroom Classic.
|
||||
|
||||
## Resolution independence
|
||||
|
||||
The emulsion is drawn in frame coordinates at twice the resolution of a 6000 px export (a tile pixel
|
||||
is half a reference pixel), on two periodic tiles (tori) of 640 and 567 reference pixels; layers
|
||||
alternate between them. The tiles are stored as summed-area tables, so each output pixel takes the
|
||||
**exact mean of the emulsion under its footprint** (16 table reads): a fit-to-window preview shows
|
||||
the export's grain box-downscaled to its size, and an export larger than 6000 px (a 45 MP camera)
|
||||
still shows crystals rather than enlarged pixels. The tori share no small factor: the two patterns
|
||||
only line up again after 362,880 reference pixels, so the grain has no visible period.
|
||||
|
||||
In a rotated frame (a straightened or rotated crop) the footprint is approximated: each pixel takes
|
||||
the mean over an axis-aligned square of its size centred on it, not over the rotated pixel (summed
|
||||
area tables only give axis-aligned boxes). The grain strength is the same; the exact match with a
|
||||
box-downscaled export holds for unrotated frames in any orientation.
|
||||
|
||||
Measured on the comparison renders (four photos, six regions each, 1500 px preview against the
|
||||
6000 px export box-downscaled to 1500 px): preview / export grain strength **1.00–1.04** at the
|
||||
default, finest and coarsest settings. `crystal::tests::small_render_is_the_downscaled_reference`
|
||||
checks it exactly at 1/2, 1/4 and 1/8 size; `tests_grain::small_render_matches_the_downscaled_large_render`
|
||||
through the whole pipeline.
|
||||
|
||||
## Mapping and calibration
|
||||
|
||||
Amount, Size and Roughness keep Lightroom Classic's meaning: strength and width at mid grey match its
|
||||
exports (the measurements of open PR #1060, `docs/grain.md` on that branch).
|
||||
|
||||
| Quantity | Value |
|
||||
|---|---|
|
||||
| strength (levels of 255 at mid grey, 6000 px) | `Amount/100 · exp(2.447 + 1.386·exp(−Size/19.88)) · (1 − 0.084d + 1.6384d²)`, `d = Roughness/100 − ½`: 8.55 at 50 / 25 / 50 |
|
||||
| median crystal width (reference px) | by Size: 0.55, 1.39, 2.95, 5.17, 8.78, 12.38 at 0, 10, 25, 50, 75, 100; × 0.734 / 1 / 1.422 at Roughness 0 / 50 / 100 (`fit_widths`) |
|
||||
| width spread (log std) | `hypot(0.1 + 0.6·Roughness/100, 0.45)` |
|
||||
| layers | by Size: 16, 31, 54, 70 at 0, 25, 50, 100 |
|
||||
|
||||
- **Amount only scales the strength**: the amplitude is measured from the drawn emulsion itself (its
|
||||
variance at the reference resolution), so every setting and seed has exactly its target strength,
|
||||
and dragging Amount draws nothing new. In the article the layer count sets the strength; here it
|
||||
sets only how dense the texture is (coarser grain averages more layers, so it stays a soft clump
|
||||
texture).
|
||||
- **Texture.** The width spread was chosen so the anti-aliased crystals have the texture of the
|
||||
first, whole-pixel prototype at every scale, not just its width: autocorrelation at 1–5 px and the
|
||||
strength kept by box downscales of 2–16 match it within a few hundredths
|
||||
(`texture_report`).
|
||||
- **Size 0** is as fine as the model gets: crystals narrower than a pixel, uncorrelated pixels
|
||||
(width 0.51 px; Lightroom Classic's 0.43 needs anti-correlated grain).
|
||||
|
||||
Measured (chart, 6000 px, 8-bit, against the same build without grain):
|
||||
|
||||
| Amount / Size / Roughness | Strength at grey 20 · 128 · 245 | Width | Lightroom Classic at 128 |
|
||||
|---|---|---|---|
|
||||
| 25 / 25 / 50 | 1.66 · 4.29 · 1.67 | 1.11 | 4.29, 1.13 |
|
||||
| 50 / 25 / 50 | 3.27 · 8.57 · 3.30 | 1.12 | 8.55, 1.13 |
|
||||
| 100 / 25 / 50 | 6.53 · 17.14 · 6.36 | 1.12 | 17.01, 1.14 |
|
||||
| 50 / 0 / 50 | 8.80 · 23.10 · 8.55 | 0.53 | 23.08, 0.43 |
|
||||
| 50 / 50 / 50 | 2.46 · 6.42 · 2.43 | 1.70 | — |
|
||||
| 50 / 100 / 50 | 2.24 · 5.83 · 2.19 | 3.39 | 5.83, 3.38 |
|
||||
| 50 / 25 / 0 | 4.73 · 12.44 · 4.67 | 0.85 | 12.42, 0.86 |
|
||||
| 50 / 25 / 100 | 4.46 · 11.75 · 4.37 | 1.53 | 11.68, 1.54 |
|
||||
|
||||
Unlike Lightroom Classic's, the grain fades towards black and white (the print model). Mean
|
||||
brightness change on 24 photo regions: within ±0.1 level on every dark and mid-tone region at every
|
||||
setting (#1060: up to +3.8 on dark fabric at 50 / 0 / 50); up to −0.55 on sunlit skin at the
|
||||
strongest settings, where grain clips at white; blown highlights stay clean (−0.01 on a blown
|
||||
curtain; #1060: −9.3). Fine detail under the grain is kept (detail gain
|
||||
0.96–1.00).
|
||||
|
||||
## Performance
|
||||
|
||||
- **Drawing the emulsion** (per Size, Roughness and seed; cached, so Amount drags and re-renders
|
||||
draw nothing): every crystal is stamped from a per-layer table of its rasterisation at 16 × 16
|
||||
sub-pixel phases, as one 64-bit mask per row (a fixed number of rows per layer, those outside a
|
||||
band landing in scratch rows around it, so a crystal costs no branch per row), layers are counted
|
||||
in bit-sliced counters, and the tiles are drawn in parallel bands. 7–15 ms on an M2 Max (12
|
||||
threads), 15–33 ms on a Ryzen 5 7545U (6 cores, 12 threads; 10–20 % less than before the row
|
||||
masks) at any setting (`tile_timing_report`).
|
||||
- **Drags.** A draft render (a slider drag) doesn't wait for a tile it hasn't got if one for the
|
||||
photo's seed is cached: the last one drawn stands in while the new one is drawn in the background,
|
||||
on a pool of half the cores so the drag's renders don't queue behind it, and the next render takes
|
||||
it. With none cached for the seed there is nothing to stand in, so the draft waits for a draw
|
||||
already running or draws the tile itself. The full-quality render when the drag ends waits for the
|
||||
exact tile. A Size drag on the Ryzen with its
|
||||
Radeon 740M (GPU, 2.5 MP preview): 13–14 ms a frame instead of 62–66 ms. (On wasm, without
|
||||
threads, drafts wait.)
|
||||
- **Drag benchmark** (`FRAMES=100 cargo run --release -p lightcraft-gpu --example grain_drag_bench`: GPU
|
||||
draft renders of the 1936 × 1290 demo photo, median ms per frame of 100; the example has no
|
||||
dependency on this model, so it can be copied unchanged into another branch). Ryzen 5 7545U /
|
||||
Radeon 740M:
|
||||
|
||||
| Build | No grain (Exposure drag) | Amount drag | Size drag |
|
||||
|---|---|---|---|
|
||||
| main (value noise) | 8–12 | 10–13 | 10–13 |
|
||||
| #1060 (particles) | 8 | 11–14 | 151–179 (17–312) |
|
||||
| this model | 8–11 | 14–15 | 13 |
|
||||
|
||||
M2 Max (Metal), same benchmark, the medians of three runs:
|
||||
|
||||
| Build | No grain (Exposure drag) | Amount drag | Size drag |
|
||||
|---|---|---|---|
|
||||
| main (value noise) | 3.2–3.4 | 2.9–3.0 | 2.9 |
|
||||
| #1060 (particles) | 3.3 | 3.0–3.1 | 35.6–36.0 |
|
||||
| this model | 3.2–3.3 | 3.4–3.5 | 5.9–6.0 |
|
||||
|
||||
- **Per pixel:** two box sums, on the CPU and on the GPU. The tables (12 MB) stay on the GPU
|
||||
between renders, for the last tile used (`Gpu::grain_tables`), and are copied after the finish
|
||||
kernel's other tables in its `aux` buffer on the GPU: an Amount drag uploads nothing. On the
|
||||
Radeon 740M an Amount drag frame (2.5 MP) went from 16.9 to 11–15 ms (no grain: 8 ms).
|
||||
- **24 MP NEF → PNG** (`lightcraft-cli render`, M2 Max, median of three): no grain 1.06 s, grain
|
||||
50 / 25 / 50 1.05 s on the GPU; 1.28 s and 1.43 s CPU-only (the finish stage 0.26 → 0.42 s).
|
||||
Grain costs main ≈ 0 on the GPU and +0.08 s CPU-only, #1060 +0.29 s and +1.71 s.
|
||||
- **24 MP NEF → PNG on the Ryzen 5 7545U / Radeon 740M** (median of three): no grain 2.07 s, grain
|
||||
50 / 25 / 50 2.10 s on the GPU; 2.72 s and 2.88 s CPU-only. Grain costs main +0.03 s on the GPU
|
||||
and +0.10 s CPU-only, #1060 +1.81 s and +3.54 s.
|
||||
@@ -42,6 +42,9 @@ being the choice the window opens with) or merges when the setting says so. A ca
|
||||
refused before a new library is made. The engine command `library.importLightroom` always imports into the library
|
||||
open now.
|
||||
|
||||
A Lightroom Classic catalog backup is imported the same way, as the `.zip` Lightroom writes
|
||||
(`Backups/YYYY-MM-DD HHMM/<name>.zip`; see *Catalog backups* below).
|
||||
|
||||
Equivalent commands:
|
||||
|
||||
```text
|
||||
@@ -164,6 +167,39 @@ photo and its virtual copies out of the library. To import originals on a share,
|
||||
from that share. A path that is not a path on this computer (a Windows drive path read on macOS or
|
||||
Linux) is not looked at either and stays catalogued as missing.
|
||||
|
||||
## Catalog backups
|
||||
|
||||
Lightroom Classic backs a catalog up as `<catalog folder>/Backups/YYYY-MM-DD HHMM/<name>.zip`: one `.lrcat` (plus,
|
||||
since Classic 12, a small `<name>.lrcat-data/` folder the import does not need). Someone who has removed Lightroom
|
||||
and its catalog may have nothing else, so `library.importLightroom` / `library.inspectLightroom` and File ▸ Import
|
||||
Lightroom Catalog… take the zip directly (issue #2592, `crates/engine/src/lightroom_backup.rs`):
|
||||
|
||||
- The `.lrcat` entry is inflated by streaming (stored or deflated, ZIP64 included) into a private folder,
|
||||
`Interop/lc-lrbackup-<pid>-<time>/` in the open library (the system's temporary folder when the library is not
|
||||
on disk), checked against the zip's size and CRC-32, read like any catalog, and removed after the read, on an
|
||||
error and on cancel alike. A folder left by a crash is removed by the next backup import once it is a day old.
|
||||
The zip is only read. A zip with no `.lrcat`, more than one, a damaged or cut-short entry, or a catalog over
|
||||
16 GiB is refused with a message. A known space shortage is refused before extraction; later write errors are reported.
|
||||
- The import's `source` is the zip. Paths the catalog records relative to itself (`relativePathFromCatalog`) are
|
||||
taken from where the catalog was: two folders above a dated backup folder, else next to the zip.
|
||||
- Open Library given `Backups/` without its catalog, or a dated folder in it, makes no library there and offers the
|
||||
import: of the dated folder's zip, of the only backup in `Backups/`, or, when `Backups/` holds several, of the zip
|
||||
the person picks (the file dialog asks).
|
||||
- Collections are matched across imports by the catalog's own id (`Adobe_storeProviderID` in
|
||||
`Adobe_variablesTable`), which every backup of the catalog keeps, so importing a backup of a catalog already
|
||||
imported adds no collection twice. Collections imported by earlier releases, keyed on the catalog's path, are
|
||||
still found by that key. Each key records the id it was written for, so two catalogs with different ids that sat
|
||||
at the same path keep their own albums. A catalog without `Adobe_storeProviderID` (every Lightroom Classic
|
||||
catalog checked, from Lightroom 7 to Classic 13, has one; only a damaged or foreign file lacks it) is known by its
|
||||
path alone. If that path is already associated with a known catalog ID, the importer refuses the ambiguous
|
||||
match rather than silently combining different catalogs. Unowned legacy path keys can still match. Photos are matched as
|
||||
before, by Lightroom's image id and path: a backup whose photos were at another place (an older backup from
|
||||
before a move) adds them as other records.
|
||||
|
||||
Checked on 2026-10-22 on a real catalog (2,740 photos, 96 collections) and its four backups from Lightroom 7
|
||||
(2018) to Classic 13 (2023), 88 MB zips holding 138 MB catalogs: each zip imports the same photos and collections
|
||||
as its unpacked catalog in about 2.4 s on an Apple M4, leaves no file behind and is not changed.
|
||||
|
||||
## Historical local validation
|
||||
|
||||
Validated in a local Linux environment after upstream reconciliation: 47 catalog-focused tests, nine pipeline spot tests, the exact sparse-catalog regression, and all eight `cargo xtask ci` stages passed. The full gate recorded 3,166 passing test executions, zero failures, and 28 ignored tests. An original synthetic sparse catalog with a required image-table page beyond 1 GiB also passed headless application import and selection; its expected missing-original placeholder retained its five-star rating. This snapshot check does not establish native-window coverage or dense-catalog performance.
|
||||
|
||||
+18
-14
File diff suppressed because one or more lines are too long
@@ -14,7 +14,9 @@ stronger Light sliders, issue #196) without changing a single photo someone has
|
||||
| **V3** | Pixel-scale sharpening (issue #757): Radius uses the original photo’s pixels, Detail controls halo damping, and downsized sources retain a response-matched sharpening band. V1 and V2 keep texture-band sharpening exactly. The sharpen plane is keyed by radius and process and invalidated after noise-reduction changes. The Highlights/Shadows base and tone map are unchanged from V2. |
|
||||
| **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** (the latest) | 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. |
|
||||
| **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: 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. |
|
||||
|
||||
## The rule
|
||||
|
||||
@@ -46,6 +48,20 @@ only what was added, and with the mask's Invert it gave the whole photo. Such ma
|
||||
first component, on every process. It landed in place as a bug fix: intersecting with nothing is not
|
||||
a look anyone chose.
|
||||
|
||||
**Lettering under Highlights and Shadows** (V8) no longer grows blocks of the wrong tone. V2's base
|
||||
is the edge-aware filter of a separable median alone. Dark lettering on a bright panel (a bus
|
||||
number, a sign) has strokes and gaps about as wide as the median's radius, so each row and column
|
||||
window was close to half letter and half panel, and the median picked one tone or the other in
|
||||
rectangles: it filled the gaps between the letters and their counters with the letters' tone.
|
||||
Shadows then lifted those patches of panel by over 1 EV, into bright blocks beside the letters. From V8 each
|
||||
value moves toward that median only as far as the median of a 3× wider neighbourhood agrees
|
||||
(`local::detail_free`). A twig against a wall has both medians on the wall's side and takes its tone,
|
||||
as before (#632); the gap between two strokes sits in a wider neighbourhood that is mostly panel, the
|
||||
two medians disagree, and the gap keeps its own tone. The letters themselves count as fine dark detail
|
||||
on the panel and keep their contrast, as twigs do. V8 differs from V7 under Highlights or Shadows only in detail
|
||||
about as fine as the radius, mostly where it is packed closely (lettering, grilles). V2 to V7
|
||||
are released and keep the blocks (`tests_legacy` locks V1 and V2); Update to Current Process moves a photo past them.
|
||||
|
||||
## Adding a process
|
||||
|
||||
1. Add a variant to `Process` (`V2`), append it to `Process::ALL` (oldest first), give it its number in
|
||||
@@ -110,5 +126,7 @@ extra field and retain their existing cached renders. No cache-version bump is n
|
||||
|
||||
| Date | Change | Summary |
|
||||
|---|---|---|
|
||||
| 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) |
|
||||
| 2026-10-12 | minor | Calibrated Contrast and Blacks, V2 Whites, resolved-process cache keys and number coordination |
|
||||
|
||||
@@ -95,7 +95,7 @@ search embeddings; generative remove runs in Adobe's cloud.
|
||||
| Subject / Sky / Background masks | classical heuristics; the file's own DNG semantic mattes | 🟡 |
|
||||
| People (faces, body, hair, skin…) and Landscape masks | — | ⬜ |
|
||||
| Object / Describe masks | SAM 3 in pure Rust (Metal / CPU); opt-in 3.4 GB download, no mirror configured | 🟡 |
|
||||
| Depth range mask, Lens Blur | — | ⬜ |
|
||||
| Depth range mask, Lens Blur | Lens Blur keeps the subject (or any mask, e.g. an Object mask) sharp and blurs the rest with disc bokeh and Boost; no depth map yet, so no focal range or depth range mask | 🟡 |
|
||||
| AI Denoise | Bayer only, built-in classical denoiser out of the box, optional user-installed weights, pure-Rust CPU / GPU | 🟡 |
|
||||
| Raw Details, Super Resolution | — | ⬜ |
|
||||
| Generative remove, distractions, reflections | — (generative is out of scope: cloud) | ⬜ |
|
||||
@@ -300,6 +300,7 @@ P2 items 12–25 h; look tuning, performance, packaging, hardening 25–45 h.
|
||||
| Date | Change | Summary |
|
||||
|---|---|---|
|
||||
| 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-05 | minor | AI table: Lens Blur ⬜ → 🟡 (subject- or mask-focused disc blur, no depth map); headline numbers unchanged |
|
||||
| 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-24 | patch | Stability, the stability discount, the Beta-needs list and the estimate history: tests run in CI on Linux x64 since #2667 (FreeBSD nightly), not on macOS or Windows (gap 9); percentages and hours unchanged |
|
||||
| 2026-10-23 | minor | AI Denoise runs without a model (built-in denoiser); percentages unchanged, since it is a classical filter and Bayer-only |
|
||||
|
||||
@@ -2,6 +2,25 @@
|
||||
|
||||
## Unreleased
|
||||
|
||||
### Flatpak updates
|
||||
- Help ▸ Check for Updates can now reach the release service and update standalone Flatpak bundles.
|
||||
This permissions repair must first arrive through your existing host-side update method. Flatpaks
|
||||
managed by a software repository continue to use its package manager, and launcher-pinned versions
|
||||
keep their selected version.
|
||||
|
||||
### Export Effect Presets leaves your originals alone
|
||||
- Export Effect Presets… (`mask.exportEffects`) now refuses a path that is a photo's original or its XMP sidecar, as
|
||||
the other exports do, and writes the file atomically. It used to write the presets over whatever file it was given,
|
||||
and a failed write (a full disk) could leave a cut-off file where an earlier export was.
|
||||
|
||||
### 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
|
||||
and blown highlights stay clean, and the fit-to-window preview shows the grain you will export. Amount, Size and
|
||||
Roughness keep their meaning and Lightroom Classic's strength and grain size. This is rendering process 7: new photos
|
||||
(and Reset) get it, photos you already edited keep their grain until you choose Photo ▸ Update to Current Process.
|
||||
See [film grain](grain.md).
|
||||
|
||||
### Colour noise reduction (process V6)
|
||||
- Colour noise reduction removes colour noise at the raw default 25, where it used to leave most of it, and keeps
|
||||
colour edges at high values instead of bleeding them into fringes (issue #815). It filters the colour differences
|
||||
@@ -105,6 +124,16 @@
|
||||
gives a request 60 s) can ask again once that search has ended (while it runs, a new request is refused as already
|
||||
running), and what was read isn't read again.
|
||||
|
||||
## 2026-11-01
|
||||
|
||||
### Import a Lightroom catalog backup as it is
|
||||
- File ▸ Import Lightroom Catalog… also takes the `.zip` backups Lightroom Classic writes in its `Backups` folder
|
||||
(issue #2592), for when Lightroom and its catalog are gone and only the backups and the photos are left. LightCraft
|
||||
unpacks the catalog into a temporary folder in the library, imports it and deletes the copy; the zip is not
|
||||
changed. Open Library given a `Backups` folder, or one of its dated folders, offers to import the backup.
|
||||
- Importing a backup of a catalog you already imported no longer adds every collection a second time: collections
|
||||
are matched by the catalog's own id, which its backups keep, instead of by the catalog file's path.
|
||||
|
||||
## 2026-10-30
|
||||
|
||||
### Lightroom catalogs with a print inside a collection import their collections
|
||||
|
||||
Reference in New Issue
Block a user