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

Thomas Guillem thomas at gllm.fr
Tue Dec 5 11:06:04 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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c
index b981dc9e4a..b056c1b86f 100644
--- a/modules/codec/avcodec/video.c
+++ b/modules/codec/avcodec/video.c
@@ -1564,10 +1564,10 @@ static enum PixelFormat ffmpeg_GetFormat( AVCodecContext *p_context,
 #endif
         AV_PIX_FMT_DXVA2_VLD,
 #endif
+        AV_PIX_FMT_VAAPI_VLD,
 #if (LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(52, 4, 0))
         AV_PIX_FMT_VDPAU,
 #endif
-        AV_PIX_FMT_VAAPI_VLD,
         AV_PIX_FMT_NONE,
     };
 
-- 
2.11.0



More information about the vlc-devel mailing list