Danne's crop_rec_4k experiments for EOS M

Started by Danne, December 03, 2018, 06:10:17 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

a1ex

Yes, try deleting just the first open/close. After getting the extreme moiré picture, you just need to take a plain 1:1 image. Going into menu and back will be required for disabling crop_rec, I guess.

Or, capture the 1:1 image first. Toggling video modes without crop_rec active (or before touching it) should be a bit more reliable.

masc

5D3.113 | EOSM.202

optical-work

i tried feb15 and feb16 builds.

feb16 build, test_rewire=off https://we.tl/t-ovOwsGOc9L

feb16 build, test rewire=on https://we.tl/t-JiMxCRBEAG

feb15 build https://we.tl/t-lJ2adcCokh

there is a 1 mm focus length difference between first two and third one happens most likely when i changed the sd card. i don't know if these are eligible but i can't see a particular aliasing issue like masc mentioned or can't reproduce it.

i worked on fresh builds.
- loaded 2.35:1 eosm lua script.
- checking the identical settings for iso, shutter speed, aperture, and white balance
- disable crop mode (and also 10bit and 2.35:1), exit ml menu
- enable movie crop mode, exit ml menu, menu button twice
- enable rewire, exit ml menu, menu button twice


Danne

Yes, been testing different fixes for a problem solved(read last 5-10 posts). Toggle menu button for registers to settle to avoid any issues.
Last 17th february build should be ok.

Danne

So conclusion regarding the latest Movie crop mode round trip back to mv1080p. For it to work properly after Movie crop mode has been enabled you absolutely need to enter canon menu and go back again for regs to settle/apply. The difference could be this:

Before:


After:


a1ex

Quote from: masc on February 17, 2019, 10:01:05 PM
Okay. Done. Here you are: https://www.dropbox.com/s/70ig9z535kixmk0/binningtest3.zip?dl=0

Pretty interesting binning pattern. It is, indeed, 3x3 readout with line/column skipping, i.e. using only one pixel out of 9. However, it has an additional property - every two columns are adjacent. This results in... even more moiré!



Details: extreme-moire.html

Danne

extreme moiré  8)
Lovely write up. Hypnotic almost.
Now, how to narrow down the properties and control them?
On a side note I know I soft bricked my eosm once before  :P but I am still intrigued if it´s even possibe to run digital zoom in mv720 mode for faster timers(48fps HDR) for instance...

a1ex

The name comes from Masc:

Quote from: masc on February 17, 2019, 07:28:10 PM
I would say even worse... the moiree is so extreme, that you can see it in liveview already.

Horizontally, I'm pretty sure the "properties" are actually the CMOS registers. I'd start by comparing CMOS configuration before pressing MENU to refresh LiveView, and after.

Caveat: adtg_gui won't work at the same time with crop_rec, so... it's going to require a bit of guesswork. Maybe print debug messages from crop_rec's cmos_hook and figure it out from there.

Digital zoom in 720p... not sure what the question is. Frame rate limits are given by resolution and pixel binning mode. So far, I wasn't able to alter them by starting from some other video mode.

720p normally works by skipping more lines (5x3 vs 3x3); that lets you reduce vertical resolution and increase the frame rate. With 1:1 crop, you are no longer able to do that (unless you use 3x1 with line skipping, which... let's just say it's not the best idea).

