Canon 100D / SL1

Started by nikfreak, October 19, 2015, 10:41:29 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

nikfreak

No preset. Manually adjusted each time. Presets can be done in crop_rec module or you modify the 5D3 ones in adtg_gui.c:

https://bitbucket.org/hudson/magic-lantern/src/f683753bc4e3f5ef05a8ac86cab32f751aa39db0/modules/adtg_gui/adtg_gui.c?at=iso-research&fileviewer=file-view-default#adtg_gui.c-1105

Dirty hack:

static int crop_mode_reg(int reg)
{
       return 0;
}

static int res3k_reg(int reg)
{
    if (regs[reg].dst == 0xC0F0)
    {
        switch (regs[reg].reg)
        {
            case 0x6804:                /* C0F06804 - raw resolution */
                return 0x4580311;       /* from 0x528011B -> 3072px in raw_rec */
            case 0x6824:
               return 0x4ca
           fill in rest as seen in my posted screenshot
          fill in rest as seen in my posted screenshot
         fill in rest as seen in my posted screenshot
        fill in rest as seen in my posted screenshot

        }
    }

    return 0;
}


You fill in all other cases as seen in my posted screenshot.
In adtg gui advanced submenu you select ""1:1 3K crop mode (5D3)" to set your "dirty" preset. Afterwards you can verify by selecting "overriden regs"
[size=8pt]70D.112 & 100D.101[/size]

nikfreak

cool seems we can use this technique also for 1:1 modes (ofc wih other values) and scratch X5 mode. Quick test before battery went empty was 20xx * 1152 resolution but the top 1/10 of the image had dirty output
[size=8pt]70D.112 & 100D.101[/size]

Danne

Cool. I am getting a lot of battery pulls here but I will keep on it testing the dirty hack.
Great news about 1:1 modes!

nikfreak

Bad news:
1:1 modes cause headaches. one has to put a lot of more work / time / hunting into it for getting it to work.

good news:
I can also extend "Movie Crop mode" with same technique to round about 2450x1020 resolution. Importing clip into MLV App looks good. Didn't try to extend it more for now. Guess still good stuff achieved as we are able to extend width by a great margin.

Mystery:
autofocus puts the lcd / camera in some kind of "low fps" mode. Looks like 3 / 4 / 5 fps. crop_rec Builds from the experiments page don't have this. Guess you have a typo somewhere in fps-engio in your custom build. Strange thing: I can't replicate my achievements with the builds from experiments page. Your adtg gui module just can be enabled with them. Your build and the ones from experiments page differ in such a way that I can replicate always on your builds but never on the one from experiments page. Is it the latest comiits from 100D missing in crop_rec? a1ex can you please merge 100D into crop_rec again?
[size=8pt]70D.112 & 100D.101[/size]

Danne

autofocus puts the lcd / camera in some kind of "low fps" mode. Looks like 3 / 4 / 5 fps.
Is this the latest fix from, framing preview, halfshutter press working now etc or some other funky stuff?
Is it the latest comiits from 100D missing in crop_rec?
We should find a version to stick with. By the way. Which 100D branch is the most up to date?
I can also extend "Movie Crop mode" with same technique to round about 2450x1020 resolution.
All this extending progression is so great to see. How is 5xZoom coming along here? Is 2520x1072 possible to get some more height perhaps?
Hopefully we can get som help to have the adtg_gui more fluently working. I pulled my battery like it was workout time yesterday  :P

nikfreak

Height should be doable by adjusting additionally ADTG2 registers. Needs definitely some time. Guess it should suffice if you remerge 100D_merge_fw101 into crop_rec_4k branch  from ML repository and provide that zip here to find out what's wrong.

My working NB is dead. I took my HP 13" hackintosh and natively installed win7 again onto it to have something to play with - I yet have to setup my compiling environment.
[size=8pt]70D.112 & 100D.101[/size]

Danne

Version build here, merged into Crop_rec_4k(Not tested, gotta run, can test more later. Included the adtg_gui with the hack):
https://bitbucket.org/Dannephoto/magic-lantern/downloads/magiclantern-Nightly.2018Jun10.100D101_merge.zip

