You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
avcodec/nvenc: Write buffPeriod/picTime SEI in both CBR modes
This commit is contained in:
@@ -796,13 +796,16 @@ static av_cold int nvenc_encode_init(AVCodecContext *avctx)
|
|||||||
if (avctx->codec->id == AV_CODEC_ID_H264) {
|
if (avctx->codec->id == AV_CODEC_ID_H264) {
|
||||||
ctx->encode_config.encodeCodecConfig.h264Config.adaptiveTransformMode = NV_ENC_H264_ADAPTIVE_TRANSFORM_ENABLE;
|
ctx->encode_config.encodeCodecConfig.h264Config.adaptiveTransformMode = NV_ENC_H264_ADAPTIVE_TRANSFORM_ENABLE;
|
||||||
ctx->encode_config.encodeCodecConfig.h264Config.fmoMode = NV_ENC_H264_FMO_DISABLE;
|
ctx->encode_config.encodeCodecConfig.h264Config.fmoMode = NV_ENC_H264_FMO_DISABLE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (avctx->codec->id == AV_CODEC_ID_H264) {
|
||||||
ctx->encode_config.encodeCodecConfig.h264Config.outputBufferingPeriodSEI = 1;
|
ctx->encode_config.encodeCodecConfig.h264Config.outputBufferingPeriodSEI = 1;
|
||||||
ctx->encode_config.encodeCodecConfig.h264Config.outputPictureTimingSEI = 1;
|
ctx->encode_config.encodeCodecConfig.h264Config.outputPictureTimingSEI = 1;
|
||||||
} else if(avctx->codec->id == AV_CODEC_ID_H265) {
|
} else if(avctx->codec->id == AV_CODEC_ID_H265) {
|
||||||
ctx->encode_config.encodeCodecConfig.hevcConfig.outputBufferingPeriodSEI = 1;
|
ctx->encode_config.encodeCodecConfig.hevcConfig.outputBufferingPeriodSEI = 1;
|
||||||
ctx->encode_config.encodeCodecConfig.hevcConfig.outputPictureTimingSEI = 1;
|
ctx->encode_config.encodeCodecConfig.hevcConfig.outputPictureTimingSEI = 1;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
} else if (avctx->global_quality > 0) {
|
} else if (avctx->global_quality > 0) {
|
||||||
ctx->encode_config.rcParams.rateControlMode = NV_ENC_PARAMS_RC_CONSTQP;
|
ctx->encode_config.rcParams.rateControlMode = NV_ENC_PARAMS_RC_CONSTQP;
|
||||||
ctx->encode_config.rcParams.constQP.qpInterB = avctx->global_quality;
|
ctx->encode_config.rcParams.constQP.qpInterB = avctx->global_quality;
|
||||||
|
Reference in New Issue
Block a user