Commit 470bbf60 authored by Roman Arzumanyan's avatar Roman Arzumanyan Committed by Timo Rothenpieler

avcodec/nvenc: honor max bitrate in CQ mode

Signed-off-by: 's avatarTimo Rothenpieler <timo@rothenpieler.org>
parent 0c79b731
......@@ -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;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment