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:[email protected]]
Sent: Tuesday, January 29, 2013 11:40 AM
To: Li, Xiaowei A
Cc: [email protected]
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 
<[email protected]<mailto:[email protected]>> 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>[email protected]<mailto:[email protected]>
 
[mailto:libva-bounces+xiaowei.a.li<mailto:libva-bounces%2Bxiaowei.a.li>[email protected]<mailto:[email protected]>]
 On Behalf Of Ratin
Sent: Tuesday, January 29, 2013 6:19 AM
To: [email protected]<mailto:[email protected]>
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

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

Reply via email to