Add new comment

black level data in LibRaw

black level data in LibRaw (and dcraw) is split into several pieces - 'base' black level (common for all channels)
color.cblack[0..3] - per channel level
color.cblack[6...] - pattern level for cblack[4] x cblack[5] pattern.

I did not understand your comments regarding white balance.

BTW, if you want to *only* replace de-bayer with your own code, but do not want to know other raw processing details (black level/bias, white balance, scaling, color profiles, etc, etc, etc)
than you may provide your own demosaic via callbacks.interpolate_bayer_cb
Your callback will be called instead pre-defined demosaic(s) built-in in LibRaw, while other processing steps will be called in sequence.
You may use LibRaw::lin_interpolate() code as an example.

-- Alex Tutubalin @LibRaw LLC