Danne's crop_rec_4k experiments for EOS M

Started by Danne, December 03, 2018, 06:10:17 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Danne

New build

Quote from: GrantB on March 02, 2023, 08:49:22 AM
Well it's fortunate that C mount lenses don't have af then ;)
I see your point.  Should I test values between 0x300 and 0x3ff then?
I put back the center values to 2.8k and 3k presets again. AF routines are working when zoomaid is turned to off and we have to live with the temporary hot lines when af and zoomaid is turned on as eosm mostly is about manual focusing. More or less 22mm f2 is the only lens I can use with af effectively. So, should be centered again. Could you check?

gabriielangel

Quote from: Danne on March 02, 2023, 09:18:31 AM
New build
More or less 22mm f2 is the only lens I can use with af effectively.

Keep in mind that most AF missing issues are due to the fact that the camera seems to be using the "Cropped Preview" area as a reference (As opposed to the "Framing Preview" Area).
The cropped preview's center is offset in relation to the Framing preview's center, offset varies depending on the preset being used.

Just to verify (As this is not the preferred way of doing it):
Load 2.8k preset
set focus aid to "sticky push";
Then press *, put your focus target in the center, press half-shutter.
You will hit target 8-9/10 times, depending on the lens being used.

I tested this using the Feb 14 2023 build and prior.

But having the recorded area closer to the center is better, not only for c mount, but also with very wide and fisheye lenses, as it makes it a lot easier to have even distortion on both sides, when filming a building, for example.

GrantB

Quote from: Danne on March 02, 2023, 09:18:31 AM
New build
I put back the center values to 2.8k and 3k presets again. AF routines are working when zoomaid is turned to off and we have to live with the temporary hot lines when af and zoomaid is turned on as eosm mostly is about manual focusing. More or less 22mm f2 is the only lens I can use with af effectively. So, should be centered again. Could you check?
Thank you for the new build.  I have given it a quick test looking at framing preview.  2.8k (and 2.5k) are centered but 3k is off center.

Is the new build changing CMOS 5 to 0x280? That value works for 2.8k but 0x240 works for 3k.  I should have made a new post about that instead of editing my old one.

Danne

240 gotcha. Uploaded a new build but no camera at hand. Could you check 3k preset again?

iaburn

Quote from: Danne on March 02, 2023, 09:56:41 PM
240 gotcha. Uploaded a new build but no camera at hand. Could you check 3k preset again?

Both 2.8K and 3K seem centered to me  :D

GrantB

Quote from: iaburn on March 02, 2023, 10:42:53 PM
Both 2.8K and 3K seem centered to me  :D
Looks good to me too, thanks Danne

Danne

Nice.
Thanks for feedback iaburn and GrantB.

GrantB

Not sure if it is known already.  ML menu > Debug > Free Memory will display but it freezes the camera and battery must be ejected.  Not stopping anyone from filming, but it's there.

gabriielangel

Hello,
There are differences and some mislabeling in the way the preset names are displayed on screen.

For example, load the 2.5k preset by tapping the screen.
You will see "2.5K 1:1" written in green at the bottom of the screen. All is well.

But the following Preset / Ratio combinations are mislabeled:

Load the 2.5k tap preset then set the ratio to 2.35:1, it will say 2k 1:1;
Load the 2.5k tap preset, Set 25 fps to on, set ratio to 2.35:1, it will say 2.k 1:1;

Load the 3k preset from the ML menu, Set 25 fps to on, set ratio to 2.39:1, it will say 2.8k 1:1;
Load the 3k preset from the ML menu, Set 25 fps to on, set ratio to 2.35:1, it will say 2.8k 1:1; Resolution switches to 2800x1190 here.


Load the 4k preset from the ML menu, the preset name (4k) is not displayed. Only the ratios are displayed accordingly (2.35:1, 2.39:1, 16:9). Preset name (4k 1:1) is displayed when ratio is set to off.

5k ana and 5k ana flv:
The nomenclature is different here. you have (anamorph or flv) followed by the current ratio (2.35:1, 2.39:1, 16:9).
So it displays, for example, flv 2.39:1, flv 2.35:1, anamorph 2.35:1, etc.

The behaviour is consistent except for the following:

"5k anamporphic flv" tap preset, ratio OFF, displays as "flv";

"5k anamorphic" tap preset, ratio OFF, displays as "anamorph flv".

Concerning the display space available, "anamorph 2.35:1" displays correctly, and it is the longest description.

So "2.8k 1:1 2.35:1", or "2.8k 1:1-2.35:1" would be possible, if you want to keep it consistent across all presets.

Tested with the latest build, 2023 mar 02.


Danne

Learn how to compile and "fix" any issues directly by searching in crop_rec.c.

gabriielangel

Quote from: Danne on March 07, 2023, 09:45:06 PM
Learn how to compile and "fix" any issues directly by searching in crop_rec.c.
Like I said earlier, I already have a hobby, I don't need another one. So I guess that won't happen.

Danne

Not likely. What you could do is open up crop_rec.c, apply changes and then I could compile it and have a look at the suggestions.

gabriielangel

This is relatively easy. So I would need to know 1 thing:
In order for all the presets to be the same, you'd have to add about 16 lines per preset (about 4 per ratio);
or just remove the extra lines where those are.

Example: This is from lines 7639 to 7798 inclusive



/* EOSM */
    if (CROP_PRESET_MENU == CROP_PRESET_anamorphic_rewired_EOSM)
    {
        if (ratios == 0x1)
        {
            snprintf(buffer, sizeof(buffer), "anamorph 2.39:1");
        }
        if (ratios == 0x2)
        {
            snprintf(buffer, sizeof(buffer), "anamorph 2.35:1");
        }
        if (ratios == 0x3)
        {
            snprintf(buffer, sizeof(buffer), "anamorph 16:9");
        }
        if (ratios == 0x0 || presets == 0x9)
        {
            snprintf(buffer, sizeof(buffer), "anamorph");
        }
    }

    /* EOSM */
    if (CROP_PRESET_MENU == CROP_PRESET_anamorphic_rewired_flv_EOSM)
    {
        if (ratios == 0x1)
        {
            snprintf(buffer, sizeof(buffer), "flv 2.39:1");
        }
        if (ratios == 0x2)
        {
            snprintf(buffer, sizeof(buffer), "flv 2.35:1");
        }
        if (ratios == 0x3)
        {
            snprintf(buffer, sizeof(buffer), "flv 16:9");
        }
        if (ratios == 0x0 || presets == 0x9)
        {
            snprintf(buffer, sizeof(buffer), "flv");
        }
    }

    if (CROP_PRESET_MENU == CROP_PRESET_Anamorphic_EOSM_frtp)
    {
        snprintf(buffer, sizeof(buffer), "Anamorphic frtp");
    }

    if (CROP_PRESET_MENU == CROP_PRESET_2K_EOSM)
    {
        snprintf(buffer, sizeof(buffer), "2.5k 1:1");
        if (ratios == 0x2)
        {
            snprintf(buffer, sizeof(buffer), "2.5k 1:1");
        }
    }

    if (CROP_PRESET_MENU == CROP_PRESET_CENTER_Z_EOSM || CROP_PRESET_MENU == CROP_PRESET_CENTER_Z_EOSM_frtp || CROP_PRESET_MENU == CROP_PRESET_CENTER_Z_EOSM_hdmi)
    {
        snprintf(buffer, sizeof(buffer), "2.5k centered");
    }

    if (CROP_PRESET_MENU == CROP_PRESET_CENTER_Z_EOSM_1920x1280_frtp)
    {
        snprintf(buffer, sizeof(buffer), "2k 1:1");
    }

    if (CROP_PRESET_MENU == CROP_PRESET_3K_EOSM)
    {
        snprintf(buffer, sizeof(buffer), "3k 1:1");
        if (ratios == 0x2 && set_25fps) snprintf(buffer, sizeof(buffer), "2.8k 1:1");
    }

    if (CROP_PRESET_MENU == CROP_PRESET_28K_EOSM)
    {
        snprintf(buffer, sizeof(buffer), "2.8k 1:1");
    }

    if (CROP_PRESET_MENU == CROP_PRESET_4K_EOSM)
    {
        snprintf(buffer, sizeof(buffer), "4k 1:1");
        if (set_25fps) snprintf(buffer, sizeof(buffer), "5k 1:1");
        if (ratios == 0x1) snprintf(buffer, sizeof(buffer), "2.39:1");
        if (ratios == 0x2) snprintf(buffer, sizeof(buffer), "2.35:1");
        if (ratios == 0x3) snprintf(buffer, sizeof(buffer), "16:9");
    }

    if (CROP_PRESET_MENU == CROP_PRESET_4K_3x1_EOSM)
    {
        snprintf(buffer, sizeof(buffer), "4K 3x1 24fps");
    }

    if (CROP_PRESET_MENU == CROP_PRESET_5K_3x1_EOSM)
    {
        snprintf(buffer, sizeof(buffer), "5K 3x1 24fps");
    }

    if (CROP_PRESET_MENU == CROP_PRESET_4K_3x1_100D)
    {
        snprintf(buffer, sizeof(buffer), "4K 3x1 24fps");
    }

    if (CROP_PRESET_MENU == CROP_PRESET_5K_3x1_100D)
    {
        snprintf(buffer, sizeof(buffer), "5K 3x1 24fps");
    }

    if (CROP_PRESET_MENU == CROP_PRESET_4K_5x1_EOSM)
    {
        snprintf(buffer, sizeof(buffer), "4K 5x1 24fps");
    }

    if (CROP_PRESET_MENU == CROP_PRESET_3x3_mv1080_EOSM)
    {
        snprintf(buffer, sizeof(buffer), "HD 1080p");
        if (x3crop == 0x1)
        {
            snprintf(buffer, sizeof(buffer), "HD 1080p 1:1");
        }
    }

    if (CROP_PRESET_MENU == CROP_PRESET_mcm_mv1080_EOSM)
    {
        snprintf(buffer, sizeof(buffer), "HD 1080p");
    }

    if (CROP_PRESET_MENU == CROP_PRESET_3x3_mv1080_48fps_EOSM)
    {
        if (ratios == 0x0) snprintf(buffer, sizeof(buffer), "HD 1080p 30fps");
        if (ratios == 0x1 || ratios == 0x2) snprintf(buffer, sizeof(buffer), "HD 1080p 48fps");
        if (ratios == 0x3) snprintf(buffer, sizeof(buffer), "HD 1080p 40fps");
        if ((ratios == 0x1 || ratios == 0x2) && set_25fps == 0x1) snprintf(buffer, sizeof(buffer), "HD 1080p 46fps");
    }

    if (CROP_PRESET_MENU == CROP_PRESET_3x1_mv720_50fps_EOSM)
    {
        snprintf(buffer, sizeof(buffer), "mv720p_50fps");
    }

    if (CROP_PRESET_MENU == CROP_PRESET_3x3_1X_EOSM)
    {
        snprintf(buffer, sizeof(buffer), "3x3 720p");
    }

    if (!raw_lv_is_enabled() && is_movie_mode())
    {
        snprintf(buffer, sizeof(buffer), "H264 MOV");
    }

    if (is_EOSM)
    {
        item->color_fg = COLOR_GREEN1;
    }

    /* a bit buggy but better when changing back from photo mode into movie mode */
    if (photoreturn && is_movie_mode() && (CROP_PRESET_MENU == CROP_PRESET_anamorphic_rewired_EOSM || CROP_PRESET_MENU == CROP_PRESET_anamorphic_rewired_flv_EOSM || CROP_PRESET_MENU == CROP_PRESET_mcm_mv1080_EOSM))
    {
        menu_set_str_value_from_script("Movie", "raw video", "ON", 1);
        photoreturn = 0;
    }
}



I corrected the typos on lines 7656,
7691 (May now not be necessary)
 
if (ratios == 0x2)
        {
            snprintf(buffer, sizeof(buffer), "2.5k 1:1");
        }


and 7708, but for the others, you have to decide if you want to make all the presets behave like 4k 1:1 (add ratio lines), or like 2.8k (remove ratio lines).

on line 7654 it may need to be presets == 0x8

That I can do easily as it wont affect anything else. Just tell me if adding a bunch of lines affects performance / your labeling preference.

Suggestion:
4k 1:1 or 4k Crop   (Same regardless of ratio selected)
or
4k Crop 2.39:1  (1 label per ratio, Crop may be easier on the eyes for some, as opposed to 4k 1:1 2.39:1)
(which means you would have Crop, ana, flv, ana frtp)

Danne

When you have something done you can share the full code and I can compile and give it back for you to look at. When I get a chance I'll do the same :).

gabriielangel

Here is the file (Please rename to crop_rec.c, I renamed to make it obvious): http://bit.ly/3F3n4s0

Changes start at line 7639
I added a few comments inside, so it will be self explanatory.
I did not touch 1080P and hf, since having the frame rate info is useful.
Too many letters make the focus distance disappear from screen, so I made the titles short.


Danne

Here´s a binary:
https://bitbucket.org/Dannephoto/magic-lantern_jip_hop_git/downloads/crop_rec.mo

Think you´re skilled enough to create a compiling environment but this works too for now. I´ll have a look when I can.
Thanks

gabriielangel

Nice, thanks!

It works as expected.

I overlooked two things though:

2.8k 16:9 records at 2800x1190 (2.35:1), this is the maximum resolution to get long recordings at 12 bits.
So maybe it should display 2.35:1 instead of 16:9? (or just 2.8k?)

2.5k Centered 1:1 16:9 records 1920x1080. I assume this has to do with hdmi display.
Maybe this one should display 2k 16:9 when loaded?

I know this is not a big deal, but it avoids having to go back into the ML menu to make sure. So it was worth doing. Thanks again.




Danne

Do your corrections as you like them. Sure they'll be fine.

gabriielangel

Here is the crop_rec.c with what I missed last time: http://bit.ly/3YAy2MC

Danne


cedricp

Hi there,
Is there anybody here who found a way to use focus peaking with dual iso active when recording ? I use fast lenses (1.4, 1.2) and it's really hard to focus correctly without it. I love that dual iso thing, and I understand there are limitations, just wondering if something could solve it.
Cheers

ML700D

EOS 700D

DeEYE

Re: 1080p mode an external Monitor Preview

Hi there, First Thanks for all the awesome builds and work over the months/years! Im still toying with them and they are great. Noticed some time ago that the Video\ Preview on External monitor stopped working in 1080p mode on later Builds...

I was wondring why and if I were to copy over something from a previous build where it worked...would it? LOL Probably not, but just curious. Im stumped why it Does NOT work anymore. Perhaps its just in my config.
BUt Its awesome to get the following Modes working with the latest BUILD (3/2/23) on External Montior
5kfrtp 12bit 2:39
2k 1:1 FRTP 12bit 2:35:1 and also at 14bit 2:39
2.5k rtp (although its 5xcrop in preview its still great) 12bit 2:39 (no Sound)

I guess Im just confused why 1080p, a technically  LQ mode would not work on a monitor? Personally I like 1080p for the lack of crop factor on my lenses. and happy with Quality of Raw 12 bit over standard X264 compression.

Thanks!

cedricp

I've done some dual iso test footages last weekend, and I noticed some frames are slightly flickering, link to a trunkated MLV : https://drive.google.com/file/d/1aQcLp2_wlmjrBse15pRtoWiISgTF8l-z/view?usp=share_link

You can see the difference on frame 26, it's not obvious, but strange when played back.
Edit: it's easier to check the histogram to find frames.

I read that a varying black level could lead to that behaviour, so I enabled logs in dual_iso.c and got this :
Edit: Checked black/white levels, all is OK

frame x :

ISO pattern     : dBBd RGGB
White levels    : 11795 16383
Noise levels    : 8.00 8.00 8.00 8.00 (14-bit)
ISO difference  : 3.18 EV (905)
Black delta     : 23.36
Dynamic range   : 10.25 (+) 10.81 => 13.99 EV (in theory)
Edge-directed interpolation...
Semi-overexposed: 4.45%
Deep shadows    : 12.12%
Full-res reconstruction...
ISO overlap     : 4.1 EV (approx)
Half-res blending...
Building alias map...
Filtering alias map...
Smoothing alias map...
Final blending...
Noise level     : 8.00 (20-bit), ideally 8.00
Dynamic range   : 16.25 EV (cooked)

frame x+1:

ISO pattern     : dBBd RGGB
White levels    : 11730 16383
Noise levels    : 8.00 8.00 8.00 8.00 (14-bit)
ISO difference  : 3.11 EV (865)
Black delta     : 11.70
Dynamic range   : 10.24 (+) 10.81 => 13.92 EV (in theory)
Edge-directed interpolation...
Semi-overexposed: 4.47%
Deep shadows    : 9.68%
Full-res reconstruction...
ISO overlap     : 4.1 EV (approx)
Half-res blending...
Building alias map...
Filtering alias map...
Smoothing alias map...
Final blending...
Noise level     : 8.00 (20-bit), ideally 8.00
Dynamic range   : 16.24 EV (cooked)

It seems that calculated values are slightly different from frame to frame..

Danne

What preset was used?
I exported with iaburns mlv app version. A version which fixes several problems. I couldn´t see any problems with the output.
Check this file:
https://bitbucket.org/Dannephoto/mlv_app_compiler-git/downloads/deml.mov