[Libva] Filling in surface with black pixels

Gwenole Beauchesne gb.devel at gmail.com
Wed Oct 28 08:37:32 PDT 2015


Hi,

2015-10-27 20:04 GMT+01:00 Ratin <ratin3 at gmail.com>:
> Hi All,
>   Is there an efficient alternate method of filling a surface with lets say
> all black pixels rather than using vaPutsurface with a black background
> image? Trying not to use glx for that because of some issues I am seeing
> mixing glx contexts / swapbuffer calls on windows associated with VAAPI
> surfaces..

An ugly way that might only work with Intel HD Graphics VA drivers,
i.e. a VA driver that supports VPP, is to use the
output_background_color with a small 16x16 VA surface placed in the
middle. An alternative is to create a black surface that you generate
once but use it as source to copy to the target. You could also have
the option to generate once a small VA surface and use the fast
scaling option to fit your target VA surface.

Not perfect, but should be faster than the other ways through
vaPutImage() for instance.

BTW, why would you need to do that -- I mean, filling a surface with
black pixels?

Regards,
-- 
Gwenole Beauchesne
Intel Corporation SAS / 2 rue de Paris, 92196 Meudon Cedex, France
Registration Number (RCS): Nanterre B 302 456 199


More information about the Libva mailing list