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
Unified · Split
| @@ -589,16 +589,6 @@ static void nvenc_override_rate_control(AVCodecContext *avctx) · 588 unmodified lines | |||
| 589 | } | 589 | } |
| 590 | set_constqp(avctx); | 590 | set_constqp(avctx); |
| 591 | return; | 591 | return; |
| 592 | case NV_ENC_PARAMS_RC_2_PASS_VBR: | ||
| 593 | case NV_ENC_PARAMS_RC_VBR: | ||
| 594 | if (avctx->qmin < 0 && avctx->qmax < 0) { | ||
| 595 | av_log(avctx, AV_LOG_WARNING, | ||
| 596 | "The variable bitrate rate-control requires " | ||
| 597 | "the 'qmin' and/or 'qmax' option set.\n"); | ||
| 598 | set_vbr(avctx); | ||
| 599 | return; | ||
| 600 | } | ||
| 601 | /* fall through */ | ||
| 602 | case NV_ENC_PARAMS_RC_VBR_MINQP: | 592 | case NV_ENC_PARAMS_RC_VBR_MINQP: |
| 603 | if (avctx->qmin < 0) { | 593 | if (avctx->qmin < 0) { |
| 604 | av_log(avctx, AV_LOG_WARNING, | 594 | av_log(avctx, AV_LOG_WARNING, |
| @@ -607,6 +597,9 @@ static void nvenc_override_rate_control(AVCodecContext *avctx) · 2 unmodified lines | |||
| 607 | set_vbr(avctx); | 597 | set_vbr(avctx); |
| 608 | return; | 598 | return; |
| 609 | } | 599 | } |
| 600 | /* fall through */ | ||
| 601 | case NV_ENC_PARAMS_RC_2_PASS_VBR: | ||
| 602 | case NV_ENC_PARAMS_RC_VBR: | ||
| 610 | set_vbr(avctx); | 603 | set_vbr(avctx); |
| 611 | break; | 604 | break; |
| 612 | case NV_ENC_PARAMS_RC_CBR: | 605 | case NV_ENC_PARAMS_RC_CBR: |