diff options
author | Joose Sainio <joose.sainio@tuni.fi> | 2021-01-01 22:31:17 +0800 |
---|---|---|
committer | Linjie Fu <linjie.justin.fu@gmail.com> | 2021-01-04 15:18:19 +0000 |
commit | 0cd8769207f1a89fc2236aab9da1c77f5a0b490a (patch) | |
tree | 5d921f8b739ba377583fcae67cf3fff9a22d0595 /libavcodec | |
parent | c8bc0f66a875bc3708d8dc11b757f2198606ffd7 (diff) |
avcodec/libkvazaar: Set default ratecontrol algorithm for libkvazaar
The standalone version of Kvazaar sets a default ratecontrol algorithm when
bitrate is set. Mirror this behaviour.
Signed-off-by: Joose Sainio <joose.sainio@tuni.fi>
Signed-off-by: Linjie Fu <linjie.justin.fu@gmail.com>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/libkvazaar.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/libkvazaar.c b/libavcodec/libkvazaar.c index 9032547678..d94cf995c8 100644 --- a/libavcodec/libkvazaar.c +++ b/libavcodec/libkvazaar.c @@ -95,6 +95,9 @@ static av_cold int libkvazaar_init(AVCodecContext *avctx) cfg->target_bitrate = avctx->bit_rate; cfg->vui.sar_width = avctx->sample_aspect_ratio.num; cfg->vui.sar_height = avctx->sample_aspect_ratio.den; + if (avctx->bit_rate) { + cfg->rc_algorithm = KVZ_LAMBDA; + } if (ctx->kvz_params) { AVDictionary *dict = NULL; |