hi_comm_video.h 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591
  1. /******************************************************************************
  2. Copyright (C), 2016, Hisilicon Tech. Co., Ltd.
  3. ******************************************************************************
  4. File Name : hi_comm_video.h
  5. Version : Initial Draft
  6. Author : Hisilicon multimedia software group
  7. Created : 2016/07/15
  8. Last Modified :
  9. Description : The common defination
  10. Function List :
  11. ******************************************************************************/
  12. #ifndef __HI_COMM_VIDEO_H__
  13. #define __HI_COMM_VIDEO_H__
  14. #include "hi_type.h"
  15. //#include "hi_defines.h"
  16. #include "hi_common.h"
  17. #ifdef __cplusplus
  18. #if __cplusplus
  19. extern "C" {
  20. #endif
  21. #endif /* __cplusplus */
  22. #define ISP_BAYER_CHN (4)
  23. typedef enum hiOPERATION_MODE_E
  24. {
  25. OPERATION_MODE_AUTO = 0,
  26. OPERATION_MODE_MANUAL = 1,
  27. OPERATION_MODE_BUTT
  28. } OPERATION_MODE_E;
  29. /*Angle of rotation*/
  30. typedef enum hiROTATION_E
  31. {
  32. ROTATION_0 = 0,
  33. ROTATION_90 = 1,
  34. ROTATION_180 = 2,
  35. ROTATION_270 = 3,
  36. ROTATION_BUTT
  37. } ROTATION_E;
  38. typedef enum hiVB_SOURCE_E
  39. {
  40. VB_SOURCE_COMMON = 0,
  41. VB_SOURCE_MODULE = 1,
  42. VB_SOURCE_PRIVATE = 2,
  43. VB_SOURCE_USER = 3,
  44. VB_SOURCE_BUTT
  45. } VB_SOURCE_E;
  46. typedef enum hiDATA_RATE_E
  47. {
  48. DATA_RATE_X1 = 0, /* RW; output 1 pixel per clock */
  49. DATA_RATE_X2 = 1, /* RW; output 2 pixel per clock */
  50. DATA_RATE_BUTT
  51. } DATA_RATE_E;
  52. typedef struct hiBORDER_S
  53. {
  54. HI_U32 u32TopWidth;
  55. HI_U32 u32BottomWidth;
  56. HI_U32 u32LeftWidth;
  57. HI_U32 u32RightWidth;
  58. HI_U32 u32Color;
  59. } BORDER_S;
  60. typedef struct hiPOINT_S
  61. {
  62. HI_S32 s32X;
  63. HI_S32 s32Y;
  64. } POINT_S;
  65. typedef struct hiSIZE_S
  66. {
  67. HI_U32 u32Width;
  68. HI_U32 u32Height;
  69. } SIZE_S;
  70. typedef struct hiRECT_S
  71. {
  72. HI_S32 s32X;
  73. HI_S32 s32Y;
  74. HI_U32 u32Width;
  75. HI_U32 u32Height;
  76. } RECT_S;
  77. typedef struct hiVIDEO_REGION_INFO_S
  78. {
  79. HI_U32 u32RegionNum; /* W; count of the region */
  80. RECT_S ATTRIBUTE* pstRegion; /* W; region attribute */
  81. } VIDEO_REGION_INFO_S;
  82. typedef struct hiCROP_INFO_S
  83. {
  84. HI_BOOL bEnable;
  85. RECT_S stRect;
  86. } CROP_INFO_S;
  87. typedef struct hiFRAME_RATE_CTRL_S
  88. {
  89. HI_S32 s32SrcFrameRate; /* RW; source frame rate */
  90. HI_S32 s32DstFrameRate; /* RW; dest frame rate */
  91. } FRAME_RATE_CTRL_S;
  92. typedef enum hiASPECT_RATIO_E
  93. {
  94. ASPECT_RATIO_NONE = 0, /* full screen */
  95. ASPECT_RATIO_AUTO = 1, /* ratio no change, 1:1*/
  96. ASPECT_RATIO_MANUAL = 2, /* ratio manual set */
  97. ASPECT_RATIO_BUTT
  98. }ASPECT_RATIO_E;
  99. typedef struct hiASPECT_RATIO_S
  100. {
  101. ASPECT_RATIO_E enMode; /* aspect ratio mode: none/auto/manual */
  102. HI_U32 u32BgColor; /* background color, RGB 888 */
  103. RECT_S stVideoRect; /* valid in ASPECT_RATIO_MANUAL mode */
  104. } ASPECT_RATIO_S;
  105. /* we ONLY define picture format used, all unused will be deleted!*/
  106. typedef enum hiPIXEL_FORMAT_E
  107. {
  108. PIXEL_FORMAT_RGB_444 = 0,
  109. PIXEL_FORMAT_RGB_555,
  110. PIXEL_FORMAT_RGB_565,
  111. PIXEL_FORMAT_RGB_888,
  112. PIXEL_FORMAT_BGR_444,
  113. PIXEL_FORMAT_BGR_555,
  114. PIXEL_FORMAT_BGR_565,
  115. PIXEL_FORMAT_BGR_888,
  116. PIXEL_FORMAT_ARGB_1555,
  117. PIXEL_FORMAT_ARGB_4444,
  118. PIXEL_FORMAT_ARGB_8565,
  119. PIXEL_FORMAT_ARGB_8888,
  120. PIXEL_FORMAT_ARGB_2BPP,
  121. PIXEL_FORMAT_ABGR_1555,
  122. PIXEL_FORMAT_ABGR_4444,
  123. PIXEL_FORMAT_ABGR_8565,
  124. PIXEL_FORMAT_ABGR_8888,
  125. PIXEL_FORMAT_RGB_BAYER_8BPP,
  126. PIXEL_FORMAT_RGB_BAYER_10BPP,
  127. PIXEL_FORMAT_RGB_BAYER_12BPP,
  128. PIXEL_FORMAT_RGB_BAYER_14BPP,
  129. PIXEL_FORMAT_RGB_BAYER_16BPP,
  130. PIXEL_FORMAT_YVU_PLANAR_422,
  131. PIXEL_FORMAT_YVU_PLANAR_420,
  132. PIXEL_FORMAT_YVU_PLANAR_444,
  133. PIXEL_FORMAT_YVU_SEMIPLANAR_422,
  134. PIXEL_FORMAT_YVU_SEMIPLANAR_420,
  135. PIXEL_FORMAT_YVU_SEMIPLANAR_444,
  136. PIXEL_FORMAT_YUV_SEMIPLANAR_422,
  137. PIXEL_FORMAT_YUV_SEMIPLANAR_420,
  138. PIXEL_FORMAT_YUV_SEMIPLANAR_444,
  139. PIXEL_FORMAT_UYVY_PACKAGE_422,
  140. PIXEL_FORMAT_YUYV_PACKAGE_422,
  141. PIXEL_FORMAT_VYUY_PACKAGE_422,
  142. PIXEL_FORMAT_YUV_400,
  143. PIXEL_FORMAT_UV_420,
  144. /* SVP data format */
  145. PIXEL_FORMAT_BGR_888_PLANAR,
  146. PIXEL_FORMAT_HSV_888_PACKAGE,
  147. PIXEL_FORMAT_HSV_888_PLANAR,
  148. PIXEL_FORMAT_LAB_888_PACKAGE,
  149. PIXEL_FORMAT_LAB_888_PLANAR,
  150. PIXEL_FORMAT_S8C1,
  151. PIXEL_FORMAT_S8C2_PACKAGE,
  152. PIXEL_FORMAT_S8C2_PLANAR,
  153. PIXEL_FORMAT_S16C1,
  154. PIXEL_FORMAT_U8C1,
  155. PIXEL_FORMAT_U16C1,
  156. PIXEL_FORMAT_S32C1,
  157. PIXEL_FORMAT_U32C1,
  158. PIXEL_FORMAT_U64C1,
  159. PIXEL_FORMAT_S64C1,
  160. PIXEL_FORMAT_BUTT
  161. } PIXEL_FORMAT_E;
  162. typedef enum hiVIDEO_FIELD_E
  163. {
  164. VIDEO_FIELD_TOP = 0x1, /* even field */
  165. VIDEO_FIELD_BOTTOM = 0x2, /* odd field */
  166. VIDEO_FIELD_INTERLACED = 0x3, /* two interlaced fields */
  167. VIDEO_FIELD_FRAME = 0x4, /* frame */
  168. VIDEO_FIELD_BUTT
  169. } VIDEO_FIELD_E;
  170. typedef enum hiVIDEO_FORMAT_E
  171. {
  172. VIDEO_FORMAT_LINEAR = 0, /* nature video line */
  173. VIDEO_FORMAT_TILE_64x16, /* tile cell: 64pixel x 16line */
  174. VIDEO_FORMAT_TILE_16x8, /* tile cell: 16pixel x 8line */
  175. VIDEO_FORMAT_LINEAR_DISCRETE, /* The data bits are aligned in bytes */
  176. VIDEO_FORMAT_BUTT
  177. } VIDEO_FORMAT_E;
  178. typedef enum hiCOMPRESS_MODE_E
  179. {
  180. COMPRESS_MODE_NONE = 0, /* no compress */
  181. COMPRESS_MODE_SEG, /* compress unit is 256x1 bytes as a segment.*/
  182. COMPRESS_MODE_TILE, /* compress unit is a tile.*/
  183. COMPRESS_MODE_LINE, /* compress unit is the whole line. raw for VI */
  184. COMPRESS_MODE_FRAME, /* compress unit is the whole frame. YUV for VI(3DNR), RGB for TDE(write)/VO(read) */
  185. COMPRESS_MODE_BUTT
  186. } COMPRESS_MODE_E;
  187. typedef enum hiVIDEO_DISPLAY_MODE_E
  188. {
  189. VIDEO_DISPLAY_MODE_PREVIEW = 0x0,
  190. VIDEO_DISPLAY_MODE_PLAYBACK = 0x1,
  191. VIDEO_DISPLAY_MODE_BUTT
  192. } VIDEO_DISPLAY_MODE_E;
  193. typedef struct hiLUMA_INFO_S
  194. {
  195. HI_U64 u64LumaPixSum; /* Luma sum of current frame */
  196. HI_U32 u32LumaPixAverage; /* Luma average of current frame */
  197. HI_U64 u64PTS; /* PTS of current frame */
  198. } LUMA_INFO_S;
  199. #define LDCI_STAT_WND_X 24
  200. #define LDCI_STAT_WND_Y 16
  201. #define DCF_DRSCRIPTION_LENGTH 32
  202. #define DCF_CAPTURE_TIME_LENGTH 20
  203. typedef struct hiISP_DCF_CONST_INFO_S
  204. {
  205. HI_U8 au8ImageDescription[DCF_DRSCRIPTION_LENGTH]; /*Describes image*/
  206. HI_U8 au8Make[DCF_DRSCRIPTION_LENGTH]; /*Shows manufacturer of digital cameras*/
  207. HI_U8 au8Model[DCF_DRSCRIPTION_LENGTH]; /*Shows model number of digital cameras*/
  208. HI_U8 au8Software[DCF_DRSCRIPTION_LENGTH]; /*Shows firmware (internal software of digital cameras) version number*/
  209. HI_U8 u8LightSource; /*Light source, actually this means white balance setting. '0' means unknown, '1' daylight, '2'
  210. fluorescent, '3' tungsten, '10' flash, '17' standard light A, '18' standard light B, '19' standard light
  211. C, '20' D55, '21' D65, '22' D75, '255' other*/
  212. HI_U32 u32FocalLength; /*Focal length of lens used to take image. Unit is millimeter*/
  213. HI_U8 u8SceneType; /*Indicates the type of scene. Value '0x01' means that the image was directly photographed.*/
  214. HI_U8 u8CustomRendered; /*Indicates the use of special processing on image data, such as rendering geared to output.
  215. 0 = Normal process 1 = Custom process */
  216. HI_U8 u8FocalLengthIn35mmFilm; /*Indicates the equivalent focal length assuming a 35mm film camera, in mm*/
  217. HI_U8 u8SceneCaptureType; /*Indicates the type of scene that was shot. 0 = Standard,1 = Landscape,2 = Portrait,3 = Night scene. */
  218. HI_U8 u8GainControl; /*Indicates the degree of overall image gain adjustment. 0 = None,1 = Low gain up,2 = High gain up,3 = Low gain down,4 = High gain down. */
  219. HI_U8 u8Contrast; /*Indicates the direction of contrast processing applied by the camera when the image was shot.
  220. 0 = Normal,1 = Soft,2 = Hard */
  221. HI_U8 u8Saturation; /*Indicates the direction of saturation processing applied by the camera when the image was shot.
  222. 0 = Normal,1 = Low saturation,2 = High saturation*/
  223. HI_U8 u8Sharpness; /*Indicates the direction of sharpness processing applied by the camera when the image was shot.
  224. 0 = Normal,1 = Soft,2 = Hard .*/
  225. HI_U8 u8MeteringMode; /*Exposure metering method. '0' means unknown, '1' average, '2' center weighted average, '3'
  226. spot, '4' multi-spot, '5' multi-segment, '6' partial, '255' other*/
  227. } ISP_DCF_CONST_INFO_S;
  228. typedef struct hiISP_DCF_UPDATE_INFO_S
  229. {
  230. HI_U32 u32ISOSpeedRatings; /*CCD sensitivity equivalent to Ag-Hr film speedrate*/
  231. HI_U32 u32ExposureTime; /*Exposure time (reciprocal of shutter speed).*/
  232. HI_U32 u32ExposureBiasValue; /*Exposure bias (compensation) value of taking picture*/
  233. HI_U8 u8ExposureProgram; /*Exposure program that the camera used when image was taken. '1' means manual control, '2'
  234. program normal, '3' aperture priority, '4' shutter priority, '5' program creative (slow program),
  235. '6' program action(high-speed program), '7' portrait mode, '8' landscape mode*/
  236. HI_U32 u32FNumber; /*The actual F-number (F-stop) of lens when the image was taken*/
  237. HI_U32 u32MaxApertureValue; /*Maximum aperture value of lens.*/
  238. HI_U8 u8ExposureMode; /*Indicates the exposure mode set when the image was shot.
  239. 0 = Auto exposure,1 = Manual exposure, 2 = Auto bracket*/
  240. HI_U8 u8WhiteBalance; /* Indicates the white balance mode set when the image was shot.
  241. 0 = Auto white balance ,1 = Manual white balance */
  242. } ISP_DCF_UPDATE_INFO_S;
  243. typedef struct hiISP_DCF_INFO_S
  244. {
  245. ISP_DCF_CONST_INFO_S stIspDCFConstInfo;
  246. ISP_DCF_UPDATE_INFO_S stIspDCFUpdateInfo;
  247. } ISP_DCF_INFO_S;
  248. typedef struct hiJPEG_DCF_S
  249. {
  250. HI_U8 au8CaptureTime[DCF_CAPTURE_TIME_LENGTH]; /*The date and time when the picture data was generated*/
  251. HI_BOOL bFlash; /*whether the picture is captured when a flash lamp is on*/
  252. HI_U32 u32DigitalZoomRatio; /*Indicates the digital zoom ratio when the image was shot.
  253. If the numerator of the recorded value is 0, this indicates that digital zoom was not used.*/
  254. ISP_DCF_INFO_S stIspDCFInfo;
  255. } JPEG_DCF_S;
  256. typedef struct hiISP_FRAME_INFO_S
  257. {
  258. HI_U32 u32ISO; /* ISP internal ISO : Again*Dgain*ISPgain */
  259. HI_U32 u32ExposureTime; /* Exposure time (reciprocal of shutter speed),unit is us */
  260. HI_U32 u32IspDgain;
  261. HI_U32 u32Again;
  262. HI_U32 u32Dgain;
  263. HI_U32 au32Ratio[3];
  264. HI_U32 u32IspNrStrength;
  265. HI_U32 u32FNumber; /* The actual F-number (F-stop) of lens when the image was taken */
  266. HI_U32 u32SensorID; /* which sensor is used */
  267. HI_U32 u32SensorMode;
  268. HI_U32 u32HmaxTimes; /* Sensor HmaxTimes,unit is ns */
  269. HI_U32 u32VcNum; /* when dump wdr frame, which is long or short exposure frame. */
  270. } ISP_FRAME_INFO_S;
  271. #define CFACOLORPLANE (3)
  272. #define DNG_NP_SIZE (6)
  273. typedef struct hiDNG_RATIONAL_S
  274. {
  275. HI_U32 u32Numerator;/*represents the numerator of a fraction,*/
  276. HI_U32 u32Denominator;/* the denominator. */
  277. } DNG_RATIONAL_S;
  278. /*
  279. Defines the structure of DNG image dynamic infomation
  280. */
  281. typedef struct hiDNG_IMAGE_DYNAMIC_INFO_S
  282. {
  283. HI_U32 au32BlackLevel[ISP_BAYER_CHN]; /* RO;Range: [0x0, 0xFFFF]; black level*/
  284. DNG_RATIONAL_S astAsShotNeutral[CFACOLORPLANE]; /* specifies the selected white balance at time of capture, encoded as the coordinates of a perfectly neutral color in linear reference space values.*/
  285. HI_DOUBLE adNoiseProfile[DNG_NP_SIZE]; /* RO;describes the amount of noise in a raw image*/
  286. } DNG_IMAGE_DYNAMIC_INFO_S;
  287. typedef struct hiISP_HDR_INFO_S
  288. {
  289. HI_U32 u32ColorTemp;
  290. HI_U16 au16CCM[9];
  291. HI_U8 u8Saturation;
  292. } ISP_HDR_INFO_S;
  293. typedef struct hiISP_ATTACH_INFO_S
  294. {
  295. ISP_HDR_INFO_S stIspHdr;
  296. HI_U32 u32ISO;
  297. HI_U8 u8SnsWDRMode;
  298. } ISP_ATTACH_INFO_S;
  299. typedef enum hiFRAME_FLAG_E
  300. {
  301. FRAME_FLAG_SNAP_FLASH = 0x1 << 0,
  302. FRAME_FLAG_SNAP_CUR = 0x1 << 1,
  303. FRAME_FLAG_SNAP_REF = 0x1 << 2,
  304. FRAME_FLAG_SNAP_END = 0x1 << 31,
  305. FRAME_FLAG_BUTT
  306. } FRAME_FLAG_E;
  307. /* RGGB=4 */
  308. #define ISP_WB_GAIN_NUM 4
  309. /* 3*3=9 matrix */
  310. #define ISP_CAP_CCM_NUM 9
  311. typedef struct hiISP_CONFIG_INFO_S
  312. {
  313. HI_U32 u32ISO;
  314. HI_U32 u32IspDgain;
  315. HI_U32 u32ExposureTime;
  316. HI_U32 au32WhiteBalanceGain[ISP_WB_GAIN_NUM];
  317. HI_U32 u32ColorTemperature;
  318. HI_U16 au16CapCCM[ISP_CAP_CCM_NUM];
  319. } ISP_CONFIG_INFO_S;
  320. typedef struct hiVIDEO_SUPPLEMENT_S
  321. {
  322. HI_U64 u64JpegDCFPhyAddr;
  323. HI_U64 u64IspInfoPhyAddr;
  324. HI_U64 u64LowDelayPhyAddr;
  325. HI_U64 u64MotionDataPhyAddr;
  326. HI_U64 u64FrameDNGPhyAddr;
  327. HI_VOID* ATTRIBUTE pJpegDCFVirAddr; /* JPEG_DCF_S, used in JPEG DCF */
  328. HI_VOID* ATTRIBUTE pIspInfoVirAddr; /* ISP_FRAME_INFO_S, used in ISP debug, when get raw and send raw */
  329. HI_VOID* ATTRIBUTE pLowDelayVirAddr; /* used in low delay */
  330. HI_VOID* ATTRIBUTE pMotionDataVirAddr; /* vpss 3dnr use: gme motion data, Filter motion data, gyro data.*/
  331. HI_VOID* ATTRIBUTE pFrameDNGVirAddr;
  332. } VIDEO_SUPPLEMENT_S;
  333. typedef enum hiCOLOR_GAMUT_E
  334. {
  335. COLOR_GAMUT_BT601 = 0,
  336. COLOR_GAMUT_BT709,
  337. COLOR_GAMUT_BT2020,
  338. COLOR_GAMUT_USER,
  339. COLOR_GAMUT_BUTT
  340. } COLOR_GAMUT_E;
  341. typedef struct hiISP_COLORGAMMUT_INFO_S
  342. {
  343. COLOR_GAMUT_E enColorGamut;
  344. } ISP_COLORGAMMUT_INFO_S;
  345. typedef enum hiDYNAMIC_RANGE_E
  346. {
  347. DYNAMIC_RANGE_SDR8 = 0,
  348. DYNAMIC_RANGE_SDR10,
  349. DYNAMIC_RANGE_HDR10,
  350. DYNAMIC_RANGE_HLG,
  351. DYNAMIC_RANGE_SLF,
  352. DYNAMIC_RANGE_XDR,
  353. DYNAMIC_RANGE_BUTT
  354. } DYNAMIC_RANGE_E;
  355. typedef enum hiDATA_BITWIDTH_E
  356. {
  357. DATA_BITWIDTH_8 = 0,
  358. DATA_BITWIDTH_10,
  359. DATA_BITWIDTH_12,
  360. DATA_BITWIDTH_14,
  361. DATA_BITWIDTH_16,
  362. DATA_BITWIDTH_BUTT
  363. } DATA_BITWIDTH_E;
  364. typedef struct hiVIDEO_FRAME_S
  365. {
  366. HI_U32 u32Width;
  367. HI_U32 u32Height;
  368. VIDEO_FIELD_E enField;
  369. PIXEL_FORMAT_E enPixelFormat;
  370. VIDEO_FORMAT_E enVideoFormat;
  371. COMPRESS_MODE_E enCompressMode;
  372. DYNAMIC_RANGE_E enDynamicRange;
  373. COLOR_GAMUT_E enColorGamut;
  374. HI_U32 u32HeaderStride[3];
  375. HI_U32 u32Stride[3];
  376. HI_U32 u32ExtStride[3];
  377. HI_U64 u64HeaderPhyAddr[3];
  378. HI_U64 u64HeaderVirAddr[3];
  379. HI_U64 u64PhyAddr[3];
  380. HI_U64 u64VirAddr[3];
  381. HI_U64 u64ExtPhyAddr[3];
  382. HI_U64 u64ExtVirAddr[3];
  383. HI_S16 s16OffsetTop; /* top offset of show area */
  384. HI_S16 s16OffsetBottom; /* bottom offset of show area */
  385. HI_S16 s16OffsetLeft; /* left offset of show area */
  386. HI_S16 s16OffsetRight; /* right offset of show area */
  387. HI_U32 u32MaxLuminance;
  388. HI_U32 u32MinLuminance;
  389. HI_U32 u32TimeRef;
  390. HI_U64 u64PTS;
  391. HI_U64 u64PrivateData;
  392. HI_U32 u32FrameFlag; /* FRAME_FLAG_E, can be OR operation. */
  393. VIDEO_SUPPLEMENT_S stSupplement;
  394. } VIDEO_FRAME_S;
  395. typedef struct hiVIDEO_FRAME_INFO_S
  396. {
  397. VIDEO_FRAME_S stVFrame;
  398. HI_U32 u32PoolId;
  399. MOD_ID_E enModId;
  400. } VIDEO_FRAME_INFO_S;
  401. typedef struct hiVB_CAL_CONFIG_S
  402. {
  403. HI_U32 u32VBSize;
  404. HI_U32 u32HeadStride;
  405. HI_U32 u32HeadSize;
  406. HI_U32 u32HeadYSize;
  407. HI_U32 u32MainStride;
  408. HI_U32 u32MainSize;
  409. HI_U32 u32MainYSize;
  410. HI_U32 u32ExtStride;
  411. HI_U32 u32ExtYSize;
  412. }VB_CAL_CONFIG_S;
  413. typedef struct hiBITMAP_S
  414. {
  415. PIXEL_FORMAT_E enPixelFormat; /* Bitmap's pixel format */
  416. HI_U32 u32Width; /* Bitmap's width */
  417. HI_U32 u32Height; /* Bitmap's height */
  418. HI_VOID* ATTRIBUTE pData; /* Address of Bitmap's data */
  419. } BITMAP_S;
  420. typedef struct hiLDC_ATTR_S
  421. {
  422. HI_BOOL bAspect; /* RW;Whether aspect ration is keep */
  423. HI_S32 s32XRatio; /* RW; Range: [0, 100], field angle ration of horizontal,valid when bAspect=0.*/
  424. HI_S32 s32YRatio; /* RW; Range: [0, 100], field angle ration of vertical,valid when bAspect=0.*/
  425. HI_S32 s32XYRatio; /* RW; Range: [0, 100], field angle ration of all,valid when bAspect=1.*/
  426. HI_S32 s32CenterXOffset; /* RW; Range: [-511, 511], horizontal offset of the image distortion center relative to image center.*/
  427. HI_S32 s32CenterYOffset; /* RW; Range: [-511, 511], vertical offset of the image distortion center relative to image center.*/
  428. HI_S32 s32DistortionRatio; /* RW; Range: [-300, 500], LDC Distortion ratio.*/
  429. } LDC_ATTR_S;
  430. typedef struct hiLDCV2_ATTR_S
  431. {
  432. HI_S32 s32FocalLenX; /*RW; focal length in horizontal direction, with 2 decimal numbers*/
  433. HI_S32 s32FocalLenY; /*RW; focal length in vertical direction, with 2 decimal numbers*/
  434. HI_S32 s32CoorShiftX; /*RW; coordinate of image center, with 2 decimal numbers*/
  435. HI_S32 s32CoorShiftY; /*RW; Y coordinate of image center, with 2 decimal numbers*/
  436. HI_S32 aas32SrcCaliRatio[2][4]; /*RW; lens distortion coefficients of the source image, with 5 decimal numbers*/
  437. HI_S32 s32SrcJunPt; /*RW; Junction Point of the two segments*/
  438. HI_S32 aas32DstCaliRatio[3][4]; /*RW; lens distortion coefficients, with 5 decimal numbers*/
  439. HI_S32 s32DstJunPt[2]; /*RW; Junction Point of the three segments*/
  440. } LDCV2_ATTR_S;
  441. typedef enum hiROTATION_VIEW_TYPE_E
  442. {
  443. ROTATION_VIEW_TYPE_ALL = 0, /* View all source Image,no lose*/
  444. ROTATION_VIEW_TYPE_TYPICAL = 1, /* View from rotation Image with source size,same lose*/
  445. ROTATION_VIEW_TYPE_INSIDE = 2, /* View with no black section,all in dest Image*/
  446. ROTATION_VIEW_TYPE_BUTT,
  447. } ROTATION_VIEW_TYPE_E;
  448. typedef struct hiROTATION_EX_S
  449. {
  450. ROTATION_VIEW_TYPE_E enViewType; /*Rotation mode*/
  451. HI_U32 u32Angle; /*Rotation Angle:[0,360]*/
  452. HI_S32 s32CenterXOffset; /* Horizontal offset of the image distortion center relative to image center.*/
  453. HI_S32 s32CenterYOffset; /* Vertical offset of the image distortion center relative to image center.*/
  454. SIZE_S stDestSize; /*Dest size of any angle rotation*/
  455. } ROTATION_EX_S;
  456. typedef enum hiWDR_MODE_E
  457. {
  458. WDR_MODE_NONE = 0,
  459. WDR_MODE_BUILT_IN,
  460. WDR_MODE_QUDRA,
  461. WDR_MODE_2To1_LINE,
  462. WDR_MODE_2To1_FRAME,
  463. WDR_MODE_2To1_FRAME_FULL_RATE,
  464. WDR_MODE_3To1_LINE,
  465. WDR_MODE_3To1_FRAME,
  466. WDR_MODE_3To1_FRAME_FULL_RATE,
  467. WDR_MODE_4To1_LINE,
  468. WDR_MODE_4To1_FRAME,
  469. WDR_MODE_4To1_FRAME_FULL_RATE,
  470. WDR_MODE_BUTT,
  471. } WDR_MODE_E;
  472. #ifdef __cplusplus
  473. #if __cplusplus
  474. }
  475. #endif
  476. #endif /* __cplusplus */
  477. #endif /* _HI_COMM_VIDEO_H_ */