mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-30 20:59:44 +00:00
d3d12decoder: Disable d3d11 interop
It does not seem to work with some AMD iGPU Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5812>
This commit is contained in:
parent
7afa914054
commit
7471db9a30
2 changed files with 4 additions and 24 deletions
|
@ -11298,7 +11298,7 @@
|
||||||
"presence": "always"
|
"presence": "always"
|
||||||
},
|
},
|
||||||
"src": {
|
"src": {
|
||||||
"caps": "video/x-raw(memory:D3D12Memory):\n format: { NV12, P010_10LE }\n width: [ 1, 16384 ]\n height: [ 1, 16384 ]\n\nvideo/x-raw(memory:D3D11Memory):\n format: { NV12, P010_10LE }\n width: [ 1, 16384 ]\n height: [ 1, 16384 ]\nvideo/x-raw:\n format: { NV12, P010_10LE }\n width: [ 1, 16384 ]\n height: [ 1, 16384 ]\n",
|
"caps": "video/x-raw(memory:D3D12Memory):\n format: { NV12, P010_10LE }\n width: [ 1, 16384 ]\n height: [ 1, 16384 ]\nvideo/x-raw:\n format: { NV12, P010_10LE }\n width: [ 1, 16384 ]\n height: [ 1, 16384 ]\n",
|
||||||
"direction": "src",
|
"direction": "src",
|
||||||
"presence": "always"
|
"presence": "always"
|
||||||
}
|
}
|
||||||
|
@ -11397,7 +11397,7 @@
|
||||||
"presence": "always"
|
"presence": "always"
|
||||||
},
|
},
|
||||||
"src": {
|
"src": {
|
||||||
"caps": "video/x-raw(memory:D3D12Memory):\n format: NV12\n width: [ 1, 4096 ]\n height: [ 1, 4096 ]\n\nvideo/x-raw(memory:D3D11Memory):\n format: NV12\n width: [ 1, 4096 ]\n height: [ 1, 4096 ]\nvideo/x-raw:\n format: NV12\n width: [ 1, 4096 ]\n height: [ 1, 4096 ]\n",
|
"caps": "video/x-raw(memory:D3D12Memory):\n format: NV12\n width: [ 1, 4096 ]\n height: [ 1, 4096 ]\nvideo/x-raw:\n format: NV12\n width: [ 1, 4096 ]\n height: [ 1, 4096 ]\n",
|
||||||
"direction": "src",
|
"direction": "src",
|
||||||
"presence": "always"
|
"presence": "always"
|
||||||
}
|
}
|
||||||
|
@ -11469,7 +11469,7 @@
|
||||||
"presence": "always"
|
"presence": "always"
|
||||||
},
|
},
|
||||||
"src": {
|
"src": {
|
||||||
"caps": "video/x-raw(memory:D3D12Memory):\n format: { NV12, P010_10LE }\n width: [ 1, 16384 ]\n height: [ 1, 16384 ]\n\nvideo/x-raw(memory:D3D11Memory):\n format: { NV12, P010_10LE }\n width: [ 1, 16384 ]\n height: [ 1, 16384 ]\nvideo/x-raw:\n format: { NV12, P010_10LE }\n width: [ 1, 16384 ]\n height: [ 1, 16384 ]\n",
|
"caps": "video/x-raw(memory:D3D12Memory):\n format: { NV12, P010_10LE }\n width: [ 1, 16384 ]\n height: [ 1, 16384 ]\nvideo/x-raw:\n format: { NV12, P010_10LE }\n width: [ 1, 16384 ]\n height: [ 1, 16384 ]\n",
|
||||||
"direction": "src",
|
"direction": "src",
|
||||||
"presence": "always"
|
"presence": "always"
|
||||||
}
|
}
|
||||||
|
@ -11541,7 +11541,7 @@
|
||||||
"presence": "always"
|
"presence": "always"
|
||||||
},
|
},
|
||||||
"src": {
|
"src": {
|
||||||
"caps": "video/x-raw(memory:D3D12Memory):\n format: { NV12, P010_10LE }\n width: [ 1, 16384 ]\n height: [ 1, 16384 ]\n\nvideo/x-raw(memory:D3D11Memory):\n format: { NV12, P010_10LE }\n width: [ 1, 16384 ]\n height: [ 1, 16384 ]\nvideo/x-raw:\n format: { NV12, P010_10LE }\n width: [ 1, 16384 ]\n height: [ 1, 16384 ]\n",
|
"caps": "video/x-raw(memory:D3D12Memory):\n format: { NV12, P010_10LE }\n width: [ 1, 16384 ]\n height: [ 1, 16384 ]\nvideo/x-raw:\n format: { NV12, P010_10LE }\n width: [ 1, 16384 ]\n height: [ 1, 16384 ]\n",
|
||||||
"direction": "src",
|
"direction": "src",
|
||||||
"presence": "always"
|
"presence": "always"
|
||||||
}
|
}
|
||||||
|
|
|
@ -74,9 +74,7 @@ plugin_init (GstPlugin * plugin)
|
||||||
ID3D12Device *device_handle;
|
ID3D12Device *device_handle;
|
||||||
ComPtr < ID3D12Device4 > device4;
|
ComPtr < ID3D12Device4 > device4;
|
||||||
ComPtr < ID3D12VideoDevice > video_device;
|
ComPtr < ID3D12VideoDevice > video_device;
|
||||||
GstD3D11Device *d3d11_device;
|
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
gint64 luid;
|
|
||||||
gboolean d3d11_interop = FALSE;
|
gboolean d3d11_interop = FALSE;
|
||||||
|
|
||||||
device = gst_d3d12_device_new (i);
|
device = gst_d3d12_device_new (i);
|
||||||
|
@ -96,24 +94,6 @@ plugin_init (GstPlugin * plugin)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
g_object_get (device, "adapter-luid", &luid, nullptr);
|
|
||||||
d3d11_device = gst_d3d11_device_new_for_adapter_luid (luid,
|
|
||||||
D3D11_CREATE_DEVICE_BGRA_SUPPORT);
|
|
||||||
|
|
||||||
/* Enable d3d11 interop only if extended NV12 shared texture feature
|
|
||||||
* is supported by GPU */
|
|
||||||
if (d3d11_device) {
|
|
||||||
ID3D11Device *d3d11_handle =
|
|
||||||
gst_d3d11_device_get_device_handle (d3d11_device);
|
|
||||||
D3D11_FEATURE_DATA_D3D11_OPTIONS4 option4 = { FALSE };
|
|
||||||
hr = d3d11_handle->CheckFeatureSupport (D3D11_FEATURE_D3D11_OPTIONS4,
|
|
||||||
&option4, sizeof (D3D11_FEATURE_DATA_D3D11_OPTIONS4));
|
|
||||||
if (SUCCEEDED (hr) && option4.ExtendedNV12SharedTextureSupported)
|
|
||||||
d3d11_interop = TRUE;
|
|
||||||
|
|
||||||
gst_object_unref (d3d11_device);
|
|
||||||
}
|
|
||||||
|
|
||||||
gst_d3d12_h264_dec_register (plugin, device, video_device.Get (),
|
gst_d3d12_h264_dec_register (plugin, device, video_device.Get (),
|
||||||
GST_RANK_NONE, d3d11_interop);
|
GST_RANK_NONE, d3d11_interop);
|
||||||
gst_d3d12_h265_dec_register (plugin, device, video_device.Get (),
|
gst_d3d12_h265_dec_register (plugin, device, video_device.Get (),
|
||||||
|
|
Loading…
Reference in a new issue