mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avcodec/nvenc: honor max bitrate in CQ mode
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
This commit is contained in:
parent
0c79b73164
commit
470bbf60d4
@ -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…
Reference in New Issue
Block a user