Magic Lantern Forum

Experimental builds (WIP) => crop_rec and derived builds => Topic started by: theBilalFakhouri on September 10, 2020, 03:02:55 PM

Title: Experimental Real-Time Correct Framing Preview
Post by: theBilalFakhouri on September 10, 2020, 03:02:55 PM
The OP was updated in 13-6-2021

I loved shooting in Higher resolution Modes with ML, I hated the cropped Preview in these Modes, that was the major pain for me, The Preview . .
I spent the last three weeks trying to understand How Preview registers works, hopefully I would get something, and I got it:

Introducing the New Expanded Real-Time preview in x5 Mode
(https://www.magiclantern.fm/forum/proxy.php?request=https%3A%2F%2Fi.ibb.co%2F3FdsrpY%2FNew-Expanded-Preview.gif&hash=480115be87b05aa3b8ef67e3e2fd0aa1)

650D / 700D: This build (https://www.magiclantern.fm/forum/index.php?topic=25784.msg231049#msg231049)
EOS M: This build (https://www.magiclantern.fm/forum/index.php?topic=25781.msg208959#msg208959) from Danne (Thanks!)

Features:
1- Real-Time Responsive Preview as Normal 1080p Mode preview.
2- Accurate Aspect Ratio out of the box, No ML Global Draw is needed.
3- No slowness and No overhead, which means no corrupted frames and no drops in write speed.
4- Accurate Framing Preview if you consider there will be data in the right instead of Black Bar.
5- Works on HDMI monitors too.

Known Limitations:
-Black Bar in the right instead of the right part of actual RAW data.

Notes:
-The Preview is in the Top Part of the screen, not centered on screen.
-You may compare ML Framing vs The New Preview to trust it.
-Turn OFF Global Draw for better Preview. (Edit: No longer needed on 650D / 700D builds).
-Feel the responsive.
-Instead Normal of x5 Mode Preview? Wow!
-Still working on Black Bar limit.

Q&A
1-What about Higher Resolutions like 3K, 4K?
-Didn't try yet, I guess it should work, at least we could get the new preview for Normal x5 Mode (2520x1080) and apply it on 3K resolution, but with more Black Area in the right and cropped height.

2-1x3 Binning Mode?
-Something still puzzling me for increasing the Height Preview in None-Zoom Modes, no luck yet, However 1x3 Mode is more important to me compared to x5 Mode, I am working on it hardly.

Edit: Yes it works, you will find 1x3 presets with real-time correct framing preview in custom crop_rec builds, currently it's only for 650D / 700D / EOS M.

3-Other Cameras?
-This development and research started on 700D, fortunately EOS M has benefited too, because it has Identical registers and values as in 700D, no further modifications happened, same preset Works on both cams, also 650D might be identical and 100D might be very similar (I can take a look for 100D, 650D if registers were the same, let me know if there a volunteer), However 5D3 doesn't share the same set of registers, 6D also might be different, I can't work on other cameras, Sorry, I don't have them.

4-You got correct Aspect Ratio for this Preview without ML Anamorphic setting, Could we use same method for correcting Aspect Ratio instead of ML Anamorphic setting to be used for Anamorphic Lenses?
- Yes, we can fix Aspect Ratio without ML Global Draw, with very responsive LiveView.

5- I am photographer?
-I am not here.

6-Is it possible to make 1080p 1:1 preset in Crop Mode with Real-Time Correct-Framing preview?
-Yes, Let me know if you need it. (Edit: We did it, 1920x1280p 1:1 preset).

-Let's keep this thread for testing and sharing thoughts about this topic, this development started from LiveView Investigation (https://www.magiclantern.fm/forum/index.php?topic=25287.0).

Have fun.
Title: Re: Experimental Real-Time Correct Framing Preview
Post by: 2blackbar on September 10, 2020, 06:14:49 PM
Im interested with 6, i have cctv lens for 1/2'' sensor thats about 16mm camera or 2/3'' sensor size, and i used 2.5k mode then reduced to 1920x1080 but still it wasnt realtime preview, would be nice to have HD 1920x1080 realtime preview mode, kinda like digital 16mm HD RAW camera, crop is about the same as 16mm film.
But i had to center it myself in M sourcecode cause 2.5k mode isnt centered precisely at the moment also you could fine tune framing by touching small arrows/triangles onscreen to get rid of vignetting and have it perfectly centered.
Title: Re: Experimental Real-Time Correct Framing Preview
Post by: guerchi on September 10, 2020, 07:46:45 PM
It's working in my EOS M. Fantastic! It's a great leap forward to facilitate framing in 2.5k 

Right now in the bottom part of the image I see a noisy pattern or a fragment of the last image captured with a 1 sec or less looped video, strange effect  :o

(https://www.magiclantern.fm/forum/proxy.php?request=https%3A%2F%2Fguerweb.com%2F1599759500075.jpg&hash=f0925c6f8d06c1966c6261233cb098f3)

Well I'll be here, available for testing :D
Title: Re: Experimental Real-Time Correct Framing Preview
Post by: Danne on September 10, 2020, 08:00:17 PM
Push menu button to get white bottom noise instead  8).
Title: Re: Experimental Real-Time Correct Framing Preview
Post by: LeandroFreitas on September 10, 2020, 08:18:38 PM
@theBilalFakhouri I have 650D if you want to experiment its running Danne´s last build for 650D crop_rec_4k_mlv_snd_isogain_1x3_presets_2019Jun30.650D104

Title: Re: Experimental Real-Time Correct Framing Preview
Post by: Danne on September 10, 2020, 09:06:06 PM
Could you test using this mlv_lite.mo in your build?
https://bitbucket.org/Dannephoto/raw2mlv/downloads/mlv_lite.mo

Turn off crop rec and then enter x5zoom. Should enable the registers.
Title: Re: Experimental Real-Time Correct Framing Preview
Post by: guerchi on September 10, 2020, 10:57:57 PM
Push menu button to get white bottom noise instead  8).
Thanks Danne! that works. I'm not sure which I prefer, the loop although distracting has its charm  :P
Title: Re: Experimental Real-Time Correct Framing Preview
Post by: theBilalFakhouri on September 10, 2020, 11:07:25 PM
Thanks Danne! that works. I'm not sure which I prefer, the loop although distracting has its charm  :P

You can also try turning off crop_rec, get into x5 mode, cover the lens with your hand to prevent the light completely, turn on crop_rec with preview preset, a black border in the bottom :D
Title: Re: Experimental Real-Time Correct Framing Preview
Post by: theBilalFakhouri on September 11, 2020, 04:41:46 PM
Looking at log from 650D, it shares identical registers and values, Preview confirmed working on 650D by @LeandroFreitas, you can use this mlv_lite  (https://www.magiclantern.fm/forum/index.php?topic=25323.msg230708#msg230708)from Danne for 650D, also works on 700D, updated the first post for 650D.
Title: Re: Experimental Real-Time Correct Framing Preview
Post by: Danne on September 11, 2020, 04:51:51 PM
Should work for 100D too I believe.
Title: Re: Experimental Real-Time Correct Framing Preview
Post by: x5x on September 16, 2020, 10:31:34 PM
Works for me but the preview freezes. Was able to continuing recording but with a frozen preview.
Title: Re: Experimental Real-Time Correct Framing Preview
Post by: theBilalFakhouri on September 16, 2020, 11:09:23 PM
New Modes with Correct Preview:

1- 1x3 Anamorphic *1504x1782 ~2.50:1 AR (4512x1782 After de-squeezing):
(https://www.magiclantern.fm/forum/proxy.php?request=https%3A%2F%2Fi.ibb.co%2FX8fkx2S%2F1504x1782.gif&hash=6abb9e6b95ee4421cc20ad3ea694cc92)

- *1504x1782 is the sweet spot for the preview.
- I call this the Quality Mode.

2- 1:1 Crop Mode 1920x1280p:
(https://www.magiclantern.fm/forum/proxy.php?request=https%3A%2F%2Fi.ibb.co%2FtKzb9sW%2F1920x1280p.gif&hash=bed41c8ed08a439d977a0ee57edadc61)

-You can set 1920x1080p from mlv_lite (@2blackbar), the preview would be 3:2, adding black bars in the top and in the bottom is very easy using ML Global Draw and mlv_lite.

-The presets with the new previews should be applied in x5 Mode.
-Updated download link in the first post with the new presets for 700D, on EOS M it's coming too, wait until the new build from Danne, should be soon ;)

-Instead of single crop_rec file, from now on I will make complete builds for 700D with the latest developments.

Well, Have fun :D 1x3 Binning with un-stretched correct preview :D
Title: Re: Experimental Real-Time Correct Framing Preview
Post by: andy kh on September 17, 2020, 04:39:19 AM
Superb
Title: Re: Experimental Real-Time Correct Framing Preview
Post by: IDA_ML on September 17, 2020, 06:42:27 AM
Genious work, Bilal!  These new preview modes are a real game changer. Thank you so much.
Title: Re: Experimental Real-Time Correct Framing Preview
Post by: Danne on September 17, 2020, 06:55:08 AM
New eos m build here:
https://www.magiclantern.fm/forum/index.php?topic=9741.msg230947#msg230947

Whatever you have working with 1x3 real time preview should hold the answer to the black bar in x5 2.5 preview I think? In 1x3 preview we get the full x5 width. Should be possible to apply similarly to x5 zoom 2.5k preset too.
Title: Re: Experimental Real-Time Correct Framing Preview
Post by: LeandroFreitas on September 17, 2020, 08:27:24 AM
What iam i doing wrong here?  https://imgur.com/a/jcbbjkA (https://imgur.com/a/jcbbjkA)
https://imgur.com/a/LgoRYNX (https://imgur.com/a/LgoRYNX)
Title: Re: Experimental Real-Time Correct Framing Preview
Post by: Danne on September 17, 2020, 08:39:15 AM
What´s your problem?
Title: Re: Experimental Real-Time Correct Framing Preview
Post by: theBilalFakhouri on September 17, 2020, 08:59:04 AM
Superb
:D

Genious work, Bilal!  These new preview modes are a real game changer. Thank you so much.
Thanks!, it is :), By the way, do you still have your 100D? I can check if these presets would work on 100D out of the box

Whatever you have working with 1x3 real time preview should hold the answer to the black bar in x5 2.5 preview I think? In 1x3 preview we get the full x5 width. Should be possible to apply similarly to x5 zoom 2.5k preset too.
The Black Bar limit appears if we attempt to process more than ~2048 RAW data width in LiveView, the preview is limited somehow to ~2048, in 1x3 preset we are processing less than that which is 1504 width, also in 1920x1280p is less than 2048 width limit, unlike 2520x1080, this exceed the limit, resulting with a Black Bar

What iam i doing wrong here?  https://imgur.com/a/jcbbjkA (https://imgur.com/a/jcbbjkA)
https://imgur.com/a/LgoRYNX (https://imgur.com/a/LgoRYNX)
Sounds okay, that's it, compare ML Framing with the New preview.
Title: Re: Experimental Real-Time Correct Framing Preview
Post by: Danne on September 17, 2020, 09:12:56 AM
The Black Bar limit appears if we attempt to process more than ~2048 RAW data width in LiveView, the preview is limited somehow to ~2048, in 1x3 preset we are processing less than that which is 1504 width, also in 1920x1280p is less than 2048 width limit, unlike 2520x1080, this exceed the limit, resulting with a Black Bar
Aha, so maybe that´s it. Nothing to do perhaps. Could we get 2048x1280?
Title: Re: Experimental Real-Time Correct Framing Preview
Post by: theBilalFakhouri on September 17, 2020, 09:27:13 AM
Could we get 2048x1280?

I think it's possible, even with a little more height I guess, will try it soon
Title: Re: Experimental Real-Time Correct Framing Preview
Post by: 2blackbar on September 17, 2020, 09:46:13 AM
fantasticwork , i was thinking... if theres this limit that createsblack area , would it be possible to add second view( like when we use extra preview window for focus in magic zoom) andcreate entire frame from 2 views, so second one would be on top of black part of the image? code from magic zoom but without zoom, and use it to diaplay missing area in its proper scale.
Title: Re: Experimental Real-Time Correct Framing Preview
Post by: theBilalFakhouri on September 17, 2020, 10:09:26 AM
@2blackbar

Unfortunately, Not possible, this not how things work.
Magic Zoom gets its stream from YUV HD path (Main Preview Stream) which has the Black Bar limit, so we are not gaining anything here, However the Black Bar is not a hardware limit, should be narrowed down and fixed, no idea how to solve it, yet :)
Title: Re: Experimental Real-Time Correct Framing Preview
Post by: Grognard on September 17, 2020, 10:16:40 AM
If the Black Bar limit appears when we attempt to process more than 2048 RAW data width in LiveView. Maybe we could "move" this black bar to show the other side of the frame and then switch between these two previews.
Title: Re: Experimental Real-Time Correct Framing Preview
Post by: theBilalFakhouri on September 17, 2020, 10:22:07 AM
If the Black Bar limit appears when we attempt to process more than 2048 RAW data width in LiveView. Maybe we could "move" this black bar to show the other side of the frame and then switch between these two previews.

Worth trying :D
Title: Re: Experimental Real-Time Correct Framing Preview
Post by: IBIRRU on September 17, 2020, 11:51:00 AM
Some good guy could compile a build for EOS 700D 115? ;)

Lots of thanks for your great work!

Sorry I found it  in the first post :)

Title: Re: Experimental Real-Time Correct Framing Preview
Post by: IDA_ML on September 17, 2020, 01:08:37 PM
@theBilalFakhouri

Yes Bilal, I still have my 100D and it is in a working condition.  If you could provide a new build with your latest presets implemented, that would be great! I can't wait to test!
Title: Re: Experimental Real-Time Correct Framing Preview
Post by: Teamsleepkid on September 17, 2020, 03:39:15 PM
I think it’s on the first page ida
Title: Re: Experimental Real-Time Correct Framing Preview
Post by: IDA_ML on September 17, 2020, 04:05:29 PM
I think it’s on the first page ida

I don't see a specific 100D build on the first page, just for the EOS-M and the 700D.  To be able to test, I will need one for the 100D.
Title: Re: Experimental Real-Time Correct Framing Preview
Post by: Teamsleepkid on September 17, 2020, 11:37:29 PM
Oh sorry read it wrong :P
Title: Re: Experimental Real-Time Correct Framing Preview
Post by: theBilalFakhouri on September 18, 2020, 07:50:18 PM
Yet another two 1x3 Anamorphic presets with Un-Stretched Previews:

1- 4K 1x3 Anamorphic 1360x1976 with 2.05 Crop factor ~2:1 AR (4080x1976 After de-squeezing):
(https://www.magiclantern.fm/forum/proxy.php?request=https%3A%2F%2Fi.ibb.co%2Fb2njR3X%2F1360x1976.gif&hash=44ccf0d6d633f6c59a0b8114ae37fe74)

*2- UHD 1x3 Anamorphic 1280x2160 with 2.18 Crop factor 16:9 AR (3840x2160 After de-squeezing):
(https://www.magiclantern.fm/forum/proxy.php?request=https%3A%2F%2Fi.ibb.co%2FXzynsXP%2F1280x2160.gif&hash=b91e389b0d216c998b6198ec6be0920f)

*The preview is showing 2080 of height, a little cut from 2160, can be ignored?, I wanted to keep the preset with good numbers, we can cut the height of RAW data down to 2080, to achieve perfect height in the preview, tell me if you prefer that instead of perfect 16:9 AR.

NEW Complete build posted for 700D with the all Latest Developments and Presets in the following link: (Updated the link in the first post too)
https://www.magiclantern.fm/forum/index.php?topic=25784.msg231049#msg231049
Title: Re: Experimental Real-Time Correct Framing Preview
Post by: Danne on September 18, 2020, 09:01:01 PM
Those presets are beasts!
Title: Re: Experimental Real-Time Correct Framing Preview
Post by: 2blackbar on September 18, 2020, 09:06:02 PM
Spot on, great work !
Title: Re: Experimental Real-Time Correct Framing Preview
Post by: theBilalFakhouri on September 23, 2020, 07:56:59 PM
@theBilalFakhouri

Yes Bilal, I still have my 100D and it is in a working condition.  If you could provide a new build with your latest presets implemented, that would be great! I can't wait to test!

Sorry for the delay,

You can start by trying the following mlv_lite from Danne (put it in any crop_rec_4k build):
https://www.magiclantern.fm/forum/index.php?topic=25323.msg230708#msg230708

Direct download link:
https://bitbucket.org/Dannephoto/raw2mlv/downloads/mlv_lite.mo

How it suppose to act?
-Load the module, enable it, and just enter x5 Mode, instead of the cropped Canon preview, the preview would be expanded, works on 700D, please test it on 100D and feedback.
Title: Re: Experimental Real-Time Correct Framing Preview
Post by: theBilalFakhouri on September 26, 2020, 02:52:21 AM
Helpful solution for the new Previews:

Before:
(https://www.magiclantern.fm/forum/proxy.php?request=https%3A%2F%2Fi.ibb.co%2FC1pP8Fm%2FBefore-1.jpg&hash=ea6f2dd21fcd81bdc93ab0328b7e4d35) (https://imgbb.com/)

After:
(https://www.magiclantern.fm/forum/proxy.php?request=https%3A%2F%2Fi.ibb.co%2FHP7Mg4s%2FAfter-1.jpg&hash=dccf66adbda19c0827327565a7f67486) (https://imgbb.com/)

-Black border instead of artifacts
-You can see the full preview when Global Draw is ON (*moved global draw top bar above the bottom bar)

*This actually already implemented in ML settings, thanks @markanini at Discord for mentioning that! , you can find it in "Display" menu --> Advanced settings --> Screen Layout --> "Bottom,under 3:2" , remaining thing to make this process automated when enabling presets with correct previews, this is quite easy.

-Works with HDMI output too, already implemented HDMI support for all presets, the output should be 1080i.
Title: Re: Experimental Real-Time Correct Framing Preview
Post by: Danne on September 26, 2020, 07:40:48 AM
Nice:
https://www.magiclantern.fm/forum/index.php?topic=9741.msg231280#msg231280
Title: Re: Experimental Real-Time Correct Framing Preview
Post by: wib on September 26, 2020, 09:52:50 PM
do you believe this can be applied to the 5D3 or it's impossible ?

(https://www.magiclantern.fm/forum/proxy.php?request=https%3A%2F%2Fmedia1.giphy.com%2Fmedia%2F9uwnYUDw342pq%2Fgiphy.gif%3Fcid%3Decf05e473dp3ispx95wi55d511jw9y388ib4quq7n3h4xilx%26amp%3Brid%3Dgiphy.gif&hash=9988a8b9486f36b7a34c6529f8dafa1b)
Title: Re: Experimental Real-Time Correct Framing Preview
Post by: theBilalFakhouri on September 27, 2020, 07:06:44 AM
@wib

Never say it's impossible, 700D and small cameras give huge proof of concept about the possibility.

-So why it's not there yet on 5D3?

5D3 share some of the registers I used on 700D, but the rest and most of them are different and some of them are not presented in 5D3, but that doesn't mean it's totally different concept, well, actually we don't know yet, and this brings us to the second part of the answer, No one tried to understand the function of the new registers which presented on 5D3, it may has the same effect like the 700D ones, but in a different names.

Currently there is no active Developer or Contributor is working on 5D3.

-Would I work on 5D3 to achieve the new previews?

I have the ability to work on it (ability in this case means the good skills, time and the inspiration), So yes, but I don't have the main tool which is the 5D3 Body in my hands, Open Collective (https://www.magiclantern.fm/forum/index.php?topic=24548.msg230929#msg230929) is a solution for this problem, if 5D3 users want me to work on it, in time no one worked on it, I can apply on 5D3 body, and get a used one.

Open Collective or other central donations for ML project currently work in progress.
Title: Re: Experimental Real-Time Correct Framing Preview
Post by: Grognard on September 27, 2020, 02:48:32 PM
Let's buy a 5Diii to theBilalFakhouri! The ML communauty wants to help all developpers (especially the realtime previous which is the holy grail :D) we're just waiting for a solution.
Title: Re: Experimental Real-Time Correct Framing Preview
Post by: andy kh on September 27, 2020, 04:59:32 PM
Let's buy a 5Diii to theBilalFakhouri!

I am in
Title: Re: Experimental Real-Time Correct Framing Preview
Post by: Stephan Ludbek on September 28, 2020, 02:42:36 PM
Let's buy a 5Diii to theBilalFakhouri! The ML communauty wants to help all developpers (especially the realtime previous which is the holy grail :D) we're just waiting for a solution.

I would normally be for this kind of undertaking, but all Magic Lantern contributors and coders should share equally in terms of any gift or contribution.   It's not fair or equitable to all of the other ML programmers for one person to be singled out in terms of individual gifts or compensation unless there is a consensus among all ML coders that this is fair.    If Danne, Alex1, and the other hard working ML codrers are okay with something like this (gifting a camera to an individual ML coder), it would be okay.     
Title: Re: Experimental Real-Time Correct Framing Preview
Post by: theBilalFakhouri on September 29, 2020, 04:31:43 PM
Magic Zoom V2 .. Nail your focus While recording!

The preset used in video is 4.3K 2.35:1 1x3 Binning, with real-time correct (un-stretched preview).

Magic Zoom V2:
-Coming soon on New 700D Build, EOS M and 650D.
-Works with All preset with real-time correct framing preview.
-You can trigger it by Zoom button or SET button on 700D.
-No overhead or slowness, didn't have corrupted frames during my tests.
-Real-Time as Canon Preview, it's a Canon preview actually, but zoomed.
-Works with Global Draw OFF.
-It may work also with normal mv1080 Mode in theory, but didn't make a preset yet for this mode.

-Spoiler Alert . . Not related to Magic Zoom ..
I am done with these four arrows on screen.

-Visual Spoiler Alert:

Before:
(https://www.magiclantern.fm/forum/proxy.php?request=https%3A%2F%2Fi.ibb.co%2F6vmPc44%2Fx5-Before-1.jpg&hash=22802fb6d9df2fd26013ac0b0b42bc0b) (https://ibb.co/mvGqrHH)

After:
(https://www.magiclantern.fm/forum/proxy.php?request=https%3A%2F%2Fi.ibb.co%2FBTcz9mg%2Fx5-After-1.jpg&hash=a37b0f1b2e521ef3fa882ce0680ad019) (https://ibb.co/2cWnTwj)

Spot the difference :P

-This is not coming in the new build, details are not coming soon too, until I finish it . . Suspense.
Title: Re: Experimental Real-Time Correct Framing Preview
Post by: Danne on September 29, 2020, 05:35:33 PM
Wow, wow x10.
Title: Re: Experimental Real-Time Correct Framing Preview
Post by: wib on September 29, 2020, 06:56:53 PM
Wow !
Title: Re: Experimental Real-Time Correct Framing Preview
Post by: andy kh on September 29, 2020, 06:59:38 PM
Amazing
Title: Re: Experimental Real-Time Correct Framing Preview
Post by: 2blackbar on September 29, 2020, 08:43:41 PM
Thats super cool and fast
Title: Re: Experimental Real-Time Correct Framing Preview
Post by: darthivm on October 30, 2020, 03:19:24 AM
Thanks for this very cool update, now the camera is very usable for raw shooting and the anamorphic modes.

Is there any chance that the 2.5k mode would work without the blackbar?
Maybe if we just display a crop of the image which has the maximum resolution for the display. That would be at least better than the 5x zoom mode I think.

What are your opinions on this?
Title: Re: Experimental Real-Time Correct Framing Preview
Post by: Danne on November 15, 2020, 07:50:39 AM
Where can I find source code for all shared builds?
Title: Re: Experimental Real-Time Correct Framing Preview
Post by: theBilalFakhouri on November 15, 2020, 03:52:55 PM
The the source code for my 700D / 650D builds is in 650D / 700D thread:
https://www.magiclantern.fm/forum/index.php?topic=25784.0
Title: Re: Experimental Real-Time Correct Framing Preview
Post by: Danne on November 15, 2020, 04:29:04 PM
Thanks!
Title: Experimental Real-Time Correct Framing Preview
Post by: DeafEyeJedi on January 17, 2021, 07:43:54 PM
Better late than never to join this party created by the great @TheBilalFakhouri

Thanks for your continuous dedication and support!
Title: Re: Experimental Real-Time Correct Framing Preview
Post by: theBilalFakhouri on June 12, 2021, 01:32:01 AM
Better late than never to join this party created by the great @TheBilalFakhouri

Thanks for your continuous dedication and support!

It was a while . . Thanks @DeafEyeJedi for your words!

I will try to do my best :D
Title: Re: Experimental Real-Time Correct Framing Preview
Post by: mlrocks on September 10, 2021, 07:18:58 AM
This is big. Hope you can create a new preset of 5.2k on 650D. Thanks a lot, theBilalFakhouri.