qsv: Introduce H.264 Intel Quick Sync Video Encoder
authorSeungha Yang <seungha@centricular.com>
Sun, 6 Feb 2022 12:34:43 +0000 (21:34 +0900)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Tue, 8 Feb 2022 10:05:35 +0000 (10:05 +0000)
commit64ed6075b782578d57edd09b3463071d6e5a4342
treeb2eb9ed1f319ef9c11e48e5cc1ec9796df48861e
parentc80132e4a3fb1fda6d196effe0e6d12dfcc75f25
qsv: Introduce H.264 Intel Quick Sync Video Encoder

A new implementation of Intel Quick Sync Video plugin.
This plugin supports both Windows and Linux but optimization for
VA/DMABuf is not implemented yet.

This new plugin has some notable differences compared with existing
MSDK plugin.

* Encoder will expose formats which can be natively supported
without internal conversion. This will make encoder
control/negotiation flow much simpler and cleaner than
that of MSDK plugin.

* This plugin includes QSV specific library loading helper,
called dispatcher, with QSV SDK headers as a part of this plugin.
So, there will be no more SDK version dependent #ifdef in the code
and also there will be no more build-time MSDK/oneVPL SDK
dependency.

* Memory allocator interop between GStreamer and QSV is re-designed
and decoupled. Instead of implementing QSV specific allocator/bufferpool,
this plugin will make use of generic GStreamer memory
allocator/bufferpool (e.g., GstD3D11Allocator and GstD3D11BufferPool).
Specifically, GstQsvAllocator object will help interop between
GstMemory and mfxFrameAllocator memory abstraction layers.

Note that because of the design decision, VA/DMABuf support is not made
as a part of this initial commit. We can add the optimization for Linux
later once GstVA library exposes allocator/bufferpool implementation as
an API like GstD3D11.

* Initial encoder implementation supports interop with GstD3D11
infrastructure, including zero-copy encoding with upstream D3D11 element.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1408>
17 files changed:
subprojects/gst-plugins-bad/meson_options.txt
subprojects/gst-plugins-bad/sys/meson.build
subprojects/gst-plugins-bad/sys/qsv/gstqsvallocator.cpp [new file with mode: 0644]
subprojects/gst-plugins-bad/sys/qsv/gstqsvallocator.h [new file with mode: 0644]
subprojects/gst-plugins-bad/sys/qsv/gstqsvallocator_d3d11.cpp [new file with mode: 0644]
subprojects/gst-plugins-bad/sys/qsv/gstqsvallocator_d3d11.h [new file with mode: 0644]
subprojects/gst-plugins-bad/sys/qsv/gstqsvallocator_va.cpp [new file with mode: 0644]
subprojects/gst-plugins-bad/sys/qsv/gstqsvallocator_va.h [new file with mode: 0644]
subprojects/gst-plugins-bad/sys/qsv/gstqsvencoder.cpp [new file with mode: 0644]
subprojects/gst-plugins-bad/sys/qsv/gstqsvencoder.h [new file with mode: 0644]
subprojects/gst-plugins-bad/sys/qsv/gstqsvh264enc.cpp [new file with mode: 0644]
subprojects/gst-plugins-bad/sys/qsv/gstqsvh264enc.h [new file with mode: 0644]
subprojects/gst-plugins-bad/sys/qsv/gstqsvutils.cpp [new file with mode: 0644]
subprojects/gst-plugins-bad/sys/qsv/gstqsvutils.h [new file with mode: 0644]
subprojects/gst-plugins-bad/sys/qsv/libmfx/meson.build [new file with mode: 0644]
subprojects/gst-plugins-bad/sys/qsv/meson.build [new file with mode: 0644]
subprojects/gst-plugins-bad/sys/qsv/plugin.cpp [new file with mode: 0644]