[Spice-devel] [PATCH 0/2] spice/gstreamer: Use h/w based encoders/decoders with Intel GPUs if possible (v3)
Vivek Kasireddy
vivek.kasireddy at intel.com
Mon Oct 2 05:20:21 UTC 2023
This patch series includes a patch for Spice (server) to
automatically select h/w based encoder elements and another one
for Spice-gtk (client) to automatically select h/w based decoder
elements with Intel GPUs when these two conditions are met:
- An Intel GPU is available and is active
- The relevant h/w based encoder/decoder elements are registered
(i.e, Intel Media SDK Gstreamer plugin (libgstmsdk.so) and associated
libraries (such as va or vaapi) are properly installed).
When tested on a Gen 12 Intel GPU (codenamed AlderLake/TigerLake)
with Qemu/Spice + h/w encoder elements, we noticed that the time
to encode a 1920x1080 BGRx frame was reduced to ~2-3 ms compared
to ~12-16 ms with a s/w encoder (x264enc). Other advantages
include reduced overall CPU utilization.
However, once these patches are applied, the only way to force
Spice/Spice-gtk to fallback to s/w based encoder/decoder is to
remove the msdk and or vaapi plugins from GST_PLUGIN_PATH. This
might be desirable for debugging purposes or for other reasons.
v2:
- Added several bugfix patches to this series
- Moved udev helper to determine GPU Vendor to spice-common repo
- Refactored the code to prioritize plugins in the order msdk > va > vaapi
v3:
- Updated all patches to include review suggestions from Frediano
- Temporarily dropped the "Don't unref appsink and pipeline objects" patch
Cc: Frediano Ziglio <freddy77 at gmail.com>
Cc: Gerd Hoffmann <kraxel at redhat.com>
Cc: Marc-André Lureau <marcandre.lureau at redhat.com>
Cc: Dongwon Kim <dongwon.kim at intel.com>
Cc: Jin Chung Teng <jin.chung.teng at intel.com>
Cc: Hazwan Arif Mazlan <hazwan.arif.mazlan at intel.com>
Vivek Kasireddy (2):
channel-display-gst: Prefer playbin3 to playbin (v2)
channel-display-gst: Use h/w based decoders with Intel GPUs if
possible (v3)
src/channel-display-gst.c | 228 +++++++++++++++++++++++++++++++++-----
1 file changed, 203 insertions(+), 25 deletions(-)
--
2.39.2
More information about the Spice-devel
mailing list