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_VB_H__ 17 #define __MPI_VB_H__ 18 19 #include "hi_comm_vb.h" 20 #include "hi_comm_video.h" 21 22 #ifdef __cplusplus 23 #if __cplusplus 24 extern "C" { 25 #endif 26 #endif 27 28 VB_POOL HI_MPI_VB_CreatePool(VB_POOL_CONFIG_S *pstVbPoolCfg); 29 HI_S32 HI_MPI_VB_DestroyPool(VB_POOL Pool); 30 31 VB_BLK HI_MPI_VB_GetBlock(VB_POOL Pool, HI_U64 u64BlkSize, const HI_CHAR *pcMmzName); 32 HI_S32 HI_MPI_VB_ReleaseBlock(VB_BLK Block); 33 34 VB_BLK HI_MPI_VB_PhysAddr2Handle(HI_U64 u64PhyAddr); 35 HI_U64 HI_MPI_VB_Handle2PhysAddr(VB_BLK Block); 36 VB_POOL HI_MPI_VB_Handle2PoolId(VB_BLK Block); 37 38 HI_S32 HI_MPI_VB_InquireUserCnt(VB_BLK Block); 39 40 HI_S32 HI_MPI_VB_GetSupplementAddr(VB_BLK Block, VIDEO_SUPPLEMENT_S *pstSupplement); 41 HI_S32 HI_MPI_VB_SetSupplementConfig(const VB_SUPPLEMENT_CONFIG_S *pstSupplementConfig); 42 HI_S32 HI_MPI_VB_GetSupplementConfig(VB_SUPPLEMENT_CONFIG_S *pstSupplementConfig); 43 44 HI_S32 HI_MPI_VB_Init(HI_VOID); 45 HI_S32 HI_MPI_VB_Exit(HI_VOID); 46 HI_S32 HI_MPI_VB_SetConfig(const VB_CONFIG_S *pstVbConfig); 47 HI_S32 HI_MPI_VB_GetConfig(VB_CONFIG_S *pstVbConfig); 48 49 HI_S32 HI_MPI_VB_MmapPool(VB_POOL Pool); 50 HI_S32 HI_MPI_VB_MunmapPool(VB_POOL Pool); 51 52 HI_S32 HI_MPI_VB_GetBlockVirAddr(VB_POOL Pool, HI_U64 u64PhyAddr, HI_VOID **ppVirAddr); 53 54 HI_S32 HI_MPI_VB_InitModCommPool(VB_UID_E enVbUid); 55 HI_S32 HI_MPI_VB_ExitModCommPool(VB_UID_E enVbUid); 56 57 HI_S32 HI_MPI_VB_SetModPoolConfig(VB_UID_E enVbUid, const VB_CONFIG_S *pstVbConfig); 58 HI_S32 HI_MPI_VB_GetModPoolConfig(VB_UID_E enVbUid, VB_CONFIG_S *pstVbConfig); 59 60 #ifdef __cplusplus 61 #if __cplusplus 62 } 63 #endif 64 #endif 65 66 #endif /* __MPI_VI_H__ */ 67 68