lightcraft/crates/raw/src
Alex Chambers aa6dfe3b30 LR-EDIT-LIGHT-HIGHLIGHTS: pale partly clipped skies turn white, not teal (#523)
Testing the first version on ILCE-7RM4 photos found a partly clipped sky between
bare branches leaning cyan to teal under #523's edit, where Lightroom shows white.
Where only green clipped, red and blue say such a sky is a pale cyan-blue; the
rebuild kept that colour until halfway to full clipping, and darkening and a camera
profile showed it. Colour borrowed from another surface (bright foliage below the
sky) could also push green up, with a small step where green first clips.

- highlight::reconstruct_with: the colour of a pale partly clipped pixel
  (saturation relative to the colour model's white below 0.2, easing off by 0.4)
  fades to the clipped neutral from the first clip on instead of from halfway;
  brightness and strongly coloured pixels keep the old schedule.
- Borrowed colour counts less and less as both the pixel's own channels and the
  rim's colour contradict it (0.15 to 0.4 stop); either alone can be wrong.
- Right past the rim every estimate continues the rim's colour (it used to hold
  the clipped channels at their clip, for the neutral estimate only), so the first
  clip has no step whatever lent the estimate. The rim is built whenever there is
  clipping.
- Nothing jumps where a later channel clips: in the rim distance and the
  contradiction, a clipped channel counts as the lower bound it is, and a channel
  goes over to that from 0.75 of its clip; a channel about to clip is a floor
  capped like the clip floor it becomes.
- Tests: a pale sky above yellow-green foliage with thin dark branches in it (no
  step where green clips, no green from the foliage, the same beside the branches,
  neutral well past the clip); the fringe test compares the sky beside the branch
  with the sky away from it, on its way to neutral; a band whose red clips second
  next to a rim of another colour renders without a step, in six layouts.
- docs/parity.md: the Highlights note. Render cache version 28.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 02:02:00 -04:00
..
demosaic CI: clean under clippy 1.99 (as_chunks for constant chunk sizes, ? in export resize parsing) 2026-10-04 11:53:43 -04:00
vendor Merge PR #640 2026-10-10 01:14:26 -04:00
binned.rs M5.4b: faster raw path — bin previews/thumbnails straight from the mosaic 2026-10-01 09:01:53 -04:00
color.rs LR-EDIT-COLOR-TEMP: camera-space white balance for raws with a colour matrix 2026-10-08 18:18:54 -07:00
dng.rs Merge PR #513 2026-10-09 20:34:54 -04:00
dngwrite.rs LR-IMP-FORMATS: read DNG BaselineSharpness and keep it in DNG exports 2026-10-08 18:18:54 -07:00
gaintable.rs LR-PROF-CAMERACOLOR: camera local tone mapping (ProfileGainTableMap) as a per-photo opt-in 2026-10-09 11:11:52 +02:00
highlight.rs LR-EDIT-LIGHT-HIGHLIGHTS: pale partly clipped skies turn white, not teal (#523) 2026-10-10 02:02:00 -04:00
jxl.rs LR-IMP-FORMATS: decode lossy JPEG XL DNG tiles completely and without clipping 2026-10-09 00:21:39 -04:00
lib.rs Merge PR #651 2026-10-10 01:14:25 -04:00
ljpeg.rs Merge origin/main into #448 (render cache version 22, as main is at 21; parity row keeps main's text plus the 3FR note) 2026-10-09 09:31:04 -04:00
opcodes.rs LR-EDIT-OPTICS-PROFILE: apply the distortion correction Panasonic/Leica record in RW2/RWL (#256) 2026-10-08 00:13:58 -04:00
preview.rs LR-PROF-CAMERACOLOR: Sony ARWs shot with DRO start without the camera JPEG's lifted shadows (#244) 2026-10-09 20:09:16 +02:00
profile.rs LR-PROF-CAMERACOLOR: camera local tone mapping (ProfileGainTableMap) as a per-photo opt-in 2026-10-09 11:11:52 +02:00
saturation.rs LR-IMP-FORMATS: saturation-point search refuses NaN, negative or inverted levels and overflowing active areas (underflowed on a negative black level) 2026-10-09 20:43:04 -04:00
semantic.rs LR-MASK-SKY: AI masks use DNG semantic mattes (iPhone ProRAW sky matte) 2026-10-08 18:18:54 -07:00
tiffraw.rs LR-IMP-FORMATS: decode lossy JPEG XL DNG tiles completely and without clipping 2026-10-09 00:21:39 -04:00
unpack.rs LR-IMP-FORMATS: decode 12-bit raws packed in 32-bit little-endian words (Fujifilm RAF flag 0xf006, Coolpix NRW data block) 2026-10-08 21:26:26 -04:00