Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package ffnvcodec for openSUSE:Factory checked in at 2026-10-20 12:34:38 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ffnvcodec (Old) and /work/SRC/openSUSE:Factory/.ffnvcodec.new.3698736 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ffnvcodec" Tue Oct 20 12:34:38 2026 rev:19 rq:1385931 version:13.1.15.0 Changes: -------- --- /work/SRC/openSUSE:Factory/ffnvcodec/ffnvcodec.changes 2025-06-10 08:58:00.221349856 +0200 +++ /work/SRC/openSUSE:Factory/.ffnvcodec.new.3698736/ffnvcodec.changes 2026-10-20 12:34:53.114909802 +0200 @@ -1,0 +2,13 @@ +Sat Oct 17 16:58:11 UTC 2026 - Martin Pluskal <[email protected]> + +- Update to version 13.1.15.0: + * Bump package version for initial release + * Load nvEncodeAPI.dll for native Windows ARM64 + * Update headers for Video Codec SDK 13.1 + * Add missing CUDA functions for Video Codec SDK 13.1 interaction + * Add full set of cuMemsetAsync family of functions + * add a few missing functions + * Bump for (in-dev) 13.0.19.1 +- Drop obsolete Group tags. + +------------------------------------------------------------------- Old: ---- nv-codec-headers-13.0.19.0.tar.xz New: ---- nv-codec-headers-13.1.15.0.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ffnvcodec.spec ++++++ --- /var/tmp/diff_new_pack.l9HhJM/_old 2026-10-20 12:34:53.891942196 +0200 +++ /var/tmp/diff_new_pack.l9HhJM/_new 2026-10-20 12:34:53.892942238 +0200 @@ -1,7 +1,7 @@ # # spec file for package ffnvcodec # -# Copyright (c) 2025 SUSE LLC +# Copyright (c) 2026 SUSE LLC and contributors # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,11 +17,10 @@ Name: ffnvcodec -Version: 13.0.19.0 +Version: 13.1.15.0 Release: 0 Summary: FFmpeg version of NVIDIA codec API headers License: MIT -Group: Development/Libraries/C and C++ URL: https://git.videolan.org/?p=ffmpeg/nv-codec-headers.git Source: nv-codec-headers-%{version}.tar.xz BuildRequires: pkgconfig @@ -32,7 +31,6 @@ %package -n %{name}-devel Summary: FFmpeg version of NVIDIA codec API headers -Group: Development/Libraries/C and C++ %description -n %{name}-devel This package contains the headers required for FFmpeg to interface ++++++ _service ++++++ --- /var/tmp/diff_new_pack.l9HhJM/_old 2026-10-20 12:34:53.927943697 +0200 +++ /var/tmp/diff_new_pack.l9HhJM/_new 2026-10-20 12:34:53.930943822 +0200 @@ -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">n13.0.19.0</param> + <param name="revision">n13.1.15.0</param> <param name="changesgenerate">enable</param> </service> <service name="recompress" mode="disabled"> ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.l9HhJM/_old 2026-10-20 12:34:53.954944823 +0200 +++ /var/tmp/diff_new_pack.l9HhJM/_new 2026-10-20 12:34:53.957944948 +0200 @@ -1,6 +1,6 @@ <servicedata> <service name="tar_scm"> <param name="url">https://git.videolan.org/git/ffmpeg/nv-codec-headers.git</param> - <param name="changesrevision">e844e5b26f46bb77479f063029595293aa8f812d</param></service></servicedata> + <param name="changesrevision">0a6fba9a2820628b8103464f4c8753ee05838baa</param></service></servicedata> (No newline at EOF) ++++++ nv-codec-headers-13.0.19.0.tar.xz -> nv-codec-headers-13.1.15.0.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nv-codec-headers-13.0.19.0/README new/nv-codec-headers-13.1.15.0/README --- old/nv-codec-headers-13.0.19.0/README 2025-01-30 20:31:03.000000000 +0100 +++ new/nv-codec-headers-13.1.15.0/README 2026-07-15 01:25:14.000000000 +0200 @@ -1,7 +1,7 @@ -FFmpeg version of headers required to interface with Nvidias codec APIs. +FFmpeg version of headers required to interface with NVIDIA codec APIs. -Corresponds to Video Codec SDK version 13.0.19. +Corresponds to Video Codec SDK version 13.1.15. Minimum required driver versions: -Linux: 570.0 or newer -Windows: 570.0 or newer +Linux: 610.0 or newer +Windows: 610.0 or newer \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nv-codec-headers-13.0.19.0/ffnvcodec.pc.in new/nv-codec-headers-13.1.15.0/ffnvcodec.pc.in --- old/nv-codec-headers-13.0.19.0/ffnvcodec.pc.in 2025-01-30 20:31:03.000000000 +0100 +++ new/nv-codec-headers-13.1.15.0/ffnvcodec.pc.in 2026-07-15 01:25:14.000000000 +0200 @@ -3,5 +3,5 @@ Name: ffnvcodec Description: FFmpeg version of Nvidia Codec SDK headers -Version: 13.0.19.0 +Version: 13.1.15.0.1 Cflags: -I${includedir} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nv-codec-headers-13.0.19.0/include/ffnvcodec/dynlink_cuda.h new/nv-codec-headers-13.1.15.0/include/ffnvcodec/dynlink_cuda.h --- old/nv-codec-headers-13.0.19.0/include/ffnvcodec/dynlink_cuda.h 2025-01-30 20:31:03.000000000 +0100 +++ new/nv-codec-headers-13.1.15.0/include/ffnvcodec/dynlink_cuda.h 2026-07-15 01:25:14.000000000 +0200 @@ -65,6 +65,7 @@ typedef enum cudaError_enum { CUDA_SUCCESS = 0, + CUDA_ERROR_INVALID_VALUE = 1, CUDA_ERROR_NOT_READY = 600, CUDA_ERROR_LAUNCH_TIMEOUT = 702, CUDA_ERROR_UNKNOWN = 999 @@ -105,7 +106,19 @@ CU_AD_FORMAT_SIGNED_INT16 = 0x09, CU_AD_FORMAT_SIGNED_INT32 = 0x0a, CU_AD_FORMAT_HALF = 0x10, - CU_AD_FORMAT_FLOAT = 0x20 + CU_AD_FORMAT_FLOAT = 0x20, + CU_AD_FORMAT_NV12 = 0xb0, + CU_AD_FORMAT_P016 = 0xa1, + CU_AD_FORMAT_NV16 = 0xa2, + CU_AD_FORMAT_P216 = 0xa4, + CU_AD_FORMAT_YUV444_8BIT_SEMIPLANAR = 0xb4, + CU_AD_FORMAT_YUV444_16BIT_SEMIPLANAR = 0xb5, + CU_AD_FORMAT_UINT8_PLANAR_420 = 0x59, + CU_AD_FORMAT_UINT16_PLANAR_420 = 0x5a, + CU_AD_FORMAT_UINT8_PLANAR_422 = 0x5b, + CU_AD_FORMAT_UINT16_PLANAR_422 = 0x5c, + CU_AD_FORMAT_UINT8_PLANAR_444 = 0x5d, + CU_AD_FORMAT_UINT16_PLANAR_444 = 0x5e, } CUarray_format; typedef enum CUmemorytype_enum { @@ -367,6 +380,9 @@ unsigned int NumChannels; } CUDA_ARRAY_DESCRIPTOR; +#define CUDA_ARRAY3D_SURFACE_LDST 0x02 +#define CUDA_ARRAY3D_VIDEO_ENCODE_DECODE 0x100 + typedef struct CUDA_ARRAY3D_DESCRIPTOR_st { size_t Width; size_t Height; @@ -414,6 +430,7 @@ #define CU_TRSF_READ_AS_INTEGER 1 typedef void CUDAAPI CUstreamCallback(CUstream hStream, CUresult status, void *userdata); +typedef void CUDAAPI CUhostFn(void *userData); typedef CUresult CUDAAPI tcuInit(unsigned int Flags); typedef CUresult CUDAAPI tcuDriverGetVersion(int *driverVersion); @@ -428,6 +445,8 @@ typedef CUresult CUDAAPI tcuDeviceGetPCIBusId(char* pciBusId, int len, CUdevice dev); typedef CUresult CUDAAPI tcuDeviceComputeCapability(int *major, int *minor, CUdevice dev); typedef CUresult CUDAAPI tcuCtxCreate_v2(CUcontext *pctx, unsigned int flags, CUdevice dev); +typedef CUresult CUDAAPI tcuCtxSynchronize(void); +typedef CUresult CUDAAPI tcuCtxGetStreamPriorityRange(int *leastPriority, int *greatestPriority); typedef CUresult CUDAAPI tcuCtxGetCurrent(CUcontext *pctx); typedef CUresult CUDAAPI tcuCtxSetLimit(CUlimit limit, size_t value); typedef CUresult CUDAAPI tcuCtxPushCurrent_v2(CUcontext pctx); @@ -437,7 +456,16 @@ 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 tcuMemsetD16Async(CUdeviceptr dstDevice, unsigned short us, size_t N, CUstream hStream); +typedef CUresult CUDAAPI tcuMemsetD32Async(CUdeviceptr dstDevice, unsigned int ui, size_t N, CUstream hStream); +typedef CUresult CUDAAPI tcuMemsetD2D8Async(CUdeviceptr dstDevice, size_t dstPitch, unsigned char uc, size_t Width, size_t Height, CUstream hStream); +typedef CUresult CUDAAPI tcuMemsetD2D16Async(CUdeviceptr dstDevice, size_t dstPitch, unsigned short us, size_t Width, size_t Height, CUstream hStream); +typedef CUresult CUDAAPI tcuMemsetD2D32Async(CUdeviceptr dstDevice, size_t dstPitch, unsigned int ui, size_t Width, size_t Height, CUstream hStream); typedef CUresult CUDAAPI tcuMemFree_v2(CUdeviceptr dptr); +typedef CUresult CUDAAPI tcuMemHostAlloc(void **pp, size_t bytesize, unsigned int flags); +typedef CUresult CUDAAPI tcuMemFreeHost(void *p); +typedef CUresult CUDAAPI tcuMemAllocAsync(CUdeviceptr *dptr, size_t bytesize, CUstream hStream); +typedef CUresult CUDAAPI tcuMemFreeAsync(CUdeviceptr dptr, CUstream hStream); 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); @@ -459,6 +487,7 @@ typedef CUresult CUDAAPI tcuDevicePrimaryCtxReset(CUdevice dev); typedef CUresult CUDAAPI tcuStreamCreate(CUstream *phStream, unsigned int flags); +typedef CUresult CUDAAPI tcuStreamCreateWithPriority(CUstream *phStream, unsigned int flags, int priority); typedef CUresult CUDAAPI tcuStreamQuery(CUstream hStream); typedef CUresult CUDAAPI tcuStreamSynchronize(CUstream hStream); typedef CUresult CUDAAPI tcuStreamDestroy_v2(CUstream hStream); @@ -471,6 +500,8 @@ typedef CUresult CUDAAPI tcuEventRecord(CUevent hEvent, CUstream hStream); typedef CUresult CUDAAPI tcuLaunchKernel(CUfunction f, unsigned int gridDimX, unsigned int gridDimY, unsigned int gridDimZ, unsigned int blockDimX, unsigned int blockDimY, unsigned int blockDimZ, unsigned int sharedMemBytes, CUstream hStream, void** kernelParams, void** extra); +typedef CUresult CUDAAPI tcuLaunchHostFunc(CUstream hStream, CUhostFn *fn, void *userData); + typedef CUresult CUDAAPI tcuLinkCreate(unsigned int numOptions, CUjit_option* options, void** optionValues, CUlinkState* stateOut); typedef CUresult CUDAAPI tcuLinkAddData(CUlinkState state, CUjitInputType type, void* data, size_t size, const char* name, unsigned int numOptions, CUjit_option* options, void** optionValues); typedef CUresult CUDAAPI tcuLinkComplete(CUlinkState state, void** cubinOut, size_t* sizeOut); @@ -505,6 +536,8 @@ typedef CUresult CUDAAPI tcuArrayCreate(CUarray *pHandle, const CUDA_ARRAY_DESCRIPTOR* pAllocateArray); typedef CUresult CUDAAPI tcuArray3DCreate(CUarray *pHandle, const CUDA_ARRAY3D_DESCRIPTOR* pAllocateArray); typedef CUresult CUDAAPI tcuArrayDestroy(CUarray hArray); +typedef CUresult CUDAAPI tcuArray3DGetDescriptor(CUDA_ARRAY3D_DESCRIPTOR *pArrayDescriptor, CUarray hArray); +typedef CUresult CUDAAPI tcuArrayGetPlane(CUarray *pPlaneArray, CUarray hArray, unsigned int planeIdx); typedef CUresult CUDAAPI tcuEGLStreamProducerConnect(CUeglStreamConnection* conn, ffnv_EGLStreamKHR stream, ffnv_EGLint width, ffnv_EGLint height); typedef CUresult CUDAAPI tcuEGLStreamProducerDisconnect(CUeglStreamConnection* conn); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nv-codec-headers-13.0.19.0/include/ffnvcodec/dynlink_cuviddec.h new/nv-codec-headers-13.1.15.0/include/ffnvcodec/dynlink_cuviddec.h --- old/nv-codec-headers-13.0.19.0/include/ffnvcodec/dynlink_cuviddec.h 2025-01-30 20:31:03.000000000 +0100 +++ new/nv-codec-headers-13.1.15.0/include/ffnvcodec/dynlink_cuviddec.h 2026-07-15 01:25:14.000000000 +0200 @@ -1,7 +1,7 @@ /* * This copyright notice applies to this header file only: * - * Copyright (c) 2010-2024 NVIDIA Corporation + * Copyright (c) 2010-2026 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 13 -#define NVDECAPI_MINOR_VERSION 0 +#define NVDECAPI_MINOR_VERSION 1 #define NVDECAPI_VERSION (NVDECAPI_MAJOR_VERSION | (NVDECAPI_MINOR_VERSION << 24)) @@ -57,6 +57,15 @@ typedef void *CUvideodecoder; typedef struct _CUcontextlock_st *CUvideoctxlock; +typedef long long CUvideotimestamp; + +/********************************************************************************************/ +//! \enum cuvidMaxNumRegisterDecodeSurfaces +//! Maximum number of decode surfaces that can be registered via cuvidRegisterDecodeSurfaces +/********************************************************************************************/ +typedef enum cuvidMaxNumRegisterDecodeSurfaces_enum { + MAX_NUM_REGISTERED_DECODE_SURFACES = 32 +} cuvidMaxNumRegisterDecodeSurfaces; /*********************************************************************************/ //! \enum cudaVideoCodec @@ -85,21 +94,42 @@ cudaVideoCodec_UYVY = (('U'<<24)|('Y'<<16)|('V'<<8)|('Y')) /**< UYVY (4:2:2) */ } cudaVideoCodec; -/*********************************************************************************/ +/********************************************************************************************/ //! \enum cudaVideoSurfaceFormat -//! Video surface format enums used for output format of decoded output +//! Video surface format enums used for output format and storage layout of decoded output. //! These enums are used in CUVIDDECODECREATEINFO structure -/*********************************************************************************/ +/********************************************************************************************/ typedef enum cudaVideoSurfaceFormat_enum { - cudaVideoSurfaceFormat_NV12=0, /**< Semi-Planar YUV [Y plane followed by interleaved UV plane] */ - cudaVideoSurfaceFormat_P016=1, /**< 16 bit Semi-Planar YUV [Y plane followed by interleaved UV plane]. - Can be used for 10 bit(6LSB bits 0), 12 bit (4LSB bits 0) */ - cudaVideoSurfaceFormat_YUV444=2, /**< Planar YUV [Y plane followed by U and V planes] */ - cudaVideoSurfaceFormat_YUV444_16Bit=3, /**< 16 bit Planar YUV [Y plane followed by U and V planes]. - Can be used for 10 bit(6LSB bits 0), 12 bit (4LSB bits 0) */ - cudaVideoSurfaceFormat_NV16=4, /**< Semi-Planar YUV 422 [Y plane followed by interleaved UV plane] */ - cudaVideoSurfaceFormat_P216=5 /**< 16 bit Semi-Planar YUV 422[Y plane followed by interleaved UV plane]. - Can be used for 10 bit(6LSB bits 0), 12 bit (4LSB bits 0) */ + cudaVideoSurfaceFormat_NV12=0, /**< Semi-Planar YUV [Y plane followed by interleaved UV plane] + with pitched linear storage layout of pixels. */ + cudaVideoSurfaceFormat_P016=1, /**< 16 bit Semi-Planar YUV [Y plane followed by interleaved UV plane] + with pitched linear storage layout of pixels. + Can be used for 10 bit(6LSB bits 0), 12 bit (4LSB bits 0) */ + cudaVideoSurfaceFormat_YUV444=2, /**< Planar YUV [Y plane followed by U and V planes] + with pitched linear storage layout of pixels. */ + cudaVideoSurfaceFormat_YUV444_16Bit=3, /**< 16 bit Planar YUV [Y plane followed by U and V planes] + with pitched linear storage layout of pixels. + Can be used for 10 bit(6LSB bits 0), 12 bit (4LSB bits 0) */ + cudaVideoSurfaceFormat_NV16=4, /**< Semi-Planar YUV 422 [Y plane followed by interleaved UV plane] + with pitched linear storage layout of pixels. */ + cudaVideoSurfaceFormat_P216=5, /**< 16 bit Semi-Planar YUV 422[Y plane followed by interleaved UV plane] + with pitched linear storage layout of pixels. + Can be used for 10 bit(6LSB bits 0), 12 bit (4LSB bits 0) */ + cudaVideoSurfaceFormat_NV12_Opaque=6, /**< Semi-Planar YUV [Y plane followed by interleaved UV plane] + with opaque storage layout of pixels in memory allocated as CUDA array. */ + cudaVideoSurfaceFormat_P016_Opaque=7, /**< 16 bit Semi-Planar YUV [Y plane followed by interleaved UV plane] + with opaque storage layout of pixels in memory allocated as CUDA array. + Can be used for 10 bit(6LSB bits 0), 12 bit (4LSB bits 0) */ + cudaVideoSurfaceFormat_YUV444_Opaque=8, /**< Semi-Planar YUV [Y plane followed by U and V planes] + with opaque storage layout of pixels in memory allocated as CUDA array. */ + cudaVideoSurfaceFormat_YUV444_16Bit_Opaque=9, /**< 16 bit Semi-Planar YUV [Y plane followed by U and V planes] + with opaque storage layout of pixels in memory allocated as CUDA array. + Can be used for 10 bit(6LSB bits 0), 12 bit (4LSB bits 0) */ + cudaVideoSurfaceFormat_NV16_Opaque=10, /**< Semi-Planar YUV 422 [Y plane followed by interleaved UV plane] + with opaque storage layout of pixels in memory allocated as CUDA array. */ + cudaVideoSurfaceFormat_P216_Opaque=11 /**< 16 bit Semi-Planar YUV 422[Y plane followed by interleaved UV plane] + with opaque storage layout of pixels in memory allocated as CUDA array. + Can be used for 10 bit(6LSB bits 0), 12 bit (4LSB bits 0) */ } cudaVideoSurfaceFormat; /******************************************************************************************************************/ @@ -156,6 +186,63 @@ } cuvidDecodeStatus; /**************************************************************************************************************/ +//! \struct CUVIDDECODESTATSHEADER; +//! This structure contains header information related to the decode stats buffer of a frame +/**************************************************************************************************************/ +typedef struct _CUVIDDECODESTATSHEADER +{ + unsigned char bIsStatsPresent : 1; // Flag to indicate whether decode stats dump is present or not. + unsigned char bIsMV1Valid : 1; // Flag to indicate if MV1 is valid (set to 1 if valid) + unsigned char reserved1 : 6; // Reserved : shall be set to 0 + unsigned char reserved2[3]; // Reserved : shall be set to 0 + unsigned int mbCount; // Total number of 16x16 blocks in current frame + unsigned int size; // Size of decode stats data of all blocks (for sanity check) + unsigned int reserved3[5]; // Reserved : shall be set to 0 +} CUVIDDECODESTATSHEADER; + +/**************************************************************************************************************/ +//! \struct CUVIDDECODESTATS; +//! This structure contains per 16x16 block decode statistics data. +//! The decode stats buffer contains one such structure per 16x16 block. +//! The data in the main buffer has one CUVIDDECODESTATSHEADER followed by 16x16 block data saved in +//! raster scan order. +/**************************************************************************************************************/ +typedef struct _CUVIDDECODESTATS +{ + unsigned char qp_luma; /**< Quantization Parameter for luma component. + For H.264/HEVC: QP'Y + Bitdepth-QP-ScaleFactor + Bitdepth-QP-ScaleFactor = 0 for 8-bit content + = 12 for 10-bit content + = 24 for 12-bit content */ + unsigned char qp_invalid : 1; /**< 0: Qp Valid, 1: QP is invalid */ + unsigned char cu_type : 3; /**< Coding Unit type: + 0: Intra-coded block + 1: Inter-coded block + 2: Skip block + 3: PCM block + 7: Invalid block */ + unsigned char reserved1 : 4; /**< Reserved for alignment/future use, set to zero */ + unsigned char reserved2[2]; /**< Reserved for alignment/future use, set to zero */ + short mv0_x; /**< First motion vector X component. + H.264: Forward motion vector if valid, otherwise backward motion vector + HEVC : Forward motion vector */ + short mv0_y; /**< First motion vector Y component. + H.264: Forward motion vector if valid, otherwise backward motion vector + HEVC : Forward motion vector */ + short mv1_x; /**< Second motion vector X component. + H.264: Unused (set to 0) + HEVC : Backward motion vector */ + short mv1_y; /**< Second motion vector Y component. + H.264: Unused (set to 0) + HEVC : Backward motion vector */ +} CUVIDDECODESTATS; + +typedef enum cuvidDecodeFeature_enum +{ + cuvidDecodeFeature_DecStats = 0, /**< IN: enable decode stats output, if supported */ +} cuvidDecodeFeature; + +/**************************************************************************************************************/ //! \struct CUVIDDECODECAPS; //! This structure is used in cuvidGetDecoderCaps API /**************************************************************************************************************/ @@ -180,7 +267,9 @@ any post-processing like scaling, cropping, etc. is applied */ unsigned char nCounterBitDepth; /**< OUT: histogram counter bit depth */ unsigned short nMaxHistogramBins; /**< OUT: Max number of histogram bins */ - unsigned int reserved3[10]; /**< Reserved for future use - set to zero */ + unsigned char bIsDecodeStatsSupported; /**< OUT: 1 if decode statistics are supported, 0 otherwise */ + unsigned char reserved4[3]; /* Reserved for future use - set to zero */ + unsigned int reserved3[9]; /**< Reserved for future use - set to zero */ } CUVIDDECODECAPS; /**************************************************************************************************************/ @@ -218,7 +307,9 @@ cudaVideoDeinterlaceMode DeinterlaceMode; /**< IN: cudaVideoDeinterlaceMode_XXX */ tcu_ulong ulTargetWidth; /**< IN: Post-processed output width (Should be aligned to 2) */ tcu_ulong ulTargetHeight; /**< IN: Post-processed output height (Should be aligned to 2) */ - tcu_ulong ulNumOutputSurfaces; /**< IN: Maximum number of output surfaces simultaneously mapped */ + tcu_ulong ulNumOutputSurfaces; /**< IN: Maximum number of output surfaces simultaneously mapped. + Must be set to 0 when using externally allocated memory for output.*/ + CUvideoctxlock vidLock; /**< IN: If non-NULL, context lock used for synchronizing ownership of the cuda context. Needed for cudaVideoCreate_PreferCUDA decode */ /** @@ -233,9 +324,23 @@ } target_rect; tcu_ulong enableHistogram; /**< IN: enable histogram output, if supported */ - tcu_ulong Reserved2[4]; /**< Reserved for future use - set to zero */ + tcu_ulong enableDecodeFeatures; /**< IN: bitwise OR of different features in cuvidDecodeFeature*/ + tcu_ulong Reserved2[3]; /**< Reserved for future use - set to zero */ } CUVIDDECODECREATEINFO; +/**************************************************************************************************************/ +//! \struct CUVIDREGISTERDECODESURFACESINFO +//! This structure is used in cuvidRegisterDecodeSurfaces API +/**************************************************************************************************************/ +typedef struct _CUVIDREGISTERDECODESURFACESINFO +{ + unsigned int ulNumDecodeSurfaces; /**< IN: Number of decode surfaces to register */ + unsigned int reserved[31]; /**< Reserved for future use - set to zero */ + CUarray *pDecodeSurfaces; /**< IN: List of decode surfaces to register */ + CUdeviceptr *pDecodeStatsSurfaces; /**< IN: List of decode stats surfaces to register */ + void *pReserved[30]; /**< Reserved for future use - set to zero */ +} CUVIDREGISTERDECODESURFACESINFO; + /*********************************************************/ //! \struct CUVIDH264DPBENTRY //! H.264 DPB entry @@ -558,7 +663,17 @@ unsigned char log2_sao_offset_scale_luma; unsigned char log2_sao_offset_scale_chroma; unsigned char high_precision_offsets_enabled_flag; - unsigned char reserved1[10]; + + // MV-HEVC related fields + unsigned char mv_hevc_enable; + unsigned char nuh_layer_id; + unsigned char default_ref_layers_active_flag; + unsigned char NumDirectRefLayers; + unsigned char max_one_active_ref_layer_flag; + unsigned char poc_lsb_not_present_flag; + unsigned char NumActiveRefLayerPics0; + unsigned char NumActiveRefLayerPics1; + unsigned char reserved1[2]; // pps unsigned char dependent_slice_segments_enabled_flag; @@ -950,7 +1065,8 @@ the bitstream data buffer */ int ref_pic_flag; /**< IN: This picture is a reference picture */ int intra_pic_flag; /**< IN: This picture is entirely intra coded */ - unsigned int Reserved[30]; /**< Reserved for future use */ + CUvideotimestamp timestamp; /**< IN: Presentation time stamp */ + unsigned int Reserved[28]; /**< Reserved for future use */ // IN: Codec-specific data union { CUVIDMPEG2PICPARAMS mpeg2; /**< Also used for MPEG-1 */ @@ -966,6 +1082,26 @@ } CodecSpecific; } CUVIDPICPARAMS; +/***************************************************************************************/ +//! \struct CUVIDPROCPARAMSEXT +//! Extended processing parameters for video frame post-processing +//! This structure extends CUVIDPROCPARAMS with additional fields +//! and is used in cuvidMapVideoFrame API when certain features are required +/***************************************************************************************/ +typedef struct _CUVIDPROCPARAMSEXT +{ + unsigned int decode_stats_size; /**< OUT: Size of decode stats buffer in bytes. + When stats are present: sizeof(CUVIDDECODESTATSHEADER) + mbCount * sizeof(CUVIDDECODESTATS) + When no valid stats: 0 */ + unsigned int reserved1[31]; /**< Reserved for future use (set to zero) */ + unsigned long long *decode_stats_dptr; /**< IN: Pointer to a CUdeviceptr variable that will receive the GPU memory address + containing decode statistics. The allocated GPU buffer contains: + - CUVIDDECODESTATSHEADER (statistics header) + - Array of CUVIDDECODESTATS structures (one per 16x16 block in raster scan order) + Valid only when decode_stats_size > 0. */ + void *reserved_ptr[15]; /**< Reserved for future use (set to zero) */ +} CUVIDPROCPARAMSEXT; + /******************************************************/ //! \struct CUVIDPROCPARAMS @@ -985,12 +1121,12 @@ unsigned int raw_input_pitch; /**< IN: pitch in bytes of raw YUV input (should be aligned appropriately) */ unsigned int raw_input_format; /**< IN: Input YUV format (cudaVideoCodec_enum) */ unsigned long long raw_output_dptr; /**< IN: Output CUdeviceptr for raw YUV extensions */ - unsigned int raw_output_pitch; /**< IN: pitch in bytes of raw YUV output (should be aligned appropriately) */ + unsigned int raw_output_pitch; /**< IN: pitch in bytes of raw YUV output (should be aligned to 4 bytes) */ unsigned int Reserved1; /**< Reserved for future use (set to zero) */ CUstream output_stream; /**< IN: stream object used by cuvidMapVideoFrame */ unsigned int Reserved[46]; /**< Reserved for future use (set to zero) */ unsigned long long *histogram_dptr; /**< OUT: Output CUdeviceptr for histogram extensions */ - void *Reserved2[1]; /**< Reserved for future use (set to zero) */ + CUVIDPROCPARAMSEXT *pCuvidProcExt; /**< Extension of CUVIDPROCPARAMS */ } CUVIDPROCPARAMS; /*********************************************************************************************************/ @@ -1046,7 +1182,7 @@ //! In order to minimize decode latencies, there should be always at least 2 pictures in the decode //! queue at any time, in order to make sure that all decode engines are always busy. //! -//! Overall data flow: +//! Overall data flow for output path with pitch-linear layout: //! - cuvidGetDecoderCaps(...) //! - cuvidCreateDecoder(...) //! - For each picture: @@ -1059,12 +1195,23 @@ //! + ... //! - cuvidDestroyDecoder(...) //! +//! Overall data flow for output path with opaque layout: +//! - cuvidGetDecoderCaps(...) +//! - cuvidCreateDecoder(...) +//! - cuvidRegisterDecodeSurfaces(...) +//! - For each picture: +//! + cuvidDecodePictureAsync(N, cudaStream) +//! + do some cuda processing in cudaStream +//! + cuvidDecodePictureAsync(N+1, cudaStream) +//! + ... +//! - cuvidDestroyDecoder(...) +//! //! NOTE: //! - When the cuda context is created from a D3D device, the D3D device must also be created //! with the D3DCREATE_MULTITHREADED flag. //! - There is a limit to how many pictures can be mapped simultaneously (ulNumOutputSurfaces) -//! - cuvidDecodePicture may block the calling thread if there are too many pictures pending -//! in the decode queue +//! - cuvidDecodePicture/cuvidDecodePictureAsync may block the calling thread if there are +//! too many pictures pending in the decode queue. /***********************************************************************************************************/ @@ -1094,6 +1241,20 @@ /*****************************************************************************************************/ typedef CUresult CUDAAPI tcuvidDestroyDecoder(CUvideodecoder hDecoder); +/*****************************************************************************************************************************/ +//! \fn CUresult CUDAAPI cuvidRegisterDecodeSurfaces(CUvideodecoder hDecoder, CUVIDREGISTERDECODESURFACESINFO *pDecSurfInfo) +//! Registers decode output surfaces for the decoder object based on pDecSurfInfo +/*****************************************************************************************************************************/ +typedef CUresult CUDAAPI tcuvidRegisterDecodeSurfaces(CUvideodecoder hDecoder, CUVIDREGISTERDECODESURFACESINFO *pDecSurfInfo); + +/**********************************************************************************************************************/ +//! \fn CUresult CUDAAPI cuvidDecodePictureAsync(CUvideodecoder hDecoder, CUVIDPICPARAMS *pPicParams, CUstream strm) +//! Decode a single picture (field or frame) such that the decode operation is synchronized +//! in the given CUstream object. +//! Kicks off HW decoding +/**********************************************************************************************************************/ +typedef CUresult CUDAAPI tcuvidDecodePictureAsync(CUvideodecoder hDecoder, CUVIDPICPARAMS *pPicParams, CUstream strm); + /*****************************************************************************************************/ //! \fn CUresult CUDAAPI cuvidDecodePicture(CUvideodecoder hDecoder, CUVIDPICPARAMS *pPicParams) //! Decode a single picture (field or frame) @@ -1104,7 +1265,7 @@ /************************************************************************************************************/ //! \fn CUresult CUDAAPI cuvidGetDecodeStatus(CUvideodecoder hDecoder, int nPicIdx); //! Get the decode status for frame corresponding to nPicIdx -//! API is supported for Maxwell and above generation GPUs. +//! API is supported for Turing and above generation GPUs. //! API is currently supported for HEVC, H264 and JPEG codecs. //! API returns CUDA_ERROR_NOT_SUPPORTED error code for unsupported GPU or codec. /************************************************************************************************************/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nv-codec-headers-13.0.19.0/include/ffnvcodec/dynlink_loader.h new/nv-codec-headers-13.1.15.0/include/ffnvcodec/dynlink_loader.h --- old/nv-codec-headers-13.0.19.0/include/ffnvcodec/dynlink_loader.h 2025-01-30 20:31:03.000000000 +0100 +++ new/nv-codec-headers-13.1.15.0/include/ffnvcodec/dynlink_loader.h 2026-07-15 01:25:14.000000000 +0200 @@ -50,7 +50,11 @@ # define CUDA_LIBNAME "nvcuda.dll" # define NVCUVID_LIBNAME "nvcuvid.dll" # if defined(_WIN64) || defined(__CYGWIN64__) -# define NVENC_LIBNAME "nvEncodeAPI64.dll" +# if defined(_M_ARM64) || defined(__aarch64__) +# define NVENC_LIBNAME "nvEncodeAPI.dll" +# else +# define NVENC_LIBNAME "nvEncodeAPI64.dll" +# endif # else # define NVENC_LIBNAME "nvEncodeAPI.dll" # endif @@ -149,6 +153,8 @@ tcuDeviceGetPCIBusId *cuDeviceGetPCIBusId; tcuDeviceComputeCapability *cuDeviceComputeCapability; tcuCtxCreate_v2 *cuCtxCreate; + tcuCtxSynchronize *cuCtxSynchronize; + tcuCtxGetStreamPriorityRange *cuCtxGetStreamPriorityRange; tcuCtxGetCurrent *cuCtxGetCurrent; tcuCtxSetLimit *cuCtxSetLimit; tcuCtxPushCurrent_v2 *cuCtxPushCurrent; @@ -158,7 +164,16 @@ tcuMemAllocPitch_v2 *cuMemAllocPitch; tcuMemAllocManaged *cuMemAllocManaged; tcuMemsetD8Async *cuMemsetD8Async; + tcuMemsetD16Async *cuMemsetD16Async; + tcuMemsetD32Async *cuMemsetD32Async; + tcuMemsetD2D8Async *cuMemsetD2D8Async; + tcuMemsetD2D16Async *cuMemsetD2D16Async; + tcuMemsetD2D32Async *cuMemsetD2D32Async; tcuMemFree_v2 *cuMemFree; + tcuMemHostAlloc *cuMemHostAlloc; + tcuMemFreeHost *cuMemFreeHost; + tcuMemAllocAsync *cuMemAllocAsync; + tcuMemFreeAsync *cuMemFreeAsync; tcuMemcpy *cuMemcpy; tcuMemcpyAsync *cuMemcpyAsync; tcuMemcpy2D_v2 *cuMemcpy2D; @@ -180,6 +195,7 @@ tcuDevicePrimaryCtxReset *cuDevicePrimaryCtxReset; tcuStreamCreate *cuStreamCreate; + tcuStreamCreateWithPriority *cuStreamCreateWithPriority; tcuStreamQuery *cuStreamQuery; tcuStreamSynchronize *cuStreamSynchronize; tcuStreamDestroy_v2 *cuStreamDestroy; @@ -192,6 +208,7 @@ tcuEventRecord *cuEventRecord; tcuLaunchKernel *cuLaunchKernel; + tcuLaunchHostFunc *cuLaunchHostFunc; tcuLinkCreate *cuLinkCreate; tcuLinkAddData *cuLinkAddData; tcuLinkComplete *cuLinkComplete; @@ -227,6 +244,8 @@ tcuArrayCreate *cuArrayCreate; tcuArray3DCreate *cuArray3DCreate; tcuArrayDestroy *cuArrayDestroy; + tcuArray3DGetDescriptor *cuArray3DGetDescriptor; + tcuArrayGetPlane *cuArrayGetPlane; tcuEGLStreamProducerConnect *cuEGLStreamProducerConnect; tcuEGLStreamProducerDisconnect *cuEGLStreamProducerDisconnect; @@ -250,6 +269,8 @@ tcuvidGetDecoderCaps *cuvidGetDecoderCaps; tcuvidCreateDecoder *cuvidCreateDecoder; tcuvidDestroyDecoder *cuvidDestroyDecoder; + tcuvidRegisterDecodeSurfaces *cuvidRegisterDecodeSurfaces; + tcuvidDecodePictureAsync *cuvidDecodePictureAsync; tcuvidDecodePicture *cuvidDecodePicture; tcuvidGetDecodeStatus *cuvidGetDecodeStatus; tcuvidReconfigureDecoder *cuvidReconfigureDecoder; @@ -316,6 +337,8 @@ LOAD_SYMBOL(cuDeviceGetName, tcuDeviceGetName, "cuDeviceGetName"); LOAD_SYMBOL(cuDeviceComputeCapability, tcuDeviceComputeCapability, "cuDeviceComputeCapability"); LOAD_SYMBOL(cuCtxCreate, tcuCtxCreate_v2, "cuCtxCreate_v2"); + LOAD_SYMBOL(cuCtxSynchronize, tcuCtxSynchronize, "cuCtxSynchronize"); + LOAD_SYMBOL(cuCtxGetStreamPriorityRange, tcuCtxGetStreamPriorityRange, "cuCtxGetStreamPriorityRange"); LOAD_SYMBOL(cuCtxGetCurrent, tcuCtxGetCurrent, "cuCtxGetCurrent"); LOAD_SYMBOL(cuCtxSetLimit, tcuCtxSetLimit, "cuCtxSetLimit"); LOAD_SYMBOL(cuCtxPushCurrent, tcuCtxPushCurrent_v2, "cuCtxPushCurrent_v2"); @@ -325,7 +348,16 @@ LOAD_SYMBOL(cuMemAllocPitch, tcuMemAllocPitch_v2, "cuMemAllocPitch_v2"); LOAD_SYMBOL(cuMemAllocManaged, tcuMemAllocManaged, "cuMemAllocManaged"); LOAD_SYMBOL(cuMemsetD8Async, tcuMemsetD8Async, "cuMemsetD8Async"); + LOAD_SYMBOL(cuMemsetD16Async, tcuMemsetD16Async, "cuMemsetD16Async"); + LOAD_SYMBOL(cuMemsetD32Async, tcuMemsetD32Async, "cuMemsetD32Async"); + LOAD_SYMBOL(cuMemsetD2D8Async, tcuMemsetD2D8Async, "cuMemsetD2D8Async"); + LOAD_SYMBOL(cuMemsetD2D16Async, tcuMemsetD2D16Async, "cuMemsetD2D16Async"); + LOAD_SYMBOL(cuMemsetD2D32Async, tcuMemsetD2D32Async, "cuMemsetD2D32Async"); LOAD_SYMBOL(cuMemFree, tcuMemFree_v2, "cuMemFree_v2"); + LOAD_SYMBOL(cuMemHostAlloc, tcuMemHostAlloc, "cuMemHostAlloc"); + LOAD_SYMBOL(cuMemFreeHost, tcuMemFreeHost, "cuMemFreeHost"); + LOAD_SYMBOL(cuMemAllocAsync, tcuMemAllocAsync, "cuMemAllocAsync"); + LOAD_SYMBOL(cuMemFreeAsync, tcuMemFreeAsync, "cuMemFreeAsync"); LOAD_SYMBOL(cuMemcpy, tcuMemcpy, "cuMemcpy"); LOAD_SYMBOL(cuMemcpyAsync, tcuMemcpyAsync, "cuMemcpyAsync"); LOAD_SYMBOL(cuMemcpy2D, tcuMemcpy2D_v2, "cuMemcpy2D_v2"); @@ -347,6 +379,7 @@ LOAD_SYMBOL(cuDevicePrimaryCtxReset, tcuDevicePrimaryCtxReset, "cuDevicePrimaryCtxReset"); LOAD_SYMBOL(cuStreamCreate, tcuStreamCreate, "cuStreamCreate"); + LOAD_SYMBOL(cuStreamCreateWithPriority, tcuStreamCreateWithPriority, "cuStreamCreateWithPriority"); LOAD_SYMBOL(cuStreamQuery, tcuStreamQuery, "cuStreamQuery"); LOAD_SYMBOL(cuStreamSynchronize, tcuStreamSynchronize, "cuStreamSynchronize"); LOAD_SYMBOL(cuStreamDestroy, tcuStreamDestroy_v2, "cuStreamDestroy_v2"); @@ -359,6 +392,7 @@ LOAD_SYMBOL(cuEventRecord, tcuEventRecord, "cuEventRecord"); LOAD_SYMBOL(cuLaunchKernel, tcuLaunchKernel, "cuLaunchKernel"); + LOAD_SYMBOL(cuLaunchHostFunc, tcuLaunchHostFunc, "cuLaunchHostFunc"); LOAD_SYMBOL(cuLinkCreate, tcuLinkCreate, "cuLinkCreate"); LOAD_SYMBOL(cuLinkAddData, tcuLinkAddData, "cuLinkAddData"); LOAD_SYMBOL(cuLinkComplete, tcuLinkComplete, "cuLinkComplete"); @@ -398,6 +432,8 @@ LOAD_SYMBOL(cuArrayCreate, tcuArrayCreate, "cuArrayCreate_v2"); LOAD_SYMBOL(cuArray3DCreate, tcuArray3DCreate, "cuArray3DCreate_v2"); LOAD_SYMBOL(cuArrayDestroy, tcuArrayDestroy, "cuArrayDestroy"); + LOAD_SYMBOL(cuArray3DGetDescriptor, tcuArray3DGetDescriptor, "cuArray3DGetDescriptor_v2"); + LOAD_SYMBOL_OPT(cuArrayGetPlane, tcuArrayGetPlane, "cuArrayGetPlane"); LOAD_SYMBOL_OPT(cuEGLStreamProducerConnect, tcuEGLStreamProducerConnect, "cuEGLStreamProducerConnect"); LOAD_SYMBOL_OPT(cuEGLStreamProducerDisconnect, tcuEGLStreamProducerDisconnect, "cuEGLStreamProducerDisconnect"); @@ -422,6 +458,8 @@ LOAD_SYMBOL_OPT(cuvidGetDecoderCaps, tcuvidGetDecoderCaps, "cuvidGetDecoderCaps"); LOAD_SYMBOL(cuvidCreateDecoder, tcuvidCreateDecoder, "cuvidCreateDecoder"); LOAD_SYMBOL(cuvidDestroyDecoder, tcuvidDestroyDecoder, "cuvidDestroyDecoder"); + LOAD_SYMBOL_OPT(cuvidRegisterDecodeSurfaces, tcuvidRegisterDecodeSurfaces, "cuvidRegisterDecodeSurfaces"); + LOAD_SYMBOL_OPT(cuvidDecodePictureAsync, tcuvidDecodePictureAsync, "cuvidDecodePictureAsync"); LOAD_SYMBOL(cuvidDecodePicture, tcuvidDecodePicture, "cuvidDecodePicture"); LOAD_SYMBOL(cuvidGetDecodeStatus, tcuvidGetDecodeStatus, "cuvidGetDecodeStatus"); LOAD_SYMBOL(cuvidReconfigureDecoder, tcuvidReconfigureDecoder, "cuvidReconfigureDecoder"); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nv-codec-headers-13.0.19.0/include/ffnvcodec/dynlink_nvcuvid.h new/nv-codec-headers-13.1.15.0/include/ffnvcodec/dynlink_nvcuvid.h --- old/nv-codec-headers-13.0.19.0/include/ffnvcodec/dynlink_nvcuvid.h 2025-01-30 20:31:03.000000000 +0100 +++ new/nv-codec-headers-13.1.15.0/include/ffnvcodec/dynlink_nvcuvid.h 2026-07-15 01:25:14.000000000 +0200 @@ -1,7 +1,7 @@ /* * This copyright notice applies to this header file only: * - * Copyright (c) 2010-2024 NVIDIA Corporation + * Copyright (c) 2010-2026 NVIDIA Corporation * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation @@ -51,7 +51,6 @@ typedef void *CUvideosource; typedef void *CUvideoparser; -typedef long long CUvideotimestamp; /************************************************************************/ @@ -287,7 +286,7 @@ //! \struct CUVIDAV1SEQHDR //! AV1 specific sequence header information /****************************************************************/ -typedef struct { +typedef struct _CUVIDAV1SEQHDR { unsigned int max_width; unsigned int max_height; unsigned char reserved[1016]; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nv-codec-headers-13.0.19.0/include/ffnvcodec/nvEncodeAPI.h new/nv-codec-headers-13.1.15.0/include/ffnvcodec/nvEncodeAPI.h --- old/nv-codec-headers-13.0.19.0/include/ffnvcodec/nvEncodeAPI.h 2025-01-30 20:31:03.000000000 +0100 +++ new/nv-codec-headers-13.1.15.0/include/ffnvcodec/nvEncodeAPI.h 2026-07-15 01:25:14.000000000 +0200 @@ -1,7 +1,7 @@ /* * This copyright notice applies to this header file only: * - * Copyright (c) 2010-2024 NVIDIA Corporation + * Copyright (c) 2010-2026 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 13 -#define NVENCAPI_MINOR_VERSION 0 +#define NVENCAPI_MINOR_VERSION 1 #define NVENCAPI_VERSION (NVENCAPI_MAJOR_VERSION | (NVENCAPI_MINOR_VERSION << 24)) @@ -261,8 +261,7 @@ typedef enum _NV_ENC_PARAMS_FRAME_FIELD_MODE { NV_ENC_PARAMS_FRAME_FIELD_MODE_FRAME = 0x01, /**< Frame mode */ - NV_ENC_PARAMS_FRAME_FIELD_MODE_FIELD = 0x02, /**< Field mode */ - NV_ENC_PARAMS_FRAME_FIELD_MODE_MBAFF = 0x03 /**< MB adaptive frame/field */ + NV_ENC_PARAMS_FRAME_FIELD_MODE_FIELD = 0x02 /**< Field mode */ } NV_ENC_PARAMS_FRAME_FIELD_MODE; /** @@ -325,7 +324,6 @@ NV_ENC_QP_MAP = 0x3, /**< Currently This is not supported. Value in NV_ENC_PIC_PARAMS::qpDeltaMap will be treated as QP value. */ } NV_ENC_QP_MAP_MODE; - /** * Input picture structure */ @@ -343,11 +341,11 @@ */ typedef enum _NV_ENC_DISPLAY_PIC_STRUCT { - NV_ENC_PIC_STRUCT_DISPLAY_FRAME = 0x00, /**< Field encoding top field first */ + NV_ENC_PIC_STRUCT_DISPLAY_FRAME = 0x00, /**< Progressive frame */ NV_ENC_PIC_STRUCT_DISPLAY_FIELD_TOP_BOTTOM = 0x01, /**< Field encoding top field first */ NV_ENC_PIC_STRUCT_DISPLAY_FIELD_BOTTOM_TOP = 0x02, /**< Field encoding bottom field first */ NV_ENC_PIC_STRUCT_DISPLAY_FRAME_DOUBLING = 0x03, /**< Frame doubling */ - NV_ENC_PIC_STRUCT_DISPLAY_FRAME_TRIPLING = 0x04 /**< Field tripling */ + NV_ENC_PIC_STRUCT_DISPLAY_FRAME_TRIPLING = 0x04 /**< Frame tripling */ } NV_ENC_DISPLAY_PIC_STRUCT; /** @@ -690,6 +688,8 @@ NV_ENC_PIC_FLAG_EOS = 0x8, /**< Indicates end of the input stream */ NV_ENC_PIC_FLAG_DISABLE_ENC_STATE_ADVANCE = 0x10, /**< Do not advance encoder state during encode */ NV_ENC_PIC_FLAG_OUTPUT_RECON_FRAME = 0x20, /**< Write reconstructed frame */ + NV_ENC_PIC_FLAG_PREQPDELTAMINQP = 0x40, /**< NV_ENC_RC_PARAMS::minQP values are to be applied to the pre-qpdeltamap internal RC QP values */ + NV_ENC_PIC_FLAG_PREQPDELTAMAXQP = 0x80, /**< NV_ENC_RC_PARAMS::maxQP values are to be applied to the pre-qpdeltamap internal RC QP values */ } NV_ENC_PIC_FLAGS; /** @@ -708,9 +708,21 @@ */ typedef enum _NV_ENC_BFRAME_REF_MODE { - NV_ENC_BFRAME_REF_MODE_DISABLED = 0x0, /**< B frame is not used for reference */ - NV_ENC_BFRAME_REF_MODE_EACH = 0x1, /**< Each B-frame will be used for reference */ - NV_ENC_BFRAME_REF_MODE_MIDDLE = 0x2, /**< Only(Number of B-frame)/2 th B-frame will be used for reference */ + NV_ENC_BFRAME_REF_MODE_DISABLED = 0x0, /**< B frame is not used for reference */ + NV_ENC_BFRAME_REF_MODE_EACH = 0x1, /**< Each B-frame will be used for reference */ + NV_ENC_BFRAME_REF_MODE_MIDDLE = 0x2, /**< For H.264 and HEVC, the (N/2)th B-frame will be used for reference where N = number of B-frames. + In case N is odd, the ((N-1)/2)th B-frame will be used for reference. + For AV1, every other B-frame will be used as an Altref2 reference, except the last B-frame + in the Altref interval. */ + NV_ENC_BFRAME_REF_MODE_HIERARCHICAL = 0x4, /**< Tree-like referencing structure with all B-frames used for reference except leaves. + This mode is supported only if: + * NV_ENC_INITIALIZE_PARAMS::enablePTD is set to 1 + * NV_ENC_CONFIG::frameIntervalP is in the form of 2^n for n in {0,...,5} + * NV_ENC_RC_PARAMS::enableLookahead is disabled or NV_ENC_RC_PARAMS::lookaheadLevel is set to NV_ENC_LOOKAHEAD_LEVEL_0 + * NV_ENC_RC_PARAMS::multiPass is disabled (NV_ENC_MULTI_PASS_DISABLED) + * NV_ENC_RC_PARAMS::disableIadapt and NV_ENC_RC_PARAMS::disableBadapt should be set + * NV_ENC_INITIALIZE_PARAMS::splitEncodeMode should be disabled, + either implicitly (NV_ENC_SPLIT_AUTO_MODE) or explicitly (NV_ENC_SPLIT_DISABLE_MODE)*/ } NV_ENC_BFRAME_REF_MODE; /** @@ -1137,6 +1149,7 @@ * \n 0 : B as reference is not supported. * \n 1 : each B-Frame as reference is supported. * \n 2 : only Middle B-frame as reference is supported. + * \n 4 : only Hierarchical B-frame as reference is supported. */ NV_ENC_CAPS_SUPPORT_BFRAME_REF_MODE, @@ -1441,8 +1454,10 @@ uint32_t version; /**< [in]: Struct version. */ uint32_t reserved; /**< [in]: Reserved and must be set to 0 */ NV_ENC_INPUT_PTR inputBuffer; /**< [in]: Specifies the input buffer pointer. Client must use a pointer obtained from ::NvEncCreateInputBuffer() or ::NvEncMapInputResource() APIs.*/ - 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. */ - uint32_t reserved1[63]; /**< [in]: Reserved and must be set to 0 */ + 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_INITIALIZE_PARAMS::enablePTD to 1 while calling NvEncInitializeEncoder. */ + NV_ENC_BUFFER_FORMAT bufferFmt; /**< [in]: Specifies the input buffer format. */ + uint32_t encodePicFlags; /**< [in]: Specifies bit-wise OR of encode picture flags used for the corresponding EncodePicture call. See ::NV_ENC_PIC_FLAGS enum. */ + uint32_t reserved1[61]; /**< [in]: Reserved and must be set to 0 */ void* reserved2[64]; /**< [in]: Reserved and must be set to NULL */ } NV_ENC_LOOKAHEAD_PIC_PARAMS; @@ -1640,14 +1655,14 @@ typedef struct _NV_ENC_CLOCK_TIMESTAMP_SET { - uint32_t countingType : 1; /**< [in] Specifies the 'counting_type' */ + uint32_t countingTypeLSB : 1; /**< [in] Specifies the LSB part of 'counting_type' */ uint32_t discontinuityFlag : 1; /**< [in] Specifies the 'discontinuity_flag' */ uint32_t cntDroppedFrames : 1; /**< [in] Specifies the 'cnt_dropped_flag' */ uint32_t nFrames : 8; /**< [in] Specifies the value of 'n_frames' */ uint32_t secondsValue : 6; /**< [in] Specifies the 'seconds_value' */ uint32_t minutesValue : 6; /**< [in] Specifies the 'minutes_value' */ uint32_t hoursValue : 5; /**< [in] Specifies the 'hours_value' */ - uint32_t reserved2 : 4; /**< [in] Reserved and must be set to 0 */ + uint32_t countingTypeMSB : 4; /**< [in] Specifies the MSB part of 'counting_type' */ uint32_t timeOffset; /**< [in] Specifies the 'time_offset_value' */ } NV_ENC_CLOCK_TIMESTAMP_SET; @@ -1737,9 +1752,9 @@ uint32_t chromaSampleLocationBot; /**< [in]: Specifies the chroma sample location for bottom field(as defined in Annex E of the ITU-T Specification) */ uint32_t bitstreamRestrictionFlag; /**< [in]: If set to 1, it specifies the bitstream restriction parameters are present in the bitstream.*/ uint32_t timingInfoPresentFlag; /**< [in]: If set to 1, it specifies that the timingInfo is present and the 'numUnitInTicks' and 'timeScale' fields are specified by the application. */ - /**< [in]: If not set, the timingInfo may still be present with timing related fields calculated internally basedon the frame rate specified by the application. */ + /**< [in]: If not set, the timingInfo may still be present with timing related fields calculated internally based on the frame rate specified by the application. */ uint32_t numUnitInTicks; /**< [in]: Specifies the number of time units of the clock(as defined in Annex E of the ITU-T Specification). */ - uint32_t timeScale; /**< [in]: Specifies the frquency of the clock(as defined in Annex E of the ITU-T Specification). */ + uint32_t timeScale; /**< [in]: Specifies the frequency of the clock(as defined in Annex E of the ITU-T Specification). */ uint32_t reserved[12]; /**< [in]: Reserved and must be set to 0 */ }NV_ENC_CONFIG_H264_VUI_PARAMETERS; @@ -1770,7 +1785,7 @@ { int32_t mvx : 12; /**< [in]: Specifies the x component of integer pixel MV (relative to current MB) S12.0. */ int32_t mvy : 10; /**< [in]: Specifies the y component of integer pixel MV (relative to current MB) S10.0 .*/ - int32_t refidx : 5; /**< [in]: Specifies the reference index (31=invalid). Current we support only 1 reference frame per direction for external hints, so \p refidx must be 0. */ + int32_t refidx : 5; /**< [in]: Specifies the reference index (31=invalid). Currently we support only 1 reference frame per direction for external hints, so \p refidx must be 0. */ int32_t dir : 1; /**< [in]: Specifies the direction of motion estimation . 0=L0 1=L1.*/ int32_t partType : 2; /**< [in]: Specifies the block partition type.0=16x16 1=16x8 2=8x16 3=8x8 (blocks in partition must be consecutive).*/ int32_t lastofPart : 1; /**< [in]: Set to 1 for the last MV of (sub) partition */ @@ -1814,7 +1829,7 @@ uint32_t disableSPSPPS :1; /**< [in]: Set to 1 to disable writing of Sequence and Picture parameter info in bitstream */ uint32_t outputFramePackingSEI :1; /**< [in]: Set to 1 to enable writing of frame packing arrangement SEI messages to bitstream */ uint32_t outputRecoveryPointSEI :1; /**< [in]: Set to 1 to enable writing of recovery point SEI message */ - uint32_t enableIntraRefresh :1; /**< [in]: Set to 1 to enable gradual decoder refresh or intra refresh. If the GOP structure uses B frames this will be ignored */ + uint32_t enableIntraRefresh :1; /**< [in]: Set to 1 to enable gradual decoder refresh or intra refresh. */ uint32_t enableConstrainedEncoding :1; /**< [in]: Set this to 1 to enable constrainedFrame encoding where each slice in the constrained picture is independent of other slices. Constrained encoding works only with rectangular slices. Check support for constrained encoding using ::NV_ENC_CAPS_SUPPORT_CONSTRAINED_ENCODING caps. */ @@ -1860,7 +1875,7 @@ uint32_t spsId; /**< [in]: Specifies the SPS id of the sequence header */ uint32_t ppsId; /**< [in]: Specifies the PPS id of the picture header */ NV_ENC_H264_ADAPTIVE_TRANSFORM_MODE adaptiveTransformMode; /**< [in]: Specifies the AdaptiveTransform Mode. Check support for AdaptiveTransform mode using ::NV_ENC_CAPS_SUPPORT_ADAPTIVE_TRANSFORM caps. */ - NV_ENC_H264_FMO_MODE fmoMode; /**< [in]: Specified the FMO Mode. Check support for FMO using ::NV_ENC_CAPS_SUPPORT_FMO caps. */ + NV_ENC_H264_FMO_MODE fmoMode; /**< [in]: Specifies the FMO Mode. Check support for FMO using ::NV_ENC_CAPS_SUPPORT_FMO caps. */ NV_ENC_H264_BDIRECT_MODE bdirectMode; /**< [in]: Specifies the BDirect mode. Check support for BDirect mode using ::NV_ENC_CAPS_SUPPORT_BDIRECT_MODE caps.*/ NV_ENC_H264_ENTROPY_CODING_MODE entropyCodingMode; /**< [in]: Specifies the entropy coding mode. Check support for CABAC mode using ::NV_ENC_CAPS_SUPPORT_CABAC caps. */ NV_ENC_STEREO_PACKING_MODE stereoMode; /**< [in]: Specifies the stereo frame packing mode which is to be signaled in frame packing arrangement SEI */ @@ -1891,7 +1906,7 @@ uint32_t chromaFormatIDC; /**< [in]: Specifies the chroma format. Should be set to 1 for yuv420 input, 3 for yuv444 input. Check support for YUV444 encoding using ::NV_ENC_CAPS_SUPPORT_YUV444_ENCODE caps.*/ uint32_t maxTemporalLayers; /**< [in]: Specifies the max temporal layer used for temporal SVC / hierarchical coding. - Defaut value of this field is NV_ENC_CAPS::NV_ENC_CAPS_NUM_MAX_TEMPORAL_LAYERS. Note that the value NV_ENC_CONFIG_H264::maxNumRefFrames should + Default value of this field is NV_ENC_CAPS::NV_ENC_CAPS_NUM_MAX_TEMPORAL_LAYERS. Note that the value NV_ENC_CONFIG_H264::maxNumRefFrames should be greater than or equal to (NV_ENC_CONFIG_H264::maxTemporalLayers - 2) * 2, for NV_ENC_CONFIG_H264::maxTemporalLayers >= 2.*/ NV_ENC_BFRAME_REF_MODE useBFramesAsRef; /**< [in]: Specifies the B-Frame as reference mode. Check support for useBFramesAsRef mode using ::NV_ENC_CAPS_SUPPORT_BFRAME_REF_MODE caps.*/ NV_ENC_NUM_REF_FRAMES numRefL0; /**< [in]: Specifies max number of reference frames in reference picture list L0, that can be used by hardware for prediction of a frame. @@ -1932,7 +1947,7 @@ Note that LTRs are not supported if encoding session is configured with B-frames */ uint32_t disableSPSPPS :1; /**< [in]: Set 1 to disable VPS, SPS and PPS signaling in the bitstream. */ uint32_t repeatSPSPPS :1; /**< [in]: Set 1 to output VPS,SPS and PPS for every IDR frame.*/ - uint32_t enableIntraRefresh :1; /**< [in]: Set 1 to enable gradual decoder refresh or intra refresh. If the GOP structure uses B frames this will be ignored */ + uint32_t enableIntraRefresh :1; /**< [in]: Set 1 to enable gradual decoder refresh or intra refresh. */ uint32_t chromaFormatIDC :2; /**< [in]: Specifies the chroma format. Should be set to 1 for yuv420 input, 3 for yuv444 input.*/ uint32_t reserved3 :3; /**< [in]: Reserved and must be set to 0.*/ uint32_t enableFillerDataInsertion :1; /**< [in]: Set to 1 to enable insertion of filler data in the bitstream. @@ -1960,12 +1975,14 @@ uint32_t outputHevc3DReferenceDisplayInfo :1; /**< [in]: Set to 1 to write 3D reference displays information SEI message for MVHEVC */ uint32_t outputMaxCll :1; /**< [in]: Set to 1 to write Content Light Level information SEI message for HEVC */ uint32_t outputMasteringDisplay :1; /**< [in]: Set to 1 to write Mastering displays information SEI message for HEVC */ - uint32_t reserved :7; /**< [in]: Reserved bitfields.*/ + uint32_t reserved0 :1; /**< [in]: Reserved bitfields.*/ + uint32_t enableRefPicListModification :1; /**< [in]: Enable ref pic list modification flag in PPS. */ + uint32_t reserved :5; /**< [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. */ uint32_t intraRefreshCnt; /**< [in]: Specifies the length of intra refresh in number of frames for periodic intra refresh. This value should be smaller than intraRefreshPeriod */ - uint32_t maxNumRefFramesInDPB; /**< [in]: Specifies the maximum number of references frames in the DPB.*/ + uint32_t maxNumRefFramesInDPB; /**< [in]: Specifies the maximum number of reference frames in the DPB.*/ uint32_t ltrNumFrames; /**< [in]: This parameter has different meaning in two LTR modes. In "LTR Trust" mode (ltrTrustMode = 1), encoder will mark the first ltrNumFrames base layer reference frames within each IDR interval as LTR. In "LTR Per Picture" mode (ltrTrustMode = 0 and ltrMarkFrame = 1), ltrNumFrames specifies maximum number of LTR frames in DPB. @@ -2033,7 +2050,7 @@ uint32_t numCbPoints :4; /**< [in]: Specifies the number of points for the piecewise linear scaling function of the cb component */ uint32_t numCrPoints :4; /**< [in]: Specifies the number of points for the piecewise linear scaling function of the cr component */ uint32_t arCoeffShiftMinus6 :2; /**< [in]: specifies the range of the auto-regressive coefficients */ - uint32_t grainScaleShift :2; /**< [in]: Specifies how much the Gaussian random numbers should be scaled down during the grain synthesi process */ + uint32_t grainScaleShift :2; /**< [in]: Specifies how much the Gaussian random numbers should be scaled down during the grain synthesis process */ uint32_t reserved1 :8; /**< [in]: Reserved bits field - should be set to 0 */ uint8_t pointYValue[14]; /**< [in]: pointYValue[i]: x coordinate for i-th point of luma piecewise linear scaling function. Values on a scale of 0...255 */ uint8_t pointYScaling[14]; /**< [in]: pointYScaling[i]: i-th point output value of luma piecewise linear scaling function */ @@ -2069,7 +2086,7 @@ uint32_t enableFrameIdNumbers : 1; /**< [in]: Set 1 to write Frame id numbers in bitstream */ uint32_t disableSeqHdr : 1; /**< [in]: Set 1 to disable Sequence Header signaling in the bitstream. */ uint32_t repeatSeqHdr : 1; /**< [in]: Set 1 to output Sequence Header for every Key frame.*/ - uint32_t enableIntraRefresh : 1; /**< [in]: Set 1 to enable gradual decoder refresh or intra refresh. If the GOP structure uses B frames this will be ignored */ + uint32_t enableIntraRefresh : 1; /**< [in]: Set 1 to enable gradual decoder refresh or intra refresh. */ uint32_t chromaFormatIDC : 2; /**< [in]: Specifies the chroma format. Should be set to 1 for yuv420 input (yuv444 input currently not supported).*/ uint32_t enableBitstreamPadding : 1; /**< [in]: Set 1 to enable bitstream padding. */ uint32_t enableCustomTileConfig : 1; /**< [in]: Set 1 to enable custom tile configuration: numTileColumns and numTileRows must have non zero values and tileWidths and tileHeights must point to a valid address */ @@ -2087,17 +2104,17 @@ 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. */ uint32_t intraRefreshCnt; /**< [in]: Specifies the length of intra refresh in number of frames for periodic intra refresh. This value should be smaller than intraRefreshPeriod */ - uint32_t maxNumRefFramesInDPB; /**< [in]: Specifies the maximum number of references frames in the DPB.*/ + uint32_t maxNumRefFramesInDPB; /**< [in]: Specifies the maximum number of reference frames in the DPB.*/ uint32_t numTileColumns; /**< [in]: This parameter in conjunction with the flag enableCustomTileConfig and the array tileWidths[] specifies the way in which the picture is divided into tile columns. When enableCustomTileConfig == 0, the picture will be uniformly divided into numTileColumns tile columns. If numTileColumns is not a power of 2, it will be rounded down to the next power of 2 value. If numTileColumns == 0, the picture will be coded with the smallest number of vertical tiles as allowed by standard. When enableCustomTileConfig == 1, numTileColumns must be > 0 and <= NV_MAX_TILE_COLS_AV1 and tileWidths must point to a valid array of numTileColumns entries. - Entry i specifies the width in 64x64 CTU unit of tile colum i. The sum of all the entries should be equal to the picture width in 64x64 CTU units. */ + Entry i specifies the width in 64x64 CTU unit of tile column i. The sum of all the entries should be equal to the picture width in 64x64 CTU units. */ uint32_t numTileRows; /**< [in]: This parameter in conjunction with the flag enableCustomTileConfig and the array tileHeights[] specifies the way in which the picture is divided into tiles rows When enableCustomTileConfig == 0, the picture will be uniformly divided into numTileRows tile rows. If numTileRows is not a power of 2, it will be rounded down to the next power of 2 value. If numTileRows == 0, the picture will be coded with the smallest number of horizontal tiles as allowed by standard. When enableCustomTileConfig == 1, numTileRows must be > 0 and <= NV_MAX_TILE_ROWS_AV1 and tileHeights must point to a valid array of numTileRows entries. - Entry i specifies the height in 64x64 CTU unit of tile row i. The sum of all the entries should be equal to the picture hieght in 64x64 CTU units. */ + Entry i specifies the height in 64x64 CTU unit of tile row i. The sum of all the entries should be equal to the picture height in 64x64 CTU units. */ uint32_t reserved2; /**< [in]: Reserved and must be set to 0.*/ uint32_t *tileWidths; /**< [in]: If enableCustomTileConfig == 1, tileWidths[i] specifies the width of tile column i in 64x64 CTU unit, with 0 <= i <= numTileColumns -1. */ uint32_t *tileHeights; /**< [in]: If enableCustomTileConfig == 1, tileHeights[i] specifies the height of tile row i in 64x64 CTU unit, with 0 <= i <= numTileRows -1. */ @@ -2421,7 +2438,7 @@ sliceMode = 1, sliceModeData specifies maximum # of bytes in each slice (except last slice) sliceMode = 2, sliceModeData specifies # of MB rows in each slice (except last slice) sliceMode = 3, sliceModeData specifies number of slices in the picture. Driver will divide picture into slices optimally */ - uint32_t ltrMarkFrameIdx; /**< [in]: Specifies the long term referenceframe index to use for marking this frame as LTR.*/ + uint32_t ltrMarkFrameIdx; /**< [in]: Specifies the long term reference frame index to use for marking this frame as LTR.*/ uint32_t ltrUseFrameBitmap; /**< [in]: Specifies the associated bitmap of LTR frame indices to use when encoding this frame. */ uint32_t ltrUsageMode; /**< [in]: Not supported. Reserved for future use and must be set to 0. */ uint32_t forceIntraSliceCount; /**< [in]: Specifies the number of slices to be forced to Intra in the current picture. @@ -2455,11 +2472,8 @@ uint32_t temporalConfigUpdate :1; /**< [in]: Set to 1 if client wants to change the number of temporal layers in temporal SVC encoding */ uint32_t reservedBitFields :27; /**< [in]: Reserved bit fields and must be set to 0 */ uint32_t reserved1; /**< [in]: Reserved and must be set to 0. */ - uint8_t* sliceTypeData; /**< [in]: Array which specifies the slice type used to force intra slice for a particular slice. Currently supported only for NV_ENC_CONFIG_H264::sliceMode == 3. - Client should allocate array of size sliceModeData where sliceModeData is specified in field of ::_NV_ENC_CONFIG_H264 - Array element with index n corresponds to nth slice. To force a particular slice to intra client should set corresponding array element to NV_ENC_SLICE_TYPE_I - all other array elements should be set to NV_ENC_SLICE_TYPE_DEFAULT */ - uint32_t sliceTypeArrayCnt; /**< [in]: Client should set this to the number of elements allocated in sliceTypeData array. If sliceTypeData is NULL then this should be set to 0 */ + uint8_t* sliceTypeData; /**< [in]: Deprecated. */ + uint32_t sliceTypeArrayCnt; /**< [in]: Deprecated. */ uint32_t sliceMode; /**< [in]: This parameter in conjunction with sliceModeData specifies the way in which the picture is divided into slices sliceMode = 0 CTU based slices, sliceMode = 1 Byte based slices, sliceMode = 2 CTU row based slices, sliceMode = 3, numSlices in Picture When forceIntraRefreshWithFrameCnt is set it will have priority over sliceMode setting @@ -2505,7 +2519,7 @@ uint32_t bwdFrameFlag : 1; /**< [in]: Encode frame as Backward Reference Frame. This is ignored if NV_ENC_INITIALIZE_PARAMS::enablePTD is set to 1. */ uint32_t overlayFrameFlag : 1; /**< [in]: Encode frame as overlay frame. A previously encoded frame with the same displayPOCSyntax value should be present in reference frame buffer. This is ignored if NV_ENC_INITIALIZE_PARAMS::enablePTD is set to 1. */ - uint32_t showExistingFrameFlag : 1; /**< [in]: When ovelayFrameFlag is set to 1, this flag controls the value of the show_existing_frame syntax element associated with the overlay frame. + uint32_t showExistingFrameFlag : 1; /**< [in]: When overlayFrameFlag is set to 1, this flag controls the value of the show_existing_frame syntax element associated with the overlay frame. This flag is added to the interface as a placeholder. Its value is ignored for now and always assumed to be set to 1. This is ignored if NV_ENC_INITIALIZE_PARAMS::enablePTD is set to 1. */ uint32_t errorResilientModeFlag : 1; /**< [in]: encode frame independently from previously encoded frames */ @@ -2522,12 +2536,12 @@ When enableCustomTileConfig == 0, the picture will be uniformly divided into numTileColumns tile columns. If numTileColumns is not a power of 2, it will be rounded down to the next power of 2 value. If numTileColumns == 0, the picture will be coded with the smallest number of vertical tiles as allowed by standard. When enableCustomTileConfig == 1, numTileColumns must be > 0 and <= NV_MAX_TILE_COLS_AV1 and tileWidths must point to a valid array of numTileColumns entries. - Entry i specifies the width in 64x64 CTU unit of tile colum i. The sum of all the entries should be equal to the picture width in 64x64 CTU units. */ + Entry i specifies the width in 64x64 CTU unit of tile column i. The sum of all the entries should be equal to the picture width in 64x64 CTU units. */ uint32_t numTileRows; /**< [in]: This parameter in conjunction with the flag enableCustomTileConfig and the array tileHeights[] specifies the way in which the picture is divided into tiles rows When enableCustomTileConfig == 0, the picture will be uniformly divided into numTileRows tile rows. If numTileRows is not a power of 2, it will be rounded down to the next power of 2 value. If numTileRows == 0, the picture will be coded with the smallest number of horizontal tiles as allowed by standard. When enableCustomTileConfig == 1, numTileRows must be > 0 and <= NV_MAX_TILE_ROWS_AV1 and tileHeights must point to a valid array of numTileRows entries. - Entry i specifies the height in 64x64 CTU unit of tile row i. The sum of all the entries should be equal to the picture hieght in 64x64 CTU units. */ + Entry i specifies the height in 64x64 CTU unit of tile row i. The sum of all the entries should be equal to the picture height in 64x64 CTU units. */ uint32_t reserved; /**< [in]: Reserved and must be set to 0. */ uint32_t *tileWidths; /**< [in]: If enableCustomTileConfig == 1, tileWidths[i] specifies the width of tile column i in 64x64 CTU unit, with 0 <= i <= numTileColumns -1. */ uint32_t *tileHeights; /**< [in]: If enableCustomTileConfig == 1, tileHeights[i] specifies the height of tile row i in 64x64 CTU unit, with 0 <= i <= numTileRows -1. */ @@ -2586,12 +2600,12 @@ void* completionEvent; /**< [in]: Specifies an event to be signaled on completion of encoding of this Frame [only if operating in Asynchronous mode]. Each output buffer should be associated with a distinct event pointer. */ NV_ENC_BUFFER_FORMAT bufferFmt; /**< [in]: Specifies the input buffer format. */ 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_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_INITIALIZE_PARAMS::enablePTD to 1 while calling NvEncInitializeEncoder. */ 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]: 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]: 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 + The total number of candidates per MB per direction = 1*meHintCountsPerBlock[Lx].numCandsPerBlk16x16 + 2*meHintCountsPerBlock[Lx].numCandsPerBlk16x8 + 2*meHintCountsPerBlock[Lx].numCandsPerBlk8x16 + 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 reserved2[7]; /**< [in]: Reserved and must be set to 0 */ void* reserved5[2]; /**< [in]: Reserved and must be set to NULL */ @@ -2603,9 +2617,9 @@ uint32_t qpDeltaMapSize; /**< [in]: Specifies the size in bytes of qpDeltaMap surface allocated by client and pointed to by NV_ENC_PIC_PARAMS::qpDeltaMap. Surface (array) should be picWidthInMbs * picHeightInMbs for H264, picWidthInCtbs * picHeightInCtbs for HEVC and picWidthInSbs * picHeightInSbs for AV1 */ uint32_t reservedBitFields; /**< [in]: Reserved bitfields and must be set to 0 */ - uint16_t meHintRefPicDist[2]; /**< [in]: Specifies temporal distance for reference picture (NVENC_EXTERNAL_ME_HINT::refidx = 0) used during external ME with NV_ENC_INITALIZE_PARAMS::enablePTD = 1 . meHintRefPicDist[0] is for L0 hints and meHintRefPicDist[1] is for L1 hints. - If not set, will internally infer distance of 1. Ignored for NV_ENC_INITALIZE_PARAMS::enablePTD = 0 */ - uint32_t reserved4; /**< [in]: Reserved and must be set to 0 */ + uint16_t meHintRefPicDist[2]; /**< [in]: Specifies temporal distance for reference picture (NVENC_EXTERNAL_ME_HINT::refidx = 0) used during external ME with NV_ENC_INITIALIZE_PARAMS::enablePTD = 1 . meHintRefPicDist[0] is for L0 hints and meHintRefPicDist[1] is for L1 hints. + If not set, will internally infer distance of 1. Ignored for NV_ENC_INITIALIZE_PARAMS::enablePTD = 0 */ + int32_t diffPicNumHint; /**< [in]: Difference between the current picture number and the picture number of the most likely reference picture (0 = unknown or unspecified) */ NV_ENC_INPUT_PTR alphaBuffer; /**< [in]: Specifies the input alpha buffer pointer. Client must use a pointer obtained from ::NvEncCreateInputBuffer() or ::NvEncMapInputResource() APIs. Applicable only when encoding hevc with alpha layer is enabled. */ NVENC_EXTERNAL_ME_SB_HINT *meExternalSbHints; /**< [in]: For AV1,Specifies the pointer to ME external SB hints for the current frame. The size of ME hint buffer should be equal to meSbHintsCount. */ @@ -2658,7 +2672,7 @@ meHintCountsPerBlock[2]; /**< [in]: Specifies the number of hint candidates per block for the current frame. meHintCountsPerBlock[0] is for L0 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. - The total number of candidates per MB per direction = 1*meHintCountsPerBlock[Lx].numCandsPerBlk16x16 + 2*meHintCountsPerBlock[Lx].numCandsPerBlk16x8 + 2*meHintCountsPerBlock[Lx].numCandsPerBlk8x8 + The total number of candidates per MB per direction = 1*meHintCountsPerBlock[Lx].numCandsPerBlk16x16 + 2*meHintCountsPerBlock[Lx].numCandsPerBlk16x8 + 2*meHintCountsPerBlock[Lx].numCandsPerBlk8x16 + 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[241]; /**< [in]: Reserved and must be set to 0 */ void* reserved3[59]; /**< [in]: Reserved and must be set to NULL */ @@ -2688,7 +2702,7 @@ When HEVC alpha layer encoding is enabled, this field reports the total encoded size in bytes i.e it is the encoded size of the base plus the alpha layer. For AV1 when enablePTD is set, this field reports the total encoded size in bytes of all the encoded frames packed into the current output surface i.e. show frame plus all preceding no-show frames */ uint64_t outputTimeStamp; /**< [out]: Presentation timestamp associated with the encoded output. */ - uint64_t outputDuration; /**< [out]: Presentation duration associates with the encoded output. */ + uint64_t outputDuration; /**< [out]: Presentation duration associated with the encoded output. */ void* bitstreamBufferPtr; /**< [out]: Pointer to the generated output bitstream. For MEOnly mode _NV_ENC_LOCK_BITSTREAM::bitstreamBufferPtr should be typecast to NV_ENC_H264_MV_DATA/NV_ENC_HEVC_MV_DATA pointer respectively for H264/HEVC */ @@ -2903,11 +2917,11 @@ /** * \struct _NV_ENC_SEQUENCE_PARAM_PAYLOAD - * Sequence and picture paramaters payload. + * Sequence and picture parameters payload. */ typedef struct _NV_ENC_SEQUENCE_PARAM_PAYLOAD { - uint32_t version; /**< [in]: Struct version. Must be set to ::NV_ENC_INITIALIZE_PARAMS_VER. */ + uint32_t version; /**< [in]: Struct version. Must be set to ::NV_ENC_SEQUENCE_PARAM_PAYLOAD_VER. */ uint32_t inBufferSize; /**< [in]: Specifies the size of the spsppsBuffer provided by the client */ uint32_t spsId; /**< [in]: Specifies the SPS id to be used in sequence header. Default value is 0. */ uint32_t ppsId; /**< [in]: Specifies the PPS id to be used in picture header. Default value is 0. */ @@ -2943,7 +2957,7 @@ typedef struct _NV_ENC_OPEN_ENCODE_SESSIONEX_PARAMS { uint32_t version; /**< [in]: Struct version. Must be set to ::NV_ENC_OPEN_ENCODE_SESSION_EX_PARAMS_VER. */ - NV_ENC_DEVICE_TYPE deviceType; /**< [in]: Specified the device Type */ + NV_ENC_DEVICE_TYPE deviceType; /**< [in]: Specifies the device Type */ void* device; /**< [in]: Pointer to client device. */ void* reserved; /**< [in]: Reserved and must be set to 0. */ uint32_t apiVersion; /**< [in]: API version. Should be set to NVENCAPI_VERSION. */ @@ -3233,7 +3247,7 @@ * The function returns an array of encode preset GUIDs available for a given codec. * The client can directly use one of the preset GUIDs based upon the use case * or target device. The preset GUID chosen can be directly used in - * NV_ENC_INITIALIZE_PARAMS::presetGUID parameter to ::NvEncEncodePicture() API. + * NV_ENC_INITIALIZE_PARAMS::presetGUID parameter to ::NvEncInitializeEncoder() API. * Alternately client can also use the preset GUID to retrieve the encoding config * parameters being used by NvEncodeAPI interface for that given preset, using * ::NvEncGetEncodePresetConfig() API. It can then modify preset config parameters @@ -3274,6 +3288,8 @@ /** * \brief Returns a preset config structure supported for given preset GUID. * + * NOTE : This function is not supported starting from driver version 590 (will return NV_ENC_ERR_UNSUPPORTED_PARAM) + * * The function returns a preset config structure for a given preset GUID. * NvEncGetEncodePresetConfig() API is not applicable to AV1. * Before using this function the client must enumerate the preset GUIDs available for @@ -3865,7 +3881,7 @@ * \brief Restore state of encoder * * This function is used to restore the state of encoder with state saved internally in - * state buffer corresponding to index equal to 'NV_ENC_RESTORE_ENCODER_STATE_PARAMS::bfrIndex'. + * state buffer corresponding to index equal to 'NV_ENC_RESTORE_ENCODER_STATE_PARAMS::bufferIdx'. * Client can specify the state type to be updated by specifying appropriate value in * 'NV_ENC_RESTORE_ENCODER_STATE_PARAMS::state'. The client must call this * function after all previous encodes have finished. @@ -4517,7 +4533,7 @@ * * \return * ::NV_ENC_SUCCESS \n - * ::NV_ENC_NEED_MORE_INPUT \n should we return this error is lookahead queue is not full? + * ::NV_ENC_NEED_MORE_INPUT \n * ::NV_ENC_ERR_INVALID_PTR \n * ::NV_ENC_ERR_ENCODER_NOT_INITIALIZED \n * ::NV_ENC_ERR_GENERIC \n
