Skip to content

Commit

Permalink
Update headers from Video SDK 9.1 release
Browse files Browse the repository at this point in the history
  • Loading branch information
BtbN committed Sep 23, 2019
1 parent 9fdaf11 commit 70ced50
Show file tree
Hide file tree
Showing 5 changed files with 212 additions and 54 deletions.
6 changes: 3 additions & 3 deletions README
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FFmpeg version of headers required to interface with Nvidias codec APIs.

Corresponds to Video Codec SDK version 9.0.18.
Corresponds to Video Codec SDK version 9.1.23.

Minimum required driver versions:
Linux: 418.30 or newer
Windows: 418.81 or newer
Linux: 435.21 or newer
Windows: 436.15 or newer
2 changes: 1 addition & 1 deletion ffnvcodec.pc.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ includedir=${prefix}/include

Name: ffnvcodec
Description: FFmpeg version of Nvidia Codec SDK headers
Version: 9.0.18.2
Version: 9.1.23.0
Cflags: -I${includedir}
31 changes: 16 additions & 15 deletions include/ffnvcodec/dynlink_cuviddec.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
#endif

#define NVDECAPI_MAJOR_VERSION 9
#define NVDECAPI_MINOR_VERSION 0
#define NVDECAPI_MINOR_VERSION 1

#define NVDECAPI_VERSION (NVDECAPI_MAJOR_VERSION | (NVDECAPI_MINOR_VERSION << 24))

Expand Down Expand Up @@ -158,20 +158,21 @@ typedef enum cuvidDecodeStatus_enum
/**************************************************************************************************************/
typedef struct _CUVIDDECODECAPS
{
cudaVideoCodec eCodecType; /**< IN: cudaVideoCodec_XXX */
cudaVideoChromaFormat eChromaFormat; /**< IN: cudaVideoChromaFormat_XXX */
unsigned int nBitDepthMinus8; /**< IN: The Value "BitDepth minus 8" */
unsigned int reserved1[3]; /**< Reserved for future use - set to zero */

unsigned char bIsSupported; /**< OUT: 1 if codec supported, 0 if not supported */
unsigned char reserved2[3]; /**< Reserved for future use - set to zero */
unsigned int nMaxWidth; /**< OUT: Max supported coded width in pixels */
unsigned int nMaxHeight; /**< OUT: Max supported coded height in pixels */
cudaVideoCodec eCodecType; /**< IN: cudaVideoCodec_XXX */
cudaVideoChromaFormat eChromaFormat; /**< IN: cudaVideoChromaFormat_XXX */
unsigned int nBitDepthMinus8; /**< IN: The Value "BitDepth minus 8" */
unsigned int reserved1[3]; /**< Reserved for future use - set to zero */

unsigned char bIsSupported; /**< OUT: 1 if codec supported, 0 if not supported */
unsigned char reserved2; /**< Reserved for future use - set to zero */
unsigned short nOutputFormatMask; /**< OUT: each bit represents corresponding cudaVideoSurfaceFormat enum */
unsigned int nMaxWidth; /**< OUT: Max supported coded width in pixels */
unsigned int nMaxHeight; /**< OUT: Max supported coded height in pixels */
unsigned int nMaxMBCount; /**< OUT: Max supported macroblock count
CodedWidth*CodedHeight/256 must be <= nMaxMBCount */
unsigned short nMinWidth; /**< OUT: Min supported coded width in pixels */
unsigned short nMinHeight; /**< OUT: Min supported coded height in pixels */
unsigned int reserved3[11]; /**< Reserved for future use - set to zero */
CodedWidth*CodedHeight/256 must be <= nMaxMBCount */
unsigned short nMinWidth; /**< OUT: Min supported coded width in pixels */
unsigned short nMinHeight; /**< OUT: Min supported coded height in pixels */
unsigned int reserved3[11]; /**< Reserved for future use - set to zero */
} CUVIDDECODECAPS;

