Cropped zebra or zebra specific OSD - page 6 - Feature Requests - CHDK Forum
supplierdeeply

Cropped zebra or zebra specific OSD

  • 90 Replies
  • 53321 Views
*

Offline msl

  • *****
  • 1280
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: Cropped zebra or zebra specific OSD
« Reply #50 on: 20 / December / 2008, 16:43:35 »
Advertisements
For the A720 is it not a problem.

I have tested the new zebra function even with egde overlay - without crash. (incl. symbols, menu font, language file, badpixel.bin)

The new zebra is very good, but the memory management should be optimized - 168kB is to many for this function.
 
CHDK-DE:  CHDK-DE links

Re: Cropped zebra or zebra specific OSD
« Reply #51 on: 20 / December / 2008, 16:52:11 »
I just tested on my SD1100 and it crashes at half press with the new zebra active.
I also noticed that when in playback mode if I use the zoom to it makes the direct print button led turn on and nothing happens if I push the zoom in the same direction again it turns of and zooms the pic correctly.
Powershot SD1100 IS  FW 1.01A
CHDK autobuild 0.9.8-755
SDM 1.80

A MORE than well deserved thanks to all who made CHDK possible. It's made me a camera freak!

*

Offline Hacki

  • ****
  • 359
  • EOS 80D
Re: Cropped zebra or zebra specific OSD
« Reply #52 on: 20 / December / 2008, 17:03:45 »
Quote
I also noticed that when in playback mode if I use the zoom to it makes the direct print button led turn on

Go to: Scripting parameters -> Remote parameters and disable the "Enable Remote Zoom" option.

The new zebra works fine, Got 714k memory free after booting, 541k after zebra was active. Even with symbols, lang file, menu font, edge overlay, histogram + badpixel.bin i still got 300k free. Do digic III cams have that much more ram?

*

Offline fudgey

  • *****
  • 1705
  • a570is
Re: Cropped zebra or zebra specific OSD
« Reply #53 on: 20 / December / 2008, 17:38:02 »

a570is (which is digic III btw Hacki as you may know) memory usage on trunk 649 built for a570is 100e, multipartition support removed, otherwise vanilla trunk. Installed from full zip to an empty MMC card (i.e. no old config files).

By default, zebra is off, edge overlay is off, language is builtin english, font is internal (btw how does one get back to the internal font after selecting another?).

Boot to play mode, memory info:

Free Memory: 386924 bytes
CHDK size: 334992 bytes
loaded at 0xA6C30

Switch to REC mode: 353052 bytes free
Enable Zebra and half shoot: 180236 bytes free
Disable zebra, enable edge overlay, power off, power on: 69732 bytes free
Shoot: 65212 bytes free

So, zebra required 172816 bytes, edge overlay 287840 bytes. Edge overlay menu has a free memory feature, it says it clears about 260k.

Btw, my camera didn't crash when I attempted to enable both zebra and edge overlay, the one enabled last just didn't work.


Re: Cropped zebra or zebra specific OSD
« Reply #54 on: 20 / December / 2008, 17:39:09 »
thanks for the info. It still does it w/ the rem. zoom off. I have to completely disable the remote for it not to do it, I dont mind though as i rarly use the zoom func. for pics on my cam. just thought id mention it as I just noticed it.

my cam still crashes w/ the new zebra tho. I noticed if I turn all the other osd's off then turn them on its ok but if I shut the cam off and back on with the other osd's on it crashes again.
« Last Edit: 20 / December / 2008, 19:06:26 by Neanderthal_Man »
Powershot SD1100 IS  FW 1.01A
CHDK autobuild 0.9.8-755
SDM 1.80

A MORE than well deserved thanks to all who made CHDK possible. It's made me a camera freak!

*

Offline fudgey

  • *****
  • 1705
  • a570is
Re: Cropped zebra or zebra specific OSD
« Reply #55 on: 20 / December / 2008, 19:16:30 »
hmm... I think cur_buf (the new screen buffer copy in this modified zebra) is transparent in areas where there is no Canon OSD. If that's true,

