[Libva] vaPutSurface blend with UI controls

Yuan, Shengquan shengquan.yuan at gmail.com
Mon Jan 25 02:09:09 PST 2010


To get the the attached video+UI controls blending effect
(ui-blend.PNG), we have several ways:

1) vaPutSurface render to a pixmap, then use GLX_TFP/GL to blend
pros: no new interface is needed
cons: not all players support GL. for every frame, need additional
blit (video->pixmap, pixmap->drawable)

2) use VA subpicture interface: put UI controls to subpicture, then
blend with surface
pros: also no new interface is needed
cons: it may be a burden for players to load UI controls as VA
subpicture. I am not sure how player response the event if the control
is pushed.

3) vaPutSurface with new flag VA_BLEND_DRAWABLE_ALPHA: this flag
indicates the surface content should blend with drawble content using
drawable alpha.  Player should clear the alpha to 0 if it wants to get
a opaque video. vaPutSurface shouldn't alter the drawable alpha value,
so that the subsequent vaPutSurface still can blend with the UI
control without any drawable content modification
pros: it is easy for player?
cons: new vaPutSurface flag

4) vaPutSurface with new flag VA_BLEND_SURFACE_GLOBAL_ALAPH: compared
with 3), the alpha is provide by player/VA. Player should clear the
drawable color to 0 if it wants to get a opaque video. Before every
vaPutSurface, the implementation may change drawable content, so
player need to re-clear the drawable color every time
pros: no obvious pros compared with 3)
cons: player needs to clear the drawable every time.

Which one is better if thinking about it from player perspective, 3)?

Thanks
Austin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ui-blend.GIF
Type: image/gif
Size: 11948 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/libva/attachments/20100125/64c09b79/attachment.gif 


More information about the Libva mailing list