[Libva] VAConfigAttribRTFormat

Li, Xiaowei A xiaowei.a.li at intel.com
Mon Jan 28 20:13:43 PST 2013


Yes, it should be like this, if you still have concern, you can map the surface out and dump to one bmp file to check.

From: Ratin [mailto:ratin3 at gmail.com]
Sent: Tuesday, January 29, 2013 11:40 AM
To: Li, Xiaowei A
Cc: Libva at lists.freedesktop.org
Subject: Re: [Libva] VAConfigAttribRTFormat

Awesome, the decoder I am working with does support it and when i create the surface with BGRA fourcc, the decoding still happens - so I am assuming if I get the decoded bistream, the data  will already be packed in BGRA format - correct ?
Thanks a bunch!
Ratin

On Mon, Jan 28, 2013 at 5:32 PM, Li, Xiaowei A <xiaowei.a.li at intel.com<mailto:xiaowei.a.li at intel.com>> wrote:
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<http://xiaowei.a.li>=intel.com at lists.freedesktop.org<mailto:intel.com at lists.freedesktop.org> [mailto:libva-bounces+xiaowei.a.li<mailto:libva-bounces%2Bxiaowei.a.li>=intel.com at lists.freedesktop.org<mailto:intel.com at lists.freedesktop.org>] On Behalf Of Ratin
Sent: Tuesday, January 29, 2013 6:19 AM
To: Libva at lists.freedesktop.org<mailto: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/a00f7b17/attachment-0001.html>


More information about the Libva mailing list