This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit dcf339c413e8bd21b5ceae710be97bf2bf5f82ab Author: Timo Rothenpieler <[email protected]> AuthorDate: Tue Jun 23 23:42:51 2026 +0200 Commit: James Almer <[email protected]> CommitDate: Wed Jun 24 18:51:12 2026 +0000 avcodec/nvenc: remove old and long deprecated rc modes --- libavcodec/nvenc.c | 38 -------------------------------------- libavcodec/nvenc.h | 3 --- libavcodec/nvenc_h264.c | 21 --------------------- libavcodec/nvenc_hevc.c | 21 --------------------- 4 files changed, 83 deletions(-) diff --git a/libavcodec/nvenc.c b/libavcodec/nvenc.c index 5ef0ed572a..3f4ff3b9a3 100644 --- a/libavcodec/nvenc.c +++ b/libavcodec/nvenc.c @@ -48,13 +48,7 @@ #define NVENC_CAP 0x30 -#ifndef NVENC_NO_DEPRECATED_RC -#define IS_CBR(rc) (rc == NV_ENC_PARAMS_RC_CBR || \ - rc == NV_ENC_PARAMS_RC_CBR_LOWDELAY_HQ || \ - rc == NV_ENC_PARAMS_RC_CBR_HQ) -#else #define IS_CBR(rc) (rc == NV_ENC_PARAMS_RC_CBR) -#endif const enum AVPixelFormat ff_nvenc_pix_fmts[] = { AV_PIX_FMT_YUV420P, @@ -951,26 +945,10 @@ static void nvenc_override_rate_control(AVCodecContext *avctx) case NV_ENC_PARAMS_RC_CONSTQP: set_constqp(avctx); return; -#ifndef NVENC_NO_DEPRECATED_RC - case NV_ENC_PARAMS_RC_VBR_MINQP: - if (avctx->qmin < 0 && ctx->qmin < 0) { - av_log(avctx, AV_LOG_WARNING, - "The variable bitrate rate-control requires " - "the 'qmin' option set.\n"); - set_vbr(avctx); - return; - } - /* fall through */ - case NV_ENC_PARAMS_RC_VBR_HQ: -#endif case NV_ENC_PARAMS_RC_VBR: set_vbr(avctx); break; case NV_ENC_PARAMS_RC_CBR: -#ifndef NVENC_NO_DEPRECATED_RC - case NV_ENC_PARAMS_RC_CBR_HQ: - case NV_ENC_PARAMS_RC_CBR_LOWDELAY_HQ: -#endif break; } @@ -1056,13 +1034,6 @@ static av_cold int nvenc_setup_rate_control(AVCodecContext *avctx) } } - if (ctx->rc >= 0 && ctx->rc & RC_MODE_DEPRECATED) { - av_log(avctx, AV_LOG_WARNING, "Specified rc mode is deprecated.\n"); - av_log(avctx, AV_LOG_WARNING, "Use -rc constqp/cbr/vbr, -tune and -multipass instead.\n"); - - ctx->rc &= ~RC_MODE_DEPRECATED; - } - ctx->encode_config.rcParams.cbQPIndexOffset = ctx->qp_cb_offset; ctx->encode_config.rcParams.crQPIndexOffset = ctx->qp_cr_offset; @@ -1242,15 +1213,6 @@ static av_cold int nvenc_setup_h264_config(AVCodecContext *avctx) h264->outputPictureTimingSEI = 1; -#ifndef NVENC_NO_DEPRECATED_RC - if (cc->rcParams.rateControlMode == NV_ENC_PARAMS_RC_CBR_LOWDELAY_HQ || - cc->rcParams.rateControlMode == NV_ENC_PARAMS_RC_CBR_HQ || - cc->rcParams.rateControlMode == NV_ENC_PARAMS_RC_VBR_HQ) { - h264->adaptiveTransformMode = NV_ENC_H264_ADAPTIVE_TRANSFORM_ENABLE; - h264->fmoMode = NV_ENC_H264_FMO_DISABLE; - } -#endif - if (ctx->flags & NVENC_LOSSLESS) { h264->qpPrimeYZeroTransformBypassFlag = 1; } else { diff --git a/libavcodec/nvenc.h b/libavcodec/nvenc.h index 2f309b0f68..c3c4b94b71 100644 --- a/libavcodec/nvenc.h +++ b/libavcodec/nvenc.h @@ -39,8 +39,6 @@ typedef void ID3D11Device; #include "avcodec.h" #define MAX_REGISTERED_FRAMES 64 -#define RC_MODE_DEPRECATED 0x800000 -#define RCD(rc_mode) ((rc_mode) | RC_MODE_DEPRECATED) #define NVENCAPI_CHECK_VERSION(major, minor) \ ((major) < NVENCAPI_MAJOR_VERSION || ((major) == NVENCAPI_MAJOR_VERSION && (minor) <= NVENCAPI_MINOR_VERSION)) @@ -52,7 +50,6 @@ typedef void ID3D11Device; // SDK 12.1 compile time feature checks #if NVENCAPI_CHECK_VERSION(12, 1) -#define NVENC_NO_DEPRECATED_RC #define NVENC_HAVE_SPLIT_FRAME_ENCODING #endif diff --git a/libavcodec/nvenc_h264.c b/libavcodec/nvenc_h264.c index f5647c9dda..dea4ea6efa 100644 --- a/libavcodec/nvenc_h264.c +++ b/libavcodec/nvenc_h264.c @@ -94,27 +94,6 @@ static const AVOption options[] = { { "constqp", "Constant QP mode", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_PARAMS_RC_CONSTQP }, 0, 0, VE, .unit = "rc" }, { "vbr", "Variable bitrate mode", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_PARAMS_RC_VBR }, 0, 0, VE, .unit = "rc" }, { "cbr", "Constant bitrate mode", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_PARAMS_RC_CBR }, 0, 0, VE, .unit = "rc" }, -#ifndef NVENC_NO_DEPRECATED_RC - { "vbr_minqp", "Variable bitrate mode with MinQP (deprecated)", 0, AV_OPT_TYPE_CONST, { .i64 = RCD(NV_ENC_PARAMS_RC_VBR_MINQP) }, 0, 0, VE, .unit = "rc" }, - { "ll_2pass_quality", "Multi-pass optimized for image quality (deprecated)", - 0, AV_OPT_TYPE_CONST, { .i64 = RCD(NV_ENC_PARAMS_RC_2_PASS_QUALITY) }, 0, 0, VE, .unit = "rc" }, - { "ll_2pass_size", "Multi-pass optimized for constant frame size (deprecated)", - 0, AV_OPT_TYPE_CONST, { .i64 = RCD(NV_ENC_PARAMS_RC_2_PASS_FRAMESIZE_CAP) }, 0, 0, VE, .unit = "rc" }, - { "vbr_2pass", "Multi-pass variable bitrate mode (deprecated)", 0, AV_OPT_TYPE_CONST, { .i64 = RCD(NV_ENC_PARAMS_RC_2_PASS_VBR) }, 0, 0, VE, .unit = "rc" }, - { "cbr_ld_hq", "Constant bitrate low delay high quality mode", 0, AV_OPT_TYPE_CONST, { .i64 = RCD(NV_ENC_PARAMS_RC_CBR_LOWDELAY_HQ) }, 0, 0, VE, .unit = "rc" }, - { "cbr_hq", "Constant bitrate high quality mode", 0, AV_OPT_TYPE_CONST, { .i64 = RCD(NV_ENC_PARAMS_RC_CBR_HQ) }, 0, 0, VE, .unit = "rc" }, - { "vbr_hq", "Variable bitrate high quality mode", 0, AV_OPT_TYPE_CONST, { .i64 = RCD(NV_ENC_PARAMS_RC_VBR_HQ) }, 0, 0, VE, .unit = "rc" }, -#else - { "vbr_minqp", "Variable bitrate mode with MinQP (deprecated)", 0, AV_OPT_TYPE_CONST, { .i64 = RCD(NV_ENC_PARAMS_RC_VBR) }, 0, 0, VE, .unit = "rc" }, - { "ll_2pass_quality", "Multi-pass optimized for image quality (deprecated)", - 0, AV_OPT_TYPE_CONST, { .i64 = RCD(NV_ENC_PARAMS_RC_VBR) }, 0, 0, VE, .unit = "rc" }, - { "ll_2pass_size", "Multi-pass optimized for constant frame size (deprecated)", - 0, AV_OPT_TYPE_CONST, { .i64 = RCD(NV_ENC_PARAMS_RC_CBR) }, 0, 0, VE, .unit = "rc" }, - { "vbr_2pass", "Multi-pass variable bitrate mode (deprecated)", 0, AV_OPT_TYPE_CONST, { .i64 = RCD(NV_ENC_PARAMS_RC_VBR) }, 0, 0, VE, .unit = "rc" }, - { "cbr_ld_hq", "Constant bitrate low delay high quality mode", 0, AV_OPT_TYPE_CONST, { .i64 = RCD(NV_ENC_PARAMS_RC_CBR) }, 0, 0, VE, .unit = "rc" }, - { "cbr_hq", "Constant bitrate high quality mode", 0, AV_OPT_TYPE_CONST, { .i64 = RCD(NV_ENC_PARAMS_RC_CBR) }, 0, 0, VE, .unit = "rc" }, - { "vbr_hq", "Variable bitrate high quality mode", 0, AV_OPT_TYPE_CONST, { .i64 = RCD(NV_ENC_PARAMS_RC_VBR) }, 0, 0, VE, .unit = "rc" }, -#endif { "rc-lookahead", "Number of frames to look ahead for rate-control", OFFSET(rc_lookahead), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, VE }, { "surfaces", "Number of concurrent surfaces", OFFSET(nb_surfaces), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, MAX_REGISTERED_FRAMES, VE }, diff --git a/libavcodec/nvenc_hevc.c b/libavcodec/nvenc_hevc.c index 17f3f4f027..f8e905282a 100644 --- a/libavcodec/nvenc_hevc.c +++ b/libavcodec/nvenc_hevc.c @@ -89,27 +89,6 @@ static const AVOption options[] = { { "constqp", "Constant QP mode", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_PARAMS_RC_CONSTQP }, 0, 0, VE, .unit = "rc" }, { "vbr", "Variable bitrate mode", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_PARAMS_RC_VBR }, 0, 0, VE, .unit = "rc" }, { "cbr", "Constant bitrate mode", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_PARAMS_RC_CBR }, 0, 0, VE, .unit = "rc" }, -#ifndef NVENC_NO_DEPRECATED_RC - { "vbr_minqp", "Variable bitrate mode with MinQP (deprecated)", 0, AV_OPT_TYPE_CONST, { .i64 = RCD(NV_ENC_PARAMS_RC_VBR_MINQP) }, 0, 0, VE, .unit = "rc" }, - { "ll_2pass_quality", "Multi-pass optimized for image quality (deprecated)", - 0, AV_OPT_TYPE_CONST, { .i64 = RCD(NV_ENC_PARAMS_RC_2_PASS_QUALITY) }, 0, 0, VE, .unit = "rc" }, - { "ll_2pass_size", "Multi-pass optimized for constant frame size (deprecated)", - 0, AV_OPT_TYPE_CONST, { .i64 = RCD(NV_ENC_PARAMS_RC_2_PASS_FRAMESIZE_CAP) }, 0, 0, VE, .unit = "rc" }, - { "vbr_2pass", "Multi-pass variable bitrate mode (deprecated)", 0, AV_OPT_TYPE_CONST, { .i64 = RCD(NV_ENC_PARAMS_RC_2_PASS_VBR) }, 0, 0, VE, .unit = "rc" }, - { "cbr_ld_hq", "Constant bitrate low delay high quality mode", 0, AV_OPT_TYPE_CONST, { .i64 = RCD(NV_ENC_PARAMS_RC_CBR_LOWDELAY_HQ) }, 0, 0, VE, .unit = "rc" }, - { "cbr_hq", "Constant bitrate high quality mode", 0, AV_OPT_TYPE_CONST, { .i64 = RCD(NV_ENC_PARAMS_RC_CBR_HQ) }, 0, 0, VE, .unit = "rc" }, - { "vbr_hq", "Variable bitrate high quality mode", 0, AV_OPT_TYPE_CONST, { .i64 = RCD(NV_ENC_PARAMS_RC_VBR_HQ) }, 0, 0, VE, .unit = "rc" }, -#else - { "vbr_minqp", "Variable bitrate mode with MinQP (deprecated)", 0, AV_OPT_TYPE_CONST, { .i64 = RCD(NV_ENC_PARAMS_RC_VBR) }, 0, 0, VE, .unit = "rc" }, - { "ll_2pass_quality", "Multi-pass optimized for image quality (deprecated)", - 0, AV_OPT_TYPE_CONST, { .i64 = RCD(NV_ENC_PARAMS_RC_VBR) }, 0, 0, VE, .unit = "rc" }, - { "ll_2pass_size", "Multi-pass optimized for constant frame size (deprecated)", - 0, AV_OPT_TYPE_CONST, { .i64 = RCD(NV_ENC_PARAMS_RC_CBR) }, 0, 0, VE, .unit = "rc" }, - { "vbr_2pass", "Multi-pass variable bitrate mode (deprecated)", 0, AV_OPT_TYPE_CONST, { .i64 = RCD(NV_ENC_PARAMS_RC_VBR) }, 0, 0, VE, .unit = "rc" }, - { "cbr_ld_hq", "Constant bitrate low delay high quality mode", 0, AV_OPT_TYPE_CONST, { .i64 = RCD(NV_ENC_PARAMS_RC_CBR) }, 0, 0, VE, .unit = "rc" }, - { "cbr_hq", "Constant bitrate high quality mode", 0, AV_OPT_TYPE_CONST, { .i64 = RCD(NV_ENC_PARAMS_RC_CBR) }, 0, 0, VE, .unit = "rc" }, - { "vbr_hq", "Variable bitrate high quality mode", 0, AV_OPT_TYPE_CONST, { .i64 = RCD(NV_ENC_PARAMS_RC_VBR) }, 0, 0, VE, .unit = "rc" }, -#endif { "rc-lookahead", "Number of frames to look ahead for rate-control", OFFSET(rc_lookahead), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, VE }, { "surfaces", "Number of concurrent surfaces", OFFSET(nb_surfaces), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, MAX_REGISTERED_FRAMES, VE }, _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
