Crop mood - Danne custom tweaks (EOS M)

Started by Danne, December 17, 2023, 07:54:54 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Danne

DOWNLOADS:
https://bitbucket.org/Dannephoto/magiclantern_hg_02/downloads/

Code:
https://bitbucket.org/Dannephoto/magiclantern_hg_02/src/master/




Is there any reason to have halfshutter button switch to framing when real-time preview is selected now when all presets are realtime? This is causing some overhead while recording. I´d suggest changing in mlv_lite.c:

    if (PREVIEW_AUTO)
    {
        /* half-shutter overrides default choice */
        if (preview_broken) return 1;
        return prefer_framing_preview ^ long_halfshutter_press;
    }
    else if (PREVIEW_CANON)
    {
        return long_halfshutter_press = 0;
    }
    else if (PREVIEW_ML)
    {
        return !long_halfshutter_press;
    }
    else if (PREVIEW_HACKED)
    {
        if (preview_broken) return 1;
        return (RAW_IS_RECORDING || prefer_framing_preview)
            ^ long_halfshutter_press;
    }
   
    return 0;

Also a suggestion if working with auto focus. By not enabling aewb_enableaewb in small_hacks and more hacks auto focus will still work with those hacks on. Maybe possible to detect if cam af is on and unselect:

        /* disable auto exposure and auto white balance */
        //call("aewb_enableaewb", unhack ? 1 : 0);  /* for new cameras */
        call("lv_ae",           unhack ? 1 : 0);  /* for old cameras */
        call("lv_wb",           unhack ? 1 : 0);


and here:

        if (!video_mode_crop && !use_h264_proxy()) /*  Exlude Movie Crop Mode and H.264 Proxy from these hacks  */
        {
            if (!unhack) /* hack */
            {
                WillSuspendAeWbTask = 1; // we are going to suspend AeWb task (check code around shutter_blanking_idle in crop_rec.c)
                wait_lv_frames(1);

                if (small_hacks == 2)
                {
                    lvfaceEnd();
                    //aewbSuspend();
                }

                if (small_hacks == 3 && CartridgeCancel_works) // CartridgeCancel_works: calling CartridgeCancel(); freezes LiveView in some models
                {
                    lvfaceEnd();
                    //aewbSuspend();
                    CartridgeCancel();
                    wait_lv_frames(2); /* In some cases the first frame would be corrupted when calling CartridgeCancel */
                }
            }


Also curious. Is it not possible to get 16:9 in 1:1 crop modes?

Danne

A general black level question. A user noticed black level on eosm(and other digic V cameras I suppose) ends up with 2047. Isn´t it supposed to land at 2048? Correcting this in Mlv App gives a more balanced image.
How to handle this? In raw.c it could be hard coded around here:

    /* black level looks alright, go ahead and use it */
    /* log significant changes to console */
    if (ABS(black_mean - raw_info.black_level) >= 10)
    {
        printf("Black level: %d\n", black_mean);
    }
   
    raw_info.black_level = black_mean;


It seems black level is calculated every time but shouldn´t this be more robust with hardcoded figures?

All digic V cams? 5DIII as well. Below is fixing eosm.
#ifdef CONFIG_EOSM
    {
        raw_info.black_level = 2048;
    }
#else
    {
        raw_info.black_level = black_mean;
    }
#endif


EDIT:
Or maybe simply:
    /* black level looks alright, go ahead and use it */
    /* log significant changes to console */
    if (ABS(black_mean - raw_info.black_level) >= 10)
    {
        printf("Black level: %d\n", black_mean);
    }
   
    raw_info.black_level = black_mean;
   
    //Correct black level for digic V cameras
    if (black_mean == 2047)
    {
        raw_info.black_level = 2048;
    }






EDIT2:
These changes will fix correcting black level but also letting us use auto focus while using small_hacks and more hacks.
https://bitbucket.org/Dannephoto/magiclantern_hg_02/commits/30c34d6d66232a328f578900d7ed768cd4366324



gabriielangel

That's a nice tip!
Fixing black level to 2048 makes a big difference in the shadows at 10-12bits.
At 10 bits, the red tint in the noise is reduced significantly. (This can be tested by pushing the shadow recovery to 100 in MLV App). Thanks!

Danne

Not wanting to crash into bilals thread here so I probably start another post soon if I keep this going.
Firstly. This build of his is a beast. It is stable, it is real time, it is like dream come true. Nevertheless. I miss a few things so would like to adress possible refinements and I will also keep a modified build here:
https://bitbucket.org/Dannephoto/magiclantern_hg_02/downloads/

First off. I really want to be able and use some sort of Focus aid while recording. This was achieved also by Bilal in former builds. Using magic zoom just isn´t working for me. I created some focus aid by using halfshutter. It isn´t perfect but it gets you closer to the subject.


I added fix for black level 2048. BAck to 2047 after some deeper testing.

Some tap display functionality. Tapping display opens up ml menu.

Oh, and auto focus is still ruinning with all hacks on. awsuspend is disabled when af is used but the other hacks are being used.
Happy new year!

Being able to focus while filming is the most important feature here to me :).

manifestor

Quote from: Danne on December 31, 2023, 11:27:04 PM

Being able to focus while filming is the most important feature here to me :).

It is for a lot of folks I guess .. going to check it out later, but wanted to say thank you and a happy new year!!

Danne

Thanks. Yeah, I guess it's about problematic with the small screen  :P.

Let me know if it works and also if my stuff is interfering with general recording times. I just recently started to film with this cam again so not really used to Bilal's build yet.

Danne

@Gabriielangel provided a 10bit testfile which demonstrates the problem with black level 2047 here. Exposure pushed for checking shadows.

2047


2048



EDIT:
After som more tests it seems 2047 is the correct value. Deepest black are not correct with 2048.

Danne

Posted another build. Better Focus aid, closer to subject. Still needs better centering but works pretty well while filming with 1x3 and 1x1 presets.
https://bitbucket.org/Dannephoto/magiclantern_hg_02/commits/752c78080de8505f2943deb9dd9f7d2ca83dfc26

These registries zooms much like x10 zoom while filming.
        EngDrvOutLV(0xc0f11B8C, 0x0);
        EngDrvOutLV(0xc0f11BCC, 0x0);
        EngDrvOutLV(0xc0f11BC8, 0x0);
        EngDrvOutLV(0xc0f11A88, 0x1);



Download:
https://bitbucket.org/Dannephoto/magiclantern_hg_02/downloads/

RhythmicEye

Quote from: Danne on January 01, 2024, 11:28:30 PM
Posted another build. Better Focus aid, closer to subject. Still needs better centering but works pretty well while filming with 1x3 and 1x1 presets.
https://bitbucket.org/Dannephoto/magiclantern_hg_02/commits/752c78080de8505f2943deb9dd9f7d2ca83dfc26

These registries zooms much like x10 zoom while filming.
        EngDrvOutLV(0xc0f11B8C, 0x0);
        EngDrvOutLV(0xc0f11BCC, 0x0);
        EngDrvOutLV(0xc0f11BC8, 0x0);
        EngDrvOutLV(0xc0f11A88, 0x1);



Download:
https://bitbucket.org/Dannephoto/magiclantern_hg_02/downloads/
Firstly a huge thank you once again to Danne and Bilal for all your extraordinary work!

Secondly a very safe, productive and prosperous 2024 to all the ML community.

All the best for the year ahead.
RE

ML700D

what is the different between crop_mood.2023Aug19 and crop_mood.2023May09?

sometimes my camera won't turn on when use crop_mood.2023Aug19 build
EOS 700D

gabriielangel

Quote from: ML700D on January 02, 2024, 08:24:45 AM
what is the different between crop_mood.2023Aug19 and crop_mood.2023May09?

Some answers here: https://www.magiclantern.fm/forum/index.php?topic=26851.msg244733#msg244733

p.s. It would be nice to group all the releases under a single post near the top of the thread. Once the thread becomes as large as Danne's, it will be very tedious to refresh our memories!

ML700D

Quote from: gabriielangel on January 02, 2024, 06:43:05 PM
Some answers here: https://www.magiclantern.fm/forum/index.php?topic=26851.msg244733#msg244733

p.s. It would be nice to group all the releases under a single post near the top of the thread. Once the thread becomes as large as Danne's, it will be very tedious to refresh our memories!

thanks a lot..
EOS 700D

gabriielangel

Quote from: Danne on January 01, 2024, 11:28:30 PM
Posted another build. Better Focus aid, closer to subject. Still needs better centering but works pretty well while filming with 1x3 and 1x1 presets.
https://bitbucket.org/Dannephoto/magiclantern_hg_02/commits/752c78080de8505f2943deb9dd9f7d2ca83dfc26

Download:
https://bitbucket.org/Dannephoto/magiclantern_hg_02/downloads/

I tested magiclantern-crop_mood_Danne.2024Jan01.EOSM202.zip and magiclantern-crop_mood_Danne.2024Dec31.EOSM202.zip

Both builds tested with small hacks set to More, and kill global draw set to On
BrightenLVmethod set to AeWb, because it didn't change AF accuracy when set to EVF.
Resolutions at 2.39:1 ratios and 23.976 fps.

Dec31:
When assigned to half-shutter, Focus Aid works while Idle and While recording;
Focus aid needs (as you already pointed out) better centering as it is too far off center to check if AF was accurate. Even if using MF, the aim difference is significant enough to make a difference at wide apertures;
Got 1 clip out of 10 with a corrupted first frame.

Jan01:
When assigned to half-shutter, Focus Aid doesn't work while Idle (maybe that was intentional). While recording, it is distorted (stretched) at 1:1 crop modes, and showing as expected at 1x3 modes;
Focus aid needs centering;
No corrupted clips.

Both builds:

You need 12 bits minimum for  AF to work correctly. I read that Bilal adressed the issue, but I don't know if the fixes were included in his last posted build, or if it only works when small hacks are off.

2.5K:
AF works very well, rarely misses (even at f1.4) and doesn't affect recording times, even at 14 bits.

2.8K and 1x3 modes:
AF makes the recording status turn orange or red while the half shutter is pressed. If you hold it for too long, recording stops;
ef-m lenses are quick enough (tried ef-m 32 and ef-m 28mm), but I also tried an ef-s 15-85mm and AF lock often took long enough to halt recording;
You need an unobstructed line of sight to get accurate AF. It misses often, especially when several objects are close to one another or if some objects are close to the camera, while the background is far away. Works better at smaller apertures. None of those issues at 2.5K.

One has to be careful not to push the shutter button too far. If done while recording, the camera hangs on a "Busy" message and needs to be restarted (Battery Pull).

The scene needs to be properly exposed for AF to work well. So, resolution / bitrate combos where you need to underexpose should be avoided.

Also happens in Bilal's original build:
When in 2.8k, the aspect ratio in Crop mood always shows 2.35:1 (and always shows 2.33:1 when in 2.5k), regardless of the setting there, or in RAW video menu. One has to check the resolution displayed next to RAW video to make sure.

I also noticed that the Screenshot feature doesn't work anymore.

Danne

Changed 1x1 Focus aid so it looks a little better.
Centering not an easy task. Bilal knows how to wiggle his preview regs, I don´t really know how to combine the full set of regs.

Quote
Also happens in Bilal's original build:
When in 2.8k, the aspect ratio in Crop mood always shows 2.35:1 (and always shows 2.33:1 when in 2.5k), regardless of the setting there, or in RAW video menu. One has to check the resolution displayed next to RAW video to make sure.
Think this is expected. Hardcoded presets.

RhythmicEye

Quote from: gabriielangel on January 04, 2024, 12:45:57 AM

One has to be careful not to push the shutter button too far. If done while recording, the camera hangs on a "Busy" message and needs to be restarted (Battery Pull).

It's a pity this broke in crop_mood... previously it just captured a still. Would be great to be able to take production stills while shooting. Not a deal breaker but it sure was a handy reference tool that saved us having to dig through CDNG files

Danne

Interesting I changed from 64gb card to 128gb and getting more stable recordings. Even magic zoom is working real nice again 😎. Maybe not that bad after all.

eardrumfilms

Would it be easy to set a 1 or 2 pixels horizontal offset for the 1x3 and 3x3 modes? It would able avoiding dead pixels which would help old cameras. Thanks!

mlrocks

Just installed the crop mood ver 20230809 on Rebel SL1 with firmware updated version 1.01. Aamazing work. Two thumbs up.

I can do continuously recording (green) in 5.2k 1x3 mode, ar 2.67, 10 bit, 14 bit lossless, 24p, sd card overclocking 240 mhz, small hack more, global draw off on, sandisk extreme pro 256 gb. I tested at iso 100, 200, 400, 800, 1600. At ISO 800 and 1600, the recording time is about 30 seconds when global draw off is off, continuous when global draw off on. At ISO 100-400, it is truly continuous even when global draw off is off.

Two issues:
1. when stop the recording, there is error message "audio cannot stop recording".
2. when play back, the screen is black, and I have to take battery off and restart the camera, then I can play back the latest clip, but no other function buttons showing up.

Teamsleepkid

Just wondering.. if it's easy simple for someone..any way to make the preview when using dual iso just normal preview? It's very distracting to shoot with the preview having the ulternating lines on iso. Honestly I'd rather have just some sort of preview be it over or under. Obviously we could have the exposure tools reflect the true exposure of that's possible. Just throwing it out there. Not demanding. Thanks for everything dudes!
EOS M

names_are_hard

Quote from: Teamsleepkid on January 07, 2024, 03:16:05 AM
if it's easy simple for someone..any way to make the preview when using dual iso just normal preview?

Likely possible, will not be easy.  The preview is showing the lines, because the sensor is recording the lines.  Fixing this in software is too slow.  Fixing it in hardware is likely to be difficult.

ML700D

Quote from: Teamsleepkid on January 07, 2024, 03:16:05 AM
Just wondering.. if it's easy simple for someone..any way to make the preview when using dual iso just normal preview? It's very distracting to shoot with the preview having the ulternating lines on iso. Honestly I'd rather have just some sort of preview be it over or under. Obviously we could have the exposure tools reflect the true exposure of that's possible. Just throwing it out there. Not demanding. Thanks for everything dudes!

you can use histogram for estimating imo.
EOS 700D

Danne

I did some customization in Crop mood lately which I wanted to share. Tested on eos m. Should work for other supported digic v cameras. These are modifications done for my personal liking. If anyone else likes it, be my guest and use it. New to this build is also being able and use customize buttons in stills mode when shooting CR2 files. Do not turn Crop mood off, simply turn your knob to photo mode and keep movie mode settings on. This way cutom buttons will still apply.

My builds are to be seen as work in progress and in good gpl faith. I really like bilals work here so porting ideas from my older build seems logical to me at least  :P.

Download here:
https://bitbucket.org/Dannephoto/magiclantern_hg_02/downloads/

How to use it. Easy. Install, start to film. All necessary modules are preloaded. Sd overclocking also activated on install. I use my own custom buttons so feel free to change this after installation.


1 - Rearranged some menu items to Movie menu. Custom modes also added



2 - Tap display with your finger and it goes straight to the preset screen



3 - All modules needed preinstalled(not showing) Left is a bunch of other modules. Use more if needed.



4 - Global draw items turned off



5 - My custom buttons



6 - Using high framerates I enable som reduced speed to get stability. Turn this off if you want fastest framerates



7 - Zoom on HalfShutter is turned on. I use it in photo mode with manual lenses






Photo mode
8 - New in this build is being able and use customize buttons in stills mode. For instance moving iso up and down is now also functioning with still CR2 photos. Aperture control increase and decrease with SET and INFO buttons.



9 - Use tap display to go straight to Expo tab when in photo mode


ML700D

hi danne,
can I install your build in 700d?
EOS 700D

Danne


Ernani