Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhwren <hwrenx@126.com>2019-01-24 18:16:17 +0300
committerJun Zhao <mypopydev@gmail.com>2019-02-19 08:21:04 +0300
commit11751f62520b0b5a575abb5a8ce061a727eb2668 (patch)
treeba773c12ddc0b595920b1a512fcdce8658973846 /libavcodec/libxavs2.c
parent8754147db668f55a4ba3e5c27929a6cda747d1dd (diff)
lavc/libxavs2: use upper layer qp parameters first
Signed-off-by: hwrenx <hwrenx@126.com>
Diffstat (limited to 'libavcodec/libxavs2.c')
-rw-r--r--libavcodec/libxavs2.c4
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);
}