diff options
author | hwren <hwrenx@126.com> | 2019-01-24 23:16:17 +0800 |
---|---|---|
committer | Jun Zhao <mypopydev@gmail.com> | 2019-02-19 13:21:04 +0800 |
commit | 11751f62520b0b5a575abb5a8ce061a727eb2668 (patch) | |
tree | ba773c12ddc0b595920b1a512fcdce8658973846 | |
parent | 8754147db668f55a4ba3e5c27929a6cda747d1dd (diff) | |
download | ffmpeg-11751f62520b0b5a575abb5a8ce061a727eb2668.tar.gz |
lavc/libxavs2: use upper layer qp parameters first
Signed-off-by: hwrenx <hwrenx@126.com>
-rw-r--r-- | libavcodec/libxavs2.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/libxavs2.c b/libavcodec/libxavs2.c index 2d294272a2..d5c455797d 100644 --- a/libavcodec/libxavs2.c +++ b/libavcodec/libxavs2.c @@ -109,8 +109,8 @@ static av_cold int xavs2_init(AVCodecContext *avctx) xavs2_opt_set2("RateControl", "%d", 1); xavs2_opt_set2("TargetBitRate", "%"PRId64"", avctx->bit_rate); xavs2_opt_set2("InitialQP", "%d", cae->initial_qp); - xavs2_opt_set2("MaxQP", "%d", cae->max_qp); - xavs2_opt_set2("MinQP", "%d", cae->min_qp); + xavs2_opt_set2("MaxQP", "%d", avctx->qmax >= 0 ? avctx->qmax : cae->max_qp); + xavs2_opt_set2("MinQP", "%d", avctx->qmin >= 0 ? avctx->qmin : cae->min_qp); } else { xavs2_opt_set2("InitialQP", "%d", cae->qp); } |