Author Topic: Canon 6D  (Read 470734 times)

dfort

  • Developer
  • Hero Member
  • *****
  • Posts: 3741
Re: Canon 6D
« Reply #675 on: November 16, 2017, 08:50:35 PM »
From those compile messages it looks like you are missing the SRM_BUFFER_SIZE in consts.h.
5D3.* 7D.206 700D.115 EOSM.203 EOSM2.103 M50.102

Audionut

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3583
  • Blunt and to the point
Re: Canon 6D
« Reply #676 on: November 16, 2017, 10:35:58 PM »
Yeah, my next step was to merge crop_rec_4k and got SRM errors.
Next was to follow dforts efforts, but ran out of time.

Lets see what today brings.

Levas

  • Contributor
  • Hero Member
  • *****
  • Posts: 1486
  • 6d - Nightly build user
Re: Canon 6D
« Reply #677 on: November 16, 2017, 10:54:29 PM »
Still can't get it to work, got more errors with compiling.
First raw.c
Changed it with the one in Dfort's build.
But now I don't get the MLV_Lite module...

Combining the existing build of DFort "crop_rec_4k_6D_wip"
with ErwinH's "crop_rec_4k_mlv_lite_snd"
is a challenge  :-\

Levas

  • Contributor
  • Hero Member
  • *****
  • Posts: 1486
  • 6d - Nightly build user
Re: Canon 6D
« Reply #678 on: November 16, 2017, 11:05:11 PM »
@DFort
The build as it is now, (Crop_rec_4k_6d_WIP)
doesn't work at 1824 x 1024 resolution.
You get a MLV, but you won't get any dng's from it ?
The MLV is normal in size... :-\

Probably has to do with 'modulo' options in MLV_lite.c Alex talked about.
At the moment only case 6 is optional:
 case 6:     /* res_x is modulo 2 bytes, so res_y must be modulo 8 */
            return res_y & ~7;

When all options where open, we got half corrupted frames with some resolutions.
So I think I got some testing to do here  :P

dfort

  • Developer
  • Hero Member
  • *****
  • Posts: 3741
Re: Canon 6D
« Reply #679 on: November 16, 2017, 11:54:50 PM »
The build as it is now, (Crop_rec_4k_6d_WIP)

That isn't it. That's a branch that I've been experimenting with and it probably isn't working properly. I took down my 6D builds because I didn't want to cause any confusion like this.

I'm talking about a build made off the pull request. I just uploaded a build of it to my Bitbucket downloads page.

There have been several experiments but I'm not sure if anything needs to change in the code or if all the progress is on the post processing end of things. I'm still in the dark whether or not the FRSP hack is needed on the 6D or if this needs to change:

lossless.c
Code: [Select]
    if (is_camera("5D3", "*") || is_camera("6D", "*"))
     {
         /* resolution is hardcoded in some places; patch them */
         EngDrvOut(0xC0F375B4, PACK32(width    - 1,  height/2  - 1));  /* 0xF6D0B8F */
         EngDrvOut(0xC0F13068, PACK32(width*2  - 1,  height/2  - 1));  /* 0xF6D171F */
         EngDrvOut(0xC0F12010,        width    - 1                 );  /* 0xB8F     */
         EngDrvOut(0xC0F12014, PACK32(width    - 1,  height/2  - 1));  /* 0xF6D0B8F */
         EngDrvOut(0xC0F1201C,        width/10 - 1                 );  /* 0x127     */
         EngDrvOut(0xC0F12020, PACK32(width/10 - 1,  height/20 - 1));  /* 0x18A0127 */
     }

I believe you experimented with this but I'm not sure if it fixed anything:

Code: [Select]
    if (is_camera("6D", "*"))
     {
         /* resolution is hardcoded in some places; patch them */
         EngDrvOut(0xC0F375B4, PACK32(width    - 1,  height/2  - 1));
     }
5D3.* 7D.206 700D.115 EOSM.203 EOSM2.103 M50.102

Levas

  • Contributor
  • Hero Member
  • *****
  • Posts: 1486
  • 6d - Nightly build user
Re: Canon 6D
« Reply #680 on: November 17, 2017, 08:27:34 AM »

Code: [Select]
    if (is_camera("6D", "*"))
     {
         /* resolution is hardcoded in some places; patch them */
         EngDrvOut(0xC0F375B4, PACK32(width    - 1,  height/2  - 1));
     }

The piece of code above is needed, without this line, I get frames that look scambled, like the one I posted here:
http://www.magiclantern.fm/forum/index.php?topic=15088.msg192884#msg192884

