[Libav-user] avcodec_get_hw_config and QSV

Emmanuel Thivierge ethivierge at float4.com
Wed Feb 5 20:58:20 EET 2020


Hi everyone,

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"

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.

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.

I use avcodec_parameters_to_context and avcodec_find_decoderto get my
AVCodec, following the examples.

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.

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.

Thanks a lot for your wisdom.

__




EMMANUEL THIVIERGE

Software Developer



T 1 855 454 2095

E ethivierge at realmotion.com


www.realmotion.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://ffmpeg.org/pipermail/libav-user/attachments/20200205/5ace6c47/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: RM_logo2017_Primary_BlackTM_Cropped.png
Type: image/png
Size: 34375 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/libav-user/attachments/20200205/5ace6c47/attachment.png>


More information about the Libav-user mailing list