rocprofiler-sdk/rocdecode/details/rocparser.h File Reference

rocprofiler-sdk/rocdecode/details/rocparser.h File Reference#

Rocprofiler SDK Developer API: rocprofiler-sdk/rocdecode/details/rocparser.h File Reference
Rocprofiler SDK Developer API 0.6.0
ROCm Profiling API and tools
rocparser.h File Reference

The AMD rocParser Library. More...

+ Include dependency graph for rocparser.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  RocdecVideoFormat
 ROCDEC_VIDEO_FORMAT structUsed in Parser callback API. More...
 
struct  RocdecVideoFormatEx
 
struct  RocdecSourceDataPacket
 Data Packet Used in rocDecParseVideoData API IN for rocDecParseVideoData. More...
 
struct  RocdecParserDispInfo
 Timing Info struct\Used in rocdecParseVideoData API with PFNVIDDISPLAYCALLBACK pfn_display_picture. More...
 
struct  RocdecOperatingPointInfo
 RocdecOperatingPointInfo structOperating point information of scalable bitstream. More...
 
struct  RocdecSeiMessage
 Used in RocdecSeiMessageInfo structure. More...
 
struct  RocdecSeiMessageInfo
 Used in rocDecParseVideoData API with PFNVIDSEIMSGCALLBACK pfn_get_sei_msg. More...
 
struct  RocdecParserParams
 The AMD rocDecode library.\Used in rocDecCreateVideoParser API. More...
 
struct  RocdecVideoFormat.frame_rate
 
struct  RocdecVideoFormat.display_area
 
struct  RocdecVideoFormat.display_aspect_ratio
 
struct  RocdecVideoFormat.video_signal_description
 
union  RocdecOperatingPointInfo.__unnamed771__
 
struct  RocdecOperatingPointInfo.__unnamed771__.av1
 

Macros

#define ROCPROFILER_SDK_USE_SYSTEM_ROCDECODE   0
 

Typedefs

typedef void * RocdecVideoParser
 HANDLE pf rocDecDecoder Used in subsequent API calls after rocDecCreateDecoder.
 
typedef uint64_t RocdecTimeStamp
 
typedef int(ROCDECAPIPFNVIDSEQUENCECALLBACK) (void *, RocdecVideoFormat *)
 Parser callbacks \ The parser will call these synchronously from within rocDecParseVideoData(), whenever there is sequence change or a picture \ is ready to be decoded and/or displayed. \ Return values from these callbacks are interpreted as below. If the callbacks return failure, it will be propagated by \ rocDecParseVideoData() to the application. \ Parser picks default operating point as 0 and outputAllLayers flag as 0 if PFNVIDOPPOINTCALLBACK is not set or return value is \ -1 or invalid operating point. \ PFNVIDSEQUENCECALLBACK : 0: fail, 1: succeeded, > 1: override dpb size of parser (set by RocdecParserParams::max_num_decode_surfaces \ while creating parser) \ PFNVIDDECODECALLBACK : 0: fail, >=1: succeeded \ PFNVIDDISPLAYCALLBACK : 0: fail, >=1: succeeded \ PFNVIDOPPOINTCALLBACK : <0: fail, >=0: succeeded (bit 0-9: OperatingPoint, bit 10-10: outputAllLayers, bit 11-30: reserved) \ PFNVIDSEIMSGCALLBACK : 0: fail, >=1: succeeded.
 
typedef int(ROCDECAPIPFNVIDDECODECALLBACK) (void *, RocdecPicParams *)
 
typedef int(ROCDECAPIPFNVIDDISPLAYCALLBACK) (void *, RocdecParserDispInfo *)
 
typedef int(ROCDECAPIPFNVIDSEIMSGCALLBACK) (void *, RocdecSeiMessageInfo *)
 

Enumerations

enum  RocdecVideoPacketFlags {
  ROCDEC_PKT_ENDOFSTREAM = 0x01 ,
  ROCDEC_PKT_TIMESTAMP = 0x02 ,
  ROCDEC_PKT_DISCONTINUITY = 0x04 ,
  ROCDEC_PKT_ENDOFPICTURE ,
  ROCDEC_PKT_NOTIFY_EOS
}
 Data packet flags Used in RocdecSourceDataPacket structure. More...
 

Functions

rocDecStatus ROCDECAPI rocDecCreateVideoParser (RocdecVideoParser *parser_handle, RocdecParserParams *params)
 
rocDecStatus ROCDECAPI rocDecParseVideoData (RocdecVideoParser parser_handle, RocdecSourceDataPacket *packet)
 
rocDecStatus ROCDECAPI rocDecParserMarkFrameForReuse (RocdecVideoParser parser_handle, int pic_idx)
 
rocDecStatus ROCDECAPI rocDecDestroyVideoParser (RocdecVideoParser parser_handle)
 

Detailed Description

The AMD rocParser Library.

Definition in file rocparser.h.


Data Structure Documentation

◆ RocdecVideoFormatEx

struct RocdecVideoFormatEx

Definition at line 151 of file rocparser.h.

+ Collaboration diagram for RocdecVideoFormatEx:
Data Fields
RocdecVideoFormat format

OUT: RocdecVideoFormat structure

uint32_t max_height
uint32_t max_width
uint8_t raw_seqhdr_data[1024]

OUT: Sequence header data

Macro Definition Documentation

◆ ROCPROFILER_SDK_USE_SYSTEM_ROCDECODE