I'm not sure about the other lines that are in the same piece of code, they were not needed for normal 1xzoom recording mode on 6D. But I was thinking, maybe those other lines are needed for different recording modes like 3x zoom and stuff, so maybe it's best to leave them all in, they sure didn't hurt recording.

Levas

  • Contributor
  • Hero Member
  • *****
  • Posts: 1486
  • 6d - Nightly build user
Re: Canon 6D
« Reply #681 on: November 17, 2017, 08:31:21 AM »
I'm still in the dark whether or not the FRSP hack is needed on the 6D or if this needs to change:

I think the hack is needed, because I have never been able to get a full-res-silent lossless picture.
Full-res-silent for normal dng works, but not for lossless. When trying to take a full-res-silent lossless, it looks like the camera acts very normal, I think it actually takes one, but it's never saved on the card  :-\

Levas

  • Contributor
  • Hero Member
  • *****
  • Posts: 1486
  • 6d - Nightly build user
Re: Canon 6D
« Reply #682 on: November 17, 2017, 02:12:07 PM »
@Dfort

I'v downloaded your build of Crop_rec_4k_6d.116
https://bitbucket.org/daniel_fort/magic-lantern/src/0c3ef797ce995b51e86184049350022d0ee97324/?at=crop_rec_4k_6D.116

And I'm missing the 'only modulo 8' alterations in MLV_Lite.c
Frame corruption: the encoder appears to require image height to be modulo 8. Try commenting out cases 0 and 4 (only the lines with return) in calc_res_y (mlv_lite.c) and see if you can still get invalid frames afterwards.

I have it altered like this, so it can only do case 6, modulo 8. But this isn't a solution for the unified build with all camera's  :P
So there must be implemented something like, if cameramodel is 6d -> only modulo 8 option
Code: [Select]
/* res_x * res_y must be modulo 16 bytes */
    switch (MOD(res_x * BPP / 8, 8))
    {
        case 0:     /* res_x is modulo 8 bytes, so res_y must be even */
            /* return res_y & ~1; */

        case 4:     /* res_x is modulo 4 bytes, so res_y must be modulo 4 as well */
            /* return res_y & ~3; */
       
        case 2:
        case 6:     /* res_x is modulo 2 bytes, so res_y must be modulo 8 */
            return res_y & ~7;

        default:    /* should be unreachable */
            return res_y & ~15;
    }
}

Without the only modulo 8 alteration, some resolutions give half corrupted frames. Like this:



dfort

  • Developer
  • Hero Member
  • *****
  • Posts: 3741
Re: Canon 6D
« Reply #683 on: November 17, 2017, 06:13:18 PM »
Just a shot in the dark -- maybe the problem is with raw_info.jpeg.height?

Code: [Select]
    /* max image width is modulo 2 bytes and 8 pixels */
    /* (EDMAC requires W x H to be modulo 16 bytes) */
    /* (processing tools require W modulo 8 pixels for struct raw_pixblock) */
   
    max_res_x = max;
   
    /* max res Y */
    max_res_y = raw_info.jpeg.height & ~1;

There have been some updates in crop_rec_4k that affect white and black levels so I merged that along with your mlv_lite hack and my FRSP hack and put a build in my downloads directory. Of course these hacks will never fly but at least we'll see what we need to work on.
5D3.* 7D.206 700D.115 EOSM.203 EOSM2.103 M50.102

Levas

  • Contributor
  • Hero Member
  • *****
  • Posts: 1486
  • 6d - Nightly build user
Re: Canon 6D
« Reply #684 on: November 17, 2017, 08:21:49 PM »
Downloaded your newest build, but full-ress-silent lossless still doesn't work.
It doesn't write a file to the card.

Also one little thing does not work with lossless recording in MLV_Lite. (both normal 14 bit and lossless bitrates)
When maximum 16:9 resolution is selected with MLV_Lite, which is 1824 x 1024, it writes a MLV file, but I can't extract dng's out of it with MLV_dump ?
The MLV file size seems quitte normal.
When using verbose option with MLV_Dump it gives a segmentation fault:
Quote
Block: VIDF
  Offset: 0x00000600
  Number: 12
    Size: 3269120
    Time: 157.191000 ms
   Frame: #0000
    Crop: 80x128
     Pan: 80x128
   Space: 32
Segmentation fault: 11

For the rest all other resolutions, seem to work with MLV_Lite.

dfort

  • Developer
  • Hero Member
  • *****
  • Posts: 3741
