* Keep a stitched panorama at the photos' own resolution
The merged panorama of three 4032x3024 photos came out at 4924x2461, i.e. the same pixel count as a single source photo, so every frame was downsampled into the canvas. The megapixel and edge caps cannot cause this: the output scale in `stitch` is capped at 1.0, so the canvas is always at most the surface bounds; those bounds are simply too small because the recovered focal length (and therefore the projected extent) is too small for wide-angle frames.
Pin the focal length to the one `register` derives (EXIF 35 mm equivalent, else the homography estimate) instead of letting bundle adjustment drift it freely when only a few frames constrain it, and make `stitch` size the canvas from the frames' own pixel density so no frame is resampled below its resolution. The new test stitches three wide-angle frames with a known focal and asserts the recovered focal and the output size stay at the photos' resolution.
Test: a_wide_angle_trio_keeps_the_photos_resolution failed before the change and passes after.
* Address review for pull request 3806
* Panorama: the lens sets the native scale, not average density
The previous scale upsampled the frames centres, where a rectilinear frame
already has f pixels per radian. What can go wrong is the fitted focal coming
out below the lens, so EXIF focal length now raises the cap on the output
scale, and nothing is upsampled past it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: eliets2 <287273517+eliets2@users.noreply.github.com>
Co-authored-by: FredApps <153173854+FredApps@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* Extend CR3 white level to actual sensor saturation
The white level comes from Canon's stated value, not from the sensor data, so highlights between the stated level and true saturation are misclassified as clipped. Extending the white level to the real pile-up and folding the delta into baseline_exposure leaves everything below the old white unchanged while recovering the lost highlight range.
Add RawImage::extend_white_to_saturation() to saturation.rs that scans for a saturation pile-up above the stated white (coarse 1/128 bins, requires >= 1 sample in 100,000 and >= 64 samples above), sets white to the lowest colour's pile-up edge or the bit-depth top, and returns the EV delta. Call it from cr3.rs decode() on Mode::Full and add the delta to ColorData::baseline_exposure. Bump RENDER_CACHE_VERSION in media.rs.
Test: extend_white_to_saturation_above_stated_white failed before the change and passes after.
* Preserve CR3 highlight headroom and exposure
Assisted-by: OpenAI Codex
* Tests: a probe does not know the white headroom a CR3 decode finds
The header probe stays a header probe, so the comparison leaves out
baseline_exposure, which a full decode adjusts from the samples.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: eliets2 <287273517+eliets2@users.noreply.github.com>
Co-authored-by: FredApps <FredApps@users.noreply.github.com>
Co-authored-by: FredApps <153173854+FredApps@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* LR-IMP-FORMATS: pure-Rust compressed Olympus ORF bitstream decoder
* LR-IMP-FORMATS: address CodeRabbit review feedback on PR #3747
* orf: bound predictor arithmetic, bit widths, and stream consumption
* orf: use unsigned magnitude abs_diff for predictor differences
* docs: correct Olympus verified-body count in parity header
* orf: saturating wbits derivation, widen pixel shift to i64 before clamp
* docs: sync raw parity headline figures with coverage tables
* docs: record clean-room provenance and report 58 newly unlocked bodies for compressed ORF
* docs: note LibRaw derivation and pending clean-room reimplementation for compressed ORF
* LR-IMP-FORMATS: pure-Rust clean-room compressed Olympus ORF bitstream decoder
* LR-IMP-FORMATS: sync orfc path in parity docs and correct mainstream weighted depth sum
* LR-IMP-FORMATS: address CodeRabbit review feedback on ORF gap and evidence sync
* Convert Negative 1/4: lightcraft-film, the negative conversion maths from Film Lab (#2490)
The film model, levels in density space, film presets, colour and tone of
Film Lab's core (same author, MIT), without the PhotoCraft-only sharpening
and JSON scanning, plus a whole-scan measurement (base, black and white
points, neutral balance) a host stores with a photo's settings. A library
with no caller yet.
Co-authored-by: FredApps <153173854+FredApps@users.noreply.github.com>
* LR-IMP-FORMATS: address CodeRabbit PR #3775 review (round 2)
- orf.rs: scope sample-based bit-depth inference to Word16 branch only
(from_word16 flag prevents heuristic from running on compressed ORF data)
- orfc.rs: reject truncated compressed streams before allocating the frame
(minimum 1 bit per pixel check)
- orfc.rs: remove feedback_shift_644 == 15 special case (ordinary exponent)
- ROADMAP/README/target-app-parity: fix '78 bodies' to '58 more bodies
(2 verified)' — 78 is total Olympus+OM count, 58 were newly unlocked
- target-app-parity: RAW readiness 80% -> 87%, recompute weighted sums
- parity-checklist: refresh summary via cargo xtask parity --write
Generated with Antigravity
* LR-IMP-FORMATS: address CodeRabbit PR #3775 review (round 3)
- target-app-parity: RAW camera decoding 85% -> 89% (559+721 of 1446)
- target-app-parity: mainstream practitioner row lists ORF as per-model
verification, not as unfinished decoder alongside CR3/HE NEF
- log_writer: check_regular_directory_entry before truncate open
(prevents symlink-following truncation of files outside the library)
Generated with Antigravity
* LR-IMP-FORMATS: regenerate parity summary after film crate merge
cargo xtask parity --write: 83.2% of 543 in-scope rows (was 83.5%/532);
sync target-app-parity.md checklist references to match.
Generated with Antigravity
---------
Co-authored-by: Yorgos S. <smyrgeorge@gmail.com>
Co-authored-by: FredApps <153173854+FredApps@users.noreply.github.com>
* Apply Auto settings to every selected photo
Users expect Auto and preset application to affect the whole selection, as Quick Develop already does. `develop.auto` is the only edit command in that file that hard-codes the active photo instead of the selection.
Make `develop.auto` accept the same target rule as the other selection commands (`ids` when given, else the selection), analyse each target photo's own source with `auto_tone`, and commit the results as one batched undo step labelled "Auto".
Test: auto_applies_to_every_selected_photo failed before the change and passes after.
* Run multi-photo Auto settings off the UI thread
Assisted-by: OpenAI Codex
* Auto Settings: skip unreadable photos and refuse stale results
One offline photo stopped Auto for the whole selection. The background
result is checked against each photo's settings, because an undo changes
them without a commit, and it commits through the command wrapper so sidecars
and the durable save follow.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Auto Settings: a wrong photo id is refused, not skipped
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: eliets2 <287273517+eliets2@users.noreply.github.com>
Co-authored-by: FredApps <FredApps@users.noreply.github.com>
Co-authored-by: FredApps <153173854+FredApps@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* Presets compose on the photo's original state, not the visible edits (fixes#2159)
Applying a preset deep-merged it into the photo's current settings, so a
second preset inherited whatever an earlier one (or a manual edit) had put
in the groups it styles, and its amount interpolated against the visible
values: a B&W preset followed by a color one stayed black and white. Each
group a preset covers is now computed on the photo's original state (its
import settings) and replaces the photo's own, at any amount; groups the
preset doesn't name, and the photo's pixel repairs (masks, spots, red eye),
are kept. An unresolved profile reference still means "the photo keeps its
own profile", and the built-in color presets now name their treatment, so
applying one after a B&W preset brings the colors back. The UI's hover previews and thumbnails show the same composed
result.
* Presets change only the settings they name (#2159)
The commit before this one computed each group a preset names on the
photo's import state and replaced the whole group. A preset therefore
also reset the settings it leaves out: Blacks under Bright & Airy, the
mixer colours it does not name, and imported exposure, whites and
blacks under Crisp Landscape.
Now each setting a preset names is computed alone, from the photo's
import look when a default preset recorded one, and otherwise from its
current value, because sidecar and catalog imports record no import
look and the camera defaults are then not their import state. Every
other setting keeps the photo's value. Pixel repairs (masks, spots,
red eye) compose on the photo's own values as before, and masks are
still added by the preset.
A color preset applied after a black and white one still restores the
treatment and the settings it names. Amount 0 applies nothing to a
photo without an import look. An unresolved profile reference leaves
the photo's profile as it is. Each case has a test.
* Document that presets change only the settings they name
The presets row and the preset amount row of the parity checklist now
describe the composition: each named setting is measured from the import
look when one is recorded, otherwise from the photo's current value, and
the settings a preset does not name keep their values. The revision
history records the change; statuses are unchanged.
* Test amount 0 on a setting the preset names
The amount-0 test used a preset that does not name exposure, so it
passed even when the original was the camera defaults. Bright & Airy
names exposure, and the test now checks that the photo keeps its value
at amount 0 for that setting.
* Keep a preset's null in an option field, and never take one from the original
A preset that writes null into an option setting (a crop aspect, where
null means free) was dropped below full amount: the scaled patch
removed every null, including the ones the preset wrote. At 100 % the
same preset cleared the aspect, at 50 to 99 % the photo kept it.
Now a null the preset writes applies from half amount up, as its other
values do. A null in the original never changes the photo: below half
amount such a setting is left out, so the photo keeps its own value.
Numbers and other values behave as before. The null-removal step is
gone, since the scaled patch no longer writes nulls for settings the
amount does not reach.
Tests: a preset null clears an option field from half amount up and
leaves it below; an option that is unset in the original does not
overwrite the photo's value.
* Build a preset's scaling base only below full amount
The presets panel asks for every visible row at 100 % on every frame,
and on hover. Each of those calls serialized the photo's current
settings and its original although, at 100 %, the preset's own values
apply as they are and the original is not read.
Compose now builds the scaling base only below 100 %. The engine also
builds the import state, or copies the photo's settings, only below
100 %. Results are unchanged; the existing preset tests cover both paths.
* Preserve preset baselines and allocate safe mask IDs
Assisted-by: OpenAI Codex
---------
Co-authored-by: eliets2 <287273517+eliets2@users.noreply.github.com>
Co-authored-by: FredApps <FredApps@users.noreply.github.com>
Co-authored-by: FredApps <153173854+FredApps@users.noreply.github.com>
* Give the pipeline one exact output size instead of re-fitting
Export and the pipeline each compute the output size independently from two descriptions of the photo's shape, so an already-chosen export size can come back a pixel short when the pipeline re-fits against a reduced source whose aspect rounds differently.
Add an exact output size to RenderRequest, make plan take it unchanged via an exact Frame::sized mode, drop the aspect-tolerance guard, and have export resolve one canonical size before calling the pipeline; add a unit test asserting plan returns the requested size unchanged when it matches the frame aspect.
Test: plan_preserves_matching_box_size failed before the change and passes after.
* Honor exact output dimensions for exports
Assisted-by: OpenAI Codex
* Export: an exact size does not stretch a source of another shape
A raw whose decode failed can fall back to an embedded preview with a
different aspect. The exact box now stands only against a proxy that differs
by rounding.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: eliets2 <287273517+eliets2@users.noreply.github.com>
Co-authored-by: FredApps <FredApps@users.noreply.github.com>
Co-authored-by: FredApps <153173854+FredApps@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* catalog: history steps and versions share segmentation grids (#2154)
Every history step stored its own copy of each segmentation grid, so a
photo with AI masks rewrote every unchanged grid (about 220 KB each) with
every slider change: on a real library, 183.6 MB of a 187.8 MB
catalog.snap was duplicated grids (830 copies of 126 distinct ones).
Snapshots now keep each distinct grid once, in Catalog.grids (a new
serialization detail, format v10), and the masks of the photo's settings,
versions and history steps refer to it by index (SegMask.grid, with the
data omitted). The table is built while the snapshot is written and is
never held in the live catalog: Journal::open resolves the references
back to inline data (Catalog::repair), so rendering, hash64, presets,
XMP and log records are unchanged, and catalogs written before v10 load
and are upgraded as before. A reference past the table (a damaged
snapshot) is cleared and reported, rendering nothing.
Measured on 90 history steps over one 1024x1024 grid: the snapshot drops
every step's copy of the grid (1.29 MB -> 0.30 MB in the fixture; on the
reporter's library, the grids shrink from 181.8 MB to the 25.9 MB of
distinct grids).
* catalog: the snapshot's shared grids cover the import look too (#2154)
A photo's import look (Photo.import_look, the settings a user default
preset gave the photo on import) can hold segmentation masks, and its
grids can be the same grids that the develop settings, versions or
history steps hold. The snapshot writer referred to such a grid by its
table index, but the table was built from the other settings holders
only and the load resolved only those, so the look's mask came back
empty with a dangling reference.
Photo::settings_holders lists every settings holder (develop settings,
versions, history steps, import look). The writer builds the table from
it and the load resolves references through the same list, so a holder
added there is covered on both sides.
New test import_look_masks_share_the_table_and_resolve_on_load: a look
whose mask shares a grid with the develop settings and a history step,
plus a grid only the look holds. It reloads exactly, and the table holds
both grids once each. Before this change the look's mask came back as
data "" with grid Some(0).
* catalog: state what a snapshot copy shares (#2154)
The snapshot writer copies the catalog to serialize it. Its photos are shared (Catalog.photos holds Arc<Photo>), so the copy is a pointer per photo, not a deep copy; the comment said so without saying which tables are copied. It now lists them, and notes that the derived indexes start empty on the copy.
* develop: a segmentation grid reference is written only by a snapshot (#2154)
The inline serialization of a mask wrote its `grid` whenever one was
set. A `grid` can be set in memory from a document: a mask given to a
command (mask.update, develop.merge) or read from a preset goes through
the derived Deserialize, and such a value stayed in the live catalog.
The next snapshot wrote it inline, and on load the index resolved to
whatever grid sat at that position in the new table, so a mask could
take another mask's grid without a repair being reported. The same
stray value also changed hash64 for identical settings.
The inline form no longer writes `grid`, so it is the pre-v10 form
again. Only the snapshot interner writes a reference, into the table it
builds, so a snapshot cannot hold an index that points elsewhere.
New tests: stray_grid_is_never_written_outside_the_interner (develop)
and stray_grid_from_a_document_is_not_written_as_a_reference (catalog: a
stray reference is not resolved to another photo's grid after a reload).
Both failed before this change: the first wrote "grid":3, the second
loaded photo one's grid into photo two.
* Address review for pull request 2203
* Format the files this pull request changes
* catalog: don't clone a grid that is already in the snapshot's table
The snapshot's grid interning indexed with `entry(m.data.clone())`:
the whole grid was copied before the map said whether it was already
there, so every history step that repeats a mask's grid paid a needless
allocation and copy on the snapshot path. The lookup is borrowed now
(`contains_key`), and a grid is cloned (into the pool and the table)
only when it is new, in the same first-appearance order.
The background snapshot also held two catalogs: `snapshot_in_background`
clones the catalog for the worker, and `write_snapshot` cloned it again
to attach the grid pool. The writer now takes the catalog by value and
the background path hands over its copy, so a snapshot in flight holds
one catalog; the synchronous path keeps its own single clone.
Not observable in behaviour: the grid tests and the catalog suite pass
unchanged.
* Tests: the hostile-mask test names the new grid field
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: eliets2 <287273517+eliets2@users.noreply.github.com>
Co-authored-by: FredApps <153173854+FredApps@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* Cut edited thumbnails from the decoded source, not the file
In Detail view the decoded source of the photo on screen is held at full size, but the thumbnail branch of `source_ref_plain` only looks for a preview-level source, so each edit re-queued a thumbnail that decoded the original again —1.4 GB of gate usage for one 489 MB file, matching the reported stall on the SMB share.
When building a thumbnail job, reuse the photo's decoded source at whatever level it is cached (preview or full), fitting it to the thumbnail's edge, so an edited photo's thumbnail no longer re-reads the original file while its source is already in memory.
Test: a_thumbnail_is_cut_from_the_decoded_full_source failed before the change and passes after.
* Reuse decoded sources for thumbnail rendering
Assisted-by: OpenAI Codex
* Web worker: box the fitted source, as SourceRef::Fit holds it
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: eliets2 <287273517+eliets2@users.noreply.github.com>
Co-authored-by: FredApps <FredApps@users.noreply.github.com>
Co-authored-by: FredApps <153173854+FredApps@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* LR-IMP-ADD-DIALOG: a folder scan counts the folders it could not read and the files it skipped
The bounded folder walk used to drop a folder it could not list, and every file its
caller refused, without a trace. It now counts both (Walked::unreadable and
Walked::skipped); which files are returned, their order, the limits and the
handling of links are unchanged, and the Limits struct is untouched.
import::expand_report keeps those counts with the walk's truncation flag
(Expansion); expand_within delegates to it. ScanOutput carries truncated,
unreadable and unsupported, filled by scan_with, and scan_report gives the
session-backed scan the same output while storing the probes for the import
that follows exactly as scan does.
library.importPreview returns truncated and skipped {unreadable, unsupported}
next to the keys it already had, and says so in its description. A walk that
stops at a bound is still logged once, in expand_report, as before.
* LR-IMP-ADD-DIALOG: tests for the scan's skipped, unreadable and truncated counts
The walk counts files its caller refuses (and not hidden files or the skipped
folder) and a folder that vanishes before it is entered. expand_report, scan_with
and library.importPreview report unsupported files, a walk cut at the depth
limit and an unlistable folder, keep the probes for the import, and leave a
file named on its own uncounted. The unlistable folder uses no permissions on
Unix and a deny entry on Windows, and does nothing where the process can list it
anyway.
* LR-IMP-ADD-DIALOG: the import review says when its scan left something out
When the folder scan stopped at the walk limit, could not read some folders, or
skipped files that are not a supported photo type, the review now shows one line
under the count (for example "Stopped at the scan limit: there may be more
photos · 2 folders could not be read · 3 files skipped (not a supported photo
type)"). It shows nothing when the scan left nothing out. The counts come from
the scan's output and are kept on the dialog.
The two messages with a count go in every formats catalog, as the build requires,
and the plain message in every plain catalog.
* LR-IMP-ADD-DIALOG: tests for the import review's scan note
Opening the review for a folder with a stray text file, for a tree deeper than
the walk goes, and for a folder of photos only shows the matching line, or none.
The line follows the counters while the review is open, is written in the
language in use, and names singular and plural counts correctly.
* LR-IMP-ADD-DIALOG: tracker note for the import review's scan note
The row says what the review reports when its scan left something out, what
library.importPreview returns for it, and which other folder walks do not report
these counts. Revision history and last-updated line added; the status stays
done and the generated summary is not touched.
* LR-IMP-ADD-DIALOG: XMP sidecars are not counted as unsupported files
The import reads a photo's XMP sidecar along with the photo, so a sidecar is not a
file the scan skipped. expand_report now leaves .xmp files (any letter case) out of
Expansion::unsupported, which feeds ScanOutput, the "skipped.unsupported" count of
library.importPreview and the review's note; every other file that is not a
supported photo type still counts. The walk itself stays generic: Walked::skipped
still counts every file its caller refused, and which files are returned is
unchanged.
* LR-IMP-ADD-DIALOG: tests for leaving XMP sidecars out of the unsupported count
A folder with a photo, sidecars in lower, upper and mixed case (one in a subfolder)
and a text file reports one unsupported file through the expansion, the scan and
library.importPreview; a folder of photos and sidecars only reports none. The review
shows no note for sidecars alone and the text file's line once one is added.
* LR-IMP-ADD-DIALOG: tracker wording for the sidecar exclusion
The row and the revision-history entry say that XMP sidecars are not counted among
the files the review reports as skipped.
* rename importPreview's walk-truncation flag to scanLimited
- avoids one reply using truncated for two meanings once #2705/#2873 land (maintainer request)
* ui: translate the import scan notes into cs, fi, id, it, ka, pl, sv and vi
* fix: register the scan note against the Ui, not the Context (main's register takes &Ui)
* Report diagnostics even when the scan finds no photos
When a scan finds no photos, the message now says what it left out: folders it could not read, files that are not photos, or a walk stopped at its limit. A complete scan with no photos keeps the plain message.
* Format the scan results the merge touched
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: eliets2 <287273517+eliets2@users.noreply.github.com>
Co-authored-by: FredApps <153173854+FredApps@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* shortcuts: H toggles the mask pins while masking
In the Masking panel an unmodified H press runs view.maskPins (the same
switch as View > Show Mask Pins) instead of opening Remove; a Remove key
reassigned to anything else keeps opening Remove there, and outside
Masking H still opens Remove.
* shortcuts: test the H mask-pin toggle
H toggles the mask pins while the Masking panel is open and does not open
Remove there; from the other panels it still opens Remove and leaves the
pins alone.
* shortcuts: keep the H docs truthful
In the Masking panel an unmodified H toggles the mask pins and does not
open Remove, a Remove key reassigned to anything else still opens Remove
there, and outside Masking H still opens Remove, so the Hide pins row
moves from done to partial: Remove's spot pins have no hide toggle. The
H comparison row, the revision histories and the parity summary are
updated to match.
---------
Co-authored-by: eliets2 <287273517+eliets2@users.noreply.github.com>
Co-authored-by: FredApps <153173854+FredApps@users.noreply.github.com>
GFX100S II is a current Fujifilm body with no measured-matrix path, so any photo its JPEG fit does not accept falls to the neutral fallback instead of step 4's matrices. A unit test pins spectral::find to GFX 100's matrix for this model, following the existing GFX100S → GFX 100 same-sensor pattern.
Add ("Fujifilm", "GFX100S II", "GFX 100") to SAME_SENSOR next to the other Fujifilm same-sensor rows, plus a unit test asserting the lookup returns GFX 100's matrices (fails today, passes after the edit).
Test: gfx100s_ii_uses_gfx_100_matrices failed before the change and passes after.
Co-authored-by: eliets2 <287273517+eliets2@users.noreply.github.com>
Co-authored-by: FredApps <153173854+FredApps@users.noreply.github.com>
* The named-export-preset system itself (export.presets / export.savePreset /
export.deletePreset, user presets saved with the library, the Export dialog
dropdown and File > Export with Preset) already existed; this adds the four
named built-ins the issue asks for, locks them in with an expand / round-trip /
apply test, and updates the LR-EXP-DIALOG and LR-EXP-PREVIOUS tracker rows
(the stale 'no named export presets yet' note goes away).
* #2104: test all four built-in export presets, not only Instagram Feed
The named built-in preset test expanded, validated and rendered Instagram Feed alone. It now runs the
same checks for each of the four names: the expanded settings, validation as app.export params, the
round trip through a user preset, and a render at the size the preset sets. Full Resolution Master
sets no long edge, so its render must be the photo's own size, with no resize. The rendered size is
also compared with output_size, the same calculation the exporter uses.
* The preset sets a 1920 px long edge and nothing about the shape, so a 3:2 photo exports at
1920 x 1280 and no 9:16 frame is made. The export options have no crop-to-aspect setting, and none
is added here. The preset's doc comment and the LR-EXP-DIALOG row of the parity checklist say so, and
the checklist has a revision line for this and for the translations.
* The Export dialog shows built-in preset names through builtin_label, which looks them up in the
language catalogs. Instagram Feed, Instagram Story / Reel, Web / Portfolio and Full Resolution Master
were in none of the catalogs, so every language showed them in English. Each catalog now carries the
four names next to the existing JPEG (Small) and JPEG (Large) entries. The translations are drafts
and need review by a native speaker of each language.
A new test checks that every catalog has an entry for each of the four names. The catalog comparison
only reports gaps, so without this test a missing name would pass silently.
* Address review for pull request 2209
* #2104: the four built-in export preset names in the catalogs main added after this branch was cut (Finnish, Indonesian, Swedish, Vietnamese). The i18n test that every catalog carries the four names failed on them after the rebase; each of the four now carries them next to the existing JPEG (Large) entry, in the same shape as the other thirteen catalogs. The translations are drafts and need review by a native speaker of each language.
* Say the Web / Portfolio preset keeps copyright and creator metadata
The copyright export metadata policy embeds the copyright notice, status,
usage terms and info URL together with the creator (export/encoding.rs fills
the artist field before the policy match returns), so the LR-EXP-DIALOG row
and the 2026-10-17 revision line understated the preset as keeping
copyright-only metadata. Both now say copyright and creator metadata.
* Docs: finish the parity-checklist merge
The merge left conflict markers in the revision history.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: eliets2 <287273517+eliets2@users.noreply.github.com>
Co-authored-by: FredApps <153173854+FredApps@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* LR-BEHAV-RENDER-FIDELITY: V3 camera tone curve rolls off in stops past its last knot (#1632)
A raw's camera tone curve is fitted only to camera JPEG tones below 0.85, so its last knot sits
1 to 3 stops below the sensor's white. Past it, CameraTone::apply closes on white exponentially in
linear light: the sensor's white renders at 8-bit 246-254 at Exposure 0 and 254-255 from +1, and
raising Exposure turns the top stop the sensor recorded white.
Process V3 extends the curve with CameraTone::apply_rolloff: same value and slope at the knot,
then gap / (1 + c (2^t - 1)) at t stops past it, the gap halving every stop in the end. On 11 CC0
corpus files with a fitted look, unclipped pixels rendering white drop from up to 22.5% to 0 at
+1 EV and from up to 35% to 0 at +2 EV; Exposure 0 renders change by at most 1 code on average.
V1 and V2, the fit itself, JPEGs and raws without a fitted look are unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* LR-BEHAV-RENDER-FIDELITY: V3 generic raw curve rolls off in stops too; DRO-off, DNG and GPU checks (#1632)
Raws without a camera curve take ToneMap::hdr, which reached white about 1/4 stop past the
sensor's white and clipped there (o.min(1.0)). Process V3 now uses ToneMap::rolloff_hdr: from half
a stop below the white point (tone::GENERIC_KNEE_STOPS) the extended Reinhard curve hands over to
the same stop-based shoulder as the camera curve (tone::rolloff_past, shared with
CameraTone::apply_rolloff), with the same value and slope at the join. The sensor's white renders
at about 235 / 248 / 252 at Exposure 0 / +1 / +2 where V1 and V2 render 239 / 255 / 255. On 6 CC0
DNGs on the generic curve, unclipped pixels rendering white drop from up to 8.4% to 0 at +1 EV and
from up to 17.2% to 0 at +2 EV.
The DRO-off gate (look_fit::at_most) also checks the V3 shoulder; the rate bound already implies it,
so no fit changes and LOOK_VERSION stays. Tests: the generic shoulder (join, slope, monotone, below
white, no kink), a regression test that fails with the clipping curve, a DNG ProfileToneCurve under
V3, the DRO-off property tests on the V3 shoulder, and a per-process camera-curve GPU check.
Docs: process-versions, parity checklist (LR-BEHAV-RENDER-FIDELITY, LRC-DEV-PROCESS), gap 3.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* LR-BEHAV-RENDER-FIDELITY: what's new: process 3 keeps raw highlights when Exposure is raised (#1632)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* LR-BEHAV-RENDER-FIDELITY: a flat last camera-curve segment joins the V3 shoulder with its own slope (#1632)
The V3 camera shoulder took the last segment's slope with a floor of 0.1, so a flat or shallow
segment (valid for a fitted, DNG or saved curve) joined with a kink: slope 0 on the curve, about
0.1 just past it. The shoulder now keeps the segment's own slope at the knot. Below 0.1 a quadratic
term in 2^t - 1 joins the denominator: it adds no slope at the knot and makes up the 0.1 pace
further up, so a flat curve still closes on white. Segments at 0.1 or steeper are byte-identical,
and the generic curve passes no floor. Comments now say the shoulder approaches white in real
numbers and can round to it in f32. Found in an independent review of the branch.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* LR-BEHAV-RENDER-FIDELITY: V4's GPU test pins V4; the corpus DRO photos keep their knots under the V5 bound (#1632)
The GPU light-operator test assumed the default process is V4; it now sets V4, since V5 is the
default. The corpus DRO test checks that dro_off's V5 bound leaves the second-last knot where
the rate bound puts it on the Sony DRO samples, so their V1 to V4 renders don't change.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* LR-BEHAV-RENDER-FIDELITY: the DRO-off curve is main's again, so V1 to V4 keep it (#1632)
CodeRabbit found that the V5 bound in `dro_off` could move the second-last knot of a DRO
photo whose fitted last segment is flat, and V1 to V4 read that curve too. `dro_off` and
`at_most` are back to main's, so the camera-look fit is unchanged and LOOK_VERSION stays.
The DRO tests check the V5 shoulder where the lowered segment's slope over its squared gap
is at most the fitted one's (then it stays below), and on the Sony DRO corpus samples.
Also: `rolloff_hdr`'s doc names the HDR lift, and the release note names DNGs whose curve
already reaches white.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* Issue #2165: place a Lightroom collection that can't nest where it is under the nearest set
Lightroom Classic keeps a saved print, book, slideshow or web gallery inside a plain collection, but a
LightCraft album nests only in a folder. The importer passed that collection as the album's parent,
AddAlbum rejected it with "parent must be an existing folder", and the atomic batch rolled back every
album and every catalog-only photo (#2165: photos but no collections; #2532: nothing at all).
An album whose Lightroom parent isn't a collection set (plain, smart, a saved creation, system-only or
missing) now joins the nearest set above it, or the top level, and the import report names it under
warnings. Before each AddAlbum the parent is checked against the catalog's rule (an existing folder,
or one added earlier in the batch), so no album can fail the batch. Builds on #2168 by @endthestart.
Fixes#2165, fixes#2532.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Issue #2165: a Lightroom collection never silently loses its album; warnings name the set as the library does
- Two collections never share an album. An album id the counter hands out that is already taken (the counter
saturates, so a damaged one repeats) stops the import with an error naming the collection, as AddAlbum's
"album exists" did before; it no longer drops the second collection and its photos while the report counts it.
A collection listed twice imports once when both rows are the same and stops the import when they differ. An
index that names one existing album for two collections gives the second an album of its own.
- A relocation warning names the destination set as this library calls it (a set renamed after an earlier import),
and a set whose earlier album isn't a folder is described as such, not as "not a collection set".
- The staged-album set is no longer called `added`, which #3142 uses for its photo count in this function.
- Tests: relocated re-import, a user-moved album on re-import, a renamed destination set, a set album that isn't a
folder, sets nested under a plain collection, an exhausted album counter, duplicate collection rows and an index
naming one album twice.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(lightroom): name the Lightroom collection id in relocation warnings (#2165)
A collection imported somewhere other than where Lightroom keeps it now ends
its warning with "(Lightroom collection N)", so two collections that share a
name can be told apart, as #2165 asked for.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(lightroom): a collection listed twice costs only the duplicate (#2165)
A different collection under the id of an earlier one stopped the whole
import. Like any bad Lightroom record it now costs only itself (#1588):
the first row of each id is kept, in catalog order, and a different one
is left out with a warning naming both; the photos listed under that id
go to the first. A row repeated as it is still drops quietly. The
warning reads as the one #3152 gives, so the import behaves the same
whichever of the two lands first.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(lightroom): the nearest-set search ends on a parent loop or a deep chain (#2165)
`collection_parent` follows a collection's parents to the nearest set
with a seen-set and a 64-level cap. `validate` refuses loops before it
runs, so no import test reached that guard: a unit test now gives it
A in B in A, a collection in itself, a child of that loop (with and
without a set in it) and a 100-deep chain of plain collections. The
duplicate-collection test also checks that an exact repeat gives no
warning.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* catalog: resync finds the retry record from the end, not every marker (#2124)
A damaged log line made only of the record-start marker repeated N times cost O(N^2):
resync scanned every occurrence of the marker and ran a from_utf8 + decode_record for each,
so a 2 MB line (~300k markers) hung library open effectively forever. Only the retry record
can follow a torn fragment (it re-encodes the same ops with the same seqs), so resync now
takes the LAST occurrence of the marker and requires a fragment to precede it; the
seq <= last + 1 gate and the CRC check are unchanged.
Adds a regression test: a 300k-marker line followed by a valid retried record opens in well
under a second and still recovers the record (torn_fragments == 1).
* catalog: drop unneeded mut bindings in the resync regression test
* catalog: count the start markers resync decodes instead of timing the cost test
The cost test asserted a one-second wall-clock limit, which a slow worker can miss without any regression. The test now counts the start markers that resync decodes on the hostile line, through a counter that exists only in test builds, and asserts that at most the last one is decoded. The production path is unchanged.
* Repair review branch integration
* Address review for pull request 2179
* Format the files this pull request changes
* Repair review branch integration
* Address review for pull request 2179
* Format the files this pull request changes
* catalog: pin recovery of a rules retry with nested seq values on the final line
A failed append can leave its fragment glued to a CRC-valid SetAlbumRules
retry whose rules hold several nested {"seq":1} values, and the damaged
line can be the log's last. Picking the last raw {"seq": occurrence as
the record start rejects the whole record and truncates the final line,
losing the valid operation (issue #2124). The regression opens such a log
and asserts the operation is replayed and the log file is preserved.
* catalog: bound the resync scan and require the record header on candidates
Every header-shaped marker in a damaged line still became a resync
candidate, and each attempt decodes the rest of the line, so a crafted
final line of many {"seq":N,"crc":M,"op": markers made Journal::open
spend quadratic work on one load (CWE-407). Two changes:
- a candidate must now match the full record header shape, digits after
{"seq": and after ,"crc": and a trailing ,"op":, so nested markers
(a rule value such as {"seq":1}) and junk never reach decode_record;
- a per-line budget of 64 MiB of candidate suffixes, checked with
checked_add, stops the scan once it is spent; the line then reads as
damage, which open handles safely.
The new regression stuffs a final line with 5000 header-shaped markers
and asserts a bounded number of candidate decodes via the existing
counter (not timing), that open still succeeds with the line dropped as
a torn tail, and that a CRC-valid retry after the junk is still
recovered.
---------
Co-authored-by: eliets2 <287273517+eliets2@users.noreply.github.com>
The reporter could not tell whether the lens database had been found, nor why a lens name did not match, because the load path is silent on success; matching itself is already case-insensitive (tokens() lowercases both sides in crates/lensdb/src/lib.rs:219), so the letter-perfection complaint does not reproduce in this tree, but the missing diagnostics do.
database() now logs the database directory, the number of XML files read, the lens and camera counts, warns when the directory holds no XML files or yields no profiles, and notes the lens name when no profile matches it; a small pure helper formats that summary so it can be asserted in a unit test.
Test: lens_database_summary_reports_files_and_profiles failed before the change and passes after.
Co-authored-by: eliets2 <287273517+eliets2@users.noreply.github.com>
The Create Preset name box has no automation id and no Esc restore today, so neither behavior exists or can be verified; the test pins the missing field:presetName registration and the Escape/Return behavior using only existing control-channel requests.
Opens the Create Preset dialog via dialog.createPreset, asserts field:presetName is registered in the widget registry, types into the field with ui.text, checks Return keeps the text and Escape dismisses the dialog without saving.
Test: create_preset_name_box_restores_on_escape_and_keeps_its_text_on_return failed before the change and passes after.
Co-authored-by: eliets2 <287273517+eliets2@users.noreply.github.com>
Windows already defaults to DX12 alone everywhere else (default_compute_backends, default_window_backends), but the window's fallback chain still probes Vulkan, and a persisted renderer name can promote it ahead of DX12. That is exactly the first-launch/second-launch asymmetry reported: the Vulkan driver is only touched on the later start, where it crashes the process before any window appears.
Treat Vulkan as opt-in on Windows in `window_renderer_order`: drop it from the platform chain and ignore a remembered or failed Vulkan renderer unless the environment explicitly forces it (`LIGHTCRAFT_GPU_BACKEND=vulkan` / `WGPU_BACKEND=vulkan`). The existing `window_renderer_fallback_order` expectations for Windows have to be updated with it.
Test: windows_never_uses_vulkan_unless_it_is_asked_for failed before the change and passes after.
Co-authored-by: eliets2 <287273517+eliets2@users.noreply.github.com>
* CI: Windows leg for pull requests that change Windows code, or labelled full-ci
* ci-windows: also run on manifest and Cargo.lock changes
* deps: craft-update with flate2's miniz backend (fixes larger-than-raw ZIP TIFFs on Windows)
craft-update's zip dependency used the `deflate` feature, which pulls in
flate2's zlib-rs backend. Cargo unifies flate2's features across the app, so
on Windows the whole of Lightcraft used zlib-rs, whose level 1 (the TIFF
exporter's DeflateLevel::Fast) is a static-Huffman mode that can make a
16-bit ZIP TIFF larger than the uncompressed one. storytold/craft-libs#608
switches craft-update to `deflate-flate2` (miniz_oxide), the backend Linux
and macOS already use.
Only craft-update's rev moves (c5a1cbf -> a231e51); the other craft-libs
crates stay where they are.
* ci-windows: cover lightcraft-cli and menus/files.rs (cfg(windows) code)
craft-update's zip dependency used the `deflate` feature, which pulls in
flate2's zlib-rs backend. Cargo unifies flate2's features across the app, so
on Windows the whole of Lightcraft used zlib-rs, whose level 1 (the TIFF
exporter's DeflateLevel::Fast) is a static-Huffman mode that can make a
16-bit ZIP TIFF larger than the uncompressed one. storytold/craft-libs#608
switches craft-update to `deflate-flate2` (miniz_oxide), the backend Linux
and macOS already use.
Only craft-update's rev moves (c5a1cbf -> a231e51); the other craft-libs
crates stay where they are.
Bring #2315's current head onto the page-mode branch, including the check that a cross-origin parent gets no bridge. ?host=parent wins when a page also sets data-host="page". A page-mode event is typed by its name, listeners are Fn, and dirty state is recorded before the synchronous send.
Co-authored-by: Cursor <cursoragent@cursor.com>
Keep the current changelog and record the embed under Unreleased. A
cross-origin parent gets no bridge, so exports keep downloading; an
opaque origin still gets none.
Co-authored-by: Cursor <cursoragent@cursor.com>
* Docs: drop the Last updated / Change header line that every PR conflicted on
* xtask parity: the header's Changes field holds only the revision-history link; name the kept fields
* xtask parity: reject a field after the header's Changes link
Reverts db60ab400: at 30 min the gate stopped a healthy run (exit 124 at 30:00, run 42015761190), which also showed the watchdog's process list and error work.
The CPU tests got this in #3779. These only run with a real GPU, so
hosted CI never showed them failing.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* LR-EDIT-DETAIL-DENOISE: AI Denoise works out of the box with a built-in denoiser
Turning AI Denoise on no longer needs an ONNX model and a denoise-model.json. Without a model of the user's own, the engine runs a built-in pure-Rust denoiser (noise measured per tile, non-local means on the Bayer planes, edge-directed demosaic) through the same tiling, cache, queue, preview and export path as a model. Installing a model stays optional; Stop using returns to the built-in one, and the id `builtin` is reserved.
The set-up prompt and its resume-after-install flow (model_setup.rs, PhotoState::NoModel) are removed. Tests updated for the new behaviour, with new tests for the built-in path; docs, trackers and locale catalogs updated.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* LR-EDIT-DETAIL-DENOISE: built-in denoiser cleans the colour planes together and adapts to the noise
The built-in denoiser now measures the photo's noise once from the whole mosaic (the model prepares the photo before its tiles run) instead of per tile, stabilises the variance (generalised Anscombe), rotates the four Bayer planes with a Hadamard transform and runs a non-local-means filter whose patch distance spans all planes, so colour blotches are cleaned with the brightness. It cleans gently at low noise to keep fine detail, and harder, with a second pass that matches on the first pass's cleaner picture, as the noise grows. Cached pictures made by the first version are made again (builtin version 2).
Adds an opt-in benchmark (tests/denoise_builtin_quality.rs, public CC0 raw plus noise of known level, scored against the original) and tests for the whole-photo noise estimate, strong noise, bad noise values and the strength ramp. On the Sony A7 III sample the result is 3.6, 7.0, 9.1 and 9.7 dB above the noisy picture at light, medium, heavy and extreme noise, against 2.9, 6.0, 6.5 and 5.8 dB for the first version.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* contributors: add esli1283
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* LR-EDIT-DETAIL-DENOISE: docs say how to run the built-in denoiser's quality benchmark
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* LR-EDIT-DETAIL-DENOISE: built-in denoiser cleans colour further, keeps more texture and leaves no isolated specks
Colour-difference planes get a wider pass guided by the cleaned brightness plane, the first-pass threshold is lower (more texture kept), and cells with no matching patch lean on a looser average in heavy noise. Skips negligible weights for speed; bumps builtin::VERSION to 3. Benchmark adds a texture figure; on the public A7 III raw the gain over the noisy picture is +3.7 / +7.2 / +9.7 / +10.4 dB (was +3.6 / +7.0 / +9.1 / +9.7).
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Windows: tests build paths one component at a time and doc_path has no unused variable
On Windows `cargo xtask ci` failed before it reached any of the work under test:
- doc_path.rs bound the gvfs path outside the cfg(not(windows)) block that
uses it, an unused variable under -D warnings.
- tests_import and the MCP headless discovery test joined "trip/day2" onto a
temp folder, giving mixed separators, and compared them with the normalised
paths the folder walk returns. They now join each component.
Test and lint changes only.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* LR-EDIT-DETAIL-DENOISE: built-in denoiser filters with block-matching collaborative filtering, on the GPU
The built-in denoiser's filter is now block matching with collaborative
filtering (BM3D / CBM3D, written from the paper) instead of non-local means.
On the public Sony A7 III benchmark with added noise it scores 0.25 to 0.6 dB
higher at every noise level and keeps more texture at medium to extreme noise
(light noise keeps slightly less: 0.58 against 0.62), as fast as before on the
processor. docs/denoise.md records the comparison with non-local means and
weighted nuclear norm minimisation (tried, not kept: about +0.03 texture for ten
times the time) and what the tuning showed.
- denoise-core: bm3d.rs (matching on the brightness plane, 2-D DCT plus Haar
across the group, hard threshold then Wiener, hard threshold rising with the
noise). Builtin::run_with takes the filter stage, so every other step is shared
between devices. Tuning.bm3d selects it; non-local means stays as the fallback.
builtin::VERSION is 4, so cached pictures are made again.
- gpu: bm3d.rs and wgsl/bm3d_*.wgsl run the grouping, the filtering and the
putting back on the graphics card, in the same order as the reference (the
results agree to rounding: at most 0.1 noise deviation at a few tie blocks,
4e-6 on average, identical every run). Noise measurement, stabilising and the
demosaic stay on the processor. FXC (DX12) needs the working arrays at module
scope and no dynamically indexed vector: documented in docs/gpu-pipeline.md.
- engine: the card is set up once per process for the first photo that may use
it, checked against the processor on a check tile (in the filter's own domain:
the demosaic's direction choice can flip a pixel on a tiny difference), timed,
and used where it is faster. A tile it gets wrong runs on the processor and
three stop it. Settings' Run on choice, device line and "Try the graphics card
again" now work for the built-in denoiser. Its set-up marker lives in the
models folder.
- The benchmark takes LC_GPU=1, LC_NLM=1 and LC_B_* for sweeps.
On an RTX 4080 SUPER a 256-cell tile takes 22 ms on the card against 408 ms on
one processor thread, and the 1536 x 1024 benchmark crop 0.13 to 0.24 s against
1.0 to 2.1 s on four threads, with identical scores.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* LR-EDIT-DETAIL-DENOISE: the built-in denoiser measures the noise per colour plane and sets its strength from it
The first noise estimator read a picture's texture as noise: it never reported
less than about 0.003 at mid-grey whatever the real noise, so the denoiser
always believed a photo was about as noisy as ISO 12800. The threshold curve was
tuned on that over-estimate, and its levels (0.024 to 0.14) are far noisier than
real Canon bodies produce (about 0.0025 at ISO 400 up to 0.038 above ISO 25600,
measured on a private library; only aggregates are recorded in the docs).
- estimate_noise: each colour plane is read on its own (they sit at different
levels in a raw), a second-difference operator cancels flat and sloping signal,
12 x 12 blocks, the quietest 5 % at each brightness divided by the bias of that
quantile of pure noise (0.67, measured), a constrained line fit. The first
version stays as estimate_noise_v1 to compare with. On 30 public pictures with
known added noise the 10th to 90th percentile of estimated / true deviation at
mid-grey is 0.97 to 1.29 at the ISO 6400 level against 0.94 to 1.96.
- bm3d::Params::lambda is a curve of the noise (1.2 at 0.0028 up to 3.5 at 0.14,
straight against its logarithm) instead of two end values and a strength, and
plan / filter take the noise level; the GPU path shares plan, so CPU and GPU
agree as before. Fitted on clean low-ISO photos of a Canon EOS R and R6 Mark III
with noise of their measured levels added: the lowest threshold within about a
quarter of a decibel of the best at each level.
- Result (PSNR, EOS R / R6 Mark III, 10 + 5 photos): ISO 25600 level 38.36 /
38.86 from 36.18 / 36.21, ISO 51200 level 33.83 / 34.45 from 28.42 / 28.78, ISO
6400 39.93 / 40.69 from 39.30 / 39.74, quiet photos no longer over-smoothed;
the noise left in the result falls from 1.3 to 3.1 down to 0.73 to 0.99.
- Tests: threshold curve, flat versus textured pictures, no-flat-area pictures,
clipped / NaN mosaics; an opt-in accuracy harness on the public corpus
(denoise_noise_estimate) with a calibration of the quantile bias; the benchmark
takes LC_REAL, LC_BIN, LC_FULL, LC_EST and LC_B_LOFF.
- builtin::VERSION is 5, so cached pictures are made again. docs/denoise.md has
"How the noise is measured" and "Fitted on real cameras".
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* LR-EDIT-DETAIL-DENOISE: GPU workspace pool cannot miss a wake-up; benchmark path and parity date fixed
Review findings (CodeRabbit) on the built-in denoiser pull request:
- bm3d::Bm3dGpu::forget and nn::NetRunner::forget changed the workspace count
without the free-list lock. A take() that had found no free workspace and read
made == WORKSPACES, but had not gone to sleep yet, could miss the wake-up and wait
for good on a slot that was already free. forget now changes the count under the
free lock, in the same order as take(), then notifies.
- A test for each runner holds the free lock and checks that forget waits for it;
both fail on the old code and pass now.
- docs/denoise.md: the benchmark command resolves the raw file from the repository
root, since the test runs from the crate's folder.
- docs/target-app-parity.md: Last updated matches its newest revision-history entry.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* LR-EDIT-DETAIL-DENOISE: doc comments for the functions this branch adds
CodeRabbit's pre-merge docstring check counted 49.72 % of the functions this pull request touches as documented (threshold 80 %). Every function the branch adds, the built-in denoiser's block-matching and non-local-means filters, its noise estimator, the GPU runner and their tests, now says what it does or what the test proves. Older functions the branch only touched are left as they were. Comments only: no code line changes.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* LR-EDIT-DETAIL-DENOISE: make the GPU set-up marker's folder; fix the benchmark's default path
The crash guard was lost when the models folder did not exist yet. The opt-in
quality benchmark resolved its default raw file against crates/engine.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* LR-EDIT-DETAIL-DENOISE: enforce the cache limit without a models folder
The built-in denoiser makes products when there is no models folder, but
eviction returned early in that case, so the cache could outgrow its limit.
It now applies the default limit.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* LR-EDIT-DETAIL-DENOISE: the cache-limit test needs no 20 GiB file off Unix
The no-models-folder test now checks the limit itself on every platform and
keeps the oversized sparse file for Unix only.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* S0002: review fixes for the built-in denoiser
Tell the runner a photo's noise only when it could be measured, run prepare()
after the work gate with a cancel check, reword the Settings hint for builds
without a models folder, drop untranslated placeholder locale entries (they
fall back to English) and restore the cs.json spacing; rustfmt.
Co-Authored-By: Claude Code <noreply@anthropic.com>
* S0002: fix review findings: command descriptions, stale gpu test, self-test noise
The denoise.models.select and denoise.toggle descriptions now describe the
built-in fallback. Drop our workspace-forget test, which read fields that
upstream's Workspaces pool (#2631, same fix) replaced and so did not compile;
upstream's own tests cover it. The built-in self-test is told a noise instead
of measuring a 16-cell tile too small to measure.
Co-Authored-By: Claude Code <noreply@anthropic.com>
---------
Co-authored-by: esli1283 <esli.aaron@outlook.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Claude Code <noreply@anthropic.com>
Co-authored-by: FredApps <FredApps@users.noreply.github.com>
Review of #2857 (P2): import takes a raw's orientation from the decoder
(CIFF for CRW, the raw IFD for MEF); re-read and sync used Exif then XMP.
file_orientation now prefers lightcraft_raw::probe_info when the file is a
raw, so Read Metadata from File and Synchronize Folder agree with import.
* WIP: suppress isolated hot photosites in the raw mosaic (#820)
Noise model fitted to the image, candidates 5 sigma above every same-colour neighbour, kept when two or
more direct neighbours are lit (real light); adjacent hot pairs are replaced too. LIGHTCRAFT_HOT_PIXELS=0
turns it off, LIGHTCRAFT_HP_DEBUG=1 prints statistics. Renders are cached apart from older ones.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* WIP: hot pixel suppression off by default (LIGHTCRAFT_HOT_PIXELS=1 turns it on)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* #1345: mosaic outlier filter: cache key no longer names the #858 comparison switch (merged upstream)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* #1345: mosaic outlier filter: fixed thresholds (no LIGHTCRAFT_HP_K / _SPOT knobs), statistics under LIGHTCRAFT_PROFILE
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* #1345: Remove Hot Pixels, a box in Detail ▸ Noise Reduction, on for newly imported raws
`Detail::nr_outliers` replaces single outlier photosites in the raw mosaic before demosaicing. It is
true in `DevelopSettings::for_raw` and false by default, so edits saved before the box existed keep
their look. The loaders take the flag (no more `LIGHTCRAFT_HOT_PIXELS`), a decoded source records
it, and a cached raw source decoded with the other setting is decoded again. The box shows for raws
only (`check:detail.nrOutliers`).
* #1345: Remove Hot Pixels off keeps old settings' JSON; smart previews fit either setting
- `detail.nr_outliers` is left out of the stored JSON when off, so settings saved
before it keep their hash and cached thumbnails. Copy / paste, presets (also
at an amount), preset updates and Auto Sync work on
`DevelopSettings::to_json_for_merge`, which states it, so turning the box off
still carries over.
- `DecodedSource::fits_outliers` accepts a smart preview (`from_proxy`): it has
no mosaic, so an offline raw with the box on keeps reusing the decoded proxy.
(review of #1350)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* #1345: the Detail eye and Reset Detail switch Remove Hot Pixels off
`DevelopSettings::removes_hot_pixels` (the box and the Detail section's
eye) decides the raw decode in the app, the web worker and the thumbnail
bench, so a Detail section that is off contributes nothing here either.
Reset Detail resets the box to the general default (off), like the
sliders it resets.
(review of #1350)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* #1345: the hot pixel limit counts only replaced photosites, and can be set
The 0.2 % limit was checked against the candidates before real light was
filtered out, so a dense star field reached it with its stars alone and
kept its hot pixels too. It now counts the photosites that would be
replaced, as the module docs say.
The limit is now a parameter (RawImage::suppress_hot_pixels_with, default
HOT_PIXEL_MAX_SHARE) and a setting: Settings > Performance > Hot pixel
limit, applied with the new command app.hotPixelLimit. Changing it forgets
the decoded sources and changes the render cache keys of photos that
remove hot pixels; at the default every key stays as it was.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* #1345: the app's default hot pixel limit is the default
The setting is an f32: 0.2 % read back as 0.2000000029… % was a new limit,
so every start forgot the decoded sources and changed the render keys of
photos that remove hot pixels. A value within a millionth of the default
now is the default.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Format the imports
* Web loader test states what it decodes with
* Format the media exports
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: FredApps <153173854+FredApps@users.noreply.github.com>