mirror of
https://github.com/storytold/lightcraft.git
synced 2026-11-23 19:03:54 +01:00
extract/shared-base64-encode
495
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
25ffe3e5d4 |
codecs,raw,preview,meta,engine: cut over TIFF/JPEG/focus to craft-libs and fix CI (#4244)
* codecs,raw,preview,meta,engine: cut over TIFF/JPEG/focus to craft-libs and fix CI * docs: update parity-checklist paths after craft-raw/craft-metadata cutover * Remove unused codec workspace deps and cut examples over to craft-image-codecs * chore: update Cargo.lock after removing unused codec deps |
||
|
|
6f012c10b7 | chore: finish craft-raw/craft-libs cutover after merge with main | ||
|
|
8a2f20f1ac |
Merge remote-tracking branch 'origin/main' into switch-lightcraft/wip-craft-raw
# Conflicts: # Cargo.lock # Cargo.toml # crates/codecs/Cargo.toml # crates/codecs/src/heif.rs # crates/codecs/src/psd.rs # crates/meta/Cargo.toml # crates/raw/Cargo.toml # crates/raw/src/dcp.rs # crates/raw/src/dng.rs # crates/raw/src/gaintable.rs # crates/raw/src/lib.rs # crates/raw/src/semantic.rs # crates/raw/src/vendor/arw6.rs # crates/raw/src/vendor/cr2.rs # crates/raw/src/vendor/cr2/sraw.rs # crates/raw/src/vendor/crw.rs # crates/raw/src/vendor/erf.rs # crates/raw/src/vendor/hasselblad.rs # crates/raw/src/vendor/kodak.rs # crates/raw/src/vendor/mef.rs # crates/raw/src/vendor/mrw.rs # crates/raw/src/vendor/nef.rs # crates/raw/src/vendor/nef_lens.rs # crates/raw/src/vendor/nefc.rs # crates/raw/src/vendor/pef.rs # crates/raw/src/vendor/srw.rs |
||
|
|
264330d7e9 | meta: migrate DateTime, gpx, and xmp_merge to craft-metadata | ||
|
|
e4dd081dd4 |
Use craft-gainmap from craft-libs for gain map metadata and arithmetic
Use craft-gainmap from craft-libs for gain map metadata and arithmetic * Use craft-heif from craft-libs; remove crates/heif lightcraft-heif moved to craft-libs unchanged as craft-heif (storytold/craft-libs#784), so PhotoCraft can share it. The layer table, the heif CI step and the change triggers drop the local crate; a workspace file change (which a craft-heif rev bump is) still runs the heif step. * Pin craft-heif to the merge of storytold/craft-libs#794 * docs: the HEIF rows point at craft-heif, not the removed crates/heif * Use craft-gainmap from craft-libs for gain map metadata and arithmetic crates/codecs/src/gainmap.rs keeps the JPEG layout (encode_jpeg, read_jpeg, is_gain_map_jpeg) and re-exports GainMapMeta, GainImage, GainMapOptions, ISO_URN, compute and apply from craft-gainmap, which is this file's metadata and arithmetic moved to craft-libs (storytold/craft-libs#904). The tests of the moved code went with it. * craft-heif's Options has a chroma field at this rev: keep the libheif upsampling LightCraft had * raw: count the chunks a TIFF declares from its offsets table craft-tiff builds at most one chunk descriptor per byte of file (craft-libs#827), so a grid of tiles sharing one payload lists fewer chunks than the image declares. Compare the offsets table, which is the source of truth, so such a file reaches the byte-accounting check and is refused for the data it actually holds. |
||
|
|
c24cf70d4b | WIP: raw decoding through craft-raw (not compiled) | ||
|
|
c5d60d2fa7 |
Use craft-tiff from craft-libs for TIFF/IFD (#4088)
* Use craft-tiff from craft-libs; remove crates/tiff lightcraft-tiff moved to craft-libs unchanged as craft-tiff (storytold/craft-libs#783), the first step of sharing RAW support with PhotoCraft (storytold/craft-libs#587). The layer table drops tiff and its intra-layer ordering before raster. * Pin craft-tiff to the merge of storytold/craft-libs#795 |
||
|
|
aea4b80554 | Merge main into the craft-heif + craft-tiff base | ||
|
|
a4a797e2f2 |
security(raw): shared header-scan budget for tagged previews, tile-sized lossy JPEG budget, bound deflate tile padding (#3695)
* security(raw): share one header-scan budget across tagged previews, tile-sized lossy JPEG budget, bound deflate tile padding * address review: charge a candidate preview range to the shared budget only after it validates * address review: charge the candidate header walks to a shared work budget * address review: bound lossy tile JPEGs by the tile's MCU-padded size; accept the writer's padded Deflate tiles |
||
|
|
34161c9a8c |
Use craft-tiff from craft-libs; remove crates/tiff
lightcraft-tiff moved to craft-libs unchanged as craft-tiff (storytold/craft-libs#783), the first step of sharing RAW support with PhotoCraft (storytold/craft-libs#587). The layer table drops tiff and its intra-layer ordering before raster. |
||
|
|
cb86952cbf |
security(raw): CR3 timed maker notes are parsed once per distinct range under a shared budget; Sony quad tiles' frames may not exceed the tile (#3700)
* security(raw): CR3 timed maker notes are parsed once per distinct range under a shared budget; Sony quad tiles' frames may not exceed the tile * address review: skip an oversized timed maker note instead of ending the search |
||
|
|
de096566ff |
Merge pull request #3887 from eliets2/fix/issue-2028-kelvin-white-balance-missing-for-dxo-dem
Cover DxO demosaiced Fujifilm DNGs for Kelvin white balance |
||
|
|
10db03b091 |
LR-IMP-FORMATS: withdraw compressed ORF decoding pending provenance review (#3916)
* LR-IMP-FORMATS: withdraw compressed ORF decoding Remove the decoder introduced in #3775 pending provenance review while preserving uncompressed ORF layouts and embedded previews. Add unsupported probe/decode regressions, remove the prior provenance narrative, and restore camera coverage records to preview-only. * LR-IMP-FORMATS: refresh ORF support status and render caches * LR-IMP-FORMATS: document ORF withdrawal regressions |
||
|
|
3b209a40b7 |
Cover DxO demosaiced Fujifilm DNGs for Kelvin white balance
DxO demosaiced DNGs from Fujifilm RAF files should offer the same Kelvin white-balance editing as the original RAF and Adobe demosaiced DNGs, instead of only a relative slider. Treat a DxO make on a DNG as transparent when checking Fujifilm (and other listed) models in covers, so the Kelvin scale is offered for those files. Test: dxo_dng_fujifilm_model_is_covered_for_kelvin failed before the change and passes after. |
||
|
|
547fd29f3c |
Extend CR3 white level to actual sensor saturation (#3805)
* 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> |
||
|
|
ba282d3637 |
LR-IMP-FORMATS: pure-Rust clean-room compressed Olympus ORF bitstream decoder (#3775)
* 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> |
||
|
|
ef7f99d12f |
Add GFX100S II to the spectral camera matrix table (#3139)
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>
|
||
|
|
d729c80a5a |
Detail: Remove Hot Pixels, on for newly imported raws (#1345) (#1350)
* 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> |
||
|
|
61005f3dc1 |
Culling: the loupe uses built previews; photos prepared ahead and in the background (#3077)
* PERF-CULL-0: ui.inspect reports how the loupe showed each photo it was stepped to
perf.loupeSteps records, per step, the ms from the step to the first frame
with anything of the photo, with a full-size picture (camera JPEG, cached
or rendered) and with LightCraft's own render, measured on the frames the
app draws, so culling benchmarks exclude the control channel's round trip.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 95f0343848fc0a238f80f07ceb292eaf6779aeaa)
* PERF-CULL-1: browsing a folder shows its first photos within a second
The Local view read and hashed every file of the folder before showing any
of them (2,933 EOS R5 C CR3s: 30.6 s to the first photo). It now hands the
files the library lacks straight to the import, ordered the way the view
sorts them (file time for the date sorts), which adds them batch by batch:
first photo 0.9 s, twelve thumbnails 1.4 s, the whole folder in the same
~34 s as before, in the background.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit b766558e7ef4f802919a144da53e444f70e0186b)
* PERF-CULL-2: the loupe makes the next photos' camera previews ahead of the step
Culling steps through photos, and each step waited for the next raw's
embedded JPEG to be read and decoded (p50 187 ms, p95 332 ms on EOS R5 C
CR3s) and then for a full raw develop. Now:
- the loupe's stand-ins for the next five photos in the direction of
travel and the one behind are made ahead (Slot::QuickAhead, priority
just below the loupe's own render) and taken over at the step, so a
step shows the camera JPEG at once (p50 0 ms);
- a slot keeps its photo while the photo stays wanted, so photos that
shift places as the user steps are not made twice;
- decoded camera JPEGs stay in the memory LRU (never on disk), so going
back shows them again without a decode;
- while an arrow key is held (a photo left within 0.25 s), the raw
develop waits until the photo has stayed 0.12 s, and a render queued
for a photo already left is dropped, so the workers make the previews
instead of renders nobody sees.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 0430b95636d2b6adce8887af7b9464687c95549e)
* PERF-CULL-3: CR3 previews take the smallest embedded JPEG that covers the view; plain sRGB JPEGs decode straight to 8-bit
Upstream's embedded_preview_covering (
|
||
|
|
8972565249 |
LR-PROF-IMPORT: import the user's own DNG camera profiles (.dcp) (#1063)
* LR-PROF-IMPORT: import the user's own DNG camera profiles (.dcp)
profile.import (File > Import Profiles & Presets, drag & drop) now also
reads DNG Camera Profiles: the user's own .dcp files, e.g. made with a
colour-checker tool. They appear in the profile browser and menu under
Camera Profiles with dcp:<camera>-<file> ids; profiles.camera lists them
and profile.deleteCamera / profile.deleteImported remove them. A library
on disk keeps a copy in Profiles/. No profile ships with the app and the
repository holds none: tests build theirs in memory (write_dcp).
lightcraft_raw::dcp parses the file per DNG spec ch. 6 (magic RC in
place of 42; IFD 0 read through the existing DNG colour builders) and
DcpProfile::applied_to puts its matrices, illuminants and look in place
of a raw file's, keeping the shot's white balance, analog balance and
baseline exposure.
Choosing one (develop.profile) replaces the raw file's colour model when
it is decoded, before the starting colour and the white-balance scale
(WbScaleOf) are worked out, so the matrix path takes over from the fitted
JPEG look (CR3/CR2/ARW...) and white balance follows the profile. A
profile without a tone curve of its own (most chart-made ones) keeps the
photo's contrast: the DNG's tone curve, else the tone of the camera-JPEG
fit. The profile travels with SourceRef::File into FileLoader /
PairLoader (new Option<&DcpProfile> argument); a decoded source records
the profile it was made with and is not reused for another. Smart
previews and the web render worker keep the file's own colour; rendered
(non-raw) photos ignore it.
This reverses the documented "Adobe profile formats deliberately
unsupported" stance for user-supplied files only; docs updated.
Split out of #1012.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* LR-PROF-IMPORT: build against upstream main (kelvin_presets, 3-arg loaders)
DcpProfile::applied_to keeps the file's white-balance presets (new
ColorData::kelvin_presets upstream): they are camera facts like as-shot
neutral. Upstream's new FileLoader test closures take the profile argument.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* LR-PROF-IMPORT: hover previews and browser thumbnails develop the hovered camera profile
The loupe's hover preview (preview_job) and the profile browser's thumbnails (variant_job) took
the photo's own decoded source, so hovering an imported camera profile showed the built-in colour
(and hovering a built-in profile while one was applied kept the camera profile's). Both now decode
as the hovered settings develop: the source follows the settings' camera profile, as the main
render does, and a variant's cache key already follows its settings.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* LR-PROF-IMPORT: build against upstream main (face-tile test loader and render_bench take the camera profile)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* CI: the catalog's staging-link test module is Unix-only (unused import broke clippy on Windows)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* CI: same-folder export test expects the '/'-joined subfolder (failed on Windows)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* CI: folder-drop tests build widget ids with the Folders tree's '/' paths (failed on Windows)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* LR-PROF-IMPORT: rustfmt after merging main
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* LR-PROF-IMPORT: a real D750 camera profile as a pinned test corpus, checked against Lightroom
dieli's CC0 Nikon D750 ColorChecker set (Calibrite PROFILER dual-illuminant DCP,
matrix-only; the two chart NEFs; Lightroom Classic 15.6 renders with the profile)
is fetched by cargo xtask corpus --download into corpus/d750-colorchecker/, pinned
to commit f37f4054 and by sha256; nothing is committed.
Tests (skip without the corpus): the profile parses as matrix-only with
Cool White Fluorescent + D55; the matrices blend by inverse temperature; the
matrix-only path inverts the colour matrix and adapts to D50; it takes over the
chart NEFs' colour; imported and applied end to end, the charts develop within
mean dE2000 3.84 (flash) / 3.35 (indoor) of Lightroom's renders.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* LR-PROF-IMPORT: a single .dcp file is a camera profile only, not also an unreadable LUT
profile.import read every plain file that was neither a folder nor a .zip as a .cube LUT, so importing
one .dcp imported the camera profile and also reported it as failed ("stream did not contain valid
UTF-8"). Only .cube files are read as LUTs now.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* LR-PROF-IMPORT: review fixes for imported camera profiles
- A library moved or restored elsewhere finds its camera profiles in its own Profiles/ folder.
- A grid thumbnail is cut from the decoded preview only when that preview used the same camera profile.
- Render and source cache keys carry a fingerprint of the profile file, so a deleted or replaced profile never
has its old renders stand in.
- Camera profiles can be favourites, and favourites/recent entries survive reopening the library.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* LR-PROF-IMPORT: smart previews without the camera profile, current-profile source facts, unsupported files reported
CodeRabbit review of
|
||
|
|
5d97498ab7 |
Merge remote-tracking branch 'origin/main' into pr-3144
# Conflicts: # docs/raw-parity.md |
||
|
|
0852c21a9d |
Merge remote-tracking branch 'origin/main' into pr-3144
# Conflicts: # crates/engine/src/media/source.rs # docs/gaps.md # docs/parity-checklist.md # docs/raw-parity.md # docs/whats-new.md |
||
|
|
c1a1896d30 | Merge remote-tracking branch 'origin/main' into pr-2733 | ||
|
|
b0c4aa8cc8 |
security(raw): linear sparse planning, distinct-byte allocation bound, opcode list budget, ORF strip length (#3679)
* security(raw): linear sparse planning, distinct-byte allocation bound, opcode list budget, ORF strip length * address review: zero opcode cost for no-op ops, compact the sparse plan buffer |
||
|
|
06c1b9ae07 |
Use crw craftlib (#3503)
* CRW-LIB: decode Canon CRW through the shared craft-crw crate LightCraft decodes Canon CRW (the CIFF raws of the EOS D30, D60, 10D, 300D and the PowerShot G1/G6) through craft-libs' `craft-crw`, the clean-room decoder derived and verified on the `clean-room-crw-format-decode` branch and moved there with its frozen tables and derivation record. `crates/raw/src/vendor/crw.rs` is now the adapter: it maps the crate's header and samples onto `RawImage` (CFA, levels, active area, orientation, as-shot white balance, the make/model/time records a CRW keeps instead of Exif) and converts the capture time through chrono. The dependency is a local path (`../craft-libs/crates/crw`) until the craft-libs branch merges; then it becomes a git revision. Everything LightCraft-side from that branch comes along unchanged: `probe_bytes` fills metadata gaps from the decoder's records so CRW imports name their camera; the EOS D60 bundled camera profile and its chart-measured dual-illuminant matrices (`chart_table.rs`, `spectral::Camera` carries its illuminant pair) give the D60 a Kelvin white-balance scale; CRW joins the JPEG-fitted starting look, the catalog's raw formats and `lightcraft-cli calibrate`; `RENDER_CACHE_VERSION` 71; the CC0 CRW corpus entries for `cargo xtask corpus`; coverage, parity, gaps, raw-parity, target-app-parity and ROADMAP updates. The G5 stays preview-only (the crate refuses it with the reason) and the robustness test keeps its CRW sample. What does not come along: the decoder, its tables and `crw_oracle.rs` (now craft-crw's digest-pinned sample test) and the derivation record, which lives in craft-libs `crates/crw/clean-room/`. `clean-room/crw/` here keeps only the EOS D60 chart-calibration document and its capture list, with a README pointing at the record. Gates: fmt, clippy -D warnings (raw all targets; engine, catalog, cli), lightcraft-raw tests (475 + 134, the corpus files decoding through the adapter), catalog tests, engine lib tests (1,300 pass; the two failures, `tests_import::recursive_discovery_…` and `originals::tests::write_targets_pin_absent_paths_…`, are in files unchanged from main), `cargo xtask parity`, `assets`, `layers`, `coverage.py --check`. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * no message * no message * Update documentation after moving code to craft-libs * Review coment fixes * CRW: pin craft-crw f3b62ec, a truncated entropy stream is Corrupt craft-libs #472 makes craft_crw::decode refuse a stream that ends more than Limits::max_stream_end_fill (64 samples, one block) before the frame does, instead of filling the rest with predictor values and returning success. The adapter already maps craft_crw::Error::Corrupt to RawError::Corrupt; a regression test proves a truncated CRW now fails at this boundary (it decoded as a flat frame on the old pin) while its header still reads. Only craft-crw moves; craft-ui/docpath/update/window stay on c5a1cbf. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Code review comment fix * Add some tests --------- Co-authored-by: Robert Woldberg <314159+rwoldberg@users.noreply.github.com> Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> |
||
|
|
a20887e097 |
LR-EDIT-OPTICS-PROFILE: record the LensModel strings seen for the Sigma 10-18 mm exception
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
83ae6e0341 |
Merge remote-tracking branch 'origin/main' into sigma-10-18-wide-end
# Conflicts: # docs/gaps.md |
||
|
|
56c842d8fe |
Merge track r3-t09
# Conflicts: # docs/parity-checklist.md # docs/raw-parity.md # docs/ui-parity.md # docs/whats-new.md |
||
|
|
e05c4f7e7c |
Merge track r3-t08
# Conflicts: # crates/meta/README.md # crates/ui-egui/locales/cs.json # crates/ui-egui/locales/de.json # crates/ui-egui/locales/es.json # crates/ui-egui/locales/fi.json # crates/ui-egui/locales/fr.json # crates/ui-egui/locales/id-formats.json # crates/ui-egui/locales/id.json # crates/ui-egui/locales/it.json # crates/ui-egui/locales/ja.json # crates/ui-egui/locales/ka-formats.json # crates/ui-egui/locales/ka.json # crates/ui-egui/locales/pl.json # crates/ui-egui/locales/pt-br.json # crates/ui-egui/locales/ru.json # crates/ui-egui/locales/sv-formats.json # crates/ui-egui/locales/sv.json # crates/ui-egui/locales/uk.json # crates/ui-egui/locales/vi.json # crates/ui-egui/locales/zh-hans.json # crates/ui-egui/locales/zh-hant.json # crates/ui-egui/src/panels/grid.rs # crates/ui-egui/tests/it/main.rs # docs/gaps.md # docs/library-shortcuts.md # docs/parity-checklist.md # docs/raw-parity.md # docs/user/guides/export-photos.md # docs/whats-new.md |
||
|
|
a261544b77 | Integration: #3400 move the framing test's doc line back above its test | ||
|
|
3c228ae23e | Merge PR #3400: Never crash: a Samsung encryption key past i64::MAX doesn't overflow keyed() | ||
|
|
b38bb32185 |
Merge PR #3386: Never crash: strip byte counts near u64::MAX don't overflow their sum in ORF, SRW, ARW and PEF
docs/whats-new.md: both entries under 2026-10-30 |
||
|
|
1d10bc70e1 | Merge PR #3321: LR-IMP-FORMATS: decode compressed RAF 13–17 % faster with a buffered bit reader | ||
|
|
eb5b91f238 | Merge PR #2750: Never crash: tiles far larger than the image are refused before decoding (#2554) | ||
|
|
ce01d4b7d0 | Merge PR #2740: Never crash: ARW and SRW strips shorter than declared are refused before allocating (#2561) | ||
|
|
acf0f6b938 |
Merge PR #2698: LR-IMP-FORMATS: AHD blends its candidates where noise alone would pick one, no maze in noisy raws (#2094)
docs/whats-new.md: both entries kept |
||
|
|
4c1fdedd48 | Merge PR #2628: raw: CR3 preview box scan checks 32-bit lengths for overflow (#2569) | ||
|
|
a517e332d4 |
Merge PR #2664: raw: read Canon CR3/CR2 preview colour space from the maker note (#2654)
Conflicts: crates/engine/src/camera_preview.rs: LOOK_VERSION stays 13 (one above main), both version notes kept |
||
|
|
0cc014c79a | Merge PR #2514: Kelvin for Fujifilm X-Trans III bodies from the RAF's own neutral pair (#730) | ||
|
|
e0d393c732 | Merge PR #2777: LR-EDIT-OPTICS-PROFILE: Fujifilm X-S20 embedded lens corrections and spectral matrices | ||
|
|
c03c567f5e |
Merge PR #2732: LR-EDIT-OPTICS-PROFILE: Sony ILCE-6700 in-file distortion
docs/gaps.md: main's header, gap 9 and revision rows kept; gap 8 row and header carry the ILCE-6700 mention; the PR's revision row added. |
||
|
|
b854bbb94e | Merge PR #2835 | ||
|
|
13711ace2b | Merge PR #2155 | ||
|
|
8ffe73cc3c |
fix raw lens and vignette corrections
- X-S20 lens distortion and vignetting scale fixes - X-S20 / X-S10 / X-M5 spectral sensor mappings - Add Samuel Li to contributors/people.toml Co-Authored-By: Antigravity <noreply@google.com> - address review concerns - update RENDER_CACHE_VERSION value in docs/camera-preview-colour.md - made sure diagonal scales are exact match |
||
|
|
7597810299 |
SRW: a huge encryption key doesn't overflow keyed()
The maker note's key (0xa020) can be LONG8, so a value past i64::MAX made `-1 * key` overflow: a panic in debug and test builds. Use a wrapping multiply; only the low 32 bits are kept, so real files decode the same. |
||
|
|
1c906ea3db |
Never crash: strip byte counts near u64::MAX don't overflow their sum in ORF, SRW, ARW and PEF
The TIFF reader accepts LONG8 (type 16) StripByteCounts in classic TIFF, so a file can declare strips of u64::MAX and 1 bytes. The ORF, SRW, ARW and PEF decoders added the strip lengths with Iterator::sum::<u64>(), which panics on overflow in debug builds. They now add them with a saturating fold, as raw/src/lib.rs already does, so such a file is refused or read as far as its data go. The tests rewrite a synthetic file of each decoder into two strips with LONG8 counts [u64::MAX, 1] (vendor::tests::huge_strip_counts); PEF is checked for the Huffman-coded and the uncompressed path. |
||
|
|
29f9c19046 |
test(raw): spell control bytes in CR3 preview literals as escapes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014ti8KemZbjE2ZgHgV1q1BM |
||
|
|
42e54b5bb0 |
LR-IMP-FORMATS: decode compressed RAF 13-17 % faster with a buffered bit reader
The Fujifilm entropy reader read each unary prefix one bit at a time and refilled its accumulator a byte at a time. It now keeps up to 64 bits buffered and counts a prefix's zeros with leading_zeros, failing exactly where reading bit by bit would (escape limit, end of stream). A property test checks it against reading bit by bit. Sensor arrays are unchanged bit for bit: the 17 reference arrays of corpus_fujifilm_compressed_samples, plus decode checksums of 20 X-Trans CMOS 4 files. Decode on an Apple M2: X-S10 lossless 265 -> 226 ms, X-H2 448 -> 378 ms, GFX 100 762 -> 644 ms (docs/raf-compression.md). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
15a489c8a5 |
Kelvin presets: a stored neutral pair with equal endpoints reads as unusable
pair_temp_tint divided by the zero line length of a repeated point, so a deserialized pair gave a non-finite temperature and tint instead of None. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014ti8KemZbjE2ZgHgV1q1BM |
||
|
|
b881b20b72 |
Kelvin for Fujifilm X-Trans III bodies from the RAF's own neutral pair (#730)
X-T20, X-T2, X-Pro2, X-E3, X-H1 and X100F have no measured colour matrix, so As Shot showed on the relative scale. Their RAFs store the camera's own neutral multipliers for Illuminant A and D65 (tag 0xf00c). Two points give a line in (ln R/G, ln B/G); mired is linear along it, isotherms are perpendicular, tint is scaled by the CIE locus spacing. Only the file's pair and CIE colorimetry are used. Bodies with matrices are unchanged. The look stays the per-file JPEG fit. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014ti8KemZbjE2ZgHgV1q1BM |