[Libav-user] avcodec_get_hw_config and QSV

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[Libav-user] avcodec_get_hw_config and QSV

Emmanuel Thivierge
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 [hidden email]


www.realmotion.com


_______________________________________________
Libav-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/libav-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".