From da2848375a2e2121dad9f1e8cbd0ead4e3bf77d6 Mon Sep 17 00:00:00 2001 From: Yogender Gupta Date: Thu, 6 Oct 2016 09:10:25 +0000 Subject: [PATCH] nvenc: Force high_444 profile for 444 input Signed-off-by: Luca Barbato --- libavcodec/nvenc.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libavcodec/nvenc.c b/libavcodec/nvenc.c index 0b6e4cef86..9c35bd0d25 100644 --- a/libavcodec/nvenc.c +++ b/libavcodec/nvenc.c @@ -723,6 +723,11 @@ static int nvenc_setup_h264_config(AVCodecContext *avctx) break; } + if (ctx->data_pix_fmt == AV_PIX_FMT_YUV444P) { + cc->profileGUID = NV_ENC_H264_PROFILE_HIGH_444_GUID; + avctx->profile = FF_PROFILE_H264_HIGH_444_PREDICTIVE; + } + h264->level = ctx->level; return 0;