<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:SimSun;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:SimSun;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:SimSun;
panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="ZH-CN" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal" style="text-indent:21.0pt"><span lang="EN-US" style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1F497D">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.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1F497D"> 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.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1F497D"> Usually , video decoder only support YUV420 as decoding output, one color conversion is need to get BGRA surface.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1F497D">Thanks,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1F497D">Xiaowei<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> libva-bounces+xiaowei.a.li=intel.com@lists.freedesktop.org [mailto:libva-bounces+xiaowei.a.li=intel.com@lists.freedesktop.org]
<b>On Behalf Of </b>Ratin<br>
<b>Sent:</b> Tuesday, January 29, 2013 6:19 AM<br>
<b>To:</b> Libva@lists.freedesktop.org<br>
<b>Subject:</b> [Libva] VAConfigAttribRTFormat<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></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>
<o:p></o:p></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>
<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span lang="EN-US">Thanks<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US">Ratin<o:p></o:p></span></p>
</div>
</div>
</div>
</body>
</html>