diff options
author | Anton Khirnov <anton@khirnov.net> | 2017-02-11 16:49:34 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2017-07-26 23:24:34 +0200 |
commit | b9129ec4668c511e0a79e25c6f25d748cee172c9 (patch) | |
tree | f3ace45abdc775d65ed2361958e26966d33c47ca /libavcodec/h264_slice.c | |
parent | 704311b2946d74a80f65906961cd9baaa18683a3 (diff) | |
download | ffmpeg-streaming-b9129ec4668c511e0a79e25c6f25d748cee172c9.zip ffmpeg-streaming-b9129ec4668c511e0a79e25c6f25d748cee172c9.tar.gz |
h264dec: add a CUVID hwaccel
Some parts of the code are based on a patch by
Timo Rothenpieler <timo@rothenpieler.org>
Diffstat (limited to 'libavcodec/h264_slice.c')
-rw-r--r-- | libavcodec/h264_slice.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c index e7408b2..c6309b2 100644 --- a/libavcodec/h264_slice.c +++ b/libavcodec/h264_slice.c @@ -724,7 +724,8 @@ static enum AVPixelFormat get_pixel_format(H264Context *h) (CONFIG_H264_D3D11VA_HWACCEL * 2) + \ CONFIG_H264_VAAPI_HWACCEL + \ (CONFIG_H264_VDA_HWACCEL * 2) + \ - CONFIG_H264_VDPAU_HWACCEL) + CONFIG_H264_VDPAU_HWACCEL + \ + CONFIG_H264_CUVID_HWACCEL) enum AVPixelFormat pix_fmts[HWACCEL_MAX + 2], *fmt = pix_fmts; const enum AVPixelFormat *choices = pix_fmts; @@ -755,6 +756,9 @@ static enum AVPixelFormat get_pixel_format(H264Context *h) #if CONFIG_H264_VDPAU_HWACCEL *fmt++ = AV_PIX_FMT_VDPAU; #endif +#if CONFIG_H264_CUVID_HWACCEL + *fmt++ = AV_PIX_FMT_CUDA; +#endif if (CHROMA444(h)) { if (h->avctx->colorspace == AVCOL_SPC_RGB) *fmt++ = AV_PIX_FMT_GBRP; |