@@ -1697,18 +1697,12 @@ FF_ENABLE_DEPRECATION_WARNINGS
ctx->init_encode_params.enableWeightedPrediction = 1;
#ifdef NVENC_HAVE_SPLIT_FRAME_ENCODING
- if (avctx->codec->id != AV_CODEC_ID_H264 )
- ctx->init_encode_params.splitEncodeMode = ctx->split_encode_mode;
+ ctx->init_encode_params.splitEncodeMode = ctx->split_encode_mode;
if ((ctx->split_encode_mode != NV_ENC_SPLIT_DISABLE_MODE) &&
- ((ctx->weighted_pred == 1) && (avctx->codec->id == AV_CODEC_ID_HEVC ))) {
- av_log(avctx, AV_LOG_WARNING, "Split encoding is not "
- "supported if any of the following features: weighted prediction, "
- "alpha layer encoding, subframe mode, output into video memory "
- "buffer, picture timing/buffering period SEI message insertion "
- "with DX12 interface are enabled in case of HEVC. For AV1, split "
- "encoding is not supported when output into video memory buffer "
- "is enabled.\n");
+ ((ctx->weighted_pred == 1) && (avctx->codec->id == AV_CODEC_ID_HEVC)))
+ {
+ av_log(avctx, AV_LOG_WARNING, "Split encoding not supported with weighted prediction enabled.\n");
}
#endif
@@ -159,7 +159,7 @@ static const AVOption options[] = {
{ "3", "", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_LOOKAHEAD_LEVEL_3 }, 0, 0, VE, .unit = "lookahead_level" },
#endif
#ifdef NVENC_HAVE_SPLIT_FRAME_ENCODING
- { "split_encode_mode", "Specifies the split encoding mode", OFFSET(split_encode_mode), AV_OPT_TYPE_INT, { .i64 = NV_ENC_SPLIT_DISABLE_MODE }, 0, NV_ENC_SPLIT_DISABLE_MODE, VE, .unit = "split_encode_mode" },
+ { "split_encode_mode", "Specifies the split encoding mode", OFFSET(split_encode_mode), AV_OPT_TYPE_INT, { .i64 = NV_ENC_SPLIT_AUTO_MODE }, 0, NV_ENC_SPLIT_DISABLE_MODE, VE, .unit = "split_encode_mode" },
{ "disabled", "Disabled for all configurations", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_SPLIT_DISABLE_MODE }, 0, 0, VE, .unit = "split_encode_mode" },
{ "auto", "Enabled or disabled depending on the preset and tuning info", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_SPLIT_AUTO_MODE }, 0, 0, VE, .unit = "split_encode_mode" },
{ "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" },
@@ -218,7 +218,7 @@ static const AVOption options[] = {
{ "unidir_b", "Enable use of unidirectional B-Frames.", OFFSET(unidir_b), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE },
#endif
#ifdef NVENC_HAVE_SPLIT_FRAME_ENCODING
- { "split_encode_mode", "Specifies the split encoding mode", OFFSET(split_encode_mode), AV_OPT_TYPE_INT, { .i64 = NV_ENC_SPLIT_DISABLE_MODE }, 0, NV_ENC_SPLIT_DISABLE_MODE, VE, .unit = "split_encode_mode" },
+ { "split_encode_mode", "Specifies the split encoding mode", OFFSET(split_encode_mode), AV_OPT_TYPE_INT, { .i64 = NV_ENC_SPLIT_AUTO_MODE }, 0, NV_ENC_SPLIT_DISABLE_MODE, VE, .unit = "split_encode_mode" },
{ "disabled", "Disabled for all configurations", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_SPLIT_DISABLE_MODE }, 0, 0, VE, .unit = "split_encode_mode" },
{ "auto", "Enabled or disabled depending on the preset and tuning info", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_SPLIT_AUTO_MODE }, 0, 0, VE, .unit = "split_encode_mode" },
{ "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" },