Display (bitmap overlay) - page 24 - General Discussion and Assistance - CHDK Forum

Display (bitmap overlay)

  • 355 Replies
  • 83382 Views
*

Offline Ant

  • ****
  • 491
Re: Display (bitmap overlay)
« Reply #230 on: 05 / May / 2021, 18:12:34 »
Advertisements
Samples attached.

Untouched grid lines look better.  :)

What about more detailed GUI elements like face frame, electronic level?
« Last Edit: 05 / May / 2021, 18:21:28 by Ant »

*

Offline philmoz

  • *****
  • 3332
    • Photos
Re: Display (bitmap overlay)
« Reply #231 on: 05 / May / 2021, 19:15:39 »
I tried the technique from srsa_4c on the G7X2 and it seems the affected layer is the one where the focus rectangle and grid lines are drawn.
It also only affects HDMI output on the G7X2, using the LCD there is no effect.


Original and half height screenshots from G7X2 attached (from HDMI output).


Phil.

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 philmoz

  • *****
  • 3332
    • Photos
Re: Display (bitmap overlay)
« Reply #232 on: 06 / May / 2021, 02:47:01 »
I have created a 'ximr_draw_rgba' branch in SVN so this doesn't get lost.
Latest code patch is attached here as well.
This updates the build system to avoid module conflicts between YUV and RGBA versions for Digic 6/7.


@pigeonhill - attached is a test version for the M3.
This uses a 360x240 display size so you may want to use a different SD card - you will need to reset the CHDK OSD options to fix screen positions of CHDK UI elements. Your scripts will also need to take this into account.
Assuming it works can you check that the CHDK UI works on various output devices (LCD, EVF, HDMI, etc).
Zebra and Edge overlay have not been checked and may crash so I would avoid those.


Phil.



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: Display (bitmap overlay)
« Reply #233 on: 06 / May / 2021, 04:02:48 »
@philmoz

 :)

Initial feedback is great work. No flickering  :D

I also note that LCD vs EVF display is handled seamlessly. Before I had to detect if the LCD or EVF was active and scale things myself.

Of course, drawing space is restricted/reduced to 360x240, but that is a small price to pay for eliminating the flickering.

One advantage/disadvantage is that the CHDK histogram is huge  :) Great for those of us with old eyes  ;)

The histogram, if always on, goes away when the Canon Menu is displayed, great, but remains whatever Canon INFO state you are in. Do you think it would be possible to have the CHDK histogram disappear, as with the Canon Menu, when the cycle through the INFO states, ie only show if Canon stuff not showing. Or have an enhanced shoot feature that means you can toggle the histogram on and off by using a half shutter press, say.

Bottom line: great work and I'm more than happy to keep testing future developments.

UPDATE 1
One thing I have noticed is that switching to EVF seems to offset all CHDK drawing by about -15 pixels, ie everything is shifted up.

UPDATE 2
I think something is amiss with the histogram as when I set the exposure to the fastest, 1/4000 and have the lens cap on, the histogram shows highlights warnings at the highlight end, but only on the LCD, not the EVF ??? The green channel changes radically in the LCD, ie looks wrong in the LCD, but not the EVF.

UPDATE 3
My script refreshes the info bar every 1s. In LCD mode I see 'random', ie not correlated to a 1s interval, flashing of my bar, ie the drawing. In EVF mode this random flashing is noticeably less and near non existent.

UPDATE 4

I currently I use
Code: [Select]
lcd = get_gui_screen_width()
to detect LCD/EVF switching. The above now always gives 360. Is there another way to detect EVF or LCD, or even implement one, eg get_screen_type()

UPDATE 5
Have experimented with my drawing refresh logic, and concluded, that with this build, the best way forward is to only refresh my drawing IF DoF things change, eg focus; else don't redraw. This logic results in no flashing. The downside is that my drawing disappears when I switch between LCD and EVF, hence the need to detect LCD/EVF changes. A work around is that I've implemented a half shutter based refresh, ie in LCD or EVF mode pressing the half shutter refreshes my drawing stuff.
« Last Edit: 06 / May / 2021, 05:51:03 by pigeonhill »


*

Offline philmoz

  • *****
  • 3332
    • Photos
Re: Display (bitmap overlay)
« Reply #234 on: 06 / May / 2021, 06:30:23 »
@pigeonhill


Thanks for testing and the feedback. My to-do list just got bigger  :)


The switch between LCD & EVF should redraw the console and anything drawn with the 'drawings' library in Lua - not sure why this is not happening.

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: Display (bitmap overlay)
« Reply #235 on: 06 / May / 2021, 06:39:48 »
@philmoz

Quote
The switch between LCD & EVF should redraw the console and anything drawn with the 'drawings' library in Lua - not sure why this is not happening.

As I say, all the CHDK drawing gets drawn with a neg y offset in the M3 EVF.

For example, in the LCD ALT is drawn at the bottom of the LCD, in the EVF it's drawn displaced up by about 15 pixels.

*

Offline philmoz

  • *****
  • 3332
    • Photos
Re: Display (bitmap overlay)
« Reply #236 on: 06 / May / 2021, 06:44:40 »
@philmoz

Quote
The switch between LCD & EVF should redraw the console and anything drawn with the 'drawings' library in Lua - not sure why this is not happening.

As I say, all the CHDK drawing gets drawn with a neg y offset in the M3 EVF.

For example, in the LCD ALT is drawn at the bottom of the LCD, in the EVF it's drawn displaced up by about 15 pixels.


@pigeonhill


Is the top clipped (stuff missing) or is the display just taller with extra space at the bottom?

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: Display (bitmap overlay)
« Reply #237 on: 06 / May / 2021, 07:11:57 »
@philmoz

No clipping, just all the CHDK stuff offset in the neg y direction.


*

Offline philmoz

  • *****
  • 3332
    • Photos
Re: Display (bitmap overlay)
« Reply #238 on: 06 / May / 2021, 07:17:26 »
@philmoz

No clipping, just all the CHDK stuff offset in the neg y direction.


@pigeonhill


Thanks, it's probably like the G5X which has a taller EVF (360x270).
If you open the 'Enhanced Photo Operations' CHDK menu can you see the right hand side of the menu correctly in the EVF (with the scroll bar)?

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: Display (bitmap overlay)
« Reply #239 on: 06 / May / 2021, 07:24:29 »
Quote
If you open the 'Enhanced Photo Operations' CHDK menu can you see the right hand side of the menu correctly in the EVF (with the scroll bar)?

Confirmed. All I see is the neg y/vertical offset.

 

Related Topics