[libbluray-devel] Clearing and wiping of YUV overlay

Richard Hulme peper03 at mythtv.org
Sun Jun 21 18:44:24 CEST 2015


On 21/06/15 16:54, Petri Hintukainen wrote:
> On pe, 2015-06-12 at 22:12 +0200, Richard Hulme wrote:
>> Hello,
>>
>> How exactly should the BD_OVERLAY_CLEAR and BD_OVERLAY_WIPE commands be
>> implemented?
>
> There's an example implementation in
> player_wrappers/xine/input_bluray.c
>
>> The contents of the overlay are 8-bit indexes to a palette.  Each pixel
>> cannot do anything other than reference an entry in the palette but if
>> the contents of the palette can be set to anything, how can you ensure
>> that a pixel has been cleared?
>>
>> The palette could be scanned to find a transparent entry, but is there a
>> guarantee that at least one entry will be transparent?  I could imagine
>> it's likely but not necessarily guaranteed.
>
> Palette entry 0xff is reserved for (transparent) background. And yes,
> this is clearly missing from API documentation.

Hi Petri,

Ah, excellent!  Thank you.  That makes everything slot into place.

>> I'd be very grateful for an explanation of the design considerations
>> behind these commands (or a pointer to any documentation).
>

<much good stuff snipped>

> It is possible to patch the library to provide only complete ARGB
> frames. This would simplify application side (=only one interface for
> overlays).

<snip>

> This feature is missing because of implementing both interfaces is quite
> simple, and providing HDMV mode graphics as complete frames was never
> requested ... But, I still have the code to convert everything to ARGB
> inside libbluray if you think it would be useful feature.

Personally, I don't think it is necessary.  Whilst having a library do 
everything for you is great from the application developer's point of 
view, I completely understand that this will either (potentially) 
drastically increase the required memory or the amount of work required 
on the library's side (and semi-continuous work at that).

Knowing that entry 0xff is guaranteed to be transparent basically clears 
up the conceptual problem I was having.  Implementing init/clear/wipe is 
then trivial.

Many thanks for the clarification!

Richard.


More information about the libbluray-devel mailing list