mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-08 06:09:50 +00:00
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>
This commit is contained in:
parent
c8bc0f66a8
commit
0cd8769207
1 changed files with 3 additions and 0 deletions
|
|
@ -95,6 +95,9 @@ static av_cold int libkvazaar_init(AVCodecContext *avctx)
|
||||||
cfg->target_bitrate = avctx->bit_rate;
|
cfg->target_bitrate = avctx->bit_rate;
|
||||||
cfg->vui.sar_width = avctx->sample_aspect_ratio.num;
|
cfg->vui.sar_width = avctx->sample_aspect_ratio.num;
|
||||||
cfg->vui.sar_height = avctx->sample_aspect_ratio.den;
|
cfg->vui.sar_height = avctx->sample_aspect_ratio.den;
|
||||||
|
if (avctx->bit_rate) {
|
||||||
|
cfg->rc_algorithm = KVZ_LAMBDA;
|
||||||
|
}
|
||||||
|
|
||||||
if (ctx->kvz_params) {
|
if (ctx->kvz_params) {
|
||||||
AVDictionary *dict = NULL;
|
AVDictionary *dict = NULL;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue