I'm still experimenting with the settings, but so far I modified the engio_write_log, adtg_log and cmos_log functions to automatically adjust the settings depending on the current lens_info.raw_iso value.
Caution: This is probably racy! I haven't looked into the code much further.
I added an "autoconfig" option to the iso_regs module and hard-coded some settings which will be applied if the autoconfig-flag is set.
Camera: 5D Mark IIIcmos_log: Shifts each selectable ISO-value by 1 stop.
switch (lens_info.raw_iso) {
case 64: cmos_gain = 0x003; break; // ISO 50 -> ISO 100 Gain
case 72: cmos_gain = 0x113; break; // ISO 100 -> ISO 200 Gain
case 80: cmos_gain = 0x223; break; // ISO 200 -> ISO 400 Gain
case 88: cmos_gain = 0x333; break; // ISO 400 -> ISO 800 Gain
...
}
When I select ISO 100 in the Canon settings (lens_info.raw_iso == 72), the CMOS-Gain is set to 0x113 which normally would be the correct value for Canon's ISO 200.
ISO 200 gets the CMOS-Gain of Canon's ISO 400 and so on.
So far, the images taken with ISO 50 to 6400 just get brighter by 1 stop.
To compensate for this I also adjusted the ADTG-Settings and stretched the usable range of the 14-bit format:
adtg_log:
- adtg_preamp = 2;
- adtg_fe = 4;
- adtg_gain = 1050; (except for lens_info.raw_iso == 64: adtg_gain = 1220;)
- black_reference = 2048;
adtg_fe=3 gives a little more highlight headroom but causes more banding in the shadows compared to adtg_fe=4.
engio_write_log:
- black_white_offset = 3058;
- saturate_offset = 118;
- digital_gain = 463;
The resulting images have about the same brightness as the original Canon settings but with less shadow noise (and ISO 50 is actually useful).
I haven't fully understood the black_reference, saturate_offset and black_white_offset settings, which causes issues in live-view mode.
Let's find some "optimal" settings and write a config that loads the best settings for each selected ISO-value.
