FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
nvEncodeAPI.h File Reference

NvEncodeAPI provides a NVENC Video Encoding interface to NVIDIA GPU devices based on the Kepler architecture. More...

#include <stdlib.h>
#include <stdint.h>

Go to the source code of this file.

Data Structures

struct  GUID
 
struct  NVENC_RECT
 
struct  NV_ENC_CAPS_PARAM
 Input struct for querying Encoding capabilities. More...
 
struct  NV_ENC_CREATE_INPUT_BUFFER
 Creation parameters for input buffer. More...
 
struct  NV_ENC_CREATE_BITSTREAM_BUFFER
 Creation parameters for output bitstream buffer. More...
 
struct  NV_ENC_MVECTOR
 Structs needed for ME only mode. More...
 
struct  NV_ENC_H264_MV_DATA
 Motion vector structure per macroblock for H264 motion estimation. More...
 
struct  NV_ENC_HEVC_MV_DATA
 Motion vector structure per CU for HEVC motion estimation. More...
 
struct  NV_ENC_CREATE_MV_BUFFER
 Creation parameters for output motion vector buffer for ME only mode. More...
 
struct  NV_ENC_QP
 QP value for frames. More...
 
struct  NV_ENC_RC_PARAMS
 Rate Control Configuration Paramters. More...
 
struct  NV_ENC_CONFIG_H264_VUI_PARAMETERS
 
struct  NVENC_EXTERNAL_ME_HINT_COUNTS_PER_BLOCKTYPE
 
struct  NVENC_EXTERNAL_ME_HINT
 
struct  NV_ENC_CONFIG_H264
 
struct  NV_ENC_CONFIG_HEVC
 
union  NV_ENC_CODEC_CONFIG
 
struct  NV_ENC_CONFIG
 
struct  NV_ENC_INITIALIZE_PARAMS
 
struct  NV_ENC_RECONFIGURE_PARAMS
 
struct  NV_ENC_PRESET_CONFIG
 
struct  NV_ENC_SEI_PAYLOAD
 
struct  NV_ENC_PIC_PARAMS_H264
 
struct  NV_ENC_PIC_PARAMS_HEVC
 
union  NV_ENC_CODEC_PIC_PARAMS
 Codec specific per-picture encoding parameters. More...
 
struct  NV_ENC_PIC_PARAMS
 
struct  NV_ENC_MEONLY_PARAMS
 
struct  NV_ENC_LOCK_BITSTREAM
 
struct  NV_ENC_LOCK_INPUT_BUFFER
 
struct  NV_ENC_MAP_INPUT_RESOURCE
 
struct  NV_ENC_REGISTER_RESOURCE
 
struct  NV_ENC_STAT
 
struct  NV_ENC_SEQUENCE_PARAM_PAYLOAD
 
struct  NV_ENC_EVENT_PARAMS
 Event registration/unregistration parameters. More...
 
struct  NV_ENC_OPEN_ENCODE_SESSION_EX_PARAMS
 Encoder Session Creation parameters. More...
 
struct  NV_ENCODE_API_FUNCTION_LIST
 NV_ENCODE_API_FUNCTION_LIST. More...
 

Macros

#define NVENCAPI
 
#define NVENCAPI_MAJOR_VERSION   7
 
#define NVENCAPI_MINOR_VERSION   0
 
#define NVENCAPI_VERSION   (NVENCAPI_MAJOR_VERSION | (NVENCAPI_MINOR_VERSION << 24))
 
#define NVENCAPI_STRUCT_VERSION(ver)   ((uint32_t)NVENCAPI_VERSION | ((ver)<<16) | (0x7 << 28))
 Macro to generate per-structure version for use with API. More...
 
#define NVENC_INFINITE_GOPLENGTH   0xffffffff
 
#define NV_MAX_SEQ_HDR_LEN   (512)
 
#define NV_ENC_PARAMS_RC_CBR2   NV_ENC_PARAMS_RC_CBR
 Deprecated. More...
 
#define NV_ENC_BUFFER_FORMAT_NV12_PL   NV_ENC_BUFFER_FORMAT_NV12
 
#define NV_ENC_BUFFER_FORMAT_YV12_PL   NV_ENC_BUFFER_FORMAT_YV12
 
#define NV_ENC_BUFFER_FORMAT_IYUV_PL   NV_ENC_BUFFER_FORMAT_IYUV
 
#define NV_ENC_BUFFER_FORMAT_YUV444_PL   NV_ENC_BUFFER_FORMAT_YUV444
 
#define NV_ENC_CAPS_PARAM_VER   NVENCAPI_STRUCT_VERSION(1)
 NV_ENC_CAPS_PARAM struct version. More...
 
#define NV_ENC_CREATE_INPUT_BUFFER_VER   NVENCAPI_STRUCT_VERSION(1)
 NV_ENC_CREATE_INPUT_BUFFER struct version. More...
 
#define NV_ENC_CREATE_BITSTREAM_BUFFER_VER   NVENCAPI_STRUCT_VERSION(1)
 NV_ENC_CREATE_BITSTREAM_BUFFER struct version. More...
 
#define NV_ENC_CREATE_MV_BUFFER_VER   NVENCAPI_STRUCT_VERSION(1)
 NV_ENC_CREATE_MV_BUFFER struct version. More...
 
#define NV_ENC_RC_PARAMS_VER   NVENCAPI_STRUCT_VERSION(1)
 macro for constructing the version field of ::_NV_ENC_RC_PARAMS More...
 
#define NV_ENC_CONFIG_VER   (NVENCAPI_STRUCT_VERSION(6) | ( 1<<31 ))
 macro for constructing the version field of _NV_ENC_CONFIG More...
 
