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 /libavcodec/h264_slice.c | |
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 'libavcodec/h264_slice.c')
-rw-r--r-- | libavcodec/h264_slice.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c index 94a1547ad6..da76b9293f 100644 --- a/libavcodec/h264_slice.c +++ b/libavcodec/h264_slice.c @@ -757,6 +757,7 @@ static enum AVPixelFormat get_pixel_format(H264Context *h, int force_callback) { #define HWACCEL_MAX (CONFIG_H264_DXVA2_HWACCEL + \ (CONFIG_H264_D3D11VA_HWACCEL * 2) + \ + CONFIG_H264_NVDEC_HWACCEL + \ CONFIG_H264_VAAPI_HWACCEL + \ CONFIG_H264_VIDEOTOOLBOX_HWACCEL + \ CONFIG_H264_VDPAU_HWACCEL) @@ -813,6 +814,9 @@ static enum AVPixelFormat get_pixel_format(H264Context *h, int force_callback) #if CONFIG_H264_VDPAU_HWACCEL *fmt++ = AV_PIX_FMT_VDPAU; #endif +#if CONFIG_H264_NVDEC_HWACCEL + *fmt++ = AV_PIX_FMT_CUDA; +#endif if (CHROMA444(h)) { if (h->avctx->colorspace == AVCOL_SPC_RGB) *fmt++ = AV_PIX_FMT_GBRP; |