• 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 
16 #ifndef __MPI_VO_H__
17 #define __MPI_VO_H__
18 
19 #include "hi_comm_vo.h"
20 
21 #ifdef __cplusplus
22 #if __cplusplus
23 extern "C" {
24 #endif
25 #endif /* __cplusplus */
26 
27 /* Device Relative Settings */
28 HI_S32 HI_MPI_VO_SetPubAttr(VO_DEV VoDev, const VO_PUB_ATTR_S *pstPubAttr);
29 HI_S32 HI_MPI_VO_GetPubAttr(VO_DEV VoDev, VO_PUB_ATTR_S *pstPubAttr);
30 
31 HI_S32 HI_MPI_VO_Enable(VO_DEV VoDev);
32 HI_S32 HI_MPI_VO_Disable(VO_DEV VoDev);
33 
34 HI_S32 HI_MPI_VO_CloseFd(HI_VOID);
35 HI_S32 HI_MPI_VO_SetUserIntfSyncInfo(VO_DEV VoDev, VO_USER_INTFSYNC_INFO_S *pstUserInfo);
36 
37 /* Video Relative Settings */
38 HI_S32 HI_MPI_VO_SetVideoLayerAttr(VO_LAYER VoLayer, const VO_VIDEO_LAYER_ATTR_S *pstLayerAttr);
39 HI_S32 HI_MPI_VO_GetVideoLayerAttr(VO_LAYER VoLayer, VO_VIDEO_LAYER_ATTR_S *pstLayerAttr);
40 
41 HI_S32 HI_MPI_VO_EnableVideoLayer(VO_LAYER VoLayer);
42 HI_S32 HI_MPI_VO_DisableVideoLayer(VO_LAYER VoLayer);
43 
44 HI_S32 HI_MPI_VO_BindVideoLayer(VO_LAYER VoLayer, VO_DEV VoDev);
45 HI_S32 HI_MPI_VO_UnBindVideoLayer(VO_LAYER VoLayer, VO_DEV VoDev);
46 
47 HI_S32 HI_MPI_VO_SetVideoLayerPriority(VO_LAYER VoLayer, HI_U32 u32Priority);
48 HI_S32 HI_MPI_VO_GetVideoLayerPriority(VO_LAYER VoLayer, HI_U32 *pu32Priority);
49 
50 HI_S32 HI_MPI_VO_SetVideoLayerCSC(VO_LAYER VoLayer, const VO_CSC_S *pstVideoCSC);
51 HI_S32 HI_MPI_VO_GetVideoLayerCSC(VO_LAYER VoLayer, VO_CSC_S *pstVideoCSC);
52 
53 HI_S32 HI_MPI_VO_SetVideoLayerPartitionMode(VO_LAYER VoLayer, VO_PART_MODE_E enPartMode);
54 HI_S32 HI_MPI_VO_GetVideoLayerPartitionMode(VO_LAYER VoLayer, VO_PART_MODE_E *penPartMode);
55 
56 HI_S32 HI_MPI_VO_BatchBegin(VO_LAYER VoLayer);
57 HI_S32 HI_MPI_VO_BatchEnd(VO_LAYER VoLayer);
58 
59 HI_S32 HI_MPI_VO_SetVideoLayerBoundary(VO_LAYER VoLayer, const VO_LAYER_BOUNDARY_S *pstLayerBoundary);
60 HI_S32 HI_MPI_VO_GetVideoLayerBoundary(VO_LAYER VoLayer, VO_LAYER_BOUNDARY_S *pstLayerBoundary);
61 
62 HI_S32 HI_MPI_VO_SetVideoLayerParam(VO_LAYER VoLayer, const VO_LAYER_PARAM_S *pstLayerParam);
63 HI_S32 HI_MPI_VO_GetVideoLayerParam(VO_LAYER VoLayer, VO_LAYER_PARAM_S *pstLayerParam);
64 
65 HI_S32 HI_MPI_VO_SetVideoLayerDecompress(VO_LAYER VoLayer, HI_BOOL bSupportDecompress);
66 HI_S32 HI_MPI_VO_GetVideoLayerDecompress(VO_LAYER VoLayer, HI_BOOL *pbSupportDecompress);
67 
68 HI_S32 HI_MPI_VO_SetVideoLayerCrop(VO_LAYER VoLayer, const CROP_INFO_S *pstCropInfo);
69 HI_S32 HI_MPI_VO_GetVideoLayerCrop(VO_LAYER VoLayer, CROP_INFO_S *pstCropInfo);
70 
71 /* Display relative operations */
72 HI_S32 HI_MPI_VO_SetPlayToleration(VO_LAYER VoLayer, HI_U32 u32Toleration);
73 HI_S32 HI_MPI_VO_GetPlayToleration(VO_LAYER VoLayer, HI_U32 *pu32Toleration);
74 
75 HI_S32 HI_MPI_VO_GetScreenFrame(VO_LAYER VoLayer, VIDEO_FRAME_INFO_S *pstVFrame, HI_S32 s32MilliSec);
76 HI_S32 HI_MPI_VO_ReleaseScreenFrame(VO_LAYER VoLayer, const VIDEO_FRAME_INFO_S *pstVFrame);
77 
78 HI_S32 HI_MPI_VO_SetDisplayBufLen(VO_LAYER VoLayer, HI_U32 u32BufLen);
79 HI_S32 HI_MPI_VO_GetDisplayBufLen(VO_LAYER VoLayer, HI_U32 *pu32BufLen);
80 
81 /* Channel Relative Operations */
82 HI_S32 HI_MPI_VO_SetChnAttr(VO_LAYER VoLayer, VO_CHN VoChn, const VO_CHN_ATTR_S *pstChnAttr);
83 HI_S32 HI_MPI_VO_GetChnAttr(VO_LAYER VoLayer, VO_CHN VoChn, VO_CHN_ATTR_S *pstChnAttr);
84 
85 HI_S32 HI_MPI_VO_EnableChn(VO_LAYER VoLayer, VO_CHN VoChn);
86 HI_S32 HI_MPI_VO_DisableChn(VO_LAYER VoLayer, VO_CHN VoChn);
87 
88 HI_S32 HI_MPI_VO_SetChnParam(VO_LAYER VoLayer, VO_CHN VoChn, const VO_CHN_PARAM_S *pstChnParam);
89 HI_S32 HI_MPI_VO_GetChnParam(VO_LAYER VoLayer, VO_CHN VoChn, VO_CHN_PARAM_S *pstChnParam);
90 
91 HI_S32 HI_MPI_VO_SetChnDisplayPosition(VO_LAYER VoLayer, VO_CHN VoChn, const POINT_S *pstDispPos);
92 HI_S32 HI_MPI_VO_GetChnDisplayPosition(VO_LAYER VoLayer, VO_CHN VoChn, POINT_S *pstDispPos);
93 
94 HI_S32 HI_MPI_VO_SetChnFrameRate(VO_LAYER VoLayer, VO_CHN VoChn, HI_S32 s32ChnFrmRate);
95 HI_S32 HI_MPI_VO_GetChnFrameRate(VO_LAYER VoLayer, VO_CHN VoChn, HI_S32 *ps32ChnFrmRate);
96 
97 HI_S32 HI_MPI_VO_GetChnFrame(VO_LAYER VoLayer, VO_CHN VoChn, VIDEO_FRAME_INFO_S *pstFrame, HI_S32 s32MilliSec);
98 HI_S32 HI_MPI_VO_ReleaseChnFrame(VO_LAYER VoLayer, VO_CHN VoChn, const VIDEO_FRAME_INFO_S *pstFrame);
99 
100 HI_S32 HI_MPI_VO_PauseChn(VO_LAYER VoLayer, VO_CHN VoChn);
101 HI_S32 HI_MPI_VO_ResumeChn(VO_LAYER VoLayer, VO_CHN VoChn);
102 HI_S32 HI_MPI_VO_StepChn(VO_LAYER VoLayer, VO_CHN VoChn);
103 
104 HI_S32 HI_MPI_VO_RefreshChn(VO_LAYER VoLayer, VO_CHN VoChn);
105 
106 HI_S32 HI_MPI_VO_ShowChn(VO_LAYER VoLayer, VO_CHN VoChn);
107 HI_S32 HI_MPI_VO_HideChn(VO_LAYER VoLayer, VO_CHN VoChn);
108 
109 HI_S32 HI_MPI_VO_SetZoomInWindow(VO_LAYER VoLayer, VO_CHN VoChn, const VO_ZOOM_ATTR_S *pstZoomAttr);
110 HI_S32 HI_MPI_VO_GetZoomInWindow(VO_LAYER VoLayer, VO_CHN VoChn, VO_ZOOM_ATTR_S *pstZoomAttr);
111 
112 HI_S32 HI_MPI_VO_GetChnPTS(VO_LAYER VoLayer, VO_CHN VoChn, HI_U64 *pu64ChnPTS);
113 HI_S32 HI_MPI_VO_QueryChnStatus(VO_LAYER VoLayer, VO_CHN VoChn, VO_QUERY_STATUS_S *pstStatus);
114 
115 HI_S32 HI_MPI_VO_SendFrame(VO_LAYER VoLayer, VO_CHN VoChn, VIDEO_FRAME_INFO_S *pstVFrame, HI_S32 s32MilliSec);
116 
117 HI_S32 HI_MPI_VO_ClearChnBuf(VO_LAYER VoLayer, VO_CHN VoChn, HI_BOOL bClrAll);
118 
119 HI_S32 HI_MPI_VO_SetChnBorder(VO_LAYER VoLayer, VO_CHN VoChn, const VO_BORDER_S *pstBorder);
120 HI_S32 HI_MPI_VO_GetChnBorder(VO_LAYER VoLayer, VO_CHN VoChn, VO_BORDER_S *pstBorder);
121 
122 HI_S32 HI_MPI_VO_SetChnBoundary(VO_LAYER VoLayer, VO_CHN VoChn, const VO_CHN_BOUNDARY_S *pstChnBoundary);
123 HI_S32 HI_MPI_VO_GetChnBoundary(VO_LAYER VoLayer, VO_CHN VoChn, VO_CHN_BOUNDARY_S *pstChnBoundary);
124 
125 HI_S32 HI_MPI_VO_SetChnRecvThreshold(VO_LAYER VoLayer, VO_CHN VoChn, HI_U32 u32Threshold);
126 HI_S32 HI_MPI_VO_GetChnRecvThreshold(VO_LAYER VoLayer, VO_CHN VoChn, HI_U32 *pu32Threshold);
127 
128 HI_S32 HI_MPI_VO_SetChnRotation(VO_LAYER VoLayer, VO_CHN VoChn, ROTATION_E enRotation);
129 HI_S32 HI_MPI_VO_GetChnRotation(VO_LAYER VoLayer, VO_CHN VoChn, ROTATION_E *penRotation);
130 
131 HI_S32 HI_MPI_VO_GetChnRegionLuma(VO_LAYER VoLayer, VO_CHN VoChn, VO_REGION_INFO_S *pstRegionInfo,
132                                   HI_U64 *pu64LumaData, HI_S32 s32MilliSec);
133 
134 /* WBC(Write Back Control) Relative Settings */
135 HI_S32 HI_MPI_VO_SetWBCSource(VO_WBC VoWBC, const VO_WBC_SOURCE_S *pstWBCSource);
136 HI_S32 HI_MPI_VO_GetWBCSource(VO_WBC VoWBC, VO_WBC_SOURCE_S *pstWBCSources);
137 
138 HI_S32 HI_MPI_VO_SetWBCAttr(VO_WBC VoWBC, const VO_WBC_ATTR_S *pstWBCAttr);
139 HI_S32 HI_MPI_VO_GetWBCAttr(VO_WBC VoWBC, VO_WBC_ATTR_S *pstWBCAttr);
140 
141 HI_S32 HI_MPI_VO_EnableWBC(VO_WBC VoWBC);
142 HI_S32 HI_MPI_VO_DisableWBC(VO_WBC VoWBC);
143 
144 HI_S32 HI_MPI_VO_SetWBCMode(VO_WBC VoWBC, VO_WBC_MODE_E enWBCMode);
145 HI_S32 HI_MPI_VO_GetWBCMode(VO_WBC VoWBC, VO_WBC_MODE_E *penWBCMode);
146 
147 HI_S32 HI_MPI_VO_SetWBCDepth(VO_WBC VoWBC, HI_U32 u32Depth);
148 HI_S32 HI_MPI_VO_GetWBCDepth(VO_WBC VoWBC, HI_U32 *pu32Depth);
149 
150 HI_S32 HI_MPI_VO_GetWBCFrame(VO_WBC VoWBC, VIDEO_FRAME_INFO_S *pstVFrame, HI_S32 s32MilliSec);
151 HI_S32 HI_MPI_VO_ReleaseWBCFrame(VO_WBC VoWBC, const VIDEO_FRAME_INFO_S *pstVFrame);
152 
153 /* Graphic Relative Settings */
154 HI_S32 HI_MPI_VO_BindGraphicLayer(GRAPHIC_LAYER GraphicLayer, VO_DEV VoDev);
155 HI_S32 HI_MPI_VO_UnBindGraphicLayer(GRAPHIC_LAYER GraphicLayer, VO_DEV VoDev);
156 
157 HI_S32 HI_MPI_VO_SetGraphicLayerCSC(GRAPHIC_LAYER GraphicLayer, const VO_CSC_S *pstCSC);
158 HI_S32 HI_MPI_VO_GetGraphicLayerCSC(GRAPHIC_LAYER GraphicLayer, VO_CSC_S *pstCSC);
159 
160 HI_S32 HI_MPI_VO_SetDevFrameRate(VO_DEV VoDev, HI_U32 u32FrameRate);
161 HI_S32 HI_MPI_VO_GetDevFrameRate(VO_DEV VoDev, HI_U32 *pu32FrameRate);
162 
163 /* Module Parameter Settings */
164 HI_S32 HI_MPI_VO_SetModParam(const VO_MOD_PARAM_S *pstModParam);
165 HI_S32 HI_MPI_VO_GetModParam(VO_MOD_PARAM_S *pstModParam);
166 HI_S32 HI_MPI_VO_SetVtth(VO_DEV VoDev, HI_U32 u32Vtth);
167 HI_S32 HI_MPI_VO_GetVtth(VO_DEV VoDev, HI_U32 *pu32Vtth);
168 HI_S32 HI_MPI_VO_SetVtth2(VO_DEV VoDev, HI_U32 u32Vtth);
169 HI_S32 HI_MPI_VO_GetVtth2(VO_DEV VoDev, HI_U32 *pu32Vtth);
170 HI_S32 HI_MPI_VO_SetChnMirror(VO_LAYER VoLayer, VO_CHN VoChn, VO_MIRROR_MODE_E enMirrorMode);
171 HI_S32 HI_MPI_VO_GetChnMirror(VO_LAYER VoLayer, VO_CHN VoChn, VO_MIRROR_MODE_E *penMirrorMode);
172 HI_S32 HI_MPI_VO_SetVideoLayerEarlyDisplay(VO_LAYER VoLayer, HI_BOOL bEarlyDisplayEn);
173 HI_S32 HI_MPI_VO_GetVideoLayerEarlyDisplay(VO_LAYER VoLayer, HI_BOOL *pbEarlyDisplayEn);
174 
175 #ifdef __cplusplus
176 #if __cplusplus
177 }
178 #endif
179 #endif /* __cplusplus */
180 
181 #endif /* __MPI_VO_H__ */
182