Go to the documentation of this file.
19 #ifndef AVCODEC_NVENC_H
20 #define AVCODEC_NVENC_H
31 #include <ffnvcodec/nvEncodeAPI.h>
39 #define MAX_REGISTERED_FRAMES 64
40 #define RC_MODE_DEPRECATED 0x800000
41 #define RCD(rc_mode) ((rc_mode) | RC_MODE_DEPRECATED)
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(8, 1)
48 #define NVENC_HAVE_BFRAME_REF_MODE
49 #define NVENC_HAVE_QP_MAP_MODE
53 #if NVENCAPI_CHECK_VERSION(9, 0)
54 #define NVENC_HAVE_HEVC_BFRAME_REF_MODE
AVPixelFormat
Pixel format.
AVFifoBuffer * output_surface_ready_queue
int ff_nvenc_send_frame(AVCodecContext *avctx, const AVFrame *frame)
@ NV_ENC_HEVC_PROFILE_REXT
@ PRESET_LOW_LATENCY_DEFAULT
This structure describes decoded (raw) audio or video data.
NV_ENC_CONFIG encode_config
NvencDynLoadFunctions nvenc_dload_funcs
NV_ENC_REGISTERED_PTR regptr
@ PRESET_LOSSLESS_DEFAULT
NV_ENC_BUFFER_FORMAT format
NV_ENC_INITIALIZE_PARAMS init_encode_params
struct NvencContext::@126 registered_frames[MAX_REGISTERED_FRAMES]
@ NV_ENC_H264_PROFILE_HIGH
NvencFunctions * nvenc_dl
NV_ENC_INPUT_PTR input_surface
Describe the class of an AVClass context structure.
@ NV_ENC_H264_PROFILE_HIGH_444P
int ff_nvenc_encode_init(AVCodecContext *avctx)
NV_ENC_MAP_INPUT_RESOURCE in_map
AVFifoBuffer * timestamp_list
#define MAX_REGISTERED_FRAMES
enum AVPixelFormat data_pix_fmt
int ff_nvenc_encode_frame(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *frame, int *got_packet)
AVFifoBuffer * unused_surface_queue
@ NV_ENC_HEVC_PROFILE_MAIN_10
int ff_nvenc_receive_packet(AVCodecContext *avctx, AVPacket *pkt)
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several the filter must be ready for frames arriving randomly on any input any filter with several inputs will most likely require some kind of queuing mechanism It is perfectly acceptable to have a limited queue and to drop frames when the inputs are too unbalanced request_frame For filters that do not use the this method is called when a frame is wanted on an output For a it should directly call filter_frame on the corresponding output For a if there are queued frames already one of these frames should be pushed If the filter should request a frame on one of its repeatedly until at least one frame has been pushed Return or at least make progress towards producing a frame
main external API structure.
int ff_nvenc_encode_close(AVCodecContext *avctx)
NV_ENC_OUTPUT_PTR output_surface
@ NV_ENC_H264_PROFILE_MAIN
NV_ENCODE_API_FUNCTION_LIST nvenc_funcs
@ NV_ENC_H264_PROFILE_BASELINE
This structure stores compressed data.
enum AVPixelFormat ff_nvenc_pix_fmts[]
CUcontext cu_context_internal
@ NV_ENC_HEVC_PROFILE_MAIN
AVFifoBuffer * output_surface_queue
ID3D11Device * d3d11_device