When a raw file is imported into darktable and opened in darkroom for processing, a certain initialization process is necessary to sort out the raw file’s string of binary data. For to end up with a matrix of pixel data before the various steps/modules in the pixel pipes kick in with white balancing, demosaicing etc, some function needs to identify i.a. the matrix form of the sensor, the ordering of the byte data, and the ordering of the color filters in Bayer/X-trans filters.
Where does this happen? In the raw black/white point module, or does something happen somewhere even before it?
So then I understand darktable’s main program (or some kind of OpenNonredactedFileInDarkrom function) makes a call to RawSpeed/libRaw library with the file as parameter. The library has the necessary data about the file type (identified by the file extension) recorded and/or is able to extract the camera/sensor type and the encoding from the file’s (exif) data, and on this basis parse the image data into the matrix that darktable’s modules need, and return this matrix.
However, as the demosaic modules should work on image data that has a certain level of white balancing applied, and the white balance modules is positioned before it in the pixelpipe, I would believe that RawSpeed/libRaw does not return the matrix directly to the demosaic module. And as raw black/white point is then again also in front of the white balance module, and presumably should need to discard pixel readings at the extreme luminance ends that is regarded as sensor noise only, I would presume that the raw black/white point modules is the recipient of the matrix that the library sets up.
My follow-up question then becomes:
Does the raw black/white point also receive its settings from the RawSpeed/libRaw, or does it acquire them from the received image data itself – either from any exif data that follows the matrix(?), or from readings of the image file like a true black sliver in the image, (that I presume the raw black/white point strips away before sending the matrix further to the white balance module, (if that not already has happened when the RawSpeed/libRaw sets up the image)?
Afraid @paperdigits is wrong here. The data from the raw loader library (Rawspeed or LibRaw) enters the pixelpipe through the raw black/white point module, and then moves sequentially from there.
I’m pretty sure that the raw black and white points come from the raw loader, while the camera and D65 matrices are handled by darktable itself.