• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2022 HiSilicon (Shanghai) Technologies CO., LIMITED.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 #ifndef __MPI_GDC_H__
16 #define __MPI_GDC_H__
17 
18 #include "hi_common.h"
19 #include "hi_comm_video.h"
20 #include "hi_comm_gdc.h"
21 
22 #ifdef __cplusplus
23 #if __cplusplus
24 extern "C" {
25 #endif
26 #endif /* __cplusplus */
27 
28 /*
29  * Description : Begin a gdc job,then add task into the job,gdc will finish all the task in the job.
30  * Input       : GDC_HANDLE *phHandle
31  * Output      : None
32  */
33 HI_S32 HI_MPI_GDC_BeginJob(GDC_HANDLE *phHandle);
34 
35 /*
36  * Description : End a job,all tasks in the job will be submmitted to gdc
37  * Input       : GDC_HANDLE  hHandle
38  * Output      : None
39  */
40 HI_S32 HI_MPI_GDC_EndJob(GDC_HANDLE hHandle);
41 
42 /*
43  * Description : Cancel a job ,then all tasks in the job will not be submmitted to gdc
44  * Input       : GDC_HANDLE  hHandle
45  * Output      : None
46  */
47 HI_S32 HI_MPI_GDC_CancelJob(GDC_HANDLE hHandle);
48 
49 /*
50  * Description : Add a task to a gdc job
51  * Input       : GDC_HANDLE  hHandle
52  *               const GDC_TASK_ATTR_S *pstTask
53  *               const FISHEYE_ATTR_S *pstFisheyeAttr
54  * Output      : None
55  */
56 HI_S32 HI_MPI_GDC_AddCorrectionTask(GDC_HANDLE hHandle, const GDC_TASK_ATTR_S *pstTask,
57                                     const FISHEYE_ATTR_S *pstFisheyeAttr);
58 
59 /*
60  * Description : Add a task to a gdc job
61  * Input       : GDC_HANDLE  hHandle
62  *               const GDC_TASK_ATTR_S *pstTask
63  *               const FISHEYE_ATTR_EX_S *pstFishEyeAttrEx
64  *               HI_BOOL bCheckMode
65  * Output      : None
66  */
67 HI_S32 HI_MPI_GDC_AddCorrectionExTask(GDC_HANDLE hHandle, const GDC_TASK_ATTR_S *pstTask,
68                                       const FISHEYE_ATTR_EX_S *pstFishEyeAttrEx, HI_BOOL bCheckMode);
69 
70 /*
71  * Description : Set Config
72  * Input       : GDC_HANDLE  hHandle
73  *               const FISHEYE_JOB_CONFIG_S *stJobConfig
74  * Output       : None
75  */
76 HI_S32 HI_MPI_GDC_SetConfig(GDC_HANDLE hHandle, const FISHEYE_JOB_CONFIG_S *pstJobConfig);
77 
78 /*
79  * Description : Set Config
80  * Input       : GDC_HANDLE  hHandle
81  *               const GDC_TASK_ATTR_S* pstTask
82  *               const GDC_PMF_ATTR_S* pstGdcPmfAttr
83  * Output      : None
84  */
85 HI_S32 HI_MPI_GDC_AddPMFTask(GDC_HANDLE hHandle, const GDC_TASK_ATTR_S *pstTask, const GDC_PMF_ATTR_S *pstGdcPmfAttr);
86 
87 /*
88  * Description : Query source point from correction point
89  * Input       : const GDC_FISHEYE_POINT_QUERY_ATTR_S *pstFisheyePointQueryAttr
90  *               const VIDEO_FRAME_INFO_S *pstVideoInfo
91  *               const POINT_S *pstDstPoint
92  *               POINT_S *pstSrcPoint
93  * Output      : None
94  */
95 HI_S32 HI_MPI_GDC_FisheyePosQueryDst2Src(const GDC_FISHEYE_POINT_QUERY_ATTR_S *pstFisheyePointQueryAttr,
96     const VIDEO_FRAME_INFO_S *pstVideoInfo, const POINT_S *pstDstPoint, POINT_S *pstSrcPoint);
97 #ifdef __cplusplus
98 #if __cplusplus
99 }
100 #endif
101 #endif /* __cplusplus */
102 
103 #endif /* __MPI_GDC_H__ */
104 
105