VART-X  0.3.0
vart_preprocess_impl_base.hpp
Go to the documentation of this file.
1 /*
2  * Copyright 2024-2026 Advanced Micro Devices Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #pragma once
18 
24 #include <cstdint>
25 #include <memory>
26 #include <string>
27 #include "../vart_device.hpp"
28 #include "../vart_preprocess_types.hpp"
29 #include "../vart_videoframe.hpp"
30 
33 namespace vart {
34 
42  public:
44  PreProcessImplBase() = default;
45 
47  virtual ~PreProcessImplBase() {}
48 
56  virtual void process(std::vector<PreProcessOp>& preprocess_ops) = 0;
57 
76  virtual void get_input_vinfo(int32_t height, int32_t width, VideoFormat fmt, VideoInfo& vinfo) = 0;
77 
86  virtual const VideoInfo& get_output_vinfo() = 0;
87 
97 
105  virtual const PreProcessInfo& get_preprocess_info() = 0;
106 
107  protected:
110 };
111 
112 } // namespace vart
Abstract interface for pre-processing implementation used by PreProcess.
Definition: vart_preprocess_impl_base.hpp:41
PreProcessInfo preprocess_info
Preprocess parameters Information.
Definition: vart_preprocess_impl_base.hpp:108
virtual void set_preprocess_info(PreProcessInfo &preprocess_info)=0
set_preprocess_info() - Set the required Preprocess parameters.
virtual const PreProcessInfo & get_preprocess_info()=0
get_preprocess_info() - Get the preprocess info
PreProcessImplBase()=default
Default construction is allowed for derived implementations.
virtual ~PreProcessImplBase()
Virtual destructor to ensure proper cleanup of derived implementations.
Definition: vart_preprocess_impl_base.hpp:47
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.
VideoInfo out_vinfo
Preprocess output video info.
Definition: vart_preprocess_impl_base.hpp:109
virtual const VideoInfo & get_output_vinfo()=0
get_output_vinfo() - Get the output video info.
virtual void process(std::vector< PreProcessOp > &preprocess_ops)=0
process() - Perform pre-processing based on the specified parameters.
VART (Vitis AI Runtime) public API namespace.
VideoFormat
Represents video color formats supported by VART core APIs.
Definition: vart_videoframe_types.hpp:47
Structure storing pre-processing parameters.
Definition: vart_preprocess_types.hpp:85
Contains information related to a video frame.
Definition: vart_videoframe_types.hpp:144