d3d11: Add support for YUY2 format

YUY2 is a primary YUV 4:2:2 format for DXVA.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3316>
This commit is contained in:
Seungha Yang 2022-11-03 03:38:33 +09:00
parent 5fe360dec4
commit 3f94df9487
4 changed files with 82 additions and 17 deletions

View file

@ -7323,7 +7323,7 @@
"klass": "Filter/Converter/Video/Hardware",
"pad-templates": {
"sink": {
"caps": "video/x-raw(memory:D3D11Memory):\n format: { RGBA64_LE, RGB10A2_LE, BGRA, RGBA, BGRx, RGBx, VUYA, NV12, NV21, P010_10LE, P012_LE, P016_LE, I420, YV12, I420_10LE, I420_12LE, Y42B, I422_10LE, I422_12LE, Y444, Y444_10LE, Y444_12LE, Y444_16LE, GRAY8, GRAY16_LE, AYUV, AYUV64, Y410 }\n width: [ 1, 16384 ]\n height: [ 1, 16384 ]\n framerate: [ 0/1, 2147483647/1 ]\n\nvideo/x-raw(memory:D3D11Memory, meta:GstVideoOverlayComposition):\n format: { RGBA64_LE, RGB10A2_LE, BGRA, RGBA, BGRx, RGBx, VUYA, NV12, NV21, P010_10LE, P012_LE, P016_LE, I420, YV12, I420_10LE, I420_12LE, Y42B, I422_10LE, I422_12LE, Y444, Y444_10LE, Y444_12LE, Y444_16LE, GRAY8, GRAY16_LE, AYUV, AYUV64, Y410 }\n width: [ 1, 16384 ]\n height: [ 1, 16384 ]\n framerate: [ 0/1, 2147483647/1 ]\n",
"caps": "video/x-raw(memory:D3D11Memory):\n format: { RGBA64_LE, RGB10A2_LE, BGRA, RGBA, BGRx, RGBx, VUYA, NV12, NV21, P010_10LE, P012_LE, P016_LE, I420, YV12, I420_10LE, I420_12LE, Y42B, I422_10LE, I422_12LE, Y444, Y444_10LE, Y444_12LE, Y444_16LE, GRAY8, GRAY16_LE, AYUV, AYUV64, Y410, YUY2 }\n width: [ 1, 16384 ]\n height: [ 1, 16384 ]\n framerate: [ 0/1, 2147483647/1 ]\n\nvideo/x-raw(memory:D3D11Memory, meta:GstVideoOverlayComposition):\n format: { RGBA64_LE, RGB10A2_LE, BGRA, RGBA, BGRx, RGBx, VUYA, NV12, NV21, P010_10LE, P012_LE, P016_LE, I420, YV12, I420_10LE, I420_12LE, Y42B, I422_10LE, I422_12LE, Y444, Y444_10LE, Y444_12LE, Y444_16LE, GRAY8, GRAY16_LE, AYUV, AYUV64, Y410, YUY2 }\n width: [ 1, 16384 ]\n height: [ 1, 16384 ]\n framerate: [ 0/1, 2147483647/1 ]\n",
"direction": "sink",
"presence": "always"
},
@ -7379,7 +7379,7 @@
"klass": "Filter/Editor/Video/Compositor",
"pad-templates": {
"sink_%%u": {
"caps": "video/x-raw(memory:D3D11Memory):\n format: { RGBA64_LE, RGB10A2_LE, BGRA, RGBA, BGRx, RGBx, VUYA, NV12, NV21, P010_10LE, P012_LE, P016_LE, I420, YV12, I420_10LE, I420_12LE, Y42B, I422_10LE, I422_12LE, Y444, Y444_10LE, Y444_12LE, Y444_16LE, GRAY8, GRAY16_LE, AYUV, AYUV64, Y410 }\n width: [ 1, 16384 ]\n height: [ 1, 16384 ]\n framerate: [ 0/1, 2147483647/1 ]\nvideo/x-raw:\n format: { RGBA64_LE, RGB10A2_LE, BGRA, RGBA, BGRx, RGBx, VUYA, NV12, NV21, P010_10LE, P012_LE, P016_LE, I420, YV12, I420_10LE, I420_12LE, Y42B, I422_10LE, I422_12LE, Y444, Y444_10LE, Y444_12LE, Y444_16LE, GRAY8, GRAY16_LE, AYUV, AYUV64, Y410 }\n width: [ 1, 16384 ]\n height: [ 1, 16384 ]\n framerate: [ 0/1, 2147483647/1 ]\n",
"caps": "video/x-raw(memory:D3D11Memory):\n format: { RGBA64_LE, RGB10A2_LE, BGRA, RGBA, BGRx, RGBx, VUYA, NV12, NV21, P010_10LE, P012_LE, P016_LE, I420, YV12, I420_10LE, I420_12LE, Y42B, I422_10LE, I422_12LE, Y444, Y444_10LE, Y444_12LE, Y444_16LE, GRAY8, GRAY16_LE, AYUV, AYUV64, Y410, YUY2 }\n width: [ 1, 16384 ]\n height: [ 1, 16384 ]\n framerate: [ 0/1, 2147483647/1 ]\nvideo/x-raw:\n format: { RGBA64_LE, RGB10A2_LE, BGRA, RGBA, BGRx, RGBx, VUYA, NV12, NV21, P010_10LE, P012_LE, P016_LE, I420, YV12, I420_10LE, I420_12LE, Y42B, I422_10LE, I422_12LE, Y444, Y444_10LE, Y444_12LE, Y444_16LE, GRAY8, GRAY16_LE, AYUV, AYUV64, Y410, YUY2 }\n width: [ 1, 16384 ]\n height: [ 1, 16384 ]\n framerate: [ 0/1, 2147483647/1 ]\n",
"direction": "sink",
"presence": "request",
"type": "GstD3D11CompositorPad"
@ -7440,7 +7440,7 @@
"klass": "Filter/Converter/Scaler/Effect/Video/Hardware",
"pad-templates": {
"sink": {
"caps": "video/x-raw(memory:D3D11Memory):\n format: { RGBA64_LE, RGB10A2_LE, BGRA, RGBA, BGRx, RGBx, VUYA, NV12, NV21, P010_10LE, P012_LE, P016_LE, I420, YV12, I420_10LE, I420_12LE, Y42B, I422_10LE, I422_12LE, Y444, Y444_10LE, Y444_12LE, Y444_16LE, GRAY8, GRAY16_LE, AYUV, AYUV64, Y410 }\n width: [ 1, 16384 ]\n height: [ 1, 16384 ]\n framerate: [ 0/1, 2147483647/1 ]\n\nvideo/x-raw(memory:D3D11Memory, meta:GstVideoOverlayComposition):\n format: { RGBA64_LE, RGB10A2_LE, BGRA, RGBA, BGRx, RGBx, VUYA, NV12, NV21, P010_10LE, P012_LE, P016_LE, I420, YV12, I420_10LE, I420_12LE, Y42B, I422_10LE, I422_12LE, Y444, Y444_10LE, Y444_12LE, Y444_16LE, GRAY8, GRAY16_LE, AYUV, AYUV64, Y410 }\n width: [ 1, 16384 ]\n height: [ 1, 16384 ]\n framerate: [ 0/1, 2147483647/1 ]\n",
"caps": "video/x-raw(memory:D3D11Memory):\n format: { RGBA64_LE, RGB10A2_LE, BGRA, RGBA, BGRx, RGBx, VUYA, NV12, NV21, P010_10LE, P012_LE, P016_LE, I420, YV12, I420_10LE, I420_12LE, Y42B, I422_10LE, I422_12LE, Y444, Y444_10LE, Y444_12LE, Y444_16LE, GRAY8, GRAY16_LE, AYUV, AYUV64, Y410, YUY2 }\n width: [ 1, 16384 ]\n height: [ 1, 16384 ]\n framerate: [ 0/1, 2147483647/1 ]\n\nvideo/x-raw(memory:D3D11Memory, meta:GstVideoOverlayComposition):\n format: { RGBA64_LE, RGB10A2_LE, BGRA, RGBA, BGRx, RGBx, VUYA, NV12, NV21, P010_10LE, P012_LE, P016_LE, I420, YV12, I420_10LE, I420_12LE, Y42B, I422_10LE, I422_12LE, Y444, Y444_10LE, Y444_12LE, Y444_16LE, GRAY8, GRAY16_LE, AYUV, AYUV64, Y410, YUY2 }\n width: [ 1, 16384 ]\n height: [ 1, 16384 ]\n framerate: [ 0/1, 2147483647/1 ]\n",
"direction": "sink",
"presence": "always"
},
@ -7521,7 +7521,7 @@
"klass": "Filter/Effect/Video/Deinterlace/Hardware",
"pad-templates": {
"sink": {
"caps": "video/x-raw(memory:D3D11Memory):\n format: { RGBA64_LE, RGB10A2_LE, BGRA, RGBA, BGRx, RGBx, VUYA, NV12, NV21, P010_10LE, P012_LE, P016_LE, I420, YV12, I420_10LE, I420_12LE, Y42B, I422_10LE, I422_12LE, Y444, Y444_10LE, Y444_12LE, Y444_16LE, GRAY8, GRAY16_LE, AYUV, AYUV64, Y410 }\n width: [ 1, 16384 ]\n height: [ 1, 16384 ]\n\nvideo/x-raw(memory:D3D11Memory, meta:GstVideoOverlayComposition):\n format: { RGBA64_LE, RGB10A2_LE, BGRA, RGBA, BGRx, RGBx, VUYA, NV12, NV21, P010_10LE, P012_LE, P016_LE, I420, YV12, I420_10LE, I420_12LE, Y42B, I422_10LE, I422_12LE, Y444, Y444_10LE, Y444_12LE, Y444_16LE, GRAY8, GRAY16_LE, AYUV, AYUV64, Y410 }\n width: [ 1, 16384 ]\n height: [ 1, 16384 ]\nvideo/x-raw:\n format: { RGBA64_LE, RGB10A2_LE, BGRA, RGBA, BGRx, RGBx, VUYA, NV12, NV21, P010_10LE, P012_LE, P016_LE, I420, YV12, I420_10LE, I420_12LE, Y42B, I422_10LE, I422_12LE, Y444, Y444_10LE, Y444_12LE, Y444_16LE, GRAY8, GRAY16_LE, AYUV, AYUV64, Y410 }\n width: [ 1, 16384 ]\n height: [ 1, 16384 ]\n\nvideo/x-raw(memory:SystemMemory, meta:GstVideoOverlayComposition):\n format: { RGBA64_LE, RGB10A2_LE, BGRA, RGBA, BGRx, RGBx, VUYA, NV12, NV21, P010_10LE, P012_LE, P016_LE, I420, YV12, I420_10LE, I420_12LE, Y42B, I422_10LE, I422_12LE, Y444, Y444_10LE, Y444_12LE, Y444_16LE, GRAY8, GRAY16_LE, AYUV, AYUV64, Y410 }\n width: [ 1, 16384 ]\n height: [ 1, 16384 ]\n",
"caps": "video/x-raw(memory:D3D11Memory):\n format: { RGBA64_LE, RGB10A2_LE, BGRA, RGBA, BGRx, RGBx, VUYA, NV12, NV21, P010_10LE, P012_LE, P016_LE, I420, YV12, I420_10LE, I420_12LE, Y42B, I422_10LE, I422_12LE, Y444, Y444_10LE, Y444_12LE, Y444_16LE, GRAY8, GRAY16_LE, AYUV, AYUV64, Y410, YUY2 }\n width: [ 1, 16384 ]\n height: [ 1, 16384 ]\n\nvideo/x-raw(memory:D3D11Memory, meta:GstVideoOverlayComposition):\n format: { RGBA64_LE, RGB10A2_LE, BGRA, RGBA, BGRx, RGBx, VUYA, NV12, NV21, P010_10LE, P012_LE, P016_LE, I420, YV12, I420_10LE, I420_12LE, Y42B, I422_10LE, I422_12LE, Y444, Y444_10LE, Y444_12LE, Y444_16LE, GRAY8, GRAY16_LE, AYUV, AYUV64, Y410, YUY2 }\n width: [ 1, 16384 ]\n height: [ 1, 16384 ]\nvideo/x-raw:\n format: { RGBA64_LE, RGB10A2_LE, BGRA, RGBA, BGRx, RGBx, VUYA, NV12, NV21, P010_10LE, P012_LE, P016_LE, I420, YV12, I420_10LE, I420_12LE, Y42B, I422_10LE, I422_12LE, Y444, Y444_10LE, Y444_12LE, Y444_16LE, GRAY8, GRAY16_LE, AYUV, AYUV64, Y410, YUY2 }\n width: [ 1, 16384 ]\n height: [ 1, 16384 ]\n\nvideo/x-raw(memory:SystemMemory, meta:GstVideoOverlayComposition):\n format: { RGBA64_LE, RGB10A2_LE, BGRA, RGBA, BGRx, RGBx, VUYA, NV12, NV21, P010_10LE, P012_LE, P016_LE, I420, YV12, I420_10LE, I420_12LE, Y42B, I422_10LE, I422_12LE, Y444, Y444_10LE, Y444_12LE, Y444_16LE, GRAY8, GRAY16_LE, AYUV, AYUV64, Y410, YUY2 }\n width: [ 1, 16384 ]\n height: [ 1, 16384 ]\n",
"direction": "sink",
"presence": "always"
},
@ -7722,12 +7722,12 @@
"klass": "Filter/Video",
"pad-templates": {
"sink": {
"caps": "video/x-raw(memory:D3D11Memory):\n format: { RGBA64_LE, RGB10A2_LE, BGRA, RGBA, BGRx, RGBx, VUYA, NV12, NV21, P010_10LE, P012_LE, P016_LE, I420, YV12, I420_10LE, I420_12LE, Y42B, I422_10LE, I422_12LE, Y444, Y444_10LE, Y444_12LE, Y444_16LE, GRAY8, GRAY16_LE, AYUV, AYUV64, Y410 }\n width: [ 1, 16384 ]\n height: [ 1, 16384 ]\n framerate: [ 0/1, 2147483647/1 ]\n\nvideo/x-raw(memory:D3D11Memory, meta:GstVideoOverlayComposition):\n format: { RGBA64_LE, RGB10A2_LE, BGRA, RGBA, BGRx, RGBx, VUYA, NV12, NV21, P010_10LE, P012_LE, P016_LE, I420, YV12, I420_10LE, I420_12LE, Y42B, I422_10LE, I422_12LE, Y444, Y444_10LE, Y444_12LE, Y444_16LE, GRAY8, GRAY16_LE, AYUV, AYUV64, Y410 }\n width: [ 1, 16384 ]\n height: [ 1, 16384 ]\n framerate: [ 0/1, 2147483647/1 ]\nvideo/x-raw:\n format: { RGBA64_LE, RGB10A2_LE, BGRA, RGBA, BGRx, RGBx, VUYA, NV12, NV21, P010_10LE, P012_LE, P016_LE, I420, YV12, I420_10LE, I420_12LE, Y42B, I422_10LE, I422_12LE, Y444, Y444_10LE, Y444_12LE, Y444_16LE, GRAY8, GRAY16_LE, AYUV, AYUV64, Y410 }\n width: [ 1, 16384 ]\n height: [ 1, 16384 ]\n framerate: [ 0/1, 2147483647/1 ]\n\nvideo/x-raw(memory:SystemMemory, meta:GstVideoOverlayComposition):\n format: { RGBA64_LE, RGB10A2_LE, BGRA, RGBA, BGRx, RGBx, VUYA, NV12, NV21, P010_10LE, P012_LE, P016_LE, I420, YV12, I420_10LE, I420_12LE, Y42B, I422_10LE, I422_12LE, Y444, Y444_10LE, Y444_12LE, Y444_16LE, GRAY8, GRAY16_LE, AYUV, AYUV64, Y410 }\n width: [ 1, 16384 ]\n height: [ 1, 16384 ]\n framerate: [ 0/1, 2147483647/1 ]\n",
"caps": "video/x-raw(memory:D3D11Memory):\n format: { RGBA64_LE, RGB10A2_LE, BGRA, RGBA, BGRx, RGBx, VUYA, NV12, NV21, P010_10LE, P012_LE, P016_LE, I420, YV12, I420_10LE, I420_12LE, Y42B, I422_10LE, I422_12LE, Y444, Y444_10LE, Y444_12LE, Y444_16LE, GRAY8, GRAY16_LE, AYUV, AYUV64, Y410, YUY2 }\n width: [ 1, 16384 ]\n height: [ 1, 16384 ]\n framerate: [ 0/1, 2147483647/1 ]\n\nvideo/x-raw(memory:D3D11Memory, meta:GstVideoOverlayComposition):\n format: { RGBA64_LE, RGB10A2_LE, BGRA, RGBA, BGRx, RGBx, VUYA, NV12, NV21, P010_10LE, P012_LE, P016_LE, I420, YV12, I420_10LE, I420_12LE, Y42B, I422_10LE, I422_12LE, Y444, Y444_10LE, Y444_12LE, Y444_16LE, GRAY8, GRAY16_LE, AYUV, AYUV64, Y410, YUY2 }\n width: [ 1, 16384 ]\n height: [ 1, 16384 ]\n framerate: [ 0/1, 2147483647/1 ]\nvideo/x-raw:\n format: { RGBA64_LE, RGB10A2_LE, BGRA, RGBA, BGRx, RGBx, VUYA, NV12, NV21, P010_10LE, P012_LE, P016_LE, I420, YV12, I420_10LE, I420_12LE, Y42B, I422_10LE, I422_12LE, Y444, Y444_10LE, Y444_12LE, Y444_16LE, GRAY8, GRAY16_LE, AYUV, AYUV64, Y410, YUY2 }\n width: [ 1, 16384 ]\n height: [ 1, 16384 ]\n framerate: [ 0/1, 2147483647/1 ]\n\nvideo/x-raw(memory:SystemMemory, meta:GstVideoOverlayComposition):\n format: { RGBA64_LE, RGB10A2_LE, BGRA, RGBA, BGRx, RGBx, VUYA, NV12, NV21, P010_10LE, P012_LE, P016_LE, I420, YV12, I420_10LE, I420_12LE, Y42B, I422_10LE, I422_12LE, Y444, Y444_10LE, Y444_12LE, Y444_16LE, GRAY8, GRAY16_LE, AYUV, AYUV64, Y410, YUY2 }\n width: [ 1, 16384 ]\n height: [ 1, 16384 ]\n framerate: [ 0/1, 2147483647/1 ]\n",
"direction": "sink",
"presence": "always"
},
"src": {
"caps": "video/x-raw(memory:D3D11Memory):\n format: { RGBA64_LE, RGB10A2_LE, BGRA, RGBA, BGRx, RGBx, VUYA, NV12, NV21, P010_10LE, P012_LE, P016_LE, I420, YV12, I420_10LE, I420_12LE, Y42B, I422_10LE, I422_12LE, Y444, Y444_10LE, Y444_12LE, Y444_16LE, GRAY8, GRAY16_LE, AYUV, AYUV64, Y410 }\n width: [ 1, 16384 ]\n height: [ 1, 16384 ]\n framerate: [ 0/1, 2147483647/1 ]\n\nvideo/x-raw(memory:D3D11Memory, meta:GstVideoOverlayComposition):\n format: { RGBA64_LE, RGB10A2_LE, BGRA, RGBA, BGRx, RGBx, VUYA, NV12, NV21, P010_10LE, P012_LE, P016_LE, I420, YV12, I420_10LE, I420_12LE, Y42B, I422_10LE, I422_12LE, Y444, Y444_10LE, Y444_12LE, Y444_16LE, GRAY8, GRAY16_LE, AYUV, AYUV64, Y410 }\n width: [ 1, 16384 ]\n height: [ 1, 16384 ]\n framerate: [ 0/1, 2147483647/1 ]\nvideo/x-raw:\n format: { RGBA64_LE, RGB10A2_LE, BGRA, RGBA, BGRx, RGBx, VUYA, NV12, NV21, P010_10LE, P012_LE, P016_LE, I420, YV12, I420_10LE, I420_12LE, Y42B, I422_10LE, I422_12LE, Y444, Y444_10LE, Y444_12LE, Y444_16LE, GRAY8, GRAY16_LE, AYUV, AYUV64, Y410 }\n width: [ 1, 16384 ]\n height: [ 1, 16384 ]\n framerate: [ 0/1, 2147483647/1 ]\n\nvideo/x-raw(memory:SystemMemory, meta:GstVideoOverlayComposition):\n format: { RGBA64_LE, RGB10A2_LE, BGRA, RGBA, BGRx, RGBx, VUYA, NV12, NV21, P010_10LE, P012_LE, P016_LE, I420, YV12, I420_10LE, I420_12LE, Y42B, I422_10LE, I422_12LE, Y444, Y444_10LE, Y444_12LE, Y444_16LE, GRAY8, GRAY16_LE, AYUV, AYUV64, Y410 }\n width: [ 1, 16384 ]\n height: [ 1, 16384 ]\n framerate: [ 0/1, 2147483647/1 ]\n",
"caps": "video/x-raw(memory:D3D11Memory):\n format: { RGBA64_LE, RGB10A2_LE, BGRA, RGBA, BGRx, RGBx, VUYA, NV12, NV21, P010_10LE, P012_LE, P016_LE, I420, YV12, I420_10LE, I420_12LE, Y42B, I422_10LE, I422_12LE, Y444, Y444_10LE, Y444_12LE, Y444_16LE, GRAY8, GRAY16_LE, AYUV, AYUV64, Y410, YUY2 }\n width: [ 1, 16384 ]\n height: [ 1, 16384 ]\n framerate: [ 0/1, 2147483647/1 ]\n\nvideo/x-raw(memory:D3D11Memory, meta:GstVideoOverlayComposition):\n format: { RGBA64_LE, RGB10A2_LE, BGRA, RGBA, BGRx, RGBx, VUYA, NV12, NV21, P010_10LE, P012_LE, P016_LE, I420, YV12, I420_10LE, I420_12LE, Y42B, I422_10LE, I422_12LE, Y444, Y444_10LE, Y444_12LE, Y444_16LE, GRAY8, GRAY16_LE, AYUV, AYUV64, Y410, YUY2 }\n width: [ 1, 16384 ]\n height: [ 1, 16384 ]\n framerate: [ 0/1, 2147483647/1 ]\nvideo/x-raw:\n format: { RGBA64_LE, RGB10A2_LE, BGRA, RGBA, BGRx, RGBx, VUYA, NV12, NV21, P010_10LE, P012_LE, P016_LE, I420, YV12, I420_10LE, I420_12LE, Y42B, I422_10LE, I422_12LE, Y444, Y444_10LE, Y444_12LE, Y444_16LE, GRAY8, GRAY16_LE, AYUV, AYUV64, Y410, YUY2 }\n width: [ 1, 16384 ]\n height: [ 1, 16384 ]\n framerate: [ 0/1, 2147483647/1 ]\n\nvideo/x-raw(memory:SystemMemory, meta:GstVideoOverlayComposition):\n format: { RGBA64_LE, RGB10A2_LE, BGRA, RGBA, BGRx, RGBx, VUYA, NV12, NV21, P010_10LE, P012_LE, P016_LE, I420, YV12, I420_10LE, I420_12LE, Y42B, I422_10LE, I422_12LE, Y444, Y444_10LE, Y444_12LE, Y444_16LE, GRAY8, GRAY16_LE, AYUV, AYUV64, Y410, YUY2 }\n width: [ 1, 16384 ]\n height: [ 1, 16384 ]\n framerate: [ 0/1, 2147483647/1 ]\n",
"direction": "src",
"presence": "always"
}
@ -7963,7 +7963,7 @@
"klass": "Filter/Converter/Video/Scaler/Hardware",
"pad-templates": {
"sink": {
"caps": "video/x-raw(memory:D3D11Memory):\n format: { RGBA64_LE, RGB10A2_LE, BGRA, RGBA, BGRx, RGBx, VUYA, NV12, NV21, P010_10LE, P012_LE, P016_LE, I420, YV12, I420_10LE, I420_12LE, Y42B, I422_10LE, I422_12LE, Y444, Y444_10LE, Y444_12LE, Y444_16LE, GRAY8, GRAY16_LE, AYUV, AYUV64, Y410 }\n width: [ 1, 16384 ]\n height: [ 1, 16384 ]\n framerate: [ 0/1, 2147483647/1 ]\n\nvideo/x-raw(memory:D3D11Memory, meta:GstVideoOverlayComposition):\n format: { RGBA64_LE, RGB10A2_LE, BGRA, RGBA, BGRx, RGBx, VUYA, NV12, NV21, P010_10LE, P012_LE, P016_LE, I420, YV12, I420_10LE, I420_12LE, Y42B, I422_10LE, I422_12LE, Y444, Y444_10LE, Y444_12LE, Y444_16LE, GRAY8, GRAY16_LE, AYUV, AYUV64, Y410 }\n width: [ 1, 16384 ]\n height: [ 1, 16384 ]\n framerate: [ 0/1, 2147483647/1 ]\n",
"caps": "video/x-raw(memory:D3D11Memory):\n format: { RGBA64_LE, RGB10A2_LE, BGRA, RGBA, BGRx, RGBx, VUYA, NV12, NV21, P010_10LE, P012_LE, P016_LE, I420, YV12, I420_10LE, I420_12LE, Y42B, I422_10LE, I422_12LE, Y444, Y444_10LE, Y444_12LE, Y444_16LE, GRAY8, GRAY16_LE, AYUV, AYUV64, Y410, YUY2 }\n width: [ 1, 16384 ]\n height: [ 1, 16384 ]\n framerate: [ 0/1, 2147483647/1 ]\n\nvideo/x-raw(memory:D3D11Memory, meta:GstVideoOverlayComposition):\n format: { RGBA64_LE, RGB10A2_LE, BGRA, RGBA, BGRx, RGBx, VUYA, NV12, NV21, P010_10LE, P012_LE, P016_LE, I420, YV12, I420_10LE, I420_12LE, Y42B, I422_10LE, I422_12LE, Y444, Y444_10LE, Y444_12LE, Y444_16LE, GRAY8, GRAY16_LE, AYUV, AYUV64, Y410, YUY2 }\n width: [ 1, 16384 ]\n height: [ 1, 16384 ]\n framerate: [ 0/1, 2147483647/1 ]\n",
"direction": "sink",
"presence": "always"
},
@ -8250,12 +8250,12 @@
"klass": "Filter/Video",
"pad-templates": {
"sink": {
"caps": "video/x-raw:\n format: { RGBA64_LE, RGB10A2_LE, BGRA, RGBA, BGRx, RGBx, VUYA, NV12, NV21, P010_10LE, P012_LE, P016_LE, I420, YV12, I420_10LE, I420_12LE, Y42B, I422_10LE, I422_12LE, Y444, Y444_10LE, Y444_12LE, Y444_16LE, GRAY8, GRAY16_LE, AYUV, AYUV64, Y410 }\n width: [ 1, 16384 ]\n height: [ 1, 16384 ]\n framerate: [ 0/1, 2147483647/1 ]\n\nvideo/x-raw(memory:SystemMemory, meta:GstVideoOverlayComposition):\n format: { RGBA64_LE, RGB10A2_LE, BGRA, RGBA, BGRx, RGBx, VUYA, NV12, NV21, P010_10LE, P012_LE, P016_LE, I420, YV12, I420_10LE, I420_12LE, Y42B, I422_10LE, I422_12LE, Y444, Y444_10LE, Y444_12LE, Y444_16LE, GRAY8, GRAY16_LE, AYUV, AYUV64, Y410 }\n width: [ 1, 16384 ]\n height: [ 1, 16384 ]\n framerate: [ 0/1, 2147483647/1 ]\n\nvideo/x-raw(memory:D3D11Memory):\n format: { RGBA64_LE, RGB10A2_LE, BGRA, RGBA, BGRx, RGBx, VUYA, NV12, NV21, P010_10LE, P012_LE, P016_LE, I420, YV12, I420_10LE, I420_12LE, Y42B, I422_10LE, I422_12LE, Y444, Y444_10LE, Y444_12LE, Y444_16LE, GRAY8, GRAY16_LE, AYUV, AYUV64, Y410 }\n width: [ 1, 16384 ]\n height: [ 1, 16384 ]\n framerate: [ 0/1, 2147483647/1 ]\n\nvideo/x-raw(memory:D3D11Memory, meta:GstVideoOverlayComposition):\n format: { RGBA64_LE, RGB10A2_LE, BGRA, RGBA, BGRx, RGBx, VUYA, NV12, NV21, P010_10LE, P012_LE, P016_LE, I420, YV12, I420_10LE, I420_12LE, Y42B, I422_10LE, I422_12LE, Y444, Y444_10LE, Y444_12LE, Y444_16LE, GRAY8, GRAY16_LE, AYUV, AYUV64, Y410 }\n width: [ 1, 16384 ]\n height: [ 1, 16384 ]\n framerate: [ 0/1, 2147483647/1 ]\n",
"caps": "video/x-raw:\n format: { RGBA64_LE, RGB10A2_LE, BGRA, RGBA, BGRx, RGBx, VUYA, NV12, NV21, P010_10LE, P012_LE, P016_LE, I420, YV12, I420_10LE, I420_12LE, Y42B, I422_10LE, I422_12LE, Y444, Y444_10LE, Y444_12LE, Y444_16LE, GRAY8, GRAY16_LE, AYUV, AYUV64, Y410, YUY2 }\n width: [ 1, 16384 ]\n height: [ 1, 16384 ]\n framerate: [ 0/1, 2147483647/1 ]\n\nvideo/x-raw(memory:SystemMemory, meta:GstVideoOverlayComposition):\n format: { RGBA64_LE, RGB10A2_LE, BGRA, RGBA, BGRx, RGBx, VUYA, NV12, NV21, P010_10LE, P012_LE, P016_LE, I420, YV12, I420_10LE, I420_12LE, Y42B, I422_10LE, I422_12LE, Y444, Y444_10LE, Y444_12LE, Y444_16LE, GRAY8, GRAY16_LE, AYUV, AYUV64, Y410, YUY2 }\n width: [ 1, 16384 ]\n height: [ 1, 16384 ]\n framerate: [ 0/1, 2147483647/1 ]\n\nvideo/x-raw(memory:D3D11Memory):\n format: { RGBA64_LE, RGB10A2_LE, BGRA, RGBA, BGRx, RGBx, VUYA, NV12, NV21, P010_10LE, P012_LE, P016_LE, I420, YV12, I420_10LE, I420_12LE, Y42B, I422_10LE, I422_12LE, Y444, Y444_10LE, Y444_12LE, Y444_16LE, GRAY8, GRAY16_LE, AYUV, AYUV64, Y410, YUY2 }\n width: [ 1, 16384 ]\n height: [ 1, 16384 ]\n framerate: [ 0/1, 2147483647/1 ]\n\nvideo/x-raw(memory:D3D11Memory, meta:GstVideoOverlayComposition):\n format: { RGBA64_LE, RGB10A2_LE, BGRA, RGBA, BGRx, RGBx, VUYA, NV12, NV21, P010_10LE, P012_LE, P016_LE, I420, YV12, I420_10LE, I420_12LE, Y42B, I422_10LE, I422_12LE, Y444, Y444_10LE, Y444_12LE, Y444_16LE, GRAY8, GRAY16_LE, AYUV, AYUV64, Y410, YUY2 }\n width: [ 1, 16384 ]\n height: [ 1, 16384 ]\n framerate: [ 0/1, 2147483647/1 ]\n",
"direction": "sink",
"presence": "always"
},
"src": {
"caps": "video/x-raw(memory:D3D11Memory):\n format: { RGBA64_LE, RGB10A2_LE, BGRA, RGBA, BGRx, RGBx, VUYA, NV12, NV21, P010_10LE, P012_LE, P016_LE, I420, YV12, I420_10LE, I420_12LE, Y42B, I422_10LE, I422_12LE, Y444, Y444_10LE, Y444_12LE, Y444_16LE, GRAY8, GRAY16_LE, AYUV, AYUV64, Y410 }\n width: [ 1, 16384 ]\n height: [ 1, 16384 ]\n framerate: [ 0/1, 2147483647/1 ]\n\nvideo/x-raw(memory:D3D11Memory, meta:GstVideoOverlayComposition):\n format: { RGBA64_LE, RGB10A2_LE, BGRA, RGBA, BGRx, RGBx, VUYA, NV12, NV21, P010_10LE, P012_LE, P016_LE, I420, YV12, I420_10LE, I420_12LE, Y42B, I422_10LE, I422_12LE, Y444, Y444_10LE, Y444_12LE, Y444_16LE, GRAY8, GRAY16_LE, AYUV, AYUV64, Y410 }\n width: [ 1, 16384 ]\n height: [ 1, 16384 ]\n framerate: [ 0/1, 2147483647/1 ]\nvideo/x-raw:\n format: { RGBA64_LE, RGB10A2_LE, BGRA, RGBA, BGRx, RGBx, VUYA, NV12, NV21, P010_10LE, P012_LE, P016_LE, I420, YV12, I420_10LE, I420_12LE, Y42B, I422_10LE, I422_12LE, Y444, Y444_10LE, Y444_12LE, Y444_16LE, GRAY8, GRAY16_LE, AYUV, AYUV64, Y410 }\n width: [ 1, 16384 ]\n height: [ 1, 16384 ]\n framerate: [ 0/1, 2147483647/1 ]\n\nvideo/x-raw(memory:SystemMemory, meta:GstVideoOverlayComposition):\n format: { RGBA64_LE, RGB10A2_LE, BGRA, RGBA, BGRx, RGBx, VUYA, NV12, NV21, P010_10LE, P012_LE, P016_LE, I420, YV12, I420_10LE, I420_12LE, Y42B, I422_10LE, I422_12LE, Y444, Y444_10LE, Y444_12LE, Y444_16LE, GRAY8, GRAY16_LE, AYUV, AYUV64, Y410 }\n width: [ 1, 16384 ]\n height: [ 1, 16384 ]\n framerate: [ 0/1, 2147483647/1 ]\n",
"caps": "video/x-raw(memory:D3D11Memory):\n format: { RGBA64_LE, RGB10A2_LE, BGRA, RGBA, BGRx, RGBx, VUYA, NV12, NV21, P010_10LE, P012_LE, P016_LE, I420, YV12, I420_10LE, I420_12LE, Y42B, I422_10LE, I422_12LE, Y444, Y444_10LE, Y444_12LE, Y444_16LE, GRAY8, GRAY16_LE, AYUV, AYUV64, Y410, YUY2 }\n width: [ 1, 16384 ]\n height: [ 1, 16384 ]\n framerate: [ 0/1, 2147483647/1 ]\n\nvideo/x-raw(memory:D3D11Memory, meta:GstVideoOverlayComposition):\n format: { RGBA64_LE, RGB10A2_LE, BGRA, RGBA, BGRx, RGBx, VUYA, NV12, NV21, P010_10LE, P012_LE, P016_LE, I420, YV12, I420_10LE, I420_12LE, Y42B, I422_10LE, I422_12LE, Y444, Y444_10LE, Y444_12LE, Y444_16LE, GRAY8, GRAY16_LE, AYUV, AYUV64, Y410, YUY2 }\n width: [ 1, 16384 ]\n height: [ 1, 16384 ]\n framerate: [ 0/1, 2147483647/1 ]\nvideo/x-raw:\n format: { RGBA64_LE, RGB10A2_LE, BGRA, RGBA, BGRx, RGBx, VUYA, NV12, NV21, P010_10LE, P012_LE, P016_LE, I420, YV12, I420_10LE, I420_12LE, Y42B, I422_10LE, I422_12LE, Y444, Y444_10LE, Y444_12LE, Y444_16LE, GRAY8, GRAY16_LE, AYUV, AYUV64, Y410, YUY2 }\n width: [ 1, 16384 ]\n height: [ 1, 16384 ]\n framerate: [ 0/1, 2147483647/1 ]\n\nvideo/x-raw(memory:SystemMemory, meta:GstVideoOverlayComposition):\n format: { RGBA64_LE, RGB10A2_LE, BGRA, RGBA, BGRx, RGBx, VUYA, NV12, NV21, P010_10LE, P012_LE, P016_LE, I420, YV12, I420_10LE, I420_12LE, Y42B, I422_10LE, I422_12LE, Y444, Y444_10LE, Y444_12LE, Y444_16LE, GRAY8, GRAY16_LE, AYUV, AYUV64, Y410, YUY2 }\n width: [ 1, 16384 ]\n height: [ 1, 16384 ]\n framerate: [ 0/1, 2147483647/1 ]\n",
"direction": "src",
"presence": "always"
}
@ -8281,7 +8281,7 @@
"klass": "Sink/Video",
"pad-templates": {
"sink": {
"caps": "video/x-raw(memory:D3D11Memory):\n format: { RGBA64_LE, RGB10A2_LE, BGRA, RGBA, BGRx, RGBx, VUYA, NV12, NV21, P010_10LE, P012_LE, P016_LE, I420, YV12, I420_10LE, I420_12LE, Y42B, I422_10LE, I422_12LE, Y444, Y444_10LE, Y444_12LE, Y444_16LE, GRAY8, GRAY16_LE, AYUV, AYUV64, Y410 }\n width: [ 1, 16384 ]\n height: [ 1, 16384 ]\n framerate: [ 0/1, 2147483647/1 ]\n\nvideo/x-raw(memory:D3D11Memory, meta:GstVideoOverlayComposition):\n format: { RGBA64_LE, RGB10A2_LE, BGRA, RGBA, BGRx, RGBx, VUYA, NV12, NV21, P010_10LE, P012_LE, P016_LE, I420, YV12, I420_10LE, I420_12LE, Y42B, I422_10LE, I422_12LE, Y444, Y444_10LE, Y444_12LE, Y444_16LE, GRAY8, GRAY16_LE, AYUV, AYUV64, Y410 }\n width: [ 1, 16384 ]\n height: [ 1, 16384 ]\n framerate: [ 0/1, 2147483647/1 ]\nvideo/x-raw:\n format: { RGBA64_LE, RGB10A2_LE, BGRA, RGBA, BGRx, RGBx, VUYA, NV12, NV21, P010_10LE, P012_LE, P016_LE, I420, YV12, I420_10LE, I420_12LE, Y42B, I422_10LE, I422_12LE, Y444, Y444_10LE, Y444_12LE, Y444_16LE, GRAY8, GRAY16_LE, AYUV, AYUV64, Y410 }\n width: [ 1, 16384 ]\n height: [ 1, 16384 ]\n framerate: [ 0/1, 2147483647/1 ]\n\nvideo/x-raw(memory:SystemMemory, meta:GstVideoOverlayComposition):\n format: { RGBA64_LE, RGB10A2_LE, BGRA, RGBA, BGRx, RGBx, VUYA, NV12, NV21, P010_10LE, P012_LE, P016_LE, I420, YV12, I420_10LE, I420_12LE, Y42B, I422_10LE, I422_12LE, Y444, Y444_10LE, Y444_12LE, Y444_16LE, GRAY8, GRAY16_LE, AYUV, AYUV64, Y410 }\n width: [ 1, 16384 ]\n height: [ 1, 16384 ]\n framerate: [ 0/1, 2147483647/1 ]\n",
"caps": "video/x-raw(memory:D3D11Memory):\n format: { RGBA64_LE, RGB10A2_LE, BGRA, RGBA, BGRx, RGBx, VUYA, NV12, NV21, P010_10LE, P012_LE, P016_LE, I420, YV12, I420_10LE, I420_12LE, Y42B, I422_10LE, I422_12LE, Y444, Y444_10LE, Y444_12LE, Y444_16LE, GRAY8, GRAY16_LE, AYUV, AYUV64, Y410, YUY2 }\n width: [ 1, 16384 ]\n height: [ 1, 16384 ]\n framerate: [ 0/1, 2147483647/1 ]\n\nvideo/x-raw(memory:D3D11Memory, meta:GstVideoOverlayComposition):\n format: { RGBA64_LE, RGB10A2_LE, BGRA, RGBA, BGRx, RGBx, VUYA, NV12, NV21, P010_10LE, P012_LE, P016_LE, I420, YV12, I420_10LE, I420_12LE, Y42B, I422_10LE, I422_12LE, Y444, Y444_10LE, Y444_12LE, Y444_16LE, GRAY8, GRAY16_LE, AYUV, AYUV64, Y410, YUY2 }\n width: [ 1, 16384 ]\n height: [ 1, 16384 ]\n framerate: [ 0/1, 2147483647/1 ]\nvideo/x-raw:\n format: { RGBA64_LE, RGB10A2_LE, BGRA, RGBA, BGRx, RGBx, VUYA, NV12, NV21, P010_10LE, P012_LE, P016_LE, I420, YV12, I420_10LE, I420_12LE, Y42B, I422_10LE, I422_12LE, Y444, Y444_10LE, Y444_12LE, Y444_16LE, GRAY8, GRAY16_LE, AYUV, AYUV64, Y410, YUY2 }\n width: [ 1, 16384 ]\n height: [ 1, 16384 ]\n framerate: [ 0/1, 2147483647/1 ]\n\nvideo/x-raw(memory:SystemMemory, meta:GstVideoOverlayComposition):\n format: { RGBA64_LE, RGB10A2_LE, BGRA, RGBA, BGRx, RGBx, VUYA, NV12, NV21, P010_10LE, P012_LE, P016_LE, I420, YV12, I420_10LE, I420_12LE, Y42B, I422_10LE, I422_12LE, Y444, Y444_10LE, Y444_12LE, Y444_16LE, GRAY8, GRAY16_LE, AYUV, AYUV64, Y410, YUY2 }\n width: [ 1, 16384 ]\n height: [ 1, 16384 ]\n framerate: [ 0/1, 2147483647/1 ]\n",
"direction": "sink",
"presence": "always"
}

View file

@ -36,7 +36,7 @@ G_BEGIN_DECLS
"GRAY8, GRAY16_LE, AYUV, AYUV64"
#define GST_D3D11_EXTRA_IN_FORMATS \
"Y410"
"Y410, YUY2"
#define GST_D3D11_SINK_FORMATS \
"{ " GST_D3D11_COMMON_FORMATS " ," GST_D3D11_EXTRA_IN_FORMATS " }"
@ -121,6 +121,8 @@ static const GstD3D11Format _gst_d3d11_default_format_map[] = {
MAKE_FORMAT_MAP_RGB (GRAY16_LE, R16_UNORM),
MAKE_FORMAT_MAP_YUV_FULL (Y410, Y410, R10G10B10A2_UNORM, UNKNOWN, UNKNOWN, UNKNOWN,
D3D11_FORMAT_SUPPORT_SHADER_SAMPLE),
MAKE_FORMAT_MAP_YUV_FULL (YUY2, YUY2, R8G8B8A8_UNORM, UNKNOWN, UNKNOWN, UNKNOWN,
D3D11_FORMAT_SUPPORT_SHADER_SAMPLE),
};
#undef MAKE_FORMAT_MAP_YUV

View file

@ -601,6 +601,8 @@ struct _GstD3D11ConverterPrivate
FLOAT clear_color[4][4];
GstD3D11ColorMatrix clear_color_matrix;
GstVideoConverter *unpack_convert;
/* video processor */
D3D11_VIDEO_COLOR background_color;
ID3D11VideoDevice *video_device;
@ -823,6 +825,9 @@ gst_d3d11_converter_finalize (GObject * object)
g_free (priv->in_cll_str);
g_free (priv->out_cll_str);
if (priv->unpack_convert)
gst_video_converter_free (priv->unpack_convert);
G_OBJECT_CLASS (parent_class)->finalize (object);
}
@ -3014,6 +3019,12 @@ gst_d3d11_converter_new (GstD3D11Device * device, const GstVideoInfo * in_info,
GST_DEBUG_OBJECT (self, "Video processor is available");
priv->supported_backend |= GST_D3D11_CONVERTER_BACKEND_VIDEO_PROCESSOR;
}
/* Always use converter */
if (GST_VIDEO_INFO_FORMAT (in_info) == GST_VIDEO_FORMAT_YUY2) {
GST_DEBUG_OBJECT (self, "Use video processor only");
goto out;
}
}
if ((wanted_backend & GST_D3D11_CONVERTER_BACKEND_SHADER) == 0)
@ -3057,6 +3068,28 @@ gst_d3d11_converter_new (GstD3D11Device * device, const GstVideoInfo * in_info,
if (!gst_d3d11_converter_prepare_output (self, out_info))
goto out;
/* XXX: hard to make sampling of packed 4:2:2 format, use software
* converter to convert YUV2 to Y42B */
if (GST_VIDEO_INFO_FORMAT (in_info) == GST_VIDEO_FORMAT_YUY2) {
GstVideoInfo tmp_info;
gst_video_info_set_interlaced_format (&tmp_info, GST_VIDEO_FORMAT_Y42B,
GST_VIDEO_INFO_INTERLACE_MODE (in_info),
GST_VIDEO_INFO_WIDTH (in_info), GST_VIDEO_INFO_HEIGHT (in_info));
tmp_info.chroma_site = in_info->chroma_site;
tmp_info.colorimetry = in_info->colorimetry;
tmp_info.fps_n = in_info->fps_n;
tmp_info.fps_d = in_info->fps_d;
tmp_info.par_n = in_info->par_n;
tmp_info.par_d = in_info->par_d;
priv->unpack_convert =
gst_video_converter_new (in_info, &tmp_info, nullptr);
priv->fallback_info = tmp_info;
in_info = &priv->fallback_info;
}
if (!gst_d3d11_converter_prepare_sample_texture (self, in_info, out_info))
goto out;
@ -3303,7 +3336,7 @@ gst_d3d11_converter_copy_buffer (GstD3D11Converter * self, GstBuffer * in_buf)
GstD3D11ConverterPrivate *priv = self->priv;
GstVideoFrame frame, fallback_frame;
GstVideoInfo *fallback_info = &priv->fallback_info;
gboolean ret;
gboolean ret = TRUE;
if (!gst_video_frame_map (&frame, &priv->in_info, in_buf, GST_MAP_READ)) {
GST_ERROR_OBJECT (self, "Failed to map input buffer");
@ -3314,7 +3347,30 @@ gst_d3d11_converter_copy_buffer (GstD3D11Converter * self, GstBuffer * in_buf)
if (fallback_info->width != GST_VIDEO_FRAME_WIDTH (&frame) ||
fallback_info->height != GST_VIDEO_FRAME_HEIGHT (&frame)) {
gst_clear_buffer (&priv->fallback_inbuf);
*fallback_info = frame.info;
if (GST_VIDEO_INFO_FORMAT (&priv->in_info) == GST_VIDEO_FORMAT_YUY2 &&
priv->unpack_convert) {
gst_video_info_set_interlaced_format (fallback_info,
GST_VIDEO_FORMAT_Y42B, GST_VIDEO_INFO_INTERLACE_MODE (&frame.info),
GST_VIDEO_INFO_WIDTH (&frame.info),
GST_VIDEO_INFO_HEIGHT (&frame.info));
fallback_info->chroma_site = frame.info.chroma_site;
fallback_info->colorimetry = frame.info.colorimetry;
fallback_info->fps_n = frame.info.fps_n;
fallback_info->fps_d = frame.info.fps_d;
fallback_info->par_n = frame.info.par_n;
fallback_info->par_d = frame.info.par_d;
if (priv->unpack_convert)
gst_video_converter_free (priv->unpack_convert);
priv->unpack_convert =
gst_video_converter_new (&frame.info, fallback_info, nullptr);
g_assert (priv->unpack_convert);
} else {
*fallback_info = frame.info;
}
}
if (!priv->fallback_inbuf &&
@ -3328,7 +3384,11 @@ gst_d3d11_converter_copy_buffer (GstD3D11Converter * self, GstBuffer * in_buf)
goto error;
}
ret = gst_video_frame_copy (&fallback_frame, &frame);
if (priv->unpack_convert) {
gst_video_converter_frame (priv->unpack_convert, &frame, &fallback_frame);
} else {
ret = gst_video_frame_copy (&fallback_frame, &frame);
}
gst_video_frame_unmap (&fallback_frame);
gst_video_frame_unmap (&frame);
@ -3609,8 +3669,9 @@ gst_d3d11_converter_convert_buffer_internal (GstD3D11Converter * self,
}
/* But allows input copying */
if (!gst_d3d11_converter_ensure_d3d11_buffer (self, in_buf)) {
GST_LOG_OBJECT (self, "Input is not d3d11 buffer");
if (!gst_d3d11_converter_ensure_d3d11_buffer (self, in_buf) ||
(GST_VIDEO_INFO_FORMAT (&priv->in_info) == GST_VIDEO_FORMAT_YUY2 &&
priv->unpack_convert)) {
if (!gst_d3d11_converter_copy_buffer (self, in_buf)) {
GST_ERROR_OBJECT (self, "Couldn't copy into fallback buffer");
return FALSE;

View file

@ -507,7 +507,9 @@ gst_d3d11_device_setup_format_table (GstD3D11Device * self)
case GST_VIDEO_FORMAT_NV12:
case GST_VIDEO_FORMAT_P010_10LE:
case GST_VIDEO_FORMAT_P012_LE:
case GST_VIDEO_FORMAT_P016_LE:{
case GST_VIDEO_FORMAT_P016_LE:
case GST_VIDEO_FORMAT_YUY2:
{
gboolean supported = TRUE;
if (is_windows_8_or_greater ())