Message ID | 20231124054348.3115276-3-haihao.xiang@intel.com |
---|---|
State | New |
Headers | show |
Series | [FFmpeg-devel,1/3] lavu/hwcontext_d3d11va: Add option vendor_id | expand |
Context | Check | Description |
---|---|---|
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
Quoting Xiang, Haihao (2023-11-24 06:43:48) > From: Haihao Xiang <haihao.xiang@intel.com> > > When multiple hardware are available, the default one might not be > Intel Hareware. We can use option vendor_id to choose the required > vendor. > > Tested-by: Artem Galin <artem.galin@intel.com> > Signed-off-by: Haihao Xiang <haihao.xiang@intel.com> > --- > libavutil/hwcontext_qsv.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/libavutil/hwcontext_qsv.c b/libavutil/hwcontext_qsv.c > index 1bfda9e69b..7a9cd0cc37 100644 > --- a/libavutil/hwcontext_qsv.c > +++ b/libavutil/hwcontext_qsv.c > @@ -2200,6 +2200,12 @@ static int qsv_device_create(AVHWDeviceContext *ctx, const char *device, > #endif > #if CONFIG_D3D11VA > case AV_HWDEVICE_TYPE_D3D11VA: > + { Useless braces.
On So, 2023-11-26 at 11:51 +0100, Anton Khirnov wrote: > Quoting Xiang, Haihao (2023-11-24 06:43:48) > > From: Haihao Xiang <haihao.xiang@intel.com> > > > > When multiple hardware are available, the default one might not be > > Intel Hareware. We can use option vendor_id to choose the required > > vendor. > > > > Tested-by: Artem Galin <artem.galin@intel.com> > > Signed-off-by: Haihao Xiang <haihao.xiang@intel.com> > > --- > > libavutil/hwcontext_qsv.c | 6 ++++++ > > 1 file changed, 6 insertions(+) > > > > diff --git a/libavutil/hwcontext_qsv.c b/libavutil/hwcontext_qsv.c > > index 1bfda9e69b..7a9cd0cc37 100644 > > --- a/libavutil/hwcontext_qsv.c > > +++ b/libavutil/hwcontext_qsv.c > > @@ -2200,6 +2200,12 @@ static int qsv_device_create(AVHWDeviceContext *ctx, > > const char *device, > > #endif > > #if CONFIG_D3D11VA > > case AV_HWDEVICE_TYPE_D3D11VA: > > + { > > Useless braces. Yes, they are useless. Adding braces here is to keep the code style consistent in this file. Thanks Haihao >
diff --git a/libavutil/hwcontext_qsv.c b/libavutil/hwcontext_qsv.c index 1bfda9e69b..7a9cd0cc37 100644 --- a/libavutil/hwcontext_qsv.c +++ b/libavutil/hwcontext_qsv.c @@ -2200,6 +2200,12 @@ static int qsv_device_create(AVHWDeviceContext *ctx, const char *device, #endif #if CONFIG_D3D11VA case AV_HWDEVICE_TYPE_D3D11VA: + { + // Make sure the hardware vendor is Intel when multiple devices are + // available, it will be ignored if user specifies the child device + // explicitly + av_dict_set(&child_device_opts, "vendor_id", "0x8086", 0); + } break; #endif #if CONFIG_DXVA2