mirror of
https://github.com/storytold/lightcraft.git
synced 2026-10-27 03:27:14 -06:00
The HDR merge has the same cause as the panorama: its result took the reference frame's colour tags, and a raw whose white balance is only in the vendor's multipliers (CR2, NEF, ARW...) has no AsShotNeutral in them. merge_hdr now takes the median multipliers of all its inputs (the rule of consensus_multipliers: the mean of the middle two for an even count; missing, non-finite and non-positive values do not vote) and sets the result's AsShotNeutral to their reciprocal, as stitch does. With no multipliers (DNG sources) the reference frame's tags are kept, as before. HdrResult carries the multipliers so that the brackets of an HDR panorama vote as frames of their own when the merged brackets are stitched (the engine passes them on). In the app and the CLI the neutral from starting_colour_tags (#965) is already there for frames balanced alike, so those renders do not change. Tests: an HDR merge of raw-style frames gets the median AsShotNeutral (odd and even counts, missing and unusable multipliers ignored) and the written DNG says it; without multipliers the reference frame's colour is unchanged.