35 #ifndef _NV_ENCODEAPI_H_
36 #define _NV_ENCODEAPI_H_
47 typedef unsigned __int32 uint32_t;
49 typedef unsigned __int64 uint64_t;
50 typedef signed char int8_t;
52 typedef short int16_t;
53 typedef unsigned short uint16_t;
68 #if defined(_WIN32) || defined(__CYGWIN__)
69 #define NVENCAPI __stdcall
114 #define NVENCAPI_MAJOR_VERSION 7
115 #define NVENCAPI_MINOR_VERSION 0
117 #define NVENCAPI_VERSION (NVENCAPI_MAJOR_VERSION | (NVENCAPI_MINOR_VERSION << 24))
122 #define NVENCAPI_STRUCT_VERSION(ver) ((uint32_t)NVENCAPI_VERSION | ((ver)<<16) | (0x7 << 28))
125 #define NVENC_INFINITE_GOPLENGTH 0xffffffff
127 #define NV_MAX_SEQ_HDR_LEN (512)
135 { 0x6bc82762, 0x4e63, 0x4ca4, { 0xaa, 0x85, 0x1e, 0x50, 0xf3, 0x21, 0xf6, 0xbf } };
139 { 0x790cdc88, 0x4522, 0x4d7b, { 0x94, 0x25, 0xbd, 0xa9, 0x97, 0x5f, 0x76, 0x3 } };
149 { 0xbfd6f8e7, 0x233c, 0x4341, { 0x8b, 0x3e, 0x48, 0x18, 0x52, 0x38, 0x3, 0xf4 } };
153 { 0x727bcaa, 0x78c4, 0x4c83, { 0x8c, 0x2f, 0xef, 0x3d, 0xff, 0x26, 0x7c, 0x6a } };
157 { 0x60b5c1d4, 0x67fe, 0x4790, { 0x94, 0xd5, 0xc4, 0x72, 0x6d, 0x7b, 0x6e, 0x6d } };
161 { 0xe7cbc309, 0x4f7a, 0x4b89, { 0xaf, 0x2a, 0xd5, 0x37, 0xc9, 0x2b, 0xe3, 0x10 } };
165 { 0x7ac663cb, 0xa598, 0x4960, { 0xb8, 0x44, 0x33, 0x9b, 0x26, 0x1a, 0x7d, 0x52 } };
169 { 0x40847bf5, 0x33f7, 0x4601, { 0x90, 0x84, 0xe8, 0xfe, 0x3c, 0x1d, 0xb8, 0xb7 } };
173 { 0xce788d20, 0xaaa9, 0x4318, { 0x92, 0xbb, 0xac, 0x7e, 0x85, 0x8c, 0x8d, 0x36 } };
177 { 0xb405afac, 0xf32b, 0x417b, { 0x89, 0xc4, 0x9a, 0xbe, 0xed, 0x3e, 0x59, 0x78 } };
181 { 0xaec1bd87, 0xe85b, 0x48f2, { 0x84, 0xc3, 0x98, 0xbc, 0xa6, 0x28, 0x50, 0x72 } };
185 { 0xb514c39a, 0xb55b, 0x40fa, { 0x87, 0x8f, 0xf1, 0x25, 0x3b, 0x4d, 0xfd, 0xec } };
189 { 0xfa4d2b6c, 0x3a5b, 0x411a, { 0x80, 0x18, 0x0a, 0x3f, 0x5e, 0x3c, 0x9b, 0xe5 } };
194 { 0x51ec32b5, 0x1b4c, 0x453c, { 0x9c, 0xbd, 0xb6, 0x16, 0xbd, 0x62, 0x13, 0x41 } };
201 { 0xb2dfb705, 0x4ebd, 0x4c49, { 0x9b, 0x5f, 0x24, 0xa7, 0x77, 0xd3, 0xe5, 0x87 } };
205 { 0x60e4c59f, 0xe846, 0x4484, { 0xa5, 0x6d, 0xcd, 0x45, 0xbe, 0x9f, 0xdd, 0xf6 } };
209 { 0x34dba71d, 0xa77b, 0x4b8f, { 0x9c, 0x3e, 0xb6, 0xd5, 0xda, 0x24, 0xc0, 0x12 } };
213 { 0x82e3e450, 0xbdbb, 0x4e40, { 0x98, 0x9c, 0x82, 0xa9, 0xd, 0xf9, 0xef, 0x32 } };
217 { 0x49df21c5, 0x6dfa, 0x4feb, { 0x97, 0x87, 0x6a, 0xcc, 0x9e, 0xff, 0xb7, 0x26 } };
221 { 0xc5f733b9, 0xea97, 0x4cf9, { 0xbe, 0xc2, 0xbf, 0x78, 0xa7, 0x4f, 0xd1, 0x5 } };
225 { 0x67082a44, 0x4bad, 0x48fa, { 0x98, 0xea, 0x93, 0x5, 0x6d, 0x15, 0xa, 0x58 } };
229 { 0xd5bfb716, 0xc604, 0x44e7, { 0x9b, 0xb8, 0xde, 0xa5, 0x51, 0xf, 0xc3, 0xac } };
233 { 0x149998e7, 0x2364, 0x411d, { 0x82, 0xef, 0x17, 0x98, 0x88, 0x9, 0x34, 0x9 } };
243 typedef enum _NV_ENC_PARAMS_FRAME_FIELD_MODE
253 typedef enum _NV_ENC_PARAMS_RC_MODE
264 #define NV_ENC_PARAMS_RC_CBR2 NV_ENC_PARAMS_RC_CBR
269 typedef enum _NV_ENC_PIC_STRUCT
279 typedef enum _NV_ENC_PIC_TYPE
294 typedef enum _NV_ENC_MV_PRECISION
306 typedef enum _NV_ENC_BUFFER_FORMAT
323 #define NV_ENC_BUFFER_FORMAT_NV12_PL NV_ENC_BUFFER_FORMAT_NV12
324 #define NV_ENC_BUFFER_FORMAT_YV12_PL NV_ENC_BUFFER_FORMAT_YV12
325 #define NV_ENC_BUFFER_FORMAT_IYUV_PL NV_ENC_BUFFER_FORMAT_IYUV
326 #define NV_ENC_BUFFER_FORMAT_YUV444_PL NV_ENC_BUFFER_FORMAT_YUV444
331 typedef enum _NV_ENC_LEVEL
375 typedef enum _NVENCSTATUS
547 typedef enum _NV_ENC_PIC_FLAGS
560 typedef enum _NV_ENC_MEMORY_HEAP
572 typedef enum _NV_ENC_H264_ENTROPY_CODING_MODE
582 typedef enum _NV_ENC_H264_BDIRECT_MODE
593 typedef enum _NV_ENC_H264_FMO_MODE
603 typedef enum _NV_ENC_H264_ADAPTIVE_TRANSFORM_MODE
613 typedef enum _NV_ENC_STEREO_PACKING_MODE
627 typedef enum _NV_ENC_INPUT_RESOURCE_TYPE
637 typedef enum _NV_ENC_DEVICE_TYPE
646 typedef enum _NV_ENC_CAPS
932 typedef enum _NV_ENC_HEVC_CUSIZE
944 typedef struct _NV_ENC_CAPS_PARAM
948 uint32_t reserved[62];
952 #define NV_ENC_CAPS_PARAM_VER NVENCAPI_STRUCT_VERSION(1)
958 typedef struct _NV_ENC_CREATE_INPUT_BUFFER
968 uint32_t reserved1[57];
973 #define NV_ENC_CREATE_INPUT_BUFFER_VER NVENCAPI_STRUCT_VERSION(1)
978 typedef struct _NV_ENC_CREATE_BITSTREAM_BUFFER
986 uint32_t reserved1[58];
991 #define NV_ENC_CREATE_BITSTREAM_BUFFER_VER NVENCAPI_STRUCT_VERSION(1)
996 typedef struct _NV_ENC_MVECTOR
1005 typedef struct _NV_ENC_H264_MV_DATA
1017 typedef struct _NV_ENC_HEVC_MV_DATA
1031 typedef struct _NV_ENC_CREATE_MV_BUFFER
1035 uint32_t reserved1[255];
1036 void* reserved2[63];
1040 #define NV_ENC_CREATE_MV_BUFFER_VER NVENCAPI_STRUCT_VERSION(1)
1045 typedef struct _NV_ENC_QP
1055 typedef struct _NV_ENC_RC_PARAMS
1064 uint32_t enableMinQP :1;
1065 uint32_t enableMaxQP :1;
1066 uint32_t enableInitialRCQP :1;
1067 uint32_t enableAQ :1;
1068 uint32_t enableExtQPDeltaMap :1;
1069 uint32_t enableLookahead :1;
1070 uint32_t disableIadapt :1;
1071 uint32_t disableBadapt :1;
1072 uint32_t enableTemporalAQ :1;
1073 uint32_t zeroReorderDelay :1;
1074 uint32_t enableNonRefP :1;
1075 uint32_t strictGOPTarget :1;
1076 uint32_t aqStrength :4;
1077 uint32_t reservedBitFields :16;
1085 uint32_t reserved[9];
1089 #define NV_ENC_RC_PARAMS_VER NVENCAPI_STRUCT_VERSION(1)
1112 uint32_t reserved[15];
1123 uint32_t numCandsPerBlk16x16 : 4;
1124 uint32_t numCandsPerBlk16x8 : 4;
1125 uint32_t numCandsPerBlk8x16 : 4;
1126 uint32_t numCandsPerBlk8x8 : 4;
1127 uint32_t reserved : 16;
1128 uint32_t reserved1[3];
1154 uint32_t enableTemporalSVC :1;
1155 uint32_t enableStereoMVC :1;
1156 uint32_t hierarchicalPFrames :1;
1157 uint32_t hierarchicalBFrames :1;
1158 uint32_t outputBufferingPeriodSEI :1;
1159 uint32_t outputPictureTimingSEI :1;
1160 uint32_t outputAUD :1;
1161 uint32_t disableSPSPPS :1;
1162 uint32_t outputFramePackingSEI :1;
1163 uint32_t outputRecoveryPointSEI :1;
1164 uint32_t enableIntraRefresh :1;
1165 uint32_t enableConstrainedEncoding :1;
1167 uint32_t repeatSPSPPS :1;
1168 uint32_t enableVFR :1;
1169 uint32_t enableLTR :1;
1170 uint32_t qpPrimeYZeroTransformBypassFlag :1;
1172 uint32_t useConstrainedIntraPred :1;
1173 uint32_t reservedBitFields :15;
1213 uint32_t reserved1[270];
1214 void* reserved2[64];
1228 uint32_t useConstrainedIntraPred :1;
1229 uint32_t disableDeblockAcrossSliceBoundary :1;
1230 uint32_t outputBufferingPeriodSEI :1;
1231 uint32_t outputPictureTimingSEI :1;
1232 uint32_t outputAUD :1;
1233 uint32_t enableLTR :1;
1234 uint32_t disableSPSPPS :1;
1235 uint32_t repeatSPSPPS :1;
1236 uint32_t enableIntraRefresh :1;
1237 uint32_t chromaFormatIDC :2;
1238 uint32_t pixelBitDepthMinus8 :3;
1239 uint32_t reserved :18;
1265 uint32_t reserved1[217];
1266 void* reserved2[64];
1277 uint32_t reserved[256];
1298 uint32_t reserved [278];
1299 void* reserved2[64];
1303 #define NV_ENC_CONFIG_VER (NVENCAPI_STRUCT_VERSION(6) | ( 1<<31 ))
1323 uint32_t reportSliceOffsets :1;
1324 uint32_t enableSubFrameWrite :1;
1325 uint32_t enableExternalMEHints :1;
1327 uint32_t enableMEOnlyMode :1;
1328 uint32_t reservedBitFields :28;
1341 uint32_t reserved [289];
1342 void* reserved2[64];
1346 #define NV_ENC_INITIALIZE_PARAMS_VER (NVENCAPI_STRUCT_VERSION(5) | ( 1<<31 ))
1357 uint32_t resetEncoder :1;
1359 uint32_t forceIDR :1;
1361 uint32_t reserved :30;
1366 #define NV_ENC_RECONFIGURE_PARAMS_VER (NVENCAPI_STRUCT_VERSION(1) | ( 1<<31 ))
1376 uint32_t reserved1[255];
1377 void* reserved2[64];
1381 #define NV_ENC_PRESET_CONFIG_VER (NVENCAPI_STRUCT_VERSION(4) | ( 1<<31 ))
1395 #define NV_ENC_H264_SEI_PAYLOAD NV_ENC_SEI_PAYLOAD
1410 uint32_t constrainedFrame :1;
1412 uint32_t sliceModeDataUpdate :1;
1414 uint32_t ltrMarkFrame :1;
1415 uint32_t ltrUseFrames :1;
1416 uint32_t reservedBitFields :28;
1433 uint32_t reserved [243];
1434 void* reserved2[62];
1449 uint32_t constrainedFrame :1;
1451 uint32_t sliceModeDataUpdate :1;
1453 uint32_t ltrMarkFrame :1;
1454 uint32_t ltrUseFrames :1;
1455 uint32_t reservedBitFields :28;
1476 uint32_t reserved2 [244];
1477 void* reserved3[61];
1484 typedef union _NV_ENC_CODEC_PIC_PARAMS
1488 uint32_t reserved[256];
1517 uint32_t reserved1[6];
1522 uint16_t meHintRefPicDist[2];
1524 uint32_t reserved3[286];
1525 void* reserved4[60];
1529 #define NV_ENC_PIC_PARAMS_VER (NVENCAPI_STRUCT_VERSION(4) | ( 1<<31 ))
1548 uint32_t reserved1[252];
1549 void* reserved2[60];
1553 #define NV_ENC_MEONLY_PARAMS_VER NVENCAPI_STRUCT_VERSION(2)
1563 uint32_t doNotWait :1;
1564 uint32_t ltrFrame :1;
1565 uint32_t reservedBitFields :30;
1583 uint32_t reserved [236];
1584 void* reserved2[64];
1588 #define NV_ENC_LOCK_BITSTREAM_VER NVENCAPI_STRUCT_VERSION(1)
1598 uint32_t doNotWait :1;
1599 uint32_t reservedBitFields :31;
1603 uint32_t reserved1[251];
1604 void* reserved2[64];
1608 #define NV_ENC_LOCK_INPUT_BUFFER_VER NVENCAPI_STRUCT_VERSION(1)
1623 uint32_t reserved1[251];
1624 void* reserved2[63];
1628 #define NV_ENC_MAP_INPUT_RESOURCE_VER NVENCAPI_STRUCT_VERSION(4)
1645 uint32_t reserved1[248];
1646 void* reserved2[62];
1650 #define NV_ENC_REGISTER_RESOURCE_VER NVENCAPI_STRUCT_VERSION(3)
1664 uint32_t sliceOffsets[16];
1666 uint32_t reserved1[233];
1667 void* reserved2[64];
1671 #define NV_ENC_STAT_VER NVENCAPI_STRUCT_VERSION(1)
1686 uint32_t reserved [250];
1687 void* reserved2[64];
1691 #define NV_ENC_SEQUENCE_PARAM_PAYLOAD_VER NVENCAPI_STRUCT_VERSION(1)
1697 typedef struct _NV_ENC_EVENT_PARAMS
1702 uint32_t reserved1[253];
1703 void* reserved2[64];
1707 #define NV_ENC_EVENT_PARAMS_VER NVENCAPI_STRUCT_VERSION(1)
1712 typedef struct _NV_ENC_OPEN_ENCODE_SESSIONEX_PARAMS
1719 uint32_t reserved1[253];
1720 void* reserved2[64];
1723 #define NV_ENC_OPEN_ENCODE_SESSION_EX_PARAMS_VER NVENCAPI_STRUCT_VERSION(1)
3101 typedef NVENCSTATUS (
NVENCAPI* PNVENCOPENENCODESESSION) (
void* device, uint32_t deviceType,
void** encoder);
3102 typedef NVENCSTATUS (
NVENCAPI* PNVENCGETENCODEGUIDCOUNT) (
void* encoder, uint32_t* encodeGUIDCount);
3103 typedef NVENCSTATUS (
NVENCAPI* PNVENCGETENCODEGUIDS) (
void* encoder,
GUID* GUIDs, uint32_t guidArraySize, uint32_t* GUIDCount);
3104 typedef NVENCSTATUS (
NVENCAPI* PNVENCGETENCODEPROFILEGUIDCOUNT) (
void* encoder,
GUID encodeGUID, uint32_t* encodeProfileGUIDCount);
3105 typedef NVENCSTATUS (
NVENCAPI* PNVENCGETENCODEPROFILEGUIDS) (
void* encoder,
GUID encodeGUID,
GUID* profileGUIDs, uint32_t guidArraySize, uint32_t* GUIDCount);
3106 typedef NVENCSTATUS (
NVENCAPI* PNVENCGETINPUTFORMATCOUNT) (
void* encoder,
GUID encodeGUID, uint32_t* inputFmtCount);
3109 typedef NVENCSTATUS (
NVENCAPI* PNVENCGETENCODEPRESETCOUNT) (
void* encoder,
GUID encodeGUID, uint32_t* encodePresetGUIDCount);
3110 typedef NVENCSTATUS (
NVENCAPI* PNVENCGETENCODEPRESETGUIDS) (
void* encoder,
GUID encodeGUID,
GUID* presetGUIDs, uint32_t guidArraySize, uint32_t* encodePresetGUIDCount);
3114 typedef NVENCSTATUS (
NVENCAPI* PNVENCDESTROYINPUTBUFFER) (
void* encoder, NV_ENC_INPUT_PTR inputBuffer);
3116 typedef NVENCSTATUS (
NVENCAPI* PNVENCDESTROYBITSTREAMBUFFER) (
void* encoder, NV_ENC_OUTPUT_PTR bitstreamBuffer);
3119 typedef NVENCSTATUS (
NVENCAPI* PNVENCUNLOCKBITSTREAM) (
void* encoder, NV_ENC_OUTPUT_PTR bitstreamBuffer);
3121 typedef NVENCSTATUS (
NVENCAPI* PNVENCUNLOCKINPUTBUFFER) (
void* encoder, NV_ENC_INPUT_PTR inputBuffer);
3127 typedef NVENCSTATUS (
NVENCAPI* PNVENCUNMAPINPUTRESOURCE) (
void* encoder, NV_ENC_INPUT_PTR mappedInputBuffer);
3129 typedef NVENCSTATUS (
NVENCAPI* PNVENCINVALIDATEREFFRAMES) (
void* encoder, uint64_t invalidRefFrameTimeStamp);
3132 typedef NVENCSTATUS (
NVENCAPI* PNVENCUNREGISTERRESOURCE) (
void* encoder, NV_ENC_REGISTERED_PTR registeredRes);
3136 typedef NVENCSTATUS (
NVENCAPI* PNVENCDESTROYMVBUFFER) (
void* encoder, NV_ENC_OUTPUT_PTR mvBuffer);
3149 typedef struct _NV_ENCODE_API_FUNCTION_LIST
3190 void* reserved2[281];
3194 #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.
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.
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 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.
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 used.
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 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...
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.
uint32_t size
[in]: Size of the bitstream buffer to be created
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.
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.
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.
Multi pass encoding optimized for maintaining frame size and works only with low latency mode...
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.
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
Multi pass encoding optimized for image quality and works only with low latency mode.
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.
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]: Specifies additional usage constraints for encoding using LTR frames from this point further...
uint32_t spsId
[in]: Specifies the SPS id of the sequence header.
HalfPel motion vector precision.
Variable bitrate mode with MinQP.
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]: Specifies additional usage constraints for encoding using LTR frames from this point further...
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.
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]: Specifies the number of LTR frames used.
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.
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.
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
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.
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.
uint16_t targetQuality
[in]: Target CQ (Constant Quality) level for VBR mode (range 0-51 with 0-automatic) ...
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...
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.