History

avcodec/nvenc: add UHQ to AV1 for NVENC

This commit adds support for Ultra High Quality mode for AV1 on NVIDIA GPUs.

Diego de Souza committed 1 year ago

Commit ed80e551 parent 2cfef292 files · +5 −1Browse files

Unified · Split

2 files
  1. libavcodec/nvenc.h +1 −0
  2. libavcodec/nvenc_av1.c +4 −1
libavcodec/nvenc.h+1−0
@@ -97,6 +97,7 @@ typedef void ID3D11Device; · 96 unmodified lines
9797 #if NVENCAPI_CHECK_VERSION(13, 0)
9898 #define NVENC_HAVE_H264_10BIT_SUPPORT
9999 #define NVENC_HAVE_422_SUPPORT
100+#define NVENC_HAVE_AV1_UHQ_TUNING
100101 #endif
101102
102103 typedef struct NvencSurface
libavcodec/nvenc_av1.c+4−1
@@ -38,8 +38,11 @@ static const AVOption options[] = { · 37 unmodified lines
3838 { "p5", "slow (good quality)", 0, AV_OPT_TYPE_CONST, { .i64 = PRESET_P5 }, 0, 0, VE, .unit = "preset" },
3939 { "p6", "slower (better quality)", 0, AV_OPT_TYPE_CONST, { .i64 = PRESET_P6 }, 0, 0, VE, .unit = "preset" },
4040 { "p7", "slowest (best quality)", 0, AV_OPT_TYPE_CONST, { .i64 = PRESET_P7 }, 0, 0, VE, .unit = "preset" },
41− { "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" },
41+ { "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" },
4242 { "hq", "High quality", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_TUNING_INFO_HIGH_QUALITY }, 0, 0, VE, .unit = "tune" },
43+#ifdef NVENC_HAVE_AV1_UHQ_TUNING
44+ { "uhq", "Ultra high quality", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_TUNING_INFO_ULTRA_HIGH_QUALITY }, 0, 0, VE, .unit = "tune" },
45+#endif
4346 { "ll", "Low latency", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_TUNING_INFO_LOW_LATENCY }, 0, 0, VE, .unit = "tune" },
4447 { "ull", "Ultra low latency", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_TUNING_INFO_ULTRA_LOW_LATENCY }, 0, 0, VE, .unit = "tune" },
4548 { "lossless", "Lossless", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_TUNING_INFO_LOSSLESS }, 0, 0, VE, .unit = "tune" },

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t