summaryrefslogtreecommitdiff
path: root/libavcodec/nvenc.c
diff options
context:
space:
mode:
authorGanapathy Raman Kasi <gkasi@nvidia.com>2017-02-24 01:42:27 +0000
committerTimo Rothenpieler <timo@rothenpieler.org>2017-03-01 12:20:54 +0100
commita549243b89da7df5504253b9679b777834014b7f (patch)
tree31486f9d4c5a3d5b4a8c7805c3bd061a2ea97d08 /libavcodec/nvenc.c
parentb27be563a88544bf0e151321f073493817048f86 (diff)
avcodec/nvenc: remove qmin and qmax constraints for vbr
qmin and qmax are not necessary for nvenc vbr. Enforcing this constraint, doesn't allow user to use vbr 2 pass mode without explicity setting the qmin and qmax options Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
Diffstat (limited to 'libavcodec/nvenc.c')
-rw-r--r--libavcodec/nvenc.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/libavcodec/nvenc.c b/libavcodec/nvenc.c
index ba2647b10a..fbd42f4138 100644
--- a/libavcodec/nvenc.c
+++ b/libavcodec/nvenc.c
@@ -589,16 +589,6 @@ static void nvenc_override_rate_control(AVCodecContext *avctx)
}
set_constqp(avctx);
return;
- case NV_ENC_PARAMS_RC_2_PASS_VBR:
- case NV_ENC_PARAMS_RC_VBR:
- if (avctx->qmin < 0 && avctx->qmax < 0) {
- av_log(avctx, AV_LOG_WARNING,
- "The variable bitrate rate-control requires "
- "the 'qmin' and/or 'qmax' option set.\n");
- set_vbr(avctx);
- return;
- }
- /* fall through */
case NV_ENC_PARAMS_RC_VBR_MINQP:
if (avctx->qmin < 0) {
av_log(avctx, AV_LOG_WARNING,
@@ -607,6 +597,9 @@ static void nvenc_override_rate_control(AVCodecContext *avctx)
set_vbr(avctx);
return;
}
+ /* fall through */
+ case NV_ENC_PARAMS_RC_2_PASS_VBR:
+ case NV_ENC_PARAMS_RC_VBR:
set_vbr(avctx);
break;
case NV_ENC_PARAMS_RC_CBR: