500d development - page 202 - DSLR Hack development - CHDK Forum
supplierdeeply

500d development

  • 2487 Replies
  • 812799 Views
*

Offline a1ex

  • *****
  • 671
  • ML dev
Re: 500d development
« Reply #2010 on: 05 / December / 2011, 14:32:31 »
Advertisements
But when magic zoom is turned off, you still can't access ML menu without a large delay?

Edit: can you try this changeset?
https://bitbucket.org/hudson/magic-lantern/changeset/7692df85a863

It should only "overcrank" it at 10ms when magic zoom is active, otherwise it should be relaxed.
« Last Edit: 05 / December / 2011, 14:54:11 by a1ex »

Re: 500d development
« Reply #2011 on: 05 / December / 2011, 15:07:02 »
Yes, when magic zoom was turned off, I still couldn't access ML menu without a large delay.

The changeset has fixed the delay with focus peak and magic zoom no longer flickers. But this time it's the magic zoom what causes the camera not to respond immediately (it may take several seconds up to ~a half of a minute), this is worse when recording (only with magic zoom turned on, otherwise the camera responds immediately), although magic zoom no longer flickers.
Canon EOS 500D, EF-S 17-85mm f/4-5.6 IS USM

*

Offline a1ex

  • *****
  • 671
  • ML dev
Re: 500d development
« Reply #2012 on: 05 / December / 2011, 15:13:19 »
OK, so my last workaround is to allow MZ to flicker once every 50 frames or so; this should make buttons respond in around one second. You can tweak it further if you like.

Re: 500d development
« Reply #2013 on: 05 / December / 2011, 15:37:10 »
Yes, it does exactly what you have told. Except that the maximum delay that I have experienced is about 3s, but that's only sometimes. I have thought, it could be caused by the magic zoom not being refreshed at 50fps so I have enabled the fps yelling code and I was surprised. With magic zoom (no matter if I was recording or not), it showed up to 80fps. With histogram only 25fps, with zebras 23fps and with focus peak 18-22fps. That's when I have noticed that if only histogram is shown, it gets refreshed about 3-5 times a second. With focus peak turned on it is about 3 times slower - but that's probably ok as it is just much CPU hungry.

I have noticed that the red "Not recording" cross has been enlarged. The LCD shortcut titles are a few pixels out of it.
Canon EOS 500D, EF-S 17-85mm f/4-5.6 IS USM


Re: 500d development
« Reply #2014 on: 05 / December / 2011, 15:39:44 »
This is the screenshot for you to figure out.
Canon EOS 500D, EF-S 17-85mm f/4-5.6 IS USM

*

Offline a1ex

  • *****
  • 671
  • ML dev
Re: 500d development
« Reply #2015 on: 05 / December / 2011, 16:06:58 »
80 fps is a lot, at this rate it should work even in 60fps video modes...

The proper fix for this is to find the hook for vertical sync (which is called at 30fps, 25fps, 60fps.. whatever value used for refreshing the screen) and draw magic zoom for there. That should ensure perfect sync without CPU usage overhead.

The red frame should be fixed by this:
Code: [Select]
movtweaks.c:605:
int rx = os.y_ex * 7/15;

or maybe some other value.

Did you know Canon's AF frame has the golden ratio?

Re: 500d development
« Reply #2016 on: 06 / December / 2011, 00:33:51 »
Alex, since your doing alot of menu tweaks, would it be hard to make a menu option to switch back and forth from lcd shortcut and flash button for the iso, kel, lcd, and vol, so like have a menu selection to select if you want iso and kel on the current flash button option or if you would rather have it on the lcd shortcuts option, this way for cam models like the 500d that the flash button is none working for, they can decide what is more needed and can easily switch by menu, for me, i just switch it manually in the debug.c code, but im sure im not the only 500d user that would love kelvin and iso as a quick adjustment using the sensor shortcut and maybe other cam models would like to have the option to switch those features as well. Its easy to switch them around manually in the code, but i dont know the code good enough to attempt a new menu 8/ if u get time and its not to hard, i think that might make a useful menu option for all models.

Re: 500d development
« Reply #2017 on: 06 / December / 2011, 11:10:32 »
The red frame should be fixed by this:
Code: [Select]
movtweaks.c:605:
int rx = os.y_ex * 7/15;

or maybe some other value.

Did you know Canon's AF frame has the golden ratio?
[/quote]

Yes, that fixed the problem :-)
Now the shortcut titles override only the denser grid but this would be really hard to fix as its lines pass through the center of the screen, never mind.

About the golden ratio, no, I didn't know that :-)

The vsync fix for magic zoom is evident, that's a good idea. Only the event has to be isolated.
Canon EOS 500D, EF-S 17-85mm f/4-5.6 IS USM


Re: 500d development
« Reply #2018 on: 06 / December / 2011, 13:13:43 »
I have made a patch for zebras and focus peak so that they use all the image area available (except crop bars in movie mode). It now recognizes also 480p video mode to fully use the area available in 4:3 ratio (I have moved local off_43 variable from update_vram_params() in vram.c to the os structure).

I have also tried to adjust a little bit more the background for ML info bar parts but it proved to only work with the "outside" ML info bar placement modes - the inside ones that I have let unchanged suffer from the issue that I have fixed for the ML info bar "outside" placements (the color of the background may change from transparent to the color of a ML overlay drawn in the top left pixel and if transparent, it will make a transparent rectangle inside ML overlays) so that might need an additional tweaking.

This patch contains also change of the "Not recording" red rectangle so that it doesn't get in conflict with LCD/flash shortcut titles on the screen.


I only do not understand why 4:3 and 16:9 crop bars are drawn over zebras and focus peak - I can set the area of those overlays to whatever I want and crop bars will always show only clear image below them (with 4:3 crop bars including 3px and 2px space at the inner edge). Are those really Canon overlays or ML ones? I'll post a screenshot of these spaces.
« Last Edit: 06 / December / 2011, 13:17:14 by kyselejsyrecek »
Canon EOS 500D, EF-S 17-85mm f/4-5.6 IS USM

*

Offline a1ex

  • *****
  • 671
  • ML dev
Re: 500d development
« Reply #2019 on: 06 / December / 2011, 14:16:36 »
The bars are from Canon (they are gray). ML only draws black bars on 50D (because it needs to kill all Canon graphics, they are too aggressive there) and it darkens them on 550D (users like it better that way, looks like on 60D/600D).

I would propose some refactoring: let's define the area where we should draw zebras, peaking and other stuff in the os structure (similar to x0/y0/x_max/y_max). This will simplify the for loops quite a bit.

Something like:
Code: [Select]
for(int y = os.yv0; y < os.yv_max; y += 2 )
    for (int x = os.xv0; x < os.xv_max; x += 2)
       ...

And those 4 parameters will take different values according to current mode (video 16:9, video 4:3, photo, screen layout...)

For debugging, call "draw_cropmark_area" to draw a rectangle with an X showing the rectangles. It now shows the visible LiveView area (including gray bars) and the recording buffer area (which sometimes is smaller, and may or may not include the gray bars).

 

Related Topics