Author Topic: Danne's crop_rec_4k experiments for EOS M  (Read 152448 times)

Danne

  • Developer
  • Hero Member
  • *****
  • Posts: 7235
Re: Danne's crop_rec_4k experiments for EOS M
« Reply #1050 on: June 10, 2019, 04:38:03 PM »
I’ve tested it with one of the latest builds. It worked fine, no pink frames.
Yes, tested as well, seemed to work fine also with global draw on. Cool.

ricardopt

  • Member
  • ***
  • Posts: 128
Re: Danne's crop_rec_4k experiments for EOS M
« Reply #1051 on: June 10, 2019, 06:11:03 PM »
ricardopt

You are correct, when using anamorphic mode you only get a crop of the sensor. In fact, the only mode that gives you full sensor picture is mv1080p varieties, all other modes only read a part of the sensor, hence what you call a zoom in effect. The difference between 1x1 and 1x3 (anamorphic) modes is that the latter is able to capture a larger part of the sensor. With 1x1 mode you get around x3 crop, with 1x3 you get around x1.5-1.6 (crop depends on the resolution chosen, the higher the res, the larger the crop,  the smaller the crop factor).

Does it make sense?

Thanks for the explanation, i follow the eosm subforum, untill recently i didnt have time to test the builds, so all my "following" was done by reading comments and reading other people results, i probably misread something about the 1x3 as i tought it didnt have any crop.

Thanks once again for the explanation.

marcelolippi

  • New to the forum
  • *
  • Posts: 42
Re: Danne's crop_rec_4k experiments for EOS M
« Reply #1052 on: June 10, 2019, 08:02:36 PM »
You miss the silver version dfort ;)

New version:
https://www.magiclantern.fm/forum/index.php?topic=9741.msg208959#msg208959

- Added the more up to date cinema ratio 2.39:1 into the preset menu in crop mode sub menu. Works on all presets:
- Updated the lua cinema script to enter 4K anamorphic rewired 2.39:1 mode as starting point

2.39:1

Grazie Danne, will be mine settings for the next documentaries

ricardopt

  • Member
  • ***
  • Posts: 128
Re: Danne's crop_rec_4k experiments for EOS M
« Reply #1053 on: June 10, 2019, 10:25:31 PM »
here's a few clips, 4k anamorphic, only changed aspect ratio to 16:9 and set 25fps, 1064x1800 resized to 4k, very "clean" videos only selected 3x3 smooth in mlvapp and it was ready to go, @Danne where's the aliasing now? :)
watch in 2k or 4k resolution

Danne

  • Developer
  • Hero Member
  • *****
  • Posts: 7235
Re: Danne's crop_rec_4k experiments for EOS M
« Reply #1054 on: June 11, 2019, 12:04:44 AM »
Oh yes. Clean as clean can be. Very nice looking. Good colors too.
Yes, chroma smooth 3x3 needed. Notified dfort on pixel maps for these new anamorphic modes. Hopefully he finds time soon.

henricusmaria

  • Freshman
  • **
  • Posts: 70
Re: Danne's crop_rec_4k experiments for EOS M
« Reply #1055 on: June 11, 2019, 11:42:39 AM »
here's a few clips, 4k anamorphic, only changed aspect ratio to 16:9 and set 25fps, 1064x1800 resized to 4k, very "clean" videos only selected 3x3 smooth in mlvapp and it was ready to go, @Danne where's the aliasing now? :)
watch in 2k or 4k resolution

Nice clips!
4K anamorphic works nice. For people and plants it works great. However with buildings I sometimes get wobbling/aliasing on vertical lines.
Edit: the wobbling is due to the IS lens

dokipen

  • New to the forum
  • *
  • Posts: 13
Re: Danne's crop_rec_4k experiments for EOS M
« Reply #1056 on: June 12, 2019, 12:29:53 AM »
I like that 4k anamorphics 16:9, I was trying to do something like that myself the other night.

Is there a definitive list somewhere of what the differences are between the different crop_rec modes? I know that mv1080p is 3x3 binning and anamorphic is 1x3 binning but I don't fully understand all the modes and what exactly they do (ie what do 4k anamorphic and 5k anamorphic do differently?). If I haven't searched properly in this thread then please point me in the right direction.

Cheers
Dan

2blackbar

  • Senior
  • ****
  • Posts: 492
Re: Danne's crop_rec_4k experiments for EOS M
« Reply #1057 on: June 12, 2019, 12:00:08 PM »
i dont think anyone did that cause menu in ML kinda describes it well.
First modes are for 5x5 zoom,
2.5k zoom modes  are the ones without aliasing but zoomed in and with full shutter speed control
3k and 4k  zoom modes are similar but you cant choose shutter speed above 30 and fps is low so its for timelapses maybe.
next modes arewithout zoom until anamorphic modes on bottom - 4k and 5k modes which have full vertical resolution (every pixel rom sensor is captured) and horizontal binning(every third) So image is stretched but its best quality, comparable to full size photo with full shutter speed and fps control unlike previous 3k and 4k modes.
https://www.magiclantern.fm/forum/index.php?topic=9741.msg215467#msg215467

aulden

  • New to the forum
  • *
  • Posts: 13
Re: Danne's crop_rec_4k experiments for EOS M
« Reply #1058 on: June 12, 2019, 05:52:55 PM »
Would an anamorphic 3:1 mode in the display tab work with the anamorphic croprec mode?

Danne

  • Developer
  • Hero Member
  • *****
  • Posts: 7235
Re: Danne's crop_rec_4k experiments for EOS M
« Reply #1059 on: June 12, 2019, 06:17:07 PM »
Not sure what you mean but what is stopping you from testing?

aulden

  • New to the forum
  • *
  • Posts: 13
Re: Danne's crop_rec_4k experiments for EOS M
« Reply #1060 on: June 12, 2019, 07:13:10 PM »
Not sure what you mean but what is stopping you from testing?

For correcting the real time preview of the rewired anamorphic modes. It only goes up to 2:1, would it be hard to implement a 3:1 mode aswell?

Danne

  • Developer
  • Hero Member
  • *****
  • Posts: 7235
Re: Danne's crop_rec_4k experiments for EOS M
« Reply #1061 on: June 12, 2019, 07:19:56 PM »
I tried some of that a while ago. Seemed not so straightforward. Besides it's also cpu hungry so corrupted frames would occur. Didn't look any further myself.

Nibby99

  • New to the forum
  • *
  • Posts: 5
Re: Danne's crop_rec_4k experiments for EOS M
« Reply #1062 on: June 12, 2019, 07:58:01 PM »
when you plug in an external monitor, the touch screen stops working, therefore, there is no way to navigate ml menu when external monitor is attached.  Same problem if you're using a screen loupe viewfinder on the eosm screen, u have to remove the loupe to navigate, pain in the butt...

Just wondering if this has every been addressed. I want to be able to change shutter speed and possibly aperture in ML menus (so I can see my changes real-time). I want to buy a viewfinder LCD magnifier as I find it impossible to shoot in direct sun.

(ie:MagiDeal 2.8X 3.0'' LCD Screen Viewfinder Magnifier V6)

I was hoping to be able to access ML without popping off the hood everytime.

masc

  • Contributor
  • Hero Member
  • *****
  • Posts: 1917
Re: Danne's crop_rec_4k experiments for EOS M
« Reply #1063 on: June 12, 2019, 10:28:24 PM »
You can access ML menu without touchscreen, just with the buttons. Use trash button and play button. So no need to pop off the magnifier.
5D3.113 | EOSM.202

Pacerx999

  • New to the forum
  • *
  • Posts: 12
Re: Danne's crop_rec_4k experiments for EOS M
« Reply #1064 on: June 13, 2019, 06:17:25 PM »
For correcting the real time preview of the rewired anamorphic modes. It only goes up to 2:1, would it be hard to implement a 3:1 mode aswell?

