For review - patch to enable G1X ISO adjustment value to be passed to the rawop.meter function.This adds a new value to the camera_sensor structure, which rawop_meter can use to cook the meter calculation.The value is set by the patched G1X code for each shot.reyalp - is this ok, can you think of a better way to handle this?
Quote from: philmoz on 05 / July / 2017, 05:30:41For review - patch to enable G1X ISO adjustment value to be passed to the rawop.meter function.This adds a new value to the camera_sensor structure, which rawop_meter can use to cook the meter calculation.The value is set by the patched G1X code for each shot.reyalp - is this ok, can you think of a better way to handle this?Thanks for doing this. I moved it here since it seems more development oriented, I'm trying to leave the sticky thread for users of the script.I'll have to think about it more, but I'm wary of making meter return different values that get_pixel or histogram, and gluing it into all of them seems hairy. It seems like ideally it would be better as a factor in exposure calculation (get_canon_weird_iso_adjustment96() :p) but I haven't looked at what it would take to do that in practice. If it was in the exposure calculation, it wouldn't need to be converted from apex96.If it was available as a separate factor, helpers could be added to rawoplib.lua to provide adjusted versions of meter, get_pixel etc.
Do you notice this:Lapser fix works in rawopint but not in isoinc. We got different results. Why? We don’t knowThis was lapsers answerQuote from: lapser on 01 / July / 2017, 13:05:06I'm not sure sure how isoinc does this, but the timing is critical when the script can do this and have it work. It has to be in continuous mode while hook_raw is ready and before hook_raw.continue().
I'm not sure sure how isoinc does this, but the timing is critical when the script can do this and have it work. It has to be in continuous mode while hook_raw is ready and before hook_raw.continue().
The reason rawopint works differently to isoinc with lapser's version of set_sv96 is because his version of rawopint never calls set_sv96, so it never calls the CHDK code to switch the camera to Auto ISO mode. The rawopint script starts from whatever Tv/Sv/Av values are set on the camera before running the script. The isoinc script always calls the CHDK set_sv96 function to set the initial Sv override value, which executes the code to change to Auto ISO.
I have confirmed that changing iosinc to not call set_sv96 first makes it behave the same as rawopint.
I have tried removing the Auto ISO setting in set_sv96 and it appears that I can still set Sv overrides in CHDK. This also seems to remove both the black point change and the raw data cooking. This will need further testing and verification; but may ultimately be a better solution
After more firmware spelunking I can now completely disable the ISO cooking on my G1X
This means:- rawopint and isoinc work for all modes- rawop meter calculates correct value without needing any ugly hacks- CHDK DNG files match the JPG/CR2 brightness.
Once I'm satisfied there are no other side effects, I will commit this to SVN.Edit: Fix for all G1X versions is now in SVN revision 4853.
Quote from: philmoz on 07 / July / 2017, 20:30:49After more firmware spelunking I can now completely disable the ISO cooking on my G1X Do you think this investigation could help to fix other cams like S110 or SX50?
I can see similar code in the firmware for both the S110, and SX50.I can try creating test builds with the fix if you want to try them.
Are the firmware versions in your signature correct?