hi_comm_sys.h 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  1. /******************************************************************************
  2. Copyright (C), 2001-2018, Hisilicon Tech. Co., Ltd.
  3. ******************************************************************************
  4. File Name : hi_comm_sys.h
  5. Version : Initial Draft
  6. Author : MPP Team
  7. Created : 2007/1/30
  8. Last Modified :
  9. Description : chip specific configure data structure
  10. Function List :
  11. History :
  12. ******************************************************************************/
  13. #ifndef __HI_COMM_SYS_H__
  14. #define __HI_COMM_SYS_H__
  15. #include "hi_type.h"
  16. #include "hi_errno.h"
  17. #include "hi_debug.h"
  18. #ifdef __cplusplus
  19. #if __cplusplus
  20. extern "C" {
  21. #endif
  22. #endif /* End of #ifdef __cplusplus */
  23. #define BIND_DEST_MAXNUM 64
  24. #define HI_TRACE_SYS(level, fmt, ...)\
  25. do{ \
  26. HI_TRACE(level, HI_ID_SYS,"[Func]:%s [Line]:%d [Info]:"fmt,__FUNCTION__, __LINE__,##__VA_ARGS__);\
  27. }while(0)
  28. typedef struct hiMPP_SYS_CONFIG_S
  29. {
  30. HI_U32 u32Align;
  31. } MPP_SYS_CONFIG_S;
  32. typedef struct hiSYS_VIRMEM_INFO_S
  33. {
  34. HI_U64 u64PhyAddr;
  35. HI_BOOL bCached;
  36. } SYS_VIRMEM_INFO_S;
  37. typedef struct hiMPP_BIND_DEST_S
  38. {
  39. HI_U32 u32Num;
  40. MPP_CHN_S astMppChn[BIND_DEST_MAXNUM];
  41. }MPP_BIND_DEST_S;
  42. typedef enum hiSCALE_RANGE_E
  43. {
  44. SCALE_RANGE_0 = 0, /* scale range < 8/64 */
  45. SCALE_RANGE_1, /* scale range >= 8/64 */
  46. SCALE_RANGE_2, /* scale range >= 10/64 */
  47. SCALE_RANGE_3, /* scale range >= 15/64 */
  48. SCALE_RANGE_4, /* scale range >= 19/64 */
  49. SCALE_RANGE_5, /* scale range >= 24/64 */
  50. SCALE_RANGE_6, /* scale range >= 29/64 */
  51. SCALE_RANGE_7, /* scale range >= 33/64 */
  52. SCALE_RANGE_8, /* scale range >= 35/64 */
  53. SCALE_RANGE_9, /* scale range >= 38/64 */
  54. SCALE_RANGE_10, /* scale range >= 42/64 */
  55. SCALE_RANGE_11, /* scale range >= 45/64 */
  56. SCALE_RANGE_12, /* scale range >= 48/64 */
  57. SCALE_RANGE_13, /* scale range >= 51/64 */
  58. SCALE_RANGE_14, /* scale range >= 53/64 */
  59. SCALE_RANGE_15, /* scale range >= 55/64 */
  60. SCALE_RANGE_16, /* scale range >= 57/64 */
  61. SCALE_RANGE_17, /* scale range >= 60/64 */
  62. SCALE_RANGE_18, /* scale range > 1 */
  63. SCALE_RANGE_BUTT,
  64. } SCALE_RANGE_E;
  65. typedef enum hiCOEFF_LEVEL_E
  66. {
  67. COEFF_LEVEL_0 = 0, /* coefficient level 0 */
  68. COEFF_LEVEL_1, /* coefficient level 1 */
  69. COEFF_LEVEL_2, /* coefficient level 2 */
  70. COEFF_LEVEL_3, /* coefficient level 3 */
  71. COEFF_LEVEL_4, /* coefficient level 4 */
  72. COEFF_LEVEL_5, /* coefficient level 5 */
  73. COEFF_LEVEL_6, /* coefficient level 6 */
  74. COEFF_LEVEL_7, /* coefficient level 7 */
  75. COEFF_LEVEL_8, /* coefficient level 8 */
  76. COEFF_LEVEL_9, /* coefficient level 9 */
  77. COEFF_LEVEL_10, /* coefficient level 10 */
  78. COEFF_LEVEL_11, /* coefficient level 11 */
  79. COEFF_LEVEL_12, /* coefficient level 12 */
  80. COEFF_LEVEL_13, /* coefficient level 13 */
  81. COEFF_LEVEL_14, /* coefficient level 14 */
  82. COEFF_LEVEL_15, /* coefficient level 15 */
  83. COEFF_LEVEL_16, /* coefficient level 16 */
  84. COEFF_LEVEL_17, /* coefficient level 17 */
  85. COEFF_LEVEL_18, /* coefficient level 18 */
  86. COEFF_LEVEL_BUTT,
  87. } COEFF_LEVEL_E;
  88. typedef struct hiSCALE_COEFF_LEVEL_S
  89. {
  90. COEFF_LEVEL_E enHorLum; /* horizontal luminance coefficient level */
  91. COEFF_LEVEL_E enHorChr; /* horizontal chrominance coefficient level */
  92. COEFF_LEVEL_E enVerLum; /* vertical luminance coefficient level */
  93. COEFF_LEVEL_E enVerChr; /* vertical chrominance coefficient level */
  94. } SCALE_COEFF_LEVEL_S;
  95. typedef struct hiSCALE_RANGE_S
  96. {
  97. SCALE_RANGE_E enHorizontal;
  98. SCALE_RANGE_E enVertical;
  99. } SCALE_RANGE_S;
  100. typedef struct hiSCALE_COEFF_INFO_S
  101. {
  102. SCALE_RANGE_S stScaleRange;
  103. SCALE_COEFF_LEVEL_S stScaleCoeffLevel;
  104. } SCALE_COEFF_INFO_S;
  105. typedef struct hiGPS_INFO_S
  106. {
  107. HI_CHAR chGPSLatitudeRef; /* GPS LatitudeRef Indicates whether the latitude is north or south latitude,
  108. * 'N'/'S', default 'N' */
  109. HI_U32 au32GPSLatitude[3][2]; /* GPS Latitude is expressed as degrees, minutes and seconds,a typical format like "dd/1,mm/1,ss/1",
  110. * default 0/0, 0/0, 0/0 */
  111. HI_CHAR chGPSLongitudeRef; /* GPS LongitudeRef Indicates whether the longitude is east or west longitude,
  112. * 'E'/'W', default 'E' */
  113. HI_U32 au32GPSLongitude[3][2]; /* GPS Longitude is expressed as degrees, minutes and seconds,a typical format like "dd/1,mm/1,ss/1",
  114. * default 0/0, 0/0, 0/0 */
  115. HI_U8 u8GPSAltitudeRef; /* GPS AltitudeRef Indicates the reference altitude used, 0 - above sea level, 1 - below sea level
  116. * default 0 */
  117. HI_U32 au32GPSAltitude[2]; /* GPS AltitudeRef Indicates the altitude based on the reference u8GPSAltitudeRef, the reference unit is meters,
  118. * default 0/0 */
  119. } GPS_INFO_S;
  120. typedef enum hiVI_VPSS_MODE_E
  121. {
  122. VI_OFFLINE_VPSS_OFFLINE = 0,
  123. VI_OFFLINE_VPSS_ONLINE,
  124. VI_ONLINE_VPSS_OFFLINE,
  125. VI_ONLINE_VPSS_ONLINE,
  126. VI_PARALLEL_VPSS_OFFLINE,
  127. VI_PARALLEL_VPSS_PARALLEL,
  128. VI_VPSS_MODE_BUTT
  129. } VI_VPSS_MODE_E;
  130. typedef struct hiVI_VPSS_MODE_S
  131. {
  132. VI_VPSS_MODE_E aenMode[VI_MAX_PIPE_NUM];
  133. }VI_VPSS_MODE_S;
  134. #define HI_ERR_SYS_NULL_PTR HI_DEF_ERR(HI_ID_SYS, EN_ERR_LEVEL_ERROR, EN_ERR_NULL_PTR)
  135. #define HI_ERR_SYS_NOTREADY HI_DEF_ERR(HI_ID_SYS, EN_ERR_LEVEL_ERROR, EN_ERR_SYS_NOTREADY)
  136. #define HI_ERR_SYS_NOT_PERM HI_DEF_ERR(HI_ID_SYS, EN_ERR_LEVEL_ERROR, EN_ERR_NOT_PERM)
  137. #define HI_ERR_SYS_NOMEM HI_DEF_ERR(HI_ID_SYS, EN_ERR_LEVEL_ERROR, EN_ERR_NOMEM)
  138. #define HI_ERR_SYS_ILLEGAL_PARAM HI_DEF_ERR(HI_ID_SYS, EN_ERR_LEVEL_ERROR, EN_ERR_ILLEGAL_PARAM)
  139. #define HI_ERR_SYS_BUSY HI_DEF_ERR(HI_ID_SYS, EN_ERR_LEVEL_ERROR, EN_ERR_BUSY)
  140. #define HI_ERR_SYS_NOT_SUPPORT HI_DEF_ERR(HI_ID_SYS, EN_ERR_LEVEL_ERROR, EN_ERR_NOT_SUPPORT)
  141. #ifdef __cplusplus
  142. #if __cplusplus
  143. }
  144. #endif
  145. #endif /* __cplusplus */
  146. #endif /* __HI_COMM_SYS_H__ */