FFmpeg
Loading...
Searching...
No Matches
nvenc.h File Reference
#include "config.h"
#include <ffnvcodec/nvEncodeAPI.h>
#include "compat/cuda/dynlink_loader.h"
#include "libavutil/buffer.h"
#include "libavutil/fifo.h"
#include "libavutil/opt.h"
#include "hwconfig.h"
#include "avcodec.h"

Go to the source code of this file.

Data Structures

struct  NvencSurface
 
struct  NvencFrameData
 
struct  NvencDynLoadFunctions
 
struct  NvencContext
 

Macros

#define MAX_REGISTERED_FRAMES   64
 
#define NVENCAPI_CHECK_VERSION(major, minor)
 

Typedefs

typedef void ID3D11Device
 

Enumerations

enum  {
  PRESET_SLOW = 0 , PRESET_MEDIUM , PRESET_FAST , PRESET_P1 ,
  PRESET_P2 , PRESET_P3 , PRESET_P4 , PRESET_P5 ,
  PRESET_P6 , PRESET_P7
}
 
enum  { NV_ENC_H264_PROFILE_BASELINE , NV_ENC_H264_PROFILE_MAIN , NV_ENC_H264_PROFILE_HIGH , NV_ENC_H264_PROFILE_HIGH_444P }
 
enum  { NV_ENC_HEVC_PROFILE_MAIN , NV_ENC_HEVC_PROFILE_MAIN_10 , NV_ENC_HEVC_PROFILE_REXT , NV_ENC_HEVC_PROFILE_COUNT }
 
enum  { NVENC_LOWLATENCY = 1 , NVENC_LOSSLESS = 2 , NVENC_ONE_PASS = 4 , NVENC_TWO_PASSES = 8 }
 
enum  { LIST_DEVICES = -2 , ANY_DEVICE }
 
enum  { NVENC_RGB_MODE_DISABLED , NVENC_RGB_MODE_420 , NVENC_RGB_MODE_444 }
 

Functions

int ff_nvenc_encode_init (AVCodecContext *avctx)
 
int ff_nvenc_encode_close (AVCodecContext *avctx)
 
int ff_nvenc_receive_packet (AVCodecContext *avctx, AVPacket *pkt)
 
void ff_nvenc_encode_flush (AVCodecContext *avctx)
 

Variables

enum AVPixelFormat ff_nvenc_pix_fmts []
 
const AVCodecHWConfigInternal *const ff_nvenc_hw_configs []
 

Macro Definition Documentation

◆ MAX_REGISTERED_FRAMES

#define MAX_REGISTERED_FRAMES   64

Definition at line 41 of file nvenc.h.

Referenced by nvenc_recalc_surfaces().

◆ NVENCAPI_CHECK_VERSION

#define NVENCAPI_CHECK_VERSION ( major,
minor )
Value:
((major) < NVENCAPI_MAJOR_VERSION || ((major) == NVENCAPI_MAJOR_VERSION && (minor) <= NVENCAPI_MINOR_VERSION))

Definition at line 43 of file nvenc.h.

Typedef Documentation

◆ ID3D11Device

typedef void ID3D11Device

Definition at line 28 of file nvenc.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
PRESET_SLOW 
PRESET_MEDIUM 
PRESET_FAST 
PRESET_P1 
PRESET_P2 
PRESET_P3 
PRESET_P4 
PRESET_P5 
PRESET_P6 
PRESET_P7 

Definition at line 114 of file nvenc.h.

◆ anonymous enum

anonymous enum
Enumerator
NV_ENC_H264_PROFILE_BASELINE 
NV_ENC_H264_PROFILE_MAIN 
NV_ENC_H264_PROFILE_HIGH 
NV_ENC_H264_PROFILE_HIGH_444P 

Definition at line 127 of file nvenc.h.

◆ anonymous enum

anonymous enum
Enumerator
NV_ENC_HEVC_PROFILE_MAIN 
NV_ENC_HEVC_PROFILE_MAIN_10 
NV_ENC_HEVC_PROFILE_REXT 
NV_ENC_HEVC_PROFILE_COUNT 

Definition at line 140 of file nvenc.h.

◆ anonymous enum

anonymous enum
Enumerator
NVENC_LOWLATENCY 
NVENC_LOSSLESS 
NVENC_ONE_PASS 
NVENC_TWO_PASSES 

Definition at line 151 of file nvenc.h.

◆ anonymous enum

anonymous enum
Enumerator
LIST_DEVICES 
ANY_DEVICE 

Definition at line 158 of file nvenc.h.

◆ anonymous enum

anonymous enum
Enumerator
NVENC_RGB_MODE_DISABLED 
NVENC_RGB_MODE_420 
NVENC_RGB_MODE_444 

Definition at line 163 of file nvenc.h.

Function Documentation

◆ ff_nvenc_encode_init()

int ff_nvenc_encode_init ( AVCodecContext * avctx)

Definition at line 2118 of file nvenc.c.

◆ ff_nvenc_encode_close()

int ff_nvenc_encode_close ( AVCodecContext * avctx)

Definition at line 2033 of file nvenc.c.

◆ ff_nvenc_receive_packet()

int ff_nvenc_receive_packet ( AVCodecContext * avctx,
AVPacket * pkt )

Definition at line 3177 of file nvenc.c.

◆ ff_nvenc_encode_flush()

void ff_nvenc_encode_flush ( AVCodecContext * avctx)

Definition at line 3228 of file nvenc.c.

Variable Documentation

◆ ff_nvenc_pix_fmts

enum AVPixelFormat ff_nvenc_pix_fmts[]
extern

Definition at line 53 of file nvenc.c.

◆ ff_nvenc_hw_configs

const AVCodecHWConfigInternal* const ff_nvenc_hw_configs[]
extern

Definition at line 92 of file nvenc.c.