Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package ffnvcodec for openSUSE:Factory checked in at 2021-11-06 18:13:17 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ffnvcodec (Old) and /work/SRC/openSUSE:Factory/.ffnvcodec.new.1890 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ffnvcodec" Sat Nov 6 18:13:17 2021 rev:13 rq:928990 version:11.1.5.0 Changes: -------- --- /work/SRC/openSUSE:Factory/ffnvcodec/ffnvcodec.changes 2020-11-26 23:12:02.204936532 +0100 +++ /work/SRC/openSUSE:Factory/.ffnvcodec.new.1890/ffnvcodec.changes 2021-11-06 18:13:32.512744431 +0100 @@ -1,0 +2,6 @@ +Fri Oct 29 07:50:01 UTC 2021 - Bj??rn Lie <[email protected]> + +- Update to version 11.1.5.0: + * Update headers from Video SDK 11.1 + +------------------------------------------------------------------- Old: ---- nv-codec-headers-11.0.10.0.tar.xz New: ---- nv-codec-headers-11.1.5.0.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ffnvcodec.spec ++++++ --- /var/tmp/diff_new_pack.MJ03dj/_old 2021-11-06 18:13:33.236744811 +0100 +++ /var/tmp/diff_new_pack.MJ03dj/_new 2021-11-06 18:13:33.240744813 +0100 @@ -1,7 +1,7 @@ # # spec file for package ffnvcodec # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: ffnvcodec -Version: 11.0.10.0 +Version: 11.1.5.0 Release: 0 Summary: FFmpeg version of NVIDIA codec API headers License: MIT ++++++ _service ++++++ --- /var/tmp/diff_new_pack.MJ03dj/_old 2021-11-06 18:13:33.264744825 +0100 +++ /var/tmp/diff_new_pack.MJ03dj/_new 2021-11-06 18:13:33.264744825 +0100 @@ -4,7 +4,7 @@ <param name="scm">git</param> <param name="versionformat">@PARENT_TAG@</param> <param name="versionrewrite-pattern">n([0-9\.]*)</param> - <param name="revision">n11.0.10.0</param> + <param name="revision">n11.1.5.0</param> </service> <service mode="disabled" name="recompress"> <param name="file">*.tar</param> ++++++ nv-codec-headers-11.0.10.0.tar.xz -> nv-codec-headers-11.1.5.0.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nv-codec-headers-11.0.10.0/.gitignore new/nv-codec-headers-11.1.5.0/.gitignore --- old/nv-codec-headers-11.0.10.0/.gitignore 1970-01-01 01:00:00.000000000 +0100 +++ new/nv-codec-headers-11.1.5.0/.gitignore 2021-08-03 18:13:31.000000000 +0200 @@ -0,0 +1 @@ +ffnvcodec.pc diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nv-codec-headers-11.0.10.0/README new/nv-codec-headers-11.1.5.0/README --- old/nv-codec-headers-11.0.10.0/README 2020-10-15 21:14:39.000000000 +0200 +++ new/nv-codec-headers-11.1.5.0/README 2021-08-03 18:13:31.000000000 +0200 @@ -3,5 +3,5 @@ Corresponds to Video Codec SDK version 11.0.10. Minimum required driver versions: -Linux: 455.28 or newer -Windows: 456.71 or newer +Linux: 470.57.02 or newer +Windows: 471.41 or newer diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nv-codec-headers-11.0.10.0/ffnvcodec.pc.in new/nv-codec-headers-11.1.5.0/ffnvcodec.pc.in --- old/nv-codec-headers-11.0.10.0/ffnvcodec.pc.in 2020-10-15 21:14:39.000000000 +0200 +++ new/nv-codec-headers-11.1.5.0/ffnvcodec.pc.in 2021-08-03 18:13:31.000000000 +0200 @@ -3,5 +3,5 @@ Name: ffnvcodec Description: FFmpeg version of Nvidia Codec SDK headers -Version: 11.0.10.0 +Version: 11.1.5.0 Cflags: -I${includedir} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nv-codec-headers-11.0.10.0/include/ffnvcodec/dynlink_cuda.h new/nv-codec-headers-11.1.5.0/include/ffnvcodec/dynlink_cuda.h --- old/nv-codec-headers-11.0.10.0/include/ffnvcodec/dynlink_cuda.h 2020-10-15 21:14:39.000000000 +0200 +++ new/nv-codec-headers-11.1.5.0/include/ffnvcodec/dynlink_cuda.h 2021-08-03 18:13:31.000000000 +0200 @@ -71,6 +71,7 @@ */ typedef enum CUdevice_attribute_enum { CU_DEVICE_ATTRIBUTE_CLOCK_RATE = 13, + CU_DEVICE_ATTRIBUTE_TEXTURE_ALIGNMENT = 14, CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT = 16, CU_DEVICE_ATTRIBUTE_INTEGRATED = 18, CU_DEVICE_ATTRIBUTE_CAN_MAP_HOST_MEMORY = 19, @@ -84,6 +85,7 @@ CU_DEVICE_ATTRIBUTE_ASYNC_ENGINE_COUNT = 40, CU_DEVICE_ATTRIBUTE_UNIFIED_ADDRESSING = 41, CU_DEVICE_ATTRIBUTE_PCI_DOMAIN_ID = 50, + CU_DEVICE_ATTRIBUTE_TEXTURE_PITCH_ALIGNMENT = 51, CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MAJOR = 75, CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MINOR = 76, CU_DEVICE_ATTRIBUTE_MANAGED_MEMORY = 83, @@ -361,10 +363,19 @@ typedef CUresult CUDAAPI tcuCtxDestroy_v2(CUcontext ctx); typedef CUresult CUDAAPI tcuMemAlloc_v2(CUdeviceptr *dptr, size_t bytesize); typedef CUresult CUDAAPI tcuMemAllocPitch_v2(CUdeviceptr *dptr, size_t *pPitch, size_t WidthInBytes, size_t Height, unsigned int ElementSizeBytes); +typedef CUresult CUDAAPI tcuMemAllocManaged(CUdeviceptr *dptr, size_t bytesize, unsigned int flags); typedef CUresult CUDAAPI tcuMemsetD8Async(CUdeviceptr dstDevice, unsigned char uc, size_t N, CUstream hStream); typedef CUresult CUDAAPI tcuMemFree_v2(CUdeviceptr dptr); +typedef CUresult CUDAAPI tcuMemcpy(CUdeviceptr dst, CUdeviceptr src, size_t bytesize); +typedef CUresult CUDAAPI tcuMemcpyAsync(CUdeviceptr dst, CUdeviceptr src, size_t bytesize, CUstream hStream); typedef CUresult CUDAAPI tcuMemcpy2D_v2(const CUDA_MEMCPY2D *pcopy); typedef CUresult CUDAAPI tcuMemcpy2DAsync_v2(const CUDA_MEMCPY2D *pcopy, CUstream hStream); +typedef CUresult CUDAAPI tcuMemcpyHtoD_v2(CUdeviceptr dstDevice, const void *srcHost, size_t ByteCount); +typedef CUresult CUDAAPI tcuMemcpyHtoDAsync_v2(CUdeviceptr dstDevice, const void *srcHost, size_t ByteCount, CUstream hStream); +typedef CUresult CUDAAPI tcuMemcpyDtoH_v2(void *dstHost, CUdeviceptr srcDevice, size_t ByteCount); +typedef CUresult CUDAAPI tcuMemcpyDtoHAsync_v2(void *dstHost, CUdeviceptr srcDevice, size_t ByteCount, CUstream hStream); +typedef CUresult CUDAAPI tcuMemcpyDtoD_v2(CUdeviceptr dstDevice, CUdeviceptr srcDevice, size_t ByteCount); +typedef CUresult CUDAAPI tcuMemcpyDtoDAsync_v2(CUdeviceptr dstDevice, CUdeviceptr srcDevice, size_t ByteCount, CUstream hStream); typedef CUresult CUDAAPI tcuGetErrorName(CUresult error, const char** pstr); typedef CUresult CUDAAPI tcuGetErrorString(CUresult error, const char** pstr); typedef CUresult CUDAAPI tcuCtxGetDevice(CUdevice *device); @@ -394,6 +405,7 @@ typedef CUresult CUDAAPI tcuModuleLoadData(CUmodule* module, const void* image); typedef CUresult CUDAAPI tcuModuleUnload(CUmodule hmod); typedef CUresult CUDAAPI tcuModuleGetFunction(CUfunction* hfunc, CUmodule hmod, const char* name); +typedef CUresult CUDAAPI tcuModuleGetGlobal(CUdeviceptr *dptr, size_t *bytes, CUmodule hmod, const char* name); typedef CUresult CUDAAPI tcuTexObjectCreate(CUtexObject* pTexObject, const CUDA_RESOURCE_DESC* pResDesc, const CUDA_TEXTURE_DESC* pTexDesc, const CUDA_RESOURCE_VIEW_DESC* pResViewDesc); typedef CUresult CUDAAPI tcuTexObjectDestroy(CUtexObject texObject); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nv-codec-headers-11.0.10.0/include/ffnvcodec/dynlink_cuviddec.h new/nv-codec-headers-11.1.5.0/include/ffnvcodec/dynlink_cuviddec.h --- old/nv-codec-headers-11.0.10.0/include/ffnvcodec/dynlink_cuviddec.h 2020-10-15 21:14:39.000000000 +0200 +++ new/nv-codec-headers-11.1.5.0/include/ffnvcodec/dynlink_cuviddec.h 2021-08-03 18:13:31.000000000 +0200 @@ -1,7 +1,7 @@ /* * This copyright notice applies to this header file only: * - * Copyright (c) 2010-2020 NVIDIA Corporation + * Copyright (c) 2010-2021 NVIDIA Corporation * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation @@ -41,7 +41,7 @@ #endif #define NVDECAPI_MAJOR_VERSION 11 -#define NVDECAPI_MINOR_VERSION 0 +#define NVDECAPI_MINOR_VERSION 1 #define NVDECAPI_VERSION (NVDECAPI_MAJOR_VERSION | (NVDECAPI_MINOR_VERSION << 24)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nv-codec-headers-11.0.10.0/include/ffnvcodec/dynlink_loader.h new/nv-codec-headers-11.1.5.0/include/ffnvcodec/dynlink_loader.h --- old/nv-codec-headers-11.0.10.0/include/ffnvcodec/dynlink_loader.h 2020-10-15 21:14:39.000000000 +0200 +++ new/nv-codec-headers-11.1.5.0/include/ffnvcodec/dynlink_loader.h 2021-08-03 18:13:31.000000000 +0200 @@ -150,10 +150,19 @@ tcuCtxDestroy_v2 *cuCtxDestroy; tcuMemAlloc_v2 *cuMemAlloc; tcuMemAllocPitch_v2 *cuMemAllocPitch; + tcuMemAllocManaged *cuMemAllocManaged; tcuMemsetD8Async *cuMemsetD8Async; tcuMemFree_v2 *cuMemFree; + tcuMemcpy *cuMemcpy; + tcuMemcpyAsync *cuMemcpyAsync; tcuMemcpy2D_v2 *cuMemcpy2D; tcuMemcpy2DAsync_v2 *cuMemcpy2DAsync; + tcuMemcpyHtoD_v2 *cuMemcpyHtoD; + tcuMemcpyHtoDAsync_v2 *cuMemcpyHtoDAsync; + tcuMemcpyDtoH_v2 *cuMemcpyDtoH; + tcuMemcpyDtoHAsync_v2 *cuMemcpyDtoHAsync; + tcuMemcpyDtoD_v2 *cuMemcpyDtoD; + tcuMemcpyDtoDAsync_v2 *cuMemcpyDtoDAsync; tcuGetErrorName *cuGetErrorName; tcuGetErrorString *cuGetErrorString; tcuCtxGetDevice *cuCtxGetDevice; @@ -183,6 +192,7 @@ tcuModuleLoadData *cuModuleLoadData; tcuModuleUnload *cuModuleUnload; tcuModuleGetFunction *cuModuleGetFunction; + tcuModuleGetGlobal *cuModuleGetGlobal; tcuTexObjectCreate *cuTexObjectCreate; tcuTexObjectDestroy *cuTexObjectDestroy; @@ -287,10 +297,19 @@ LOAD_SYMBOL(cuCtxDestroy, tcuCtxDestroy_v2, "cuCtxDestroy_v2"); LOAD_SYMBOL(cuMemAlloc, tcuMemAlloc_v2, "cuMemAlloc_v2"); LOAD_SYMBOL(cuMemAllocPitch, tcuMemAllocPitch_v2, "cuMemAllocPitch_v2"); + LOAD_SYMBOL(cuMemAllocManaged, tcuMemAllocManaged, "cuMemAllocManaged"); LOAD_SYMBOL(cuMemsetD8Async, tcuMemsetD8Async, "cuMemsetD8Async"); LOAD_SYMBOL(cuMemFree, tcuMemFree_v2, "cuMemFree_v2"); + LOAD_SYMBOL(cuMemcpy, tcuMemcpy, "cuMemcpy"); + LOAD_SYMBOL(cuMemcpyAsync, tcuMemcpyAsync, "cuMemcpyAsync"); LOAD_SYMBOL(cuMemcpy2D, tcuMemcpy2D_v2, "cuMemcpy2D_v2"); LOAD_SYMBOL(cuMemcpy2DAsync, tcuMemcpy2DAsync_v2, "cuMemcpy2DAsync_v2"); + LOAD_SYMBOL(cuMemcpyHtoD, tcuMemcpyHtoD_v2, "cuMemcpyHtoD_v2"); + LOAD_SYMBOL(cuMemcpyHtoDAsync, tcuMemcpyHtoDAsync_v2, "cuMemcpyHtoDAsync_v2"); + LOAD_SYMBOL(cuMemcpyDtoH, tcuMemcpyDtoH_v2, "cuMemcpyDtoH_v2"); + LOAD_SYMBOL(cuMemcpyDtoHAsync, tcuMemcpyDtoHAsync_v2, "cuMemcpyDtoHAsync_v2"); + LOAD_SYMBOL(cuMemcpyDtoD, tcuMemcpyDtoD_v2, "cuMemcpyDtoD_v2"); + LOAD_SYMBOL(cuMemcpyDtoDAsync, tcuMemcpyDtoDAsync_v2, "cuMemcpyDtoDAsync_v2"); LOAD_SYMBOL(cuGetErrorName, tcuGetErrorName, "cuGetErrorName"); LOAD_SYMBOL(cuGetErrorString, tcuGetErrorString, "cuGetErrorString"); LOAD_SYMBOL(cuCtxGetDevice, tcuCtxGetDevice, "cuCtxGetDevice"); @@ -320,6 +339,7 @@ LOAD_SYMBOL(cuModuleLoadData, tcuModuleLoadData, "cuModuleLoadData"); LOAD_SYMBOL(cuModuleUnload, tcuModuleUnload, "cuModuleUnload"); LOAD_SYMBOL(cuModuleGetFunction, tcuModuleGetFunction, "cuModuleGetFunction"); + LOAD_SYMBOL(cuModuleGetGlobal, tcuModuleGetGlobal, "cuModuleGetGlobal"); LOAD_SYMBOL(cuTexObjectCreate, tcuTexObjectCreate, "cuTexObjectCreate"); LOAD_SYMBOL(cuTexObjectDestroy, tcuTexObjectDestroy, "cuTexObjectDestroy"); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nv-codec-headers-11.0.10.0/include/ffnvcodec/dynlink_nvcuvid.h new/nv-codec-headers-11.1.5.0/include/ffnvcodec/dynlink_nvcuvid.h --- old/nv-codec-headers-11.0.10.0/include/ffnvcodec/dynlink_nvcuvid.h 2020-10-15 21:14:39.000000000 +0200 +++ new/nv-codec-headers-11.1.5.0/include/ffnvcodec/dynlink_nvcuvid.h 2021-08-03 18:13:31.000000000 +0200 @@ -1,7 +1,7 @@ /* * This copyright notice applies to this header file only: * - * Copyright (c) 2010-2020 NVIDIA Corporation + * Copyright (c) 2010-2021 NVIDIA Corporation * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nv-codec-headers-11.0.10.0/include/ffnvcodec/nvEncodeAPI.h new/nv-codec-headers-11.1.5.0/include/ffnvcodec/nvEncodeAPI.h --- old/nv-codec-headers-11.0.10.0/include/ffnvcodec/nvEncodeAPI.h 2020-10-15 21:14:39.000000000 +0200 +++ new/nv-codec-headers-11.1.5.0/include/ffnvcodec/nvEncodeAPI.h 2021-08-03 18:13:31.000000000 +0200 @@ -1,7 +1,7 @@ /* * This copyright notice applies to this header file only: * - * Copyright (c) 2010-2020 NVIDIA Corporation + * Copyright (c) 2010-2021 NVIDIA Corporation * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation @@ -116,7 +116,7 @@ typedef void* NV_ENC_CUSTREAM_PTR; /**< Pointer to CUstream*/ #define NVENCAPI_MAJOR_VERSION 11 -#define NVENCAPI_MINOR_VERSION 0 +#define NVENCAPI_MINOR_VERSION 1 #define NVENCAPI_VERSION (NVENCAPI_MAJOR_VERSION | (NVENCAPI_MINOR_VERSION << 24)) @@ -1124,6 +1124,11 @@ */ NV_ENC_CAPS_NUM_ENCODER_ENGINES, + /** + * Indicates single slice intra refresh support. + */ + NV_ENC_CAPS_SINGLE_SLICE_INTRA_REFRESH, + /** * Reserved - Not to be used by clients. */ @@ -1327,7 +1332,10 @@ NV_ENC_MULTI_PASS multiPass; /**< [in]: This flag is used to enable multi-pass encoding for a given ::NV_ENC_PARAMS_RC_MODE. This flag is not valid for H264 and HEVC MEOnly mode */ uint32_t alphaLayerBitrateRatio; /**< [in]: Specifies the ratio in which bitrate should be split between base and alpha layer. A value 'x' for this field will split the target bitrate in a ratio of x : 1 between base and alpha layer. The default split ratio is 15.*/ - uint32_t reserved[5]; + int8_t cbQPIndexOffset; /**< [in]: Specifies the value of 'chroma_qp_index_offset' in H264 / 'pps_cb_qp_offset' in HEVC.*/ + int8_t crQPIndexOffset; /**< [in]: Specifies the value of 'second_chroma_qp_index_offset' in H264 / 'pps_cr_qp_offset' in HEVC.*/ + uint16_t reserved2; + uint32_t reserved[4]; } NV_ENC_RC_PARAMS; /** macro for constructing the version field of ::_NV_ENC_RC_PARAMS */ @@ -1377,7 +1385,7 @@ /** * \struct _NVENC_EXTERNAL_ME_HINT - * External Motion Vector hint structure. + * External Motion Vector hint structure for H264 and HEVC. */ typedef struct _NVENC_EXTERNAL_ME_HINT { @@ -1439,7 +1447,10 @@ Applicable only when temporal SVC is enabled (NV_ENC_CONFIG_H264::enableTemporalSVC = 1). */ uint32_t enableScalabilityInfoSEI :1; /**< [in]: Set to 1 to enable writing of Scalability Information SEI message preceding each IDR picture in bitstream Applicable only when temporal SVC is enabled (NV_ENC_CONFIG_H264::enableTemporalSVC = 1). */ - uint32_t reservedBitFields :12; /**< [in]: Reserved bitfields and must be set to 0 */ + uint32_t singleSliceIntraRefresh : 1; /**< [in]: Set to 1 to maintain single slice in frames during intra refresh. + Check support for single slice intra refresh using ::NV_ENC_CAPS_SINGLE_SLICE_INTRA_REFRESH caps. + This flag will be ignored if the value returned for ::NV_ENC_CAPS_SINGLE_SLICE_INTRA_REFRESH caps is false. */ + uint32_t reservedBitFields : 11; /**< [in]: Reserved bitfields and must be set to 0 */ uint32_t level; /**< [in]: Specifies the encoding level. Client is recommended to set this to NV_ENC_LEVEL_AUTOSELECT in order to enable the NvEncodeAPI interface to select the correct level. */ uint32_t idrPeriod; /**< [in]: Specifies the IDR interval. If not set, this is made equal to gopLength in NV_ENC_CONFIG.Low latency application client can set IDR interval to NVENC_INFINITE_GOPLENGTH so that IDR frames are not inserted automatically. */ uint32_t separateColourPlaneFlag; /**< [in]: Set to 1 to enable 4:4:4 separate colour planes */ @@ -1535,7 +1546,10 @@ Constrained encoding works only with rectangular slices. Check support for constrained encoding using ::NV_ENC_CAPS_SUPPORT_CONSTRAINED_ENCODING caps. */ uint32_t enableAlphaLayerEncoding :1; /**< [in]: Set this to 1 to enable HEVC encode with alpha layer. */ - uint32_t reserved :15; /**< [in]: Reserved bitfields.*/ + uint32_t singleSliceIntraRefresh : 1; /**< [in]: Set this to 1 to maintain single slice frames during intra refresh. + Check support for single slice intra refresh using ::NV_ENC_CAPS_SINGLE_SLICE_INTRA_REFRESH caps. + This flag will be ignored if the value returned for ::NV_ENC_CAPS_SINGLE_SLICE_INTRA_REFRESH caps is false. */ + uint32_t reserved : 14; /**< [in]: Reserved bitfields.*/ uint32_t idrPeriod; /**< [in]: Specifies the IDR interval. If not set, this is made equal to gopLength in NV_ENC_CONFIG. Low latency application client can set IDR interval to NVENC_INFINITE_GOPLENGTH so that IDR frames are not inserted automatically. */ uint32_t intraRefreshPeriod; /**< [in]: Specifies the interval between successive intra refresh if enableIntrarefresh is set. Requires enableIntraRefresh to be set. Will be disabled if NV_ENC_CONFIG::gopLength is not set to NVENC_INFINITE_GOPLENGTH. */ @@ -1636,7 +1650,7 @@ } NV_ENC_CONFIG; /** macro for constructing the version field of ::_NV_ENC_CONFIG */ -#define NV_ENC_CONFIG_VER (NVENCAPI_STRUCT_VERSION(7) | ( 1<<31 )) +#define NV_ENC_CONFIG_VER (NVENCAPI_STRUCT_VERSION(7) | ( 1u<<31 )) /** * Tuning information of NVENC encoding (TuningInfo is not applicable to H264 and HEVC MEOnly mode). @@ -1693,12 +1707,13 @@ The NV_ENC_INITIALIZE_PARAMS::maxMEHintCountsPerBlock[0] is for L0 predictors and NV_ENC_INITIALIZE_PARAMS::maxMEHintCountsPerBlock[1] is for L1 predictors. This client must also set NV_ENC_INITIALIZE_PARAMS::enableExternalMEHints to 1. */ NV_ENC_TUNING_INFO tuningInfo; /**< [in]: Tuning Info of NVENC encoding(TuningInfo is not applicable to H264 and HEVC meonly mode). */ - uint32_t reserved [288]; /**< [in]: Reserved and must be set to 0 */ + NV_ENC_BUFFER_FORMAT bufferFormat; /**< [in]: Specifies input buffer format. Client should set input buffer format only when D3D12 interface type is used. */ + uint32_t reserved[287]; /**< [in]: Reserved and must be set to 0 */ void* reserved2[64]; /**< [in]: Reserved and must be set to NULL */ } NV_ENC_INITIALIZE_PARAMS; /** macro for constructing the version field of ::_NV_ENC_INITIALIZE_PARAMS */ -#define NV_ENC_INITIALIZE_PARAMS_VER (NVENCAPI_STRUCT_VERSION(5) | ( 1<<31 )) +#define NV_ENC_INITIALIZE_PARAMS_VER (NVENCAPI_STRUCT_VERSION(5) | ( 1u<<31 )) /** @@ -1732,7 +1747,7 @@ }NV_ENC_RECONFIGURE_PARAMS; /** macro for constructing the version field of ::_NV_ENC_RECONFIGURE_PARAMS */ -#define NV_ENC_RECONFIGURE_PARAMS_VER (NVENCAPI_STRUCT_VERSION(1) | ( 1<<31 )) +#define NV_ENC_RECONFIGURE_PARAMS_VER (NVENCAPI_STRUCT_VERSION(1) | ( 1u<<31 )) /** * \struct _NV_ENC_PRESET_CONFIG @@ -1747,7 +1762,7 @@ }NV_ENC_PRESET_CONFIG; /** macro for constructing the version field of ::_NV_ENC_PRESET_CONFIG */ -#define NV_ENC_PRESET_CONFIG_VER (NVENCAPI_STRUCT_VERSION(4) | ( 1<<31 )) +#define NV_ENC_PRESET_CONFIG_VER (NVENCAPI_STRUCT_VERSION(4) | ( 1u<<31 )) /** @@ -1919,9 +1934,9 @@ NV_ENC_PIC_STRUCT pictureStruct; /**< [in]: Specifies structure of the input picture. */ NV_ENC_PIC_TYPE pictureType; /**< [in]: Specifies input picture type. Client required to be set explicitly by the client if the client has not set NV_ENC_INITALIZE_PARAMS::enablePTD to 1 while calling NvInitializeEncoder. */ NV_ENC_CODEC_PIC_PARAMS codecPicParams; /**< [in]: Specifies the codec specific per-picture encoding parameters. */ - NVENC_EXTERNAL_ME_HINT_COUNTS_PER_BLOCKTYPE meHintCountsPerBlock[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_COUNTS_PER_BLOCKTYPE meHintCountsPerBlock[2]; /**< [in]: For H264 and Hevc, 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. The candidate count in NV_ENC_PIC_PARAMS::meHintCountsPerBlock[lx] must never exceed NV_ENC_INITIALIZE_PARAMS::maxMEHintCountsPerBlock[lx] provided during encoder initialization. */ - 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. + NVENC_EXTERNAL_ME_HINT* meExternalHints; /**< [in]: For H264 and Hevc, 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. The total number of candidates per MB per direction = 1*meHintCountsPerBlock[Lx].numCandsPerBlk16x16 + 2*meHintCountsPerBlock[Lx].numCandsPerBlk16x8 + 2*meHintCountsPerBlock[Lx].numCandsPerBlk8x8 + 4*meHintCountsPerBlock[Lx].numCandsPerBlk8x8. For frames using bidirectional ME , the total number of candidates for single macroblock is sum of total number of candidates per MB for each direction (L0 and L1) */ uint32_t reserved1[6]; /**< [in]: Reserved and must be set to 0 */ @@ -1942,7 +1957,7 @@ } NV_ENC_PIC_PARAMS; /** Macro for constructing the version field of ::_NV_ENC_PIC_PARAMS */ -#define NV_ENC_PIC_PARAMS_VER (NVENCAPI_STRUCT_VERSION(4) | ( 1<<31 )) +#define NV_ENC_PIC_PARAMS_VER (NVENCAPI_STRUCT_VERSION(4) | ( 1u<<31 )) /** @@ -2012,7 +2027,8 @@ uint32_t frameSatd; /**< [out]: Total SATD cost for whole frame. */ uint32_t ltrFrameIdx; /**< [out]: Frame index associated with this LTR frame. */ uint32_t ltrFrameBitmap; /**< [out]: Bitmap of LTR frames indices which were used for encoding this frame. Value of 0 if no LTR frames were used. */ - uint32_t reserved[13]; /**< [in]: Reserved and must be set to 0 */ + uint32_t temporalId; /**< [out]: TemporalId value of the frame when using temporalSVC encoding */ + uint32_t reserved[12]; /**< [in]: Reserved and must be set to 0 */ uint32_t intraMBCount; /**< [out]: For H264, Number of Intra MBs in the encoded frame. For HEVC, Number of Intra CTBs in the encoded frame. Supported only if _NV_ENC_LOCK_BITSTREAM::getRCStats set to 1. */ uint32_t interMBCount; /**< [out]: For H264, Number of Inter MBs in the encoded frame, includes skip MBs. For HEVC, Number of Inter CTBs in the encoded frame. Supported only if _NV_ENC_LOCK_BITSTREAM::getRCStats set to 1. */ int32_t averageMVX; /**< [out]: Average Motion Vector in X direction for the encoded frame. Supported only if _NV_ENC_LOCK_BITSTREAM::getRCStats set to 1. */ @@ -2077,6 +2093,45 @@ uint32_t target; /**< [in]: Accepted values are GL_TEXTURE_RECTANGLE and GL_TEXTURE_2D. */ } NV_ENC_INPUT_RESOURCE_OPENGL_TEX; +/** \struct NV_ENC_FENCE_POINT_D3D12 + * Fence and fence value for synchronization. + */ +typedef struct _NV_ENC_FENCE_POINT_D3D12 +{ + void* pFence; /**< [in]: Pointer to ID3D12Fence. This fence object is used for synchronization. */ + uint64_t value; /**< [in]: Fence value to reach or exceed before the GPU operation or + fence value to set the fence to, after the GPU operation. */ +} NV_ENC_FENCE_POINT_D3D12; + +/** + * \struct _NV_ENC_INPUT_RESOURCE_D3D12 + * NV_ENC_PIC_PARAMS::inputBuffer and NV_ENC_PIC_PARAMS::alphaBuffer must be a pointer to a struct of this type, + * when D3D12 interface is used + */ +typedef struct _NV_ENC_INPUT_RESOURCE_D3D12 +{ + NV_ENC_REGISTERED_PTR pInputBuffer; /**< [in]: Specifies the input surface pointer. Client must use a pointer obtained from NvEncRegisterResource() in NV_ENC_REGISTER_RESOURCE::registeredResource + when registering input surface. */ + NV_ENC_FENCE_POINT_D3D12 inputFencePoint; /**< [in]: Specifies the input fence and corresponding fence value to do GPU wait. + This fence will be used to do GPU wait until the specified fence reaches or exceeds the specified value. */ + uint32_t reserved1[16]; /**< [in]: Reserved and must be set to 0. */ + void* reserved2[16]; /**< [in]: Reserved and must be set to NULL. */ +} NV_ENC_INPUT_RESOURCE_D3D12; + +/** + * \struct _NV_ENC_OUTPUT_RESOURCE_D3D12 + * NV_ENC_PIC_PARAMS::outputBitstream and NV_ENC_LOCK_BITSTREAM::outputBitstream must be a pointer to a struct of this type, + * when D3D12 interface is used + */ +typedef struct _NV_ENC_OUTPUT_RESOURCE_D3D12 +{ + NV_ENC_REGISTERED_PTR pOutputBuffer; /**< [in]: Specifies the output buffer pointer. Client must use a pointer obtained from NvEncRegisterResource() in NV_ENC_REGISTER_RESOURCE::registeredResource + when registering output bitstream buffer */ + NV_ENC_FENCE_POINT_D3D12 outputFencePoint; /**< [in]: Specifies the output fence and corresponding fence value to set after GPU operation is finished.*/ + uint32_t reserved1[16]; /**< [in]: Reserved and must be set to 0. */ + void* reserved2[16]; /**< [in]: Reserved and must be set to NULL. */ +} NV_ENC_OUTPUT_RESOURCE_D3D12; + /** * \struct _NV_ENC_REGISTER_RESOURCE * Register a resource for future use with the Nvidia Video Encoder Interface. @@ -2108,8 +2163,15 @@ NV_ENC_REGISTERED_PTR registeredResource; /**< [out]: Registered resource handle. This should be used in future interactions with the Nvidia Video Encoder Interface. */ NV_ENC_BUFFER_FORMAT bufferFormat; /**< [in]: Buffer format of resource to be registered. */ NV_ENC_BUFFER_USAGE bufferUsage; /**< [in]: Usage of resource to be registered. */ + NV_ENC_FENCE_POINT_D3D12* pInputFencePoint; /**< [in]: Specifies the pointer to input fence and corresponding fence value to do GPU wait. + To be used only when NV_ENC_REGISTER_RESOURCE::resourceToRegister represents D3D12 surface and + NV_ENC_BUFFER_USAGE::bufferUsage is NV_ENC_INPUT_IMAGE. + This fence will be used to do GPU wait until the specified fence reaches or exceeds the specified value. */ + NV_ENC_FENCE_POINT_D3D12* pOutputFencePoint; /**< [in]: Specifies the pointer to output fence and corresponding fence value to set after GPU operation is finished. + To be used only when NV_ENC_REGISTER_RESOURCE::resourceToRegister represents D3D12 surface and + NV_ENC_BUFFER_USAGE::bufferUsage is NV_ENC_INPUT_IMAGE. */ uint32_t reserved1[247]; /**< [in]: Reserved and must be set to 0. */ - void* reserved2[62]; /**< [in]: Reserved and must be set to NULL. */ + void* reserved2[60]; /**< [in]: Reserved and must be set to NULL. */ } NV_ENC_REGISTER_RESOURCE; /** Macro for constructing the version field of ::_NV_ENC_REGISTER_RESOURCE */ @@ -3345,6 +3407,7 @@ * also true for compute (i.e. CUDA) work, provided that the previous workload using * the input resource was submitted to the default stream. * The client should not access any input buffer while they are mapped by the encoder. + * For D3D12 interface type, this function does not provide synchronization guarantee. * * \param [in] encoder * Pointer to the NvEncodeAPI interface.
