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

cedricp

  • Freshman
  • **
  • Posts: 51
Re: Danne's crop_rec_4k experiments for EOS M
« Reply #3675 on: March 14, 2023, 10:01:15 PM »
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

  • Freshman
  • **
  • Posts: 51
Re: Danne's crop_rec_4k experiments for EOS M
« Reply #3676 on: March 14, 2023, 10:33:36 PM »
Here's what I can see :


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

Danne

  • Developer
  • Hero Member
  • *****
  • Posts: 7739
Re: Danne's crop_rec_4k experiments for EOS M
« Reply #3677 on: March 15, 2023, 12:23:59 AM »
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

  • Member
  • ***
  • Posts: 193
Re: Danne's crop_rec_4k experiments for EOS M
« Reply #3678 on: March 15, 2023, 09:43:59 AM »
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

  • Developer
  • Hero Member
  • *****
  • Posts: 7739
Re: Danne's crop_rec_4k experiments for EOS M
« Reply #3679 on: March 15, 2023, 09:49:02 AM »
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

  • Freshman
  • **
  • Posts: 51
Re: Danne's crop_rec_4k experiments for EOS M
« Reply #3680 on: March 15, 2023, 09:57:17 AM »
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

  • Developer
  • Hero Member
  • *****
  • Posts: 7739
Re: Danne's crop_rec_4k experiments for EOS M
« Reply #3681 on: March 15, 2023, 10:46:05 AM »
Would be very welcome addition if this was fixed.

cedricp

  • Freshman
  • **
  • Posts: 51
Re: Danne's crop_rec_4k experiments for EOS M
« Reply #3682 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.

iaburn

  • Member
  • ***
  • Posts: 193
Re: Danne's crop_rec_4k experiments for EOS M
« Reply #3683 on: March 15, 2023, 06:07:44 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

  • Developer
  • Hero Member
  • *****
  • Posts: 7739
Re: Danne's crop_rec_4k experiments for EOS M
« Reply #3684 on: March 15, 2023, 06:46:58 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

  • New to the forum
  • *
  • Posts: 5
Re: Danne's crop_rec_4k experiments for EOS M
« Reply #3685 on: March 15, 2023, 09:07:08 PM »
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

  • Freshman
  • **
  • Posts: 51
Re: Danne's crop_rec_4k experiments for EOS M
« Reply #3686 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.

iaburn

  • Member
  • ***
  • Posts: 193
Re: Danne's crop_rec_4k experiments for EOS M
« Reply #3687 on: March 15, 2023, 10:53:50 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...
Code: [Select]
static const int sample_size = 1; //3;

cedricp

  • Freshman
  • **
  • Posts: 51
Re: Danne's crop_rec_4k experiments for EOS M
« Reply #3688 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.

iaburn

  • Member
  • ***
  • Posts: 193
Re: Danne's crop_rec_4k experiments for EOS M
« Reply #3689 on: March 15, 2023, 11:18:59 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

  • Freshman
  • **
  • Posts: 51
Re: Danne's crop_rec_4k experiments for EOS M
« Reply #3690 on: March 16, 2023, 09:58:07 AM »
Glad to hear it, I pushed new commits to enable that to preview mode too.

Danne

  • Developer
  • Hero Member
  • *****
  • Posts: 7739
Re: Danne's crop_rec_4k experiments for EOS M
« Reply #3691 on: March 16, 2023, 10:15:25 AM »
Fantastic. Question. Will it be possible to add the change to dualiso.c code itself as well?

cedricp

  • Freshman
  • **
  • Posts: 51
Re: Danne's crop_rec_4k experiments for EOS M
« Reply #3692 on: March 16, 2023, 10:21:05 AM »
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

  • Developer
  • Hero Member
  • *****
  • Posts: 7739
Re: Danne's crop_rec_4k experiments for EOS M
« Reply #3693 on: March 16, 2023, 11:54:36 AM »
I thought the issues are coming from dualiso.c originally?

cedricp

  • Freshman
  • **
  • Posts: 51
Re: Danne's crop_rec_4k experiments for EOS M
« Reply #3694 on: March 16, 2023, 12:26:54 PM »
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

  • Member
  • ***
  • Posts: 193
Re: Danne's crop_rec_4k experiments for EOS M
« Reply #3695 on: March 16, 2023, 03:00:06 PM »
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

  • Freshman
  • **
  • Posts: 51
Re: Danne's crop_rec_4k experiments for EOS M
« Reply #3696 on: March 16, 2023, 03:08:23 PM »
Just click "bake" on the frame (on the viewport) you wanna freeze values from. There are updates on the repo.
Quote
How 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

  • Member
  • ***
  • Posts: 193
Re: Danne's crop_rec_4k experiments for EOS M
« Reply #3697 on: March 16, 2023, 08:19:53 PM »
People are going to need a master to edit Dual ISO clips with so many options xDD

cedricp

  • Freshman
  • **
  • Posts: 51
Re: Danne's crop_rec_4k experiments for EOS M
« Reply #3698 on: March 16, 2023, 08:24:56 PM »
So is shooting with magic lantern  :)

Danne

  • Developer
  • Hero Member
  • *****
  • Posts: 7739
Re: Danne's crop_rec_4k experiments for EOS M
« Reply #3699 on: March 16, 2023, 08:33:35 PM »
I forgot half of the functions I implemented into my own eos m branch  8).