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

<<attachment: ui-blend.GIF>>

_______________________________________________
Libva mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libva

Reply via email to