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.

cedricp

I found a more obvious example : https://drive.google.com/file/d/1Riq3LxV1JCRnFSFObnEmzpVMZcmfZm_k/view?usp=share_link
switch between frame 5 and 6, it should be visible. I use iaburns version too, but the issue is the same (Linux).

Edit: I used 1080p mode no fps overrides, I had to problem with 5K footage too.
Edit2: it's even more visible with Dual ISO preview mode.
Best regards

cedricp

Here's what I can see :


the red/blue channels seem crushed, I raised exposure to get a more clear difference.

Danne

You are right. Frames are calculated differently. Too bad :(. Is this happening with mlvfs too, do you know? Or with pfficial Mlv app which has the same code as mlvfs more or less.

iaburn

Hi! I know why it happens, but I don't know how to fix it... It's the same with this video:
https://mega.nz/file/IsdixQAK#0FKj5UmoOOx_hBEpZ7s4W7rIgozZC49Ejg95E_LbU30

There is a "match_exposures" function inside dualiso.c that seems to need some work. I tried playing around and I could get rid of flicker issues but that was adding more banding, and also the other way around... It was also not enough keeping the same values for all frames, it was actually worse on my tests.

I hope someone with more understanding on this topic can take a look, in the meantime the only solution is to disable "Fullres blending" if you are using my build.

You can bring this issue to the MLV App thread, not a problem with Danne's code.

Danne

Oki, so disabling fylldes blending fixes the issue? Let's make that default for movie file In say  8). Nothing worse than random, subtle errors...

cedricp

Ok, I did some more test, MLVFS has the same problem and indeed it does not seem to be related to Danne's code (input looks OK).
I tried to disable fullres_blending, but it does not fix the problem.
I also tried to use constant values instead of using match_exposure function (I had an intuition about it too), but it still not improve things.
Edit: Using the dual ISO preview mode shows the same problem and has a total different algorithm.
I keep searching on my side.
Thank you

Edit 2: I played with dual ISO preview mode function, if I give constant value to a and b (line ~200) values, it's OK

Danne

Would be very welcome addition if this was fixed.

cedricp

Found out that the problem is the same in the final dual ISO mode, values a and b in match_exposure function vary a lot, I'm figuring out how to smooth that from frame to frame.
Edit: Got a fix that "bakes" correction values for a clip in mlvapp. I will make a patch if you're interested.

iaburn

Quote from: cedricp on March 15, 2023, 12:06:50 PM
Found out that the problem is the same in the final dual ISO mode, values a and b in match_exposure function vary a lot, I'm figuring out how to smooth that from frame to frame.
Edit: Got a fix that "bakes" correction values for a clip in mlvapp. I will make a patch if you're interested.

I'm interested  :D

Danne

Quote from: cedricp on March 15, 2023, 12:06:50 PM
Found out that the problem is the same in the final dual ISO mode, values a and b in match_exposure function vary a lot, I'm figuring out how to smooth that from frame to frame.
Edit: Got a fix that "bakes" correction values for a clip in mlvapp. I will make a patch if you're interested.
Cool!

DeEYE

is 1080p external monitor dead?  Just checking, I think the last time it worked was a Oct 22 build. But I love the latest build, just 1080 on external monitor doesn't work.

I detailed the modes that work (for me) ,  Here just a bit ago.
https://www.magiclantern.fm/forum/index.php?topic=25781.msg242752#msg242752

Thanks!!!

cedricp

There's a quick fix here : https://github.com/cedricp/MLV-App
I added a "Bake" button in the Dual ISO group to freeze HDR exposure curve at the current frame, once clicked, it's used for the whole clip.
I hope it's a correct fix. I'll do more testing later.

iaburn

Quote from: cedricp on March 15, 2023, 10:28:12 PM
There's a quick fix here : https://github.com/cedricp/MLV-App
I added a "Bake" button in the Dual ISO group to freeze HDR exposure curve at the current frame, once clicked, it's used for the whole clip.
I hope it's a correct fix. I'll do more testing later.

Thanks, I'll try it.

You can also try to change this line on my branch, set it to "1" instead of "3" and then on MLV App activate the "horizontal stripes fix". It works with your test clip, but it's making somo other clips worse...
static const int sample_size = 1; //3;

cedricp

I tried that too, but if you modifiy sample_size, you also need to change the increment of x and y here
If you don't, buffers are partially zeroed and calculus is wrong, I tested it too. Note that it changed nothing to the issue.

iaburn

Quote from: cedricp on March 15, 2023, 11:06:31 PM
I tried that too, but if you modifiy sample_size, you also need to change the increment of x and y here
If you don't, buffers are partially zeroed and calculus is wrong, I tested it too. Note that it changed nothing to the issue.

Just tried your change and seems to be working very well  :D

cedricp

Glad to hear it, I pushed new commits to enable that to preview mode too.

Danne

Fantastic. Question. Will it be possible to add the change to dualiso.c code itself as well?

cedricp

What do you mean, globally ? for other software ?
The logic is in dualiso.c but it needs an external structure to hold exposure curve values.

Danne

I thought the issues are coming from dualiso.c originally?

cedricp

It is, just I need to hold precomputed values outside of that file to avoid precision errors from frame to frame. That remains a hack  ;) Not a final solution.
I hope it could be possible to do better.

iaburn

What is not clear is how to decide which values to take when pressing the "bake" button. The ones from the first frame? How can we know in which frame the values are correct or calculated more accurately?  ::)

cedricp

Just click "bake" on the frame (on the viewport) you wanna freeze values from. There are updates on the repo.
QuoteHow can we know in which frame the values are correct or calculated more accurately?
I think it's a visual test. The idea is to stop the flickering. It's not a great idea to do it on a flawless footage.

iaburn

People are going to need a master to edit Dual ISO clips with so many options xDD

cedricp


Danne

I forgot half of the functions I implemented into my own eos m branch  8).