Re: Canon 6D
« Reply #685 on: November 17, 2017, 10:03:36 PM »
If you change the Aspect ratio to 3:2 can you get more vertical resolution? What is the maximum vertical resolution you can get? Does that give you a valid MLV file? Does going to 1.85:1 work?

The 6D sensor is 5472 × 3648 so the maximum non-crop resolution should be width/3 x height/3 or 1824 x 1216.

Have you ever been able to get a Full Resolution Silent Picture on the 6D? Seems like that's what's needed to perform the tests on that Intercepting DebugMsg with cache hacks link you pointed to a while back.
5D3.* 7D.206 700D.115 EOSM.203 EOSM2.103 M50.102

Audionut

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3583
  • Blunt and to the point
Re: Canon 6D
« Reply #686 on: November 18, 2017, 06:17:39 AM »
Have you ever been able to get a Full Resolution Silent Picture on the 6D?

Yes here.  Just not lossless.

dfort

  • Developer
  • Hero Member
  • *****
  • Posts: 3741
Re: Canon 6D
« Reply #687 on: November 18, 2017, 06:28:04 AM »
Right, sorry--that's what I meant. Everything seems to work as usual but it isn't saved on the card, right?
5D3.* 7D.206 700D.115 EOSM.203 EOSM2.103 M50.102

Audionut

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3583
  • Blunt and to the point
Re: Canon 6D
« Reply #688 on: November 18, 2017, 06:59:42 AM »
Yeah, that's how it worked with the last build of yours I tried (pretty sure anyway).

Haven't been able to compile a lossless build here, yet.

Levas

  • Contributor
  • Hero Member
  • *****
  • Posts: 1486
  • 6d - Nightly build user
Re: Canon 6D
« Reply #689 on: November 18, 2017, 10:27:46 AM »
@Dfort,

Never had, or was able to make, a working build with full-res-silent lossless.

Max resolution in normal video mode is indeed 1824 x 1216.
1824 x 1216 resolution works, got normal MLV and can extract dng's.
1:85 aspect ratio (1824 x 924) also gives normal MLV.
Only problem is, for as far I tested different resolutions, 1824 x 1024. (before the only modulo 8 fix, this resolution was 1824 x 1026 and gave half corrupted frames)
Uploaded a MLV of 1824x1024 resolution, only 3 second clip, 160Mb in size.
I can't get dng's out of it, with MLV_dump, maybe other options or software works. Maybe only the first frame is wrong or so  :-\

https://drive.google.com/open?id=1FBGNrHLltAsKI8zTBWppEmadHY6mFDaQ

Another thing, I was testing your build last night, just testing, lossless raw recording of different bit depth and resolutions, and I occasionaly got the "raw detect error".
Haven't seen this one in the other builds you send and I've compiled.
Could the "raw detect error" be new and caused by updates or fixes ?


8rnity

  • New to the forum
  • *
  • Posts: 18
Re: Canon 6D
« Reply #690 on: December 02, 2017, 02:33:35 PM »
hi, I'm a 6D owner with ML installed on. I would like to have lossless video raw as I can increase resolution with fast sd.
I would to test a build that works at least at 1824 x 924, is that build crop_rec_4k.2017Nov16.6D116.zip?

I'm here, if I can help.. even if I'm not so able but if you need to test something..
to reach higher resolution (and 3x3 binning?) is a must for me.

thank you all involved in this.

Levas

  • Contributor
  • Hero Member
  • *****
  • Posts: 1486
  • 6d - Nightly build user
Re: Canon 6D
« Reply #691 on: December 02, 2017, 04:29:26 PM »
crop_rec_4k.2017Nov16.6D116.zip is the build with lossless.

1824x924 lossless should work, 1824x1024 lossless doesn’t work.
Somehow some resolutions don’t work on the 6d.
In zoom mode you can go as far as 2688x960.

There is however one thing, you need to use exiftool to get the blacklevels right, see posts in this thread.


And ofcourse there is no audio/sound with MLV_lite.

dfort

  • Developer
  • Hero Member
  • *****
  • Posts: 3741
Re: Canon 6D
« Reply #692 on: December 02, 2017, 06:20:43 PM »
crop_rec_4k.2017Nov16.6D116.zip is the build with lossless.

Ok--good to know. I often delete older builds but I see that one is still on my downloads page.

By the way, Canon just released firmware update 1.1.8. The 1.1.7 updater is still on Canon's website but 1.1.6 is long gone. Now that Pelican's website is down there is a surging demand on the Black Market for the 1.1.6 firmware updater. ML users are paying 10 times the original price for the free update.
5D3.* 7D.206 700D.115 EOSM.203 EOSM2.103 M50.102

