|
|
|
@ -876,6 +876,9 @@ static av_cold int nvenc_encode_init(AVCodecContext *avctx) |
|
|
|
|
|
|
|
|
|
ctx->encode_config.encodeCodecConfig.h264Config.h264VUIParameters.videoFullRangeFlag = avctx->color_range == AVCOL_RANGE_JPEG; |
|
|
|
|
|
|
|
|
|
ctx->encode_config.encodeCodecConfig.h264Config.sliceMode = 3; |
|
|
|
|
ctx->encode_config.encodeCodecConfig.h264Config.sliceModeData = 1; |
|
|
|
|
|
|
|
|
|
ctx->encode_config.encodeCodecConfig.h264Config.disableSPSPPS = (avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER) ? 1 : 0; |
|
|
|
|
ctx->encode_config.encodeCodecConfig.h264Config.repeatSPSPPS = (avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER) ? 0 : 1; |
|
|
|
|
|
|
|
|
@ -940,6 +943,9 @@ static av_cold int nvenc_encode_init(AVCodecContext *avctx) |
|
|
|
|
|
|
|
|
|
break; |
|
|
|
|
case AV_CODEC_ID_H265: |
|
|
|
|
ctx->encode_config.encodeCodecConfig.hevcConfig.sliceMode = 3; |
|
|
|
|
ctx->encode_config.encodeCodecConfig.hevcConfig.sliceModeData = 1; |
|
|
|
|
|
|
|
|
|
ctx->encode_config.encodeCodecConfig.hevcConfig.disableSPSPPS = (avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER) ? 1 : 0; |
|
|
|
|
ctx->encode_config.encodeCodecConfig.hevcConfig.repeatSPSPPS = (avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER) ? 0 : 1; |
|
|
|
|
|
|
|
|
|