3K/UHD 5D2 Raw development and Other Digic IV Cams

Started by reddeercity, April 06, 2017, 12:22:27 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

okayokay

Hey, I just began trying Magic Lantern on my 5D II, I am using the 3K build to record at 2.39:1 at 10 bit, 1856x776, but I got a few problems

One, when recording, I don't have crop marks so I have to guess the framing, how can I enable it?

Also, I cant enable mlv_play in modules at the same time as mlv_rec and mlv snd or I get an

ttc: error: undefined symbol 'lossless_decompress_raw' [e] failed to link modules

That gets annoying, since I can't preview my RAW videos, which BTW, I find having some extreme noise all over the images in some cases, even in lit scenes, the shadows are full of that annoying noise, but I guess it is what it is, can't complain

Also, I am looking to buy a cheap monitor so I can nail focus easier, I have heard you can force HD signal off the 5DII, anyone has tried playing back a clip with a monitor attached and had no problems?



Thanks

2blackbar

Hey Dave was there any progress in lossless for 5D2 ?

masc

@okayokay: this build is bleeding edge and work in progress. If it is anoying for you, I recommend to implement the features you need yourself, or you wait until it is "ready" or you use another build.
5D3.113 | EOSM.202

Wlad81

Quote from: 2blackbar on June 13, 2020, 09:06:27 PM
Hey Dave was there any progress in lossless for 5D2 ?
The same question is about 50D. Needed a lot in September for work.
Canon EOS 5D Mk III + Canon 24-105 F/4 L IS USM + SanDisk Exreme Pro 64 GB (SD, ML Nightly.2021Feb07.5D3113) + SanDisk Extreme Pro 128 GB (CF).

okayokay

Quote from: masc on June 13, 2020, 09:57:27 PM
@okayokay: this build is bleeding edge and work in progress. If it is anoying for you, I recommend to implement the features you need yourself, or you wait until it is "ready" or you use another build.

Somehow the nightly build for the 5D2 doesn't offer an option for 10bit raw video. That selection is the only reason I am using this build, do you know of any other I could use? Thanks

Walter Schulz

Top of page -> Downloads -> Downloads (drop down menu) -> Experiments -> 10/12-bit RAW video

okayokay

Quote from: Walter Schulz on June 17, 2020, 09:15:27 PM
Top of page -> Downloads -> Downloads (drop down menu) -> Experiments -> 10/12-bit RAW video

Thanks! Also, I have noticed the cropmarks in the Overlay menu dont appear once I am recording, is there any way to get some marks for reference when recording 2:39, since I can use them before recording but once I start it just goes to full view. Also, is there any kind of timer or timecode available so I know for how long I've been recording? I see that appears sometimes, for example when I enabled HDR video just to test it, but after disabling everything but mlv_rec, play and snd it wont appear anymore

Thanks

Walter Schulz

Movie tab -> RAW video (MLV) -> [Q] -> Global Draw Allow

reddeercity

Yes but you reduce the record time & there will not be continuous recording in the higher res e.g. 1856x1044 , 1856x928 .
Best option is to use HDMI (forced to 480p) out to a cheap evf/monitor with crop marks (but i never use them) , this will give continuous recording in the higher res .

okayokay

Quote from: Walter Schulz on June 17, 2020, 10:39:57 PM
Movie tab -> RAW video (MLV) -> [Q] -> Global Draw Allow

Thank you! I appreciate your help! I have been noticing I lose my modules tab when I format the CF card from the camera, so I just cut the videos off it for now without formatting, even though I am sure keep ML is selected

Quote from: reddeercity on June 18, 2020, 02:01:03 AM
Yes but you reduce the record time & there will not be continuous recording in the higher res e.g. 1856x1044 , 1856x928 .
Best option is to use HDMI (forced to 480p) out to a cheap evf/monitor with crop marks (but i never use them) , this will give continuous recording in the higher res .

I've been thinking about getting a monitor, I hear you could force 720p out though, don't know if that is true. I'm going to try in 1856x776, I always record that way (2.39:1) for now.

Walter Schulz

Quote from: okayokay on June 18, 2020, 12:46:43 PM


I have been noticing I lose my modules tab when I format the CF card from the camera

Module tab should only disappear after abnormal shutdown. Debug -> Modules debug -> Load modules after crash OFF (default). 5D2 is among the cams able to harm cam and card if mishandled!


Milk and Coffee

Quote from: Walter Schulz on June 18, 2020, 01:02:14 PM
Module tab should only disappear after abnormal shutdown. Debug -> Modules debug -> Load modules after crash OFF (default). 5D2 is among the cams able to harm cam and card if mishandled!

Walter, can you suggest good practices for us 5D2 users, to keep from harming our cameras?
Canon 5D Mark II, Mac/OSX


reddeercity

No , this a bug in this branch that I have not address yet , know fact when formatting cf card on this branch.
FYI , I never re-format my CF Card ever , no need for that in my opinion I just move the mlv file off the CF Card
when needed and besides that ever time you re-format a flash drive (includes CF & SD Card) you take a more life out
of the card & get premature failure . I'm still using my original CF cards from 2013 (Lexar 1000x 64 & 32GB) with raw video
plus all the development was done on these cards , so they have been heavily abused for hours at a time until they are hot to the touch  :o

The procedure I use to shut down the camera to get the CF Card out is
1st: turn the power switch off
2nd: wait for the red led flash & the blue led light flash on the Lv button
3rd: open the CF Card door , wait for the red led light flash (1-2 second at most)
4th: remove CF card .

Now if you have a Lockup/frozen Liveview or non-responsive camera  etc. .... open the battery door wait for the red led light flash then drop/remove the battery out .
Then reinstall the battery (if the camera is not too hot , if so let it cool down) and start up the camera normally .
You may get a error message on the LCD screen at time of bootup saying
"Improper shutdown , modules will not load"
Just power off the camera with power switch wait until the red led flashes then just re-boot the camera .
It will startup with all the modules you had loaded before the Improper shutdown .
Don't worry , it a safety net in case there is a problem with the module to protect the camera ,
I run in to this all the time when I'm experimenting with crop_rec presets when I push the camera too far .   

reddeercity

Updated mlv_rec module (mlv_rec.mo) for max (canon default) resolution in 3x3 & 5x Zoom on the 5D2
Now you can get in 3x3 (FHD) 1880x1248 (old res 1856x1248) and 3xcrop_mode (5xZoom) 2152x1074 (old res 2144X1074)

Download Link
1880_3x3-2152_5xZoom-5d2_7-5-2020-5.59pm-mlv_rec.zip

It will load on top of my eXperimental Crop_Rec builds , did not test it with the nightly builds



Frame exported from MLV App. 3x3_1880x1248_mlv_rec-M05-1821_frame_1.png
3x Crop_mode Frame exorped from MLV App. 3xcrop_2152x1074_mlv_rec-M05-1823_frame_1.png




So a side effect of this is in crop_rec 3k preset (3008x1080) now becomes 3016x1080 , so you gain 8 more pixel
In 3x3 you gain 24 more pixels (1856->1880) & in 3xcrop_mode(5xZoom) there a gain of 8 pixels (2144->2152)





Milk and Coffee

@Reddeercity, thanks so much! I'll get to testing straight away!
Canon 5D Mark II, Mac/OSX

reddeercity

