diff options
author | Anton Khirnov <anton@khirnov.net> | 2017-02-11 16:49:34 +0100 |
---|---|---|
committer | Timo Rothenpieler <timo@rothenpieler.org> | 2017-11-10 22:48:53 +0100 |
commit | 0e00624389955bc559d75855d5c4876266d9575f (patch) | |
tree | 33fc79eb493eac37ca67e26704f330bf8d08dc6e /fftools | |
parent | 0aecc08e5fd15960639a75c43265539e70d0189e (diff) | |
download | ffmpeg-0e00624389955bc559d75855d5c4876266d9575f.tar.gz |
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')
-rw-r--r-- | fftools/ffmpeg.h | 1 | ||||
-rw-r--r-- | fftools/ffmpeg_opt.c | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h index 50fc8d5767..e0977e1bf1 100644 --- a/fftools/ffmpeg.h +++ b/fftools/ffmpeg.h @@ -68,6 +68,7 @@ enum HWAccelID { HWACCEL_VAAPI, HWACCEL_CUVID, HWACCEL_D3D11VA, + HWACCEL_NVDEC, }; typedef struct HWAccel { 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 }, |