mpi_vi.h 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. /******************************************************************************
  2. Copyright (C), 2016, Hisilicon Tech. Co., Ltd.
  3. ******************************************************************************
  4. File Name : mpi_vi.h
  5. Version : Initial Draft
  6. Author : Hisilicon multimedia software group
  7. Created : 2016/09/19
  8. Last Modified :
  9. Description :
  10. Function List :
  11. ******************************************************************************/
  12. #ifndef __MPI_VI_H__
  13. #define __MPI_VI_H__
  14. #include "hi_comm_vi.h"
  15. #include "hi_comm_dis.h"
  16. #include "hi_comm_gdc.h"
  17. #ifdef __cplusplus
  18. #if __cplusplus
  19. extern "C"
  20. {
  21. #endif
  22. #endif /* __cplusplus */
  23. /* 1 for vi device */
  24. HI_S32 HI_MPI_VI_SetDevAttr(VI_DEV ViDev, const VI_DEV_ATTR_S *pstDevAttr);
  25. HI_S32 HI_MPI_VI_GetDevAttr(VI_DEV ViDev, VI_DEV_ATTR_S *pstDevAttr);
  26. HI_S32 HI_MPI_VI_SetDevAttrEx(VI_DEV ViDev, const VI_DEV_ATTR_EX_S *pstDevAttrEx);
  27. HI_S32 HI_MPI_VI_GetDevAttrEx(VI_DEV ViDev, VI_DEV_ATTR_EX_S *pstDevAttrEx);
  28. HI_S32 HI_MPI_VI_SetVSSignalAttr(VI_DEV ViDev, const VI_VS_SIGNAL_ATTR_S *pstVSSignalAttr);
  29. HI_S32 HI_MPI_VI_GetVSSignalAttr(VI_DEV ViDev, VI_VS_SIGNAL_ATTR_S *pstVSSignalAttr);
  30. HI_S32 HI_MPI_VI_TriggerVSSignal(VI_DEV ViDev, HI_BOOL bEnable);
  31. HI_S32 HI_MPI_VI_EnableDev(VI_DEV ViDev);
  32. HI_S32 HI_MPI_VI_DisableDev(VI_DEV ViDev);
  33. HI_S32 HI_MPI_VI_SetMipiBindDev(VI_DEV ViDev, MIPI_DEV MipiDev);
  34. HI_S32 HI_MPI_VI_GetMipiBindDev(VI_DEV ViDev, MIPI_DEV *pMipiDev);
  35. HI_S32 HI_MPI_VI_SetDevBindPipe(VI_DEV ViDev, const VI_DEV_BIND_PIPE_S *pstDevBindPipe);
  36. HI_S32 HI_MPI_VI_GetDevBindPipe(VI_DEV ViDev, VI_DEV_BIND_PIPE_S *pstDevBindPipe);
  37. HI_S32 HI_MPI_VI_SetDevTimingAttr(VI_DEV ViDev, const VI_DEV_TIMING_ATTR_S *pstTimingAttr);
  38. HI_S32 HI_MPI_VI_GetDevTimingAttr(VI_DEV ViDev, VI_DEV_TIMING_ATTR_S *pstTimingAttr);
  39. /* 2 for vi pipe */
  40. HI_S32 HI_MPI_VI_GetPipeCmpParam(VI_PIPE ViPipe, VI_CMP_PARAM_S *pCmpParam);
  41. HI_S32 HI_MPI_VI_SetUserPic(VI_PIPE ViPipe, const VI_USERPIC_ATTR_S *pstUsrPic);
  42. HI_S32 HI_MPI_VI_EnableUserPic(VI_PIPE ViPipe);
  43. HI_S32 HI_MPI_VI_DisableUserPic(VI_PIPE ViPipe);
  44. HI_S32 HI_MPI_VI_CreatePipe(VI_PIPE ViPipe, const VI_PIPE_ATTR_S *pstPipeAttr);
  45. HI_S32 HI_MPI_VI_DestroyPipe(VI_PIPE ViPipe);
  46. HI_S32 HI_MPI_VI_SetPipeAttr(VI_PIPE ViPipe, const VI_PIPE_ATTR_S *pstPipeAttr);
  47. HI_S32 HI_MPI_VI_GetPipeAttr(VI_PIPE ViPipe, VI_PIPE_ATTR_S *pstPipeAttr);
  48. HI_S32 HI_MPI_VI_StartPipe(VI_PIPE ViPipe);
  49. HI_S32 HI_MPI_VI_StopPipe(VI_PIPE ViPipe);
  50. HI_S32 HI_MPI_VI_SetPipeCrop(VI_PIPE ViPipe, const CROP_INFO_S *pstCropInfo);
  51. HI_S32 HI_MPI_VI_GetPipeCrop(VI_PIPE ViPipe, CROP_INFO_S *pstCropInfo);
  52. HI_S32 HI_MPI_VI_SetPipeFisheyeConfig(VI_PIPE ViPipe, const FISHEYE_CONFIG_S *pstFishEyeConfig);
  53. HI_S32 HI_MPI_VI_GetPipeFisheyeConfig(VI_PIPE ViPipe, FISHEYE_CONFIG_S *pstFishEyeConfig);
  54. HI_S32 HI_MPI_VI_SetPipeDumpAttr(VI_PIPE ViPipe, const VI_DUMP_ATTR_S *pstDumpAttr);
  55. HI_S32 HI_MPI_VI_GetPipeDumpAttr(VI_PIPE ViPipe, VI_DUMP_ATTR_S *pstDumpAttr);
  56. HI_S32 HI_MPI_VI_SetPipeFrameSource(VI_PIPE ViPipe, const VI_PIPE_FRAME_SOURCE_E enSource);
  57. HI_S32 HI_MPI_VI_GetPipeFrameSource(VI_PIPE ViPipe, VI_PIPE_FRAME_SOURCE_E *penSource);
  58. HI_S32 HI_MPI_VI_GetPipeFrame(VI_PIPE ViPipe, VIDEO_FRAME_INFO_S *pstVideoFrame, HI_S32 s32MilliSec);
  59. HI_S32 HI_MPI_VI_ReleasePipeFrame(VI_PIPE ViPipe, const VIDEO_FRAME_INFO_S *pstVideoFrame);
  60. HI_S32 HI_MPI_VI_SendPipeYUV(VI_PIPE ViPipe, const VIDEO_FRAME_INFO_S *pstVideoFrame, HI_S32 s32MilliSec);
  61. HI_S32 HI_MPI_VI_SendPipeRaw(HI_U32 u32PipeNum, VI_PIPE PipeId[], const VIDEO_FRAME_INFO_S *pstVideoFrame[],
  62. HI_S32 s32MilliSec);
  63. HI_S32 HI_MPI_VI_SetPipeSharpenAttr(VI_PIPE ViPipe, const VI_PIPE_SHARPEN_ATTR_S *pstSharpenAttr);
  64. HI_S32 HI_MPI_VI_GetPipeSharpenAttr(VI_PIPE ViPipe, VI_PIPE_SHARPEN_ATTR_S *pstSharpenAttr);
  65. HI_S32 HI_MPI_VI_SetPipeNRXParam(VI_PIPE ViPipe, const VI_PIPE_NRX_PARAM_S *pstNrXParam);
  66. HI_S32 HI_MPI_VI_GetPipeNRXParam(VI_PIPE ViPipe, VI_PIPE_NRX_PARAM_S *pstNrXParam);
  67. HI_S32 HI_MPI_VI_SetPipeRepeatMode(VI_PIPE ViPipe, const VI_PIPE_REPEAT_MODE_E enPepeatMode);
  68. HI_S32 HI_MPI_VI_GetPipeRepeatMode(VI_PIPE ViPipe, VI_PIPE_REPEAT_MODE_E *penPepeatMode);
  69. HI_S32 HI_MPI_VI_QueryPipeStatus(VI_PIPE ViPipe, VI_PIPE_STATUS_S *pstStatus);
  70. HI_S32 HI_MPI_VI_EnablePipeInterrupt(VI_PIPE ViPipe);
  71. HI_S32 HI_MPI_VI_DisablePipeInterrupt(VI_PIPE ViPipe);
  72. HI_S32 HI_MPI_VI_SetPipeVCNumber(VI_PIPE ViPipe, HI_U32 u32VCNumber);
  73. HI_S32 HI_MPI_VI_GetPipeVCNumber(VI_PIPE ViPipe, HI_U32 *pu32VCNumber);
  74. HI_S32 HI_MPI_VI_GetPipeFd(VI_PIPE ViPipe);
  75. /* 3 for vi chn */
  76. HI_S32 HI_MPI_VI_SetChnAttr(VI_PIPE ViPipe, VI_CHN ViChn, const VI_CHN_ATTR_S *pstChnAttr);
  77. HI_S32 HI_MPI_VI_GetChnAttr(VI_PIPE ViPipe, VI_CHN ViChn, VI_CHN_ATTR_S *pstChnAttr);
  78. HI_S32 HI_MPI_VI_EnableChn(VI_PIPE ViPipe, VI_CHN ViChn);
  79. HI_S32 HI_MPI_VI_DisableChn(VI_PIPE ViPipe, VI_CHN ViChn);
  80. HI_S32 HI_MPI_VI_SetChnCrop(VI_PIPE ViPipe, VI_CHN ViChn, const VI_CROP_INFO_S *pstCropInfo);
  81. HI_S32 HI_MPI_VI_GetChnCrop(VI_PIPE ViPipe, VI_CHN ViChn, VI_CROP_INFO_S *pstCropInfo);
  82. HI_S32 HI_MPI_VI_SetChnRotation(VI_PIPE ViPipe, VI_CHN ViChn, const ROTATION_E enRotation);
  83. HI_S32 HI_MPI_VI_GetChnRotation(VI_PIPE ViPipe, VI_CHN ViChn, ROTATION_E *penRotation);
  84. HI_S32 HI_MPI_VI_SetChnRotationEx(VI_PIPE ViPipe, VI_CHN ViChn, const VI_ROTATION_EX_ATTR_S* pstViRotationExAttr);
  85. HI_S32 HI_MPI_VI_GetChnRotationEx(VI_PIPE ViPipe, VI_CHN ViChn, VI_ROTATION_EX_ATTR_S *pstViRotationExAttr);
  86. HI_S32 HI_MPI_VI_SetChnLDCAttr(VI_PIPE ViPipe, VI_CHN ViChn, const VI_LDC_ATTR_S *pstLDCAttr);
  87. HI_S32 HI_MPI_VI_GetChnLDCAttr(VI_PIPE ViPipe, VI_CHN ViChn, VI_LDC_ATTR_S *pstLDCAttr);
  88. HI_S32 HI_MPI_VI_SetChnLDCV2Attr(VI_PIPE ViPipe, VI_CHN ViChn, const VI_LDCV2_ATTR_S *pstLDCV2Attr);
  89. HI_S32 HI_MPI_VI_GetChnLDCV2Attr(VI_PIPE ViPipe, VI_CHN ViChn, VI_LDCV2_ATTR_S *pstLDCV2Attr);
  90. HI_S32 HI_MPI_VI_SetChnSpreadAttr(VI_PIPE ViPipe, VI_CHN ViChn, const SPREAD_ATTR_S *pstSpreadAttr);
  91. HI_S32 HI_MPI_VI_GetChnSpreadAttr(VI_PIPE ViPipe, VI_CHN ViChn, SPREAD_ATTR_S *pstSpreadAttr);
  92. HI_S32 HI_MPI_VI_SetChnLowDelayAttr(VI_PIPE ViPipe, VI_CHN ViChn, const VI_LOW_DELAY_INFO_S *pstLowDelayInfo);
  93. HI_S32 HI_MPI_VI_GetChnLowDelayAttr(VI_PIPE ViPipe, VI_CHN ViChn, VI_LOW_DELAY_INFO_S *pstLowDelayInfo);
  94. HI_S32 HI_MPI_VI_GetChnRegionLuma(VI_PIPE ViPipe, VI_CHN ViChn, const VIDEO_REGION_INFO_S *pstRegionInfo,
  95. HI_U64 *pu64LumaData, HI_S32 s32MilliSec);
  96. HI_S32 HI_MPI_VI_SetChnDISConfig(VI_PIPE ViPipe, VI_CHN ViChn, const DIS_CONFIG_S *pstDISConfig);
  97. HI_S32 HI_MPI_VI_GetChnDISConfig(VI_PIPE ViPipe, VI_CHN ViChn, DIS_CONFIG_S *pstDISConfig);
  98. HI_S32 HI_MPI_VI_SetChnDISAttr(VI_PIPE ViPipe, VI_CHN ViChn, const DIS_ATTR_S *pstDISAttr);
  99. HI_S32 HI_MPI_VI_GetChnDISAttr(VI_PIPE ViPipe, VI_CHN ViChn, DIS_ATTR_S *pstDISAttr);
  100. HI_S32 HI_MPI_VI_SetExtChnFisheye(VI_PIPE ViPipe, VI_CHN ViChn, const FISHEYE_ATTR_S *pstFishEyeAttr);
  101. HI_S32 HI_MPI_VI_GetExtChnFisheye(VI_PIPE ViPipe, VI_CHN ViChn, FISHEYE_ATTR_S *pstFishEyeAttr);
  102. HI_S32 HI_MPI_VI_SetExtChnAttr(VI_PIPE ViPipe, VI_CHN ViChn, const VI_EXT_CHN_ATTR_S *pstExtChnAttr);
  103. HI_S32 HI_MPI_VI_GetExtChnAttr(VI_PIPE ViPipe, VI_CHN ViChn, VI_EXT_CHN_ATTR_S *pstExtChnAttr);
  104. HI_S32 HI_MPI_VI_GetChnFrame(VI_PIPE ViPipe, VI_CHN ViChn, VIDEO_FRAME_INFO_S *pstFrameInfo, HI_S32 s32MilliSec);
  105. HI_S32 HI_MPI_VI_ReleaseChnFrame(VI_PIPE ViPipe, VI_CHN ViChn, const VIDEO_FRAME_INFO_S *pstFrameInfo);
  106. HI_S32 HI_MPI_VI_SetChnEarlyInterrupt(VI_PIPE ViPipe, VI_CHN ViChn, const VI_EARLY_INTERRUPT_S *pstEarlyInterrupt);
  107. HI_S32 HI_MPI_VI_GetChnEarlyInterrupt(VI_PIPE ViPipe, VI_CHN ViChn, VI_EARLY_INTERRUPT_S *pstEarlyInterrupt);
  108. HI_S32 HI_MPI_VI_QueryChnStatus(VI_PIPE ViPipe, VI_CHN ViChn, VI_CHN_STATUS_S *pstChnStatus);
  109. HI_S32 HI_MPI_VI_GetChnFd(VI_PIPE ViPipe, VI_CHN ViChn);
  110. /* 4 for vi module */
  111. HI_S32 HI_MPI_VI_CloseFd(HI_VOID);
  112. HI_S32 HI_MPI_VI_SetStitchGrpAttr(VI_STITCH_GRP StitchGrp, const VI_STITCH_GRP_ATTR_S *pstStitchGrpAttr);
  113. HI_S32 HI_MPI_VI_GetStitchGrpAttr(VI_STITCH_GRP StitchGrp, VI_STITCH_GRP_ATTR_S *pstStitchGrpAttr);
  114. HI_S32 HI_MPI_VI_SetModParam(const VI_MOD_PARAM_S *pstModParam);
  115. HI_S32 HI_MPI_VI_GetModParam(VI_MOD_PARAM_S *pstModParam);
  116. HI_S32 HI_MPI_VI_SetChnAlign(VI_PIPE ViPipe, VI_CHN ViChn, HI_U32 u32Align);
  117. HI_S32 HI_MPI_VI_GetChnAlign(VI_PIPE ViPipe, VI_CHN ViChn, HI_U32 *pu32Align);
  118. #ifdef __cplusplus
  119. #if __cplusplus
  120. }
  121. #endif
  122. #endif /* __cplusplus */
  123. #endif /*__MPI_VI_H__ */