hi_comm_avs.h 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. /******************************************************************************
  2. Copyright (C), 2016-2018, Hisilicon Tech. Co., Ltd.
  3. ******************************************************************************
  4. File Name : hi_comm_avs.h
  5. Version : Initial Draft
  6. Author : Hisilicon multimedia software group
  7. Created : 2016/10/20
  8. Description :
  9. ******************************************************************************/
  10. #ifndef __HI_COMM_AVS_H__
  11. #define __HI_COMM_AVS_H__
  12. #include "hi_type.h"
  13. #include "hi_common.h"
  14. #include "hi_comm_video.h"
  15. #ifdef __cplusplus
  16. #if __cplusplus
  17. extern "C" {
  18. #endif
  19. #endif /* End of #ifdef __cplusplus */
  20. #define HI_ERR_AVS_NULL_PTR HI_DEF_ERR(HI_ID_AVS, EN_ERR_LEVEL_ERROR, EN_ERR_NULL_PTR)
  21. #define HI_ERR_AVS_NOTREADY HI_DEF_ERR(HI_ID_AVS, EN_ERR_LEVEL_ERROR, EN_ERR_SYS_NOTREADY)
  22. #define HI_ERR_AVS_INVALID_DEVID HI_DEF_ERR(HI_ID_AVS, EN_ERR_LEVEL_ERROR, EN_ERR_INVALID_DEVID)
  23. #define HI_ERR_AVS_INVALID_PIPEID HI_DEF_ERR(HI_ID_AVS, EN_ERR_LEVEL_ERROR, EN_ERR_INVALID_PIPEID)
  24. #define HI_ERR_AVS_INVALID_CHNID HI_DEF_ERR(HI_ID_AVS, EN_ERR_LEVEL_ERROR, EN_ERR_INVALID_CHNID)
  25. #define HI_ERR_AVS_EXIST HI_DEF_ERR(HI_ID_AVS, EN_ERR_LEVEL_ERROR, EN_ERR_EXIST)
  26. #define HI_ERR_AVS_UNEXIST HI_DEF_ERR(HI_ID_AVS, EN_ERR_LEVEL_ERROR, EN_ERR_UNEXIST)
  27. #define HI_ERR_AVS_NOT_SUPPORT HI_DEF_ERR(HI_ID_AVS, EN_ERR_LEVEL_ERROR, EN_ERR_NOT_SUPPORT)
  28. #define HI_ERR_AVS_NOT_PERM HI_DEF_ERR(HI_ID_AVS, EN_ERR_LEVEL_ERROR, EN_ERR_NOT_PERM)
  29. #define HI_ERR_AVS_NOMEM HI_DEF_ERR(HI_ID_AVS, EN_ERR_LEVEL_ERROR, EN_ERR_NOMEM)
  30. #define HI_ERR_AVS_NOBUF HI_DEF_ERR(HI_ID_AVS, EN_ERR_LEVEL_ERROR, EN_ERR_NOBUF)
  31. #define HI_ERR_AVS_ILLEGAL_PARAM HI_DEF_ERR(HI_ID_AVS, EN_ERR_LEVEL_ERROR, EN_ERR_ILLEGAL_PARAM)
  32. #define HI_ERR_AVS_BUSY HI_DEF_ERR(HI_ID_AVS, EN_ERR_LEVEL_ERROR, EN_ERR_BUSY)
  33. #define HI_ERR_AVS_BUF_EMPTY HI_DEF_ERR(HI_ID_AVS, EN_ERR_LEVEL_ERROR, EN_ERR_BUF_EMPTY)
  34. typedef enum hiAVS_LUT_ACCURACY_E
  35. {
  36. AVS_LUT_ACCURACY_HIGH = 0, /* LUT high accuracy. */
  37. AVS_LUT_ACCURACY_LOW = 1, /* LUT low accuracy. */
  38. AVS_LUT_ACCURACY_BUTT
  39. }AVS_LUT_ACCURACY_E;
  40. typedef struct hiAVS_LUT_S
  41. {
  42. AVS_LUT_ACCURACY_E enAccuracy; /* RW; LUT accuracy. */
  43. HI_U64 u64PhyAddr[AVS_PIPE_NUM]; /* RW; Physical address of the LUT. */
  44. }AVS_LUT_S;
  45. typedef enum hiAVS_PROJECTION_MODE_E
  46. {
  47. AVS_PROJECTION_EQUIRECTANGULAR = 0, /* Equirectangular mode. */
  48. AVS_PROJECTION_RECTILINEAR = 1, /* Rectilinear mode. */
  49. AVS_PROJECTION_CYLINDRICAL = 2, /* Cylindrical mode. */
  50. AVS_PROJECTION_CUBE_MAP = 3, /* Cube map mode. */
  51. AVS_PROJECTION_BUTT
  52. }AVS_PROJECTION_MODE_E;
  53. typedef enum hiAVS_GAIN_MODE_E
  54. {
  55. AVS_GAIN_MODE_MANUAL = 0, /* Manual gain mode. */
  56. AVS_GAIN_MODE_AUTO = 1, /* Auto gain mode. */
  57. AVS_GAIN_MODE_BUTT
  58. }AVS_GAIN_MODE_E;
  59. typedef enum hiAVS_MODE_E
  60. {
  61. AVS_MODE_BLEND = 0, /* Stitching in blend mode. */
  62. AVS_MODE_NOBLEND_VER = 1, /* Vertical stitching, no blending. */
  63. AVS_MODE_NOBLEND_HOR = 2, /* Horizontal stitching, no blending. */
  64. AVS_MODE_NOBLEND_QR = 3, /* Quarter stitching, no blending. */
  65. AVS_MODE_BUTT
  66. }AVS_MODE_E;
  67. typedef struct hiAVS_GAIN_ATTR_S
  68. {
  69. AVS_GAIN_MODE_E enMode; /* RW; Gain mode. */
  70. HI_S32 s32Coef[AVS_PIPE_NUM]; /* RW; Range: [0, 65535]; Gain coef. */
  71. }AVS_GAIN_ATTR_S;
  72. typedef struct hiAVS_ROTATION_S
  73. {
  74. HI_S32 s32Yaw; /* RW; Range: [-18000, 18000]; Yaw angle. */
  75. HI_S32 s32Pitch; /* RW; Range: [-18000, 18000]; Pitch angle. */
  76. HI_S32 s32Roll; /* RW; Range: [-18000, 18000]; Roll angle. */
  77. }AVS_ROTATION_S;
  78. typedef struct hiAVS_FOV_S
  79. {
  80. HI_U32 u32FOVX; /* RW; Range: [1000, 36000]; Horizontal FOV. */
  81. HI_U32 u32FOVY; /* RW; Range: [1000, 18000]; Vertical FOV. */
  82. }AVS_FOV_S;
  83. typedef struct hiAVS_SPLIT_ATTR_S
  84. {
  85. HI_U32 u32PipeNum; /* RW; Range: [2, 6]; Pipe number in the split. */
  86. AVS_PIPE AVSPipe[AVS_SPLIT_PIPE_NUM]; /* RW; Range: [0, 7]; Pipe IDs in the split. */
  87. }AVS_SPLIT_ATTR_S;
  88. typedef struct hiAVS_CUBE_MAP_ATTR_S
  89. {
  90. HI_BOOL bBgColor; /* RW; whether use background color or not. */
  91. HI_U32 u32BgColor; /* RW; Range: [0, 0xFFFFFF]; Backgroud color. */
  92. HI_U32 u32SurfaceLength; /* RW; Range: [256, 4096]; Surface length. */
  93. POINT_S stStartPoint[AVS_CUBE_MAP_SURFACE_NUM]; /* RW; Start point of each surface. */
  94. }AVS_CUBE_MAP_ATTR_S;
  95. typedef struct hiAVS_OUTPUT_ATTR_S
  96. {
  97. AVS_PROJECTION_MODE_E enPrjMode; /* RW; Projection mode. */
  98. POINT_S stCenter; /* Center point. */
  99. AVS_FOV_S stFOV; /* Output FOV. */
  100. AVS_ROTATION_S stORIRotation; /* Output original rotation. */
  101. AVS_ROTATION_S stRotation; /* Output rotation. */
  102. AVS_SPLIT_ATTR_S stSplitAttr[AVS_SPLIT_NUM]; /* Split attribute for 7 or 8 inputs stitching. */
  103. AVS_CUBE_MAP_ATTR_S stCubeMapAttr; /* Cube map attribute. */
  104. }AVS_OUTPUT_ATTR_S;
  105. typedef struct hiAVS_GRP_ATTR_S
  106. {
  107. AVS_MODE_E enMode; /* Group work mode */
  108. HI_U32 u32PipeNum; /* RW; Range: Hi3559AV100ES = [1, 6] | Hi3559AV100 = [1, 8] | Hi3519AV100 = [1, 4]; Pipe number. */
  109. HI_BOOL bSyncPipe; /* RW; Whether sync pipe image. */
  110. AVS_LUT_S stLUT; /* Look up table. */
  111. AVS_GAIN_ATTR_S stGainAttr; /* Gain attribute. */
  112. HI_U64 u64BBoxPhyAddr[AVS_PIPE_NUM]; /* Physical address of bounding box data. */
  113. AVS_OUTPUT_ATTR_S stOutAttr; /* Output attribute. */
  114. FRAME_RATE_CTRL_S stFrameRate; /* Frame rate control info. */
  115. } AVS_GRP_ATTR_S;
  116. typedef struct hiAVS_CHN_ATTR_S
  117. {
  118. HI_U32 u32Width; /* RW; Range: Hi3559AV100ES = [256, 16384] | Hi3559AV100 = [256, 16384] | Hi3519AV100 = [256, 8192]; Width of target image. */
  119. HI_U32 u32Height; /* RW; Range: [256, 8192]; Height of target image. */
  120. COMPRESS_MODE_E enCompressMode; /* RW; Compression mode of the output. */
  121. DYNAMIC_RANGE_E enDynamicRange; /* RW; Dynamic range. */
  122. HI_U32 u32Depth; /* RW; Range: [0, 8]; Chn user list depth. */
  123. FRAME_RATE_CTRL_S stFrameRate; /* Frame rate control info. */
  124. }AVS_CHN_ATTR_S;
  125. typedef struct hiAVS_MOD_PARAM_S
  126. {
  127. HI_U32 u32WorkingSetSize; /* Working set size. */
  128. }AVS_MOD_PARAM_S;
  129. #ifdef __cplusplus
  130. #if __cplusplus
  131. }
  132. #endif
  133. #endif /* End of #ifdef __cplusplus */
  134. #endif /* End of #ifndef __HI_COMM_AVS_H__ */