Some notes for 700D. Will edit as I'll discover more stuff.
1080p25:
Timer A=640, B=2000
Timer A must keep the same parity (odd value written to register)
Timer A min = 0x207 raw => 520 (same as 100D)
520*4 - 1808 = 272
1080p25 crop:
Mostly the same as above.
Timer A min = 0x217 raw => 536 (100D: 540)
536*4 - 1872 = 272
1080p50:
Timer A=640, B=1000
Timer A min = 0x207 raw => 520 (same as 100D). No change with line skipping factor, unlike 5D3.
520*4 - 1808 = 272
x5:
Timer A = 716, B = 1492
Timer A min = 0x2cb raw => 716 (tight fit in Canon firmware?! very unusual; 100D has 732 default and 724 min)
716*4 - 2592 = 272.
Photo mode:
timer A = timer A min = 0x56b => 1388.
1388*4 - 5280 = 272.
Cross-check with other parameters from
raw_res.txt.
The above numbers give the timer A requirements for some desired horizontal resolution. That is:
timer A * 4 - horizontal resolution (including black bars) must be at least 272 in all of the above video modes.
The 5D3 does not show this kind of consistency, figure out why.
call("lv_120fps_test") -> does nothing.
GetPathDriveInfo mode map (codenames):
0 = LVx1
1 = LVx1_60fps
2 = LVx5
3 = LVx10
4 = LV_AF_Crop_120fps
5 = LV_FlashExposure
6 = Rec_HD
7 = Rec_720p
8 = Rec_Vga
9 = Rec_DZ_Crop_HD
10 = RecStandby_x1
11 = RecStandby_x1_60fps
12 = RecStandby_x1 (again?!)
13 = LVx1_60fps
14 = LVx1_CreativeFilter
15 = LvServoGaia
16 = LvServoDiana
Funky effects:
call("lv_cfilter_mode", i); // i from 0 to 7
0 = none, 1 = bw, 2 = lighter, 3 = oldstyle, 4 = darker, 5 = fisheye, 6 = saturated/noisy/low-fps, 7 = washed out.
CMOS[7] is vertical position (start and stop scanning line, 6 bits each), equivalent of CMOS[1] on 5D3.
CMOS[5] is horizontal position (mask FC0, max=0xB00) and column binning factor (0x20).
Canon values: 0x380 in 3x crop (active area xres: 1800), 0/0x300/0x600 in x5 zoom, 0x20 in 1080p.
Value used with CROP_PRESET_CENTER_Z_700: 0x300 (active area xres 2520).
This appears to be one-size-fits-all for CMOS[5] and CMOS[7] on 700D. Likely portable with minimal changes.
if (is_700D)
{
/* horizontal and vetical centering, in rough increments */
int xres = get_preset_xres(crop_preset);
int yres = get_preset_yres(crop_preset);
/* the sensor is divided into slices, 120x120 pixels each */
const int slice_size = 120;
/* 700D:
* xpos=0 => capture from the left side
* xpos=44 => black image, no valid data
* sensor xres = 5208; last slice is incomplete
*/
const int x_slices = (sensor_xres + slice_size - 1) / slice_size;
const int y_slices = (sensor_yres + slice_size - 1) / slice_size;
const int extended_xres = x_slices * slice_size;
const int extended_yres = y_slices * slice_size;
/* most presets read out every column;
* a few of them will bin every 3 columns */
int col_binning = 1;
switch (crop_preset)
{
case CROP_PRESET_3x3_1X:
case CROP_PRESET_3x3_1X_48p:
case CROP_PRESET_1x3:
col_binning = 3;
break;
}
/* 700D:
* CMOS[5]: horizontal position mask 0xFC0, column binning 0x020
* 1736: about 14.5 would be ideal, formula gives 14.46 before rounding
* 1800: 14 looks about right, formula gives 14.2 before rounding
* 2520: 12 is Canon default, formula gives 11 (11.2 before rounding)
*/
int xpos = ((sensor_xres/col_binning - xres) * x_slices + extended_xres/col_binning)
/ (2 * extended_xres/col_binning);
int col_binning_flag = (col_binning == 1) ? 0 : 0x20;
cmos_new[5] = PACK12(col_binning_flag, xpos);
/* vertical position in rough increments */
/* CMOS[7]: start/stop scanline, 5 bits each, 120px increments, highest 2 bits unknown */
/* most presets read out every row;
* a few of them will "bin" every 3 rows (actually read one line and skip 2) */
int row_binning = 1;
switch (crop_preset)
{
case CROP_PRESET_3x3_1X:
case CROP_PRESET_3x3_1X_48p:
case CROP_PRESET_3x1:
row_binning = 3;
break;
}
int ystart = ((sensor_yres/row_binning - yres) * y_slices)
/ (2 * extended_yres/row_binning);
int ystop = ((sensor_yres/row_binning + yres) * y_slices)
/ (2 * extended_yres/row_binning);
cmos_new[7] = PACK552(ystart, ystop-1, 0);
dbg_printf("sensor res: %dx%d\n", sensor_xres, sensor_yres);
dbg_printf("capture res: %dx%d\n", xres, yres);
dbg_printf("slices: %dx%d bin %dx%d\n", x_slices, y_slices, col_binning, row_binning);
dbg_printf("x:%d y:%d-%d\n", xpos, ystart, ystop);
dbg_printf("cmos [5]:%x [7]:%x\n", cmos_new[5], cmos_new[7]);
}