#define NV_ENC_INITIALIZE_PARAMS_VER   (NVENCAPI_STRUCT_VERSION(5) | ( 1<<31 ))
 macro for constructing the version field of _NV_ENC_INITIALIZE_PARAMS More...
 
#define NV_ENC_RECONFIGURE_PARAMS_VER   (NVENCAPI_STRUCT_VERSION(1) | ( 1<<31 ))
 macro for constructing the version field of _NV_ENC_RECONFIGURE_PARAMS More...
 
#define NV_ENC_PRESET_CONFIG_VER   (NVENCAPI_STRUCT_VERSION(4) | ( 1<<31 ))
 macro for constructing the version field of _NV_ENC_PRESET_CONFIG More...
 
#define NV_ENC_H264_SEI_PAYLOAD   NV_ENC_SEI_PAYLOAD
 
#define NV_ENC_PIC_PARAMS_VER   (NVENCAPI_STRUCT_VERSION(4) | ( 1<<31 ))
 Macro for constructing the version field of _NV_ENC_PIC_PARAMS. More...
 
#define NV_ENC_MEONLY_PARAMS_VER   NVENCAPI_STRUCT_VERSION(2)
 NV_ENC_MEONLY_PARAMS struct version. More...
 
#define NV_ENC_LOCK_BITSTREAM_VER   NVENCAPI_STRUCT_VERSION(1)
 Macro for constructing the version field of _NV_ENC_LOCK_BITSTREAM. More...
 
#define NV_ENC_LOCK_INPUT_BUFFER_VER   NVENCAPI_STRUCT_VERSION(1)
 Macro for constructing the version field of _NV_ENC_LOCK_INPUT_BUFFER. More...
 
#define NV_ENC_MAP_INPUT_RESOURCE_VER   NVENCAPI_STRUCT_VERSION(4)
 Macro for constructing the version field of _NV_ENC_MAP_INPUT_RESOURCE. More...
 
#define NV_ENC_REGISTER_RESOURCE_VER   NVENCAPI_STRUCT_VERSION(3)
 Macro for constructing the version field of _NV_ENC_REGISTER_RESOURCE. More...
 
#define NV_ENC_STAT_VER   NVENCAPI_STRUCT_VERSION(1)
 Macro for constructing the version field of _NV_ENC_STAT. More...
 
#define NV_ENC_SEQUENCE_PARAM_PAYLOAD_VER   NVENCAPI_STRUCT_VERSION(1)
 Macro for constructing the version field of _NV_ENC_SEQUENCE_PARAM_PAYLOAD. More...
 
#define NV_ENC_EVENT_PARAMS_VER   NVENCAPI_STRUCT_VERSION(1)
 Macro for constructing the version field of ::_NV_ENC_EVENT_PARAMS. More...
 
#define NV_ENC_OPEN_ENCODE_SESSION_EX_PARAMS_VER   NVENCAPI_STRUCT_VERSION(1)
 Macro for constructing the version field of ::_NV_ENC_OPEN_ENCODE_SESSIONEX_PARAMS. More...
 
#define NV_ENCODE_API_FUNCTION_LIST_VER   NVENCAPI_STRUCT_VERSION(2)
 Macro for constructing the version field of ::_NV_ENCODEAPI_FUNCTION_LIST. More...
 

Typedefs

typedef voidNV_ENC_INPUT_PTR
 NVENCODE API input buffer. More...
 
typedef voidNV_ENC_OUTPUT_PTR
 NVENCODE API output buffer. More...
 
typedef voidNV_ENC_REGISTERED_PTR
 A Resource that has been registered with NVENCODE API. More...
 
typedef
NV_ENC_CONFIG_H264_VUI_PARAMETERS 
NV_ENC_CONFIG_HEVC_VUI_PARAMETERS
 

Enumerations

enum  NV_ENC_PARAMS_FRAME_FIELD_MODE { NV_ENC_PARAMS_FRAME_FIELD_MODE_FRAME = 0x01, NV_ENC_PARAMS_FRAME_FIELD_MODE_FIELD = 0x02, NV_ENC_PARAMS_FRAME_FIELD_MODE_MBAFF = 0x03 }
 Input frame encode modes. More...
 
enum  NV_ENC_PARAMS_RC_MODE {
  NV_ENC_PARAMS_RC_CONSTQP = 0x0, NV_ENC_PARAMS_RC_VBR = 0x1, NV_ENC_PARAMS_RC_CBR = 0x2, NV_ENC_PARAMS_RC_VBR_MINQP = 0x4,
  NV_ENC_PARAMS_RC_2_PASS_QUALITY = 0x8, NV_ENC_PARAMS_RC_2_PASS_FRAMESIZE_CAP = 0x10, NV_ENC_PARAMS_RC_2_PASS_VBR = 0x20
}
 Rate Control Modes. More...
 
enum  NV_ENC_PIC_STRUCT { NV_ENC_PIC_STRUCT_FRAME = 0x01, NV_ENC_PIC_STRUCT_FIELD_TOP_BOTTOM = 0x02, NV_ENC_PIC_STRUCT_FIELD_BOTTOM_TOP = 0x03 }
 Input picture structure. More...
 
enum  NV_ENC_PIC_TYPE {
  NV_ENC_PIC_TYPE_P = 0x0, NV_ENC_PIC_TYPE_B = 0x01, NV_ENC_PIC_TYPE_I = 0x02, NV_ENC_PIC_TYPE_IDR = 0x03,
  NV_ENC_PIC_TYPE_BI = 0x04, NV_ENC_PIC_TYPE_SKIPPED = 0x05, NV_ENC_PIC_TYPE_INTRA_REFRESH = 0x06, NV_ENC_PIC_TYPE_UNKNOWN = 0xFF
}
 Input picture type. More...
 
enum  NV_ENC_MV_PRECISION { NV_ENC_MV_PRECISION_DEFAULT = 0x0, NV_ENC_MV_PRECISION_FULL_PEL = 0x01, NV_ENC_MV_PRECISION_HALF_PEL = 0x02, NV_ENC_MV_PRECISION_QUARTER_PEL = 0x03 }
 Motion vector precisions. More...
 
enum  NV_ENC_BUFFER_FORMAT {
  NV_ENC_BUFFER_FORMAT_UNDEFINED = 0x00000000, NV_ENC_BUFFER_FORMAT_NV12 = 0x00000001, NV_ENC_BUFFER_FORMAT_YV12 = 0x00000010, NV_ENC_BUFFER_FORMAT_IYUV = 0x00000100,
  NV_ENC_BUFFER_FORMAT_YUV444 = 0x00001000, NV_ENC_BUFFER_FORMAT_YUV420_10BIT = 0x00010000, NV_ENC_BUFFER_FORMAT_YUV444_10BIT = 0x00100000, NV_ENC_BUFFER_FORMAT_ARGB = 0x01000000,
  NV_ENC_BUFFER_FORMAT_ARGB10 = 0x02000000, NV_ENC_BUFFER_FORMAT_AYUV = 0x04000000, NV_ENC_BUFFER_FORMAT_ABGR = 0x10000000, NV_ENC_BUFFER_FORMAT_ABGR10 = 0x20000000
}
 Input buffer formats. More...
 
enum  NV_ENC_LEVEL {
  NV_ENC_LEVEL_AUTOSELECT = 0, NV_ENC_LEVEL_H264_1 = 10, NV_ENC_LEVEL_H264_1b = 9, NV_ENC_LEVEL_H264_11 = 11,
  NV_ENC_LEVEL_H264_12 = 12, NV_ENC_LEVEL_H264_13 = 13, NV_ENC_LEVEL_H264_2 = 20, NV_ENC_LEVEL_H264_21 = 21,
  NV_ENC_LEVEL_H264_22 = 22, NV_ENC_LEVEL_H264_3 = 30, NV_ENC_LEVEL_H264_31 = 31, NV_ENC_LEVEL_H264_32 = 32,
  NV_ENC_LEVEL_H264_4 = 40, NV_ENC_LEVEL_H264_41 = 41, NV_ENC_LEVEL_H264_42 = 42, NV_ENC_LEVEL_H264_5 = 50,
  NV_ENC_LEVEL_H264_51 = 51, NV_ENC_LEVEL_H264_52 = 52, NV_ENC_LEVEL_HEVC_1 = 30, NV_ENC_LEVEL_HEVC_2 = 60,
  NV_ENC_LEVEL_HEVC_21 = 63, NV_ENC_LEVEL_HEVC_3 = 90, NV_ENC_LEVEL_HEVC_31 = 93, NV_ENC_LEVEL_HEVC_4 = 120,
  NV_ENC_LEVEL_HEVC_41 = 123, NV_ENC_LEVEL_HEVC_5 = 150, NV_ENC_LEVEL_HEVC_51 = 153, NV_ENC_LEVEL_HEVC_52 = 156,
  NV_ENC_LEVEL_HEVC_6 = 180, NV_ENC_LEVEL_HEVC_61 = 183, NV_ENC_LEVEL_HEVC_62 = 186, NV_ENC_TIER_HEVC_MAIN = 0,
  NV_ENC_TIER_HEVC_HIGH = 1
}
 Encoding levels. More...
 
enum  NVENCSTATUS {
  NV_ENC_SUCCESS, NV_ENC_ERR_NO_ENCODE_DEVICE, NV_ENC_ERR_UNSUPPORTED_DEVICE, NV_ENC_ERR_INVALID_ENCODERDEVICE,
  NV_ENC_ERR_INVALID_DEVICE, NV_ENC_ERR_DEVICE_NOT_EXIST, NV_ENC_ERR_INVALID_PTR, NV_ENC_ERR_INVALID_EVENT,
  NV_ENC_ERR_INVALID_PARAM, NV_ENC_ERR_INVALID_CALL, NV_ENC_ERR_OUT_OF_MEMORY, NV_ENC_ERR_ENCODER_NOT_INITIALIZED,
  NV_ENC_ERR_UNSUPPORTED_PARAM, NV_ENC_ERR_LOCK_BUSY, NV_ENC_ERR_NOT_ENOUGH_BUFFER, NV_ENC_ERR_INVALID_VERSION,
  NV_ENC_ERR_MAP_FAILED, NV_ENC_ERR_NEED_MORE_INPUT, NV_ENC_ERR_ENCODER_BUSY, NV_ENC_ERR_EVENT_NOT_REGISTERD,
  NV_ENC_ERR_GENERIC, NV_ENC_ERR_INCOMPATIBLE_CLIENT_KEY, NV_ENC_ERR_UNIMPLEMENTED, NV_ENC_ERR_RESOURCE_REGISTER_FAILED,
  NV_ENC_ERR_RESOURCE_NOT_REGISTERED, NV_ENC_ERR_RESOURCE_NOT_MAPPED
}
 Error Codes. More...
 
enum  NV_ENC_PIC_FLAGS { NV_ENC_PIC_FLAG_FORCEINTRA = 0x1, NV_ENC_PIC_FLAG_FORCEIDR = 0x2, NV_ENC_PIC_FLAG_OUTPUT_SPSPPS = 0x4, NV_ENC_PIC_FLAG_EOS = 0x8 }
 Encode Picture encode flags. More...
 
enum  NV_ENC_MEMORY_HEAP { NV_ENC_MEMORY_HEAP_AUTOSELECT = 0, NV_ENC_MEMORY_HEAP_VID = 1, NV_ENC_MEMORY_HEAP_SYSMEM_CACHED = 2, NV_ENC_MEMORY_HEAP_SYSMEM_UNCACHED = 3 }
 Memory heap to allocate input and output buffers. More...
 
enum  NV_ENC_H264_ENTROPY_CODING_MODE { NV_ENC_H264_ENTROPY_CODING_MODE_AUTOSELECT = 0x0, NV_ENC_H264_ENTROPY_CODING_MODE_CABAC = 0x1, NV_ENC_H264_ENTROPY_CODING_MODE_CAVLC = 0x2 }
 H.264 entropy coding modes. More...
 
enum  NV_ENC_H264_BDIRECT_MODE { NV_ENC_H264_BDIRECT_MODE_AUTOSELECT = 0x0, NV_ENC_H264_BDIRECT_MODE_DISABLE = 0x1, NV_ENC_H264_BDIRECT_MODE_TEMPORAL = 0x2, NV_ENC_H264_BDIRECT_MODE_SPATIAL = 0x3 }
 H.264 specific Bdirect modes. More...
 
enum  NV_ENC_H264_FMO_MODE { NV_ENC_H264_FMO_AUTOSELECT = 0x0, NV_ENC_H264_FMO_ENABLE = 0x1, NV_ENC_H264_FMO_DISABLE = 0x2 }
 H.264 specific FMO usage. More...
 
enum  NV_ENC_H264_ADAPTIVE_TRANSFORM_MODE { NV_ENC_H264_ADAPTIVE_TRANSFORM_AUTOSELECT = 0x0, NV_ENC_H264_ADAPTIVE_TRANSFORM_DISABLE = 0x1, NV_ENC_H264_ADAPTIVE_TRANSFORM_ENABLE = 0x2 }
 H.264 specific Adaptive Transform modes. More...
 
enum  NV_ENC_STEREO_PACKING_MODE {
  NV_ENC_STEREO_PACKING_MODE_NONE = 0x0, NV_ENC_STEREO_PACKING_MODE_CHECKERBOARD = 0x1, NV_ENC_STEREO_PACKING_MODE_COLINTERLEAVE = 0x2, NV_ENC_STEREO_PACKING_MODE_ROWINTERLEAVE = 0x3,
  NV_ENC_STEREO_PACKING_MODE_SIDEBYSIDE = 0x4, NV_ENC_STEREO_PACKING_MODE_TOPBOTTOM = 0x5, NV_ENC_STEREO_PACKING_MODE_FRAMESEQ = 0x6
}
 Stereo frame packing modes. More...
 
enum  NV_ENC_INPUT_RESOURCE_TYPE { NV_ENC_INPUT_RESOURCE_TYPE_DIRECTX = 0x0, NV_ENC_INPUT_RESOURCE_TYPE_CUDADEVICEPTR = 0x1, NV_ENC_INPUT_RESOURCE_TYPE_CUDAARRAY = 0x2 }
 Input Resource type. More...
 
enum  NV_ENC_DEVICE_TYPE { NV_ENC_DEVICE_TYPE_DIRECTX = 0x0, NV_ENC_DEVICE_TYPE_CUDA = 0x1 }
 Encoder Device type. More...
 
enum  NV_ENC_CAPS {
  NV_ENC_CAPS_NUM_MAX_BFRAMES, NV_ENC_CAPS_SUPPORTED_RATECONTROL_MODES, NV_ENC_CAPS_SUPPORT_FIELD_ENCODING, NV_ENC_CAPS_SUPPORT_MONOCHROME,
  NV_ENC_CAPS_SUPPORT_FMO, NV_ENC_CAPS_SUPPORT_QPELMV, NV_ENC_CAPS_SUPPORT_BDIRECT_MODE, NV_ENC_CAPS_SUPPORT_CABAC,
  NV_ENC_CAPS_SUPPORT_ADAPTIVE_TRANSFORM, NV_ENC_CAPS_SUPPORT_RESERVED, NV_ENC_CAPS_NUM_MAX_TEMPORAL_LAYERS, NV_ENC_CAPS_SUPPORT_HIERARCHICAL_PFRAMES,
  NV_ENC_CAPS_SUPPORT_HIERARCHICAL_BFRAMES, NV_ENC_CAPS_LEVEL_MAX, NV_ENC_CAPS_LEVEL_MIN, NV_ENC_CAPS_SEPARATE_COLOUR_PLANE,
  NV_ENC_CAPS_WIDTH_MAX, NV_ENC_CAPS_HEIGHT_MAX, NV_ENC_CAPS_SUPPORT_TEMPORAL_SVC, NV_ENC_CAPS_SUPPORT_DYN_RES_CHANGE,
  NV_ENC_CAPS_SUPPORT_DYN_BITRATE_CHANGE, NV_ENC_CAPS_SUPPORT_DYN_FORCE_CONSTQP, NV_ENC_CAPS_SUPPORT_DYN_RCMODE_CHANGE, NV_ENC_CAPS_SUPPORT_SUBFRAME_READBACK,
  NV_ENC_CAPS_SUPPORT_CONSTRAINED_ENCODING, NV_ENC_CAPS_SUPPORT_INTRA_REFRESH, NV_ENC_CAPS_SUPPORT_CUSTOM_VBV_BUF_SIZE, NV_ENC_CAPS_SUPPORT_DYNAMIC_SLICE_MODE,
  NV_ENC_CAPS_SUPPORT_REF_PIC_INVALIDATION, NV_ENC_CAPS_PREPROC_SUPPORT, NV_ENC_CAPS_ASYNC_ENCODE_SUPPORT, NV_ENC_CAPS_MB_NUM_MAX,
  NV_ENC_CAPS_MB_PER_SEC_MAX, NV_ENC_CAPS_SUPPORT_YUV444_ENCODE, NV_ENC_CAPS_SUPPORT_LOSSLESS_ENCODE, NV_ENC_CAPS_SUPPORT_SAO,
  NV_ENC_CAPS_SUPPORT_MEONLY_MODE, NV_ENC_CAPS_SUPPORT_LOOKAHEAD, NV_ENC_CAPS_SUPPORT_TEMPORAL_AQ, NV_ENC_CAPS_SUPPORT_10BIT_ENCODE,
  NV_ENC_CAPS_EXPOSED_COUNT
}
 Encoder capabilities enumeration. More...
 
enum  NV_ENC_HEVC_CUSIZE {
  NV_ENC_HEVC_CUSIZE_AUTOSELECT = 0, NV_ENC_HEVC_CUSIZE_8x8 = 1, NV_ENC_HEVC_CUSIZE_16x16 = 2, NV_ENC_HEVC_CUSIZE_32x32 = 3,
  NV_ENC_HEVC_CUSIZE_64x64 = 4
}
 HEVC CU SIZE. More...
 

Functions

NVENCSTATUS NVENCAPI NvEncOpenEncodeSession (void *device, uint32_t deviceType, void **encoder)
 Opens an encoding session. More...
 
NVENCSTATUS NVENCAPI NvEncGetEncodeGUIDCount (void *encoder, uint32_t *encodeGUIDCount)
 Retrieves the number of supported encode GUIDs. More...
 
NVENCSTATUS NVENCAPI NvEncGetEncodeGUIDs (void *encoder, GUID *GUIDs, uint32_t guidArraySize, uint32_t *GUIDCount)
 Retrieves an array of supported encoder codec GUIDs. More...
 
NVENCSTATUS NVENCAPI NvEncGetEncodeProfileGUIDCount (void *encoder, GUID encodeGUID, uint32_t *encodeProfileGUIDCount)
 Retrieves the number of supported profile GUIDs. More...
 
NVENCSTATUS NVENCAPI NvEncGetEncodeProfileGUIDs (void *encoder, GUID encodeGUID, GUID *profileGUIDs, uint32_t guidArraySize, uint32_t *GUIDCount)
 Retrieves an array of supported encode profile GUIDs. More...
 
NVENCSTATUS NVENCAPI NvEncGetInputFormatCount (void *encoder, GUID encodeGUID, uint32_t *inputFmtCount)
 Retrieve the number of supported Input formats. More...
 
NVENCSTATUS NVENCAPI NvEncGetInputFormats (void *encoder, GUID encodeGUID, NV_ENC_BUFFER_FORMAT *inputFmts, uint32_t inputFmtArraySize, uint32_t *inputFmtCount)
 Retrieves an array of supported Input formats. More...
 
NVENCSTATUS NVENCAPI NvEncGetEncodeCaps (void *encoder, GUID encodeGUID, NV_ENC_CAPS_PARAM *capsParam, int *capsVal)
 Retrieves the capability value for a specified encoder attribute. More...
 
NVENCSTATUS NVENCAPI NvEncGetEncodePresetCount (void *encoder, GUID encodeGUID, uint32_t *encodePresetGUIDCount)
 Retrieves the number of supported preset GUIDs. More...
 
NVENCSTATUS NVENCAPI NvEncGetEncodePresetGUIDs (void *encoder, GUID encodeGUID, GUID *presetGUIDs, uint32_t guidArraySize, uint32_t *encodePresetGUIDCount)
 Receives an array of supported encoder preset GUIDs. More...
 
NVENCSTATUS NVENCAPI NvEncGetEncodePresetConfig (void *encoder, GUID encodeGUID, GUID presetGUID, NV_ENC_PRESET_CONFIG *presetConfig)
 Returns a preset config structure supported for given preset GUID. More...
 
NVENCSTATUS NVENCAPI NvEncInitializeEncoder (void *encoder, NV_ENC_INITIALIZE_PARAMS *createEncodeParams)
 Initialize the encoder. More...
 
NVENCSTATUS NVENCAPI NvEncCreateInputBuffer (void *encoder, NV_ENC_CREATE_INPUT_BUFFER *createInputBufferParams)
 Allocates Input buffer. More...
 
NVENCSTATUS NVENCAPI NvEncDestroyInputBuffer (void *encoder, NV_ENC_INPUT_PTR inputBuffer)
 Release an input buffers. More...
 
NVENCSTATUS NVENCAPI NvEncCreateBitstreamBuffer (void *encoder, NV_ENC_CREATE_BITSTREAM_BUFFER *createBitstreamBufferParams)
 Allocates an output bitstream buffer. More...
 
NVENCSTATUS NVENCAPI NvEncDestroyBitstreamBuffer (void *encoder, NV_ENC_OUTPUT_PTR bitstreamBuffer)
 Release a bitstream buffer. More...
 
NVENCSTATUS NVENCAPI NvEncEncodePicture (void *encoder, NV_ENC_PIC_PARAMS *encodePicParams)
 Submit an input picture for encoding. More...
 
