Skip to content

Cameras and formats: bundle of open upstream PRs - #250

Merged
emmertex merged 22 commits into
mainfrom
upstream/camera-formats-bundle
Oct 17, 2026
Merged

emmertex merged 22 commits into
mainfrom
upstream/camera-formats-bundle

Conversation

@emmertex

Copy link
Copy Markdown
Owner

Ports the open upstream camera and file-format PRs into the fork. Each PR is one commit, named Port storytold/lightcraft#N: … and crediting its author. Only each PR's own commits were taken (merge-base(upstream/main, PR)..PR, then squashed), renamed to the lcc_* crates and merged by hand where our code had moved on.

Upstream PR Author What it brings Status
storytold/lightcraft#896 @chiefjawa Nikon High Efficiency NEF (HE / HE★) decoded from sensor data via oxideav-jpegxs (MIT, no dependencies); Z50 II HE and HE★ pinned included (merged into our newer NEF reader; unverified profiles, e.g. Z 8 / Z 9 / Z 6III / Z f, stay preview-only with the HE reason)
storytold/lightcraft#1891 @Arakmar Sony: Kelvin WB through presets for every body from the DSLR-A200 on (incl. α1 / ILCE-1, ILCE-1M2), focus points for more bodies, ILCE-7M3 stand-in colour for unmeasured Sony bodies, As Shot of downsized lossless ARWs included (stand-in colour applies only when our camera database has no matrices; the Canon G1 X Mark III presets entry kept)
storytold/lightcraft#1162 @trufae Lossless Olympus / OM System ORF left out: we already decode the same Olympus compressed stream (orf.rs decode_compressed, since 2026-10-13). The PR's other commits are generic smart-preview invalidation, outside this bundle's scope
storytold/lightcraft#2068 @diegobaresphoto-dev Lossless Olympus ORF (overlaps #1162) left out: same reason
storytold/lightcraft#2003 @mattsivak Lightroom lossy DNGs: JPEG XL tiles keep their declared curve; DNG tone fit with a look table and 1024 px previews included (the decode overlaps #1994, whose implementation is kept, with this PR's MapPolynomial note; the tone-fit change taken as is)
storytold/lightcraft#1994 @EmpressAthleticus Lossy JPEG XL DNG tiles declaring sRGB / BT.709 / gamma curves decode at full size included
storytold/lightcraft#1304 @radialmonster Panasonic DC-S1RM2 (S1R II) high-res RW2, tiled format 8 included
storytold/lightcraft#1305 @radialmonster Blackmagic CinemaDNG 12-bit DCT JPEG tiles (compression 7) included
storytold/lightcraft#1919 @06needhamt Hasselblad FFF colour matrix from the embedded 3FR header; 3FR / FFF RGB previews included
storytold/lightcraft#1989 @marcoarnulfo TIFF strips and tiles over 128 MiB included
storytold/lightcraft#1935 @naryzach Canon EOS R6 Mark II alias included
storytold/lightcraft#1923 @pehonnet Canon CR3 CRX high-frequency band width from tile geometry included
storytold/lightcraft#2087 @jkalkstein HEIC EXIF read; a file-date guess never reaches a sidecar partly: the file-date part. We already read HEIF EXIF/XMP in lcc_meta::extract (issue #693), so the HEIC half and its heif_metadata API were dropped
storytold/lightcraft#1165 @AlexChambers Folder import finds Sony SR2 and SRF included (its MCP test duplicated ours and was dropped; the engine test compares paths with one separator so it passes on Windows)
storytold/lightcraft#1284 @marcoarnulfo NEF as-shot WB from ColorBalance (D2H, D70, D70s) included
storytold/lightcraft#673 @radialmonster Nikon small raw (sRAW) NEFs as 4:2:2 luma/chroma included (only the commits on top of #671)
storytold/lightcraft#672 @radialmonster Two-field Coolpix NEFs (E5400, E5700 CYGM, E8400, E8800) included (only the commits on top of #671)
storytold/lightcraft#671 @radialmonster Table-less 34713 NEFs not taken: already in the fork (issue #769)
storytold/lightcraft#1901 @AlexChambers Sony A7CR (ILCE-7CR) embedded distortion included
storytold/lightcraft#1384 @alvarohn Sony A7 III (ILCE-7M3) embedded distortion included (applied by hand to our newer Sony lens decoder; the Python check tool left out)
storytold/lightcraft#1894 @bogusyogi HEIF max_pixels on uncropped SPS sizes and grid totals included
storytold/lightcraft#1893 @bogusyogi JPEG XL size check before frames, allocation budget included
storytold/lightcraft#1325 (draft) @jaredt17 4:2:2 HEIF / HIF (Sony, Canon; needed for α1 HIF) left out: tbraun96/heic-rs#10 is still open and unreleased (latest heic-rs 0.1.4, which we already use, predates it). A [patch] to a git rev would also need unknown-git = "deny" relaxed in deny.toml; that is a maintainer decision

