VART-X  0.3.0
vart::PreProcessImplBase Class Referenceabstract

Abstract interface for pre-processing implementation used by PreProcess. More...

#include <vart_preprocess_impl_base.hpp>

Collaboration diagram for vart::PreProcessImplBase:

Public Member Functions

 PreProcessImplBase ()=default
 Default construction is allowed for derived implementations. More...
 
virtual ~PreProcessImplBase ()
 Virtual destructor to ensure proper cleanup of derived implementations. More...
 
virtual void process (std::vector< PreProcessOp > &preprocess_ops)=0
 process() - Perform pre-processing based on the specified parameters. More...
 
virtual void get_input_vinfo (int32_t height, int32_t width, VideoFormat fmt, VideoInfo &vinfo)=0
 get_input_vinfo() - Fills the input video info from input params. More...
 
virtual const VideoInfoget_output_vinfo ()=0
 get_output_vinfo() - Get the output video info. More...
 
virtual void set_preprocess_info (PreProcessInfo &preprocess_info)=0
 set_preprocess_info() - Set the required Preprocess parameters. More...
 
virtual const PreProcessInfoget_preprocess_info ()=0
 get_preprocess_info() - Get the preprocess info More...
 

Protected Attributes

PreProcessInfo preprocess_info
 Preprocess parameters Information. More...
 
VideoInfo out_vinfo
 Preprocess output video info. More...
 

Detailed Description

Abstract interface for pre-processing implementation used by PreProcess.

Note
Applications should use vart::PreProcess rather than this type directly, unless extending or integrating a new backend.

Constructor & Destructor Documentation

◆ PreProcessImplBase()

vart::PreProcessImplBase::PreProcessImplBase ( )
default

Default construction is allowed for derived implementations.

◆ ~PreProcessImplBase()

virtual vart::PreProcessImplBase::~PreProcessImplBase ( )
inlinevirtual

Virtual destructor to ensure proper cleanup of derived implementations.

Member Function Documentation

◆ get_input_vinfo()

virtual void vart::PreProcessImplBase::get_input_vinfo ( int32_t  height,
int32_t  width,
VideoFormat  fmt,
VideoInfo vinfo 
)
pure virtual

get_input_vinfo() - Fills the input video info from input params.

Parameters
[in]heightHeight of the input frame.
[in]widthWidth of the input frame.
[in]fmtVideo format of the input frame.
[out]vinfoVideoInfo structure to be filled based on the input params. If implementation has any alignment requirements, they should be reflected in the filled vinfo. The caller will use this vinfo to create the input VideoFrame for pre-processing.

◆ get_output_vinfo()

virtual const VideoInfo& vart::PreProcessImplBase::get_output_vinfo ( )
pure virtual

get_output_vinfo() - Get the output video info.

Returns
The output VideoInfo describing the format and dimensions of the pre-processed output frame. Can be used to construct the output VideoFrame. If the implementation has any alignment requirements, they should be reflected in the returned VideoInfo.

◆ get_preprocess_info()

virtual const PreProcessInfo& vart::PreProcessImplBase::get_preprocess_info ( )
pure virtual

get_preprocess_info() - Get the preprocess info

Returns
The currently stored PreProcessInfo containing the pre-processing parameters set via set_preprocess_info().

◆ process()

virtual void vart::PreProcessImplBase::process ( std::vector< PreProcessOp > &  preprocess_ops)
pure virtual

process() - Perform pre-processing based on the specified parameters.

Parameters
[in]preprocess_opsVector of PreProcessOp to be performed. PreProcessOp contains input/output frame and their corresponding ROI.

◆ set_preprocess_info()

virtual void vart::PreProcessImplBase::set_preprocess_info ( PreProcessInfo preprocess_info)
pure virtual

set_preprocess_info() - Set the required Preprocess parameters.

Parameters
[in]preprocess_infoStructure with pre-processing parameters PreProcessInfo. This will be called before process() to set the required parameters for pre-processing. The implementation can store the provided preprocess_info and use it in the process() method to perform the pre-processing based on the set parameters.

Member Data Documentation

◆ out_vinfo

VideoInfo vart::PreProcessImplBase::out_vinfo
protected

Preprocess output video info.

◆ preprocess_info

PreProcessInfo vart::PreProcessImplBase::preprocess_info
protected

Preprocess parameters Information.


The documentation for this class was generated from the following file: