This raises the required minimum NVIDIA display driver versions:
NVIDIA Linux display driver 378.13 or newer
NVIDIA Windows display driver 378.66 or newer
NV_ENC_BUFFER_FORMAT_YUV444=0x00001000,/**< Planar YUV [Y plane followed by U and V planes] */
NV_ENC_BUFFER_FORMAT_YUV420_10BIT=0x00010000,/**< 10 bit Semi-Planar YUV [Y plane followed by interleaved UV plane]. Each pixel of size 2 bytes. Most Significant 10 bits contain pixel data. */
NV_ENC_BUFFER_FORMAT_YUV444_10BIT=0x00100000,/**< 10 bit Planar YUV444 [Y plane followed by U and V planes]. Each pixel of size 2 bytes. Most Significant 10 bits contain pixel data. */
NV_ENC_BUFFER_FORMAT_ARGB=0x01000000,/**< 8 bit Packed A8R8G8B8 */
NV_ENC_BUFFER_FORMAT_ARGB10=0x02000000,/**< 10 bit Packed A2R10G10B10. Each pixel of size 2 bytes. Most Significant 10 bits contain pixel data. */
NV_ENC_BUFFER_FORMAT_AYUV=0x04000000,/**< 8 bit Packed A8Y8U8V8 */
NV_ENC_BUFFER_FORMAT_ABGR=0x10000000,/**< 8 bit Packed A8B8G8R8 */
NV_ENC_BUFFER_FORMAT_ABGR10=0x20000000,/**< 10 bit Packed A2B10G10R10. Each pixel of size 2 bytes. Most Significant 10 bits contain pixel data. */
NV_ENC_BUFFER_FORMAT_ARGB=0x01000000,/**< 8 bit Packed A8R8G8B8. This is a word-ordered format
whereapixelisrepresentedbya32-bitwordwithB
inthelowest8bits,Ginthenext8bits,Rinthe
8bitsafterthatandAinthehighest8bits.*/
NV_ENC_BUFFER_FORMAT_ARGB10=0x02000000,/**< 10 bit Packed A2R10G10B10. This is a word-ordered format
whereapixelisrepresentedbya32-bitwordwithB
inthelowest10bits,Ginthenext10bits,Rinthe
10bitsafterthatandAinthehighest2bits.*/
NV_ENC_BUFFER_FORMAT_AYUV=0x04000000,/**< 8 bit Packed A8Y8U8V8. This is a word-ordered format
whereapixelisrepresentedbya32-bitwordwithV
inthelowest8bits,Uinthenext8bits,Yinthe
8bitsafterthatandAinthehighest8bits.*/
NV_ENC_BUFFER_FORMAT_ABGR=0x10000000,/**< 8 bit Packed A8B8G8R8. This is a word-ordered format
whereapixelisrepresentedbya32-bitwordwithR
inthelowest8bits,Ginthenext8bits,Binthe
8bitsafterthatandAinthehighest8bits.*/
NV_ENC_BUFFER_FORMAT_ABGR10=0x20000000,/**< 10 bit Packed A2B10G10R10. This is a word-ordered format
uint32_tversion;/**< [in]: Struct version. Must be set to ::NV_ENC_CREATE_BITSTREAM_BUFFER_VER */
uint32_tsize;/**< [in]: Size of the bitstream buffer to be created */
NV_ENC_MEMORY_HEAPmemoryHeap;/**< [in]: Deprecated. Will be removed in sdk 8.0 */
uint32_tsize;/**< [in]: Deprecated. Do not use */
NV_ENC_MEMORY_HEAPmemoryHeap;/**< [in]: Deprecated. Do not use */
uint32_treserved;/**< [in]: Reserved and must be set to 0 */
NV_ENC_OUTPUT_PTRbitstreamBuffer;/**< [out]: Pointer to the output bitstream buffer */
void*bitstreamBufferPtr;/**< [out]: Reserved and should not be used */
@ -1073,14 +1108,15 @@ typedef struct _NV_ENC_QP
uint32_tzeroReorderDelay:1;/**< [in]: Set this to 1 to indicate zero latency operation (no reordering delay, num_reorder_frames=0) */
uint32_tenableNonRefP:1;/**< [in]: Set this to 1 to enable automatic insertion of non-reference P-frames (no effect if enablePTD=0) */
uint32_tstrictGOPTarget:1;/**< [in]: Set this to 1 to minimize GOP-to-GOP rate fluctuations */
uint32_taqStrength:4;/**< [in]: When AQ (Spatial) is enabled (i.e. NV_ENC_RC_PARAMS::enableAQ is set), this field is used to specify AQ strength. AQ strength scale is from 1 (low) - 15 (aggressive). If not set, strength is autoselected by driver. Currently supported only with h264 */
uint32_taqStrength:4;/**< [in]: When AQ (Spatial) is enabled (i.e. NV_ENC_RC_PARAMS::enableAQ is set), this field is used to specify AQ strength. AQ strength scale is from 1 (low) - 15 (aggressive). If not set, strength is autoselected by driver. */
uint32_treservedBitFields:16;/**< [in]: Reserved bitfields and must be set to 0 */
NV_ENC_QPminQP;/**< [in]: Specifies the minimum QP used for rate control. Client must set NV_ENC_CONFIG::enableMinQP to 1. */
NV_ENC_QPmaxQP;/**< [in]: Specifies the maximum QP used for rate control. Client must set NV_ENC_CONFIG::enableMaxQP to 1. */
NV_ENC_QPinitialRCQP;/**< [in]: Specifies the initial QP used for rate control. Client must set NV_ENC_CONFIG::enableInitialRCQP to 1. */
uint32_ttemporallayerIdxMask;/**< [in]: Specifies the temporal layers (as a bitmask) whose QPs have changed. Valid max bitmask is [2^NV_ENC_CAPS_NUM_MAX_TEMPORAL_LAYERS - 1] */
uint8_ttemporalLayerQP[8];/**< [in]: Specifies the temporal layer QPs used for rate control. Temporal layer index is used as as the array index */
uint16_ttargetQuality;/**< [in]: Target CQ (Constant Quality) level for VBR mode (range 0-51 with 0-automatic) */
uint8_ttargetQuality;/**< [in]: Target CQ (Constant Quality) level for VBR mode (range 0-51 with 0-automatic) */
uint8_ttargetQualityLSB;/**< [in]: Fractional part of target quality (as 8.8 fixed point format) */
uint16_tlookaheadDepth;/**< [in]: Maximum depth of lookahead with range 0-32 (only used if enableLookahead=1) */
uint32_thierarchicalPFrames:1;/**< [in]: Set to 1 to enable hierarchical PFrames */
uint32_thierarchicalBFrames:1;/**< [in]: Set to 1 to enable hierarchical BFrames */
uint32_toutputBufferingPeriodSEI:1;/**< [in]: Set to 1 to write SEI buffering period syntax in the bitstream */
uint32_toutputPictureTimingSEI:1;/**< [in]: Set to 1 to write SEI picture timing syntax in the bitstream */
uint32_toutputPictureTimingSEI:1;/**< [in]: Set to 1 to write SEI picture timing syntax in the bitstream. When set for following rateControlMode : NV_ENC_PARAMS_RC_CBR, NV_ENC_PARAMS_RC_CBR_LOWDELAY_HQ,
uint32_trepeatSPSPPS:1;/**< [in]: Set to 1 to enable writing of Sequence and Picture parameter for every IDR frame */
uint32_tenableVFR:1;/**< [in]: Set to 1 to enable variable frame rate. */
uint32_tenableLTR:1;/**< [in]: Currently this feature is not available and must be set to 0. Set to 1 to enable LTR support and auto-mark the first */
uint32_tenableLTR:1;/**< [in]: Set to 1 to enable LTR (Long Term Reference) frame support. LTR can be used in two modes: "LTR Trust" mode and "LTR Per Picture" mode.
uint32_tqpPrimeYZeroTransformBypassFlag:1;/**< [in]: To enable lossless encode set this to 1, set QP to 0 and RC_mode to NV_ENC_PARAMS_RC_CONSTQP and profile to HIGH_444_PREDICTIVE_PROFILE.
uint32_tseparateColourPlaneFlag;/**< [in]: Set to 1 to enable 4:4:4 separate colour planes */
uint32_tdisableDeblockingFilterIDC;/**< [in]: Specifies the deblocking filter mode. Permissible value range: [0,2] */
uint32_tnumTemporalLayers;/**< [in]: Specifies max temporal layers to be used for hierarchical coding. Valid value range is [1,::NV_ENC_CAPS_NUM_MAX_TEMPORAL_LAYERS] */
uint32_tspsId;/**< [in]: Specifies the SPS id of the sequence header. Currently reserved and must be set to 0. */
uint32_tppsId;/**< [in]: Specifies the PPS id of the picture header. Currently reserved and must be set to 0. */
uint32_tspsId;/**< [in]: Specifies the SPS id of the sequence header */
uint32_tppsId;/**< [in]: Specifies the PPS id of the picture header */
NV_ENC_H264_ADAPTIVE_TRANSFORM_MODEadaptiveTransformMode;/**< [in]: Specifies the AdaptiveTransform Mode. Check support for AdaptiveTransform mode using ::NV_ENC_CAPS_SUPPORT_ADAPTIVE_TRANSFORM caps. */
NV_ENC_H264_FMO_MODEfmoMode;/**< [in]: Specified the FMO Mode. Check support for FMO using ::NV_ENC_CAPS_SUPPORT_FMO caps. */
NV_ENC_H264_BDIRECT_MODEbdirectMode;/**< [in]: Specifies the BDirect mode. Check support for BDirect mode using ::NV_ENC_CAPS_SUPPORT_BDIRECT_MODE caps.*/
uint32_toutputBufferingPeriodSEI:1;/**< [in]: Set 1 to write SEI buffering period syntax in the bitstream */
uint32_toutputPictureTimingSEI:1;/**< [in]: Set 1 to write SEI picture timing syntax in the bitstream */
uint32_toutputAUD:1;/**< [in]: Set 1 to write Access Unit Delimiter syntax. */
uint32_tenableLTR:1;/**< [in]: Set 1 to enable use of long term reference pictures for inter prediction. */
uint32_tenableLTR:1;/**< [in]: Set to 1 to enable LTR (Long Term Reference) frame support. LTR can be used in two modes: "LTR Trust" mode and "LTR Per Picture" mode.
uint32_tdisableSPSPPS:1;/**< [in]: Set 1 to disable VPS,SPS and PPS signalling in the bitstream. */
uint32_trepeatSPSPPS:1;/**< [in]: Set 1 to output VPS,SPS and PPS for every IDR frame.*/
uint32_tenableIntraRefresh:1;/**< [in]: Set 1 to enable gradual decoder refresh or intra refresh. If the GOP structure uses B frames this will be ignored */
uint32_tintraRefreshCnt;/**< [in]: Specifies the length of intra refresh in number of frames for periodic intra refresh. This value should be smaller than intraRefreshPeriod */
uint32_tmaxNumRefFramesInDPB;/**< [in]: Specifies the maximum number of references frames in the DPB.*/
uint32_tltrNumFrames;/**< [in]: Specifies the number of LTR frames used.
uint32_tenableExternalMEHints:1;/**< [in]: Set to 1 to enable external ME hints for the current frame. For NV_ENC_INITIALIZE_PARAMS::enablePTD=1 with B frames, programming L1 hints is optional for B frames since Client doesn't know internal GOP structure.
uint32_tenableMEOnlyMode:1;/**< [in]: Set to 1 to enable ME Only Mode .*/
uint32_treservedBitFields:28;/**< [in]: Reserved bitfields and must be set to 0 */
uint32_tenableWeightedPrediction:1;/**< [in]: Set this to 1 to enable weighted prediction. Not supported if encode session is configured for B-Frames( 'frameIntervalP' in NV_ENC_CONFIG is greater than 1).*/
uint32_treservedBitFields:27;/**< [in]: Reserved bitfields and must be set to 0 */
uint32_tprivDataSize;/**< [in]: Reserved private data buffer size and must be set to 0 */
void*privData;/**< [in]: Reserved private data buffer and must be set to NULL */
NV_ENC_CONFIG*encodeConfig;/**< [in]: Specifies the advanced codec specific structure. If client has sent a valid codec config structure, it will override parameters set by the NV_ENC_INITIALIZE_PARAMS::presetGUID parameter. If set to NULL the NvEncodeAPI interface will use the NV_ENC_INITIALIZE_PARAMS::presetGUID to set the codec specific parameters.
uint32_tltrMarkFrameIdx;/**< [in]: Specifies the long term referenceframe index to use for marking this frame as LTR.*/
uint32_tltrUseFrameBitmap;/**< [in]: Specifies the the associated bitmap of LTR frame indices when encoding this frame. */
uint32_tltrUsageMode;/**< [in]: Specifies additional usage constraints for encoding using LTR frames from this point further. 0: no constraints, 1: no short term refs older than current, no previous LTR frames.*/
uint32_tltrUseFrameBitmap;/**< [in]: Specifies the the associated bitmap of LTR frame indices to use when encoding this frame. */
uint32_tltrUsageMode;/**< [in]: Not supported. Reserved for future use and must be set to 0. */
uint32_treserved[243];/**< [in]: Reserved and must be set to 0. */
void*reserved2[62];/**< [in]: Reserved and must be set to NULL. */
uint32_tltrMarkFrameIdx;/**< [in]: Specifies the long term reference frame index to use for marking this frame as LTR.*/
uint32_tltrUseFrameBitmap;/**< [in]: Specifies the associated bitmap of LTR frame indices when encoding this frame. */
uint32_tltrUsageMode;/**< [in]: Specifies additional usage constraints for encoding using LTR frames from this point further. 0: no constraints, 1: no short term refs older than current, no previous LTR frames.*/
uint32_tltrUseFrameBitmap;/**< [in]: Specifies the associated bitmap of LTR frame indices to use when encoding this frame. */
uint32_tltrUsageMode;/**< [in]: Not supported. Reserved for future use and must be set to 0. */
uint32_tseiPayloadArrayCnt;/**< [in]: Specifies the number of elements allocated in seiPayloadArray array. */
uint32_treserved;/**< [in]: Reserved and must be set to 0. */
NV_ENC_SEI_PAYLOAD*seiPayloadArray;/**< [in]: Array of SEI payloads which will be inserted for this frame. */
NV_ENC_CODEC_PIC_PARAMScodecPicParams;/**< [in]: Specifies the codec specific per-picture encoding parameters. */
NVENC_EXTERNAL_ME_HINT_COUNTS_PER_BLOCKTYPEmeHintCountsPerBlock[2];/**< [in]: Specifies the number of hint candidates per block per direction for the current frame. meHintCountsPerBlock[0] is for L0 predictors and meHintCountsPerBlock[1] is for L1 predictors.
NVENC_EXTERNAL_ME_HINT*meExternalHints;/**< [in]: Specifies the pointer to ME external hints for the current frame. The size of ME hint buffer should be equal to number of macroblocks multiplied by the total number of candidates per macroblock.
NVENC_EXTERNAL_ME_HINT*meExternalHints;/**< [in]: Specifies the pointer to ME external hints for the current frame. The size of ME hint buffer should be equal to number of macroblocks * the total number of candidates per macroblock.
uint32_treserved1[252];/**< [in]: Reserved and must be set to 0 */
void*reserved2[60];/**< [in]: Reserved and must be set to NULL */
uint32_tviewID;/**< [in]: Specifies left,right viewID if NV_ENC_CONFIG_H264_MEONLY::bStereoEnable is set.
viewIDcanbe0,1ifbStereoEnableisset,0otherwise.*/
NVENC_EXTERNAL_ME_HINT_COUNTS_PER_BLOCKTYPE
meHintCountsPerBlock[2];/**< [in]: Specifies the number of hint candidates per block for the current frame. meHintCountsPerBlock[0] is for L0 predictors.
NVENC_EXTERNAL_ME_HINT*meExternalHints;/**< [in]: Specifies the pointer to ME external hints for the current frame. The size of ME hint buffer should be equal to number of macroblocks * the total number of candidates per macroblock.
uint32_tversion;/**< [in]: Struct version. Must be set to ::NV_ENC_REGISTER_RESOURCE_VER. */
NV_ENC_INPUT_RESOURCE_TYPEresourceType;/**< [in]: Specifies the type of resource to be registered. Supported values are ::NV_ENC_INPUT_RESOURCE_TYPE_DIRECTX, ::NV_ENC_INPUT_RESOURCE_TYPE_CUDADEVICEPTR. */
NV_ENC_INPUT_RESOURCE_TYPEresourceType;/**< [in]: Specifies the type of resource to be registered.