This mimics the behaviour of libx264 for setting this flag. Fixes #11131
Showing the changes to libavcodec (1 of 1 file). Show all
Unified · Split
| @@ -1310,6 +1310,8 @@ static av_cold int nvenc_setup_h264_config(AVCodecContext *avctx) · 1309 unmodified lines | |||
| 1310 | avctx->profile = AV_PROFILE_H264_HIGH_444_PREDICTIVE; | 1310 | avctx->profile = AV_PROFILE_H264_HIGH_444_PREDICTIVE; |
| 1311 | } | 1311 | } |
| 1312 | 1312 | ||
| 1313 | vui->bitstreamRestrictionFlag = cc->gopLength != 1 || avctx->profile < AV_PROFILE_H264_HIGH; | ||
| 1314 | |||
| 1313 | h264->chromaFormatIDC = avctx->profile == AV_PROFILE_H264_HIGH_444_PREDICTIVE ? 3 : 1; | 1315 | h264->chromaFormatIDC = avctx->profile == AV_PROFILE_H264_HIGH_444_PREDICTIVE ? 3 : 1; |
| 1314 | 1316 | ||
| 1315 | h264->level = ctx->level; | 1317 | h264->level = ctx->level; |