[vlc-devel] [PATCH 2/2] avcodec: prioritise vaapi over vdpau

Thomas Guillem thomas at gllm.fr
Fri Dec 1 10:50:16 CET 2017


Favor VAAPI over VDPAU: VDPAU is deprecated and present on less systems than
VAAPI. Furthermore, the try and fail of VDPAU vout/va take much longer than the
VAAPI one (around twice the time, that is 100-200ms). VAAPI will only be used
for direct rendering by default, so VDPAU will still be used instead of VAAPI
with CPU copy
---
 modules/codec/avcodec/video.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c
index 1837afe310..4aefc42866 100644
--- a/modules/codec/avcodec/video.c
+++ b/modules/codec/avcodec/video.c
@@ -1496,6 +1496,16 @@ static void ReorderHwFmts(enum PixelFormat *pi_fmt, size_t count)
         AV_PIX_FMT_D3D11VA_VLD,
         AV_PIX_FMT_DXVA2_VLD,
 #endif
+
+        /* Favor VAAPI over VDPAU: VDPAU is deprecated and present on less
+         * systems than VAAPI. Furthermore, the try and fail of VDPAU vout/va
+         * take much longer than the VAAPI one (around twice the time, that is
+         * 100-200ms). VAAPI will only be used for direct rendering by default,
+         * so VDPAU will still be used instead of VAAPI with CPU copy. */
+        AV_PIX_FMT_VAAPI_VLD,
+#if (LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(52, 4, 0))
+        AV_PIX_FMT_VDPAU,
+#endif
     };
     static const size_t fmt_order_count = ARRAY_SIZE(fmt_order);
 
-- 
2.11.0



More information about the vlc-devel mailing list