[Libva] Filling background pixels with YUV values

Recker, Jon jon.recker at intel.com
Fri Dec 23 00:30:13 UTC 2016


Hello.

When composing several sources into a single output surface, we can specify the color of the background pixels using VAProcPipelineParameterBuffer::output_background_color. According to the documentation, this background color must be a 32-bit ARGB value.

But when the output is a non-RGB format (for example, NV12) it would be helpful if we could set the background color to a constant YUV value instead. Does libva provide any method to do this?

I have tried converting the desired YUV background color to RGB, then setting output_background_color to this RGB value. When the final picture is processed, the background color is converted back to YUV automatically. But the final background color does not necessarily match the requested value, for example when one of the RGB channels is clipped to fit in the range [0,255].

A workaround would be to create a separate full-size NV12 surface and fill it with the desired background color, but for performance reasons it is preferable to avoid this. Any suggestions would be very much appreciated. Thanks.

Jon

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libva/attachments/20161223/a0f73c58/attachment.html>


More information about the Libva mailing list