[FFmpeg-cvslog] lavc/libxavs2: use upper layer qp parameters first

hwren git at videolan.org
Tue Feb 19 07:22:53 EET 2019


ffmpeg | branch: master | hwren <hwrenx at 126.com> | Thu Jan 24 23:16:17 2019 +0800| [11751f62520b0b5a575abb5a8ce061a727eb2668] | committer: Jun Zhao

lavc/libxavs2: use upper layer qp parameters first

Signed-off-by: hwrenx <hwrenx at 126.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=11751f62520b0b5a575abb5a8ce061a727eb2668
---

 libavcodec/libxavs2.c | 4 ++--
 1 file 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);
     }



More information about the ffmpeg-cvslog mailing list