summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHaihao Xiang <[email protected]>2023-11-28 12:42:27 +0800
committerHaihao Xiang <[email protected]>2023-12-07 10:32:16 +0800
commitf89cff96d080a238e3b7c7020db08c0f8ed796e4 (patch)
tree00447d76aa69bc1fd20450480aa2c6b1cf3b038e
parente5f8b5313e2993fc53c74a4e58a3b630da7a703e (diff)
lavu/hwcontext_qsv: Make sure hardware vendor is Intel for qsv on d3d11va
When multiple hardwares are available, the default one might not be Intel Hardware. We can use option vendor_id to choose the required vendor. Tested-by: Artem Galin <[email protected]> Signed-off-by: Haihao Xiang <[email protected]>
-rw-r--r--libavutil/hwcontext_qsv.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libavutil/hwcontext_qsv.c b/libavutil/hwcontext_qsv.c
index 7f4a0fda0f..a67552b5ac 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