<div dir="ltr"><br><br><div class="gmail_extra"><div class="gmail_quote">On Mon, Jan 28, 2013 at 8:13 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:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">





<div link="blue" vlink="purple" lang="ZH-CN">
<div>
<p class=""><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:rgb(31,73,125)" lang="EN-US">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.<u></u><u></u></span></p>

<p class=""><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:rgb(31,73,125)" lang="EN-US"><u></u> <u></u></span></p>
<p class=""><b><span style="font-size:10pt;font-family:"Tahoma","sans-serif"" lang="EN-US">From:</span></b><span style="font-size:10pt;font-family:"Tahoma","sans-serif"" lang="EN-US"> Ratin [mailto:<a href="mailto:ratin3@gmail.com" target="_blank">ratin3@gmail.com</a>]
<br>
<b>Sent:</b> Tuesday, January 29, 2013 11:40 AM<br>
<b>To:</b> Li, Xiaowei A<br>
<b>Cc:</b> <a href="mailto:Libva@lists.freedesktop.org" target="_blank">Libva@lists.freedesktop.org</a><br>
<b>Subject:</b> Re: [Libva] VAConfigAttribRTFormat<u></u><u></u></span></p><div><div class="h5">
<p class=""><span lang="EN-US"><u></u> <u></u></span></p>
<div>
<div>
<div>
<p class="" style="margin-bottom:12pt"><span lang="EN-US">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 ? <u></u><u></u></span></p>
</div>
<p class="" style="margin-bottom:12pt"><span lang="EN-US">Thanks a bunch!<u></u><u></u></span></p>
</div>
<p class=""><span lang="EN-US">Ratin<u></u><u></u></span></p>
</div>
<div>
<p class="" style="margin-bottom:12pt"><span lang="EN-US"><u></u></span></p></div></div></div></div></div></blockquote><div><br>I believe that I was mistaken when I said "<span lang="EN-US">the decoder I am working with does support it", as the attrib value I get from the query function is actually just 1 (VA_RT_FORMAT_YUV420)  </span></div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div link="blue" vlink="purple" lang="ZH-CN"><div><div><div class="h5"><div>
<div>
<p class=""><span lang="EN-US"></span></p></div></div></div></div></div></div></blockquote><div>attrib.type = VAConfigAttribRTFormat;<br>vaGetConfigAttributes(pVAAPICNTX->vaDisplay, VAProfile, VAEntrypointVLD, &attrib, 1);<br>
<br><br>(gdb) p attrib<br>$1 = {type = VAConfigAttribRTFormat, value = 1}<br><br><br></div><div>Is there a Intel HD Graphics chip model that supports directly decoding to BGRA format surfaces? <br></div><div> <br><br></div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div link="blue" vlink="purple" lang="ZH-CN"><div><div><div class="h5"><div><div><p class=""><span lang="EN-US">On Mon, Jan 28, 2013 at 5:32 PM, Li, Xiaowei A <<a href="mailto:xiaowei.a.li@intel.com" target="_blank">xiaowei.a.li@intel.com</a>> wrote:<u></u><u></u></span></p>

<div>
<div>
<p class="" style="text-indent:21pt">
<span style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:rgb(31,73,125)" 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.</span><span lang="EN-US"><u></u><u></u></span></p>

<p class=""><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:rgb(31,73,125)" 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.</span><span lang="EN-US"><u></u><u></u></span></p>
<p class=""><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:rgb(31,73,125)" lang="EN-US">         Usually , video decoder only support YUV420 as decoding output, one color conversion
 is need to get BGRA surface.</span><span lang="EN-US"><u></u><u></u></span></p>
<p class=""><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:rgb(31,73,125)" lang="EN-US"> </span><span lang="EN-US"><u></u><u></u></span></p>
<p class=""><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:rgb(31,73,125)" lang="EN-US">Thanks,</span><span lang="EN-US"><u></u><u></u></span></p>
<p class=""><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:rgb(31,73,125)" lang="EN-US">Xiaowei</span><span lang="EN-US"><u></u><u></u></span></p>
<p class=""><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:rgb(31,73,125)" lang="EN-US"> </span><span lang="EN-US"><u></u><u></u></span></p>
<p class=""><b><span style="font-size:10pt;font-family:"Tahoma","sans-serif"" lang="EN-US">From:</span></b><span style="font-size:10pt;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</span><span lang="EN-US"><u></u><u></u></span></p>
<div>
<div>
<p class=""><span lang="EN-US"> <u></u><u></u></span></p>
<div>
<p class="" style="margin-bottom:12pt"><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>
<u></u><u></u></span></p>
<div>
<p class="" style="margin-bottom:12pt"><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<u></u><u></u></span></p>
</div>
<div>
<p class="" style="margin-bottom:12pt"><span lang="EN-US">Thanks<u></u><u></u></span></p>
</div>
<div>
<p class=""><span lang="EN-US">Ratin<u></u><u></u></span></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<p class=""><span lang="EN-US"><u></u> <u></u></span></p>
</div>
</div></div></div>
</div>

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