Author Topic: Dealing with Focus Pixels in raw video  (Read 197414 times)

2blackbar

  • Senior
  • ****
  • Posts: 348
Re: Dealing with Focus Pixels in raw video
« Reply #725 on: May 04, 2020, 07:48:37 PM »
can i get it fixed by chopping one pixel or 2 in ML code  for crop mode ? so its 1736x976 vs 1736x734 , so both modes have different resolution

masc

  • Contributor
  • Hero Member
  • *****
  • Posts: 1557
Re: Dealing with Focus Pixels in raw video
« Reply #726 on: May 04, 2020, 07:56:32 PM »
Your final resolution don't cares. Identification is done with raw buffer resolution (metadata).
5D2.212 | EOSM.202

2blackbar

  • Senior
  • ****
  • Posts: 348
Re: Dealing with Focus Pixels in raw video
« Reply #727 on: May 04, 2020, 08:03:27 PM »
Best at the moment without fix would be if i could choose manually which focus pixel map should be used

Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 6458
Re: Dealing with Focus Pixels in raw video
« Reply #728 on: May 04, 2020, 08:10:31 PM »
I could fix it like this and upload a new build.

For non crop mode it stays at this(buffer):
Code: [Select]
case 0xC0F06804: return 0x4a601e4When selecting crop mode it will record following:
Code: [Select]
case 0xC0F06804: return 0x4a701e4Should give same resolution but it seems to activate the correct maps.

It won´t fix the old files though.

masc

  • Contributor
  • Hero Member
  • *****
  • Posts: 1557
Re: Dealing with Focus Pixels in raw video
« Reply #729 on: May 04, 2020, 08:12:36 PM »
What will this do? Change the metadata in the MLV?
5D2.212 | EOSM.202

Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 6458
Re: Dealing with Focus Pixels in raw video
« Reply #730 on: May 04, 2020, 08:20:07 PM »
Yes. For x3crop it will look like this:
Code: [Select]
      active_area.y2   1189
      active_area.x2   1812
For non crop:
Code: [Select]
      active_area.y2   1188
      active_area.x2   1812
This nudge seems to activate all the right dotmagic.


2blackbar

  • Senior
  • ****
  • Posts: 348
Re: Dealing with Focus Pixels in raw video
« Reply #732 on: May 04, 2020, 09:05:38 PM »
Great, i applied croprec.c changes to my custom build.
---
Well, new code is interfering with my custom 2.5k mode settings and i have black bar on right side of the screen, why is that? Or what should i remove to not interfere with 2.5k settings at all ?

It works fine before i add this new code :
Code: [Select]
    //needs to differ raw buffer to fit pixel map files in mlv app
    if (ratios == 0x0 && x3crop == 0x1)
    {
        switch (reg)
        {
            case 0xC0F06804: return 0x4a701e4 + reg_6804_width + (reg_6804_height << 16);
            case 0xC0F0713c: return 0x4a7 + reg_713c;
            case 0xC0F07150: return 0x430 + reg_7150;
        }
    }
   

When i add only this and remove that ratios line from code a bit above it ( line 3710) then 2.5k mode is changed, i will test if its broken in your build.
--
Looks like its fine in Your build, ill adjust it on my end.
But the fix does work !

Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 6458
Re: Dealing with Focus Pixels in raw video
« Reply #733 on: May 04, 2020, 09:44:16 PM »
Please test my build first and see if it works properly in x3crop mode without any borders etc. Then you can post anything you want but I want to be sure the original intent is working as it should.
The modified 2.5k mode? Is that modification also with mcm rewired but in x3crop mode? HArd to follow this.

Edit: Ok so it seems you are on to something. Saw you updated your post.

2blackbar

  • Senior
  • ****
  • Posts: 348
Re: Dealing with Focus Pixels in raw video
« Reply #734 on: May 04, 2020, 09:46:12 PM »
Yup, your build is all fine, ill start from copying your addresses and try to get it working for my cctv lenses again with minimum vignette like before !
Great work !
I use different addresses for 2.5k mode to get framing right for my cctv lenses, its a matter of finding them again with this new change.
I use this :
Code: [Select]
            case CROP_PRESET_2K_EOSM:
  cmos_new[5] = 0x2c0;             /* vertical (first|last) */
              cmos_new[7] = 0x2a9;    /* pink highlights without this */
                break;

And this is Yours:
Code: [Select]
            case CROP_PRESET_2K_EOSM:
                cmos_new[7] = 0xaa9;    /* pink highlights without this */
                break;
Ill figure it out
--
Fixed it on my end! All fine and no black bar.Thanks again Danne!
This fixed it for me
Code: [Select]
           
            case CROP_PRESET_2K_EOSM:
  cmos_new[5] = 0x300;             /* vertical (first|last) */
              cmos_new[7] = 0x2a9;    /* pink highlights without this */
                break;

Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 6458
Re: Dealing with Focus Pixels in raw video
« Reply #735 on: May 04, 2020, 10:17:26 PM »
Great!