#define ROCPROFILER_SDK_USE_SYSTEM_ROCDECODE   0

Definition at line 33 of file rocparser.h.

Typedef Documentation

◆ PFNVIDDECODECALLBACK

typedef int(ROCDECAPI * PFNVIDDECODECALLBACK) (void *, RocdecPicParams *)

Definition at line 271 of file rocparser.h.

◆ PFNVIDDISPLAYCALLBACK

typedef int(ROCDECAPI * PFNVIDDISPLAYCALLBACK) (void *, RocdecParserDispInfo *)

Definition at line 272 of file rocparser.h.

◆ PFNVIDSEIMSGCALLBACK

typedef int(ROCDECAPI * PFNVIDSEIMSGCALLBACK) (void *, RocdecSeiMessageInfo *)

Definition at line 275 of file rocparser.h.

◆ PFNVIDSEQUENCECALLBACK

typedef int(ROCDECAPI * PFNVIDSEQUENCECALLBACK) (void *, RocdecVideoFormat *)

Parser callbacks \ The parser will call these synchronously from within rocDecParseVideoData(), whenever there is sequence change or a picture \ is ready to be decoded and/or displayed. \ Return values from these callbacks are interpreted as below. If the callbacks return failure, it will be propagated by \ rocDecParseVideoData() to the application. \ Parser picks default operating point as 0 and outputAllLayers flag as 0 if PFNVIDOPPOINTCALLBACK is not set or return value is \ -1 or invalid operating point. \ PFNVIDSEQUENCECALLBACK : 0: fail, 1: succeeded, > 1: override dpb size of parser (set by RocdecParserParams::max_num_decode_surfaces \ while creating parser) \ PFNVIDDECODECALLBACK : 0: fail, >=1: succeeded \ PFNVIDDISPLAYCALLBACK : 0: fail, >=1: succeeded \ PFNVIDOPPOINTCALLBACK : <0: fail, >=0: succeeded (bit 0-9: OperatingPoint, bit 10-10: outputAllLayers, bit 11-30: reserved) \ PFNVIDSEIMSGCALLBACK : 0: fail, >=1: succeeded.

Definition at line 270 of file rocparser.h.

◆ RocdecTimeStamp

typedef uint64_t RocdecTimeStamp

Definition at line 63 of file rocparser.h.

◆ RocdecVideoParser

typedef void* RocdecVideoParser

HANDLE pf rocDecDecoder Used in subsequent API calls after rocDecCreateDecoder.

Definition at line 62 of file rocparser.h.

Enumeration Type Documentation

◆ RocdecVideoPacketFlags

Data packet flags Used in RocdecSourceDataPacket structure.

Enumerator
ROCDEC_PKT_ENDOFSTREAM 

Set when this is the last packet for this stream

ROCDEC_PKT_TIMESTAMP 

Timestamp is valid

ROCDEC_PKT_DISCONTINUITY 

Set when a discontinuity has to be signalled

ROCDEC_PKT_ENDOFPICTURE 

Set when the packet contains exactly one frame or one field

ROCDEC_PKT_NOTIFY_EOS 

If this flag is set along with ROCDEC_PKT_ENDOFSTREAM, an additional (dummy) display callback will be invoked with null value of ROCDECPARSERDISPINFO which should be interpreted as end of the stream.

Definition at line 164 of file rocparser.h.

165{
166 ROCDEC_PKT_ENDOFSTREAM = 0x01, /**< Set when this is the last packet for this stream */
167 ROCDEC_PKT_TIMESTAMP = 0x02, /**< Timestamp is valid */
168 ROCDEC_PKT_DISCONTINUITY = 0x04, /**< Set when a discontinuity has to be signalled */
170 0x08, /**< Set when the packet contains exactly one frame or one field */
172 0x10, /**< If this flag is set along with ROCDEC_PKT_ENDOFSTREAM, an additional (dummy)
173 display callback will be invoked with null value of ROCDECPARSERDISPINFO which
174 should be interpreted as end of the stream. */
RocdecVideoPacketFlags
Data packet flags Used in RocdecSourceDataPacket structure.
Definition rocparser.h:165
@ ROCDEC_PKT_TIMESTAMP
Definition rocparser.h:167
@ ROCDEC_PKT_ENDOFPICTURE
Definition rocparser.h:169
@ ROCDEC_PKT_DISCONTINUITY
Definition rocparser.h:168
@ ROCDEC_PKT_NOTIFY_EOS
Definition rocparser.h:171
@ ROCDEC_PKT_ENDOFSTREAM
Definition rocparser.h:166

Function Documentation

◆ rocDecCreateVideoParser()

rocDecStatus ROCDECAPI rocDecCreateVideoParser ( RocdecVideoParser parser_handle,
RocdecParserParams params 
)
extern

◆ rocDecDestroyVideoParser()

rocDecStatus ROCDECAPI rocDecDestroyVideoParser ( RocdecVideoParser  parser_handle)
extern

◆ rocDecParserMarkFrameForReuse()

rocDecStatus ROCDECAPI rocDecParserMarkFrameForReuse ( RocdecVideoParser  parser_handle,
int  pic_idx 
)
extern

◆ rocDecParseVideoData()

rocDecStatus ROCDECAPI rocDecParseVideoData ( RocdecVideoParser  parser_handle,
RocdecSourceDataPacket packet 
)
extern