[FFmpeg-devel] [PATCH] lavc/qsvdec: allow qsv decoders to use initialized device

Rogozhkin, Dmitry V dmitry.v.rogozhkin at intel.com
Thu Sep 3 04:02:19 EEST 2020


On Wed, 2020-09-02 at 20:37 +0100, Mark Thompson wrote:
> > In general, per my taste, I would try to use the following device
> > specification working with QSV on Linux across all command lines:
> > 
> > -init_hw_device vaapi=va:/dev/dri/renderD129 -init_hw_device 
> > qsv=hw at va
> > -filter_hw_device hw
> > 
> > My primary goal is to make it workable for all pipelines. Hence
> > current
> > patch.
> 
> Implementing AV_HW_CONFIG_METHOD_HW_DEVICE_CTX would make sense to
> allow the legacy decoders to use normal device selection, but your
> patch seems to just set the flag indicating support without actually
> implementing the feature?

Because feature just worked as soon as I added flag indicating the
support. For what I see in the code, implementation is already there,
it just was not properly enabled. Here it is:
https://github.com/FFmpeg/FFmpeg/blob/7b1ed4b53a4b32865dd9990f555929e803f64b64/libavcodec/qsvdec.c#L130. It seems you Mark was original author of this piece of code, but
later it was patched by Zhong. Can you folks try to evaluate whether
current implementation is enough? We've give it a try via our CI
regression tests which all pass (Linux only). This gives some assurity,
but still.

> 
> (If you do implement it then you can delete all of the ad-hoc
> treatment in ffmpeg, like has been done for the other hardware
> codecs.)

I like deleting code:). Ok, this sounds good. Let's try to understand
what might be missing in the current implementation since I honestly
don't see any gaps - it just works.




More information about the ffmpeg-devel mailing list