Canon 6D

Started by Maqs, May 01, 2015, 09:56:15 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Danne

Thanks for trying :). Still frozen. Think we need another approach, maybe checking bilals registers and I think I have it working with 3k so maybe take it from there.

Danne

3096x1320 20fps as high as I can get with a usable image:
     if (is_camera("100D", "1.0.1"))
    {

       if (regs[reg].dst == DST_CMOS)
       {
           switch (regs[reg].reg)
           {
case 5:
      return 0x280;       /* CMOS[5]: ISO related? */
                 case 7:
    return 0xa89;       /* CMOS[7]: ISO related? */
           }
       }

       if (regs[reg].dst == 0xC0F0)
       {

           switch (regs[reg].reg)
           {
                case 0x6804:                /* C0F06804 - raw resolution */
                    return 0x5490331;       /* 2904x1320 20fps 14-bit lossless */
    case 0x6824:
    return 0x3ca;
    case 0x6828:
    return 0x3ca;
    case 0x682c:
    return 0x3ca;
    case 0x6830:
    return 0x3ca;
    case 0x6008:
    return 0x37b037b;
    case 0x600c:
    return 0x37b037b;
    case 0x6010:
    return 0x37b;
    case 0x6014:
    return 0x6d7;
    case 0x713c:
    return 0x555;
            }

        }
        else if (regs[reg].dst == 2)        /* ADTG 2 */
        {
            switch (regs[reg].reg)
            {
            case 0x82b6:
       return 0x7f4;      /* it's 5 in zoom mode and 6 in 1080p; this also overrides ADTG4 */
            case 0x8172:
       return 0x77c; /* without this, you get some weird artifacts; this should only go to ADTG2, not 4 */
    case 0x8178:
       return 0x77c;

            }

        }

    }


Mostly Bilals register settings.
https://docs.google.com/spreadsheets/d/1TzPxh7ai5JAoEI8zllaiiF1IDF5tAQam2BKRujyIYQU/edit#gid=0


Edit: Got another one working 4056x2552 9fps:
   if (is_camera("100D", "1.0.1"))
    {

       if (regs[reg].dst == DST_CMOS)
       {
           switch (regs[reg].reg)
           {
case 5:
      return 0x200;       /* CMOS[5]: ISO related? */
                 case 7:
    return 0xf20;       /* CMOS[7]: ISO related? */
           }
       }

       if (regs[reg].dst == 0xC0F0)
       {

           switch (regs[reg].reg)
           {
                case 0x6804:               
                    return 0xa1b0421;       /* 4056x2552 9fps 14-bit lossless */
    case 0x6824:
    return 0x4ca;
    case 0x6828:
    return 0x4ca;
    case 0x682c:
    return 0x4ca;
    case 0x6830:
    return 0x4ca;
    case 0x6008:
    return 0x45b045b;
    case 0x600c:
    return 0x45b045b;
    case 0x6010:
    return 0x45b;
    case 0x6014:
    return 0xbd4;
    case 0x713c:
    return 0xa55;
            }

        }
        else if (regs[reg].dst == 2)        /* ADTG 2 */
        {
            switch (regs[reg].reg)
            {
            case 0x82b6:
       return 0xbf4;      /* it's 5 in zoom mode and 6 in 1080p; this also overrides ADTG4 */
            case 0x8172:
       return 0x8fd;
          case 0x8178:
       return 0x8fd;

            }

        }

    }

nikfreak

Great not far away for Full-Res LiveView with the benefit of higher shutter speed - though ADTG gui still hangs for me in Liveview.
[size=8pt]70D.112 & 100D.101[/size]

Danne

Try turning off global draw. Totally kills the workflow over here otherwise.

Levas

Can't get full resolution live view working on 6d. buffer is too small at the moment.
Got an error when I tried to record, image size is about 35Mb and image buffer is restricted to 20Mb or so I believe.
Image buffer size is set in MLV_lite.c or Raw.c not sure, Alex made the buffer for 5d3 bigger for some crop_rec options I read somewhere in Crop_rec.c in the comments I think.

Levas