/**************************************************************************************************************/
Expand All @@ -189,7 +190,7 @@ typedef struct _CUVIDDECODECREATEINFO
tcu_ulong bitDepthMinus8; /**< IN: The value "BitDepth minus 8" */
tcu_ulong ulIntraDecodeOnly; /**< IN: Set 1 only if video has all intra frames (default value is 0). This will
optimize video memory for Intra frames only decoding. The support is limited
to specific codecs(H264 rightnow), the flag will be ignored for codecs which
to specific codecs - H264, HEVC, VP9, the flag will be ignored for codecs which
are not supported. However decoding might fail if the flag is enabled in case
of supported codecs for regular bit streams having P and/or B frames. */
tcu_ulong ulMaxWidth; /**< IN: Coded sequence max width in pixels used with reconfigure Decoder */
Expand Down
25 changes: 16 additions & 9 deletions include/ffnvcodec/dynlink_nvcuvid.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,16 @@ typedef struct
unsigned char bit_depth_luma_minus8; /**< OUT: high bit depth luma. E.g, 2 for 10-bitdepth, 4 for 12-bitdepth */
unsigned char bit_depth_chroma_minus8; /**< OUT: high bit depth chroma. E.g, 2 for 10-bitdepth, 4 for 12-bitdepth */
unsigned char min_num_decode_surfaces; /**< OUT: Minimum number of decode surfaces to be allocated for correct
decoding. The client can send this value in
ulNumDecodeSurfaces (in CUVIDDECODECREATEINFO strcuture).
If this value is used for ulNumDecodeSurfaces then it has to
also be returned to parser during sequence callback. */
decoding. The client can send this value in ulNumDecodeSurfaces
(in CUVIDDECODECREATEINFO structure).
This guarantees correct functionality and optimal video memory
usage but not necessarily the best performance, which depends on
the design of the overall application. The optimal number of
decode surfaces (in terms of performance and memory utilization)
should be decided by experimentation for each application, but it
cannot go below min_num_decode_surfaces.
If this value is used for ulNumDecodeSurfaces then it must be
returned to parser during sequence callback. */
unsigned int coded_width; /**< OUT: coded frame width in pixels */
unsigned int coded_height; /**< OUT: coded frame height in pixels */
/**
Expand Down Expand Up @@ -313,13 +319,14 @@ typedef struct _CUVIDPARSERDISPINFO

/***********************************************************************************************************************/
//! Parser callbacks
//! The parser will call these synchronously from within cuvidParseVideoData(), whenever there is seqeuence change or a picture
//! The parser will call these synchronously from within cuvidParseVideoData(), whenever there is sequence change or a picture
//! is ready to be decoded and/or displayed. First argument in functions is "void *pUserData" member of structure CUVIDSOURCEPARAMS
//! Return values from these callbacks are interpreted as:
//! PFNVIDSEQUENCECALLBACK : 0: fail, 1: suceeded, > 1: override dpb size of parser (set by CUVIDPARSERPARAMS::ulMaxNumDecodeSurfaces
//! Return values from these callbacks are interpreted as below. If the callbacks return failure, it will be propagated by
//! cuvidParseVideoData() to the application.
//! PFNVIDSEQUENCECALLBACK : 0: fail, 1: succeeded, > 1: override dpb size of parser (set by CUVIDPARSERPARAMS::ulMaxNumDecodeSurfaces
//! while creating parser)
//! PFNVIDDECODECALLBACK : 0: fail, >=1: suceeded
//! PFNVIDDISPLAYCALLBACK : 0: fail, >=1: suceeded
//! PFNVIDDECODECALLBACK : 0: fail, >=1: succeeded
//! PFNVIDDISPLAYCALLBACK : 0: fail, >=1: succeeded
/***********************************************************************************************************************/
typedef int (CUDAAPI *PFNVIDSEQUENCECALLBACK)(void *, CUVIDEOFORMAT *);
typedef int (CUDAAPI *PFNVIDDECODECALLBACK)(void *, CUVIDPICPARAMS *);
Expand Down
Loading

0 comments on commit 70ced50

Please sign in to comment.