200D shoots raw video

Started by names_are_hard, February 09, 2024, 04:08:05 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

names_are_hard

Several years of learning ML code, trying to understand fragmentary docs, and in some cases writing the docs myself, 200D has raw video:



Bugs / quirks / limitations:
- only 14 bit is tested
- lossless modes are listed and definitely not supported, these should be hidden (this is a problem with mlv_lite code)
- mlv_lite has several hard-coded defaults that don't make sense for 200D (I think we need to make defaults detect cam model and choose behaviour intelligently)
- it records at 19.051 fps.  I have a few guesses as to why and will fix this
- 1280 * 720 is continuous, higher resolutions are not (200D SD interface is limited to about 40MB/s)
- MLV metadata is wrong in some places (bunch of stuff filled in as 0 or MAX_INT, it's a division by zero bug in ML code)

Code is available: https://github.com/reticulatedpines/magiclantern_simplified/compare/dev...200d_raw_draft
That's the changes compared to main branch; changes are fairly small!  This is a good place to look if you're interested in porting raw video to other Digic 7 models.

No direct links to builds yet, but if you ask in discord and have a good reason for using something that certainly hasn't been tested well, I might hand one over.  Otherwise you can wait till I've cleaned it up.

More cameras are in the works...

Frank7D


vastunghia

I think that would make it the best ML-enabled cam in terms of dynamic range -- 13.4 stops according to DxOmark, with the current best ML cam (6D) trailing far behind at 12.1 and the most popular ML cams (M and 5D3) at 11.2 and 11.7 respectively. Only the 5D4 (with 13.6 stops) could beat it -- excluding more recent MILCs of course.

Hooray, kudos and congrats!
5D3 for video
70D for photo

iaburn

Congratulations!!
Big thank you to the incredibly talented and wise devs that have the motivation to keep the ML project alive after so many years and still bringing the magic to new cams  :o ;D

a.sintes

It's too bad she won't live, but then again, who does?

iaburn

Quote from: vastunghia on February 09, 2024, 09:55:17 AM
I think that would make it the best ML-enabled cam in terms of dynamic range

The only downside is that those cameras were more ISO invariant, so they don't get that big boost that dual ISO can give. Also the 200D dynamic range falls very quickly with higher than base ISO

vastunghia

Quote from: iaburn on February 09, 2024, 10:22:27 AM
The only downside is that those cameras were more ISO invariant, so they don't get that big boost that dual ISO can give.

I may be wrong but I think that ISO invariance is the direct consequence of the readout noise being so damn low, making shadows easily recoverable even at base ISO. AFAIK it means that dual ISO (which is a very clever trick, at the end of the day) is nomore necessary -- you don't have to sacrify resolution to gain some DR, as DR is already close to max.

So if I'm right, 200D would be a game changer in DR!
5D3 for video
70D for photo

iaburn

Quote from: vastunghia on February 09, 2024, 11:57:45 AM
So if I'm right, 200D would be a game changer in DR!

You are right that it will be better without dual ISO, but I wouldn't say that the difference will be so important, we'll see ;)
https://www.photonstophotos.net/Charts/PDR.htm#Canon%20EOS%20200D,Canon%20EOS%206D(ML),Canon%20EOS%207D(ML)

heder

Congrats on the success!, I guess with a little SD OC'ing this camera will do just fine.

check firmware for "SDR104" string = 104MB/S,
check firmware for "SDR50" string = 50MB/S,

So I guess that the camera is currently running in SDR50 mode, but is SDR104 string present ? Also i'm Curious to know, If you go into zoom mode (x5,x10) what is the native resolution ?
... some text here ..

theBilalFakhouri

It also might be already in SDR104 mode but running at low clock speed (e.g. 96 MHz).
Comparing 77D vs 200D should help (both are DIGIC 7 and both have similar / identical functions or strings for SD stuff).

names_are_hard

Yup, it wants SD overclock!  I tried a bit, but the SD code looks quite different from older cams to me (but I have little experience in this area).  Certainly the logs during normal startup are different:


   962:   760.027 [SD] SdSwitchVoltage 1
   966:   813.315 [SD] SD initialize end speed=2 clock=2 UHS=1
   967:   813.361 [SD] strength 1111 current 3 mode 2


It knows about UHS, and it has parameters that look tunable.  I can see functions that do switch / case stuff and set registers in weird ways.  So I suspect it can be done, but I didn't get lucky finding equivs to the old registers in the few hours I looked :)

Zoom res check will have to wait, sorry - cam not connected now, and I'm going to be working on documenting EDMAC stuff for the next few days, so the next dev doesn't have to suffer as much.

yourboylloyd

This is the biggest thing I've seen in a while. Nice!
Join the ML discord! https://discord.gg/H7h6rfq

kitor

Quote from: names_are_hard on February 09, 2024, 06:53:20 PM
Zoom res check will have to wait, sorry - cam not connected now, and I'm going to be working on documenting EDMAC stuff for the next few days, so the next dev doesn't have to suffer as much.

Where, by the way, as for yesterday's evening:

     3389:  73978.898 dst, src: 0x4012a000, 0x4014a000
     3390:  73978.905 Pre-copy, *dst, *src: 0x1111, 0xa5a53333
     3403:  73999.170 Post-copy, *dst, *src: 0xa5a53333, 0xa5a53333


That was EOS R EDMAC memcpy. It seems that we'll be able to use it for simple mem-to-mem transfers even without knowledge about all the extra stuff that changed in D8 (and we have no idea how this really works now due to all extra layers).
Too many Canon cameras.
If you have a dead R, RP, 250D mainboard (e.g. after camera repair) and want to donate for experiments, I'll cover shipping costs.

Danne

Wonderful news. Good work. Hard work 👍.

kitor



Yes, that's EOS R. Yes, it is Digic 8. Yes, we said don't count on it as EDMAC is completely different.
Yet here we are  8)

Caveat: it only adds a page into a list of digic 8 instabilities with ML, records roughly 30-60 frames before stops... something related to memory management that I didn't solve yet.
No builds will follow as D8 requires a ton of work before being usable in any way.

But: AF works while recording  :) When 4k is selected in Canon menus, raw buffer is 4K too (unfortunately cropped, as expected).

My PoC on top of @names_are_hard PoC is on my branch: https://github.com/kitor/magiclantern_simplified/commits/raw_draft/
This is shameless "fake it till you make it", thus needs to be redone from scratch after fixing stuff.


There's also a significant progress in understanding D8 EDMAC. Not enough to setup random transfers, but it was more than good enough to get mlv_lite working :)
I'll wait for Names for his EDMAC documentation and update it by my current D8 knowledge.
Too many Canon cameras.
If you have a dead R, RP, 250D mainboard (e.g. after camera repair) and want to donate for experiments, I'll cover shipping costs.