diff --git a/libavcodec/nvenc.h b/libavcodec/nvenc.h index 4a4d6730b1..069ba82bc9 100644 --- a/libavcodec/nvenc.h +++ b/libavcodec/nvenc.h @@ -104,6 +104,7 @@ typedef void ID3D11Device; #if NVENCAPI_CHECK_VERSION(13, 0) #define NVENC_HAVE_H264_10BIT_SUPPORT #define NVENC_HAVE_422_SUPPORT +#define NVENC_HAVE_SFE_FOUR_WAYS_SUPPORT #define NVENC_HAVE_AV1_UHQ_TUNING #define NVENC_HAVE_H264_AND_AV1_TEMPORAL_FILTER #define NVENC_HAVE_HEVC_AND_AV1_MASTERING_METADATA diff --git a/libavcodec/nvenc_av1.c b/libavcodec/nvenc_av1.c index df6a93edcb..446ba684e6 100644 --- a/libavcodec/nvenc_av1.c +++ b/libavcodec/nvenc_av1.c @@ -180,6 +180,9 @@ static const AVOption options[] = { { "forced", "Enabled with number of horizontal strips selected by the driver", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_SPLIT_AUTO_FORCED_MODE }, 0, 0, VE, .unit = "split_encode_mode" }, { "2", "Enabled with number of horizontal strips forced to 2 when number of NVENCs > 1", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_SPLIT_TWO_FORCED_MODE }, 0, 0, VE, .unit = "split_encode_mode" }, { "3", "Enabled with number of horizontal strips forced to 3 when number of NVENCs > 2", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_SPLIT_THREE_FORCED_MODE }, 0, 0, VE, .unit = "split_encode_mode" }, +#ifdef NVENC_HAVE_SFE_FOUR_WAYS_SUPPORT + { "4", "Enabled with number of horizontal strips forced to 4 when number of NVENCs > 3", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_SPLIT_FOUR_FORCED_MODE }, 0, 0, VE, .unit = "split_encode_mode" }, +#endif #endif { NULL } }; diff --git a/libavcodec/nvenc_hevc.c b/libavcodec/nvenc_hevc.c index 2a5d377160..31624f45b1 100644 --- a/libavcodec/nvenc_hevc.c +++ b/libavcodec/nvenc_hevc.c @@ -240,6 +240,9 @@ static const AVOption options[] = { { "forced", "Enabled with number of horizontal strips selected by the driver", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_SPLIT_AUTO_FORCED_MODE }, 0, 0, VE, .unit = "split_encode_mode" }, { "2", "Enabled with number of horizontal strips forced to 2 when number of NVENCs > 1", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_SPLIT_TWO_FORCED_MODE }, 0, 0, VE, .unit = "split_encode_mode" }, { "3", "Enabled with number of horizontal strips forced to 3 when number of NVENCs > 2", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_SPLIT_THREE_FORCED_MODE }, 0, 0, VE, .unit = "split_encode_mode" }, +#ifdef NVENC_HAVE_SFE_FOUR_WAYS_SUPPORT + { "4", "Enabled with number of horizontal strips forced to 4 when number of NVENCs > 3", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_SPLIT_FOUR_FORCED_MODE }, 0, 0, VE, .unit = "split_encode_mode" }, +#endif #endif { NULL } };