Note that the latest version before the above one is compiled with my "all in" branch here:
https://bitbucket.org/Dannephoto/magic-lantern/branch/crop_rec_4k_mlv_lite_snd_sd_uhs_HDR_ext_all_bits
Includes sound and whatnot into mlv_lite.


Merging went with flying colors. This have changed:






Will check into this:
QuoteGuess you have a typo somewhere in fps-engio

Set up your hackintosh and then run this. Faster then gui. Terminal shortcuts
https://bitbucket.org/Dannephoto/compiler/src/default/

nikfreak

[size=8pt]70D.112 & 100D.101[/size]

Danne

Yeah maybe. Or maybe the hack? Out of town a few hours but let's keep going.
The fps change is really golden. 42 fps in mv1080p. Could it be achieved for 5xZoom too? And of course H.264  :P

nikfreak

Yeah it's confirmed. The B timers are necessary for it to work. At the same time they are root cause of the "slowish" LCD.
Need to check what's going on or where the limits really are. I'm out too. Gonna pick it up again later.

Btw: my VM is up and running. Thx for assisting with zips.
[size=8pt]70D.112 & 100D.101[/size]

Danne

Cool find with timers and great that your vm is up and running.

nikfreak

Danne, can you confirm that the sluggish LCD output (looks like 2 fps) is caused by Global draw and/or mlv_lite.

It does not happen on the crop_rec experiments download as well as "builds" download. My guess is manually defined fps timers in code luckily fix it "somehow".
playing with resolution extention i need to modify fps timers - either via adtg gui or manually in fps-engio.c.
Strange thing happens now when in video mode: Global draw in conjunction with mlv_lite causes it. No sub-options causing it - but main Global Draw ON, all modes. If you disable "RAW video" then it will not be "sluggish". On the other side. If you leave "RAW video" "ON" and disable "Global draw" it will not happen, too. Could be some edmac issue or whatever. We were just in luck nobody noticing it due to manually defined timer values. Now in need to change them the issue appears.

How to confirm:
Compile 100D_merge_fw101 branch and replace 100D timers in fps-engio.c. Code below sets both timers back to its original timers by also uncommenting timer B values.:


#elif defined(CONFIG_100D)
    #define TG_FREQ_BASE 32000000
    #define FPS_TIMER_A_MIN (fps_timer_a_orig)
    // no need to cause confusions as recording speed cannot handle such high fps in crop mode
    // (ZOOM || MV1080CROP ? 1288 : 1970)) <-- these are ok while not recording.
    // Hybrid CMOS AF II uses 60fps by default in LV/MV for the camera display
    // to achieve a "snappy" autofocus by doubling the fps
    // MV720 is not LV so we need to extend the definition for the LCD.
    // #define FPS_TIMER_B_MIN (ZOOM || MV1080CROP ? 1288 : MV720 || (lv && lv_dispsize==1 && !is_movie_mode()) ? 990 : 1970)
#elif defined(CONFIG_500D)
....
....


Next enable Global draw as well as RAW video and just press zoom X5 and the LCD output will be sluggish (kind of 2fps). It will also happen after focus confirmation. There's some overlay, too. I see hundreds f focus dots on the LCD. I don't remember acting the cam like this once beginning to port ML and even recently. Could be a commit in the repo in the last 6 months or so. I must admit I didn't use the cam for a long time.

Now go figure how to solve this before continuing with anything else. Any idea what to look at @a1ex? Edmac channels?
[size=8pt]70D.112 & 100D.101[/size]

Danne

Ok, will check this behaviour. Meanwhile.

Added all registers into the hack as described. Missed some parts before. Ok, so I can get extended resolution but black screen only recorded(pushing exposure and):


dng file:
https://bitbucket.org/Dannephoto/magic-lantern/downloads/M11-1042_1_2018-06-11_0001_C0000_000000.dng

How are you getting a straight image here? I set FPS override to 24, maybe leave that out. And, how are your liveview when in 2880x1072?

Oops, might have a typo in the hack, stay tuned...


nikfreak

Set the values as seen i my screenshots. Then open Canon menu and back. Voila!
[size=8pt]70D.112 & 100D.101[/size]

Danne

