<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
What is the question ?<br>
<br>
<div class="moz-cite-prefix">Le 2015-01-12 01:24, Zhao, Halley a
écrit :<br>
</div>
<blockquote
cite="mid:81DD1C3FC6BE1E4EAA454D486F820044020DC775@SHSMSX101.ccr.corp.intel.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<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: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;
text-align:justify;
text-justify:inter-ideograph;
font-size:10.5pt;
font-family:"Calibri","sans-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-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";}
/* Page Definitions */
@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]-->
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US">I have one idea to use
dma_buf for hw video frames; in this way, video codec and
sink can be clearly separated, video codec is simplified as
well.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Since dma_buf is Linux
kernel concept, different hw codecs can share the unique
video sink.</span></p>
</div>
</blockquote>
See GstDMABufAllocator in gst-plugins-base.<br>
<blockquote
cite="mid:81DD1C3FC6BE1E4EAA454D486F820044020DC775@SHSMSX101.ccr.corp.intel.com"
type="cite">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">For additional
explanation,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">We have a core codec
library for VAAPI acceleration interface:
<a moz-do-not-send="true"
href="https://github.com/01org/libyami">https://github.com/01org/libyami</a>,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">it can export hw video
frame as dma_buf handle, then renders it as texture:
<a moz-do-not-send="true"
href="https://github.com/01org/libyami/blob/master/tests/decodeoutput.cpp#L465">https://github.com/01org/libyami/blob/master/tests/decodeoutput.cpp#L465</a><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">another example is: we
added libyami wrapper to ffmpeg for h264 decoder, then an
example player can use dma_buf for video rendering:
<a moz-do-not-send="true"
href="https://github.com/01org/player-ffmpeg-yami">https://github.com/01org/player-ffmpeg-yami</a></span></p>
</div>
</blockquote>
If you want to experiment that (and if it improve the situation)
feel free to propose some code.<br>
<blockquote
cite="mid:81DD1C3FC6BE1E4EAA454D486F820044020DC775@SHSMSX101.ccr.corp.intel.com"
type="cite">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US">
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">besides opengl context,
dri3 protocol supports dma_buf as well, thus legacy video
rendering is fine as well.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
</div>
</blockquote>
Note that this is currently limited to 1 plane (1 FD) when combined
with Mesa/DRM.<br>
<br>
Nicolas<br>
</body>
</html>