<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hello i am interested in doing hardware accelerated decoding for my
ffmpeg based multimedia program using VA API .... i am kind of a
beginner and does not understand very well as how VAAPI interacts
with ffmpeg libraries .... what i have seen from the source code of
ffmpeg is that some parts of VAAPI (decoding parts) are already
implemented inside ffmpeg source code (libavcodec/vaapi.c and
others) ......<br>
<br>
what i am confused is as how should i activate the VAAPI
acceleration while processing my video via libav* libraries . <br>
<br>
filling up vaapi_context as suggested in api documentation and then
putting vaapi_context into AVCodecContext::hwaccel_context does
nothing ... and AVCodecContext::hwaccel is also empty .... <br>
<br>
as what i have observed from the source code is that libav*
libraries set hwaccel after it recognizes the hardware accelerated
decoder using
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<a class="code"
href="libavcodec_2internal_8h.html#a2168f59dcf72bc6ddd10cddc2ff0b966"
style="color: rgb(70, 101, 162); font-weight: normal;
text-decoration: none; font-family: monospace, fixed; font-size:
13px; font-style: normal; font-variant: normal; letter-spacing:
normal; line-height: 13px; orphans: auto; text-align: start;
text-indent: -53px; text-transform: none; white-space: pre-wrap;
widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;
background-color: rgb(251, 252, 253);">ff_find_hwaccel</a>()
inside
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<a class="code"
href="mpeg12dec_8c.html#a5340d7538dc153223eb4fed064c19423"
style="color: rgb(70, 101, 162); font-weight: normal;
text-decoration: underline; font-family: monospace, fixed;
font-size: 13px; font-style: normal; font-variant: normal;
letter-spacing: normal; line-height: 13px; orphans: auto;
text-align: start; text-indent: -53px; text-transform: none;
white-space: pre-wrap; widows: auto; word-spacing: 0px;
-webkit-text-stroke-width: 0px; background-color: rgb(251, 252,
253);">setup_hwaccel_for_pixfmt</a>() function. ff_find_hwaccel()
compares both codec id and pixelformat to detect which hardware
accelerator to load ... ff_find_hwaccel() searches for codec id and
pixelfromat described in AVCodecContext to find out what harware
accelerator to use . in case for mpeg2 codec ff_find_hwaccel()
searches for codec id of mpeg2 and pixelformat "
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<em style="color: rgb(0, 0, 0); font-family: Roboto, sans-serif;
font-size: 14px; font-variant: normal; font-weight: normal;
letter-spacing: normal; line-height: 22px; orphans: auto;
text-align: start; text-indent: 0px; text-transform: none;
white-space: nowrap; widows: auto; word-spacing: 0px;
-webkit-text-stroke-width: 0px; background-color: rgb(255, 255,
255);">PIX_FMT_VAAPI_VLD" </em><span style="color: rgb(0, 0, 0);
font-family: Roboto, sans-serif; font-size: 14px; font-variant:
normal; font-weight: normal; letter-spacing: normal; line-height:
22px; orphans: auto; text-align: start; text-indent: 0px;
text-transform: none; white-space: nowrap; widows: auto;
word-spacing: 0px; -webkit-text-stroke-width: 0px;
background-color: rgb(255, 255, 255);">inside AVCodecContext .
ff_find_hwaccel() is successful in finding the mpeg2 codec id
inside AVCodecContext structure returned from AVFormatContext<br>
but it fails to find the "PIX_FMT_VAAPI_VLD" and does not
activate the hardware acceleration ....<br>
<br>
what i need to know is what should i do to activate the VAAPI
hardware acceleration , a simple example would be helpful , and
please also don't prescribe me to see splited deskop examples <br>
or look at the code of VLC play and MPlayer . </span><span
style="color: rgb(37, 53, 85); font-family: Roboto, sans-serif;
font-size: 14px; font-style: normal; font-variant: normal;
font-weight: bold; letter-spacing: normal; line-height: 22px;
orphans: auto; text-align: start; text-indent: 0px;
text-transform: none; white-space: nowrap; widows: auto;
word-spacing: 0px; -webkit-text-stroke-width: 0px;
background-color: rgb(226, 232, 242); display: inline !important;
float: none;"></span>
</body>
</html>