Levas

  • Contributor
  • Hero Member
  • *****
  • Posts: 1486
  • 6d - Nightly build user
Re: Canon 6D
« Reply #693 on: December 02, 2017, 06:26:06 PM »
I think I have the 6d 1.1.6 firmware, not at home now, will check later.
In the earlier days it was also available on the official canon website in Canada, not sure if they still have it available over there.

Levas

  • Contributor
  • Hero Member
  • *****
  • Posts: 1486
  • 6d - Nightly build user
Re: Canon 6D
« Reply #694 on: December 02, 2017, 07:52:18 PM »
Still have the official 1.1.6 firmware for Canon 6d:

https://drive.google.com/open?id=1_WpYbRMOm_XrjWJxnns1FMiEN0tzZBWV

Levas

  • Contributor
  • Hero Member
  • *****
  • Posts: 1486
  • 6d - Nightly build user
Re: Canon 6D
« Reply #695 on: December 02, 2017, 07:54:41 PM »
ML users are paying 10 times the original price for the free update.


10 times free is still for free, right  :P

dfort

  • Developer
  • Hero Member
  • *****
  • Posts: 3741
Re: Canon 6D
« Reply #696 on: December 03, 2017, 08:30:29 AM »
10 times free is still for free, right  :P

Right!

You have been doing quite a bit of coding recently. Maybe consider doing a firmware update on the 6D. I'd be happy to help out. All you need is the Portable ROM dumper (bottom of the nightly builds downloads page) and the Porting a Canon firmware update tutorial. It really isn't all that hard and with the 6D running on QEMU much of it can be test without even loading it on the camera. Well, you do have to use the camera to get the initial firmware dump. I learned quite a bit about how ML works by doing firmware updates. Of course there is always a lot more to learn.
5D3.* 7D.206 700D.115 EOSM.203 EOSM2.103 M50.102

Levas

  • Contributor
  • Hero Member
  • *****
  • Posts: 1486
  • 6d - Nightly build user
Re: Canon 6D
« Reply #697 on: December 04, 2017, 10:21:05 AM »
Firmware update could be interesting, but I'd rather spend my time on adding audio recording option to the lossless recording.
I know some started out making MLV_lite recording audio.

I'm not sure what my approach would be, adding sound recording to MLV_lite or adding lossless recording to MLV_rec module.
The info and the code is all there, MLV_snd, MLV_lite and MLV_rec module.
Probably takes a lot of time to read the code, understand the code and combine the code  :P
 
I'm also not sure if firmware updating magic lantern from 1.1.6 to 1.1.8 is worth the time for the 6d.
1.1.7 Seems to fix lens corrections to jpg's made in camera for one lens, EF 70-300mm f/4-5.6 IS II USM
1.1.8 Seems to fix auto exposure in silent live view modus for these tilt and shift lenses: TS-E 50mm f/2.8L MACRO, TS-E 90mm f/2.8L MACRO and TS-E 135mm f/4L MACRO.


8rnity

  • New to the forum
  • *
  • Posts: 18
Re: Canon 6D
« Reply #698 on: December 04, 2017, 10:41:43 AM »
ok, so.. if I need a full hd resolution and 1824 x 1216 works maybe best I can do is upscaling then crop.
but how can it work with 1824 x 1024 (16:9) with 3x3 binning if sensor is 5472 × 3648?
would to understand..

however:
before process images I need to run exiftool on all dngs to re-balance black levels (no hardcode in build here, right?)
for me that I don't need audio I would to help to make a strong build with all res working and black levels ok out of the box.
update firmware doesn't seem top priority to me.
thank you for your work and time.

dfort

  • Developer
  • Hero Member
  • *****
  • Posts: 3741
Re: Canon 6D
« Reply #699 on: December 04, 2017, 10:27:46 PM »
I'm also not sure if firmware updating magic lantern from 1.1.6 to 1.1.8 is worth the time for the 6d.

Only for those who bought a 6D and can't get the right firmware because it isn't on Canon's website and the repository we've come to rely on has gone offline -- like now.

@8rnity - to shoot video using the full size of the sensor these cameras do a 3x3 pixel binning/skipping trick. So:

5472 / 3 = 1824
3648 / 3 = 1216

For 16:9 it just crops top and bottom.

You shouldn't need to re-balance the blacks unless you're playing around with the lossless compression stuff. It should be resolved eventually but for now it is a work in progress.
5D3.* 7D.206 700D.115 EOSM.203 EOSM2.103 M50.102