Go to the documentation of this file.
19 #ifndef AVCODEC_NVENC_H
20 #define AVCODEC_NVENC_H
31 #include <ffnvcodec/nvEncodeAPI.h>
41 #define MAX_REGISTERED_FRAMES 64
42 #define RC_MODE_DEPRECATED 0x800000
43 #define RCD(rc_mode) ((rc_mode) | RC_MODE_DEPRECATED)
45 #define NVENCAPI_CHECK_VERSION(major, minor) \
46 ((major) < NVENCAPI_MAJOR_VERSION || ((major) == NVENCAPI_MAJOR_VERSION && (minor) <= NVENCAPI_MINOR_VERSION))
49 #if NVENCAPI_CHECK_VERSION(8, 1)
50 #define NVENC_HAVE_BFRAME_REF_MODE
51 #define NVENC_HAVE_QP_MAP_MODE
55 #if NVENCAPI_CHECK_VERSION(9, 0)
56 #define NVENC_HAVE_HEVC_BFRAME_REF_MODE
60 #if NVENCAPI_CHECK_VERSION(9, 1)
61 #define NVENC_HAVE_MULTIPLE_REF_FRAMES
62 #define NVENC_HAVE_CUSTREAM_PTR
63 #define NVENC_HAVE_GETLASTERRORSTRING
67 #if NVENCAPI_CHECK_VERSION(10, 0)
68 #define NVENC_HAVE_NEW_PRESETS
69 #define NVENC_HAVE_MULTIPASS
70 #define NVENC_HAVE_LDKFS
71 #define NVENC_HAVE_H264_LVL6
72 #define NVENC_HAVE_HEVC_CONSTRAINED_ENCODING
76 #if NVENCAPI_CHECK_VERSION(11, 1)
77 #define NVENC_HAVE_QP_CHROMA_OFFSETS
78 #define NVENC_HAVE_SINGLE_SLICE_INTRA_REFRESH
82 #if NVENCAPI_CHECK_VERSION(12, 1)
83 #define NVENC_NO_DEPRECATED_RC
84 #define NVENC_HAVE_SPLIT_FRAME_ENCODING
88 #if NVENCAPI_CHECK_VERSION(12, 2)
89 #define NVENC_HAVE_NEW_BIT_DEPTH_API
90 #define NVENC_HAVE_TEMPORAL_FILTER
91 #define NVENC_HAVE_LOOKAHEAD_LEVEL
92 #define NVENC_HAVE_UHQ_TUNING
93 #define NVENC_HAVE_UNIDIR_B
139 #ifdef NVENC_HAVE_NEW_PRESETS
AVPixelFormat
Pixel format.
AVFifo * output_surface_ready_queue
@ NVENC_DEPRECATED_PRESET
@ NV_ENC_H264_PROFILE_HIGH
@ PRESET_LOSSLESS_DEFAULT
This structure describes decoded (raw) audio or video data.
NV_ENC_CONFIG encode_config
NvencDynLoadFunctions nvenc_dload_funcs
uint64_t output_frame_num
@ NV_ENC_HEVC_PROFILE_REXT
@ NV_ENC_H264_PROFILE_MAIN
NV_ENC_REGISTERED_PTR regptr
int single_slice_intra_refresh
@ NV_ENC_H264_PROFILE_HIGH_444P
uint32_t frame_idx_counter
@ NVENC_RGB_MODE_DISABLED
NV_ENC_BUFFER_FORMAT format
NV_ENC_INITIALIZE_PARAMS init_encode_params
NvencFunctions * nvenc_dl
NV_ENC_INPUT_PTR input_surface
Describe the class of an AVClass context structure.
AVBufferRef * frame_opaque_ref
int64_t initial_delay_time
int ff_nvenc_encode_init(AVCodecContext *avctx)
NV_ENC_MAP_INPUT_RESOURCE in_map
#define MAX_REGISTERED_FRAMES
enum AVPixelFormat data_pix_fmt
NV_ENC_SEI_PAYLOAD * sei_data
AVFifo * output_surface_queue
void ff_nvenc_encode_flush(AVCodecContext *avctx)
NvencFrameData * frame_data_array
@ NV_ENC_H264_PROFILE_BASELINE
struct NvencContext::@192 registered_frames[MAX_REGISTERED_FRAMES]
@ NV_ENC_HEVC_PROFILE_MAIN
int ff_nvenc_receive_packet(AVCodecContext *avctx, AVPacket *pkt)
main external API structure.
int ff_nvenc_encode_close(AVCodecContext *avctx)
NV_ENC_OUTPUT_PTR output_surface
@ NV_ENC_HEVC_PROFILE_MAIN_10
NV_ENCODE_API_FUNCTION_LIST nvenc_funcs
A reference to a data buffer.
This structure stores compressed data.
enum AVPixelFormat ff_nvenc_pix_fmts[]
AVFifo * unused_surface_queue
CUcontext cu_context_internal
@ PRESET_LOW_LATENCY_DEFAULT
const AVCodecHWConfigInternal *const ff_nvenc_hw_configs[]
ID3D11Device * d3d11_device