NVENCSTATUS NVENCAPI NvEncLockBitstream (void *encoder, NV_ENC_LOCK_BITSTREAM *lockBitstreamBufferParams)
 Lock output bitstream buffer. More...
 
NVENCSTATUS NVENCAPI NvEncUnlockBitstream (void *encoder, NV_ENC_OUTPUT_PTR bitstreamBuffer)
 Unlock the output bitstream buffer. More...
 
NVENCSTATUS NVENCAPI NvEncLockInputBuffer (void *encoder, NV_ENC_LOCK_INPUT_BUFFER *lockInputBufferParams)
 Locks an input buffer. More...
 
NVENCSTATUS NVENCAPI NvEncUnlockInputBuffer (void *encoder, NV_ENC_INPUT_PTR inputBuffer)
 Unlocks the input buffer. More...
 
NVENCSTATUS NVENCAPI NvEncGetEncodeStats (void *encoder, NV_ENC_STAT *encodeStats)
 Get encoding statistics. More...
 
NVENCSTATUS NVENCAPI NvEncGetSequenceParams (void *encoder, NV_ENC_SEQUENCE_PARAM_PAYLOAD *sequenceParamPayload)
 Get encoded sequence and picture header. More...
 
NVENCSTATUS NVENCAPI NvEncRegisterAsyncEvent (void *encoder, NV_ENC_EVENT_PARAMS *eventParams)
 Register event for notification to encoding completion. More...
 
NVENCSTATUS NVENCAPI NvEncUnregisterAsyncEvent (void *encoder, NV_ENC_EVENT_PARAMS *eventParams)
 Unregister completion event. More...
 
NVENCSTATUS NVENCAPI NvEncMapInputResource (void *encoder, NV_ENC_MAP_INPUT_RESOURCE *mapInputResParams)
 Map an externally created input resource pointer for encoding. More...
 
NVENCSTATUS NVENCAPI NvEncUnmapInputResource (void *encoder, NV_ENC_INPUT_PTR mappedInputBuffer)
 UnMaps a NV_ENC_INPUT_PTR which was mapped for encoding. More...
 
NVENCSTATUS NVENCAPI NvEncDestroyEncoder (void *encoder)
 Destroy Encoding Session. More...
 
NVENCSTATUS NVENCAPI NvEncInvalidateRefFrames (void *encoder, uint64_t invalidRefFrameTimeStamp)
 Invalidate reference frames. More...
 
NVENCSTATUS NVENCAPI NvEncOpenEncodeSessionEx (NV_ENC_OPEN_ENCODE_SESSION_EX_PARAMS *openSessionExParams, void **encoder)
 Opens an encoding session. More...
 
NVENCSTATUS NVENCAPI NvEncRegisterResource (void *encoder, NV_ENC_REGISTER_RESOURCE *registerResParams)
 Registers a resource with the Nvidia Video Encoder Interface. More...
 
NVENCSTATUS NVENCAPI NvEncUnregisterResource (void *encoder, NV_ENC_REGISTERED_PTR registeredResource)
 Unregisters a resource previously registered with the Nvidia Video Encoder Interface. More...
 
NVENCSTATUS NVENCAPI NvEncReconfigureEncoder (void *encoder, NV_ENC_RECONFIGURE_PARAMS *reInitEncodeParams)
 Reconfigure an existing encoding session. More...
 
NVENCSTATUS NVENCAPI NvEncCreateMVBuffer (void *encoder, NV_ENC_CREATE_MV_BUFFER *createMVBufferParams)
 Allocates output MV buffer for ME only mode. More...
 
NVENCSTATUS NVENCAPI NvEncDestroyMVBuffer (void *encoder, NV_ENC_OUTPUT_PTR mvBuffer)
 Release an output MV buffer for ME only mode. More...
 
NVENCSTATUS NVENCAPI NvEncRunMotionEstimationOnly (void *encoder, NV_ENC_MEONLY_PARAMS *meOnlyParams)
 Submit an input picture and reference frame for motion estimation in ME only mode. More...
 
NVENCSTATUS NVENCAPI NvEncodeAPIGetMaxSupportedVersion (uint32_t *version)
 Get the largest NvEncodeAPI version supported by the driver. More...
 
NVENCSTATUS NVENCAPI NvEncodeAPICreateInstance (NV_ENCODE_API_FUNCTION_LIST *functionList)
 Entry Point to the NvEncodeAPI interface. More...
 

Variables

static const GUID NV_ENC_CODEC_H264_GUID
 
static const GUID NV_ENC_CODEC_HEVC_GUID
 
static const GUID NV_ENC_CODEC_PROFILE_AUTOSELECT_GUID
 
static const GUID NV_ENC_H264_PROFILE_BASELINE_GUID
 
static const GUID NV_ENC_H264_PROFILE_MAIN_GUID
 
static const GUID NV_ENC_H264_PROFILE_HIGH_GUID
 
static const GUID NV_ENC_H264_PROFILE_HIGH_444_GUID
 
static const GUID NV_ENC_H264_PROFILE_STEREO_GUID
 
static const GUID NV_ENC_H264_PROFILE_SVC_TEMPORAL_SCALABILTY
 
static const GUID NV_ENC_H264_PROFILE_PROGRESSIVE_HIGH_GUID
 
static const GUID NV_ENC_H264_PROFILE_CONSTRAINED_HIGH_GUID
 
static const GUID NV_ENC_HEVC_PROFILE_MAIN_GUID
 
static const GUID NV_ENC_HEVC_PROFILE_MAIN10_GUID
 
