summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimo Rothenpieler <timo@rothenpieler.org>2016-05-11 11:52:25 +0200
committerTimo Rothenpieler <timo@rothenpieler.org>2016-05-11 12:58:52 +0200
commitc921ca9b5d27b8d93f260c1b13c3443df3e362bd (patch)
tree9114e0807b08ee6ccdf1066746505c1bb45c9a12
parent3a9df7dfec89fadfee9e814e6adb2706908dffa4 (diff)
avcodec/nvenc: Write buffPeriod/picTime SEI in both CBR modes
-rw-r--r--libavcodec/nvenc.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/libavcodec/nvenc.c b/libavcodec/nvenc.c
index 4d4a647bb7..104aea0fd4 100644
--- a/libavcodec/nvenc.c
+++ b/libavcodec/nvenc.c
@@ -796,13 +796,16 @@ static av_cold int nvenc_encode_init(AVCodecContext *avctx)
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.fmoMode = NV_ENC_H264_FMO_DISABLE;
- ctx->encode_config.encodeCodecConfig.h264Config.outputBufferingPeriodSEI = 1;
- ctx->encode_config.encodeCodecConfig.h264Config.outputPictureTimingSEI = 1;
- } else if(avctx->codec->id == AV_CODEC_ID_H265) {
- ctx->encode_config.encodeCodecConfig.hevcConfig.outputBufferingPeriodSEI = 1;
- ctx->encode_config.encodeCodecConfig.hevcConfig.outputPictureTimingSEI = 1;
}
}
+
+ if (avctx->codec->id == AV_CODEC_ID_H264) {
+ ctx->encode_config.encodeCodecConfig.h264Config.outputBufferingPeriodSEI = 1;
+ ctx->encode_config.encodeCodecConfig.h264Config.outputPictureTimingSEI = 1;
+ } else if(avctx->codec->id == AV_CODEC_ID_H265) {
+ ctx->encode_config.encodeCodecConfig.hevcConfig.outputBufferingPeriodSEI = 1;
+ ctx->encode_config.encodeCodecConfig.hevcConfig.outputPictureTimingSEI = 1;
+ }
} else if (avctx->global_quality > 0) {
ctx->encode_config.rcParams.rateControlMode = NV_ENC_PARAMS_RC_CONSTQP;
ctx->encode_config.rcParams.constQP.qpInterB = avctx->global_quality;