Quote from: Danne on June 20, 2018, 02:14:28 PM
Edit: Got another one working 4056x2552 9fps:
   if (is_camera("100D", "1.0.1"))
    {

       if (regs[reg].dst == DST_CMOS)
       {
           switch (regs[reg].reg)
           {
case 5:
      return 0x200;       /* CMOS[5]: ISO related? */
                 case 7:
    return 0xf20;       /* CMOS[7]: ISO related? */
           }
       }

       if (regs[reg].dst == 0xC0F0)
       {

           switch (regs[reg].reg)
           {
                case 0x6804:               
                    return 0xa1b0421;       /* 4056x2552 9fps 14-bit lossless */
    case 0x6824:
    return 0x4ca;
    case 0x6828:
    return 0x4ca;
    case 0x682c:
    return 0x4ca;
    case 0x6830:
    return 0x4ca;
    case 0x6008:
    return 0x45b045b;
    case 0x600c:
    return 0x45b045b;
    case 0x6010:
    return 0x45b;
    case 0x6014:
    return 0xbd4;
    case 0x713c:
    return 0xa55;
            }

        }
        else if (regs[reg].dst == 2)        /* ADTG 2 */
        {
            switch (regs[reg].reg)
            {
            case 0x82b6:
       return 0xbf4;      /* it's 5 in zoom mode and 6 in 1080p; this also overrides ADTG4 */
            case 0x8172:
       return 0x8fd;
          case 0x8178:
       return 0x8fd;

            }

        }

    }


Makes a great starting point.
Use this one as base settings and do the following
In register 6804 increase the second last character one value at the time
Do the same for 6008, change both middle characters one value at the time

So 6804 =  a1b0421 -> increase the second last character, in adtg_gui, one value up -> a1b0431
And do exactly the same for 6008.
6008  = 45b045b -> change the middle characters -> 46b046b

As long as you do the same increments to both the character values of 6804 and 6008 nothing should break the live view/preview.


Danne

Doing that tiny change causes corruption/hiccups straight away.
I assume all of these change(yes tested both scenarios):
                case 0x6804:               
                    return 0xa1b0431;

    case 0x6008:
    return 0x46b046b;
    case 0x600c:
    return 0x46b046b;
    case 0x6010:
    return 0x46b;

I must say Bilals numbers are very solid working. I only changed:
                case 0x6804:               
                    return 0xa1b0422;

to:
                case 0x6804:               
                    return 0xa1b0421;

and working in 4056x2552

Levas

Makes sense, 100d and 700d probably have the same sensor, or at least the same sensor dimensions in megapixel.

Levas

Got something new to play with for the 6d, crop_rec module with 5192 x 632 @ 25fps for the 6d.
Many thanks to everyone who helped, MK11174, Danne, ofcourse Alex and probably many more.

Download it here, 'Crop_rec.mo', and put it in your ML/modules/ directory on your SD card.
https://drive.google.com/open?id=1bPT3waaGABlrcwciaOUDbhNhPp_eBuFU

And for those interested, here's the source:
https://drive.google.com/open?id=1bJQpCEK_iknKxfwAAvnpvJLbQ7a2iDus

Not sure with what builds this module works, but it works for sure with latest experimental crop_rec 4k build for 6d(see ML homepage->download->experiments)
https://builds.magiclantern.fm/jenkins/job/crop_rec_4k/75/artifact/platform/6D.116/magiclantern-crop_rec_4k.2018Jun20.6D116.zip
SOUND RECORDING WITH MLV_LITE IS IN THIS BUILD AS IT USED TO BE, ON A SEPERATED TAB IN ML MENU

Short tutorial:

