summaryrefslogtreecommitdiff
path: root/fftools/ffmpeg_opt.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2017-02-11 16:49:34 +0100
committerTimo Rothenpieler <timo@rothenpieler.org>2017-11-10 22:48:53 +0100
commit0e00624389955bc559d75855d5c4876266d9575f (patch)
tree33fc79eb493eac37ca67e26704f330bf8d08dc6e /fftools/ffmpeg_opt.c
parent0aecc08e5fd15960639a75c43265539e70d0189e (diff)
h264dec: add a NVDEC hwaccel
Some parts of the code are based on a patch by Timo Rothenpieler <timo@rothenpieler.org> Merges Libav commit b9129ec4668c511e0a79e25c6f25d748cee172c9. Due to the name clash with our cuvid decoder, rename it to nvdec. This commit also changes the Libav code to dynamic loading of the cuda/cuvid libraries. Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
Diffstat (limited to 'fftools/ffmpeg_opt.c')
-rw-r--r--fftools/ffmpeg_opt.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c
index ca6f10d5ca..e50895e64c 100644
--- a/fftools/ffmpeg_opt.c
+++ b/fftools/ffmpeg_opt.c
@@ -90,6 +90,10 @@ const HWAccel hwaccels[] = {
{ "vaapi", hwaccel_decode_init, HWACCEL_VAAPI, AV_PIX_FMT_VAAPI,
AV_HWDEVICE_TYPE_VAAPI },
#endif
+#if CONFIG_NVDEC
+ { "nvdec", hwaccel_decode_init, HWACCEL_NVDEC, AV_PIX_FMT_CUDA,
+ AV_HWDEVICE_TYPE_CUDA },
+#endif
#if CONFIG_CUVID
{ "cuvid", cuvid_init, HWACCEL_CUVID, AV_PIX_FMT_CUDA,
AV_HWDEVICE_TYPE_NONE },