This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

commit 2b054bc9e660513ab2acfcdc97cb118874102e80
Author:     Timo Rothenpieler <[email protected]>
AuthorDate: Tue Jun 23 23:52:40 2026 +0200
Commit:     James Almer <[email protected]>
CommitDate: Wed Jun 24 18:51:12 2026 +0000

    avcodec/nvenc: remove legacy cbr and 2pass AVOptions
---
 libavcodec/nvenc.c      | 6 ++----
 libavcodec/nvenc.h      | 2 --
 libavcodec/nvenc_h264.c | 2 --
 libavcodec/nvenc_hevc.c | 2 --
 4 files changed, 2 insertions(+), 10 deletions(-)

diff --git a/libavcodec/nvenc.c b/libavcodec/nvenc.c
index 3f4ff3b9a3..d4f90f6d72 100644
--- a/libavcodec/nvenc.c
+++ b/libavcodec/nvenc.c
@@ -1021,13 +1021,11 @@ static av_cold int 
nvenc_setup_rate_control(AVCodecContext *avctx)
 
     if (ctx->flags & NVENC_ONE_PASS)
         ctx->encode_config.rcParams.multiPass = NV_ENC_MULTI_PASS_DISABLED;
-    if (ctx->flags & NVENC_TWO_PASSES || ctx->twopass > 0)
+    if (ctx->flags & NVENC_TWO_PASSES)
         ctx->encode_config.rcParams.multiPass = 
NV_ENC_TWO_PASS_FULL_RESOLUTION;
 
     if (ctx->rc < 0) {
-        if (ctx->cbr) {
-            ctx->rc = NV_ENC_PARAMS_RC_CBR;
-        } else if (ctx->cqp >= 0) {
+        if (ctx->cqp >= 0) {
             ctx->rc = NV_ENC_PARAMS_RC_CONSTQP;
         } else if (ctx->quality >= 0.0f) {
             ctx->rc = NV_ENC_PARAMS_RC_VBR;
diff --git a/libavcodec/nvenc.h b/libavcodec/nvenc.h
index c3c4b94b71..60573fe800 100644
--- a/libavcodec/nvenc.h
+++ b/libavcodec/nvenc.h
@@ -234,10 +234,8 @@ typedef struct NvencContext
     int level;
     int tier;
     int rc;
-    int cbr;
     int tile_rows;
     int tile_cols;
-    int twopass;
     int device;
     int flags;
     int async_depth;
diff --git a/libavcodec/nvenc_h264.c b/libavcodec/nvenc_h264.c
index dea4ea6efa..e9fddf1fd9 100644
--- a/libavcodec/nvenc_h264.c
+++ b/libavcodec/nvenc_h264.c
@@ -97,8 +97,6 @@ static const AVOption options[] = {
     { "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 },
-    { "cbr",          "Use cbr encoding mode",              OFFSET(cbr),       
   AV_OPT_TYPE_BOOL,  { .i64 = 0 },   0, 1, VE },
-    { "2pass",        "Use 2pass encoding mode",            OFFSET(twopass),   
   AV_OPT_TYPE_BOOL,  { .i64 = -1 }, -1, 1, VE },
     { "gpu",          "Selects which NVENC capable GPU to use. First GPU is 0, 
second is 1, and so on.",
                                                             OFFSET(device),    
   AV_OPT_TYPE_INT,   { .i64 = ANY_DEVICE },   -2, INT_MAX, VE, .unit = "gpu" },
     { "any",          "Pick the first device available",    0,                 
   AV_OPT_TYPE_CONST, { .i64 = ANY_DEVICE },          0, 0, VE, .unit = "gpu" },
diff --git a/libavcodec/nvenc_hevc.c b/libavcodec/nvenc_hevc.c
index f8e905282a..9709ebba66 100644
--- a/libavcodec/nvenc_hevc.c
+++ b/libavcodec/nvenc_hevc.c
@@ -92,8 +92,6 @@ static const AVOption options[] = {
     { "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 },
-    { "cbr",          "Use cbr encoding mode",              OFFSET(cbr),       
   AV_OPT_TYPE_BOOL,  { .i64 = 0 },   0, 1, VE },
-    { "2pass",        "Use 2pass encoding mode",            OFFSET(twopass),   
   AV_OPT_TYPE_BOOL,  { .i64 = -1 }, -1, 1, VE },
     { "gpu",          "Selects which NVENC capable GPU to use. First GPU is 0, 
second is 1, and so on.",
                                                             OFFSET(device),    
   AV_OPT_TYPE_INT,   { .i64 = ANY_DEVICE }, -2, INT_MAX, VE, .unit = "gpu" },
     { "any",          "Pick the first device available",    0,                 
   AV_OPT_TYPE_CONST, { .i64 = ANY_DEVICE },        0, 0, VE, .unit = "gpu" },

_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to