camera parameters adjustment consistent over different images

I need some guidance on how to get LibRaw to perform the exact same RAW process over multiple different shots.
For example, I don't want automatic white balance based on each image, because that will create different math calculation based on different images intensities.

I am looking to get the same data processing that will use the best bit depth information and range on the output.

For example, from what I understood the option "use_camera_matrix" will apply the same math (for the same camera).
What options will produce the same adjustments with the same factors (for the same camera) on different images?
For example, is "use_camera_wb" based on each image or it is based on constant information from the camera?

At moment, my options are:

iProcessor.imgdata.params.use_camera_matrix = 1;
iProcessor.imgdata.params.use_auto_wb				= 0;
iProcessor.imgdata.params.use_camera_wb = 0;
// Linear
// for linear curve set gamm[0]/gamm[1] to 1.0.
iProcessor.imgdata.params.gamm[0] = 1.0;
iProcessor.imgdata.params.gamm[0] = 1.0;
iProcessor.imgdata.params.no_auto_bright			= 1;
iProcessor.imgdata.params.adjust_maximum_thr	= 0;	// do not use automated saturation calculation
iProcessor.imgdata.params.user_flip						= 0;
iProcessor.imgdata.params.threshold = 0;
iProcessor.imgdata.params.output_bps = 16;		// output bits
iProcessor.imgdata.params.user_qual			= 10;	// AMaZE intepolation
iProcessor.imgdata.params.fbdd_noiserd	= 2;


camera matrix should be the

camera matrix should be the same unless changed by camera based on temperature or self-calibration (may be some high-end digital backs?)
camera WB will change from shot to shot, indeed.

So, you may get camera multiplicators for the first shot in sequence and re-use it for next shots (user_mul).

Same with black level: it may change from shot to shot (e.g. Panasonic or Canon cameras), so get it for first shot then reuse (user_black, user_cblack)

Also, set adjust_maximum_thr to 0.f

-- Alex Tutubalin

Thank you Alex,

Thank you Alex,

What about "imgdata.params.output_color" ? I noticed it is producing different outputs if I set it to 0 (RAW) or 1 (sRGB). I would like the output to be linear as I am already setting gamm[0] = gamm[1] = 1, but looks like this parameter is override some options..

output_color sets output

output_color sets output color space (0 - no conversion, 1 - convert to sRGB, etc)

If you use same camera color profile (e.g built-in into LibRaw, or use_camera_matrix and camera matrix does not change between shots), it is safe to use some conversion.

-- Alex Tutubalin