Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>tags/n3.3
| @@ -756,7 +756,7 @@ static av_cold int nvenc_setup_h264_config(AVCodecContext *avctx) | |||||
| h264->disableSPSPPS = (avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER) ? 1 : 0; | h264->disableSPSPPS = (avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER) ? 1 : 0; | ||||
| h264->repeatSPSPPS = (avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER) ? 0 : 1; | h264->repeatSPSPPS = (avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER) ? 0 : 1; | ||||
| h264->outputAUD = 1; | |||||
| h264->outputAUD = ctx->aud; | |||||
| if (avctx->refs >= 0) { | if (avctx->refs >= 0) { | ||||
| /* 0 means "let the hardware decide" */ | /* 0 means "let the hardware decide" */ | ||||
| @@ -840,7 +840,7 @@ static av_cold int nvenc_setup_hevc_config(AVCodecContext *avctx) | |||||
| hevc->disableSPSPPS = (avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER) ? 1 : 0; | hevc->disableSPSPPS = (avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER) ? 1 : 0; | ||||
| hevc->repeatSPSPPS = (avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER) ? 0 : 1; | hevc->repeatSPSPPS = (avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER) ? 0 : 1; | ||||
| hevc->outputAUD = 1; | |||||
| hevc->outputAUD = ctx->aud; | |||||
| if (avctx->refs >= 0) { | if (avctx->refs >= 0) { | ||||
| /* 0 means "let the hardware decide" */ | /* 0 means "let the hardware decide" */ | ||||
| @@ -153,6 +153,7 @@ typedef struct NvencContext | |||||
| int strict_gop; | int strict_gop; | ||||
| int aq_strength; | int aq_strength; | ||||
| int quality; | int quality; | ||||
| int aud; | |||||
| } NvencContext; | } NvencContext; | ||||
| int ff_nvenc_encode_init(AVCodecContext *avctx); | int ff_nvenc_encode_init(AVCodecContext *avctx); | ||||
| @@ -107,6 +107,7 @@ static const AVOption options[] = { | |||||
| OFFSET(aq_strength), AV_OPT_TYPE_INT, { .i64 = 8 }, 1, 15, VE }, | OFFSET(aq_strength), AV_OPT_TYPE_INT, { .i64 = 8 }, 1, 15, VE }, | ||||
| { "cq", "Set target quality level (0 to 51, 0 means automatic) for constant quality mode in VBR rate control", | { "cq", "Set target quality level (0 to 51, 0 means automatic) for constant quality mode in VBR rate control", | ||||
| OFFSET(quality), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 51, VE }, | OFFSET(quality), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 51, VE }, | ||||
| { "aud", "Use access unit delimiters", OFFSET(aud), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE }, | |||||
| { NULL } | { NULL } | ||||
| }; | }; | ||||
| @@ -104,6 +104,7 @@ static const AVOption options[] = { | |||||
| OFFSET(aq_strength), AV_OPT_TYPE_INT, { .i64 = 8 }, 1, 15, VE }, | OFFSET(aq_strength), AV_OPT_TYPE_INT, { .i64 = 8 }, 1, 15, VE }, | ||||
| { "cq", "Set target quality level (0 to 51, 0 means automatic) for constant quality mode in VBR rate control", | { "cq", "Set target quality level (0 to 51, 0 means automatic) for constant quality mode in VBR rate control", | ||||
| OFFSET(quality), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 51, VE }, | OFFSET(quality), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 51, VE }, | ||||
| { "aud", "Use access unit delimiters", OFFSET(aud), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE }, | |||||
| { NULL } | { NULL } | ||||
| }; | }; | ||||