I've previously compiled a version with a 3:1 anamorphic mode. It's pretty straightforward in the code.

The issue is currently that that rewired anamorphic mode is not showing the full height of the image. It feels like it's only showing approximately half of the 1866 height (of the 1488x1866 4k anamorphic rewired).

@Danne, I've been through your previous repository, but I couldn't find how the MCM rewired happens/takes place/is controlled or even if it could be. If you have any pointers for trying to rewire the full height of the 4k anamorphic mode that would be great.

We could then look to test a 3:1 anamorphic liveview mode (and see the effect on CPU/pink frames) or I have an external monitor which can be set to anamorphic desqueeze, so that could also be an option.

Another couple of questions/thoughts

At the moment I'm getting continuous - Orange marker for most of the record, then green for a portion. But records over 5mins (with a sandisk extreme pro). This is, obviously, AMAZING (props to you Danne)
But my thought is that 4k 2.39:1 is normally thought of as 4096x1728 - which means we *could* lower the res to 1365x1728

@Danne - again if you could point me in the direction (of the raw code) that controls the height/resolution on the preset that would be great

Then potentially if we can get the whole image rewired to the liveview in realtime, means we can then figure out the desqueeze.

Interested to hear your thoughts. Feels like this could be another (ANOTHER) big leap for the EOS M.

cheers all

Danne

  • Developer
  • Hero Member
  • *****
  • Posts: 7235
Re: Danne's crop_rec_4k experiments for EOS M
« Reply #1065 on: June 13, 2019, 06:51:38 PM »
You can modify resolution with skip offsets like following. Enter crop mode sub menu, enter following:


ML code will round to this:


Now go to this part in crop_rec.c and add the new numbers if you want to hard code resolution presets. Starts like this:
Code: [Select]
case CROP_PRESET_anamorphic_rewired_EOSM:
/* see autodetect_black_level exception in raw.c */
  if (ratios == 0x0)
  {
    skip_right      = 58;
    break;
  }
/* 2.39:1 */
  if (ratios == 0x1)
  {
        skip_bottom = 54;
        skip_right = 186;
        skip_left = 190;
   if (bitdepth == 0x4)
   {
        skip_bottom = 54;
        skip_right = 266;
        skip_left = 270;
   }
        break;
  }

Hard code numbers in this part:
Code: [Select]
/* 2.39:1 */
  if (ratios == 0x1)
  {
        skip_bottom = 54;
        skip_right = 186;
        skip_left = 190;

Becomes:
Code: [Select]
/* 2.39:1 */
  if (ratios == 0x1)
  {
        skip_bottom = 192;
        skip_right = 248;
        skip_left = 252;

Personally I wouldn´t do this since I record a smaller area of the sensor. Instead I´d scale down to propr standards in post.

What do you want to know about CROP_PRESET_anamorphic_rewired_EOSM preset? You can follow all registers added by searching keyword:
CROP_PRESET_anamorphic_rewired_EOSM
Or:
reg_override_anamorphic_rewired_eosm
to get the capture registers


One interesting workaround with the rewired modes is that it starts out in movie crop mode(x3digital) since then eosm will work in regular mv1080 readout in liveview. I then alter cmos and adtg regs so that we get back into non crop mv1080p mode. If you want to understand code from here you´ll need adtg_gui etc but even so it´s not like one can just copy paste the regs and get the mv1080p liveview working outside x3 zoom.
I call movie crop mode here in crop_rec.c:
Code: [Select]
/* always disable Movie crop mode if using crop_rec presets, except for mcm mode, Only eosm and 100D */
 if (is_EOSM || is_100D)
 {
/* always disable Movie crop mode if using crop_rec presets, except for mcm mode */
    if ((crop_preset == CROP_PRESET_mcm_mv1080_EOSM) || (crop_preset == CROP_PRESET_anamorphic_rewired_EOSM) || (crop_preset == CROP_PRESET_anamorphic_rewired_100D))
    {
     if (is_EOSM || is_100D) movie_crop_hack_enable();
    }
    else
    {
     if (is_EOSM || is_100D) movie_crop_hack_disable();
    }

 }

If you can share a version also with 3x1 anamorphic and how you alter it it would cool.

berechiah

  • Freshman
  • **
  • Posts: 84
Re: Danne's crop_rec_4k experiments for EOS M
« Reply #1066 on: June 14, 2019, 01:27:03 AM »
Hey guys

Just wondering if its possible to get 45fps in rewire view (not stretched view)

I have been playing with it a lot since danne made it 10x better (THANKS SO MICH BY THE WAY)
I just love shooing slo motion video of my children
I think it is a big feature for me. Even though its scaled down a lot. Its seriously cool.

Thanks again guys

You guys are seriously the best I ever saw

Danne

  • Developer
  • Hero Member
  • *****
  • Posts: 7235
Re: Danne's crop_rec_4k experiments for EOS M
« Reply #1067 on: June 14, 2019, 09:20:18 AM »
Hey guys

Just wondering if its possible to get 45fps in rewire view (not stretched view)

I have been playing with it a lot since danne made it 10x better (THANKS SO MICH BY THE WAY)
I just love shooing slo motion video of my children
I think it is a big feature for me. Even though its scaled down a lot. Its seriously cool.

Thanks again guys

You guys are seriously the best I ever saw
I´m pretty sure you got an answer when you pm:ed me the very same question.

Pacerx999

  • New to the forum
  • *
  • Posts: 12
Re: Danne's crop_rec_4k experiments for EOS M
« Reply #1068 on: June 14, 2019, 11:27:10 AM »
If you can share a version also with 3x1 anamorphic and how you alter it it would cool.

So it's pretty straightforward for the 3x1 desqueeze.

The code is stored in tweaks.c, around line 3545 you'll see this:

 
Code: [Select]
.name = "Anamorphic",
        .priv     = &anamorphic_preview,
        .update = anamorphic_preview_display,
        .max = 7,
        .choices = (const char *[]) {"OFF", "5:4 (1.25)", "4:3 (1.33)", "7:5 (1.4)", "3:2 (1.5)", "5:3 (1.66)", "9:5 (1.8)", "2:1"},
        .help = "Stretches LiveView image vertically, for anamorphic lenses.",
        .depends_on = DEP_LIVEVIEW | DEP_GLOBAL_DRAW,

So we have to a) update the max number of options, and add one to the choices. So it would look like

Code: [Select]
.name = "Anamorphic",
        .priv     = &anamorphic_preview,
        .update = anamorphic_preview_display,
        .max = 8,
        .choices = (const char *[]) {"OFF", "5:4 (1.25)", "4:3 (1.33)", "7:5 (1.4)", "3:2 (1.5)", "5:3 (1.66)", "9:5 (1.8)", "2:1", "3:1"},
        .help = "Stretches LiveView image vertically, for anamorphic lenses.",
        .depends_on = DEP_LIVEVIEW | DEP_GLOBAL_DRAW,

so we've updated the menu, but now need to add the actual maths for the desqueezing.

if we goto line 2833 we see:

Code: [Select]
#ifdef FEATURE_ANAMORPHIC_PREVIEW

static int anamorphic_ratio_num[10] = {5, 4, 7, 3, 5, 9, 2};
static int anamorphic_ratio_den[10] = {4, 3, 5, 2, 3, 5, 1};

which is the array for how things get tweaked, so we just need to add another choice like this:

Code: [Select]
#ifdef FEATURE_ANAMORPHIC_PREVIEW

static int anamorphic_ratio_num[10] = {5, 4, 7, 3, 5, 9, 2, 3};
static int anamorphic_ratio_den[10] = {4, 3, 5, 2, 3, 5, 1, 1};


The only thing that I've found in terms of getting it to work on the liveview is you have to turn it to realtime and turn off the crop-rec preview.

@Danne, I'm going to have a play with the registers for the raw video size. I think I actually typo'd the dimensions for 4k 2.39:1. According to this site: https://blog.chameleondg.com/post/111891072017/resolution-aspect-ratio-cheat-sheet

it's 4096x1716, so we can probably adjust down the 3x1 to: 1366x1716 which will probably be continuous.

I'll also have a look at the register values for the MCM rewire and see what I can start to figure out, but I may come back with some more questions about what is going on. My knowledge of the EOS M registers is still very low, so it would be great to get some more pointers once I've had a dive in.

Cheers


berechiah

  • Freshman
  • **
  • Posts: 84
Re: Danne's crop_rec_4k experiments for EOS M
« Reply #1069 on: June 14, 2019, 11:32:36 AM »
Sorry Danne
No matter how I try to understand it seems not to get through lol
I spent hours and hours with the camers just some things seem to be hard go get.

So I only see 30fps in 1080 mcm rewire mode

I changed all the settings I could
But the only option was to set my max to 30fps

If i was in mc1080p 46/48fps mode
I see the option to set the max fps to 45fps

Am I going wrong somewhere

I'm sure it's simple but I am missing something

Sorry to be such a novis
It's not for the lack of time I am spending on learning or just being lazy
I really appreciate any advice

Danne

  • Developer
  • Hero Member
  • *****
  • Posts: 7235
Re: Danne's crop_rec_4k experiments for EOS M
« Reply #1070 on: June 14, 2019, 11:52:20 AM »
No problems. You can set FPS override to maybe 38 in mcm modes.

@Pacerx999
Thanks. Will look into this later.
Good luck on regs and just ask anything if needed. Learn to use adtg_gui is my tip right now.

berechiah

  • Freshman
  • **
  • Posts: 84
Re: Danne's crop_rec_4k experiments for EOS M
« Reply #1071 on: June 14, 2019, 01:24:41 PM »
Hey again

Im wondering if you don't mind to shed some light again please.

I am in ml menu my settings are

fps override: 38 (from 30)

Crop mode: mv1080p MCM rewire
Crop mode Sub menu: bit depth = off
Crop mode Sub menu: ratios 16:9


Raw video:
Aspect ration: 16:9
kill global Draw: on

every thing else is normal
But I can't seem to allow my shutter speed past 60-70 or so.
should                        ((((((((((fps override: 38 (from 30)))))))))))
not say something like ((((((((((fps override: 38 (from 38)))))))))))
Am I doing it right


So I did 38fps and it works and 2.35:1 works too no pink frames
sorry to be a pain just hoping to get a grip on it

berechiah

  • Freshman
  • **
  • Posts: 84
Re: Danne's crop_rec_4k experiments for EOS M
« Reply #1072 on: June 14, 2019, 01:49:16 PM »
Just a quick update

I ended up leaving the fps to 36
and I can't make my shutter speed go past 74

its the almost double fps so seems to be the sweep spot.

I am lost likely doing it wrong LOL but as they say in Ireland
Im doing it arse ways
LOL


Danne

  • Developer
  • Hero Member
  • *****
  • Posts: 7235
Re: Danne's crop_rec_4k experiments for EOS M
« Reply #1073 on: June 14, 2019, 01:49:41 PM »
TEsted and reproduced. Something maybe conflicitting with fps override and shutter blanking. One need to take a look in crop_rec.c and maybe also fps-engio.c code.

EDIT: Found the issue. Will check into it.

berechiah

  • Freshman
  • **
  • Posts: 84
Re: Danne's crop_rec_4k experiments for EOS M
« Reply #1074 on: June 14, 2019, 01:58:13 PM »
Fair play Danne

But even if I can't go past 36fps its still ok
there is is no pink frames

and if I got to 8-11bit lossless I can get about 30 - 60 sec from it.