Zebra - improvements for Digic 6 & 7 - General Discussion and Assistance - CHDK Forum

Zebra - improvements for Digic 6 & 7

  • 3 Replies
  • 3097 Views
*

Offline philmoz

  • *****
  • 3450
    • Photos
Zebra - improvements for Digic 6 & 7
« on: 10 / May / 2021, 06:13:19 »
Advertisements
Attached is a patch with some changes to the zebra logic for Digic 6 & 7.


This removes the full screen erase and refresh that causes a lot of flickering.


Instead it uses the opacity value to determine which pixels were drawn by the zebra code and need to be erased.
This could be to blink the zebra or when it is turned off.


In addition the change will not draw the zebra pixels where there are Canon OSD pixels in the YUV buffer - it checks the opacity value.
This prevents the Canon OSD from flickering at the expense of not drawing our zebra in some places.


I wanted to get any feedback, for or against, before checking this in. The change to not overwrite Canon OSD elements may not suit everyone; but I think the stability of the display makes up for it.

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: Zebra - improvements for Digic 6 & 7
« Reply #1 on: 10 / May / 2021, 07:21:03 »
Phil

I personally can’t add much value here, but am willing to test on the M3 when you are ready.

*

Offline reyalp

  • ******
  • 14126
Re: Zebra - improvements for Digic 6 & 7
« Reply #2 on: 11 / May / 2021, 17:14:28 »
Thanks Phil. I played around with it briefly and it seems like an improvement to me.

One thing I noticed on both the current svn and this is that in RGB zebra, over-exposed blue appears to be indicated in red, while green is indicated with green. On pre-digic 6 cams, blue is indicated with blue.

Also, since (AFAIK) the "draw over" option doesn't work in D6, maybe we should ifdef them out of the menu.

I'm not clear to what extent the "Restore original screen" and "restore OSD" are expected to work, but in blink mode, your new code does appear to effectively preserve the CHDK OSD. In the old code, the OSD elements flash horribly they are checked.
Don't forget what the H stands for.

*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: Zebra - improvements for Digic 6 & 7
« Reply #3 on: 11 / May / 2021, 19:58:52 »
One thing I noticed on both the current svn and this is that in RGB zebra, over-exposed blue appears to be indicated in red, while green is indicated with green. On pre-digic 6 cams, blue is indicated with blue.


I'm away at the moment so can't test this; but looking at the code I think the logic is swapping the U & V values for the RGB zebra.


The gui_draw, histogram and chdkptp code all have U at offset 0 and V at offset 2 in each 4 byte group - the zebra code is the other way around.

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


SimplePortal © 2008-2014, SimplePortal