Good point, will do that.
Some older questions regarding video mode detection: identifying it from C0F06804 is not always possible. A comment from my not-yet-committed code:
/* properties are fired AFTER the new video mode is fully up and running
* to apply our presets, we need to know the video more DURING the switch
* we'll peek into the PathDriveMode structure for that
*
* Example: x10 -> x1 on 5D3
* This sequence cannot be identified just by looking at C0F06804;
* some ADTG registers that we need to overide are configured before that.
*
* GuiMainTask: GUICMD_PRESS_BUTTON_SOMETHING(0x0)
* CtrlSrv: DlgLiveView.c PRESS_TELE_MAG_BUTTON KeyRepeat[0]
* Gmt: gmtModeChange
* Evf: evfModeChangeRequest(4)
* Evf: PATH_SelectPathDriveMode S:0 Z:10000 R:0 DZ:0 SM:1
* (lots of stuff going on)
* Evf: evfModeChangeComplete
* (some more stuff)
* Gmt: VisibleParam 720, 480, 0, 38, 720, 404.
* Gmt: gmtUpdateDispSize (10 -> 1)
* PropMgr: *** mpu_send(06 05 09 11 01 00) ; finally triggered PROP_LV_DISPSIZE...
*/
In particular, when switching from x10 to x1, first ADTG[8000] is changed from 5 to 6,
then (later) C0F06804 is changed from 0x56601EB to 0x528011B (so if we rely on this register for video mode detection, we miss the ADTG register). Then, other ADTG/CMOS registers are set, but ADTG[8000] is no longer touched.
I think I've found a way around that by looking at this message:
PATH_SelectPathDriveMode S:%d Z:%lx R:%lx DZ:%d SM:%d
Need to check whether it's portable.
C0F08030 affects the raw stream if
raw type is 0x12, for example (look for entries "scaled by digital ISO" - that's raw data after some preprocessing). The default raw type (CCD), not affected by digital ISO, is, to my understanding, the first in the pipeline (with minimal processing; there is something called "HIV shading" that happens during image capture; I've disabled it at some point by zeroing out the correction data; here's what I think it's a
totally raw file).
That's why 14-bit lossless (using raw type CCD) works and 8..12-bit lossless (using raw type 0x12 to darken the image) doesn't work at high resolutions. The latter needs some more stuff reconfigured at the right resolution. No idea what. Changing HIV_V_SIZE didn't help. Locking modified registers from adtg_gui didn't help. Manually resizing the EDMAC transfer used for HIV shading didn't help either. Guess I need to reconfigure all the other image processing modules that affect raw type 0x12; Canon knows which ones