static const GUID NV_ENC_HEVC_PROFILE_FREXT_GUID
 
static const GUID NV_ENC_PRESET_DEFAULT_GUID
 
static const GUID NV_ENC_PRESET_HP_GUID
 
static const GUID NV_ENC_PRESET_HQ_GUID
 
static const GUID NV_ENC_PRESET_BD_GUID
 
static const GUID NV_ENC_PRESET_LOW_LATENCY_DEFAULT_GUID
 
static const GUID NV_ENC_PRESET_LOW_LATENCY_HQ_GUID
 
static const GUID NV_ENC_PRESET_LOW_LATENCY_HP_GUID
 
static const GUID NV_ENC_PRESET_LOSSLESS_DEFAULT_GUID
 
static const GUID NV_ENC_PRESET_LOSSLESS_HP_GUID
 

Detailed Description

NvEncodeAPI provides a NVENC Video Encoding interface to NVIDIA GPU devices based on the Kepler architecture.

Date
2011-2016 This file contains the interface constants, structure definitions and function prototypes.

Definition in file nvEncodeAPI.h.

Macro Definition Documentation

#define NVENCAPI_MAJOR_VERSION   7

Definition at line 114 of file nvEncodeAPI.h.

Referenced by nvenc_load_libraries().

#define NVENCAPI_MINOR_VERSION   0

Definition at line 115 of file nvEncodeAPI.h.

Referenced by nvenc_load_libraries().

#define NVENCAPI_VERSION   (NVENCAPI_MAJOR_VERSION | (NVENCAPI_MINOR_VERSION << 24))

Definition at line 117 of file nvEncodeAPI.h.

Referenced by nvenc_open_session().

#define NVENCAPI_STRUCT_VERSION (   ver)    ((uint32_t)NVENCAPI_VERSION | ((ver)<<16) | (0x7 << 28))

Macro to generate per-structure version for use with API.

Definition at line 122 of file nvEncodeAPI.h.

#define NVENC_INFINITE_GOPLENGTH   0xffffffff

Definition at line 125 of file nvEncodeAPI.h.

#define NV_MAX_SEQ_HDR_LEN   (512)

Definition at line 127 of file nvEncodeAPI.h.

#define NV_ENCODE_API_FUNCTION_LIST_VER   NVENCAPI_STRUCT_VERSION(2)

Macro for constructing the version field of ::_NV_ENCODEAPI_FUNCTION_LIST.

Definition at line 3194 of file nvEncodeAPI.h.

Referenced by nvenc_load_libraries().

Typedef Documentation

NVENCODE API input buffer.

Definition at line 110 of file nvEncodeAPI.h.

NVENCODE API output buffer.

Definition at line 111 of file nvEncodeAPI.h.

A Resource that has been registered with NVENCODE API.

Definition at line 112 of file nvEncodeAPI.h.

Variable Documentation

const GUID NV_ENC_CODEC_H264_GUID
static
Initial value:
=
{ 0x6bc82762, 0x4e63, 0x4ca4, { 0xaa, 0x85, 0x1e, 0x50, 0xf3, 0x21, 0xf6, 0xbf } }

Definition at line 134 of file nvEncodeAPI.h.

Referenced by nvenc_setup_device().

const GUID NV_ENC_CODEC_HEVC_GUID
static
Initial value:
=
{ 0x790cdc88, 0x4522, 0x4d7b, { 0x94, 0x25, 0xbd, 0xa9, 0x97, 0x5f, 0x76, 0x3 } }

Definition at line 138 of file nvEncodeAPI.h.

Referenced by nvenc_setup_device().

const GUID NV_ENC_CODEC_PROFILE_AUTOSELECT_GUID
static
Initial value:
=
{ 0xbfd6f8e7, 0x233c, 0x4341, { 0x8b, 0x3e, 0x48, 0x18, 0x52, 0x38, 0x3, 0xf4 } }

Definition at line 148 of file nvEncodeAPI.h.

const GUID NV_ENC_H264_PROFILE_BASELINE_GUID
static
Initial value:
=
{ 0x727bcaa, 0x78c4, 0x4c83, { 0x8c, 0x2f, 0xef, 0x3d, 0xff, 0x26, 0x7c, 0x6a } }

Definition at line 152 of file nvEncodeAPI.h.

Referenced by nvenc_setup_h264_config().

const GUID NV_ENC_H264_PROFILE_MAIN_GUID
static
Initial value:
=
{ 0x60b5c1d4, 0x67fe, 0x4790, { 0x94, 0xd5, 0xc4, 0x72, 0x6d, 0x7b, 0x6e, 0x6d } }

Definition at line 156 of file nvEncodeAPI.h.

Referenced by nvenc_setup_h264_config().

const GUID NV_ENC_H264_PROFILE_HIGH_GUID
static
Initial value:
=
{ 0xe7cbc309, 0x4f7a, 0x4b89, { 0xaf, 0x2a, 0xd5, 0x37, 0xc9, 0x2b, 0xe3, 0x10 } }

Definition at line 160 of file nvEncodeAPI.h.

Referenced by nvenc_setup_h264_config().

const GUID NV_ENC_H264_PROFILE_HIGH_444_GUID
static
Initial value:
=
{ 0x7ac663cb, 0xa598, 0x4960, { 0xb8, 0x44, 0x33, 0x9b, 0x26, 0x1a, 0x7d, 0x52 } }

Definition at line 164 of file nvEncodeAPI.h.

Referenced by nvenc_setup_h264_config().

