aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimo Rothenpieler <timo@rothenpieler.org>2016-05-31 17:00:07 +0200
committerTimo Rothenpieler <timo@rothenpieler.org>2016-05-31 17:00:07 +0200
commit971351b6642e9beb96db64f1fd627404ce9d72de (patch)
treef298a8aaf131be021bede48c3dd37aa33da13df9
parenteae4eba9cbe1b5ffc97b92e671bd7cd024839322 (diff)
downloadffmpeg-971351b6642e9beb96db64f1fd627404ce9d72de.tar.gz
avcodec/nvenc: Handle minqp-only case in set_vbr
-rw-r--r--libavcodec/nvenc.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libavcodec/nvenc.c b/libavcodec/nvenc.c
index f440f5a41f..409a7b785b 100644
--- a/libavcodec/nvenc.c
+++ b/libavcodec/nvenc.c
@@ -531,6 +531,14 @@ static av_cold void set_vbr(AVCodecContext *avctx)
rc->maxQP.qpIntra = avctx->qmax;
qp_inter_p = (avctx->qmax + 3 * avctx->qmin) / 4; // biased towards Qmin
+ } else if (avctx->qmin >= 0) {
+ rc->enableMinQP = 1;
+
+ rc->minQP.qpInterB = avctx->qmin;
+ rc->minQP.qpInterP = avctx->qmin;
+ rc->minQP.qpIntra = avctx->qmin;
+
+ qp_inter_p = avctx->qmin;
} else {
qp_inter_p = 26; // default to 26
}