ffmpeg | branch: master | Timo Rothenpieler <t...@rothenpieler.org> | Sun Mar 
31 21:17:11 2024 +0200| [a27096611835f1e46b0c842ad4fffe42b36bad41] | committer: 
Timo Rothenpieler

avcodec/nvenc: add support for uhq tune

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a27096611835f1e46b0c842ad4fffe42b36bad41
---

 libavcodec/nvenc.h      | 1 +
 libavcodec/nvenc_hevc.c | 5 ++++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/libavcodec/nvenc.h b/libavcodec/nvenc.h
index 30f9800d21..3e207b1877 100644
--- a/libavcodec/nvenc.h
+++ b/libavcodec/nvenc.h
@@ -88,6 +88,7 @@ typedef void ID3D11Device;
 #define NVENC_HAVE_NEW_BIT_DEPTH_API
 #define NVENC_HAVE_TEMPORAL_FILTER
 #define NVENC_HAVE_LOOKAHEAD_LEVEL
+#define NVENC_HAVE_UHQ_TUNING
 #endif
 
 typedef struct NvencSurface
diff --git a/libavcodec/nvenc_hevc.c b/libavcodec/nvenc_hevc.c
index 7509a93516..e0d16e82c7 100644
--- a/libavcodec/nvenc_hevc.c
+++ b/libavcodec/nvenc_hevc.c
@@ -51,8 +51,11 @@ static const AVOption options[] = {
     { "p5",          "slow (good quality)",                 0,                 
   AV_OPT_TYPE_CONST, { .i64 = PRESET_P5 },                  0, 0, VE, .unit = 
"preset" },
     { "p6",          "slower (better quality)",             0,                 
   AV_OPT_TYPE_CONST, { .i64 = PRESET_P6 },                  0, 0, VE, .unit = 
"preset" },
     { "p7",          "slowest (best quality)",              0,                 
   AV_OPT_TYPE_CONST, { .i64 = PRESET_P7 },                  0, 0, VE, .unit = 
"preset" },
-    { "tune",        "Set the encoding tuning info",        
OFFSET(tuning_info),  AV_OPT_TYPE_INT,   { .i64 = 
NV_ENC_TUNING_INFO_HIGH_QUALITY }, NV_ENC_TUNING_INFO_HIGH_QUALITY, 
NV_ENC_TUNING_INFO_LOSSLESS,  VE, .unit = "tune" },
+    { "tune",        "Set the encoding tuning info",        
OFFSET(tuning_info),  AV_OPT_TYPE_INT,   { .i64 = 
NV_ENC_TUNING_INFO_HIGH_QUALITY }, NV_ENC_TUNING_INFO_HIGH_QUALITY, 
NV_ENC_TUNING_INFO_COUNT - 1, VE, .unit = "tune" },
     { "hq",          "High quality",                        0,                 
   AV_OPT_TYPE_CONST, { .i64 = NV_ENC_TUNING_INFO_HIGH_QUALITY },             
0, 0, VE, .unit = "tune" },
+#ifdef NVENC_HAVE_UHQ_TUNING
+    { "uhq",         "Ultra high quality",                  0,                 
   AV_OPT_TYPE_CONST, { .i64 = NV_ENC_TUNING_INFO_ULTRA_HIGH_QUALITY },       
0, 0, VE, .unit = "tune" },
+#endif
     { "ll",          "Low latency",                         0,                 
   AV_OPT_TYPE_CONST, { .i64 = NV_ENC_TUNING_INFO_LOW_LATENCY },              
0, 0, VE, .unit = "tune" },
     { "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" },

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to