mirror of
https://github.com/storytold/photocraft.git
synced 2026-11-12 05:02:51 +00:00
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>