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

Display (bitmap overlay)

  • 158 Replies
  • 45932 Views
*

Offline Ant

  • ****
  • 416
Re: Display (bitmap overlay)
« Reply #150 on: 28 / February / 2019, 14:33:32 »
Advertisements
I started collecting bigger logs by using one of the RAM areas that appear to be unused for a longer time.

Why don't you use _exmem_alloc ?
It gives me at least 16MB.

*

Offline srsa_4c

  • ******
  • 3815
Re: Display (bitmap overlay)
« Reply #151 on: 28 / February / 2019, 14:51:07 »
Why don't you use _exmem_alloc ?
It gives me at least 16MB.
That could work too, of course. But knowing those seldom used areas can be useful - logging stuff before the OS starts, for example.
I'm unable to fill more than 0x1a000000 bytes of uncached RAM (done in the very first lines of boot.c) using memset32 - a watchdog shuts down the cam if I attempt more.

*

Offline Ant

  • ****
  • 416
Re: Display (bitmap overlay)
« Reply #152 on: 28 / February / 2019, 15:06:52 »
Quote
In playback mode when multiple thumbnails are shown at once, scrolling through them at max speed (by holding down 'up' or 'down') fires jedidraw messages where that byte is less than 100.

These thumbnails don't look transparent.
I assume that MZRM can't render transparent bitmaps.
« Last Edit: 28 / February / 2019, 15:11:14 by Ant »

*

Offline srsa_4c

  • ******
  • 3815
Re: Display (bitmap overlay)
« Reply #153 on: 28 / February / 2019, 15:13:54 »
This thumbnails don't look transparent.
No, and it happens too fast to observe. It's also possible that the M3 version is different. Log a session in which you do the thumbnail scroll and look for any changes in those 0x64 bytes.


*

Offline Ant

  • ****
  • 416
Re: Display (bitmap overlay)
« Reply #154 on: 28 / February / 2019, 15:34:17 »
It's also possible that the M3 version is different.
What about SX280?

Quote
No, and it happens too fast to observe.
The thumbnails are drawn on a gray background. So I don't see it even on CHDK-PTP screenshots.

Quote
Log a session in which you do the thumbnail scroll and look for any changes in those 0x64 bytes.
Have you managed to render transparent bitmaps from your code?
« Last Edit: 28 / February / 2019, 15:37:35 by Ant »

*

Offline srsa_4c

  • ******
  • 3815
Re: Display (bitmap overlay)
« Reply #155 on: 28 / February / 2019, 16:17:02 »
What about SX280?
Not yet. I'll probably port the "aborttrick" version to this cam. But it is 1st generation so I don't have high hopes.

Quote
Have you managed to render transparent bitmaps from your code?
Yes, but as I said, the byte I found is about mixing new overlay with the old. When used repeatedly, the transparent bitmap will turn opaque sooner or later.

*

Offline Ant

  • ****
  • 416
Re: Display (bitmap overlay)
« Reply #156 on: 02 / March / 2019, 10:27:52 »
But new overlay still contain a black area that should be fully transparent to be used as CHDK layer.
Maybe it's better to replace one of rgba buffers in XimrExe message or add the third buffer(if it possible)?

*

Offline srsa_4c

  • ******
  • 3815
Re: Display (bitmap overlay)
« Reply #157 on: 02 / March / 2019, 14:31:06 »
But new overlay still contain a black area that should be fully transparent to be used as CHDK layer.
The source bitmap has no transparency information, so whatever its background is, it will remain visible. I wonder if rgba bitmaps are supported by one of the methods (JD or not). Ximrexe does support rgba as source, but its destination is yuv+opacity, and I can't recall whether it can enlarge images.

Quote
Maybe it's better to replace one of rgba buffers in XimrExe message or add the third buffer(if it possible)?
We can't control which of the rgba buffers is used for which kind of content, plus we can't control the active yuv+opacity buffer. The latter can fluctuate quite often in some modes.
Plus, if ximrexe can't upscale images, we'd need a full size rgba buffer. With jedidraw, we could use a 720x240 yuv buffer and draw on it like on classic powershots (360x240).


*

Offline srsa_4c

  • ******
  • 3815
Re: Display (bitmap overlay)
« Reply #158 on: 10 / March / 2019, 11:54:35 »
No real progress, just observations.
The sx280 constructs a large (taller than overlay's height) yuv bitmap in playback mode's thumbnail view, rather than drawing the thumbnails one-by-one. I found the larger jedidraw struct to be seemingly always 128 bytes long. Unfortunately, its yuv bitmap mode refers to a (probably previously prepared) external MARV struct that also refers to other structs...
I collected some statistics about the mzrm messages actually used in playback and rec mode (it's possible that some of the other messages are also used under different circumstances). The attachment (.ods file in 7z) lists all messages of sx280 and m10 together with the number of uses in a few minute session. The usage counts are in hex.

 

Related Topics