From b83bfea05df01c7bcd15d594c4b8aebf60f8618a Mon Sep 17 00:00:00 2001 From: Philip Langdale Date: Thu, 15 Sep 2016 20:15:36 -0700 Subject: hwdec_cuda: Rename config variable to be more consistent 'cuda-gl' isn't right - you can turn this on without any GL and get some non-zero benefit (with the cuda-copy hwaccel). So 'cuda-hwaccel' seems more consistent with everything else. --- video/decode/vd_lavc.c | 4 ++-- video/fmt-conversion.c | 2 +- video/out/opengl/hwdec.c | 2 +- wscript | 4 ++-- wscript_build.py | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/video/decode/vd_lavc.c b/video/decode/vd_lavc.c index e21f60972d..d8a8b320b0 100644 --- a/video/decode/vd_lavc.c +++ b/video/decode/vd_lavc.c @@ -151,7 +151,7 @@ static const struct vd_lavc_hwdec mp_vd_lavc_mediacodec = { }; #endif -#if HAVE_CUDA_GL +#if HAVE_CUDA_HWACCEL static const struct vd_lavc_hwdec mp_vd_lavc_cuda_copy = { .type = HWDEC_CUDA_COPY, .lavc_suffix = "_cuvid", @@ -183,7 +183,7 @@ static const struct vd_lavc_hwdec *const hwdec_list[] = { #if HAVE_ANDROID &mp_vd_lavc_mediacodec, #endif -#if HAVE_CUDA_GL +#if HAVE_CUDA_HWACCEL &mp_vd_lavc_cuda, &mp_vd_lavc_cuda_copy, #endif diff --git a/video/fmt-conversion.c b/video/fmt-conversion.c index 2d0425f26a..aa78e99f9b 100644 --- a/video/fmt-conversion.c +++ b/video/fmt-conversion.c @@ -115,7 +115,7 @@ static const struct { #if HAVE_AV_PIX_FMT_MMAL {IMGFMT_MMAL, AV_PIX_FMT_MMAL}, #endif -#if HAVE_CUDA_GL +#if HAVE_CUDA_HWACCEL {IMGFMT_CUDA, AV_PIX_FMT_CUDA}, #endif #ifdef AV_PIX_FMT_P010 diff --git a/video/out/opengl/hwdec.c b/video/out/opengl/hwdec.c index f5943aa61b..7d47e152b5 100644 --- a/video/out/opengl/hwdec.c +++ b/video/out/opengl/hwdec.c @@ -60,7 +60,7 @@ static const struct gl_hwdec_driver *const mpgl_hwdec_drivers[] = { #endif &gl_hwdec_dxva2, #endif -#if HAVE_CUDA_GL +#if HAVE_CUDA_HWACCEL &gl_hwdec_cuda, #endif #if HAVE_RPI diff --git a/wscript b/wscript index e01ae81af6..6ec084729c 100644 --- a/wscript +++ b/wscript @@ -886,8 +886,8 @@ hwaccel_features = [ check_headers('libavcodec/dxva2.h', use='libav'), check_headers('libavcodec/d3d11va.h', use='libav')), }, { - 'name': '--cuda-gl', - 'desc': 'CUDA with OpenGL', + 'name': '--cuda-hwaccel', + 'desc': 'CUDA hwaccel', 'func': compose_checks( check_cc(lib="cuda"), check_headers('libavutil/hwcontext_cuda.h', use='libav')), diff --git a/wscript_build.py b/wscript_build.py index 46f9882447..cfab785ec0 100644 --- a/wscript_build.py +++ b/wscript_build.py @@ -290,7 +290,7 @@ def build(ctx): ( "video/vdpau.c", "vdpau" ), ( "video/vdpau_mixer.c", "vdpau" ), ( "video/decode/dec_video.c"), - ( "video/decode/cuda.c", "cuda-gl" ), + ( "video/decode/cuda.c", "cuda-hwaccel" ), ( "video/decode/dxva2.c", "d3d-hwaccel" ), ( "video/decode/d3d11va.c", "d3d-hwaccel" ), ( "video/decode/d3d.c", "win32" ), @@ -347,7 +347,7 @@ def build(ctx): ( "video/out/opengl/egl_helpers.c", "egl-helpers" ), ( "video/out/opengl/formats.c", "gl" ), ( "video/out/opengl/hwdec.c", "gl" ), - ( "video/out/opengl/hwdec_cuda.c", "cuda-gl" ), + ( "video/out/opengl/hwdec_cuda.c", "cuda-hwaccel" ), ( "video/out/opengl/hwdec_d3d11egl.c", "egl-angle" ), ( "video/out/opengl/hwdec_d3d11eglrgb.c","egl-angle" ), ( "video/out/opengl/hwdec_dxva2.c", "gl-win32" ), -- cgit v1.2.3