|
| RocVideoDecoder (int device_id, OutputSurfaceMemoryType out_mem_type, rocDecVideoCodec codec, bool force_zero_latency=false, const Rect *p_crop_rect=nullptr, bool extract_user_SEI_Message=false, uint32_t disp_delay=0, int max_width=0, int max_height=0, uint32_t clk_rate=1000) |
| Construct a new Roc Video Decoder object. More...
|
|
rocDecVideoCodec | GetCodecId () |
|
hipStream_t | GetStream () |
|
uint32_t | GetWidth () |
| Get the output frame width.
|
|
int | GetDecodeWidth () |
| This function is used to get the actual decode width.
|
|
uint32_t | GetHeight () |
| Get the output frame height.
|
|
int | GetChromaHeight () |
| This function is used to get the current chroma height.
|
|
int | GetNumChromaPlanes () |
| This function is used to get the number of chroma planes.
|
|
virtual int | GetFrameSize () |
| This function is used to get the current frame size based on pixel format.
|
|
uint32_t | GetBitDepth () |
| Get the Bit Depth and BytesPerPixel associated with the pixel format. More...
|
|
uint32_t | GetBytePerPixel () |
|
size_t | GetSurfaceSize () |
| Functions to get the output surface attributes.
|
|
uint32_t | GetSurfaceStride () |
|
const char * | GetCodecFmtName (rocDecVideoCodec codec_id) |
| Get the name of the output format. More...
|
|
const char * | GetSurfaceFmtName (rocDecVideoSurfaceFormat surface_format_id) |
| function to return the name from surface_format_id More...
|
|
bool | GetOutputSurfaceInfo (OutputSurfaceInfo **surface_info) |
| Get the pointer to the Output Image Info. More...
|
|
bool | SetReconfigParams (ReconfigParams *p_reconfig_params, bool b_force_reconfig_flush=false) |
| Function to set the Reconfig Params object. More...
|
|
int | FlushAndReconfigure () |
| Function to force Reconfigure Flush: needed for random seeking to key frames. More...
|
|
virtual int | DecodeFrame (const uint8_t *data, size_t size, int pkt_flags, int64_t pts=0, int *num_decoded_pics=nullptr) |
| this function decodes a frame and returns the number of frames avalable for display More...
|
|
virtual uint8_t * | GetFrame (int64_t *pts) |
| This function returns a decoded frame and timestamp. This should be called in a loop fetching all the available frames.
|
|
virtual bool | ReleaseFrame (int64_t pTimestamp, bool b_flushing=false) |
| function to release frame after use by the application: Only used with "OUT_SURFACE_MEM_DEV_INTERNAL" More...
|
|
void | GetDeviceinfo (std::string &device_name, std::string &gcn_arch_name, int &pci_bus_id, int &pci_domain_id, int &pci_device_id) |
| utility function to save image to a file More...
|
|
virtual void | SaveFrameToFile (std::string output_file_name, void *surf_mem, OutputSurfaceInfo *surf_info, size_t rgb_image_size=0) |
| Helper function to dump decoded output surface to file. More...
|
|
virtual void | ResetSaveFrameToFile () |
| Helper funtion to close a existing file and dump to new file in case of multiple files using same decoder.
|
|
int32_t | GetNumOfFlushedFrames () |
| Get the Num Of Flushed Frames from video decoder object. More...
|
|
void | WaitForDecodeCompletion () |
| Function to wait for the decode completion of the last submitted picture.
|
|
void | AddDecoderSessionOverHead (std::thread::id session_id, double duration) |
|
double | GetDecoderSessionOverHead (std::thread::id session_id) |
|
bool | CodecSupported (int device_id, rocDecVideoCodec codec_id, uint32_t bit_depth) |
| Check if the given Video Codec is supported on the given GPU. More...
|
|
virtual int | ReconfigureDecoder (RocdecVideoFormat *p_video_format) |
| This function reconfigure decoder if there is a change in sequence params.
|
|
|
int | HandleVideoSequence (RocdecVideoFormat *p_video_format) |
| This function gets called when a sequence is ready to be decoded. The function also gets called when there is format change.
|
|
int | HandlePictureDecode (RocdecPicParams *p_pic_params) |
| This function gets called when a picture is ready to be decoded. cuvidDecodePicture is called from this function to decode the picture.
|
|
int | HandlePictureDisplay (RocdecParserDispInfo *p_disp_info) |
| This function gets called after a picture is decoded and available for display. Frames are fetched and stored in internal buffer.
|
|
int | GetSEIMessage (RocdecSeiMessageInfo *p_sei_message_info) |
| This function gets called when all unregistered user SEI messages are parsed for a frame.
|
|
bool | ReleaseInternalFrames () |
| function to release all internal frames and clear the vp_frames_q_ (used with reconfigure): Only used with "OUT_SURFACE_MEM_DEV_INTERNAL" More...
|
|
bool | InitHIP (int device_id) |
| Function to Initialize GPU-HIP.
|
|
std::chrono::_V2::system_clock::time_point | StartTimer () |
| Function to get start time.
|
|
double | StopTimer (const std::chrono::_V2::system_clock::time_point &start_time) |
| Function to get elapsed time.
|
|
|
static int ROCDECAPI | HandleVideoSequenceProc (void *p_user_data, RocdecVideoFormat *p_video_format) |
| Callback function to be registered for getting a callback when decoding of sequence starts.
|
|
static int ROCDECAPI | HandlePictureDecodeProc (void *p_user_data, RocdecPicParams *p_pic_params) |
| Callback function to be registered for getting a callback when a decoded frame is ready to be decoded.
|
|
static int ROCDECAPI | HandlePictureDisplayProc (void *p_user_data, RocdecParserDispInfo *p_disp_info) |
| Callback function to be registered for getting a callback when a decoded frame is available for display.
|
|
static int ROCDECAPI | HandleSEIMessagesProc (void *p_user_data, RocdecSeiMessageInfo *p_sei_message_info) |
| Callback function to be registered for getting a callback when all the unregistered user SEI Messages are parsed for a frame.
|
|
|
int | num_devices_ |
|
int | device_id_ |
|
RocdecVideoParser | rocdec_parser_ = nullptr |
|
rocDecDecoderHandle | roc_decoder_ = nullptr |
|
OutputSurfaceMemoryType | out_mem_type_ = OUT_SURFACE_MEM_DEV_INTERNAL |
|
bool | b_extract_sei_message_ = false |
|
bool | b_force_zero_latency_ = false |
|
uint32_t | disp_delay_ |
|
ReconfigParams * | p_reconfig_params_ = nullptr |
|
bool | b_force_recofig_flush_ = false |
|
int32_t | num_frames_flushed_during_reconfig_ = 0 |
|
hipDeviceProp_t | hip_dev_prop_ |
|
hipStream_t | hip_stream_ |
|
rocDecVideoCodec | codec_id_ = rocDecVideoCodec_NumCodecs |
|
rocDecVideoChromaFormat | video_chroma_format_ = rocDecVideoChromaFormat_420 |
|
rocDecVideoSurfaceFormat | video_surface_format_ = rocDecVideoSurfaceFormat_NV12 |
|
RocdecSeiMessageInfo * | curr_sei_message_ptr_ = nullptr |
|
RocdecSeiMessageInfo | sei_message_display_q_ [MAX_FRAME_NUM] |
|
RocdecVideoFormat * | curr_video_format_ptr_ = nullptr |
|
int | output_frame_cnt_ = 0 |
|
int | output_frame_cnt_ret_ = 0 |
|
int | decoded_pic_cnt_ = 0 |
|
int | decode_poc_ = 0 |
|
int | pic_num_in_dec_order_ [MAX_FRAME_NUM] |
|
int | num_alloced_frames_ = 0 |
|
int | last_decode_surf_idx_ = 0 |
|
std::ostringstream | input_video_info_str_ |
|
int | bitdepth_minus_8_ = 0 |
|
uint32_t | byte_per_pixel_ = 1 |
|
uint32_t | coded_width_ = 0 |
|
uint32_t | disp_width_ = 0 |
|
uint32_t | coded_height_ = 0 |
|
uint32_t | disp_height_ = 0 |
|
uint32_t | target_width_ = 0 |
|
uint32_t | target_height_ = 0 |
|
int | max_width_ = 0 |
|
int | max_height_ = 0 |
|
uint32_t | chroma_height_ = 0 |
|
uint32_t | chroma_width_ = 0 |
|
uint32_t | num_chroma_planes_ = 0 |
|
uint32_t | num_components_ = 0 |
|
uint32_t | surface_stride_ = 0 |
|
uint32_t | surface_vstride_ = 0 |
|
uint32_t | chroma_vstride_ = 0 |
|
size_t | surface_size_ = 0 |
|
OutputSurfaceInfo | output_surface_info_ = {} |
|
std::mutex | mtx_vp_frame_ |
|
std::vector< DecFrameBuffer > | vp_frames_ |
|
std::queue< DecFrameBuffer > | vp_frames_q_ |
|
Rect | disp_rect_ = {} |
|
Rect | crop_rect_ = {} |
|
FILE * | fp_sei_ = NULL |
|
FILE * | fp_out_ = NULL |
|
bool | is_decoder_reconfigured_ = false |
|
std::string | current_output_filename = "" |
|
uint32_t | extra_output_file_count_ = 0 |
|
std::thread::id | decoder_session_id_ |
|
std::unordered_map< std::thread::id, double > | session_overhead_ |
|