37 #ifndef _NV_ENCODEAPI_H_
38 #define _NV_ENCODEAPI_H_
49 typedef unsigned __int32 uint32_t;
51 typedef unsigned __int64 uint64_t;
52 typedef signed char int8_t;
54 typedef short int16_t;
55 typedef unsigned short uint16_t;
70 #if defined(_WIN32) || defined(__CYGWIN__)
71 #define NVENCAPI __stdcall
116 #define NVENCAPI_MAJOR_VERSION 8
117 #define NVENCAPI_MINOR_VERSION 0
119 #define NVENCAPI_VERSION (NVENCAPI_MAJOR_VERSION | (NVENCAPI_MINOR_VERSION << 24))
124 #define NVENCAPI_STRUCT_VERSION(ver) ((uint32_t)NVENCAPI_VERSION | ((ver)<<16) | (0x7 << 28))
127 #define NVENC_INFINITE_GOPLENGTH 0xffffffff
129 #define NV_MAX_SEQ_HDR_LEN (512)
137 { 0x6bc82762, 0x4e63, 0x4ca4, { 0xaa, 0x85, 0x1e, 0x50, 0xf3, 0x21, 0xf6, 0xbf } };
141 { 0x790cdc88, 0x4522, 0x4d7b, { 0x94, 0x25, 0xbd, 0xa9, 0x97, 0x5f, 0x76, 0x3 } };
151 { 0xbfd6f8e7, 0x233c, 0x4341, { 0x8b, 0x3e, 0x48, 0x18, 0x52, 0x38, 0x3, 0xf4 } };
155 { 0x727bcaa, 0x78c4, 0x4c83, { 0x8c, 0x2f, 0xef, 0x3d, 0xff, 0x26, 0x7c, 0x6a } };
159 { 0x60b5c1d4, 0x67fe, 0x4790, { 0x94, 0xd5, 0xc4, 0x72, 0x6d, 0x7b, 0x6e, 0x6d } };
163 { 0xe7cbc309, 0x4f7a, 0x4b89, { 0xaf, 0x2a, 0xd5, 0x37, 0xc9, 0x2b, 0xe3, 0x10 } };
167 { 0x7ac663cb, 0xa598, 0x4960, { 0xb8, 0x44, 0x33, 0x9b, 0x26, 0x1a, 0x7d, 0x52 } };
171 { 0x40847bf5, 0x33f7, 0x4601, { 0x90, 0x84, 0xe8, 0xfe, 0x3c, 0x1d, 0xb8, 0xb7 } };
175 { 0xce788d20, 0xaaa9, 0x4318, { 0x92, 0xbb, 0xac, 0x7e, 0x85, 0x8c, 0x8d, 0x36 } };
179 { 0xb405afac, 0xf32b, 0x417b, { 0x89, 0xc4, 0x9a, 0xbe, 0xed, 0x3e, 0x59, 0x78 } };
183 { 0xaec1bd87, 0xe85b, 0x48f2, { 0x84, 0xc3, 0x98, 0xbc, 0xa6, 0x28, 0x50, 0x72 } };
187 { 0xb514c39a, 0xb55b, 0x40fa, { 0x87, 0x8f, 0xf1, 0x25, 0x3b, 0x4d, 0xfd, 0xec } };
191 { 0xfa4d2b6c, 0x3a5b, 0x411a, { 0x80, 0x18, 0x0a, 0x3f, 0x5e, 0x3c, 0x9b, 0xe5 } };
196 { 0x51ec32b5, 0x1b4c, 0x453c, { 0x9c, 0xbd, 0xb6, 0x16, 0xbd, 0x62, 0x13, 0x41 } };
203 { 0xb2dfb705, 0x4ebd, 0x4c49, { 0x9b, 0x5f, 0x24, 0xa7, 0x77, 0xd3, 0xe5, 0x87 } };
207 { 0x60e4c59f, 0xe846, 0x4484, { 0xa5, 0x6d, 0xcd, 0x45, 0xbe, 0x9f, 0xdd, 0xf6 } };
211 { 0x34dba71d, 0xa77b, 0x4b8f, { 0x9c, 0x3e, 0xb6, 0xd5, 0xda, 0x24, 0xc0, 0x12 } };
215 { 0x82e3e450, 0xbdbb, 0x4e40, { 0x98, 0x9c, 0x82, 0xa9, 0xd, 0xf9, 0xef, 0x32 } };
219 { 0x49df21c5, 0x6dfa, 0x4feb, { 0x97, 0x87, 0x6a, 0xcc, 0x9e, 0xff, 0xb7, 0x26 } };
223 { 0xc5f733b9, 0xea97, 0x4cf9, { 0xbe, 0xc2, 0xbf, 0x78, 0xa7, 0x4f, 0xd1, 0x5 } };
227 { 0x67082a44, 0x4bad, 0x48fa, { 0x98, 0xea, 0x93, 0x5, 0x6d, 0x15, 0xa, 0x58 } };
231 { 0xd5bfb716, 0xc604, 0x44e7, { 0x9b, 0xb8, 0xde, 0xa5, 0x51, 0xf, 0xc3, 0xac } };
235 { 0x149998e7, 0x2364, 0x411d, { 0x82, 0xef, 0x17, 0x98, 0x88, 0x9, 0x34, 0x9 } };
245 typedef enum _NV_ENC_PARAMS_FRAME_FIELD_MODE
255 typedef enum _NV_ENC_PARAMS_RC_MODE
265 #define NV_ENC_PARAMS_RC_VBR_MINQP (NV_ENC_PARAMS_RC_MODE)0x4
266 #define NV_ENC_PARAMS_RC_2_PASS_QUALITY NV_ENC_PARAMS_RC_CBR_LOWDELAY_HQ
267 #define NV_ENC_PARAMS_RC_2_PASS_FRAMESIZE_CAP NV_ENC_PARAMS_RC_CBR_HQ
268 #define NV_ENC_PARAMS_RC_2_PASS_VBR NV_ENC_PARAMS_RC_VBR_HQ
269 #define NV_ENC_PARAMS_RC_CBR2 NV_ENC_PARAMS_RC_CBR
274 typedef enum _NV_ENC_PIC_STRUCT
284 typedef enum _NV_ENC_PIC_TYPE
299 typedef enum _NV_ENC_MV_PRECISION
311 typedef enum _NV_ENC_BUFFER_FORMAT
343 #define NV_ENC_BUFFER_FORMAT_NV12_PL NV_ENC_BUFFER_FORMAT_NV12
344 #define NV_ENC_BUFFER_FORMAT_YV12_PL NV_ENC_BUFFER_FORMAT_YV12
345 #define NV_ENC_BUFFER_FORMAT_IYUV_PL NV_ENC_BUFFER_FORMAT_IYUV
346 #define NV_ENC_BUFFER_FORMAT_YUV444_PL NV_ENC_BUFFER_FORMAT_YUV444
351 typedef enum _NV_ENC_LEVEL
395 typedef enum _NVENCSTATUS
567 typedef enum _NV_ENC_PIC_FLAGS
580 typedef enum _NV_ENC_MEMORY_HEAP
592 typedef enum _NV_ENC_H264_ENTROPY_CODING_MODE
602 typedef enum _NV_ENC_H264_BDIRECT_MODE
613 typedef enum _NV_ENC_H264_FMO_MODE
623 typedef enum _NV_ENC_H264_ADAPTIVE_TRANSFORM_MODE
633 typedef enum _NV_ENC_STEREO_PACKING_MODE
647 typedef enum _NV_ENC_INPUT_RESOURCE_TYPE
658 typedef enum _NV_ENC_DEVICE_TYPE
669 typedef enum _NV_ENC_CAPS
967 typedef enum _NV_ENC_HEVC_CUSIZE
979 typedef struct _NV_ENC_CAPS_PARAM
983 uint32_t reserved[62];
987 #define NV_ENC_CAPS_PARAM_VER NVENCAPI_STRUCT_VERSION(1)
993 typedef struct _NV_ENC_CREATE_INPUT_BUFFER
1003 uint32_t reserved1[57];
1004 void* reserved2[63];
1008 #define NV_ENC_CREATE_INPUT_BUFFER_VER NVENCAPI_STRUCT_VERSION(1)
1013 typedef struct _NV_ENC_CREATE_BITSTREAM_BUFFER
1021 uint32_t reserved1[58];
1022 void* reserved2[64];
1026 #define NV_ENC_CREATE_BITSTREAM_BUFFER_VER NVENCAPI_STRUCT_VERSION(1)
1031 typedef struct _NV_ENC_MVECTOR
1040 typedef struct _NV_ENC_H264_MV_DATA
1052 typedef struct _NV_ENC_HEVC_MV_DATA
1066 typedef struct _NV_ENC_CREATE_MV_BUFFER
1070 uint32_t reserved1[255];
1071 void* reserved2[63];
1075 #define NV_ENC_CREATE_MV_BUFFER_VER NVENCAPI_STRUCT_VERSION(1)
1080 typedef struct _NV_ENC_QP
1090 typedef struct _NV_ENC_RC_PARAMS
1099 uint32_t enableMinQP :1;
1100 uint32_t enableMaxQP :1;
1101 uint32_t enableInitialRCQP :1;
1102 uint32_t enableAQ :1;
1103 uint32_t enableExtQPDeltaMap :1;
1104 uint32_t enableLookahead :1;
1105 uint32_t disableIadapt :1;
1106 uint32_t disableBadapt :1;
1107 uint32_t enableTemporalAQ :1;
1108 uint32_t zeroReorderDelay :1;
1109 uint32_t enableNonRefP :1;
1110 uint32_t strictGOPTarget :1;
1111 uint32_t aqStrength :4;
1112 uint32_t reservedBitFields :16;
1121 uint32_t reserved[9];
1125 #define NV_ENC_RC_PARAMS_VER NVENCAPI_STRUCT_VERSION(1)
1148 uint32_t reserved[15];
1160 uint32_t numCandsPerBlk16x16 : 4;
1161 uint32_t numCandsPerBlk16x8 : 4;
1162 uint32_t numCandsPerBlk8x16 : 4;
1163 uint32_t numCandsPerBlk8x8 : 4;
1164 uint32_t reserved : 16;
1165 uint32_t reserved1[3];
1191 uint32_t enableTemporalSVC :1;
1192 uint32_t enableStereoMVC :1;
1193 uint32_t hierarchicalPFrames :1;
1194 uint32_t hierarchicalBFrames :1;
1195 uint32_t outputBufferingPeriodSEI :1;
1196 uint32_t outputPictureTimingSEI :1;
1198 uint32_t outputAUD :1;
1199 uint32_t disableSPSPPS :1;
1200 uint32_t outputFramePackingSEI :1;
1201 uint32_t outputRecoveryPointSEI :1;
1202 uint32_t enableIntraRefresh :1;
1203 uint32_t enableConstrainedEncoding :1;
1205 uint32_t repeatSPSPPS :1;
1206 uint32_t enableVFR :1;
1207 uint32_t enableLTR :1;
1214 uint32_t qpPrimeYZeroTransformBypassFlag :1;
1216 uint32_t useConstrainedIntraPred :1;
1217 uint32_t reservedBitFields :15;
1257 uint32_t reserved1[270];
1258 void* reserved2[64];
1272 uint32_t useConstrainedIntraPred :1;
1273 uint32_t disableDeblockAcrossSliceBoundary :1;
1274 uint32_t outputBufferingPeriodSEI :1;
1275 uint32_t outputPictureTimingSEI :1;
1276 uint32_t outputAUD :1;
1277 uint32_t enableLTR :1;
1284 uint32_t disableSPSPPS :1;
1285 uint32_t repeatSPSPPS :1;
1286 uint32_t enableIntraRefresh :1;
1287 uint32_t chromaFormatIDC :2;
1288 uint32_t pixelBitDepthMinus8 :3;
1289 uint32_t reserved :18;
1315 uint32_t reserved1[217];
1316 void* reserved2[64];
1326 uint32_t disablePartition16x16 :1;
1327 uint32_t disablePartition8x16 :1;
1328 uint32_t disablePartition16x8 :1;
1329 uint32_t disablePartition8x8 :1;
1330 uint32_t disableIntraSearch :1;
1331 uint32_t bStereoEnable :1;
1332 uint32_t reserved :26;
1333 uint32_t reserved1 [255];
1334 void* reserved2[64];
1345 uint32_t reserved [256];
1346 void* reserved1[64];
1359 uint32_t reserved[320];
1380 uint32_t reserved [278];
1381 void* reserved2[64];
1385 #define NV_ENC_CONFIG_VER (NVENCAPI_STRUCT_VERSION(6) | ( 1<<31 ))
1405 uint32_t reportSliceOffsets :1;
1406 uint32_t enableSubFrameWrite :1;
1407 uint32_t enableExternalMEHints :1;
1409 uint32_t enableMEOnlyMode :1;
1410 uint32_t enableWeightedPrediction :1;
1411 uint32_t reservedBitFields :27;
1424 uint32_t reserved [289];
1425 void* reserved2[64];
1429 #define NV_ENC_INITIALIZE_PARAMS_VER (NVENCAPI_STRUCT_VERSION(5) | ( 1<<31 ))
1440 uint32_t resetEncoder :1;
1442 uint32_t forceIDR :1;
1444 uint32_t reserved :30;
1449 #define NV_ENC_RECONFIGURE_PARAMS_VER (NVENCAPI_STRUCT_VERSION(1) | ( 1<<31 ))
1459 uint32_t reserved1[255];
1460 void* reserved2[64];
1464 #define NV_ENC_PRESET_CONFIG_VER (NVENCAPI_STRUCT_VERSION(4) | ( 1<<31 ))
1478 #define NV_ENC_H264_SEI_PAYLOAD NV_ENC_SEI_PAYLOAD
1493 uint32_t constrainedFrame :1;
1495 uint32_t sliceModeDataUpdate :1;
1497 uint32_t ltrMarkFrame :1;
1498 uint32_t ltrUseFrames :1;
1499 uint32_t reservedBitFields :28;
1516 uint32_t reserved [243];
1517 void* reserved2[62];
1532 uint32_t constrainedFrame :1;
1534 uint32_t sliceModeDataUpdate :1;
1536 uint32_t ltrMarkFrame :1;
1537 uint32_t ltrUseFrames :1;
1538 uint32_t reservedBitFields :28;
1559 uint32_t reserved2 [244];
1560 void* reserved3[61];
1567 typedef union _NV_ENC_CODEC_PIC_PARAMS
1571 uint32_t reserved[256];
1600 uint32_t reserved1[6];
1605 uint16_t meHintRefPicDist[2];
1607 uint32_t reserved3[286];
1608 void* reserved4[60];
1612 #define NV_ENC_PIC_PARAMS_VER (NVENCAPI_STRUCT_VERSION(4) | ( 1<<31 ))
1635 meHintCountsPerBlock[2];
1640 uint32_t reserved1[243];
1641 void* reserved2[59];
1645 #define NV_ENC_MEONLY_PARAMS_VER NVENCAPI_STRUCT_VERSION(3)
1655 uint32_t doNotWait :1;
1656 uint32_t ltrFrame :1;
1657 uint32_t reservedBitFields :30;
1675 uint32_t reserved [236];
1676 void* reserved2[64];
1680 #define NV_ENC_LOCK_BITSTREAM_VER NVENCAPI_STRUCT_VERSION(1)
1690 uint32_t doNotWait :1;
1691 uint32_t reservedBitFields :31;
1695 uint32_t reserved1[251];
1696 void* reserved2[64];
1700 #define NV_ENC_LOCK_INPUT_BUFFER_VER NVENCAPI_STRUCT_VERSION(1)
1715 uint32_t reserved1[251];
1716 void* reserved2[63];
1720 #define NV_ENC_MAP_INPUT_RESOURCE_VER NVENCAPI_STRUCT_VERSION(4)
1752 uint32_t reserved1[248];
1753 void* reserved2[62];
1757 #define NV_ENC_REGISTER_RESOURCE_VER NVENCAPI_STRUCT_VERSION(3)
1771 uint32_t sliceOffsets[16];
1773 uint32_t reserved1[233];
1774 void* reserved2[64];
1778 #define NV_ENC_STAT_VER NVENCAPI_STRUCT_VERSION(1)
1793 uint32_t reserved [250];
1794 void* reserved2[64];
1798 #define NV_ENC_SEQUENCE_PARAM_PAYLOAD_VER NVENCAPI_STRUCT_VERSION(1)
1804 typedef struct _NV_ENC_EVENT_PARAMS
1809 uint32_t reserved1[253];
1810 void* reserved2[64];
1814 #define NV_ENC_EVENT_PARAMS_VER NVENCAPI_STRUCT_VERSION(1)
1819 typedef struct _NV_ENC_OPEN_ENCODE_SESSIONEX_PARAMS
1826 uint32_t reserved1[253];
1827 void* reserved2[64];
1830 #define NV_ENC_OPEN_ENCODE_SESSION_EX_PARAMS_VER NVENCAPI_STRUCT_VERSION(1)
3206 typedef NVENCSTATUS (
NVENCAPI* PNVENCOPENENCODESESSION) (
void* device, uint32_t deviceType,
void** encoder);
3207 typedef NVENCSTATUS (
NVENCAPI* PNVENCGETENCODEGUIDCOUNT) (
void* encoder, uint32_t* encodeGUIDCount);
3208 typedef NVENCSTATUS (
NVENCAPI* PNVENCGETENCODEGUIDS) (
void* encoder,
GUID* GUIDs, uint32_t guidArraySize, uint32_t* GUIDCount);
3209 typedef NVENCSTATUS (
NVENCAPI* PNVENCGETENCODEPROFILEGUIDCOUNT) (
void* encoder,
GUID encodeGUID, uint32_t* encodeProfileGUIDCount);
3210 typedef NVENCSTATUS (
NVENCAPI* PNVENCGETENCODEPROFILEGUIDS) (
void* encoder,
GUID encodeGUID,
GUID* profileGUIDs, uint32_t guidArraySize, uint32_t* GUIDCount);
3211 typedef NVENCSTATUS (
NVENCAPI* PNVENCGETINPUTFORMATCOUNT) (
void* encoder,
GUID encodeGUID, uint32_t* inputFmtCount);
3214 typedef NVENCSTATUS (
NVENCAPI* PNVENCGETENCODEPRESETCOUNT) (
void* encoder,
GUID encodeGUID, uint32_t* encodePresetGUIDCount);
3215 typedef NVENCSTATUS (
NVENCAPI* PNVENCGETENCODEPRESETGUIDS) (
void* encoder,
GUID encodeGUID,
GUID* presetGUIDs, uint32_t guidArraySize, uint32_t* encodePresetGUIDCount);
3219 typedef NVENCSTATUS (
NVENCAPI* PNVENCDESTROYINPUTBUFFER) (
void* encoder, NV_ENC_INPUT_PTR inputBuffer);
3221 typedef NVENCSTATUS (
NVENCAPI* PNVENCDESTROYBITSTREAMBUFFER) (
void* encoder, NV_ENC_OUTPUT_PTR bitstreamBuffer);
3224 typedef NVENCSTATUS (
NVENCAPI* PNVENCUNLOCKBITSTREAM) (
void* encoder, NV_ENC_OUTPUT_PTR bitstreamBuffer);
3226 typedef NVENCSTATUS (
NVENCAPI* PNVENCUNLOCKINPUTBUFFER) (
void* encoder, NV_ENC_INPUT_PTR inputBuffer);
3232 typedef NVENCSTATUS (
NVENCAPI* PNVENCUNMAPINPUTRESOURCE) (
void* encoder, NV_ENC_INPUT_PTR mappedInputBuffer);
3234 typedef NVENCSTATUS (
NVENCAPI* PNVENCINVALIDATEREFFRAMES) (
void* encoder, uint64_t invalidRefFrameTimeStamp);
3237 typedef NVENCSTATUS (
NVENCAPI* PNVENCUNREGISTERRESOURCE) (
void* encoder, NV_ENC_REGISTERED_PTR registeredRes);
3241 typedef NVENCSTATUS (
NVENCAPI* PNVENCDESTROYMVBUFFER) (
void* encoder, NV_ENC_OUTPUT_PTR mvBuffer);
3254 typedef struct _NV_ENCODE_API_FUNCTION_LIST
3295 void* reserved2[281];
3299 #define NV_ENCODE_API_FUNCTION_LIST_VER NVENCAPI_STRUCT_VERSION(2)
uint32_t version
[in]: Struct version.
uint32_t sliceTypeArrayCnt
uint8_t * sliceTypeData
[in]: Array which specifies the slice type used to force intra slice for a particular slice...
NVENCSTATUS NVENCAPI NvEncRegisterResource(void *encoder, NV_ENC_REGISTER_RESOURCE *registerResParams)
Registers a resource with the Nvidia Video Encoder Interface.
NVENCSTATUS NVENCAPI NvEncCreateMVBuffer(void *encoder, NV_ENC_CREATE_MV_BUFFER *createMVBufferParams)
Allocates output MV buffer for ME only mode.
PNVENCGETENCODEGUIDS nvEncGetEncodeGUIDs
[out]: Client should access NvEncGetEncodeGUIDs() API through this pointer.
NVENCSTATUS NVENCAPI NvEncDestroyInputBuffer(void *encoder, NV_ENC_INPUT_PTR inputBuffer)
Release an input buffers.
uint32_t idrPeriod
[in]: Specifies the IDR interval.
Entropy coding mode is CAVLC.
NV_ENC_PIC_TYPE
Input picture type.
No Stereo packing required.
PNVENCCREATEBITSTREAMBUFFER nvEncCreateBitstreamBuffer
[out]: Client should access NvEncCreateBitstreamBuffer() API through this pointer.
PNVENCGETENCODEPRESETCOUNT nvEncGetEncodeProfileGUIDCount
[out]: Client should access NvEncGetEncodeProfileGUIDCount() API through this pointer.
void * completionEvent
[in]: Handle to event to be registered/unregistered with the NvEncodeAPI interface.
uint32_t version
[in]: Struct version.
uint32_t bitStreamSize
[out]: Size of generated bitstream in bytes.
Adaptive Transform 8x8 mode disabled.
uint32_t temporalId
[in]: Specifies the temporal id of the picture
uint32_t vbvBufferSize
[in]: Specifies the VBV(HRD) buffer size.
NV_ENC_PIC_TYPE pictureType
[in]: Specifies input picture type.
Field encoding bottom field first.
int8_t * qpDeltaMap
[in]: Specifies the pointer to signed byte array containing QP delta value per MB in raster scan orde...
NV_ENC_QP constQP
[in]: Specifies the initial QP to be used for encoding, these values would be used for all frames if ...
uint32_t seiPayloadArrayCnt
[in]: Specifies the number of elements allocated in seiPayloadArray array.
Semi-Planar YUV [Y plane followed by interleaved UV plane].
uint32_t sliceModeData
[in]: Specifies the parameter needed for sliceMode.
Indicates Subframe readback support for slice-based encoding.
uint32_t encodeWidth
[in]: Specifies the encode width.
This indicates that the HW encoder is busy encoding and is unable to encode the input.
static const GUID NV_ENC_H264_PROFILE_HIGH_444_GUID
static const GUID NV_ENC_HEVC_PROFILE_MAIN10_GUID
FullPel motion vector precision.
NVENCSTATUS NVENCAPI NvEncInvalidateRefFrames(void *encoder, uint64_t invalidRefFrameTimeStamp)
Invalidate reference frames.
Driver selects QuarterPel motion vector precision by default.
Indicates end of the input stream.
PNVENCDESTROYMVBUFFER nvEncDestroyMVBuffer
[out]: Client should access NvEncDestroyMVBuffer API through this pointer.
uint8_t * payload
[in] pointer to user data
This indicates that the NvEncRegisterResource API failed to register the resource.
uint32_t ppsId
[in]: Specifies the PPS id of the picture header
GUID presetGUID
[in]: Specifies the preset for encoding.
void * device
[in]: Pointer to client device.
Memory heap is in cached system memory.
NVENCSTATUS NVENCAPI NvEncReconfigureEncoder(void *encoder, NV_ENC_RECONFIGURE_PARAMS *reInitEncodeParams)
Reconfigure an existing encoding session.
HEVC encoder configuration parameters to be set during initialization.
Indicates HW support for Weighted Predicition.
Register a resource for future use with the Nvidia Video Encoder Interface.
NVENCSTATUS NVENCAPI NvEncOpenEncodeSessionEx(NV_ENC_OPEN_ENCODE_SESSION_EX_PARAMS *openSessionExParams, void **encoder)
Opens an encoding session.
NVENC_EXTERNAL_ME_HINT * meExternalHints
[in]: Specifies the pointer to ME external hints for the current frame.
Indicates HW capability for Quarter pel motion estimation.
NV_ENC_BUFFER_FORMAT bufferFmt
[in]: Specifies the input buffer format.
void * outputBitstream
[in]: Pointer to the bitstream buffer being locked.
uint32_t * sliceOffsets
[in,out]: Array which receives the slice offsets.
uint32_t inBufferSize
[in]: Specifies the size of the spsppsBuffer provied by the client
uint32_t privDataSize
[in]: Reserved private data buffer size and must be set to 0
NV_ENC_OUTPUT_PTR mvBuffer
[in]: Specifies the pointer to motion vector data buffer allocated by NvEncCreateMVBuffer.
NVENCSTATUS NVENCAPI NvEncUnmapInputResource(void *encoder, NV_ENC_INPUT_PTR mappedInputBuffer)
UnMaps a NV_ENC_INPUT_PTR which was mapped for encoding.
NV_ENC_STEREO_PACKING_MODE stereoMode
[in]: Specifies the stereo frame packing mode which is to be signalled in frame packing arrangement S...
NVENCSTATUS NVENCAPI NvEncCreateInputBuffer(void *encoder, NV_ENC_CREATE_INPUT_BUFFER *createInputBufferParams)
Allocates Input buffer.
NV_ENC_CONFIG_H264 h264Config
[in]: Specifies the H.264-specific encoder configuration.
PNVENCGETENCODECAPS nvEncGetEncodeCaps
[out]: Client should access NvEncGetEncodeCaps() API through this pointer.
uint32_t ltrUseFrameBitmap
[in]: Specifies the associated bitmap of LTR frame indices to use when encoding this frame...
NV_ENC_MEMORY_HEAP memoryHeap
uint32_t chromaFormatIDC
[in]: Specifies the chroma format.
NVENCSTATUS NVENCAPI NvEncGetEncodePresetConfig(void *encoder, GUID encodeGUID, GUID presetGUID, NV_ENC_PRESET_CONFIG *presetConfig)
Returns a preset config structure supported for given preset GUID.
uint32_t payloadSize
[in] SEI payload size in bytes.
NV_ENC_OUTPUT_PTR bitstreamBuffer
[out]: Pointer to the output bitstream buffer
H264 specific enc pic params.
VBR, high quality (slower)
PNVENCRECONFIGUREENCODER nvEncReconfigureEncoder
[out]: Client should access NvEncReconfigureEncoder() API through this pointer.
Side-by-side mode for packing stereo frames.
NV_ENC_INPUT_PTR inputBuffer
[in]: Specifies the input buffer pointer.
NV_ENCODE_API_FUNCTION_LIST.
This indicates that one or more of the parameter passed to the API call is invalid.
This indicates that the encoder device supplied by the client is not valid.
Indicates HW support for MEOnly Mode.
NVENCSTATUS NVENCAPI NvEncInitializeEncoder(void *encoder, NV_ENC_INITIALIZE_PARAMS *createEncodeParams)
Initialize the encoder.
This indicates that an unknown internal error has occurred.
PNVENCUNREGISTERASYNCEVENT nvEncUnregisterAsyncEvent
[out]: Client should access NvEncUnregisterAsyncEvent() API through this pointer. ...
Indicates Temporal Scalability Support.
static const GUID NV_ENC_HEVC_PROFILE_FREXT_GUID
uint32_t intraRefreshPeriod
[in]: Specifies the interval between successive intra refresh if enableIntrarefresh is set...
NV_ENC_H264_ADAPTIVE_TRANSFORM_MODE adaptiveTransformMode
[in]: Specifies the AdaptiveTransform Mode.
Indicates HW support for encoding Temporal layers.
Indicates HW support for monochrome mode encoding.
NVENCSTATUS NVENCAPI NvEncGetEncodeProfileGUIDCount(void *encoder, GUID encodeGUID, uint32_t *encodeProfileGUIDCount)
Retrieves the number of supported profile GUIDs.
NVENC_EXTERNAL_ME_HINT * meExternalHints
[in]: Specifies the pointer to ME external hints for the current frame.
NV_ENC_CONFIG_H264_VUI_PARAMETERS NV_ENC_CONFIG_HEVC_VUI_PARAMETERS
PNVENCGETINPUTFORMATCOUNT nvEncGetInputFormatCount
[out]: Client should access NvEncGetInputFormatCount() API through this pointer.
NV_ENC_CODEC_PIC_PARAMS codecPicParams
[in]: Specifies the codec specific per-picture encoding parameters.
uint32_t ltrNumFrames
[in]: Specifies the number of LTR frames.
uint32_t forceIntraRefreshWithFrameCnt
[in]: Forces an intra refresh with duration equal to intraRefreshFrameCnt.
NV_ENC_PARAMS_FRAME_FIELD_MODE frameFieldMode
[in]: Specifies the frame/field mode.
uint32_t forceIntraRefreshWithFrameCnt
[in]: Forces an intra refresh with duration equal to intraRefreshFrameCnt.
uint32_t ltrUseFrameBitmap
[in]: Specifies the the associated bitmap of LTR frame indices to use when encoding this frame...
NV_ENC_QP maxQP
[in]: Specifies the maximum QP used for rate control.
uint32_t payloadType
[in] SEI payload types and syntax can be found in Annex D of the H.264 Specification.
static const GUID NV_ENC_CODEC_PROFILE_AUTOSELECT_GUID
Encoding parameters that need to be sent on a per frame basis.
uint32_t reservedBitFields
[in]: Reserved bitfields and must be set to 0
PNVENCUNLOCKINPUTBUFFER nvEncUnlockInputBuffer
[out]: Client should access NvEncUnlockInputBuffer() API through this pointer.
NVENCSTATUS NVENCAPI NvEncUnlockBitstream(void *encoder, NV_ENC_OUTPUT_PTR bitstreamBuffer)
Unlock the output bitstream buffer.
10 bit Planar YUV444 [Y plane followed by U and V planes].
uint32_t overscanInfoPresentFlag
[in]: if set to 1 , it specifies that the overscanInfo is present
uint32_t top
[in]: Y coordinate of the upper left corner of the rectangular area to be specified.
NVENCSTATUS NVENCAPI NvEncGetEncodeCaps(void *encoder, GUID encodeGUID, NV_ENC_CAPS_PARAM *capsParam, int *capsVal)
Retrieves the capability value for a specified encoder attribute.
HEVC specific enc pic params.
static const GUID NV_ENC_H264_PROFILE_MAIN_GUID
NV_ENC_QP initialRCQP
[in]: Specifies the initial QP used for rate control.
Bi-directionally predicted with only Intra MBs.
NV_ENC_PARAMS_RC_MODE rateControlMode
[in]: Specifies the rate control mode.
This indicates that an invalid struct version was used by the client.
void * completionEvent
[in]: Specifies an event to be signalled on completion of encoding of this Frame [only if operating i...
input resource type is an OpenGL texture
PNVENCDESTROYINPUTBUFFER nvEncDestroyInputBuffer
[out]: Client should access NvEncDestroyInputBuffer() API through this pointer.
void * NV_ENC_INPUT_PTR
NVENCODE API input buffer.
This indicates that API call returned with no errors.
uint32_t version
[in]: Struct version.
NV_ENC_CONFIG_H264_VUI_PARAMETERS h264VUIParameters
[in]: Specifies the H264 video usability info pamameters
uint32_t height
[in]: Input buffer Height.
uint8_t partitionMode
The CU partition mode 0 (2Nx2N), 1 (2NxN), 2(Nx2N), 3 (NxN), 4 (2NxnU), 5 (2NxnD), 6(nLx2N), 7 (nRx2N)
NVENCSTATUS NVENCAPI NvEncOpenEncodeSession(void *device, uint32_t deviceType, void **encoder)
Opens an encoding session.
NV_ENC_OUTPUT_PTR mvBuffer
[out]: Pointer to the output motion vector buffer
uint32_t picType
[out]: Picture type of encoded picture.
PNVENCCREATEINPUTBUFFER nvEncCreateInputBuffer
[out]: Client should access NvEncCreateInputBuffer() API through this pointer.
NV_ENC_CONFIG * encodeConfig
[in]: Specifies the advanced codec specific structure.
NVENCSTATUS NVENCAPI NvEncEncodePicture(void *encoder, NV_ENC_PIC_PARAMS *encodePicParams)
Submit an input picture for encoding.
uint32_t inputWidth
[in]: Specifies the input buffer width
Indicates HW support for field mode encoding.
Indicates Forcing Constant QP On The Fly Support.
uint32_t intraRefreshCnt
[in]: Specifies the length of intra refresh in number of frames for periodic intra refresh...
PNVENCGETENCODEGUIDCOUNT nvEncGetEncodeGUIDCount
[out]: Client should access NvEncGetEncodeGUIDCount() API through this pointer.
PNVENCINVALIDATEREFFRAMES nvEncInvalidateRefFrames
[out]: Client should access NvEncInvalidateRefFrames() API through this pointer.
uint32_t spsId
[in]: Specifies the SPS id of the sequence header
NVENCSTATUS NVENCAPI NvEncUnregisterResource(void *encoder, NV_ENC_REGISTERED_PTR registeredResource)
Unregisters a resource previously registered with the Nvidia Video Encoder Interface.
NV_ENC_PIC_PARAMS_HEVC hevcPicParams
[in]: HEVC encode picture params.
NV_ENC_HEVC_CUSIZE
HEVC CU SIZE.
uint32_t ltrMarkFrameIdx
[in]: Specifies the long term reference frame index to use for marking this frame as LTR...
uint32_t inputHeight
[in]: Specifies the input buffer height
PNVENCGETENCODEPRESETCOUNT nvEncGetEncodePresetCount
[out]: Client should access NvEncGetEncodePresetCount() API through this pointer. ...
PNVENCLOCKBITSTREAM nvEncLockBitstream
[out]: Client should access NvEncLockBitstream() API through this pointer.
Encode Session Initialization parameters.
BDirect mode is auto selected by the encoder driver.
Indicates HW support for 10 bit encoding.
uint32_t colourMatrix
[in]: Specifies the matrix coefficients used in deriving the luma and chroma from the RGB primaries (...
Input struct for querying Encoding capabilities.
Field encoding top field first.
uint32_t numSlices
[out]: Number of slices in the encoded picture.
Minimum Encoding level supported (See NV_ENC_LEVEL for details).
NV_ENC_LEVEL
Encoding levels.
uint32_t maxNumRefFrames
[in]: Specifies the DPB size used for encoding.
Creation parameters for output motion vector buffer for ME only mode.
NV_ENC_OUTPUT_PTR outputBitstream
[in]: Specifies the pointer to output buffer.
NV_ENC_BUFFER_FORMAT bufferFormat
[in]: Buffer format of resource to be registered.
uint32_t displayPOCSyntax
[in]: Specifies the display POC syntax This is required to be set if client is handling the picture t...
This indicates encode driver requires more input buffers to produce an output bitstream.
Indicates HW support for lossless encoding.
QuarterPel motion vector precision.
uint16_t Data3
[in]: Specifies the second group of 4 hexadecimal digits.
This indicates that the client is attempting to use a feature that is not available for the license t...
NV_ENC_OUTPUT_PTR outputBitStream
[out]: Specifies the pointer to output bitstream.
NV_ENC_REGISTERED_PTR registeredResource
[out]: Registered resource handle.
uint32_t Data1
[in]: Specifies the first 8 hexadecimal digits of the GUID.
uint32_t subResourceIndex
[in]: Subresource Index of the DirectX resource to be registered.
Encode the current picture as an Intra picture.
uint32_t picIdx
[out]: Picture number
Encode the current picture as an IDR picture.
NV_ENC_BUFFER_FORMAT
Input buffer formats.
NVENCSTATUS NVENCAPI NvEncDestroyBitstreamBuffer(void *encoder, NV_ENC_OUTPUT_PTR bitstreamBuffer)
Release a bitstream buffer.
uint8_t targetQuality
[in]: Target CQ (Constant Quality) level for VBR mode (range 0-51 with 0-automatic) ...
Rate control modes supported.
This indicates that the completion event passed in NvEncEncodePicture() API has not been registered w...
uint32_t vpsId
[in]: Specifies the VPS id of the video parameter set
uint32_t * outSPSPPSPayloadSize
[out]: Size of the sequence and picture header in bytes written by the NvEncodeAPI interface to the S...
Indicates Dynamic Encode Bitrate Change Support.
uint32_t apiVersion
[in]: API version.
uint32_t version
[in]: Struct version.
PNVENCREGISTERASYNCEVENT nvEncRegisterAsyncEvent
[out]: Client should access NvEncRegisterAsyncEvent() API through this pointer.
This indicates that the NvEncLockBitstream() failed to lock the output buffer.
PNVENCLOCKINPUTBUFFER nvEncLockInputBuffer
[out]: Client should access NvEncLockInputBuffer() API through this pointer.
uint32_t refPicFlag
[in]: Set to 1 for a reference picture.
uint8_t targetQualityLSB
[in]: Fractional part of target quality (as 8.8 fixed point format)
uint32_t inputPitch
[in]: Specifies the input buffer pitch.
void * completionEvent
[in]: Specifies an event to be signalled on completion of motion estimation of this Frame [only if op...
NV_ENC_HEVC_CUSIZE maxCUSize
[in]: Specifies the maximum size of luma coding unit.
uint32_t frameSatd
[out]: Total SATD cost for whole frame.
PNVENCGETSEQUENCEPARAMS nvEncGetSequenceParams
[out]: Client should access NvEncGetSequenceParams() API through this pointer.
NV_ENC_H264_ENTROPY_CODING_MODE entropyCodingMode
[in]: Specifies the entropy coding mode.
uint32_t colourPrimaries
[in]: Specifies color primaries for converting to RGB(as defined in Annex E of the ITU-T Specificatio...
NV_ENC_SEI_PAYLOAD * seiPayloadArray
[in]: Array of SEI payloads which will be inserted for this frame.
10 bit Packed A2R10G10B10.
Adaptive Transform 8x8 mode is auto selected by the encoder driver.
PNVENCRUNMOTIONESTIMATIONONLY nvEncRunMotionEstimationOnly
[out]: Client should access NvEncRunMotionEstimationOnly API through this pointer.
uint32_t reserved
[in]: Reserved and must be set to 0.
static const GUID NV_ENC_PRESET_LOSSLESS_HP_GUID
static const GUID NV_ENC_CODEC_H264_GUID
Indicates HW support for lookahead encoding (enableLookahead=1).
uint32_t numTemporalLayers
[in]: Specifies max temporal layers to be used for hierarchical coding.
input resource type is a cuda device pointer surface
void * NV_ENC_REGISTERED_PTR
A Resource that has been registered with NVENCODE API.
uint32_t width
[in]: Input buffer Width.
NV_ENC_CONFIG presetCfg
[out]: preset config returned by the Nvidia Video Encoder interface.
uint32_t colourDescriptionPresentFlag
[in]: If set to 1, it specifies that the colourPrimaries, transferCharacteristics and colourMatrix ar...
Memory heap to be decided by the encoder driver based on the usage.
Planar YUV [Y plane followed by V and U planes].
Row Interleave mode for packing stereo frames.
This indicates that the size of the user buffer passed by the client is insufficient for the requeste...
uint64_t inputTimeStamp
[in]: Specifies presentation timestamp associated with the input picture.
NV_ENC_CAPS capsToQuery
[in]: Specifies the encode capability to be queried.
uint32_t chromaSampleLocationTop
[in]: Specifies the chroma sample location for top field(as defined in Annex E of the ITU-T Specifica...
uint32_t videoFullRangeFlag
[in]: Specifies the output range of the luma and chroma samples(as defined in Annex E of the ITU-T Sp...
static const GUID NV_ENC_H264_PROFILE_BASELINE_GUID
Indicates support for PreProcessing.
static const GUID NV_ENC_PRESET_LOW_LATENCY_HP_GUID
uint32_t spsId
[in]: Specifies the SPS id to be used in sequence header.
uint32_t bitstreamSizeInBytes
[out]: Actual number of bytes generated and copied to the memory pointed by bitstreamBufferPtr.
static const GUID NV_ENC_PRESET_LOW_LATENCY_DEFAULT_GUID
uint8_t lastCUInCTB
Marker to separate CUs in the current CTB from CUs in the next CTB.
NV_ENC_INPUT_RESOURCE_TYPE resourceType
[in]: Specifies the type of resource to be registered.
NVENCSTATUS NVENCAPI NvEncCreateBitstreamBuffer(void *encoder, NV_ENC_CREATE_BITSTREAM_BUFFER *createBitstreamBufferParams)
Allocates an output bitstream buffer.
PNVENCGETENCODEPRESETCONFIG nvEncGetEncodePresetConfig
[out]: Client should access NvEncGetEncodePresetConfig() API through this pointer.
This indicates that the client is attempting to unregister a resource that has not been successfully ...
uint32_t reserved3
[in]: Reserved and must be set to 0
uint32_t maxNumRefFramesInDPB
[in]: Specifies the maximum number of references frames in the DPB.
uint32_t ltrTrustMode
[in]: Specifies the LTR operating mode.
uint32_t averageBitRate
[in]: Specifies the average bitrate(in bits/sec) used for encoding.
uint32_t overscanInfo
[in]: Specifies the overscan info(as defined in Annex E of the ITU-T Specification).
static const GUID NV_ENC_H264_PROFILE_PROGRESSIVE_HIGH_GUID
static const GUID NV_ENC_H264_PROFILE_STEREO_GUID
10 bit Packed A2B10G10R10.
Maximum aggregate throughput in MBs per sec.
NV_ENC_PIC_PARAMS_H264 h264PicParams
[in]: H264 encode picture params.
PNVENCREGISTERRESOURCE nvEncRegisterResource
[out]: Client should access NvEncRegisterResource() API through this pointer.
uint64_t inputDuration
[in]: Specifies duration of the input picture
uint32_t ltrMarkFrameIdx
[in]: Specifies the long term referenceframe index to use for marking this frame as LTR...
NVENCSTATUS NVENCAPI NvEncGetEncodeGUIDCount(void *encoder, uint32_t *encodeGUIDCount)
Retrieves the number of supported encode GUIDs.
Indicates support Async mode.
uint32_t qpDeltaMapSize
[in]: Specifies the size in bytes of qpDeltaMap surface allocated by client and pointed to by NV_ENC_...
uint32_t videoSignalTypePresentFlag
[in]: If set to 1, it specifies that the videoFormat, videoFullRangeFlag and colourDescriptionPresent...
NV_ENC_PIC_FLAGS
Encode Picture encode flags.
Encoder Session Creation parameters.
PNVENCGETINPUTFORMATS nvEncGetInputFormats
[out]: Client should access NvEncGetInputFormats() API through this pointer.
NV_ENC_INPUT_RESOURCE_TYPE
Input Resource type.
uint32_t version
[in]: Struct version.
GUID profileGUID
[in]: Specifies the codec profile guid.
uint32_t sliceMode
[in]: This parameter in conjunction with sliceModeData specifies the way in which the picture is divi...
PNVENCENCODEPICTURE nvEncEncodePicture
[out]: Client should access NvEncEncodePicture() API through this pointer.
PNVENCCREATEMVBUFFER nvEncCreateMVBuffer
[out]: Client should access NvEncCreateMVBuffer API through this pointer.
NVENCSTATUS NVENCAPI NvEncGetEncodePresetGUIDs(void *encoder, GUID encodeGUID, GUID *presetGUIDs, uint32_t guidArraySize, uint32_t *encodePresetGUIDCount)
Receives an array of supported encoder preset GUIDs.
uint32_t version
[in]: Struct version.
uint32_t sliceMode
[in]: This parameter in conjunction with sliceModeData specifies the way in which the picture is divi...
This indicates that the client is attempting to use a feature that is not implemented for the current...
NVENCSTATUS NVENCAPI NvEncLockInputBuffer(void *encoder, NV_ENC_LOCK_INPUT_BUFFER *lockInputBufferParams)
Locks an input buffer.
10 bit Semi-Planar YUV [Y plane followed by interleaved UV plane].
Indicates HW support for separate colour plane encoding.
Indicates HW support for Hierarchical B frames.
Indicates Dynamic Encode Resolution Change Support.
Entropy coding mode is auto selected by the encoder driver.
PNVENCOPENENCODESESSIONEX nvEncOpenEncodeSessionEx
[out]: Client should access NvEncOpenEncodeSession() API through this pointer.
NV_ENC_QP minQP
[in]: Specifies the minimum QP used for rate control.
H264 encoder configuration parameters for ME only Mode.
uint32_t encodePicFlags
[in]: Specifies bit-wise OR`ed encode pic flags.
uint32_t separateColourPlaneFlag
[in]: Set to 1 to enable 4:4:4 separate colour planes
This indicates that device passed to the API call is invalid.
This indicates that the client is attempting to unmap a resource that has not been successfully mappe...
NV_ENC_SEI_PAYLOAD * seiPayloadArray
[in]: Array of SEI payloads which will be inserted for this frame.
uint32_t maxEncodeHeight
[in]: Maximum encode height to be allowed for current Encode session.
Maximum output height supported.
Entropy coding mode is CABAC.
uint32_t idrPeriod
[in]: Specifies the IDR interval.
uint32_t version
[in]: Struct version.
H264 Video Usability Info parameters.
uint16_t lookaheadDepth
[in]: Maximum depth of lookahead with range 0-32 (only used if enableLookahead=1) ...
Indicates Dynamic rate control mode Change Support.
uint32_t version
[in]: Struct version.
uint32_t refPicFlag
[in]: Set to 1 for a reference picture.
void * bitstreamBufferPtr
[out]: Reserved and should not be used
NV_ENC_PIC_STRUCT pictureStruct
[out]: Structure of the generated output picture.
Maximum output width supported.
Bitstream buffer lock parameters.
uint32_t displayPOCSyntax
[in]: Specifies the display POC syntax This is required to be set if client is handling the picture t...
PNVENCDESTROYBITSTREAMBUFFER nvEncDestroyBitstreamBuffer
[out]: Client should access NvEncDestroyBitstreamBuffer() API through this pointer.
uint16_t Data2
[in]: Specifies the first group of 4 hexadecimal digits.
uint32_t left
[in]: X coordinate of the upper left corner of rectangular area to be specified.
uint32_t maxBitRate
[in]: Specifies the maximum bitrate for the encoded output.
NVENCSTATUS NVENCAPI NvEncRegisterAsyncEvent(void *encoder, NV_ENC_EVENT_PARAMS *eventParams)
Register event for notification to encoding completion.
Sequence and picture paramaters payload.
External Motion Vector hint structure.
uint32_t vbvInitialDelay
[in]: Specifies the VBV(HRD) initial delay in bits.
Motion vector structure per macroblock for H264 motion estimation.
uint8_t mbType
0 (I), 1 (P), 2 (IPCM), 3 (B)
static const GUID NV_ENC_PRESET_BD_GUID
static const GUID NV_ENC_PRESET_LOW_LATENCY_HQ_GUID
Reserved - Not to be used by clients.
NVENCSTATUS NVENCAPI NvEncGetEncodeProfileGUIDs(void *encoder, GUID encodeGUID, GUID *profileGUIDs, uint32_t guidArraySize, uint32_t *GUIDCount)
Retrieves an array of supported encode profile GUIDs.
uint32_t level
[in]: Specifies the encoding level.
static const GUID NV_ENC_H264_PROFILE_SVC_TEMPORAL_SCALABILTY
NV_ENC_H264_ENTROPY_CODING_MODE
H.264 entropy coding modes.
NVENCSTATUS NVENCAPI NvEncGetEncodeGUIDs(void *encoder, GUID *GUIDs, uint32_t guidArraySize, uint32_t *GUIDCount)
Retrieves an array of supported encoder codec GUIDs.
NV_ENC_PIC_STRUCT
Input picture structure.
Maximum number of Long Term Reference frames supported.
static const int8_t mv[256][2]
PNVENCUNREGISTERRESOURCE nvEncUnregisterResource
[out]: Client should access NvEncUnregisterResource() API through this pointer.
uint32_t inputHeight
[in]: Specifies the input buffer height
static const GUID NV_ENC_PRESET_HP_GUID
uint32_t ltrUsageMode
[in]: Not supported.
uint32_t spsId
[in]: Specifies the SPS id of the sequence header
HalfPel motion vector precision.
uint32_t maxEncodeWidth
[in]: Maximum encode width to be used for current Encode session.
NVENCSTATUS NVENCAPI NvEncGetEncodeStats(void *encoder, NV_ENC_STAT *encodeStats)
Get encoding statistics.
uint32_t reserved
[in]: Reserved and must be set to 0
uint32_t seiPayloadArrayCnt
[in]: Specifies the number of elements allocated in seiPayloadArray array.
uint32_t disableDeblockingFilterIDC
[in]: Specifies the deblocking filter mode.
Indicates Reference Picture Invalidation Support.
PNVENCMAPINPUTRESOURCE nvEncMapInputResource
[out]: Client should access NvEncMapInputResource() API through this pointer.
NVENCSTATUS NVENCAPI NvEncGetInputFormatCount(void *encoder, GUID encodeGUID, uint32_t *inputFmtCount)
Retrieve the number of supported Input formats.
encode device type is a cuda device
NV_ENC_MEMORY_HEAP
Memory heap to allocate input and output buffers.
PNVENCGETENCODEPRESETGUIDS nvEncGetEncodePresetGUIDs
[out]: Client should access NvEncGetEncodePresetGUIDs() API through this pointer. ...
void * bitstreamBufferPtr
[out]: Pointer to the generated output bitstream.
uint32_t version
[in]: Struct version.
Creation parameters for output bitstream buffer.
FMO usage is auto selected by the encoder driver.
NV_ENC_H264_FMO_MODE fmoMode
[in]: Specified the FMO Mode.
NVENCSTATUS NVENCAPI NvEncGetSequenceParams(void *encoder, NV_ENC_SEQUENCE_PARAM_PAYLOAD *sequenceParamPayload)
Get encoded sequence and picture header.
Indicates HW support for Adaptive Transform.
uint32_t frameRateNum
[in]: Specifies the numerator for frame rate used for encoding in frames per second ( Frame rate = fr...
uint32_t maxTemporalLayers
[in]: Specifies the max temporal layer used for hierarchical coding.
uint32_t reserved
[in]: Reserved and must be set to 0
uint32_t sliceTypeArrayCnt
[in]: Client should set this to the number of elements allocated in sliceTypeData array...
NV_ENC_STEREO_PACKING_MODE
Stereo frame packing modes.
uint32_t frameAvgQP
[out]: Average QP of the frame.
Rate Control Configuration Paramters.
uint32_t version
[in]: Struct version.
uint32_t ltrUsageMode
[in]: Not supported.
Indicates HW support for temporal AQ encoding (enableTemporalAQ=1).
NV_ENC_H264_BDIRECT_MODE bdirectMode
[in]: Specifies the BDirect mode.
H264 encoder configuration parameters.
uint32_t ppsId
[in]: Specifies the PPS id of the picture header
NV_ENC_RC_PARAMS rcParams
[in]: Specifies the rate control parameters for the current encoding session.
input resource type is a cuda array surface
PNVENCOPENENCODESESSION nvEncOpenEncodeSession
[out]: Client should access NvEncOpenEncodeSession() API through this pointer.
This indicates that one or more of the pointers passed to the API call is invalid.
Maximum MBs per frame supported.
uint32_t frameIdx
[out]: Frame no.
NVENCSTATUS NVENCAPI NvEncodeAPIGetMaxSupportedVersion(uint32_t *version)
Get the largest NvEncodeAPI version supported by the driver.
GUID encodeGUID
[in]: Specifies the Encode GUID for which the encoder is being created.
NV_ENC_INPUT_PTR inputBuffer
[in]: Specifies the input buffer pointer.
uint32_t version
[in]: Struct version.
Codec-specific encoder configuration parameters to be set during initialization.
uint32_t chromaSampleLocationFlag
[in]: if set to 1 , it specifies that the chromaSampleLocationTop and chromaSampleLocationBot are pre...
uint32_t level
[in]: Specifies the level of the encoded bitstream.
uint32_t transferCharacteristics
[in]: Specifies the opto-electronic transfer characteristics to use (as defined in Annex E of the ITU...
Codec specific per-picture encoding parameters.
uint32_t monoChromeEncoding
[in]: Set this to 1 to enable monochrome encoding for this session.
uint32_t ppsId
[in]: Specifies the PPS id to be used in picture header.
Motion vector structure per CU for HEVC motion estimation.
uint32_t right
[in]: X coordinate of the bottom right corner of the rectangular area to be specified.
Indicates HW support for FMO.
NV_ENC_H264_BDIRECT_MODE
H.264 specific Bdirect modes.
NV_ENC_CONFIG_HEVC_MEONLY hevcMeOnlyConfig
[in]: Specifies the HEVC-specific ME only encoder configuration.
Indicates HW support for Hierarchical P frames.
uint8_t cuType
0 (I), 1(P), 2 (Skip)
This indicates that an API call was made in wrong sequence/order.
uint8_t partitionType
Specifies the block partition type.
NV_ENC_DEVICE_TYPE
Encoder Device type.
Indicates HW support for YUV444 mode encoding.
uint32_t hwEncodeStatus
[out]: The NvEncodeAPI interface status for the locked picture.
uint32_t colourPlaneId
[in]: Specifies the colour plane ID associated with the current input.
uint32_t ltrNumFrames
[in]: This parameter has different meaning in two LTR modes.
Frame Sequential mode for packing stereo frames.
uint32_t pitch
[in]: Input buffer Pitch.
MEOnly parameters that need to be sent on a per motion estimation basis.
int16_t mvy
the y component of MV in qpel units
Structs needed for ME only mode.
HEVC encoder configuration parameters for ME only Mode.
PNVENCUNMAPINPUTRESOURCE nvEncUnmapInputResource
[out]: Client should access NvEncUnmapInputResource() API through this pointer.
uint32_t sliceModeData
[in]: Specifies the parameter needed for sliceMode.
uint32_t ltrFrameIdx
[out]: Frame index associated with this LTR frame.
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.
uint32_t frameRateDen
[in]: Specifies the denominator for frame rate used for encoding in frames per second ( Frame rate = ...
void * reserved
[in]: Reserved and must be set to 0.
uint64_t outputDuration
[out]: Presentation duration associates with the encoded output.
uint32_t temporallayerIdxMask
[in]: Specifies the temporal layers (as a bitmask) whose QPs have changed.
NV_ENC_CONFIG_HEVC_VUI_PARAMETERS hevcVUIParameters
[in]: Specifies the HEVC video usability info pamameters
NVENCSTATUS NVENCAPI NvEncUnlockInputBuffer(void *encoder, NV_ENC_INPUT_PTR inputBuffer)
Unlocks the input buffer.
NV_ENC_CONFIG_HEVC hevcConfig
[in]: Specifies the HEVC-specific encoder configuration.
uint32_t gopLength
[in]: Specifies the number of pictures in one GOP.
uint32_t sliceModeData
[in]: Specifies the parameter needed for sliceMode.
uint64_t outputTimeStamp
[out]: Presentation timestamp associated with the encoded output.
NV_ENC_MV_PRECISION
Motion vector precisions.
This indicates that devices pass by the client is not supported.
NV_ENC_MV_PRECISION mvPrecision
[in]: Specifies the desired motion vector prediction precision.
Memory heap is in local video memory.
static const GUID NV_ENC_HEVC_PROFILE_MAIN_GUID
NVENCSTATUS NVENCAPI NvEncUnregisterAsyncEvent(void *encoder, NV_ENC_EVENT_PARAMS *eventParams)
Unregister completion event.
uint32_t bitstreamRestrictionFlag
[in]: if set to 1, it specifies the bitstream restriction parameters are present in the bitstream...
uint32_t maxTemporalLayersMinus1
[in]: Specifies the max temporal layer used for hierarchical coding.
uint32_t sliceMode
[in]: This parameter in conjunction with sliceModeData specifies the way in which the picture is divi...
NV_ENC_CAPS
Encoder capabilities enumeration.
Indicates Constrained Encoding mode support.
uint32_t sliceMode
[in]: This parameter in conjunction with sliceModeData specifies the way in which the picture is divi...
Bi-directionally predicted picture.
This indicates that completion event passed in NvEncEncodePicture() call is invalid.
NV_ENC_PIC_TYPE pictureType
[out]: Picture type of the encoded picture.
uint32_t reserved
[in]: Reserved and should be set to 0.
uint32_t reserved
[in]: Reserved and must be set to 0
NVENCSTATUS NVENCAPI NvEncGetEncodePresetCount(void *encoder, GUID encodeGUID, uint32_t *encodePresetGUIDCount)
Retrieves the number of supported preset GUIDs.
Indicates HW support for Sample Adaptive Offset.
Column Interleave mode for packing stereo frames.
static const GUID NV_ENC_PRESET_DEFAULT_GUID
uint32_t tier
[in]: Specifies the level tier of the encoded bitstream.
int16_t mvx
the x component of MV in qpel units
This indicates that an unsupported parameter was passed by the client.
uint32_t bottom
[in]: Y coordinate of the bottom right corner of the rectangular area to be specified.
NV_ENC_DEVICE_TYPE deviceType
[in]: Specified the device Type
uint32_t frameIdx
[in]: Specifies the frame index associated with the input frame [optional].
uint32_t ltrFrameBitmap
[out]: Bitmap of LTR frames indices which were used for encoding this frame.
Maximum Encoding level supported (See NV_ENC_LEVEL for details).
void * resourceToRegister
[in]: Handle to the resource that is being registered.
uint32_t version
[in]: Struct version.
void * NV_ENC_OUTPUT_PTR
NVENCODE API output buffer.
PNVENCDESTROYENCODER nvEncDestroyEncoder
[out]: Client should access NvEncDestroyEncoder() API through this pointer.
NV_ENC_PIC_STRUCT pictureStruct
[in]: Specifies structure of the input picture.
static const GUID NV_ENC_CODEC_HEVC_GUID
uint32_t intraRefreshPeriod
[in]: Specifies the interval between successive intra refresh if enableIntrarefresh is set...
static const GUID NV_ENC_H264_PROFILE_CONSTRAINED_HIGH_GUID
NVENCSTATUS NVENCAPI NvEncLockBitstream(void *encoder, NV_ENC_LOCK_BITSTREAM *lockBitstreamBufferParams)
Lock output bitstream buffer.
static const GUID NV_ENC_PRESET_HQ_GUID
Planar YUV [Y plane followed by U and V planes].
Indicates Custom VBV Bufer Size support.
Write the sequence and picture header in encoded bitstream of the current picture.
uint32_t ltrTrustMode
[in]: Specifies the LTR operating mode.
uint32_t darWidth
[in]: Specifies the display aspect ratio Width.
static const GUID NV_ENC_PRESET_LOSSLESS_DEFAULT_GUID
uint8_t cuSize
0: 8x8, 1: 16x16, 2: 32x32, 3: 64x64
PNVENCGETENCODEPRESETGUIDS nvEncGetEncodeProfileGUIDs
[out]: Client should access NvEncGetEncodeProfileGUIDs() API through this pointer.
Indicates Intra Refresh Mode Support.
uint32_t viewID
[in]: Specifies left,right viewID if NV_ENC_CONFIG_H264_MEONLY::bStereoEnable is set.
NV_ENC_HEVC_CUSIZE minCUSize
[in]: Specifies the minimum size of luma coding unit.
Memory heap is in uncached system memory.
uint32_t sliceModeData
[in]: Specifies the parameter needed for sliceMode.
void * privData
[in]: Reserved private data buffer and must be set to NULL
low-delay CBR, high quality
uint32_t darHeight
[in]: Specifies the display aspect ratio height.
Checkerboard mode for packing stereo frames.
uint32_t enableEncodeAsync
[in]: Set this to 1 to enable asynchronous mode and is expected to use events to get picture completi...
NV_ENC_PARAMS_RC_MODE
Rate Control Modes.
NVENCSTATUS NVENCAPI NvEncMapInputResource(void *encoder, NV_ENC_MAP_INPUT_RESOURCE *mapInputResParams)
Map an externally created input resource pointer for encoding.
input resource type is a directx9 surface
static const GUID NV_ENC_H264_PROFILE_HIGH_GUID
int32_t frameIntervalP
[in]: Specifies the GOP pattern as follows: frameIntervalP = 0: I, 1: IPP, 2: IBP, 3: IBBP If goplength is set to NVENC_INFINITE_GOPLENGTH frameIntervalP should be set to 1.
NV_ENC_BUFFER_FORMAT bufferFmt
[in]: Specifies the input buffer format.
NVENCSTATUS NVENCAPI NvEncDestroyMVBuffer(void *encoder, NV_ENC_OUTPUT_PTR mvBuffer)
Release an output MV buffer for ME only mode.
uint16_t reserved
reserved padding for alignment
PNVENCGETENCODESTATS nvEncGetEncodeStats
[out]: Client should access NvEncGetEncodeStats() API through this pointer.
Top-Bottom mode for packing stereo frames.
NVENCSTATUS NVENCAPI NvEncDestroyEncoder(void *encoder)
Destroy Encoding Session.
PNVENCINITIALIZEENCODER nvEncInitializeEncoder
[out]: Client should access NvEncInitializeEncoder() API through this pointer.
NVENCSTATUS NVENCAPI NvEncodeAPICreateInstance(NV_ENCODE_API_FUNCTION_LIST *functionList)
Entry Point to the NvEncodeAPI interface.
uint32_t enablePTD
[in]: Set this to 1 to enable the Picture Type Decision is be taken by the NvEncodeAPI interface...
NV_ENC_H264_FMO_MODE
H.264 specific FMO usage.
Indicates Dynamic Slice Mode Support.
uint32_t version
[in]: Struct version.
encode device type is an OpenGL device.
CBR, high quality (slower)
PNVENCUNLOCKBITSTREAM nvEncUnlockBitstream
[out]: Client should access NvEncUnlockBitstream() API through this pointer.
Planar YUV [Y plane followed by U and V planes].
uint32_t encodeHeight
[in]: Specifies the encode height.
uint32_t inputWidth
[in]: Specifies the input buffer width
NV_ENC_PARAMS_FRAME_FIELD_MODE
Input frame encode modes.
NV_ENC_H264_ADAPTIVE_TRANSFORM_MODE
H.264 specific Adaptive Transform modes.
void * spsppsBuffer
[in]: Specifies bitstream header pointer of size NV_ENC_SEQUENCE_PARAM_PAYLOAD::inBufferSize.
uint32_t videoFormat
[in]: Specifies the source video format(as defined in Annex E of the ITU-T Specification).
Encoder configuration parameters to be set during initialization.
uint32_t chromaSampleLocationBot
[in]: Specifies the chroma sample location for bottom field(as defined in Annex E of the ITU-T Specif...
uint32_t version
[in]: Client should pass NV_ENCODE_API_FUNCTION_LIST_VER.
encode device type is a directx9 device
This indicates that the encoder has not been initialized with NvEncInitializeEncoder() or that initia...
uint32_t version
[in]: Struct version.
External motion vector hint counts per block type.
First picture in intra refresh cycle.
Event registration/unregistration parameters.
NV_ENC_INPUT_PTR referenceFrame
[in]: Specifies the reference frame pointer
NVENCSTATUS NVENCAPI NvEncRunMotionEstimationOnly(void *encoder, NV_ENC_MEONLY_PARAMS *meOnlyParams)
Submit an input picture and reference frame for motion estimation in ME only mode.
uint32_t intraRefreshCnt
[in]: Specifies the length of intra refresh in number of frames for periodic intra refresh...
This indicates that device passed to the API call is no longer available and needs to be reinitialize...
NV_ENC_CONFIG_H264_MEONLY h264MeOnlyConfig
[in]: Specifies the H.264-specific ME only encoder configuration.
This indicates that no encode capable devices were detected.
uint32_t lastValidByteOffset
[out]: Offset of last valid bytes of completed bitstream
Maximum number of B-Frames supported.
This indicates that NvEncMapInputResource() API failed to map the client provided input resource...
NV_ENC_CODEC_CONFIG encodeCodecConfig
[in]: Specifies the codec specific config parameters through this union.
This indicates that the API call failed because it was unable to allocate enough memory to perform th...
Adaptive Transform 8x8 mode should be used.