@IDA_ML - I'm not arguing with you, just hinting that it would be
easier if we all had 5D3's. My first ML capable camera was an EOSM. I got it because thought it could do almost everything the other ML capable cameras could do. I does, depending on your definition of
almost.
Back on topic--
Something interesting -- if you take Edmac#16 (on 7D) buffer "4410x1225"
4410/14*8 = 2520
So this could be your custom buffer 2520 x 1127 -- this is how I came up with my buffer.
How did you get 1127 from 1225?
What I'm looking for is how to translate this from the 1100D to the 7D and other cameras that use LVState.
#ifdef CONFIG_1100D
#define RAW_LV_BUFFER_ALLOC_SIZE (3906*968)
#endif
Note that originally it was coded like this:
#define RAW_LV_BUFFER_ALLOC_SIZE (3906*766)
"Blame" shows that G. Condello (a.k.a. @nanomad) wrote that line but I searched all over and couldn't find out how he got the "3906" part. The "968" part is spelled out in this old comment you already posted:
408 * How to find buffer dimensions for CONFIG_EDMAC_RAW_SLURP:
409 * - Go to LV and use lv_save_raw
410 * - Check the RAW_LV_EDMAC debug info
411 * - Suppose it reports W: 0xA3A H: 0x3C7 (taken from 1100D in LV mode)
412 * - EDMAC W is the number of bytes per line
413 * - The W resolutions is computed as: W * 8 / 14 (raw buffer is 14 bits per pixel)
414 * - Thus 0xA3A 8 / 14 -> 1496 pixels
415 * - EDMAC H is the number of "jumps"
416 * - The H resolutions is H + 1 -> 0x3C8 -> 968 pixels
So is W width and H height of one of the buffers? Maybe but "W: 0xA3A H: 0x3C7" would translate to 2618x967. Note that the 1100D specifications show a maximum video resolution of "720p HD video at 25 or 30 fps" so maybe, just maybe, that's a reason why it didn't even need CONFIG_EDMAC_RAW_SLURP for it to work in the raw_video_10bit_12bit branch.
I also went back into the history of the source code and couldn't figure out when these "W:" and "H:" values were reported in hex but maybe (and this is just an uneducated guess) the values for the 7D should be taken from the maximum size of channel 16:
#ifdef CONFIG_7D
#define RAW_LV_BUFFER_ALLOC_SIZE (4410*1226)
#endif
Note the +1 on the "H:" value as noted in that old comment we are referencing.
This seems logical because the 7D can record higher resolution than the 1100D. Then again so many things in ML aren't what they seem so I might be totally off base on these assumptions.
By the way, your calculation of the width of the "custom buffer" matches up with the zoom mode raw buffer. I shot silent stills in various modes and this is what exiftool is showing on the DNG files:
mv640
Default Crop Size : 1736 694
Active Area : 26 256 720 1992
mv720
Default Crop Size : 1736 694
Active Area : 26 256 720 1992
mv1080
Default Crop Size : 1736 1156
Active Area : 26 256 1182 1992
zoom
Default Crop Size : 2520 1200
Active Area : 26 0 1226 2520
FRSP
Default Crop Size : 5202 3466
Active Area : 50 158 3516 5360
Note the height of the zoom full raw buffer? Back to my question, "How did you get 1127 from 1225?" Would you agree that it should be 1226? That would mean that your "custom buffer" is really just the zoom mode buffer.
Exercise for other Digic IV cameras: Shoot silent DNG's at various video modes. Just change the Canon movie settings and shoot the silent stills with the camera in movie mode. Don't forget to do one for zoom (a.k.a. 5x crop mode). If anyone wants to try this but hasn't mastered exiftool, post a link to your DNG's and we'll check them out for you.