hm , something isn´t hooking onto here:
static int res3k_reg(int reg)
{
    if (regs[reg].dst == 0xC0F0)
    {
        switch (regs[reg].reg)
        {
            case 0x6804:                /* C0F06804 - raw resolution */
                return 0x4580311;       /* from 0x528011B -> 3072px in raw_rec */
            case 0x6824:
               return 0x4ca;
            case 0x6828:
               return 0x4ca;
            case 0x682c:
               return 0x4ca;
            case 0x6830:
               return 0x4ca;
            case 0x6008:
               return 0x34b034b;
            case 0x600c:
               return 0x34b034b;
            case 0x6010:
               return 0x34b;

        }
    }

    return 0;
}


and this:


Checkng the sluggish global draw stuff a little later...
EDIT: Ok, I think the sluggish stuff is acting the way it´s supposed to. If you set Preview to real-time(inside RAW video sub menu) it should be back to updating the way it should. In other branches the halfpress shutter wasn´t working as it should. The reason we have this sluggish preview is that when previewing 5X Zoom mode we get full resolution preview instead of just a part of the preview window. The feature comes from the 5D mark III crop_rek_4k branch I believe.

nikfreak

Danne please check my instructions again.
Your code is ok but check the static int before. You are applying 5D3 CMOS values.


static int crop_mode_reg(int reg)
{
       return 0;
}

static int res3k_reg(int reg)
{
    if (regs[reg].dst == 0xC0F0)
    {
        switch (regs[reg].reg)
        ....
       .....
      .....


Got it? You just have to return 0 for the dirty hack. rest is ok.
Btw: I am confused atm. I gave up becuase the raw recording also was sluggish. Same as the LCD. I guess it was that way!? Tried too much stuff at the same time  :P . Once you get it working maybe you can comment again and we can fine tune the values if it is ok.

I generally never do raw recording so I may have missed a bit too much regarding latest achievements.
[size=8pt]70D.112 & 100D.101[/size]

Danne

Thanks man. Back on it a little later when back with my cam.

nikfreak

Did some more tests. You were ofc right with the broken preview etc. But somehow the recordings have this "sluggishness". So we need to find or correct some registers. Let me know your results
[size=8pt]70D.112 & 100D.101[/size]

nikfreak

Ahh using MLV App first time as PC reinstalled freshly I would try it. I notice its getting better - the sluggishness appears to be caused also in playback  from "Dropped frame" option in MLV app? I just can record short clips with slow sdcard. Enabling sd_uhs, adtg_gu and mlv_lite doesn't work quite well for me at least. Getting malloc errors...
[size=8pt]70D.112 & 100D.101[/size]

Danne

ah, nice, we got some action over here:


Preview scrambled but recording looks perfect. Check fps.
First test and busy atm but will find time asap!

nikfreak

Great stuff. It's much more fun to team up and I am already doing some maths based on a1ex's instructions. Guess first goal could be 3k width for now. It needs fiddling though I am optimistic we can increase height at a later time too:
https://www.magiclantern.fm/forum/index.php?topic=19300.1435
[size=8pt]70D.112 & 100D.101[/size]

Danne

AH, This is so cool. sd_uhs.mo giving me 60mb/s 24fps 2880x1078. 14bit lossless works. 12bit lossless and 10bit lossless gives corruption. Regular 10bit working but the clear winner is 14bitlossless. Can´t wait to get more time for this. Great progress Nikfreak!

nikfreak

Yay user TheBilalFakhouri already stated same (10-12bit lossless) not working when overriding resolution on 700D. So we are in the same boat. battery needs another charge  8)
[size=8pt]70D.112 & 100D.101[/size]

Danne

2944x1078 14bit lossless


2968x1072 14bit lossless


nikfreak

height can also be done. Just not yet stable enough.

These three help to get some dirty output {bottom and top 1/6 dirty}
ADTG2 8178 / 8179
C0F06014

We always said:
42fps at 1800x1012 in default movie crop mode is ok. We rip off fps but gain resolution. Now how to find the sweet spot for 24fps? Math?

x*y*42fps = 76507200

76507200 / 3000 width / 24fps = ~1060 height? So we should be nearby to the width limit already. if the calc is correct
[size=8pt]70D.112 & 100D.101[/size]