Copy the 'Crop_rec.mo' file in the 'ML/modules/' directory on your SD card.
Turn camera on and enable 'crop_rec' module in the 'modules' tab in ML menu.
Turn camera off and on again to see the option 'Crop mode' in the movie tab of ML menu, don't turn crop_mode on yet...
First go to raw video menu and set resolution with the set button to '5796'.
As data format select 14 bit lossless (12bit lossless and 11-8 bit lossless aren't working in crop_mode, they give corrupted frames)
Preview can be set to 'Framing' (live view is broken in crop_rec mode, but ML preview works fine)

Now go to video mode, press magnifying button 2 times, so you're in 5x zoom mode and now go to ML menu and enable Crop mode in ML movie tab, select the middle mode '2K 5192x632'.
Press half shutter to close ML menu and voila, 5196x632x25fps video mode.

Horizontal resolution can be lowered to whatever you like in ML raw video menu (highlight resolution and use scroll wheel to lower the resolution, to get for example 4096 or 3840 x 632 resolution.

If you want to squeeze out some extra performance, put 'preview' option in raw video menu to real-time. (Don't be scared how live view looks  :P , use half shutter to get ML preview to check framing, while recording you can use a quick half shutter press to check framing, but for best performance, use half shutter press as little as possible.

Now as long as 'crop mode' is enabled in ML menu, live view is broken, also in 1080p mode.
So when 'crop_rec' is turned on and your turn off and on your camera, you will start up in 1080p mode, with broken live view, press magnifying button twice to enter 5x zoom mode and everything is fine.
Want to record in normal 1080p mode again, turn off Crop_rec option in ML menu.


Levas

Did notice something with the Crop_rec, shuttertime behaves a little weird.
The build works perfectly fine with 1/30th to 1/50th shutter time.
But when 1/60 is used, ML displays 1/150 shutter time and when 1/80th is used(as visible on top display) ML displays 1/3800 shutter time and ML preview looks quitte dark, so it is 1/3800th :P.
And when going to 1/100th, ML preview breaks and can't display a normal shutter time...

So for best results keep shutter between 1/30th - 1/50th setting.

EDIT: found the problem, disabled shutter blanking registers while debugging, will upload a new build.
Files in the link are updated, nothing wrong anymore  8)

Levas

Hello people with a 6d

Made some (crop) mode presets for the 6d.
My current build contains:

- 1824x1026 @ 35fps (for use in normal 1080p mode, no crop) - working Canon Liveview
- 2688x1166 @ 25fps (for use in 5x zoom crop mode) - working Canon Liveview
- 2880x1200 @25fps (for use in 5x zoom crop mode) - scrambled Canon Liveview, need to use half shutter to see ML preview fro framing
- 3840x1440 @12.5fps (for use in 5x zoom crop mode) - scrambled Canon Liveview, need to use half shutter to see ML preview fro framing
- 5192x634 @ 25fps (for use in 5x zoom crop mode) - scrambled Canon Liveview, need to use half shutter to see ML preview fro framing

Link to crop_rec module file:
https://drive.google.com/open?id=15Ar5OPVRHxJjFBSo72t2nTjYoEbJGuYL

Sometimes I loose the half shutter ML preview option, not sure why that is  ???
But turning the camera off and on(while in video mode) makes the ML preview work again, most of the times.

Unfortunately Crop_rec module only works with 14 bit lossless options, 12 bit lossless and lower gives corrupted frames(and is for that reason disabled in most cases)


theBilalFakhouri

Quote from: Levas on July 06, 2018, 08:32:05 PM
Sometimes I loose the half shutter ML preview option, not sure why that is  ???
But turning the camera off and on(while in video mode) makes the ML preview work again, most of the times.

Yes this is happened for me a lot in 700D not sure why too :-\ .

a1ex

After losing the preview, is there any error reported in the Debug tab?

Levas

It often happens when switching crop presets in liveview.
When it happens it shows a memory error in debug tab, 'No allocator for 675kb at tweak.c:3341, livev_hiprio_task.'

Levas

Did a small update on the crop_rec modes for 6d.
UHD has now more vertical resolution in exchange for fps, UHD is now 3820 x 2160 x 10 fps
And I changed the 5192x634 mode for a full resolution mode, 5472 x 3606 x 4.8 fps (expect about 1 frame recording time :P).
All modes are made for usage in 5 x zoom mode, except the first one, which is for use in normal non crop 1080p mode.

The crop_rec. mo file:
https://drive.google.com/open?id=1jB9Hl1nEhnGJ-Np6znQZ4e6j2Zlo_IHq


Danne

Not bad Levas. Put your code out on bb so I can get some good summer reading over here  8).

IDA_ML

Levas,

You seem to have fixed one of the most important features when filming at high resolutions - the ML preview.  Congratulations!

Levas

@Danne, not that used to bitbucket.
Got the source here for you (sorry for the messy file  :P )
https://drive.google.com/open?id=1Rnc8ooO3HI8IGA9wBCvU_3Om06GlmWGR

There's one thing though with the 35fps setting, I set the register so that it is for use in normal 1080p mode, not 5x zoom crop, but normal 1080p mode has not the good shutter times at the moment.
The sensor timing table with video modes doesn't have a column for 5x zoom mode:
https://www.magiclantern.fm/forum/index.php?topic=19300.msg203306#msg203306
To fix shutter times in crop mode, I set values from zoom mode at the place of 1080p25.
I'm thinking of putting a 'switch' there in the code, where I put two sensor timing tables in it and let crop preset determine which table it uses.


Levas

@IDA_ML
Not sure what you mean with that I fixed ML preview ?
The ML preview is still 'gone' sometimes, but restarting the camera in video mode often does the trick.

IDA_ML

Quote from: Levas on July 09, 2018, 12:51:16 AM
@IDA_ML
Not sure what you mean with that I fixed ML preview ?
The ML preview is still 'gone' sometimes, but restarting the camera in video mode often does the trick.

On the 100D (Danne's June 30-th build), real time preview works in the 2,5K crop mode and only at 5x magnification.  In the 3,1 and 4K modes, preview is still scrambled and needs to be fixed.   Your 6D build says "ML preview" even at the 4k and 5k modes.  Does that really work as a WySiWyG preview, meaning you get correct framing during recording? 

I also have another question.  How many frames do you get recorded at the 2688x1166@25fps setting with a normally lit and exposed scene with the 6D and SD overclocking enabled?

Levas

@IDA_ML
Not sure how it is on the 100d, but I guess it's the same as on the 6d.

With 2688 x 1166 at 25 fps I have real-time live view (but indeed with 5x zoom, so not exactly WySiWyG, but at least centered.)
BUT if I do a half shutter press and hold it that way, I see the ML preview pop up on screen, which gives a WySiWyG framing, but the ML_preview is not that high in resolution and it's not real time fps but slower.
Once I have framed my shot, I quit half shutter press, and press record button.
When keeping the ML preview while recording it's slows down the camera which results in shorter recording times.

With the higher resolution crop_presets I have scrambled live view, but I can let normal ML_preview pop up with half shutter press.
It's this option in Raw video menu (Be sure that global draw is set to'ON all modes' in the overlay tab menu):


You could also choose for the option 'framing', that way it automatically does ML preview, so no need to hold half shutter press. but as said before, expect shorter recording times when ML_preview is used while recording.

About recording times on the 6d.
I found recently out that in video mode it does about 60 to 62 MB/s write speed(with SD_UHS hack). (always thought it was 70MB/s just as the benchmark in photo mode shows)

With 2688 x 1066 at 25 fps I get about 6 to 7 seconds of recording time.
But I'm planning to use that mode with 2560 x 1072 at 25 fps (1:2.39 aspect ratio)
That way I get 9 to 10 seconds recording time with 14 bit lossless and SD_UHS hack.

Would be cool if lower lossless bitrates could be fixed again.
Have tried to fix it with using the analog gain registers, which works, but the problem is it also affects the ML_preview. So not really usable for 10 bits lossless, image preview get's really dark  :P.
Furthermore I couldn't fix the white level in camera, so has to be fixed in post proces.

I think the way to go is using the analog gain registers, but altering the crop_rec module to only enabling them while recording. Which is way out of my league for programming, just as fixing the whitelevels correct in camera.

IDA_ML

Thanks a lot, Levas, for your comprehensive reply.  I do hope that 10 and 12 bit lossless modes will work for us again soon so we can get longer recording times on our cameras. 
By the way, did you try Dual ISO with your 6D at the 2688 x 1166 resolution?  You will be blown away by the quality and full-frame vision!

Levas

New Crop_rec update for 6d:

Made the fast fps mode now for 720p mode only, this way I can go up to 50 fps in 1832 x 800 resolution. (1080p mode max frame rate is about 36/37 fps before liveview breaks)
Beware, when the 50fps preset is loaded in 1080p mode, your camera shuts down, error 70 or something, battery pull needed, so use it in Canon 720p50fps mode.
When preset is loaded, use magnify button to skip to all the zoom modes, to be sure all registers are activated, for use in normal mode, non zoom.


Download the module here:
https://drive.google.com/open?id=1k1unqwIcfGqtMS-Q42DFXb6W8LEB1CPo


@Alex, I also managed to get 75 fps and 100 fps on the 6d, without soft bricking the camera!
But Canon live view is stuttery and slow (not smooth like 50fps), ML preview looks good, but once recording it's a mess, freezes frames/every second frame corrupted that kind of stuff.
How is that on the 5d3, could you get beyond 70fps, or did that soft brick the camera ?

a1ex

100 FPS at some low resolution? Very cool! I wasn't able to go beyond ~ 65 FPS on 5D3; got image corruption even by just reducing the resolution without increasing the frame rate. Might be worth trying it on 60D.


Levas

Works only in 720p mode, in 1080p camera shuts down/soft bricks.

75 fps is in 1832 x 500something resolution, but as said, ML preview looks good, but recording not.
For 75 fps I use A timer of 0x203 (515 decimal) and B timer of 0x294(660 decimal)

Could also lower the A timer to get 100fps, but same problem, real stuttery canon live view, camera doesn't respond very quick on button presses.
But it didn't soft brick, so that's something  :P