diff options
author | wm4 <wm4@nowhere> | 2017-10-28 19:59:08 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2017-10-28 19:59:08 +0200 |
commit | 6b745769b1fd15ba03edad3fe381abb745bf9907 (patch) | |
tree | 393cba00ce5561df576bb6d1d5507cefca870d18 /video/out/opengl | |
parent | 3413fe4dfdd61724719e3582aeb91b2523a00b84 (diff) | |
download | mpv-6b745769b1fd15ba03edad3fe381abb745bf9907.tar.bz2 mpv-6b745769b1fd15ba03edad3fe381abb745bf9907.tar.xz |
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.)
Diffstat (limited to 'video/out/opengl')
-rw-r--r-- | video/out/opengl/hwdec_cuda.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/video/out/opengl/hwdec_cuda.c b/video/out/opengl/hwdec_cuda.c index d9c4c199f1..5aefed106d 100644 --- a/video/out/opengl/hwdec_cuda.c +++ b/video/out/opengl/hwdec_cuda.c @@ -160,7 +160,7 @@ static int cuda_init(struct ra_hwdec *hw) goto error; p->hwctx = (struct mp_hwdec_ctx) { - .type = HWDEC_CUDA, + .type = hw->driver->api, .ctx = p->decode_ctx, .av_device_ref = hw_device_ctx, }; @@ -340,3 +340,19 @@ const struct ra_hwdec_driver ra_hwdec_cuda = { .unmap = mapper_unmap, }, }; + +const struct ra_hwdec_driver ra_hwdec_cuda_nvdec = { + .name = "cuda-nvdec", + .api = HWDEC_NVDEC, + .imgfmts = {IMGFMT_CUDA, 0}, + .priv_size = sizeof(struct priv_owner), + .init = cuda_init, + .uninit = cuda_uninit, + .mapper = &(const struct ra_hwdec_mapper_driver){ + .priv_size = sizeof(struct priv), + .init = mapper_init, + .uninit = mapper_uninit, + .map = mapper_map, + .unmap = mapper_unmap, + }, +}; |