diff --git a/.Doxyfile b/.Doxyfile index d0a6de4d2b..d4b80c6daf 100644 --- a/.Doxyfile +++ b/.Doxyfile @@ -48,7 +48,7 @@ PROJECT_NAME = "rocDecode" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = "V0.4.0" +PROJECT_NUMBER = "V0.5.0" # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a @@ -946,6 +946,7 @@ WARN_LOGFILE = INPUT = README.md \ api/rocDecode.h \ api/rocparser.h \ + utils/rocvideodecode/roc_video_dec.h \ utils/video_demuxer.h # This tag can be used to specify the character encoding of the source files diff --git a/.jenkins/precheckin.groovy b/.jenkins/precheckin.groovy index 671b6b71e9..05d2ba7da2 100644 --- a/.jenkins/precheckin.groovy +++ b/.jenkins/precheckin.groovy @@ -7,7 +7,7 @@ def runCI = { nodeDetails, jobName-> - def prj = new rocProject('rocDECODE', 'PreCheckin') + def prj = new rocProject('rocDecode', 'PreCheckin') def nodes = new dockerNodes(nodeDetails, jobName, prj) diff --git a/api/rocdecode.h b/api/rocdecode.h index 98ca69494e..afc7964531 100644 --- a/api/rocdecode.h +++ b/api/rocdecode.h @@ -35,15 +35,10 @@ THE SOFTWARE. * \file * \brief The AMD rocDecode Library. * - * \defgroup group_amd_rocdecode rocDecode: AMD VCN Decode API - * \brief AMD The rocDECODE is a toolkit to decode videos and images using a hardware-accelerated video decoder on AMD’s GPUs. + * \defgroup group_amd_rocdecode rocDecode: AMD ROCm Decode API + * \brief AMD The rocDecode is a toolkit to decode videos and images using a hardware-accelerated video decoder on AMD’s GPUs. */ -/*****************************************************************************************************/ -//! \file rocdecode.h -//! rocDecode API provides video decoding interface to AMD GPU devices. -//! This file contains constants, structure definitions and function prototypes used for decoding. -/*****************************************************************************************************/ #if defined(__cplusplus) extern "C" { @@ -59,6 +54,7 @@ typedef void *rocDecDecoderHandle; /*********************************************************************************/ //! \enum rocDecStatus +//! \ingroup group_amd_rocdecode //! rocDecoder return status enums //! These enums are used in all API calls to rocDecoder /*********************************************************************************/ @@ -77,6 +73,7 @@ typedef enum rocDecStatus_enum{ /*********************************************************************************/ //! \enum rocDecodeVideoCodec +//! \ingroup group_amd_rocdecode //! Video codec enums //! These enums are used in ROCDECODECREATEINFO and ROCDECODEVIDDECODECAPS structures /*********************************************************************************/ @@ -101,6 +98,7 @@ typedef enum rocDecVideoCodec_enum { /*********************************************************************************/ //! \enum rocDecVideoSurfaceFormat +//! \ingroup group_amd_rocdecode //! Video surface format enums used for output format of decoded output //! These enums are used in RocDecoderCreateInfo structure /*********************************************************************************/ @@ -115,6 +113,7 @@ typedef enum rocDecVideoSurfaceFormat_enum { /**************************************************************************************************************/ //! \enum rocDecVideoChromaFormat +//! \ingroup group_amd_rocdecode //! Chroma format enums //! These enums are used in ROCDCODECREATEINFO and RocdecDecodeCaps structures /**************************************************************************************************************/ @@ -128,6 +127,7 @@ typedef enum rocDecVideoChromaFormat_enum { /*************************************************************************/ //! \enum rocDecDecodeStatus +//! \ingroup group_amd_rocdecode //! Decode status enums //! These enums are used in RocdecGetDecodeStatus structure /*************************************************************************/ @@ -143,6 +143,7 @@ typedef enum rocDecodeStatus_enum { /**************************************************************************************************************/ //! \struct RocdecDecodeCaps; +//! \ingroup group_amd_rocdecode //! This structure is used in rocDecGetDecoderCaps API /**************************************************************************************************************/ typedef struct _RocdecDecodeCaps { @@ -165,6 +166,7 @@ typedef struct _RocdecDecodeCaps { /**************************************************************************************************************/ //! \struct RocDecoderCreateInfo +//! \ingroup group_amd_rocdecode //! This structure is used in rocDecCreateDecoder API /**************************************************************************************************************/ typedef struct _RocDecoderCreateInfo { @@ -214,6 +216,7 @@ typedef struct _RocDecoderCreateInfo { /*********************************************************************************************************/ //! \struct RocdecDecodeStatus +//! \ingroup group_amd_rocdecode //! Struct for reporting decode status. //! This structure is used in RocdecGetDecodeStatus API. /*********************************************************************************************************/ @@ -225,6 +228,7 @@ typedef struct _RocdecDecodeStatus { /****************************************************/ //! \struct RocdecReconfigureDecoderInfo +//! \ingroup group_amd_rocdecode //! Struct for decoder reset //! This structure is used in rocDecReconfigureDecoder() API /****************************************************/ @@ -258,6 +262,7 @@ typedef struct _RocdecReconfigureDecoderInfo { /*********************************************************/ //! \struct RocdecH264Picture +//! \ingroup group_amd_rocdecode //! H.264 Picture Entry //! This structure is used in RocdecH264PicParams structure /*********************************************************/ @@ -279,12 +284,14 @@ typedef struct _RocdecH264Picture { /*********************************************************/ //! \struct RocdecHEVCPicture +//! \ingroup group_amd_rocdecode //! HEVC Picture Entry //! This structure is used in RocdecHevcPicParams structure /*********************************************************/ typedef struct _RocdecHEVCPicture { int PicIdx; /**< reconstructed picture surface ID */ /** \brief picture order count. + //! \ingroup group_amd_rocdecode * in HEVC, POCs for top and bottom fields of same picture should * take different values. */ @@ -334,6 +341,7 @@ typedef struct _RocdecHEVCPicture { /***********************************************************/ //! \struct RocdecJPEGPicParams placeholder +//! \ingroup group_amd_rocdecode //! JPEG picture parameters //! This structure is used in RocdecPicParams structure /***********************************************************/ @@ -343,6 +351,7 @@ typedef struct _RocdecJPEGPicParams { /***********************************************************/ //! \struct RocdecMpeg2QMatrix +//! \ingroup group_amd_rocdecode //! MPEG2 QMatrix //! This structure is used in _RocdecMpeg2PicParams structure /***********************************************************/ @@ -360,6 +369,7 @@ typedef struct _RocdecMpeg2QMatrix { /***********************************************************/ //! \struct RocdecMpeg2PicParams +//! \ingroup group_amd_rocdecode //! MPEG2 picture parameters //! This structure is used in RocdecMpeg2PicParams structure /***********************************************************/ @@ -394,6 +404,7 @@ typedef struct _RocdecMpeg2PicParams { /***********************************************************/ //! \struct RocdecH264PicParams placeholder +//! \ingroup group_amd_rocdecode //! H.264 picture parameters //! This structure is used in RocdecH264PicParams structure //! This structure is configured similar to VA-API VAPictureParameterBufferH264 structure @@ -466,6 +477,7 @@ typedef struct _RocdecH264PicParams { /***********************************************************/ //! \struct RocdecHevcIQMatrix +//! \ingroup group_amd_rocdecode //! HEVC IQMatrix //! This structure is sent once per frame, //! and only when scaling_list_enabled_flag = 1. @@ -518,6 +530,7 @@ typedef struct _RocdecHevcIQMatrix { /***********************************************************/ //! \struct RocdecHevcPicParams +//! \ingroup group_amd_rocdecode //! HEVC picture parameters //! This structure is used in RocdecHevcPicParams structure /***********************************************************/ @@ -638,6 +651,7 @@ typedef struct _RocdecHevcPicParams { /***********************************************************/ //! \struct RocdecVc1PicParams placeholder +//! \ingroup group_amd_rocdecode //! JPEG picture parameters //! This structure is used in RocdecVc1PicParams structure /***********************************************************/ @@ -647,6 +661,7 @@ typedef struct _RocdecVc1PicParams { /***********************************************************/ //! \struct RocdecHevcSliceParams +//! \ingroup group_amd_rocdecode //! HEVC slice parameters //! This structure is used in RocdecPicParams structure /***********************************************************/ @@ -733,6 +748,7 @@ typedef struct _RocdecHevcSliceParams { /******************************************************************************************/ //! \struct _RocdecPicParams +//! \ingroup group_amd_rocdecode //! Picture parameters for decoding //! This structure is used in rocDecDecodePicture API //! IN for rocDecDecodePicture @@ -777,6 +793,7 @@ typedef struct _RocdecPicParams { /******************************************************/ //! \struct RocdecProcParams +//! \ingroup group_amd_rocdecode //! Picture parameters for postprocessing //! This structure is used in rocDecMapVideoFrame API /******************************************************/ @@ -825,18 +842,21 @@ typedef struct _RocdecProcParams /*****************************************************************************************************/ //! \fn rocDecStatus ROCDECAPI rocDecCreateDecoder(rocDecDecoderHandle *decoder_handle, RocDecoderCreateInfo *decoder_create_info) +//! \ingroup group_amd_rocdecode //! Create the decoder object based on decoder_create_info. A handle to the created decoder is returned /*****************************************************************************************************/ extern rocDecStatus ROCDECAPI rocDecCreateDecoder(rocDecDecoderHandle *decoder_handle, RocDecoderCreateInfo *decoder_create_info); /*****************************************************************************************************/ //! \fn rocDecStatus ROCDECAPI rocDecDestroyDecoder(rocDecDecoderHandle decoder_handle) +//! \ingroup group_amd_rocdecode //! Destroy the decoder object /*****************************************************************************************************/ extern rocDecStatus ROCDECAPI rocDecDestroyDecoder(rocDecDecoderHandle decoder_handle); /**********************************************************************************************************************/ //! \fn rocDecStatus ROCDECAPI rocdecGetDecoderCaps(RocdecDecodeCaps *decode_caps) +//! \ingroup group_amd_rocdecode //! Queries decode capabilities of AMD's VCN decoder based on CodecType, ChromaFormat and BitDepthMinus8 parameters. //! 1. Application fills IN parameters CodecType, ChromaFormat and BitDepthMinus8 of RocdecDecodeCaps structure //! 2. On calling rocdecGetDecoderCaps, driver fills OUT parameters (for GPU device) if the IN parameters are supported @@ -846,6 +866,7 @@ extern rocDecStatus ROCDECAPI rocDecGetDecoderCaps(RocdecDecodeCaps *decode_caps /*****************************************************************************************************/ //! \fn rocDecStatus ROCDECAPI rocDecDecodeFrame(rocDecDecoderHandle decoder_handle, RocdecPicParams *pic_params) +//! \ingroup group_amd_rocdecode //! Decodes a single picture //! Submits the frame for HW decoding /*****************************************************************************************************/ @@ -853,6 +874,7 @@ extern rocDecStatus ROCDECAPI rocDecDecodeFrame(rocDecDecoderHandle decoder_hand /************************************************************************************************************/ //! \fn rocDecStatus ROCDECAPI rocDecGetDecodeStatus(rocDecDecoderHandle decoder_handle, int pic_idx, RocdecDecodeStatus* decode_status); +//! \ingroup group_amd_rocdecode //! Get the decode status for frame corresponding to nPicIdx //! API is currently supported for HEVC, H264 and JPEG codecs. //! API returns ROCDEC_NOT_SUPPORTED error code for unsupported GPU or codec. @@ -861,6 +883,7 @@ extern rocDecStatus ROCDECAPI rocDecGetDecodeStatus(rocDecDecoderHandle decoder_ /*********************************************************************************************************/ //! \fn rocDecStatus ROCDECAPI rocDecReconfigureDecoder(rocDecDecoderHandle decoder_handle, RocdecReconfigureDecoderInfo *reconfig_params) +//! \ingroup group_amd_rocdecode //! Used to reuse single decoder for multiple clips. Currently supports resolution change, resize params //! params, target area params change for same codec. Must be called during RocdecParserParams::pfnSequenceCallback /*********************************************************************************************************/ @@ -870,6 +893,7 @@ extern rocDecStatus ROCDECAPI rocDecReconfigureDecoder(rocDecDecoderHandle decod //! \fn extern rocDecStatus ROCDECAPI rocDecMapVideoFrame(rocDecDecoderHandle decoder_handle, int pic_idx, //! uint32_t *dev_mem_ptr, uint32_t *horizontal_pitch, //! RocdecProcParams *vid_postproc_params); +//! \ingroup group_amd_rocdecode //! Post-process and map video frame corresponding to nPicIdx for use in HIP. Returns HIP device pointer and associated //! pitch(horizontal stride) of the video frame. Returns device memory pointers and pitch for each plane (Y, U and V) seperately /************************************************************************************************************************/ @@ -879,6 +903,7 @@ extern rocDecStatus ROCDECAPI rocDecMapVideoFrame(rocDecDecoderHandle decoder_ha /*****************************************************************************************************/ //! \fn rocDecStatus ROCDECAPI rocDecUnMapVideoFrame(rocDecDecoderHandle decoder_handle, int pic_idx) +//! \ingroup group_amd_rocdecode //! Unmap a previously mapped video frame with the associated nPicIdx /*****************************************************************************************************/ extern rocDecStatus ROCDECAPI rocDecUnMapVideoFrame(rocDecDecoderHandle decoder_handle, int pic_idx); diff --git a/api/rocparser.h b/api/rocparser.h index 3847fa4cc9..a595f61713 100644 --- a/api/rocparser.h +++ b/api/rocparser.h @@ -28,20 +28,15 @@ THE SOFTWARE. * \file * \brief The AMD rocParser Library. * - * \defgroup group_amd_rocdecode rocDecode: AMD Decode API - * \brief AMD The rocDECODE is a toolkit to decode videos and images using a hardware-accelerated video decoder on AMD’s GPUs. - */ + * \defgroup group_rocparser rocDecode Parser: AMD ROCm Video Parser API + * \brief AMD The rocDecode video parser for AMD’s GPUs. + * \defgroup group_rocdec_struct rocDecode Parser Structs: AMD ROCm Video Parser Structs + * \brief AMD The rocDecode video parser struct #if defined(__cplusplus) extern "C" { #endif /* __cplusplus */ -/*! - * \file - * \brief The AMD rocDecode library. - * - * \defgroup group_rocparser API: APIs for Video Parser - * \defgroup group_rocdec_struct - */ + /*********************************************************************************/ //! HANDLE pf rocDecDecoder //! Used in subsequent API calls after rocDecCreateDecoder @@ -148,7 +143,7 @@ typedef enum { } RocdecVideoPacketFlags; /*****************************************************************************/ -//! \ingroup STRUCTS +//! \ingroup group_rocdec_struct //! \struct RocdecSourceDataPacket //! Data Packet //! Used in rocDecParseVideoData API @@ -198,7 +193,7 @@ typedef struct _RocdecOperatingPointInfo { /**********************************************************************************/ -//! \ingroup STRUCTS +//! \ingroup group_rocdec_struct //! \struct RocdecSeiMessage; //! Used in RocdecSeiMessageInfo structure /**********************************************************************************/ @@ -210,7 +205,7 @@ typedef struct _RocdecSeiMessage { /**********************************************************************************/ -//! \ingroup STRUCTS +//! \ingroup group_rocdec_struct //! \struct RocdecSeiMessageInfo //! Used in rocDecParseVideoData API with PFNVIDSEIMSGCALLBACK pfnGetSEIMsg /**********************************************************************************/ @@ -270,14 +265,14 @@ typedef struct _RocdecParserParams { } RocdecParserParams; /************************************************************************************************/ -//! \ingroup FUNCTS +//! \ingroup group_rocparser //! \fn rocDecodeStatus ROCDECAPI rocDecCreateVideoParser(RocdecVideoParser *parser_handle, RocdecParserParams *params) //! Create video parser object and initialize /************************************************************************************************/ extern rocDecStatus ROCDECAPI rocDecCreateVideoParser(RocdecVideoParser *parser_handle, RocdecParserParams *params); /************************************************************************************************/ -//! \ingroup FUNCTS +//! \ingroup group_rocparser //! \fn rocDecodeStatus ROCDECAPI rocDecParseVideoData(RocdecVideoParser parser_handle, RocdecSourceDataPacket *packet) //! Parse the video data from source data packet in pPacket //! Extracts parameter sets like SPS, PPS, bitstream etc. from pPacket and @@ -289,7 +284,7 @@ extern rocDecStatus ROCDECAPI rocDecCreateVideoParser(RocdecVideoParser *parser_ extern rocDecStatus ROCDECAPI rocDecParseVideoData(RocdecVideoParser parser_handle, RocdecSourceDataPacket *packet); /************************************************************************************************/ -//! \ingroup FUNCTS +//! \ingroup group_rocparser //! \fn rocDecStatus ROCDECAPI rocDecDestroyVideoParser(RocdecVideoParser parser_handle) //! Destroy the video parser object /************************************************************************************************/ diff --git a/docs/doxygen/Doxyfile b/docs/doxygen/Doxyfile index 786956260b..52f1aca1bb 100644 --- a/docs/doxygen/Doxyfile +++ b/docs/doxygen/Doxyfile @@ -48,7 +48,7 @@ PROJECT_NAME = "rocDecode" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = "V0.4.0" +PROJECT_NUMBER = "V0.5.0" # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a @@ -815,7 +815,7 @@ FILE_VERSION_FILTER = # DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE # tag is left empty. -LAYOUT_FILE = ../../.DoxygenLayout.xml +LAYOUT_FILE = DoxygenLayout.xml # The CITE_BIB_FILES tag can be used to specify one or more bib files containing # the reference definitions. This must be a list of .bib files. The .bib @@ -946,6 +946,7 @@ WARN_LOGFILE = INPUT = ../../README.md \ ../../api/rocDecode.h \ ../../api/rocparser.h \ + ../../utils/rocvideodecode/roc_video_dec.h \ ../../utils/video_demuxer.h # This tag can be used to specify the character encoding of the source files diff --git a/docs/doxygen/DoxygenLayout.xml b/docs/doxygen/DoxygenLayout.xml new file mode 100644 index 0000000000..2b578db7fd --- /dev/null +++ b/docs/doxygen/DoxygenLayout.xml @@ -0,0 +1,238 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/utils/rocvideodecode/roc_video_dec.h b/utils/rocvideodecode/roc_video_dec.h index 51fde44ae6..81288ed7b4 100644 --- a/utils/rocvideodecode/roc_video_dec.h +++ b/utils/rocvideodecode/roc_video_dec.h @@ -41,6 +41,14 @@ extern "C" { #include "rocdecode.h" #include "rocparser.h" +/*! + * \file + * \brief The AMD Video Decode Library. + * + * \defgroup group_amd_roc_video_dec rocDecode Video Decode: AMD Video Decode API + * \brief AMD The rocDecode video decoder for AMD’s GPUs. + */ + #define MAX_FRAME_NUM 16 typedef int (ROCDECAPI *PFNRECONFIGUEFLUSHCALLBACK)(void *, uint32_t, void *); diff --git a/utils/video_demuxer.h b/utils/video_demuxer.h index c51dfb041e..8f0e3c0cdc 100644 --- a/utils/video_demuxer.h +++ b/utils/video_demuxer.h @@ -34,7 +34,7 @@ extern "C" { * \brief The AMD Video Demuxer for rocDecode Library. * * \defgroup group_amd_rocdecode_videodemuxer videoDemuxer: AMD rocDecode Video Demuxer API - * \brief AMD The rocDecode Video Demuxer API. + * \brief AMD The rocDecode video demuxer API. */