<div dir="ltr">Hi everyone,<div><br></div><div>I am trying to use FFmpeg to decode a video using hardware acceleration. So far all is well, using examples as a guideline I was able to implement the d3d11va way. Now I'd like to also have the intel QSV way. but it seems there is an "API mismatch"</div><div><br></div><div>For dxva2, d3d11va2, nvdec, vaapi,..., I can use avcodec_get_hw_config to get the hw config and setup the get_format callback if necessary and get the pix_fmt. but Qsv is not there.<br><br>Not that I have a build that includes QSV as I can see h264_qsv when I do FFmpeg -decoders. That is another thing the decoder name is "h264_qsv" instead of "h264" for the DirectX variant.</div><div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><br></div><div dir="ltr">I use avcodec_parameters_to_context and avcodec_find_decoderto get my AVCodec, following the examples.</div><div dir="ltr"><br></div><div dir="ltr">I don't know if there were reason to have the qsv implementation not follow the same way FFmpeg setup the codec, the example uses  avcodec_find_decoder_by_name  but that is not really practical when I don't control the input video.<br><br>now I'd like to know what is the recommended way to open the AvCodec, 

AvCodecContext and do the setup for the hardware acceleration so that the code is unified and minimize specific code. It seems QSV is alone in the way things are done to set it up.<br><div><br></div><div>Thanks a lot for your wisdom.</div><div><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:9.5pt;font-family:Arial;color:rgb(136,136,136);font-weight:700;vertical-align:baseline;white-space:pre-wrap">__</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><br></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:9.5pt;font-family:Arial;color:rgb(136,136,136);font-weight:700;vertical-align:baseline;white-space:pre-wrap"></span></p><div><br></div><div><img src="cid:ii_jly3aw6m1_165ca097dcba61a6" width="264" height="23" style="margin-right:0px"><br></div><p></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="background-color:transparent;color:rgb(52,52,52);font-family:Arial;font-size:10pt;font-weight:700;white-space:pre-wrap">EMMANUEL THIVIERGE </span><br></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:9.5pt;font-family:Arial;color:rgb(52,52,52);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">Software Developer</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"> </p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:9.5pt;font-family:Arial;color:rgb(128,128,128);background-color:transparent;font-weight:700;vertical-align:baseline;white-space:pre-wrap">T  </span><span style="font-size:9.5pt;font-family:Arial;color:rgb(128,128,128);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">1 855 454 2095</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:9.5pt;font-family:Arial;color:rgb(128,128,128);background-color:transparent;font-weight:700;vertical-align:baseline;white-space:pre-wrap">E  </span><a href="mailto:ethivierge@realmotion.com" style="color:rgb(17,85,204)" target="_blank"><span style="font-size:10pt;font-family:Arial;color:rgb(128,128,128);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">ethivierge@realmotion.com</span></a></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><br></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><a href="http://www.realmotion.com/" style="color:rgb(17,85,204)" target="_blank"><span style="font-size:10pt;font-family:Arial;color:rgb(128,128,128);background-color:transparent;font-weight:700;vertical-align:baseline;white-space:pre-wrap">www.realmotion.com</span></a></p></div></div></div></div></div></div>