If anyone is curious on what i change to the code (thanks @Levas for reminded me about the code in mlv_lite.c)  ;D
static void update_resolution_params()
{
    /* max res X */
    /* make sure we don't get dead pixels from rounding */
    int32_t left_margin = (raw_info.active_area.x1 + 7) & ~7;
    int32_t right_margin = (raw_info.active_area.x2 + 0) & ~7;
    int32_t max = (right_margin - left_margin);

    /* horizontal resolution *MUST* be mod 32 in order to use the fastest EDMAC flags (16 byte transfer) */
    //max &= ~31;
   
    max_res_x = max;

    /* max res Y */
    max_res_y = raw_info.jpeg.height & ~1;


I changed 3 things so it could work with mlv_rec.c

Change these 2 lines in mlv_rec.c

int32_t left_margin = (raw_info.active_area.x1 + 7) / 8 * 8;
int32_t right_margin = (raw_info.active_area.x2) / 8 * 8;

To this from mlv_lite.c

int32_t left_margin = (raw_info.active_area.x1 + 7) & ~7;
int32_t right_margin = (raw_info.active_area.x2 + 0) & ~7;


Also commended out this line

/* horizontal resolution *MUST* be mod 32 in order to use the fastest EDMAC flags (16 byte transfer) */
    //max &= ~31;


From this in mlv_rec.c

/* horizontal resolution *MUST* be mod 32 in order to use the fastest EDMAC flags (16 byte transfer) */
    max &= ~31;

The last one , as you can see really tell the story about the horizontal resolution

Edit: if there any broken download links be sure let me know , as I'm still using bitbucket fot my unloads  :)

reddeercity


CITY-U1001

@reddeercity you have any news about 50d in crop ?
50D | EFS 18-55 | last build crop_rec-3744x1080_24fps_50D-eXperimental.4.57pm.2020May06.50D109.zip

yourboylloyd

Quote from: reddeercity on July 06, 2020, 03:05:43 AM
Now you can get in 3x3 (FHD) 1880x1248 (old res 1856x1248) and 3xcrop_mode (5xZoom) 2152x1074 (old res 2144X1074)

Download Link
1880_3x3-2152_5xZoom-5d2_7-5-2020-5.59pm-mlv_rec.zip


You are a god. Thank you!
Join the ML discord! https://discord.gg/H7h6rfq

reddeercity

Quote from: CITY-U1001 on July 07, 2020, 10:56:49 AM
@reddeercity you have any news about 50d in crop ?
It's tough nut to crack , the cmos & atdg hooks are not work correctly , cmos = pinning of columns(3x3 or 1x1) + horizontal & vertical offset
adtg = 1x3 pixel binding , full sensor readout + many other feature that need the adtg hooks to work . So it still a work in process .

Brighter side of thing the new mlv_rec.mo I updated works on the 50D also ,
This give a increase in resolution in 3x3 & 1x1 (5xZoom)
1568x1056 -> 1584x1056 in 3x3 & 3xcrop_mode(5xZoom) 1984x1078 -> 2000x1078

in 3x3 you gain 16 more pixels & in 5xZoom you gain 16 pixels also

 

Download link
1880_3x3-2152_5xZoom-5d2+50d-support__7-5-2020-5.59pm-mlv_rec.zip

reddeercity

Update 5D2 Crop_Rec.mo
5D2_7-9-2020_11.31pm_crop_rec.zip

I updated the 5d2 crop_rec module , it will switch to centered 3x_mode(5xZoom) a lot faster then before , Almost instant you push enable
crop_rec 3.5k centered loads very fast , this is first part of the 3x crop_mode check so i can add more 3x crop_mode preset's .
It will load on top of the my eXperimental builds , with the updated mlv_rec.mo , 48pFHD preset now is 1880x774 @48fps  :D instead of 1856x774 .
All the rest of the preset resolution's still the same .
I'm closer to getting more  5xzoom preset's working in the same build , I can get either centered preset to load or the 3K preset to load not both
One will always far back to 3x3  >:(

Here the changes i made the the 3x crop_mode check that work right now with the posted crop_rec module  , I back out my multiply 3xcrop_mode check ,
see below for the back out changes

  /* cmos_vidmode_ok doesn't help;
     * we can identify the current video mode from 0xC0F06804 */
    for (uint32_t * buf = (uint32_t *) regs[0]; *buf != 0xFFFFFFFF; buf += 2)
    {
        uint32_t reg = *buf;
        uint32_t old = *(buf+1);
        //if (!is_5D2 &&(reg == 0xC0F06804))
        if (reg == 0xC0F06804)
        if (crop_preset == !CROP_PRESET_CENTER_Z)
    {
        engio_vidmode_ok =  (old == 0x46A04BA);                        /* x5 zoom */
    }
    else if (crop_preset == CROP_PRESET_CENTER_Z)
    {
         engio_vidmode_ok =  (old == 0x4F40432);                       /* 1080p */
   }
    else // If the two previous conditions are wrong the last one is necessary true
    {
        engio_vidmode_ok =  (old == 0x46F066A);               /* 3xcrop_mode*/
    }         
       // {
          //  engio_vidmode_ok = (crop_preset == CROP_PRESET_CENTER_Z || crop_preset == CROP_PRESET_4K_HFPS)
           //     ? (old == 0x56601EB)                        /* x5 zoom */
           //     : (old == 0x528011B || old == 0x2B6011B);   /* 1080p or 720p */
       // }
        else
        {
          if (reg == 0xC0F06014)      // waza57 for 5D2 without this reg check,  0xC0F06084 is not seen 
            {                 
               if (crop_preset == CROP_PRESET_CENTER_Z)
                {
                  if ((old == 0x4ff) || (old == 0x4d5 ))
                    {
                      engio_vidmode_ok = 1;
                    }
                 //if (crop_preset == CROP_PRESET_4K_HFPS)
                 //{
                  //if ((old == 0x4ff) || (old == 0x712 ))
                    //{
                     // engio_vidmode_ok = 1;
                   // }
                  else
                    {
                      engio_vidmode_ok = 0;
                    }
                 }   
               if (crop_preset == !CROP_PRESET_CENTER_Z)
                {
                   if (old == 0x577)
                    {
                      engio_vidmode_ok = 1;
                    }
                    //if (crop_preset == CROP_PRESET_4K_HFPS)
                // {
                  //if  (old == 0x577)
                   // {
                     // engio_vidmode_ok = 1;
                   // }
                 else
                    {
                     engio_vidmode_ok = 0;
                    }
                } 
            }           
        } 
    }
    if (!is_supported_mode() || !engio_vidmode_ok)
    {
        /* don't patch other video modes */
        return;
    }


This what i'm can't get to work right
if (crop_preset == CROP_PRESET_3K && !CROP_PRESET_CENTER_Z)
    {
        engio_vidmode_ok =  (old == 0x46A04BA)                        /* x5 zoom */
    }
    else if (crop_preset == CROP_PRESET_3K && CROP_PRESET_CENTER_Z)
    {
         engio_vidmode_ok =  (old == 0x4F40432);                       /* 1080p */
    }
    else  // If the two previous conditions are wrong the last one is necessary true
    {
         engio_vidmode_ok =  (old == 0xnew_value);               /* 3xcrop_mode*/
    }


"engio_vidmode_ok =  (old == 0xnew_value);               /* 3xcrop_mode*/"
This part i just in put the 3k raw number 0x46F066A
code doesn't like "0xnew_value" , i think i need to made a new function for  "0xnew_value", not sure yet


I'll also undated the 50D Crop_Rec module with the faster 3xcrop_mode check in a few days .

Test the crop_rec.mo before i upload it in a full build .
48p fhd can be a little tough to get into , start of in 3xcrop_mode then enable 48p fhd
:)

reddeercity

Success !!
I finally have more then one 3x crop_rec (5xZoom) preset load without falling back to 3x3  :D
Here the new Crop_Rec Module download link  5D2-4k3x1-3k1x1-2.8k1x1-48pfhd3x3_7-10-2020_8.42pm_crop_rec.zip




I was so very close before , but i keep over looking the begin of the code for the 3xcrop check function and assumed that it was correct , it wasn't for the 5D2.
That been the story all along , close but not close enough .

Here the code for 5d2 3x crop_mode check , Thanks to @alexboum  for the help with this! This is a Big Thing for d4 cam.
/* cmos_vidmode_ok doesn't help;
     * we can identify the current video mode from 0xC0F06804 */
    for (uint32_t * buf = (uint32_t *) regs[0]; *buf != 0xFFFFFFFF; buf += 2)
    {
        uint32_t reg = *buf;
        uint32_t old = *(buf+1);
        //if (!is_5D2 &&(reg == 0xC0F06804))
        if (!is_5D2 &&(reg == 0xC0F06084))
        if (crop_preset == !CROP_PRESET_CENTER_Z)
    {
        engio_vidmode_ok =  (old == 0x46A04BA);                        /* x5 zoom */
    }
    else if (crop_preset == CROP_PRESET_CENTER_Z)
    {
         engio_vidmode_ok =  (old == 0x4F40432);                       /* 1080p */
   }
    else // If the two previous conditions are wrong the last one is necessary true
    {
        engio_vidmode_ok =  (old == 0x46F066A);               /* 3xcrop_mode*/
    }         
       // {
          //  engio_vidmode_ok = (crop_preset == CROP_PRESET_CENTER_Z || crop_preset == CROP_PRESET_4K_HFPS)
           //     ? (old == 0x56601EB)                        /* x5 zoom */
           //     : (old == 0x528011B || old == 0x2B6011B);   /* 1080p or 720p */
       // }
        else
        {
          if (reg == 0xC0F06014)      // waza57 for 5D2 without this reg check,  0xC0F06084 is not seen 
            {                 
               if (crop_preset == CROP_PRESET_CENTER_Z)
                {
                  if ((old == 0x4ff) || (old == 0x4d5 ))
                    {
                      engio_vidmode_ok = 1;
                    }
                  else
                    {
                      engio_vidmode_ok = 0;
                    }
                 }   
               if (crop_preset == !CROP_PRESET_CENTER_Z)
                {
                   if (old == 0x577)
                    {
                      engio_vidmode_ok = 1;
                    }                   
                 else
                    {
                     engio_vidmode_ok = 0;
                    }
                } 
            }           
        } 
    }
    if (!is_supported_mode() || !engio_vidmode_ok)
    {
        /* don't patch other video modes */
        return;
    }

So from yesterday this what i changed 
I commend out this line
//if (!is_5D2 &&(reg == 0xC0F06804))
and replace it with this and clean up the code a little .
if (!is_5D2 &&(reg == 0xC0F06084))

Usage:
Start out in 3x3 , enable the 3.5k Centered (2784x1160) , press 5xZoom button to fresh to just in to 2784x1160 .
Then after that you can go to 3k 1:1 (3016x1080) ,  fresh liveview , screen will black press the play button 1-2 times
then fresh liveview with the 5xZoom button ( you may have to cycle though with the zoom button at least twice )
then the 3k preset will come up .
next you can go to the 4k 3x1 from 3k , just enable it and refresh liveview .
Now 48p FHD  , you need to start off in default 3xcrop_mode , then enable the 48p preset , it will load from there .
There may be different ways to enable all 4 presets , but i found this seems to work the best .

Recap: 3k may a little hard to enable , just clyce thought the zoom button , Later I'll post a video on how to
fully enable the presets trouble free .  :D   

Edit: I deleted the previous crop_rec from yesterday .   

Igor_Braun

Quote from: reddeercity on July 11, 2020, 05:46:52 AMI'll post a video on how to
fully enable the presets trouble free .  :D   
sounds very good :)

Wow, I will be trying out this today

Bender@arsch

Very nice!
Is it now possible with 5.6K Build too?