From 6b745769b1fd15ba03edad3fe381abb745bf9907 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 28 Oct 2017 19:59:08 +0200 Subject: vd_lavc: add support for nvdec hwaccel See manpage additions. (In ffmpeg-mpv and Libav, this is still called "cuvid". Libav won't work yet, because it has no frame params support yet, but this could get fixed soon.) --- video/decode/vd_lavc.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'video/decode') diff --git a/video/decode/vd_lavc.c b/video/decode/vd_lavc.c index c07c1590fe..6f09908090 100644 --- a/video/decode/vd_lavc.c +++ b/video/decode/vd_lavc.c @@ -158,6 +158,19 @@ static const struct vd_lavc_hwdec mp_vd_lavc_rkmpp = { }; #if HAVE_CUDA_HWACCEL +static const struct vd_lavc_hwdec mp_vd_lavc_nvdec = { + .type = HWDEC_NVDEC, + .image_format = IMGFMT_CUDA, + .generic_hwaccel = true, + .set_hwframes = true, +}; +static const struct vd_lavc_hwdec mp_vd_lavc_nvdec_copy = { + .type = HWDEC_NVDEC_COPY, + .image_format = IMGFMT_CUDA, + .generic_hwaccel = true, + .set_hwframes = true, + .copying = true, +}; static const struct vd_lavc_hwdec mp_vd_lavc_cuda = { .type = HWDEC_CUDA, .image_format = IMGFMT_CUDA, @@ -272,6 +285,8 @@ static const struct vd_lavc_hwdec *const hwdec_list[] = { &mp_vd_lavc_mediacodec_copy, #endif #if HAVE_CUDA_HWACCEL + &mp_vd_lavc_nvdec, + &mp_vd_lavc_nvdec_copy, &mp_vd_lavc_cuda, &mp_vd_lavc_cuda_copy, #endif -- cgit v1.2.3