Skip to content

Commit

Permalink
Update headers from Video SDK 13.0
Browse files Browse the repository at this point in the history
  • Loading branch information
BtbN committed Jan 30, 2025
1 parent 9934f17 commit e844e5b
Show file tree
Hide file tree
Showing 5 changed files with 237 additions and 73 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 12.0.16.
Corresponds to Video Codec SDK version 13.0.19.

Minimum required driver versions:
Linux: 550.54.14 or newer
Windows: 551.76 or newer
Linux: 570.0 or newer
Windows: 570.0 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: 12.2.72.1
Version: 13.0.19.0
Cflags: -I${includedir}
39 changes: 31 additions & 8 deletions include/ffnvcodec/dynlink_cuviddec.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
#endif
#endif

#define NVDECAPI_MAJOR_VERSION 12
#define NVDECAPI_MINOR_VERSION 2
#define NVDECAPI_MAJOR_VERSION 13
#define NVDECAPI_MINOR_VERSION 0

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

Expand Down Expand Up @@ -97,6 +97,9 @@ typedef enum cudaVideoSurfaceFormat_enum {
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;

/******************************************************************************************************************/
Expand Down Expand Up @@ -320,10 +323,10 @@ typedef struct _CUVIDH264PICPARAMS
int delta_pic_order_always_zero_flag;
int frame_mbs_only_flag;
int direct_8x8_inference_flag;
int num_ref_frames; // NOTE: shall meet level 4.1 restrictions
int num_ref_frames;
unsigned char residual_colour_transform_flag;
unsigned char bit_depth_luma_minus8; // Must be 0 (only 8-bit supported)
unsigned char bit_depth_chroma_minus8; // Must be 0 (only 8-bit supported)
unsigned char bit_depth_luma_minus8;
unsigned char bit_depth_chroma_minus8;
unsigned char qpprime_y_zero_transform_bypass_flag;
// PPS
int entropy_coding_mode_flag;
Expand All @@ -344,7 +347,7 @@ typedef struct _CUVIDH264PICPARAMS
int frame_num;
int CurrFieldOrderCnt[2];
// DPB
CUVIDH264DPBENTRY dpb[16]; // List of reference frames within the DPB
CUVIDH264DPBENTRY dpb[16]; // List of reference frames within the DPB
// Quantization Matrices (raster-order)
unsigned char WeightScale4x4[6][16];
unsigned char WeightScale8x8[2][64];
Expand All @@ -359,7 +362,10 @@ typedef struct _CUVIDH264PICPARAMS
unsigned long long slice_group_map_addr;
const unsigned char *pMb2SliceGroupMap;
} fmo;
unsigned int Reserved[12];
unsigned int mb_adaptive_frame_field_flag : 2; // bit 0 represent SPS flag mb_adaptive_frame_field_flag
// if bit 1 is not set, flag is ignored. Bit 1 is set to maintain backward compatibility
unsigned int Reserved1 : 30;
unsigned int Reserved[11];
// SVC/MVC
union
{
Expand Down Expand Up @@ -487,7 +493,24 @@ typedef struct _CUVIDVC1PICPARAMS
/***********************************************************/
typedef struct _CUVIDJPEGPICPARAMS
{
int Reserved;
unsigned char numComponents;
unsigned char bitDepth;
unsigned char quantizationTableSelector[4];
unsigned int scanOffset[4];
unsigned int scanSize[4];

unsigned short restartInterval;
unsigned char componentIdentifier[4];

unsigned char hasQMatrix;
unsigned char hasHuffman;
unsigned short quantvals[4][64];

unsigned char bits_ac[4][16];
unsigned char table_ac[4][256]; // there can only be max of 162 ac symbols

unsigned char bits_dc[4][16];
unsigned char table_dc[4][256]; // there can only be max of 12 dc symbols
} CUVIDJPEGPICPARAMS;


Expand Down
7 changes: 5 additions & 2 deletions include/ffnvcodec/dynlink_nvcuvid.h
Original file line number Diff line number Diff line change
Expand Up @@ -502,8 +502,11 @@ typedef struct _CUVIDPARSERPARAMS
IN: call pfnDecodePicture even if picture bitstream is fully corrupted) */
unsigned int ulMaxDisplayDelay; /**< IN: Max display queue delay (improves pipelining of decode with display)
0=no delay (recommended values: 2..4) */
unsigned int bAnnexb : 1; /**< IN: AV1 annexB stream */
unsigned int uReserved : 31; /**< Reserved for future use - set to zero */
unsigned int bAnnexb : 1; /**< IN: AV1 annexB stream */
unsigned int bMemoryOptimize : 1; /**< IN: Utilize minimum picIdx from dpb to allow memory saving at the
decoder layer, use cuvidReconfigureDecoder() to increase the
decode surfaces if needed (perf may get impacted) */
unsigned int uReserved : 30; /**< Reserved for future use - set to zero */
unsigned int uReserved1[4]; /**< IN: Reserved for future use - set to 0 */
void *pUserData; /**< IN: User data for callbacks */
PFNVIDSEQUENCECALLBACK pfnSequenceCallback; /**< IN: Called before decoding frames and/or whenever there is a fmt change */
Expand Down
Loading

0 comments on commit e844e5b

Please sign in to comment.