19#ifndef AVCODEC_NVENC_H
20#define AVCODEC_NVENC_H
31#include <ffnvcodec/nvEncodeAPI.h>
41#define MAX_REGISTERED_FRAMES 64
43#define NVENCAPI_CHECK_VERSION(major, minor) \
44 ((major) < NVENCAPI_MAJOR_VERSION || ((major) == NVENCAPI_MAJOR_VERSION && (minor) <= NVENCAPI_MINOR_VERSION))
47#if NVENCAPI_CHECK_VERSION(12, 0)
48#define NVENC_HAVE_HEVC_OUTPUT_RECOVERY_POINT_SEI
52#if NVENCAPI_CHECK_VERSION(12, 1)
53#define NVENC_HAVE_SPLIT_FRAME_ENCODING
57#if NVENCAPI_CHECK_VERSION(12, 2)
58#define NVENC_HAVE_NEW_BIT_DEPTH_API
59#define NVENC_HAVE_TEMPORAL_FILTER
60#define NVENC_HAVE_LOOKAHEAD_LEVEL
61#define NVENC_HAVE_UHQ_TUNING
62#define NVENC_HAVE_UNIDIR_B
63#define NVENC_HAVE_TIME_CODE
67#if NVENCAPI_CHECK_VERSION(13, 0)
68#define NVENC_HAVE_H264_10BIT_SUPPORT
69#define NVENC_HAVE_422_SUPPORT
70#define NVENC_HAVE_SFE_FOUR_WAYS_SUPPORT
71#define NVENC_HAVE_AV1_UHQ_TUNING
72#define NVENC_HAVE_H264_AND_AV1_TEMPORAL_FILTER
73#define NVENC_HAVE_HEVC_AND_AV1_MASTERING_METADATA
74#define NVENC_HAVE_MVHEVC
78#if NVENCAPI_CHECK_VERSION(13, 1)
79#define NVENC_NEW_COUNTING_TYPE
80#define NVENC_HAVE_AV1_HGOP_SUPPORT
81#define NVENC_HAVE_CUDA_ARRAY_INPUT_SUPPORT
131#ifdef NVENC_HAVE_H264_10BIT_SUPPORT
132 NV_ENC_H264_PROFILE_HIGH_10,
134#ifdef NVENC_HAVE_422_SUPPORT
135 NV_ENC_H264_PROFILE_HIGH_422,
144#ifdef NVENC_HAVE_MVHEVC
145 NV_ENC_HEVC_PROFILE_MULTIVIEW_MAIN,
Libavcodec external API header.
refcounted data buffer API
An API-specific header for AV_HWDEVICE_TYPE_D3D11VA.
const AVCodecHWConfigInternal *const ff_nvenc_hw_configs[]
enum AVPixelFormat ff_nvenc_pix_fmts[]
@ NVENC_RGB_MODE_DISABLED
@ NV_ENC_H264_PROFILE_MAIN
@ NV_ENC_H264_PROFILE_HIGH
@ NV_ENC_H264_PROFILE_HIGH_444P
@ NV_ENC_H264_PROFILE_BASELINE
int ff_nvenc_receive_packet(AVCodecContext *avctx, AVPacket *pkt)
int ff_nvenc_encode_close(AVCodecContext *avctx)
int ff_nvenc_encode_init(AVCodecContext *avctx)
@ NV_ENC_HEVC_PROFILE_REXT
@ NV_ENC_HEVC_PROFILE_MAIN
@ NV_ENC_HEVC_PROFILE_COUNT
@ NV_ENC_HEVC_PROFILE_MAIN_10
void ff_nvenc_encode_flush(AVCodecContext *avctx)
#define MAX_REGISTERED_FRAMES
AVPixelFormat
Pixel format.
A reference to a data buffer.
Describe the class of an AVClass context structure.
main external API structure.
This structure describes decoded (raw) audio or video data.
This structure stores compressed data.
NvencDynLoadFunctions nvenc_dload_funcs
struct NvencContext::@072337001227035330003263257343131226321271123317 registered_frames[MAX_REGISTERED_FRAMES]
enum AVPixelFormat data_pix_fmt
NV_ENC_REGISTERED_PTR regptr
AVFifo * output_surface_queue
int64_t initial_delay_time
AVFifo * output_surface_ready_queue
ID3D11Device * d3d11_device
NV_ENC_INITIALIZE_PARAMS init_encode_params
NvencFrameData * frame_data_array
NV_ENC_CONFIG encode_config
NV_ENC_MAP_INPUT_RESOURCE in_map
CUcontext cu_context_internal
uint32_t frame_idx_counter
uint64_t output_frame_num
AVFifo * unused_surface_queue
NV_ENC_SEI_PAYLOAD * sei_data
int single_slice_intra_refresh
NvencFunctions * nvenc_dl
NV_ENCODE_API_FUNCTION_LIST nvenc_funcs
AVBufferRef * frame_opaque_ref
NV_ENC_OUTPUT_PTR output_surface
NV_ENC_BUFFER_FORMAT format
NV_ENC_INPUT_PTR input_surface