hi_comm_vo.h 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504
  1. /******************************************************************************
  2. Copyright (C), 2017, Hisilicon Tech. Co., Ltd.
  3. ******************************************************************************
  4. File Name : hi_comm_vo.h
  5. Version : Initial Draft
  6. Author : Hisilicon multimedia software group
  7. Created : 2016/11/09
  8. Last Modified :
  9. Description : Common defination Of video output
  10. Function List :
  11. ******************************************************************************/
  12. #ifndef __HI_COMM_VO_H__
  13. #define __HI_COMM_VO_H__
  14. #include "hi_type.h"
  15. #include "hi_common.h"
  16. #include "hi_comm_video.h"
  17. #ifdef __cplusplus
  18. #if __cplusplus
  19. extern "C"{
  20. #endif
  21. #endif /* End of #ifdef __cplusplus */
  22. typedef enum hiEN_VOU_ERR_CODE_E
  23. {
  24. EN_ERR_VO_DEV_NOT_CONFIG = 0x40,
  25. EN_ERR_VO_DEV_NOT_ENABLE = 0x41,
  26. EN_ERR_VO_DEV_HAS_ENABLED = 0x42,
  27. EN_ERR_VO_DEV_HAS_BINDED = 0x43,
  28. EN_ERR_VO_DEV_NOT_BINDED = 0x44,
  29. ERR_VO_NOT_ENABLE = 0x45,
  30. ERR_VO_NOT_DISABLE = 0x46,
  31. ERR_VO_NOT_CONFIG = 0x47,
  32. ERR_VO_CHN_NOT_DISABLE = 0x48,
  33. ERR_VO_CHN_NOT_ENABLE = 0x49,
  34. ERR_VO_CHN_NOT_CONFIG = 0x4a,
  35. ERR_VO_CHN_NOT_ALLOC = 0x4b,
  36. ERR_VO_CCD_INVALID_PAT = 0x4c,
  37. ERR_VO_CCD_INVALID_POS = 0x4d,
  38. ERR_VO_WAIT_TIMEOUT = 0x4e,
  39. ERR_VO_INVALID_VFRAME = 0x4f,
  40. ERR_VO_INVALID_RECT_PARA = 0x50,
  41. ERR_VO_SETBEGIN_ALREADY = 0x51,
  42. ERR_VO_SETBEGIN_NOTYET = 0x52,
  43. ERR_VO_SETEND_ALREADY = 0x53,
  44. ERR_VO_SETEND_NOTYET = 0x54,
  45. ERR_VO_GRP_INVALID_ID = 0x55,
  46. ERR_VO_GRP_NOT_CREATE = 0x56,
  47. ERR_VO_GRP_HAS_CREATED = 0x57,
  48. ERR_VO_GRP_NOT_DESTROY = 0x58,
  49. ERR_VO_GRP_CHN_FULL = 0x59,
  50. ERR_VO_GRP_CHN_EMPTY = 0x5a,
  51. ERR_VO_GRP_CHN_NOT_EMPTY = 0x5b,
  52. ERR_VO_GRP_INVALID_SYN_MODE = 0x5c,
  53. ERR_VO_GRP_INVALID_BASE_PTS = 0x5d,
  54. ERR_VO_GRP_NOT_START = 0x5e,
  55. ERR_VO_GRP_NOT_STOP = 0x5f,
  56. ERR_VO_GRP_INVALID_FRMRATE = 0x60,
  57. ERR_VO_GRP_CHN_HAS_REG = 0x61,
  58. ERR_VO_GRP_CHN_NOT_REG = 0x62,
  59. ERR_VO_GRP_CHN_NOT_UNREG = 0x63,
  60. ERR_VO_GRP_BASE_NOT_CFG = 0x64,
  61. ERR_GFX_NOT_DISABLE = 0x65,
  62. ERR_GFX_NOT_BIND = 0x66,
  63. ERR_GFX_NOT_UNBIND = 0x67,
  64. ERR_GFX_INVALID_ID = 0x68,
  65. ERR_VO_WBC_NOT_DISABLE = 0x69,
  66. ERR_VO_WBC_NOT_CONFIG = 0x6a,
  67. ERR_VO_CHN_AREA_OVERLAP = 0x6b,
  68. EN_ERR_INVALID_WBCID = 0x6c,
  69. EN_ERR_INVALID_LAYERID = 0x6d,
  70. EN_ERR_VO_VIDEO_HAS_BINDED = 0x6e,
  71. EN_ERR_VO_VIDEO_NOT_BINDED = 0x6f,
  72. ERR_VO_WBC_HAS_BIND = 0x70,
  73. ERR_VO_WBC_HAS_CONFIG = 0x71,
  74. ERR_VO_WBC_NOT_BIND = 0x72,
  75. /* new added */
  76. ERR_VO_BUTT
  77. }EN_VOU_ERR_CODE_E;
  78. /* System define error code */
  79. #define HI_ERR_VO_BUSY HI_DEF_ERR(HI_ID_VO, EN_ERR_LEVEL_ERROR, EN_ERR_BUSY)
  80. #define HI_ERR_VO_NO_MEM HI_DEF_ERR(HI_ID_VO, EN_ERR_LEVEL_ERROR, EN_ERR_NOMEM)
  81. #define HI_ERR_VO_NULL_PTR HI_DEF_ERR(HI_ID_VO, EN_ERR_LEVEL_ERROR, EN_ERR_NULL_PTR)
  82. #define HI_ERR_VO_SYS_NOTREADY HI_DEF_ERR(HI_ID_VO, EN_ERR_LEVEL_ERROR, EN_ERR_SYS_NOTREADY)
  83. #define HI_ERR_VO_INVALID_DEVID HI_DEF_ERR(HI_ID_VO, EN_ERR_LEVEL_ERROR, EN_ERR_INVALID_DEVID)
  84. #define HI_ERR_VO_INVALID_CHNID HI_DEF_ERR(HI_ID_VO, EN_ERR_LEVEL_ERROR, EN_ERR_INVALID_CHNID)
  85. #define HI_ERR_VO_ILLEGAL_PARAM HI_DEF_ERR(HI_ID_VO, EN_ERR_LEVEL_ERROR, EN_ERR_ILLEGAL_PARAM)
  86. #define HI_ERR_VO_NOT_SUPPORT HI_DEF_ERR(HI_ID_VO, EN_ERR_LEVEL_ERROR, EN_ERR_NOT_SUPPORT)
  87. #define HI_ERR_VO_NOT_PERMIT HI_DEF_ERR(HI_ID_VO, EN_ERR_LEVEL_ERROR, EN_ERR_NOT_PERM)
  88. #define HI_ERR_VO_INVALID_WBCID HI_DEF_ERR(HI_ID_VO, EN_ERR_LEVEL_ERROR, EN_ERR_INVALID_WBCID)
  89. #define HI_ERR_VO_INVALID_LAYERID HI_DEF_ERR(HI_ID_VO, EN_ERR_LEVEL_ERROR, EN_ERR_INVALID_LAYERID)
  90. /* Device relative error code */
  91. #define HI_ERR_VO_DEV_NOT_CONFIG HI_DEF_ERR(HI_ID_VO, EN_ERR_LEVEL_ERROR, EN_ERR_VO_DEV_NOT_CONFIG)
  92. #define HI_ERR_VO_DEV_NOT_ENABLE HI_DEF_ERR(HI_ID_VO, EN_ERR_LEVEL_ERROR, EN_ERR_VO_DEV_NOT_ENABLE)
  93. #define HI_ERR_VO_DEV_HAS_ENABLED HI_DEF_ERR(HI_ID_VO, EN_ERR_LEVEL_ERROR, EN_ERR_VO_DEV_HAS_ENABLED)
  94. #define HI_ERR_VO_DEV_HAS_BINDED HI_DEF_ERR(HI_ID_VO, EN_ERR_LEVEL_ERROR, EN_ERR_VO_DEV_HAS_BINDED)
  95. #define HI_ERR_VO_DEV_NOT_BINDED HI_DEF_ERR(HI_ID_VO, EN_ERR_LEVEL_ERROR, EN_ERR_VO_DEV_NOT_BINDED)
  96. /* Video layer relative error code */
  97. #define HI_ERR_VO_VIDEO_NOT_ENABLE HI_DEF_ERR(HI_ID_VO, EN_ERR_LEVEL_ERROR, ERR_VO_NOT_ENABLE)
  98. #define HI_ERR_VO_VIDEO_NOT_DISABLE HI_DEF_ERR(HI_ID_VO, EN_ERR_LEVEL_ERROR, ERR_VO_NOT_DISABLE)
  99. #define HI_ERR_VO_VIDEO_NOT_CONFIG HI_DEF_ERR(HI_ID_VO, EN_ERR_LEVEL_ERROR, ERR_VO_NOT_CONFIG)
  100. #define HI_ERR_VO_VIDEO_HAS_BINDED HI_DEF_ERR(HI_ID_VO, EN_ERR_LEVEL_ERROR, EN_ERR_VO_VIDEO_HAS_BINDED)
  101. #define HI_ERR_VO_VIDEO_NOT_BINDED HI_DEF_ERR(HI_ID_VO, EN_ERR_LEVEL_ERROR, EN_ERR_VO_VIDEO_NOT_BINDED)
  102. /*WBC Relative error code*/
  103. #define HI_ERR_VO_WBC_NOT_DISABLE HI_DEF_ERR(HI_ID_VO, EN_ERR_LEVEL_ERROR, ERR_VO_WBC_NOT_DISABLE)
  104. #define HI_ERR_VO_WBC_NOT_CONFIG HI_DEF_ERR(HI_ID_VO, EN_ERR_LEVEL_ERROR, ERR_VO_WBC_NOT_CONFIG)
  105. #define HI_ERR_VO_WBC_HAS_CONFIG HI_DEF_ERR(HI_ID_VO, EN_ERR_LEVEL_ERROR, ERR_VO_WBC_HAS_CONFIG)
  106. #define HI_ERR_VO_WBC_NOT_BIND HI_DEF_ERR(HI_ID_VO, EN_ERR_LEVEL_ERROR, ERR_VO_WBC_NOT_BIND)
  107. #define HI_ERR_VO_WBC_HAS_BIND HI_DEF_ERR(HI_ID_VO, EN_ERR_LEVEL_ERROR, ERR_VO_WBC_HAS_BIND)
  108. /* Channel Relative error code */
  109. #define HI_ERR_VO_CHN_NOT_DISABLE HI_DEF_ERR(HI_ID_VO, EN_ERR_LEVEL_ERROR, ERR_VO_CHN_NOT_DISABLE)
  110. #define HI_ERR_VO_CHN_NOT_ENABLE HI_DEF_ERR(HI_ID_VO, EN_ERR_LEVEL_ERROR, ERR_VO_CHN_NOT_ENABLE)
  111. #define HI_ERR_VO_CHN_NOT_CONFIG HI_DEF_ERR(HI_ID_VO, EN_ERR_LEVEL_ERROR, ERR_VO_CHN_NOT_CONFIG)
  112. #define HI_ERR_VO_CHN_NOT_ALLOC HI_DEF_ERR(HI_ID_VO, EN_ERR_LEVEL_ERROR, ERR_VO_CHN_NOT_ALLOC)
  113. #define HI_ERR_VO_CHN_AREA_OVERLAP HI_DEF_ERR(HI_ID_VO, EN_ERR_LEVEL_ERROR, ERR_VO_CHN_AREA_OVERLAP)
  114. /* Cascade Relatvie error code */
  115. #define HI_ERR_VO_INVALID_PATTERN HI_DEF_ERR(HI_ID_VO, EN_ERR_LEVEL_ERROR, ERR_VO_CCD_INVALID_PAT)
  116. #define HI_ERR_VO_INVALID_POSITION HI_DEF_ERR(HI_ID_VO, EN_ERR_LEVEL_ERROR, ERR_VO_CCD_INVALID_POS)
  117. /* MISCellaneous error code*/
  118. #define HI_ERR_VO_WAIT_TIMEOUT HI_DEF_ERR(HI_ID_VO, EN_ERR_LEVEL_ERROR, ERR_VO_WAIT_TIMEOUT)
  119. #define HI_ERR_VO_INVALID_VFRAME HI_DEF_ERR(HI_ID_VO, EN_ERR_LEVEL_ERROR, ERR_VO_INVALID_VFRAME)
  120. #define HI_ERR_VO_INVALID_RECT_PARA HI_DEF_ERR(HI_ID_VO, EN_ERR_LEVEL_ERROR, ERR_VO_INVALID_RECT_PARA)
  121. #define HI_ERR_VO_SETBEGIN_ALREADY HI_DEF_ERR(HI_ID_VO, EN_ERR_LEVEL_ERROR, ERR_VO_SETBEGIN_ALREADY)
  122. #define HI_ERR_VO_SETBEGIN_NOTYET HI_DEF_ERR(HI_ID_VO, EN_ERR_LEVEL_ERROR, ERR_VO_SETBEGIN_NOTYET)
  123. #define HI_ERR_VO_SETEND_ALREADY HI_DEF_ERR(HI_ID_VO, EN_ERR_LEVEL_ERROR, ERR_VO_SETEND_ALREADY)
  124. #define HI_ERR_VO_SETEND_NOTYET HI_DEF_ERR(HI_ID_VO, EN_ERR_LEVEL_ERROR, ERR_VO_SETEND_NOTYET)
  125. /* Synchronization group relative error code */
  126. #define HI_ERR_VO_GRP_INVALID_ID HI_DEF_ERR(HI_ID_VO, EN_ERR_LEVEL_ERROR, ERR_VO_GRP_INVALID_ID)
  127. #define HI_ERR_VO_GRP_NOT_CREATE HI_DEF_ERR(HI_ID_VO, EN_ERR_LEVEL_ERROR, ERR_VO_GRP_NOT_CREATE)
  128. #define HI_ERR_VO_GRP_HAS_CREATED HI_DEF_ERR(HI_ID_VO, EN_ERR_LEVEL_ERROR, ERR_VO_GRP_HAS_CREATED)
  129. #define HI_ERR_VO_GRP_NOT_DESTROY HI_DEF_ERR(HI_ID_VO, EN_ERR_LEVEL_ERROR, ERR_VO_GRP_NOT_DESTROY)
  130. #define HI_ERR_VO_GRP_CHN_FULL HI_DEF_ERR(HI_ID_VO, EN_ERR_LEVEL_ERROR, ERR_VO_GRP_CHN_FULL)
  131. #define HI_ERR_VO_GRP_CHN_EMPTY HI_DEF_ERR(HI_ID_VO, EN_ERR_LEVEL_ERROR, ERR_VO_GRP_CHN_EMPTY)
  132. #define HI_ERR_VO_GRP_CHN_NOT_EMPTY HI_DEF_ERR(HI_ID_VO, EN_ERR_LEVEL_ERROR, ERR_VO_GRP_CHN_NOT_EMPTY)
  133. #define HI_ERR_VO_GRP_INVALID_SYN_MODE HI_DEF_ERR(HI_ID_VO, EN_ERR_LEVEL_ERROR, ERR_VO_GRP_INVALID_SYN_MODE)
  134. #define HI_ERR_VO_GRP_INVALID_BASE_PTS HI_DEF_ERR(HI_ID_VO, EN_ERR_LEVEL_ERROR, ERR_VO_GRP_INVALID_BASE_PTS)
  135. #define HI_ERR_VO_GRP_NOT_START HI_DEF_ERR(HI_ID_VO, EN_ERR_LEVEL_ERROR, ERR_VO_GRP_NOT_START)
  136. #define HI_ERR_VO_GRP_NOT_STOP HI_DEF_ERR(HI_ID_VO, EN_ERR_LEVEL_ERROR, ERR_VO_GRP_NOT_STOP)
  137. #define HI_ERR_VO_GRP_INVALID_FRMRATE HI_DEF_ERR(HI_ID_VO, EN_ERR_LEVEL_ERROR, ERR_VO_GRP_INVALID_FRMRATE)
  138. #define HI_ERR_VO_GRP_CHN_HAS_REG HI_DEF_ERR(HI_ID_VO, EN_ERR_LEVEL_ERROR, ERR_VO_GRP_CHN_HAS_REG)
  139. #define HI_ERR_VO_GRP_CHN_NOT_REG HI_DEF_ERR(HI_ID_VO, EN_ERR_LEVEL_ERROR, ERR_VO_GRP_CHN_NOT_REG)
  140. #define HI_ERR_VO_GRP_CHN_NOT_UNREG HI_DEF_ERR(HI_ID_VO, EN_ERR_LEVEL_ERROR, ERR_VO_GRP_CHN_NOT_UNREG)
  141. #define HI_ERR_VO_GRP_BASE_NOT_CFG HI_DEF_ERR(HI_ID_VO, EN_ERR_LEVEL_ERROR, ERR_VO_GRP_BASE_NOT_CFG)
  142. /* Graphics layer relative error code */
  143. #define HI_ERR_VO_GFX_NOT_DISABLE HI_DEF_ERR(HI_ID_VO, EN_ERR_LEVEL_ERROR, ERR_GFX_NOT_DISABLE)
  144. #define HI_ERR_VO_GFX_NOT_BIND HI_DEF_ERR(HI_ID_VO, EN_ERR_LEVEL_ERROR, ERR_GFX_NOT_BIND)
  145. #define HI_ERR_VO_GFX_NOT_UNBIND HI_DEF_ERR(HI_ID_VO, EN_ERR_LEVEL_ERROR, ERR_GFX_NOT_UNBIND)
  146. #define HI_ERR_VO_GFX_INVALID_ID HI_DEF_ERR(HI_ID_VO, EN_ERR_LEVEL_ERROR, ERR_GFX_INVALID_ID)
  147. /* VO video output interface type */
  148. #define VO_INTF_CVBS (0x01L<<0)
  149. #define VO_INTF_YPBPR (0x01L<<1)
  150. #define VO_INTF_VGA (0x01L<<2)
  151. #define VO_INTF_BT656 (0x01L<<3)
  152. #define VO_INTF_BT1120 (0x01L<<4)
  153. #define VO_INTF_HDMI (0x01L<<5)
  154. #define VO_INTF_LCD (0x01L<<6)
  155. #define VO_INTF_BT656_H (0x01L<<7)
  156. #define VO_INTF_BT656_L (0x01L<<8)
  157. #define VO_INTF_LCD_6BIT (0x01L<<9)
  158. #define VO_INTF_LCD_8BIT (0x01L<<10)
  159. #define VO_INTF_LCD_16BIT (0x01L<<11)
  160. #define VO_INTF_LCD_18BIT (0x01L<<12)
  161. #define VO_INTF_LCD_24BIT (0x01L<<13)
  162. #define VO_INTF_MIPI (0x01L<<14)
  163. #define VO_INTF_MIPI_SLAVE (0x01L<<15)
  164. typedef HI_U32 VO_INTF_TYPE_E;
  165. typedef enum hiVO_INTF_SYNC_E
  166. {
  167. VO_OUTPUT_PAL = 0, /* PAL standard*/
  168. VO_OUTPUT_NTSC, /* NTSC standard */
  169. VO_OUTPUT_1080P24, /* 1920 x 1080 at 24 Hz. */
  170. VO_OUTPUT_1080P25, /* 1920 x 1080 at 25 Hz. */
  171. VO_OUTPUT_1080P30, /* 1920 x 1080 at 30 Hz. */
  172. VO_OUTPUT_720P50, /* 1280 x 720 at 50 Hz. */
  173. VO_OUTPUT_720P60, /* 1280 x 720 at 60 Hz. */
  174. VO_OUTPUT_1080I50, /* 1920 x 1080 at 50 Hz, interlace. */
  175. VO_OUTPUT_1080I60, /* 1920 x 1080 at 60 Hz, interlace. */
  176. VO_OUTPUT_1080P50, /* 1920 x 1080 at 50 Hz. */
  177. VO_OUTPUT_1080P60, /* 1920 x 1080 at 60 Hz. */
  178. VO_OUTPUT_576P50, /* 720 x 576 at 50 Hz. */
  179. VO_OUTPUT_480P60, /* 720 x 480 at 60 Hz. */
  180. VO_OUTPUT_800x600_60, /* VESA 800 x 600 at 60 Hz (non-interlaced) */
  181. VO_OUTPUT_1024x768_60, /* VESA 1024 x 768 at 60 Hz (non-interlaced) */
  182. VO_OUTPUT_1280x1024_60, /* VESA 1280 x 1024 at 60 Hz (non-interlaced) */
  183. VO_OUTPUT_1366x768_60, /* VESA 1366 x 768 at 60 Hz (non-interlaced) */
  184. VO_OUTPUT_1440x900_60, /* VESA 1440 x 900 at 60 Hz (non-interlaced) CVT Compliant */
  185. VO_OUTPUT_1280x800_60, /* 1280*800@60Hz VGA@60Hz*/
  186. VO_OUTPUT_1600x1200_60, /* VESA 1600 x 1200 at 60 Hz (non-interlaced) */
  187. VO_OUTPUT_1680x1050_60, /* VESA 1680 x 1050 at 60 Hz (non-interlaced) */
  188. VO_OUTPUT_1920x1200_60, /* VESA 1920 x 1600 at 60 Hz (non-interlaced) CVT (Reduced Blanking)*/
  189. VO_OUTPUT_640x480_60, /* VESA 640 x 480 at 60 Hz (non-interlaced) CVT */
  190. VO_OUTPUT_960H_PAL, /* ITU-R BT.1302 960 x 576 at 50 Hz (interlaced)*/
  191. VO_OUTPUT_960H_NTSC, /* ITU-R BT.1302 960 x 480 at 60 Hz (interlaced)*/
  192. VO_OUTPUT_1920x2160_30, /* 1920x2160_30 */
  193. VO_OUTPUT_2560x1440_30, /* 2560x1440_30 */
  194. VO_OUTPUT_2560x1600_60, /* 2560x1600_60 */
  195. VO_OUTPUT_3840x2160_24, /* 3840x2160_24 */
  196. VO_OUTPUT_3840x2160_25, /* 3840x2160_25 */
  197. VO_OUTPUT_3840x2160_30, /* 3840x2160_30 */
  198. VO_OUTPUT_3840x2160_50, /* 3840x2160_50 */
  199. VO_OUTPUT_3840x2160_60, /* 3840x2160_60 */
  200. VO_OUTPUT_4096x2160_24, /* 4096x2160_24 */
  201. VO_OUTPUT_4096x2160_25, /* 4096x2160_25 */
  202. VO_OUTPUT_4096x2160_30, /* 4096x2160_30 */
  203. VO_OUTPUT_4096x2160_50, /* 4096x2160_50 */
  204. VO_OUTPUT_4096x2160_60, /* 4096x2160_60 */
  205. VO_OUTPUT_320x240_60, /* For ota5182 at 60 Hz (8bit) */
  206. VO_OUTPUT_320x240_50, /* For ili9342 at 50 Hz (6bit) */
  207. VO_OUTPUT_240x320_50, /* For ili9341 at 50 Hz (6bit) */
  208. VO_OUTPUT_240x320_60, /* For ili9341 at 60 Hz (16bit) */
  209. VO_OUTPUT_800x600_50, /* For LCD at 50 Hz (24bit) */
  210. VO_OUTPUT_720x1280_60, /* For MIPI DSI Tx 720 x1280 at 60 Hz */
  211. VO_OUTPUT_1080x1920_60, /* For MIPI DSI Tx 1080x1920 at 60 Hz */
  212. VO_OUTPUT_7680x4320_30, /* For HDMI2.0 at 30 Hz */
  213. VO_OUTPUT_USER, /* User timing. */
  214. VO_OUTPUT_BUTT
  215. } VO_INTF_SYNC_E;
  216. typedef struct hiVO_GRAPHIC_ATTR_S
  217. {
  218. DYNAMIC_RANGE_E enDstDynamicRange; /* Destination dynamic range type */
  219. }VO_GRAPHIC_ATTR_S;
  220. typedef enum hiVO_ZOOM_IN_E
  221. {
  222. VO_ZOOM_IN_RECT = 0, /* Zoom in by rect */
  223. VO_ZOOM_IN_RATIO, /* Zoom in by ratio */
  224. VO_ZOOM_IN_BUTT
  225. } VO_ZOOM_IN_E;
  226. typedef enum hiVO_CSC_MATRIX_E
  227. {
  228. VO_CSC_MATRIX_IDENTITY = 0, /* Identity CSC matrix. */
  229. VO_CSC_MATRIX_BT601_TO_BT709, /* BT601 to BT709 */
  230. VO_CSC_MATRIX_BT709_TO_BT601, /* BT709 to BT601 */
  231. VO_CSC_MATRIX_BT601_TO_RGB_PC, /* BT601 to RGB */
  232. VO_CSC_MATRIX_BT709_TO_RGB_PC, /* BT709 to RGB */
  233. VO_CSC_MATRIX_RGB_TO_BT601_PC, /* RGB to BT601 FULL */
  234. VO_CSC_MATRIX_RGB_TO_BT709_PC, /* RGB to BT709 FULL */
  235. VO_CSC_MATRIX_RGB_TO_BT2020_PC, /* RGB to BT.2020 */
  236. VO_CSC_MATRIX_BT2020_TO_RGB_PC, /* BT.2020 to RGB */
  237. VO_CSC_MATRIX_RGB_TO_BT601_TV, /* RGB to BT601 LIMIT */
  238. VO_CSC_MATRIX_RGB_TO_BT709_TV, /* RGB to BT709 LIMIT */
  239. VO_CSC_MATRIX_BUTT
  240. } VO_CSC_MATRIX_E;
  241. typedef struct hiVO_CHN_ATTR_S
  242. {
  243. HI_U32 u32Priority; /* Video out overlay pri sd */
  244. RECT_S stRect; /* Rectangle of video output channel */
  245. HI_BOOL bDeflicker; /* Deflicker or not sd */
  246. }VO_CHN_ATTR_S;
  247. typedef struct hiVO_CHN_PARAM_S
  248. {
  249. ASPECT_RATIO_S stAspectRatio; /* RW; aspect ratio */
  250. }VO_CHN_PARAM_S;
  251. typedef struct hiVO_BORDER_S
  252. {
  253. HI_BOOL bBorderEn; /* RW; Do frame or not*/
  254. BORDER_S stBorder; /* RW; frame's top, bottom, left, right width and color*/
  255. }VO_BORDER_S;
  256. typedef struct hiVO_QUERY_STATUS_S
  257. {
  258. HI_U32 u32ChnBufUsed; /* Channel buffer that been occupied */
  259. } VO_QUERY_STATUS_S;
  260. typedef struct tagVO_SYNC_INFO_S
  261. {
  262. HI_BOOL bSynm; /* RW; sync mode(0:timing,as BT.656; 1:signal,as LCD) */
  263. HI_BOOL bIop; /* RW; interlaced or progressive display(0:i; 1:p) */
  264. HI_U8 u8Intfb; /* RW; interlace bit width while output */
  265. HI_U16 u16Vact ; /* RW; vertical active area */
  266. HI_U16 u16Vbb; /* RW; vertical back blank porch */
  267. HI_U16 u16Vfb; /* RW; vertical front blank porch */
  268. HI_U16 u16Hact; /* RW; herizontal active area */
  269. HI_U16 u16Hbb; /* RW; herizontal back blank porch */
  270. HI_U16 u16Hfb; /* RW; herizontal front blank porch */
  271. HI_U16 u16Hmid; /* RW; bottom herizontal active area */
  272. HI_U16 u16Bvact; /* RW; bottom vertical active area */
  273. HI_U16 u16Bvbb; /* RW; bottom vertical back blank porch */
  274. HI_U16 u16Bvfb; /* RW; bottom vertical front blank porch */
  275. HI_U16 u16Hpw; /* RW; horizontal pulse width */
  276. HI_U16 u16Vpw; /* RW; vertical pulse width */
  277. HI_BOOL bIdv; /* RW; inverse data valid of output */
  278. HI_BOOL bIhs; /* RW; inverse horizontal synch signal */
  279. HI_BOOL bIvs; /* RW; inverse vertical synch signal */
  280. } VO_SYNC_INFO_S;
  281. typedef struct hiVO_PUB_ATTR_S
  282. {
  283. HI_U32 u32BgColor; /* RW; Background color of a device, in RGB format. */
  284. VO_INTF_TYPE_E enIntfType; /* RW; Type of a VO interface */
  285. VO_INTF_SYNC_E enIntfSync; /* RW; Type of a VO interface timing */
  286. VO_SYNC_INFO_S stSyncInfo; /* RW; Information about VO interface timings */
  287. } VO_PUB_ATTR_S;
  288. typedef struct hiVO_WBC_ATTR_S
  289. {
  290. SIZE_S stTargetSize; /* RW; WBC Zoom target size */
  291. PIXEL_FORMAT_E enPixelFormat; /* RW; the pixel format of WBC output */
  292. HI_U32 u32FrameRate; /* RW; frame rate control */
  293. DYNAMIC_RANGE_E enDynamicRange; /* RW; Write back dynamic range type*/
  294. COMPRESS_MODE_E enCompressMode; /* RW; Write back Compressing mode */
  295. } VO_WBC_ATTR_S;
  296. typedef enum hiVO_WBC_MODE_E
  297. {
  298. VO_WBC_MODE_NORMAL = 0, /* In this mode, wbc will capture frames according to dev frame rate
  299. and wbc frame rate */
  300. VO_WBC_MODE_DROP_REPEAT, /* In this mode, wbc will drop dev repeat frame, and capture the real frame
  301. according to video layer's display rate and wbc frame rate */
  302. VO_WBC_MODE_PROG_TO_INTL, /* In this mode, wbc will drop dev repeat frame which repeats more than 3 times,
  303. and change two progressive frames to one interlace frame */
  304. VO_WBC_MODE_BUTT,
  305. } VO_WBC_MODE_E;
  306. typedef enum hiVO_WBC_SOURCE_TYPE_E
  307. {
  308. VO_WBC_SOURCE_DEV = 0x0, /* WBC source is device */
  309. VO_WBC_SOURCE_VIDEO = 0x1, /* WBC source is video layer*/
  310. VO_WBC_SOURCE_GRAPHIC = 0x2, /* WBC source is graphic layer. Warning: not supported */
  311. VO_WBC_SOURCE_BUTT
  312. } VO_WBC_SOURCE_TYPE_E;
  313. typedef struct hiVO_WBC_SOURCE_S
  314. {
  315. VO_WBC_SOURCE_TYPE_E enSourceType; /* RW; WBC source's type */
  316. HI_U32 u32SourceId; /* RW; WBC source's ID */
  317. } VO_WBC_SOURCE_S;
  318. typedef enum hiVO_PART_MODE_E
  319. {
  320. VO_PART_MODE_SINGLE = 0, /* single partition, which use software to make multi-picture in one hardware cell */
  321. VO_PART_MODE_MULTI = 1, /* muliti partition, each partition is a hardware cell */
  322. VO_PART_MODE_BUTT
  323. } VO_PART_MODE_E;
  324. typedef struct hiVO_VIDEO_LAYER_ATTR_S
  325. {
  326. RECT_S stDispRect; /* RW; Display resolution */
  327. SIZE_S stImageSize; /* RW; Canvas size of the video layer */
  328. HI_U32 u32DispFrmRt; /* RW; Display frame rate */
  329. PIXEL_FORMAT_E enPixFormat; /* RW; Pixel format of the video layer */
  330. HI_BOOL bDoubleFrame; /* RW; Whether to double frames */
  331. HI_BOOL bClusterMode; /* RW; Whether to take Cluster way to use memory*/
  332. DYNAMIC_RANGE_E enDstDynamicRange; /* RW; Video Layer output dynamic range type*/
  333. } VO_VIDEO_LAYER_ATTR_S;
  334. typedef struct hiVO_LAYER_PARAM_S
  335. {
  336. ASPECT_RATIO_S stAspectRatio; /* RW; aspect ratio */
  337. }VO_LAYER_PARAM_S;
  338. typedef struct hiVO_ZOOM_RATIO_S
  339. {
  340. HI_U32 u32XRatio; /* RW; Range: [0,1000]; XRatio = x * 1000 / W , x means the start point to be zoomed, W means displaying channel's width. */
  341. HI_U32 u32YRatio; /* RW; Range: [0,1000]; YRatio = y * 1000 / H , y means the start point to be zoomed, H means displaying channel's height. */
  342. HI_U32 u32WRatio; /* RW; Range: [0,1000]; WRatio = w * 1000 / W , w means the width to be zoomed, W means displaying channel's width. */
  343. HI_U32 u32HRatio; /* RW; Range: [0,1000]; HRatio = h * 1000 / H , h means the height to be zoomed, H means displaying channel's height. */
  344. } VO_ZOOM_RATIO_S;
  345. typedef struct hiVO_ZOOM_ATTR_S
  346. {
  347. VO_ZOOM_IN_E enZoomType; /* choose the type of zoom in */
  348. union
  349. {
  350. RECT_S stZoomRect; /* zoom in by rect */
  351. VO_ZOOM_RATIO_S stZoomRatio; /* zoom in by ratio */
  352. };
  353. } VO_ZOOM_ATTR_S;
  354. typedef struct hiVO_CSC_S
  355. {
  356. VO_CSC_MATRIX_E enCscMatrix; /* CSC matrix */
  357. HI_U32 u32Luma; /* RW; Range: [0, 100]; luminance, default: 50 */
  358. HI_U32 u32Contrast; /* RW; Range: [0, 100]; contrast, default: 50 */
  359. HI_U32 u32Hue; /* RW; Range: [0, 100]; hue, default: 50 */
  360. HI_U32 u32Satuature; /* RW; Range: [0, 100]; satuature, default: 50 */
  361. } VO_CSC_S;
  362. typedef struct hiVO_REGION_INFO_S
  363. {
  364. HI_U32 u32RegionNum; /* count of the region*/
  365. RECT_S* ATTRIBUTE pstRegion; /* region attribute*/
  366. }VO_REGION_INFO_S;
  367. typedef struct hiVO_LAYER_BOUNDARY_S
  368. {
  369. HI_U32 u32Width;
  370. HI_U32 u32Color[2];
  371. }VO_LAYER_BOUNDARY_S;
  372. typedef struct hiVO_CHN_BOUNDARY_S
  373. {
  374. HI_BOOL bBoundaryEn; /* do Frame or not */
  375. HI_U32 u32ColorIndex; /* the index of Frame color,[0,1] */
  376. }VO_CHN_BOUNDARY_S;
  377. typedef struct hiVO_MOD_PARAM_S
  378. {
  379. HI_BOOL bTransparentTransmit; /* RW, Range: [0, 1]; YC(Luminance and Chrominance) changes or not when passing through VO */
  380. } VO_MOD_PARAM_S;
  381. typedef enum hiVO_CLK_SOURCE_E
  382. {
  383. VO_CLK_SOURCE_PLL,
  384. VO_CLK_SOURCE_LCDMCLK,
  385. VO_CLK_SOURCE_BUTT
  386. } VO_CLK_SOURCE_E;
  387. typedef struct hiVO_USER_INTFSYNC_PLL_S
  388. {
  389. HI_U32 u32Fbdiv;
  390. HI_U32 u32Frac;
  391. HI_U32 u32Refdiv;
  392. HI_U32 u32Postdiv1;
  393. HI_U32 u32Postdiv2;
  394. }VO_USER_INTFSYNC_PLL_S;
  395. typedef struct hiVO_USER_INTFSYNC_ATTR_S
  396. {
  397. VO_CLK_SOURCE_E enClkSource;
  398. union
  399. {
  400. VO_USER_INTFSYNC_PLL_S stUserSyncPll;
  401. HI_U32 u32LcdMClkDiv;
  402. };
  403. } VO_USER_INTFSYNC_ATTR_S;
  404. typedef struct hiVO_USER_INTFSYNC_INFO_S
  405. {
  406. VO_USER_INTFSYNC_ATTR_S stUserIntfSyncAttr;
  407. HI_U32 u32DevDiv;
  408. } VO_USER_INTFSYNC_INFO_S;
  409. #ifdef __cplusplus
  410. #if __cplusplus
  411. }
  412. #endif
  413. #endif /* End of #ifdef __cplusplus */
  414. #endif /* End of #ifndef __HI_COMM_VO_H__ */