<div dir="ltr"><div><div>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 ? <br>
<br></div>Thanks a bunch!<br><br></div>Ratin<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jan 28, 2013 at 5:32 PM, Li, Xiaowei A <span dir="ltr"><<a href="mailto:xiaowei.a.li@intel.com" target="_blank">xiaowei.a.li@intel.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div link="blue" vlink="purple" lang="ZH-CN">
<div>
<p class="MsoNormal" style="text-indent:21.0pt"><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US">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.<u></u><u></u></span></p>

<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US">         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.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US">         Usually , video decoder only support YUV420 as decoding output, one color conversion is need to get BGRA surface.<u></u><u></u></span></p>

<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US">Thanks,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US">Xiaowei<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"" lang="EN-US">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"" lang="EN-US"> libva-bounces+<a href="http://xiaowei.a.li" target="_blank">xiaowei.a.li</a>=<a href="mailto:intel.com@lists.freedesktop.org" target="_blank">intel.com@lists.freedesktop.org</a> [mailto:<a href="mailto:libva-bounces%2Bxiaowei.a.li" target="_blank">libva-bounces+xiaowei.a.li</a>=<a href="mailto:intel.com@lists.freedesktop.org" target="_blank">intel.com@lists.freedesktop.org</a>]
<b>On Behalf Of </b>Ratin<br>
<b>Sent:</b> Tuesday, January 29, 2013 6:19 AM<br>
<b>To:</b> <a href="mailto:Libva@lists.freedesktop.org" target="_blank">Libva@lists.freedesktop.org</a><br>
<b>Subject:</b> [Libva] VAConfigAttribRTFormat<u></u><u></u></span></p><div><div class="h5">
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span lang="EN-US">Hi got a question:
<br>
<br>
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? 
<br>
<br>
<br>
<u></u><u></u></span></p>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span lang="EN-US">/* attribute value for VAConfigAttribRTFormat */<br>
#define VA_RT_FORMAT_YUV420    0x00000001    <br>
#define VA_RT_FORMAT_YUV422    0x00000002<br>
#define VA_RT_FORMAT_YUV444    0x00000004<br>
#define VA_RT_FORMAT_YUV411    0x00000008<br>
#define VA_RT_FORMAT_YUV400    0x00000010<br>
#define VA_RT_FORMAT_RGB16    0x00010000<br>
#define VA_RT_FORMAT_RGB32    0x00020000<br>
#define VA_RT_FORMAT_PROTECTED    0x80000000<br>
<br>
<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span lang="EN-US">Thanks<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US">Ratin<u></u><u></u></span></p>
</div>
</div>
</div></div></div>
</div>

</blockquote></div><br></div>