Canon 6D

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

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

dfort

From those compile messages it looks like you are missing the SRM_BUFFER_SIZE in consts.h.

Audionut

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

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

@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

Quote from: Levas on November 16, 2017, 11:05:11 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
    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:

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


Levas

Quote from: dfort on November 16, 2017, 11:54:50 PM

    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

Quote from: dfort on November 16, 2017, 11:54:50 PM
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

@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
Quote from: a1ex on October 23, 2017, 10:58:02 PM
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
/* 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

Just a shot in the dark -- maybe the problem is with raw_info.jpeg.height?

    /* 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.

Levas

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

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.

Audionut

Quote from: dfort on November 17, 2017, 10:03:36 PM
Have you ever been able to get a Full Resolution Silent Picture on the 6D?

Yes here.  Just not lossless.

dfort

Right, sorry--that's what I meant. Everything seems to work as usual but it isn't saved on the card, right?

Audionut

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

@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

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

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

Quote from: Levas on December 02, 2017, 04:29:26 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.

Levas

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


Levas

Quote from: dfort on December 02, 2017, 06:20:43 PM
ML users are paying 10 times the original price for the free update.


10 times free is still for free, right  :P

dfort

Quote from: Levas on December 02, 2017, 07:54:41 PM
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.

Levas

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

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

Quote from: Levas on December 04, 2017, 10:21:05 AM
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.