26 #define OFFSET(x) offsetof(NvencContext, x)
27 #define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM
71 {
"rc",
"Override the preset rate-control",
OFFSET(rc),
AV_OPT_TYPE_INT, { .i64 = -1 }, -1, INT_MAX,
VE,
"rc" },
76 {
"ll_2pass_quality",
"Multi-pass optimized for image quality (only for low-latency presets)",
78 {
"ll_2pass_size",
"Multi-pass optimized for constant frame size (only for low-latency presets)",
81 {
"rc-lookahead",
"Number of frames to look ahead for rate-control",
86 {
"gpu",
"Selects which NVENC capable GPU to use. First GPU is 0, second is 1, and so on.",
90 {
"delay",
"Delay frame output by the given amount of frames",
92 {
"no-scenecut",
"When lookahead is enabled, set this to 1 to disable adaptive I-frame insertion at scene cuts",
94 {
"forced-idr",
"If forcing keyframes, force them as IDR frames.",
96 {
"b_adapt",
"When lookahead is enabled, set this to 0 to disable adaptive B-frame decision",
100 {
"zerolatency",
"Set 1 to indicate zero latency operation (no reordering delay)",
102 {
"nonref_p",
"Set this to 1 to enable automatic insertion of non-reference P-frames",
104 {
"strict_gop",
"Set 1 to minimize GOP-to-GOP rate fluctuations",
106 {
"aq-strength",
"When Spatial AQ is enabled, this field is used to specify AQ strength. AQ strength scale is from 1 (low) - 15 (aggressive)",
108 {
"cq",
"Set target quality level (0 to 51, 0 means automatic) for constant quality mode in VBR rate control",
111 {
"bluray-compat",
"Bluray compatibility workarounds",
OFFSET(bluray_compat),
AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1,
VE },
115 {
"qp",
"Constant quantization parameter rate control method",
132 #if FF_API_NVENC_OLD_NAME
140 #if CONFIG_NVENC_ENCODER
141 static const AVClass nvenc_class = {
157 .priv_class = &nvenc_class,
158 .defaults = defaults,
166 #if CONFIG_NVENC_H264_ENCODER
167 static const AVClass nvenc_h264_class = {
174 AVCodec ff_nvenc_h264_encoder = {
175 .
name =
"nvenc_h264",
183 .priv_class = &nvenc_h264_class,
184 .defaults = defaults,
201 .
name =
"h264_nvenc",
209 .priv_class = &h264_nvenc_class,
210 .defaults = defaults,
#define FF_CODEC_CAP_INIT_CLEANUP
The codec allows calling the close function for deallocation even if the init function returned a fai...
av_cold int ff_nvenc_encode_close(AVCodecContext *avctx)
static av_cold int nvenc_old_init(AVCodecContext *avctx)
#define AV_LOG_WARNING
Something somehow does not look correct.
#define LIBAVUTIL_VERSION_INT
static const AVClass h264_nvenc_class
static const AVCodecDefault defaults[]
const char * class_name
The name of the class; usually it is the same name as the context structure type to which the AVClass...
#define AV_CODEC_CAP_DELAY
Encoder or decoder requires flushing with NULL input at the end in order to give the complete and cor...
enum AVPixelFormat ff_nvenc_pix_fmts[]
#define MAX_REGISTERED_FRAMES
AVCodec ff_h264_nvenc_encoder
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Multi pass encoding optimized for maintaining frame size and works only with low latency mode...
const char * name
Name of the codec implementation.
common internal API header
av_cold int ff_nvenc_encode_init(AVCodecContext *avctx)
int ff_nvenc_encode_frame(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *frame, int *got_packet)
Multi pass encoding optimized for image quality and works only with low latency mode.
Variable bitrate mode with MinQP.
Libavcodec external API header.
main external API structure.
Describe the class of an AVClass context structure.
static enum AVPixelFormat pix_fmts[]
common internal api header.
static const AVOption options[]