Browse Source

avcodec/nvenc: honor max bitrate in CQ mode

Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
tags/n4.3
Roman Arzumanyan Timo Rothenpieler 5 years ago
parent
commit
470bbf60d4
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      libavcodec/nvenc.c

+ 3
- 3
libavcodec/nvenc.c View File

@@ -956,9 +956,9 @@ static av_cold void nvenc_setup_rate_control(AVCodecContext *avctx)

av_log(avctx, AV_LOG_VERBOSE, "CQ(%d) mode enabled.\n", tmp_quality);

//CQ mode shall discard max & avg bitrate;
avctx->bit_rate = ctx->encode_config.rcParams.averageBitRate = 0;
avctx->rc_max_rate = ctx->encode_config.rcParams.maxBitRate = 0;
//CQ mode shall discard avg bitrate & honor max bitrate;
ctx->encode_config.rcParams.averageBitRate = avctx->bit_rate = 0;
ctx->encode_config.rcParams.maxBitRate = avctx->rc_max_rate;
}
}



Loading…
Cancel
Save