xref: /OK3568_Linux_fs/external/rockit/mpi/sdk/include/rk_mpi_vpss.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1 /* GPL-2.0 WITH Linux-syscall-note OR Apache 2.0 */
2 /* Copyright (c) 2021 Fuzhou Rockchip Electronics Co., Ltd */
3 
4 #ifndef INCLUDE_RT_MPI_RK_MPI_VPSS_H_
5 #define INCLUDE_RT_MPI_RK_MPI_VPSS_H_
6 
7 #include "rk_common.h"
8 #include "rk_comm_video.h"
9 #include "rk_comm_mb.h"
10 #include "rk_comm_vpss.h"
11 
12 #ifdef __cplusplus
13 #if __cplusplus
14 extern "C" {
15 #endif
16 #endif /* __cplusplus */
17 
18 /* Group Settings */
19 RK_S32 RK_MPI_VPSS_CreateGrp(VPSS_GRP VpssGrp, const VPSS_GRP_ATTR_S *pstGrpAttr);
20 RK_S32 RK_MPI_VPSS_DestroyGrp(VPSS_GRP VpssGrp);
21 
22 RK_S32 RK_MPI_VPSS_StartGrp(VPSS_GRP VpssGrp);
23 RK_S32 RK_MPI_VPSS_StopGrp(VPSS_GRP VpssGrp);
24 
25 RK_S32 RK_MPI_VPSS_ResetGrp(VPSS_GRP VpssGrp);
26 
27 RK_S32 RK_MPI_VPSS_GetGrpAttr(VPSS_GRP VpssGrp, VPSS_GRP_ATTR_S *pstGrpAttr);
28 RK_S32 RK_MPI_VPSS_SetGrpAttr(VPSS_GRP VpssGrp, const VPSS_GRP_ATTR_S *pstGrpAttr);
29 
30 RK_S32 RK_MPI_VPSS_SetGrpCrop(VPSS_GRP VpssGrp, const VPSS_CROP_INFO_S *pstCropInfo);
31 RK_S32 RK_MPI_VPSS_GetGrpCrop(VPSS_GRP VpssGrp, VPSS_CROP_INFO_S *pstCropInfo);
32 
33 RK_S32 RK_MPI_VPSS_SetGrpRotation(VPSS_GRP VpssGrp, ROTATION_E enRotation);
34 RK_S32 RK_MPI_VPSS_GetGrpRotation(VPSS_GRP VpssGrp, ROTATION_E *penRotation);
35 
36 RK_S32 RK_MPI_VPSS_SendFrame(VPSS_GRP VpssGrp, VPSS_GRP_PIPE VpssGrpPipe,
37                                       const VIDEO_FRAME_INFO_S *pstVideoFrame, RK_S32 s32MilliSec);
38 
39 RK_S32 RK_MPI_VPSS_GetGrpFrame(VPSS_GRP VpssGrp, VPSS_GRP_PIPE VpssGrpPipe,
40                                          VIDEO_FRAME_INFO_S *pstVideoFrame);
41 RK_S32 RK_MPI_VPSS_ReleaseGrpFrame(VPSS_GRP VpssGrp, VPSS_GRP_PIPE VpssGrpPipe,
42                                                const VIDEO_FRAME_INFO_S *pstVideoFrame);
43 
44 RK_S32 RK_MPI_VPSS_EnableBackupFrame(VPSS_GRP VpssGrp);
45 RK_S32 RK_MPI_VPSS_DisableBackupFrame(VPSS_GRP VpssGrp);
46 
47 RK_S32 RK_MPI_VPSS_SetGrpDelay(VPSS_GRP VpssGrp, RK_U32 u32Delay);
48 RK_S32 RK_MPI_VPSS_GetGrpDelay(VPSS_GRP VpssGrp, RK_U32 *pu32Delay);
49 
50 RK_S32 RK_MPI_VPSS_EnableUserFrameRateCtrl(VPSS_GRP VpssGrp);
51 RK_S32 RK_MPI_VPSS_DisableUserFrameRateCtrl(VPSS_GRP VpssGrp);
52 
53 /* Chn Settings */
54 RK_S32 RK_MPI_VPSS_SetChnAttr(VPSS_GRP VpssGrp, VPSS_CHN VpssChn, const VPSS_CHN_ATTR_S *pstChnAttr);
55 RK_S32 RK_MPI_VPSS_GetChnAttr(VPSS_GRP VpssGrp, VPSS_CHN VpssChn, VPSS_CHN_ATTR_S *pstChnAttr);
56 
57 RK_S32 RK_MPI_VPSS_EnableChn(VPSS_GRP VpssGrp, VPSS_CHN VpssChn);
58 RK_S32 RK_MPI_VPSS_DisableChn(VPSS_GRP VpssGrp, VPSS_CHN VpssChn);
59 
60 RK_S32 RK_MPI_VPSS_SetChnCrop(VPSS_GRP VpssGrp, VPSS_CHN VpssChn, const VPSS_CROP_INFO_S *pstCropInfo);
61 RK_S32 RK_MPI_VPSS_GetChnCrop(VPSS_GRP VpssGrp, VPSS_CHN VpssChn, VPSS_CROP_INFO_S *pstCropInfo);
62 
63 RK_S32 RK_MPI_VPSS_SetChnRotation(VPSS_GRP VpssGrp, VPSS_CHN VpssChn, ROTATION_E enRotation);
64 RK_S32 RK_MPI_VPSS_GetChnRotation(VPSS_GRP VpssGrp, VPSS_CHN VpssChn, ROTATION_E *penRotation);
65 
66 RK_S32 RK_MPI_VPSS_SetChnRotationEx(VPSS_GRP VpssGrp, VPSS_CHN VpssChn,
67             const VPSS_ROTATION_EX_ATTR_S* pstRotationExAttr);
68 RK_S32 RK_MPI_VPSS_GetChnRotationEx(VPSS_GRP VpssGrp, VPSS_CHN VpssChn,
69             VPSS_ROTATION_EX_ATTR_S* pstRotationExAttr);
70 
71 RK_S32 RK_MPI_VPSS_GetChnFrame(
72             VPSS_GRP VpssGrp, VPSS_CHN VpssChn, VIDEO_FRAME_INFO_S *pstVideoFrame, RK_S32 s32MilliSec);
73 RK_S32 RK_MPI_VPSS_ReleaseChnFrame(VPSS_GRP VpssGrp, VPSS_CHN VpssChn, const VIDEO_FRAME_INFO_S *pstVideoFrame);
74 
75 RK_S32 RK_MPI_VPSS_GetRegionLuma(VPSS_GRP VpssGrp, VPSS_CHN VpssChn, const VIDEO_REGION_INFO_S *pstRegionInfo,
76                                  RK_U64 *pu64LumaData, RK_S32 s32MilliSec);
77 
78 RK_S32 RK_MPI_VPSS_AttachMbPool(VPSS_GRP VpssGrp, VPSS_CHN VpssChn, MB_POOL hVbPool);
79 RK_S32 RK_MPI_VPSS_DetachMbPool(VPSS_GRP VpssGrp, VPSS_CHN VpssChn);
80 
81 RK_S32 RK_MPI_VPSS_EnableBufferShare(VPSS_GRP VpssGrp, VPSS_CHN VpssChn);
82 RK_S32 RK_MPI_VPSS_DisableBufferShare(VPSS_GRP VpssGrp, VPSS_CHN VpssChn);
83 
84 RK_S32 RK_MPI_VPSS_GetChnFd(VPSS_GRP VpssGrp, VPSS_CHN VpssChn);
85 RK_S32 RK_MPI_VPSS_CloseFd(VPSS_GRP VpssGrp, VPSS_CHN VpssChn);
86 
87 RK_S32 RK_MPI_VPSS_SetVProcDev(VPSS_GRP VpssGrp, VIDEO_PROC_DEV_TYPE_E enVProcDev);
88 RK_S32 RK_MPI_VPSS_GetVProcDev(VPSS_GRP VpssGrp, VIDEO_PROC_DEV_TYPE_E *enVProcDev);
89 
90 RK_S32 RK_MPI_VPSS_SetModParam(const VPSS_MOD_PARAM_S *pstModParam);
91 RK_S32 RK_MPI_VPSS_GetModParam(VPSS_MOD_PARAM_S *pstModParam);
92 
93 #ifdef __cplusplus
94 #if __cplusplus
95 }
96 #endif
97 #endif /* __cplusplus */
98 
99 #endif /* INCLUDE_RT_MPI_RK_MPI_VPSS_H_ */
100 
101 
102