[Libva] VAConfigAttribRTFormat

Li, Xiaowei A xiaowei.a.li at intel.com
Mon Jan 28 17:32:58 PST 2013


According to  my understanding, VAConfigAttribRTFormat is used to describe the surface sample format, for example YUV420 , YUV422, RGB32, and VASurfaceAtrribPixelFormat aims to specify the detailed pixel storage layout,  for example,  one YUV420 surface can be stored with YV12/NV12/I420 pixel format and one RGB32 surface can be stored with RGBA/ARGB pixel format.
         You can query whether VA_RT_FORMAT_RGB32 is supported as a render target format through "vaGetConfigAttributes()", if supported, you can specify the BGRA fourcc when creating a render target surface.
         Usually , video decoder only support YUV420 as decoding output, one color conversion is need to get BGRA surface.

Thanks,
Xiaowei

From: libva-bounces+xiaowei.a.li=intel.com at lists.freedesktop.org [mailto:libva-bounces+xiaowei.a.li=intel.com at lists.freedesktop.org] On Behalf Of Ratin
Sent: Tuesday, January 29, 2013 6:19 AM
To: Libva at lists.freedesktop.org
Subject: [Libva] VAConfigAttribRTFormat

Hi got a question:

I noticed that the #define values for for VAConfigAttribRTFormat in VAConfigAttrib does not include BGRA or ARGB formats (it does RGB 16 and RGB32), but the VASurfaceAttrib's VASurfaceAttribPixelFormat does allow it thru a four_cc value. Does that mean I can't decode the H.264 bitstream data directly to a BGRA surface, I have to convert explicitly?


/* attribute value for VAConfigAttribRTFormat */
#define VA_RT_FORMAT_YUV420    0x00000001
#define VA_RT_FORMAT_YUV422    0x00000002
#define VA_RT_FORMAT_YUV444    0x00000004
#define VA_RT_FORMAT_YUV411    0x00000008
#define VA_RT_FORMAT_YUV400    0x00000010
#define VA_RT_FORMAT_RGB16    0x00010000
#define VA_RT_FORMAT_RGB32    0x00020000
#define VA_RT_FORMAT_PROTECTED    0x80000000

Thanks
Ratin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libva/attachments/20130129/a8b2c90b/attachment.html>


More information about the Libva mailing list