From b9129ec4668c511e0a79e25c6f25d748cee172c9 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Sat, 11 Feb 2017 16:49:34 +0100 Subject: h264dec: add a CUVID hwaccel Some parts of the code are based on a patch by Timo Rothenpieler --- libavcodec/h264_slice.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'libavcodec/h264_slice.c') 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; -- cgit v1.1