>>
The best place to start in terms of the code would be dng_validate.cpp… In terms of terminology, the code comments use the term "stage 1" image to describe the raw image data, "stage 2" to describe the linearized raw image data, and "stage 3" to describe the 3-channel or 4-channel data (i.e., after demosaic). If you want to do processing on linearized mosaic data, you want to grab the stage 2 image… If you want to do processing on RGB demosaiced data in the native camera color space, prior to white balance, you want the stage 3 image...<<
the true WB is just multiplying the raw data per channel (like dcraw does)
But this is just parts of the story.
White Balance in ACR/LR by means of Color Temperature and Tint also let you interpolate between, or even extrapolate beyond, a pair of two camera profiles built for illuminants D65 and A. So the influence of these sliders stretches back to the colorimetric interpretation of the demosaiced data.
Next, the execution of the per-channel-multiplications was reported to be part of the conversion from the camera space to 1.0 ProPhoto RGB, rather than being just applied after arrival in this intermediate working space. It was explained that Color Temperature, Tint and Exposure, next to the 3 x2 Hue/Sat.-sliders of the Calibrate tab, actually tweak the conversion while corresponding to the 9 degrees of freedom of a 3 x 3 matrix which is still the core to describe the camera space, even though today we may have a HueSat-delta table applied before. Like with dcraw this allows to steer the highlight clipping behavior.
Or, the correction of chromatic aberration was explicitly stated to be done soon after demosaicing and in the native camera space. I'd further assume that the repair of single clipped raw channels (by emulating surrounding colors,
if done like in dcraw) and also the lens corrections happen at such very early stage as well.
Seems there was more openness on such mechanistic details in early comments and contributions by Bruce Fraser or Thomas Knoll himself – from what I remember.
I'd exempt the above tools and sliders from your initial claim, while counting it among the basic steps of raw conversion, or what is sometimes called scene reconstruction.
Peter
--
... all sliders that you are moving in UI are instructions of what shall be done with the data that was already 1) demosaicked and 2) transformed to a color space with prophoto coordinates and linear gamma... why do you want to argue w/ that ?