const GUID NV_ENC_H264_PROFILE_STEREO_GUID
static
Initial value:
=
{ 0x40847bf5, 0x33f7, 0x4601, { 0x90, 0x84, 0xe8, 0xfe, 0x3c, 0x1d, 0xb8, 0xb7 } }

Definition at line 168 of file nvEncodeAPI.h.

const GUID NV_ENC_H264_PROFILE_SVC_TEMPORAL_SCALABILTY
static
Initial value:
=
{ 0xce788d20, 0xaaa9, 0x4318, { 0x92, 0xbb, 0xac, 0x7e, 0x85, 0x8c, 0x8d, 0x36 } }

Definition at line 172 of file nvEncodeAPI.h.

const GUID NV_ENC_H264_PROFILE_PROGRESSIVE_HIGH_GUID
static
Initial value:
=
{ 0xb405afac, 0xf32b, 0x417b, { 0x89, 0xc4, 0x9a, 0xbe, 0xed, 0x3e, 0x59, 0x78 } }

Definition at line 176 of file nvEncodeAPI.h.

const GUID NV_ENC_H264_PROFILE_CONSTRAINED_HIGH_GUID
static
Initial value:
=
{ 0xaec1bd87, 0xe85b, 0x48f2, { 0x84, 0xc3, 0x98, 0xbc, 0xa6, 0x28, 0x50, 0x72 } }

Definition at line 180 of file nvEncodeAPI.h.

const GUID NV_ENC_HEVC_PROFILE_MAIN_GUID
static
Initial value:
=
{ 0xb514c39a, 0xb55b, 0x40fa, { 0x87, 0x8f, 0xf1, 0x25, 0x3b, 0x4d, 0xfd, 0xec } }

Definition at line 184 of file nvEncodeAPI.h.

Referenced by nvenc_setup_hevc_config().

const GUID NV_ENC_HEVC_PROFILE_MAIN10_GUID
static
Initial value:
=
{ 0xfa4d2b6c, 0x3a5b, 0x411a, { 0x80, 0x18, 0x0a, 0x3f, 0x5e, 0x3c, 0x9b, 0xe5 } }

Definition at line 188 of file nvEncodeAPI.h.

Referenced by nvenc_setup_hevc_config().

const GUID NV_ENC_HEVC_PROFILE_FREXT_GUID
static
Initial value:
=
{ 0x51ec32b5, 0x1b4c, 0x453c, { 0x9c, 0xbd, 0xb6, 0x16, 0xbd, 0x62, 0x13, 0x41 } }

Definition at line 193 of file nvEncodeAPI.h.

Referenced by nvenc_setup_hevc_config().

const GUID NV_ENC_PRESET_DEFAULT_GUID
static
Initial value:
=
{ 0xb2dfb705, 0x4ebd, 0x4c49, { 0x9b, 0x5f, 0x24, 0xa7, 0x77, 0xd3, 0xe5, 0x87 } }

Definition at line 200 of file nvEncodeAPI.h.

const GUID NV_ENC_PRESET_HP_GUID
static
Initial value:
=
{ 0x60e4c59f, 0xe846, 0x4484, { 0xa5, 0x6d, 0xcd, 0x45, 0xbe, 0x9f, 0xdd, 0xf6 } }

Definition at line 204 of file nvEncodeAPI.h.

const GUID NV_ENC_PRESET_HQ_GUID
static
Initial value:
=
{ 0x34dba71d, 0xa77b, 0x4b8f, { 0x9c, 0x3e, 0xb6, 0xd5, 0xda, 0x24, 0xc0, 0x12 } }

Definition at line 208 of file nvEncodeAPI.h.

const GUID NV_ENC_PRESET_BD_GUID
static
Initial value:
=
{ 0x82e3e450, 0xbdbb, 0x4e40, { 0x98, 0x9c, 0x82, 0xa9, 0xd, 0xf9, 0xef, 0x32 } }

Definition at line 212 of file nvEncodeAPI.h.

const GUID NV_ENC_PRESET_LOW_LATENCY_DEFAULT_GUID
static
Initial value:
=
{ 0x49df21c5, 0x6dfa, 0x4feb, { 0x97, 0x87, 0x6a, 0xcc, 0x9e, 0xff, 0xb7, 0x26 } }

Definition at line 216 of file nvEncodeAPI.h.

const GUID NV_ENC_PRESET_LOW_LATENCY_HQ_GUID
static
Initial value:
=
{ 0xc5f733b9, 0xea97, 0x4cf9, { 0xbe, 0xc2, 0xbf, 0x78, 0xa7, 0x4f, 0xd1, 0x5 } }

Definition at line 220 of file nvEncodeAPI.h.

const GUID NV_ENC_PRESET_LOW_LATENCY_HP_GUID
static
Initial value:
=
{ 0x67082a44, 0x4bad, 0x48fa, { 0x98, 0xea, 0x93, 0x5, 0x6d, 0x15, 0xa, 0x58 } }

Definition at line 224 of file nvEncodeAPI.h.

const GUID NV_ENC_PRESET_LOSSLESS_DEFAULT_GUID
static
Initial value:
=
{ 0xd5bfb716, 0xc604, 0x44e7, { 0x9b, 0xb8, 0xde, 0xa5, 0x51, 0xf, 0xc3, 0xac } }

Definition at line 228 of file nvEncodeAPI.h.

const GUID NV_ENC_PRESET_LOSSLESS_HP_GUID
static
Initial value:
=
{ 0x149998e7, 0x2364, 0x411d, { 0x82, 0xef, 0x17, 0x98, 0x88, 0x9, 0x34, 0x9 } }

Definition at line 232 of file nvEncodeAPI.h.