Theoretical readout speed on EOS M (and also 700D, 650D, 100D, M2 etc) is 32 MHz x 4 channels. In theory, it should be fast enough for 1080p48. In practice, maybe not. The 700D can do 1736x1160 (3x3) at about 43 FPS IIRC (didn't test it myself). That would be timer A = 520, B = 1431. For 48 fps, you would require B = 1282.  If you trim 150 pixels vertically, that should do the trick.

See 700D.png and 700D-crop.png (from here). Most of the overheads are from the hardware (some of them *might* be tweakable via ADTG registers, e.g. see this picture from 1100D). There is also a software overhead of about 2.5 ms on 5D3; exact value may be different on other models.

The 1100D is an interesting beast - it uses CH4-6483, i.e. the same 32 MHz x 4 channels interface as the early DIGIC 5 APS-C models (that's right, 1100D isn't your average DIGIC 4 cam), yet it has its sensor severely throttled in video mode, likely from ADTG configuration. Comparing ADTG/CMOS registers between 1100D and EOS M / 700D / 650D is likely to reveal the key to adjusting these timing "overheads" (or whatever they are).

theBilalFakhouri

I could reach 1736x976 @ 50 FPS 3x3 and without problems in uncompressed RAW with maybe very few corrupted frames like 1 to 3 in 250 frames clips sometimes no corrupted frames at all.

So 700D it's capable to do 1080p @ 50 FPS that's interesting too.

Very nice work Danne, masc and a1ex; please make another mistake to Enable Vertical lines Binning in small cameras  :D

Danne

Could you share some thought reg wise on getting 50fps. i can reach 46 fps but that´s it for higher resolution 1736x976. I can do 48fps at 1648x702, check code below. Could you take a look at  these regs. More to tweak? (Below is NOT the rewired preset but another high fps preset on the eosm.)
        case 0xC0F06804: return 0x2f701d4;
        case 0xC0F0713c: return 0x33d;
case 0xC0F07150: return 0x2fa;

     /* 48 fps */
            case 0xC0F06014: return 0x4db;
case 0xC0F0600c: return 0x2170217;
case 0xC0F06008: return 0x2170217;
case 0xC0F06010: return 0x217;

case 0xC0F06824: return 0x206;
case 0xC0F06828: return 0x206;
case 0xC0F0682c: return 0x206;
case 0xC0F06830: return 0x206;


I´d be happy to achieve 48 at the same resolution(1648x702) with the rewire preset to be able to run HDR but messing with reg 6804 is a no go since Movie crop mode dominates the regs when set and then crop_rec will not be able to add anything new except for maybe cmos changes. Tried reducing height in raw.c but still corrupted frames already at 42 fps after modifying fps-engio B-timer to 1283 (A-timer 520). 48 fps the same, corruption.

Any suggestion codewise to come further are most welcome. Thinking 713c and 7150 would not hurt to get access too as well here...

Danne

Added Movie crop mode resolution for engio_vidmode_ok so now it will be possible to modify engio regs from crop_rec.c. Missed that little detail before. Will add capture regs later.
     engio_vidmode_ok =
             (old == 0x4540298) /* x5 zoom */ || (old == 0x42401e4) /* x3 digital zoom */ || (old == 0x4a601d4) /* 1080p */ || (old == 0x2d701d4 /* 720p */);


cmos regs can already be tweaked from inside Crop mode sub menu if one wants to play around with extreme moiré fixing.

Sidenote. Could reg 8000 have something to do with the extreme moiré setting? Noticed it will affect image when all cmos regs are set but it till not enter x3zoom. It´s correctly set to 6 here but maybe it´s not switched on before toggling canon menu.

Danne

New build:
https://www.magiclantern.fm/forum/index.php?topic=9741.msg208959#msg208959

The mv1080p MCM rewire will now work as any other preset. All Crop mode sub menu options available:
bitdepth
ratios
x3crop
set 25fps
registry...

Also added a config fix from long ago. Once Movie crop mode is enabled it will stay enabled upon restart as well. Upon restart it will start in x3zoom so push canon menu button and back to set the preset fully.

No luck on higher frame rates yet. Shaving height is prone to crashing.

jacquaviva

Hi Danne,

So now we can use the rewire preset without adding "Movie crop mode" ?
Does it mean it records like mv1080p but with the corrected preview ?

No more bugs from the previous rewire mode ? And no need to press menu button ?

Thanks again for your big work, it is really incredible...

masc

Quote from: jacquaviva on February 19, 2019, 12:11:30 PM
And no need to press menu button ?
->
Quote from: Danne on February 19, 2019, 11:44:48 AM
Once Movie crop mode is enabled it will stay enabled upon restart as well. Upon restart it will start in x3zoom so push canon menu button and back to set the preset fully.
5D3.113 | EOSM.202

jacquaviva

Sorry, you already awnsered in your post; I get it.
Thanks

masc

Ok, so "Movie Crop Mode" has still to be set manually. x3 zoom mode works fine. When selecting 2.35:1 : is there a way to crop the top and bottom of the liveview?
In terms of 25fps I was a tiny bit more satisfied before with yesterdays build - because I got 25.000fps and with some Shutter fine tuning I got exactly 1/50.000s. Identical to my 5D2. Now we get 25.003 and 1/50.006s (tuning @ -0.23ms). Is it possible to get the exact thing when activating 25fps in submenu?
5D3.113 | EOSM.202

Danne

For preview crop in 2.35:1 I think it has to be set in RAW video menu instead of in the Crop mode menu. Havn't checked.
Fine tuning shutter. Could look into it. Maybe we could keep defaults not touching fps regs except for when set 25 fps is set in Crop mode sub menu. Then we could choose 25fps from canon menu instead as well. Also 30fps should work if set to ntsc.

I could enable Movie crop mode when selecting the preset but since we can't deselect people will wonder why all of a sudden all is wonky changing presets maybe not knowing why Movie crop mode is set. Now at least it has to be turned on for awareness.

Danne

New build:
https://www.magiclantern.fm/forum/index.php?topic=9741.msg208959#msg208959

- Enables Movie crop mode when selecting mv1080p MCM rewire. Will disable Movie crop mode when changing preset to something else in Crop mode menu. Absolutely needs pushing canon MENU button and back between changes. Note that when restarting camera in mv1080p MCM rewire mode will get you right into action. Forgetting canon MENU push at this stage will surely record some of the nastiest moiré clips ever so don´t blame me  when that happens :P (please check a1ex post: Details: extreme-moire.html)

- Canon fps 24, 25, 30 all works as default. If changing ratio or using set 25fps from Crop mode sub menu will instead add preset regs from crop_rec.c leaving canon fps modes.

If anyone can find a way of refreshing canon menu when changing presets please let me know. Also would be good if (cmos?) extreme moiré could be fixed without pushing canon menu etc...

jacquaviva

Thank, do you think a 1736x1158 rewire mode would work ?

Danne


jacquaviva

This would be the perfect super 35 camera, 16:9 & 3:2 Raw.

theBilalFakhouri

1736x976 @ 50 FPS was done in the new crop_rec for 700D, no Idea what is the registers values or FPS Timers I don't have my cam to check that.

Why not to try to port EOS M to new crop_rec  :D .

Danne

Believe me, I tried  8). I got it partially working. Still a few extra tweaks to get it going and I will revisit it in the future.

the_real_bill_jones

Still having troubles with movie crop mode. I'm using Danne's latest build.

First picture is what I see when filming in a 2.35 aspect ratio, in movie crop. Not crop rec




And this is the final image. Obviously it's cropped down to 2.35, but it's also shifted to the left slightly.




So what gives? Is this just how it is? Can I fix it? Thanks

Danne

New build:
https://www.magiclantern.fm/forum/index.php?topic=9741.msg208959#msg208959

- Fixed preview without black border(should be in perfect alignment)
- Real time preview 2.35:1 should now work with rewire mode(corrected cropmarks)

See to it that you push canon menu button when selecting and changing from mcm rewire mode. Even changing ratio requires a menu push.

Commits:
https://bitbucket.org/Dannephoto/magic-lantern/commits/29b1715bdd43f98b627d7eff35a0dad4523dca51
https://bitbucket.org/Dannephoto/magic-lantern/commits/0bbd0bcca72273e25666626f50807a3c593fc05e


@the_real_bill_jones
Please read at least 10-20 last posts. All has been asked and discussed already.