Zebras - page 2 - General Help and Assistance on using CHDK stable releases - CHDK Forum supplierdeeply

Zebras

  • 23 Replies
  • 2983 Views
*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: Zebras
« Reply #10 on: 04 / June / 2022, 03:24:13 »
Advertisements
The reason that zebra and histogram don't behave nicely together on Digic 6 & 7 is that the zebra overlay (the over and under exposed pixels drawn on the screen) is drawn over the top of the live image data in the YUV buffer.


This is the same buffer that the histogram code reads to calculate the histogram bars - so when you draw the zebra overlay it messes up the histogram calculations.

CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)

Re: Zebras
« Reply #11 on: 04 / June / 2022, 03:34:43 »
@philmoz

Thanks for the insight.

Based on what you say it won’t be possible to have both zebras and histogram on at the same time.

I wonder if there is a halfway house. For example, being able to switch between the two, either by a HS press or via Lua. Just a thought.

Being able to set the ETTR with the histogram and then confirm the area that is blown out, is a powerful workflow.

*

Offline reyalp

  • ******
  • 14084
Re: Zebras
« Reply #12 on: 04 / June / 2022, 15:57:30 »
This is the same buffer that the histogram code reads to calculate the histogram bars - so when you draw the zebra overlay it messes up the histogram calculations.
I think you're misremembering here, zebra is definitely not drawn on the live viewport buffer in the current ximr code (confirmed using PTP live view).

edit:
@pigeonhill you should be able to use zebra + histogram on your g1x
« Last Edit: 04 / June / 2022, 18:04:11 by reyalp »
Don't forget what the H stands for.

Re: Zebras
« Reply #13 on: 05 / June / 2022, 01:42:52 »
Quote
edit:
@pigeonhill you should be able to use zebra + histogram on your g1x

Thanks @reyalp, just tried it and yes I can now have zebras on always :-)

As you likely are aware, with the histogram on I get flashing of the histogram (on/off), about every second. even with zebra selected as solid.

Also, 'bits' of the Canon side flash through, eg bits of the exposure meter.
Plus, is there a reason the zebras don't show in ALT mode?
« Last Edit: 05 / June / 2022, 01:49:11 by pigeonhill »


*

Offline reyalp

  • ******
  • 14084
Re: Zebras
« Reply #14 on: 05 / June / 2022, 02:11:48 »
Thanks @reyalp, just tried it and yes I can now have zebras on always :-)

As you likely are aware, with the histogram on I get flashing of the histogram (on/off), about every second. even with zebra selected as solid.

Also, 'bits' of the Canon side flash through, eg bits of the exposure meter.
Yes. I believe these are equivalent to what you would see in the old code if you had both enabled in half press, although there are several variations of zebra code even on the pre-digic 6 cams, so it's possible some behave differently.

Quote
Plus, is there a reason the zebras don't show in ALT mode?
Because I didn't add special code to make it do that. Given how the zebra conflicts with other UI elements, I'm not sure how useful it would be, although it would make some sense to have it match the histogram behavior.

Philmoz:
Looking at the digic 6/xmir code, I believe the current zebra drays on the bitmap YUV buffer, rather then the ximr RGBA buffer (using draw_dblpixel_raw). It seems like it should be possible to display both, at least with similar (or perhaps even less) ugliness than the old cams.

One oddity I noticed is that if both histogram and zebra are set to half press (zebra on behavior without my changes) the histogram does display on halfpress, but doesn't update. I guess this is because zebra drawing doesn't erase the RGBA buffer, but I still trying to refresh my memory how all that stuff works.
Don't forget what the H stands for.

*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: Zebras
« Reply #15 on: 05 / June / 2022, 05:09:10 »
Looking at the digic 6/xmir code, I believe the current zebra drays on the bitmap YUV buffer, rather then the ximr RGBA buffer (using draw_dblpixel_raw). It seems like it should be possible to display both, at least with similar (or perhaps even less) ugliness than the old cams.