Conflict-resolution notes

  • Crate names, LIGHTCRAFT_* env reads (now lcc_brand::env_os) and product names in ported docs were renamed; cargo xtask brand check passes.
  • Upstream docs (gaps, raw-parity, whats-new, camera-preview-colour, …) conflicted everywhere and were kept as ours. parity-checklist.md got a short formats-row update and revision rows; HE NEF (issue Fix Windows build: toast_text is unix-only like its callers #193) is no longer listed as preview-only for the verified profile (also gaps.md, raw-parity.md). The new docs nikon-he.md and sony-lens-corrections.md updates came along.
  • NEF: HE decoding, Coolpix fields / CYGM, sRAW and ColorBalance WB merged into our reader, which has the header-probe row limit, table-less packed 34713 and measured bodies. Lensfun Database #671's PackedLayout was not taken; the sRAW tests use our pack_lsb.
  • Camera colour: Sony stand-in matrices go after our lcc_camdb lookup. Look version 12 (10: DNG tone fit, 11: Sony stand-in, 12: A7CR distortion). Render cache bumped once (64 → 65).
  • Kelvin presets: upstream's all-Sony rule plus our Canon G1 X Mark III entry.
  • nikon_he_corpus.rs pins hashes the PR author made with LibRaw run as a black-box reference. Corpus tests skip without the files.
  • The ported focus-point layout test (which asserts an exact byte length) was not taken.

Tests

  • cargo test -p lcc-raw -p lcc-codecs -p lcc-heif -p lcc-catalog -p lcc-meta -p lcc-merge: pass
  • cargo test -p lcc-engine --tests: 1388 passed, 0 failed
  • cargo test -p lcc-ui-egui --test '*': pass
  • cargo test -p lcc-mcp --lib: 44 passed, 2 failed (backend::tests::* TCP tests; crates/mcp is unchanged from main, so this is environmental, not this PR)
  • cargo clippy --workspace --all-targets -- -D warnings: clean
  • cargo fmt --all --check, cargo xtask brand check, cargo xtask docs --check, cargo xtask parity: OK
  • cargo deny check licenses: cargo-deny is not installed on this machine. The new crate oxideav-jpegxs 0.0.8 is MIT, which the allow-list accepts, and has no dependencies with default-features = false. CI's deny step will confirm it.

🤖 Generated with Claude Code

emmertex and others added 22 commits October 17, 2026 21:15
…an 128 MiB

Thanks @marcoarnulfo

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…S R6m2

Thanks @naryzach

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…th an allocation budget

Thanks @bogusyogi

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…es and grid totals

Thanks @bogusyogi

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e tile geometry

Thanks @pehonnet

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…high-resolution mode)

Thanks @radialmonster

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…files

Thanks @AlexChambers

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s a sidecar

The HEIC EXIF half is already in the fork (lcc_meta::extract reads HEIF Exif/XMP items, issue #693); only the captured_fallback part is ported.

Thanks @jkalkstein

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…alance (D2H, D70, D70s)

Thanks @marcoarnulfo

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… embedded 3FR header

Thanks @06needhamt

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tiles (compression 7)

Thanks @radialmonster

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… an sRGB, BT.709 or gamma curve decode at full size

Thanks @EmpressAthleticus

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…EG XL tiles and render them like Lightroom

The JPEG XL transfer-curve decode overlaps storytold/lightcraft#1994 (ported just before): that implementation is kept, with this PR's MapPolynomial note; the DNG tone-fit change is taken as is.

Thanks @mattsivak

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…lback colours across all bodies (incl. the ILCE-1)

Merged with the fork's camera database (lcc_camdb): the Sony stand-in matrices apply only when the database has none; the Canon G1 X Mark III presets entry is kept beside the new all-Sony rule. Look version 11.

Thanks @Arakmar

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rected full-frame raws

Look version 12.

Thanks @AlexChambers

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d distortion correction

Applied by hand on top of the fork's newer Sony lens-correction decoder (DISTORTION_MODELS); the PR's Python check tool is left out.

Thanks @alvarohn

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…r) decoding via oxideav-jpegxs

Merged into the fork's newer NEF reader (header-probe row limit, table-less packed 34713, measured bodies). Unverified HE profiles still report the HE reason and keep the preview fallback. New dependency oxideav-jpegxs 0.0.8 (MIT, no dependencies).

Thanks @chiefjawa

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…E5700 CYGM, E8400, E8800)

Only the PR's own commits on top of storytold/lightcraft#671 (table-less 34713 NEFs, which the fork already decodes: fork issue #769).

Thanks @radialmonster

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…4:2:2 luma/chroma

Only the PR's own commits on top of storytold/lightcraft#671 (already in the fork, issue #769); the small-raw path sits beside the fork's table-less packed decoder.

Thanks @radialmonster

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
parity-checklist formats row and revision rows, HE NEF no longer preview-only for the verified profile (issue #193; gaps, raw-parity), upstream name and env prefix replaced in the ported Sony lens doc and A7CR corpus test, cargo fmt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…kes_the_engine_extensions covers it, and the upstream copy compares mixed path separators on Windows

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…th one separator, so the SR2/SRF discovery test passes on Windows

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@emmertex
emmertex enabled auto-merge October 17, 2026 11:11
@emmertex
emmertex merged commit be6f885 into main Oct 17, 2026
8 checks passed
@emmertex
emmertex deleted the upstream/camera-formats-bundle branch October 17, 2026 11:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant