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 2 Guests are viewing this topic.

Danne

I don´t use 4:3, I did not experiment with max resolutions with this ratio.

2blackbar

I skipped 0 from bottom in 4:3 but it gained only 20 pixels, where i can extend vertical resolution of anamorphic mode ?

   [CROP_PRESET_anamorphic_rewired_EOSM]  = { 1290, 1290, 1290,  960,  800 },
    [CROP_PRESET_anamorphic_EOSM]  = { 1290, 1290, 1290,  960,  800 },

This ?

Danne

In this function register 0xC0F06804 alters resolution. Will probably break pixel maps. You can find height and width in the sub menu too. And you need to match 0xC0F0713c when modifying 6804:
static inline uint32_t reg_override_anamorphic_rewired_eosm(uint32_t reg, uint32_t old_val)
{
   
    /* gets rid of the black border to the right. Connected to mlv_lite which takes over these regs while recording  */
    if (!RECORDING)
    {
        EngDrvOutLV(0xc0f383d4, 0x4f0010 + reg_83d4);
        EngDrvOutLV(0xc0f383dc, 0x42401c6 + reg_83dc);
    }
   
    if ((ratios == 0x1 || ratios == 0x2) && presets != 0x8)
    {
        switch (reg)
        {
                /* 2.39:1 or 2.35:1 */
            case 0xC0F06804:
                return 0x78101e4 + reg_6804_width + (reg_6804_height << 16);
            case 0xC0F0713c:
                return 0x781 + reg_713c;
               
                // case 0xC0F06824: return OUTPUT_12BIT ? 0x5d4 + reg_6824: 0x69d + reg_6824;
                // case 0xC0F06828: return OUTPUT_12BIT ? 0x5d4 + reg_6824: 0x69d + reg_6824;
                // case 0xC0F0682C: return OUTPUT_12BIT ? 0x5d4 + reg_6824: 0x69d + reg_6824;
                // case 0xC0F06830: return OUTPUT_12BIT ? 0x5d4 + reg_6824: 0x69d + reg_6824;
               
            case 0xC0F06014: return set_25fps == 0x1 ? 0x89f + reg_6014: 0x89f + reg_6014;
            case 0xC0F0600c: return set_25fps == 0x1 ? 0x25b025b - 24 + reg_6008 + (reg_6008 << 16): 0x25b025b + reg_6008 + (reg_6008 << 16);
            case 0xC0F06008: return set_25fps == 0x1 ? 0x25b025b - 24 + reg_6008 + (reg_6008 << 16): 0x25b025b + reg_6008 + (reg_6008 << 16);
            case 0xC0F06010: return set_25fps == 0x1 ? 0x25b - 24 + reg_6008: 0x25b + reg_6008;
               
                /* dummy reg for height modes eosm in raw.c */
            case 0xC0f0b13c: return 0xd;
               
        }
       
    }
   
    if (ratios == 0x3 && presets != 0x8)
    {
        /* 16:9 */
        switch (reg)
        {
               
            case 0xC0F06804:
                return 0x78101e4 + reg_6804_width + (reg_6804_height << 16);
            case 0xC0F0713c:
                return 0x781 + reg_713c;
               
                //case 0xC0F06824: return OUTPUT_12BIT ? 0x638 + reg_6824: 0x69d + reg_6824;
                //case 0xC0F06828: return OUTPUT_12BIT ? 0x638 + reg_6824: 0x69d + reg_6824;
                //case 0xC0F0682C: return OUTPUT_12BIT ? 0x638 + reg_6824: 0x69d + reg_6824;
                //case 0xC0F06830: return OUTPUT_12BIT ? 0x638 + reg_6824: 0x69d + reg_6824;
               
            case 0xC0F06014: return set_25fps == 0x1 ? 0x89f + reg_6014: 0x89f + reg_6014;
            case 0xC0F0600c: return set_25fps == 0x1 ? 0x25b025b - 24 + reg_6008 + (reg_6008 << 16): 0x25b025b + reg_6008 + (reg_6008 << 16);
            case 0xC0F06008: return set_25fps == 0x1 ? 0x25b025b - 24 + reg_6008 + (reg_6008 << 16): 0x25b025b + reg_6008 + (reg_6008 << 16);
            case 0xC0F06010: return set_25fps == 0x1 ? 0x25b - 24 + reg_6008: 0x25b + reg_6008;
               
                /* dummy reg for height modes eosm in raw.c */
            case 0xC0f0b13c: return 0xd;
        }
    }
   
    if ((!ratios || presets == 0x6) && !set_25fps)
    {
        /* full readout */
        switch (reg)
        {
            case 0xC0F06804: return 0xcd701e4 + reg_6804_width + (reg_6804_height << 16);
               
            case 0xC0F06014: return 0x14E7 + reg_6014;
            case 0xC0F0600c: return 0x2550255 + reg_6008 + (reg_6008 << 16);
            case 0xC0F06008: return 0x2550255 + reg_6008 + (reg_6008 << 16);
            case 0xC0F06010: return 0x255 + reg_6008;
               
            case 0xC0F0713c: return 0xcd7 + reg_713c;
               
                /* dummy reg for height modes eosm in raw.c */
            case 0xC0f0b13c: return 0x11;
        }
    }
   
    //silent film mode
    if ((!ratios || presets == 0x6) && set_25fps)
    {
        /* full readout */
        switch (reg)
        {
            case 0xC0F06804: return 0x8a301e4 + reg_6804_width + (reg_6804_height << 16);
               
            case 0xC0F06014: return 0xbcf + reg_6014;
            case 0xC0F0600c: return 0x24b024b + reg_6008 + (reg_6008 << 16);
            case 0xC0F06008: return 0x24b024b + reg_6008 + (reg_6008 << 16);
            case 0xC0F06010: return 0x24b + reg_6008;
               
            case 0xC0F0713c: return 0x8a3 + reg_713c;
               
                /* dummy reg for height modes eosm in raw.c */
            case 0xC0f0b13c: return 0x11;
        }
    }
   
   
    return reg_override_bits(reg, old_val);
}

Danne


2blackbar

I have no experience with altering these values, while changing framing was easy, this is not, when i try to change 6804 and 713c values in submenu then they wont affect anything.Its out of my skillset, i wanted to get 4:3 for anamorphic with true anamorphic lenses that require 4:3 to squeeze 2x image, also for 16mm film look and extend vertical res a bit.
But if it breaks pixel maps, maybe its not worth it.

Danne

I tested some. You could start out with ratios off and then delimit height_6804 in sub menu. Delimit reg 713 with the same value. Decrease reg 6014 and reg 6008 to raise fps. If image breaks mess with cmos 7. Test set it to 341.
Problem is I think we need to go too low in height to achieve 24 fps. Personally not worth it but I could take a look building a preset to test.

critix

Canon 1300D, 500D, EOS M, EOS M2

cmh

I'll upgrade the firmware and test this out.
edit: so far so good, I'll keep it for at least a couple of weeks and report back if there's any problem.
edit 2: the preview seems stuck at real time, I can't get the framing mode (I checked the menu, tested various profiles, uninstalling/reinstalling).

2blackbar

Its complicated, without ratio and fps override i have max 14fps,but with override and ratio its normal 23.976 and normal shutter speeds .
I guess it will be easier to just modify 16:9 and crop on sides to get 4:3 instead of trying to make taller frame.

Danne

Yes. Full resolution to the cost of fps but you could reverse it and find sweet spot of 4:3. If worth the hassle that is...

Edit: Speaking fps. There´s some lock in h.264 when recording with increased fps. Sure would be nice to find out what´s stopping the camera from recording here.

2blackbar

I was hoping id be able to add to hortizontal res some pixels from 1104x1870 to like 1200 and crop sides to get 4:3  1167x1970 maybe.
Thats just using calculator and dividing horizontal res by 3
https://calculateaspectratio.com/

Danne

1167x1970 isn´t 4:3?

Here´s 24 fps at 960x2156. Tweaked from within crop rec. Starting out with ratios OFF. Could become a preset. Renew regs by pushing menu bottom after tweaking regs:






2blackbar

Ah, yeah i see its working , but for me its hard to tweak cause when i change values lets say from -1100 to -600 then i get black screen and have to restart and manually change all values again and again.
Would that work with fps override to 23.976 like other ratio modes ?

Im tryint to test whats highes tvertical i can get

I have 1008x2256 with  reg713 at -1000 , 10 bit
Higher ones from -900 freeze my screen on one frame, where should i make it work again ? I tried CMOS 7
Can we get similar results by just skipping top and bottom from full 3256 ? then adjust horizotal res to get 4:3 , and then fix framerate? I tried but got black screen, had to pull battery, i get that when i change regs to fix fps.

Danne

What I showed you is probably the best we could get.

2blackbar

yeah, but with my cctv lens CMOS5 at 60 is better than 20 because of less vignetting, almost no at all, ideally i would move the entire frame 100 pixels up from CMOS5 -20 and not use 60 if its conflicting but i cant seem to find the right spot, i tried cmos5 and 7 and i cant move entire framing higher, only lower.

Danne

Yes, if you get anything working I could take a look. Maybe throw it in as a hidden preset or whatnot.

2blackbar

OK got it working perfect with ideal framing, Your values untouched but i changed CMOS7 to value 5 instead of 8, so frame goes a bit up, but would that work with fps override like other ratio modes ?

Danne

You tell me. You have all the regs and tools to test out.

2blackbar

It doesnt work now, maybe cause it was adjusted for values of ratios that are already there.
And lining up fps and CMOS7 changed to 5 doesnt work like with 8, theres part of the image on top thats misalligned, adjusting 2778 to lower values is decreasing fps, higher ones show black screen requiring reset.

Danne

Well, what I showed before worked for 24fps:
https://www.magiclantern.fm/forum/index.php?topic=9741.msg227252#msg227252

More height or increasing fps will probably break things.

2blackbar

Yes i agree , to center framing i wanted to get it to work with 5 instead of 8 on cmos7 but no success, i mean it works but not with 24fps

ctfire

hello everyone is it some settings to reduse moire in 1080 rewired mode? Or maybe reduce it in post or when converting from mlv to dng ?

masc

Quote from: ctfire on May 19, 2020, 12:55:00 PM
hello everyone is it some settings to reduse moire in 1080 rewired mode? Or maybe reduce it in post or when converting from mlv to dng ?
Yes. Record with open aperture and do not use the sharpest lenses. In MLVApp you can filter color moiree (not for RAW export), but luma moiree will still be there.
5D3.113 | EOSM.202

ctfire

Quote from: masc on May 19, 2020, 03:42:29 PM
Yes. Record with open aperture and do not use the sharpest lenses. In MLVApp you can filter color moiree (not for RAW export), but luma moiree will still be there.


Don't find an option in MLVapp to reduce color moire, could you please make a screenshot where is it? Thanks

masc

Quote from: ctfire on May 19, 2020, 05:05:07 PM
Don't find an option in MLVapp to reduce color moire, could you please make a screenshot where is it? Thanks
This feature does the magic: https://github.com/ilia3101/MLV-App/wiki#ca-desaturate--radius
It was thought to reduce CAs, but it works nicely for color moiree as well.
Before:

After:

Before:

After:
5D3.113 | EOSM.202