BTW how were you able to view the histogram and overexposure indication?
Very easy - I've emulated the image capture process in QEMU and used your CR2 as input data.
Walter previously said this is possible only during image review, i.e. only after taking the shot.
That's exactly what I did - on the virtual camera.
Where do these values come from?
From dbg_printf's from raw.c.
I downloaded and installed ML 5D Mark III 123. How come a version specific for that model does not know the clipping points for it (considering also the factors you mention)?
The findings from the ISO research thread are not yet included in ML, sorry about that. The code is generic; I was hoping to cover all ~15 (soon ~20) camera models with the autodetection.
In theory, the autodetected white level should be exact iff there are overexposed pixels in the image, or underestimated by about 0.3 stops in the worst case, if there is no overexposure. In tricky cases like this, I would have expected the white level to be assumed close to the brightest pixel, therefore the overlays showing very little overexposure (if any). That didn't happen, so I may need to re-think the white level heuristic.
Currently I don't know why the clipping point decreases at longer exposures (back then, when the white level was hardcoded, there was a bug about zebras no longer showing overexposure on long exposures - IIRC on 5D3). For aperture, I know how to find the digital gain and do the math, and I also know how to override it (see iso-regs.mo from the ISO research thread), but it's not implemented in the mainline.
My test confirms that saturation values depend on these factors too but the values for ISO 160 are about 11400 in RawDigger which is quite far from 9960. Why is there such a huge difference?
Probably the autodetection did not work well on this test image - will take a second look (just can't promise when, as this is a hobby project done on nights and weekends)..
The autodetection looks for some confirmation (it doesn't simply take the brightest pixel, as that one is likely a hot pixel and these can have values above the regular clipping point, at least on some models; don't remember if 5D3 is affected).
So yeah - it's not perfect, manpower is an issue and contributions are welcome.
I have found that ISO multiples of 160 give slightly better DR compared to "native" ones.
On recent models, they do - about 0.1 stops according to my measurements.
On older models (5D2 generation), they don't - they are the same.
http://www.magiclantern.fm/forum/index.php?topic=9867.0 Dial ISOs from ML menu/keys. ISO 160 from ML is better than ISO 160 from Canon controls.
That's ancient stuff, long before we even had access to raw data in ML. I planned to write a newer version, based on the findings from the CMOS/ADTG thread, just never managed to complete it.
That means, most of that stuff actually applies to how Canon renders the raw data (i.e. picture styles). Back then, I've noticed a nicer highlight rolloff when overriding the digital gain from ML, rather than choosing an intermediate ISO from menu. Now I know there are a lot more parameters that change with ISO, and I've only understood a small subset of them.
When overriding digital ISO gain from ML, the other parameters will be inherited from the ISO selected in Canon menu. The same happens with dual ISO, and that's the reason ISO 100/1600 gives different results than ISO 1600/100.
but I can't find a way to set those "best ISOs" which you recommend. How can I do it? (And is it applicable for photo at all?)
Movie -> Image fine-tuning. Not applicable to photos.
BTW - are you interested in experimenting with the ISO research tools and hopefully reviving that thread? Most of that stuff applies to photos, and there is a significant DR improvement that can be achieved. You may start with the raw_diag and iso-regs modules, and maybe cross-check the results with other software.