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

Git pushed a commit to branch master
in repository ffmpeg.

The following commit(s) were added to refs/heads/master by this push:
     new 63e0a2add2 avcodec/nvenc: change default H.264 profile from main to 
high
63e0a2add2 is described below

commit 63e0a2add2dc4811b41983035c7f5ef31fa28911
Author:     Diego de Souza <[email protected]>
AuthorDate: Fri Feb 27 17:47:03 2026 +0100
Commit:     Timo Rothenpieler <[email protected]>
CommitDate: Tue Mar 10 15:08:16 2026 +0000

    avcodec/nvenc: change default H.264 profile from main to high
    
    The NVENC H.264 high profile provides up to 16% bitrate savings
    (BD-Rate measured with VMAF) compared to the main profile.
    
    Since most users do not explicitly set a profile, changing the
    default benefits the common case. Users requiring the main profile
    for legacy decoder compatibility can still set it explicitly.
    
    The change is gated behind a versioned define so it only takes
    effect on the next major version bump (libavcodec 63).
    
    Signed-off-by: Diego de Souza <[email protected]>
---
 libavcodec/nvenc_h264.c    | 4 ++++
 libavcodec/version_major.h | 2 ++
 2 files changed, 6 insertions(+)

diff --git a/libavcodec/nvenc_h264.c b/libavcodec/nvenc_h264.c
index 842e4eef60..2fbd1cad87 100644
--- a/libavcodec/nvenc_h264.c
+++ b/libavcodec/nvenc_h264.c
@@ -57,7 +57,11 @@ static const AVOption options[] = {
     { "ull",         "Ultra low latency",                   0,                 
   AV_OPT_TYPE_CONST, { .i64 = NV_ENC_TUNING_INFO_ULTRA_LOW_LATENCY },        
0, 0, VE, .unit = "tune" },
     { "lossless",    "Lossless",                            0,                 
   AV_OPT_TYPE_CONST, { .i64 = NV_ENC_TUNING_INFO_LOSSLESS },                 
0, 0, VE, .unit = "tune" },
 #endif
+#if FF_API_NVENC_H264_MAIN
     { "profile",      "Set the encoding profile",           OFFSET(profile),   
   AV_OPT_TYPE_INT,   { .i64 = NV_ENC_H264_PROFILE_MAIN }, 
NV_ENC_H264_PROFILE_BASELINE, NV_ENC_H264_PROFILE_HIGH_444P, VE, .unit = 
"profile" },
+#else
+    { "profile",      "Set the encoding profile",           OFFSET(profile),   
   AV_OPT_TYPE_INT,   { .i64 = NV_ENC_H264_PROFILE_HIGH }, 
NV_ENC_H264_PROFILE_BASELINE, NV_ENC_H264_PROFILE_HIGH_444P, VE, .unit = 
"profile" },
+#endif
     { "baseline",     "",                                   0,                 
   AV_OPT_TYPE_CONST, { .i64 = NV_ENC_H264_PROFILE_BASELINE },  0, 0, VE, .unit 
= "profile" },
     { "main",         "",                                   0,                 
   AV_OPT_TYPE_CONST, { .i64 = NV_ENC_H264_PROFILE_MAIN },      0, 0, VE, .unit 
= "profile" },
     { "high",         "",                                   0,                 
   AV_OPT_TYPE_CONST, { .i64 = NV_ENC_H264_PROFILE_HIGH },      0, 0, VE, .unit 
= "profile" },
diff --git a/libavcodec/version_major.h b/libavcodec/version_major.h
index 6c652374dd..c14f0d0989 100644
--- a/libavcodec/version_major.h
+++ b/libavcodec/version_major.h
@@ -56,4 +56,6 @@
 // reminder to remove Sonic decoder on next-next major bump
 #define FF_CODEC_SONIC_DEC         (LIBAVCODEC_VERSION_MAJOR < 63)
 
+#define FF_API_NVENC_H264_MAIN     (LIBAVCODEC_VERSION_MAJOR < 63)
+
 #endif /* AVCODEC_VERSION_MAJOR_H */

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

Reply via email to