Thanks for that - my bad (another seniors moment when looking at the code). Yes it's possible to enable the zebra + histogram functionality in the ximr drawing system. This causes the zebra to flicker even if set to solid because updating the CHDK histogram display requires a Canon display refresh to shown the CHDK RGBA buffer. Unfortunately this also erases the bitmap YUV where the zebra draws.


Quote
One oddity I noticed is that if both histogram and zebra are set to half press (zebra on behavior without my changes) the histogram does display on halfpress, but doesn't update. I guess this is because zebra drawing doesn't erase the RGBA buffer, but I still trying to refresh my memory how all that stuff works.


Not seeing this on the G12 and G7X2 - the histogram and zebra both update while the shutter is half pressed.

CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)

*

Offline reyalp

  • ******
  • 14084
Re: Zebras
« Reply #16 on: 05 / June / 2022, 22:26:37 »
Not seeing this on the G12 and G7X2 - the histogram and zebra both update while the shutter is half pressed.
FWIW, from some more testing, what I see on my digic 6 ximr build cams is histogram doesn't update in half press when zebra is showing, unless
1) Zebra is set to one of the blink modes
2) "Restore OSD" is checked

Otherwise, the histogram shows, but doesn't change if you pan around to different lighting with half press held. Note this only applies if the zebra actually detects some over/under.

On pre-digic 6 cams, the histogram draws and updates (albeit blinking ~once per second) as long as "Draw Over Zebra" is set to Histo or OSD. That option isn't implemented for digic 6.

I admit I'm not entirely clear how all the zebra options were originally intended to work or interact.
Don't forget what the H stands for.

*

Offline reyalp

  • ******
  • 14084
Re: Zebras
« Reply #17 on: 06 / June / 2022, 01:19:32 »
@pigeonhill I checked in the changes in the ximr branch, so it will be available next time phil updates his builds. Histogram and zebra work when the zebra is set to blink and the option is checked as described in my previous post.

I'll look into making it less ugly later.

One other thing I should address is the shortcut keys. The histogram shortcut cycles through available modes, while zebra currently toggles on and off. Cycling through 4 options doesn't seem that great to me, but I never uses the shortcuts much either.
Don't forget what the H stands for.


Re: Zebras
« Reply #18 on: 06 / June / 2022, 02:07:17 »
@reyalp

Many thanks for investigating and 'tweaking'.

As you know, the XIMR builds of the M3, G7X and G5X mean that these cameras are powerful travel gear.

BTW I've ordered 2nd hand M10 to play with. The reason being the the M3 can't be IR converted, because of the focus stuff, but the M10 can be; and, unlike the Magic Lantern M, it has an articulating screen.

I'm not sure how well CHDK runs on the M10, ie driving M lenses, but I'll find out ;-)

*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: Zebras
« Reply #19 on: 06 / June / 2022, 02:40:25 »
Not seeing this on the G12 and G7X2 - the histogram and zebra both update while the shutter is half pressed.
FWIW, from some more testing, what I see on my digic 6 ximr build cams is histogram doesn't update in half press when zebra is showing, unless
1) Zebra is set to one of the blink modes
2) "Restore OSD" is checked

Otherwise, the histogram shows, but doesn't change if you pan around to different lighting with half press held. Note this only applies if the zebra actually detects some over/under.

On pre-digic 6 cams, the histogram draws and updates (albeit blinking ~once per second) as long as "Draw Over Zebra" is set to Histo or OSD. That option isn't implemented for digic 6.

I admit I'm not entirely clear how all the zebra options were originally intended to work or interact.


The Ximr builds currently don't have the option to display the histogram over the top of the zebra so you are likely seeing the last frame of the histogram drawn in the RGBA buffer before half pressing the shutter. I've added the code to enable histogram over zebra; so it should all work better soon.

CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)

 

Related Topics