9 Commits

Author SHA1 Message Date
FredApps fd3a12dfde Merge approved PhotoCraft PR #3142: Read applied Sony RAW metadata and crop ILCE-6000 images
Port behavior and regression coverage into current modules; preserve current upstream behavior.
Integrate bounded Sony SR2 metadata decoding and ILCE-6000 image area; preserve newer bit-depth-aware camera profile application and explicit file crop precedence. Keep current parity counts and original metadata/crop tests.
2026-10-29 06:38:44 +01:00
vangel76 3e144a381a Merge upstream/main into perf/9434-fused-develop
Main reverted the #9455 merge, so a plain merge would drop the band-by-band
develop; keep this PR's demosaic.rs, develop.rs and development_limits.rs and
take all other upstream changes.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-26 01:18:21 +01:00
David Mann 0134d2dc70 Revert "Merge PR #9455: raw: develop the default rendering band by band, without the f32 RGB frame"
This reverts commit ddb92be1fa, reversing
changes made to f12be92413.
2026-10-25 18:38:22 +01:00
David Mann 34310d5ba6 Merge PR #8402: Raw: open lossy DNGs (floating-point JPEG XL raw data), and fall back to the JPEG XL preview, not the tiny thumbnail (fixes #8125) 2026-10-25 15:05:48 +01:00
David Mann dcf5c61a64 Integration: cap MapPolynomial opcodes, finite WhiteLevel, RGB-only JPEG XL preview (#8402)
- An opcode list may hold up to 4096 opcodes, and every MapPolynomial is checked for every
  sample, so a crafted DNG with thousands of whole-image polynomials (a few hundred KB) hung the
  open for minutes. Keep at most 64 per list; the rest are named as not applied.
- A DOUBLE WhiteLevel past f32::MAX became an infinite white, which blacked out that channel.
  A non-finite level now falls back to the default, as a zero one does.
- A reduced-resolution LinearRaw IFD (NewSubFileType 1, three samples, JPEG XL) was a JPEG XL
  preview candidate, and its undeveloped samples would show as an sRGB picture. Previews now
  need PhotometricInterpretation RGB or YCbCr.
- README: floating-point JPEG XL raw data and OpcodeList2 MapPolynomial are supported.

Co-authored-by: SBaksa <18648812+SBaksa@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 14:55:45 +01:00
vangel76 dc791a43de raw: develop the default rendering band by band without the f32 RGB frame
When neither Dehaze, a local tone slider nor a camera black point is in play, no
statistic of the whole frame is needed, so the demosaic output no longer has to be
kept. Every band is demosaiced into a small band buffer and encoded straight into the
u16 output. The f32 RGB frame (12 bytes a pixel, 545 MB at 45 MP) and the pass that
read it back are gone. A Bayer sensor also skips the padded CFA plane: each band
normalizes the rows it reads (with the mirrored borders) into a small window. X-Trans
keeps its plane and green plane, LinearRaw has none. Tone, Dehaze and black points
keep the full-frame path.

The bands are the ones the full-frame path computes, with the same arithmetic per
pixel, so the output is bit-identical (tests compare both paths for Bayer, X-Trans and
LinearRaw, odd sizes, band borders, orientations and 1, 3 and 16 threads).
working_memory now charges what each path really holds.

Fixes #9434

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-25 14:35:29 +01:00
vangel76 97a719a7a7 raw: a non-finite black level no longer panics the AHD demosaic
A DNG whose BlackLevel is a DOUBLE beyond f32 reads as inf. The periodic
fill then computed (raw - inf) * 0 = NaN, and AHD's f32::clamp with NaN
bounds asserts. The fill now returns (0, 0) for a non-finite black, as
Scale::value does, and AHD uses a compare-and-select clamp that gives the
same result for every non-NaN bound.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-25 13:58:12 +01:00
SBaksa 319cb299d2 Merge remote-tracking branch 'origin/main' into dng-lossy-open 2026-10-23 10:49:33 +11:00
aiongg a6428d3dfb Build each crate's integration tests as one binary
Every tests/*.rs file is its own executable that links the whole crate
graph. Move each crate's test files into tests/it/ as modules of one
tests/it/main.rs; helper modules under tests/common move with them.

These keep their own binary (own process):
- engine panic_hunt: a process-wide panic hook counts every panic.
- engine text_gamma: changes the process-wide text gamma.
- engine smart_filter_stages, mask_cache_purge: assert on global caches.
- codecs pnm_peak_memory: reads the process's peak RSS.
- photocraft mac_menu_appkit: harness = false.
2026-10-22 16:55:34 +00:00