Skip to content

Commit

Permalink
vcomp/lavc: accept bitrate also for CQP
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinPulec committed Jul 10, 2024
1 parent c9930dc commit 5aa8657
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/video_compress/libavcodec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1957,16 +1957,18 @@ static void configure_svt(AVCodecContext *codec_ctx, struct setparam_param *para
//pred-struct=1 is low-latency mode
char params[STR_LEN] = "pred-struct=1:";
if (param->requested_bitrate > 0) {
if (param->requested_crf == -1) {
if (param->requested_crf == -1 && param->requested_cqp == -1) {
params[0] =
'\0'; // do not set pred-struct for VBR
MSG(WARNING,
"Bitrate setting without crf for SVT AV1 "
"is not recommended since it increases "
"latency, prefer CRF/CQP if possible\n");
"Bitrate setting without crf/cqp for SVT "
"AV1 is not recommended since it increases "
"latency, prefer CRF or CQP mode if "
"possible.\n");
MSG(WARNING,
"However, you can specify _both_ crf and "
"bitrate options to set bitrate limit.\n");
"However, you can specify _both_ crf/cqp "
"and bitrate options to set bitrate "
"limit.\n");
} else {
codec_ctx->rc_max_rate = param->requested_bitrate;
codec_ctx->bit_rate = 0;
Expand Down

0 comments on commit 5aa8657

Please sign in to comment.