a) it would compress well with RLE, or

b) we don't need to store the parts of it which we know to be always transparent. Could save us 76k of memory if only 10% of the screen would be saved and those cur_buf[] references and memcpy's would be rewritten as wrapper functions.

*

Offline fudgey

  • *****
  • 1705
  • a570is
Re: Cropped zebra or zebra specific OSD
« Reply #56 on: 20 / December / 2008, 19:30:01 »
my cam still crashes w/ the new zebra tho. I noticed if I turn all the other osd's off then turn them on its ok but if I shut the cam off and back on with the other osd's on it crashes again.

Whether it crashes or not is not very interesting if its due to lack of memory. Please see "Show memory info" in the "Miscellaneous" menu to confirm lack of memory is the cause of your crash.

As others have said, you can enable/disable several features which take up RAM, at least these (roughly sorted by potential memory usage) are noteworthy:

edge overlay, zebra, scripts other than default script, badpixel.bin, language file, menu font, symbol font.



Re: Cropped zebra or zebra specific OSD
« Reply #57 on: 20 / December / 2008, 23:15:55 »
True  but what i thought was interesting was that if i disabble and the reenable all the osd's it doesn't crash. only when evreything is enabled from start up it crashes.
it probly is due to the memory as when i reenable all the osd's I have on theres about 2x's as much free as there is when there on at start up.
Powershot SD1100 IS  FW 1.01A
CHDK autobuild 0.9.8-755
SDM 1.80

A MORE than well deserved thanks to all who made CHDK possible. It's made me a camera freak!


*

Offline fudgey

  • *****
  • 1705
  • a570is
Re: Cropped zebra or zebra specific OSD
« Reply #58 on: 21 / December / 2008, 07:51:53 »
b) we don't need to store the parts of it which we know to be always transparent. Could save us 76k of memory if only 10% of the screen would be saved and those cur_buf[] references and memcpy's would be rewritten as wrapper functions.

Well, I've just tried this. I saved 32 pixel rows from top and 32 rows (360*64) from bottom instead of an entire 360x240 buffer. I ignored left and right border areas for simplicity because (if I'm not mistaken) my camera only has an IS icon on the sides during half shoot and that one is not important since it doesn't change by autoexposure and is shown before half shooting.

Appears to work smoothly enough and from a quick measurement above, I have 63368 bytes more free RAM compared to trunk 649 (measurement result is pretty close to 360*240 - 360*64=63360).

The added inconvenience is that the built-in Canon grid now disappears from the middle. But this can probably be fixed by using a CHDK grid instead.

With this modification, the added RAM cost of Canon OSD showing during zebra is about 23k RAM, which should be about 25% increase to old zebra RAM usage.

*

Offline fudgey

  • *****
  • 1705
  • a570is
Re: Cropped zebra or zebra specific OSD
« Reply #59 on: 21 / December / 2008, 08:28:43 »
To complement the above, here's my new core/gui_osd.c, modified from trunk 649. I also added some comments older parts of the code.

the defines:
#define ZEBRA_CANONOSD_BORDER_RESTORE   1
#define ZFIX_TOP    29
#define ZFIX_BOTTOM 30
should be moved from core/gui_osd.c to include/camera.h, disabling border-only restore for cameras which have plenty of RAM, and to make it possible to set different ZFIX_* values for cameras that may have different needs (29 and 30 seemed
optimal for a570).


I did notice one bug, but it doesn't have anything to do with this patch or the one from yesterday since it affects all three zebra versions for a570: When using the "digital tele zoom" feature, zebra is incorrect. It's drawn too high, and if digital tele zoom is enabled when starting up, a wicked erroneus zebra area appears until digital tele zoom setting is changed (maybe not always, but most of the time).

I didn't try searching the cause, but it's very possible that I don't know enough to fix it (there's something different in display buffers when live preview is cropped).

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal