nvenc: Force high_444 profile for 444 input
authorYogender Gupta <ygupta@nvidia.com>
Thu, 6 Oct 2016 09:10:25 +0000 (09:10 +0000)
committerLuca Barbato <lu_zero@gentoo.org>
Fri, 7 Oct 2016 08:41:38 +0000 (10:41 +0200)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
libavcodec/nvenc.c

index 0b6e4ce..9c35bd0 100644 (file)
@@ -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;