hi_comm_isp.h 137 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548
  1. /******************************************************************************
  2. Copyright (C), 2016, Hisilicon Tech. Co., Ltd.
  3. ******************************************************************************
  4. File Name : hi_comm_isp.h
  5. Version : Initial Draft
  6. Author : Hisilicon multimedia software group
  7. Created : 2010/12/20
  8. Description :
  9. History :
  10. 1.Date : 2010/12/20
  11. Author :
  12. Modification: Created file
  13. ******************************************************************************/
  14. #ifndef __HI_COMM_ISP_H__
  15. #define __HI_COMM_ISP_H__
  16. #include "hi_type.h"
  17. #include "hi_errno.h"
  18. #include "hi_common.h"
  19. #include "hi_isp_debug.h"
  20. #include "hi_comm_video.h"
  21. #include "hi_isp_defines.h"
  22. #ifdef __cplusplus
  23. #if __cplusplus
  24. extern "C" {
  25. #endif
  26. #endif /* End of #ifdef __cplusplus */
  27. /****************************************************************************
  28. * MACRO DEFINITION *
  29. ****************************************************************************/
  30. #define RES_WIDTH_MAX(dev) (g_au16ResWMax[dev])
  31. #define RES_WIDTH_MIN (120)
  32. #define RES_HEIGHT_MAX(dev) (g_au16ResHMax[dev])
  33. #define RES_HEIGHT_MIN (120)
  34. #define FRAME_RATE_MAX (65535.0)
  35. #define VREG_MAX_NUM (16)
  36. #define AWB_ZONE_ORIG_ROW (32)
  37. #define AWB_ZONE_ORIG_COLUMN (32)
  38. #define AE_ZONE_ROW (15)
  39. #define AE_ZONE_COLUMN (17)
  40. #define MG_ZONE_ROW (15)
  41. #define MG_ZONE_COLUMN (17)
  42. #define AWB_ZONE_NUM (AWB_ZONE_ORIG_ROW * AWB_ZONE_ORIG_COLUMN * AWB_ZONE_BIN)
  43. #define AWB_ZONE_STITCH_MAX (AWB_ZONE_NUM * ISP_MAX_STITCH_NUM)
  44. #define AF_ZONE_ROW (15)
  45. #define AF_ZONE_COLUMN (17)
  46. #define LIGHTSOURCE_NUM (4)
  47. #define MAX_AWB_LIB_NUM (AWB_LIB_NUM)
  48. #define MAX_AE_LIB_NUM (AE_LIB_NUM)
  49. #define GAMMA_NODE_NUM (1025)
  50. #define GAMMA_FE0_NODE_NUM (33)
  51. #define GAMMA_FE1_NODE_NUM (257)
  52. #define PREGAMMA_NODE_NUM (257)
  53. #define PREGAMMA_SEG_NUM (8)
  54. #define EXPANDER_NODE_NUM (257)
  55. #define DEFOG_ZONE_ROW (32)
  56. #define DEFOG_ZONE_COLUMN (32)
  57. #define DEFOG_ZONE_NUM (1024)
  58. #define DEFOG_MAX_ZONE_NUM (1024)
  59. #define ISP_AUTO_ISO_STRENGTH_NUM (16)
  60. #define ISP_SHARPEN_IN_OUT_LEN (2)
  61. #define ISP_SHARPEN_LUMA_NUM (32)
  62. #define ISP_SHARPEN_GAIN_NUM (32)
  63. #define ISP_MAX_SNS_REGS (32)
  64. #define HI_ISP_LSC_DEFAULT_MESH_STRENGTH (4096)
  65. #define HI_ISP_LSC_DEFAULT_WEIGHT (256)
  66. #define HI_ISP_LSC_GRID_COL (33)
  67. #define HI_ISP_LSC_GRID_ROW (33)
  68. #define HI_ISP_LSC_GRID_POINTS (HI_ISP_LSC_GRID_COL * HI_ISP_LSC_GRID_ROW)
  69. #define HI_ISP_LSC_DEFAULT_MESH_SCALE (4)
  70. #define HI_ISP_RLSC_POINTS (129)
  71. #define HI_ISP_RLSC_DEFAULT_RADIAL_STR (4096)
  72. #define HI_ISP_RLSC_DEFAULT_SCALE (3)
  73. #define HI_ISP_RLSC_DEFAULT_MANUAL_WEIGHT (256)
  74. #define HI_ISP_RLSC_DEFAULT_WBGAIN (256)
  75. #define HI_ISP_RLSC_DEFAULT_LIGHT (0)
  76. #define HI_ISP_RLSC_WEIGHT_Q_BITS (8)
  77. #define ISP_VREG_SIZE_BIN (0x20000)
  78. #define ALG_LIB_VREG_SIZE_BIN (0x1000)
  79. #define WDR_MAX_FRAME_NUM (4)
  80. #define BAYER_PATT_NUM (4)
  81. #define BAYER_CALIBTAION_MAX_NUM (50)
  82. #define HI_ISP_BAYERNR_STRENGTH_DIVISOR (100)
  83. #define HI_ISP_BAYERNR_CORINGLOW_STRENGTH_DIVISOR (10000)
  84. #define AI_MAX_STEP_FNO_NUM (1024)
  85. #define ISP_BAS_TAPS_ROW_NUM (17)
  86. #define ISP_BAS_TAPS_COL_6 (6)
  87. #define ISP_BAS_TAPS_COL_4 (4)
  88. #define HI_ISP_NR_LUMA_LUT_LENGTH (6)
  89. #define HI_ISP_BAYERNR_LUT_LENGTH (33)
  90. #define HI_ISP_BAYERNR_LMTLUTNUM (129)
  91. #define PRO_MAX_FRAME_NUM (8)
  92. #define HI_ISP_DEMOSAIC_LUT_LENGTH (17)
  93. #define ISP_BAYER_CHN_NUM (4)
  94. #define LDCI_LPF_LUT_SIZE (9)
  95. #define LDCI_HE_LUT_SIZE (33)
  96. #define LDCI_DE_USM_LUT_SIZE (33)
  97. #define LDCI_COLOR_GAIN_LUT_SIZE (65)
  98. #define NoiseSet_EleNum (7)
  99. #define CCM_MATRIX_SIZE (9)
  100. #define CCM_MATRIX_NUM (7)
  101. #define HI_ISP_DRC_CUBIC_POINT_NUM (5)
  102. #define HI_ISP_DRC_CC_NODE_NUM (33)
  103. #define HI_ISP_DRC_TM_NODE_NUM (200)
  104. #define HI_ISP_DRC_TM_SEG_NUM (8)
  105. #define HI_ISP_DRC_EXP_COMP_SAMPLE_NUM (8)
  106. #define HI_ISP_DRC_SHP_LOG_CONFIG_NUM (16)
  107. #define LOG_LUT_SIZE (1025)
  108. #define PRE_LOG_LUT_SIZE (1025)
  109. #define HI_ISP_DE_LUMA_GAIN_LUT_N (17)
  110. /*****************************************************************************
  111. *******DEFAULT VALUE OF GLOBAL REGISTERS DEFINED HERE*************************
  112. *****************************************************************************/
  113. /*----------------------- AE -------------------------------*/
  114. #define HI_ISP_TOP_RGGB_START_R_GR_GB_B (0)
  115. #define HI_ISP_TOP_RGGB_START_GR_R_B_GB (1)
  116. #define HI_ISP_TOP_RGGB_START_GB_B_R_GR (2)
  117. #define HI_ISP_TOP_RGGB_START_B_GB_GR_R (3)
  118. #define HI_ISP_TOP_AE_SELECT_AFTER_DG (0)
  119. #define HI_ISP_TOP_AE_SELECT_AFTER_WB (1)
  120. #define HI_ISP_TOP_AE_SELECT_AFTER_DRC (2)
  121. #define HI_ISP_AE_FOUR_PLANE_MODE_DISABLE (0)
  122. #define HI_ISP_AE_FOUR_PLANE_MODE_ENABLE (1)
  123. /*----------------------- AWB -------------------------------*/
  124. #define HI_ISP_AWB_OFFSET_COMP_DEF (0)
  125. #define HI_ISP_CCM_COLORTONE_EN_DEFAULT (1)
  126. #define HI_ISP_CCM_COLORTONE_RGAIN_DEFAULT (255)
  127. #define HI_ISP_CCM_COLORTONE_BGAIN_DEFAULT (255)
  128. #define HI_ISP_CCM_COLORTONE_GGAIN_DEFAULT (255)
  129. #define HI_ISP_CCM_PROT_EN_DEFAULT (0)
  130. #define HI_ISP_CCM_CC_THD0_DEFAULT (0)
  131. #define HI_ISP_CCM_CC_THD1_DEFAULT (0x1E)
  132. #define HI_ISP_CCM_CC_PROT_RATIO_DEFAULT (10)
  133. #define HI_ISP_CCM_RR_THD0_DEFAULT (0x1E)
  134. #define HI_ISP_CCM_RR_THD1_DEFAULT (0x64)
  135. #define HI_ISP_CCM_GG_THD0_DEFAULT (0x6)
  136. #define HI_ISP_CCM_GG_THD1_DEFAULT (0x3C)
  137. #define HI_ISP_CCM_BB_THD0_DEFAULT (0x1E)
  138. #define HI_ISP_CCM_BB_THD1_DEFAULT (0x64)
  139. #define HI_ISP_CCM_MAX_RGB_DEFAULT (0xC8)
  140. #define HI_ISP_CCM_RGB_PROT_RATIO_DEFAULT (10)
  141. #define HI_ISP_CCM_RECOVER_EN_DEFAULT (1)
  142. #define HI_ISP_CCM_LUM_RATIO_DEFAULT (256)
  143. #define HI_ISP_CCM_HUE_RATIO_DEFAULT (256)
  144. #define CCM_CONVERT_PRE(value) ((value & 0x8000) | (value << 2))
  145. #define CCM_CONVERT(value) ((value & 0x8000)?((~(value & 0x7FFF)) + 1):(value))
  146. /********************************** DEFINED END **************************************/
  147. /****************************************************************************
  148. * GENERAL STRUCTURES *
  149. ****************************************************************************/
  150. /*
  151. ISP Error Code
  152. 0x40 = ISP_NOT_INIT
  153. 0x41 = ISP_MEM_NOT_INIT
  154. 0x42 = ISP_ATTR_NOT_CFG
  155. 0x43 = ISP_SNS_UNREGISTER
  156. 0x44 = ISP_INVALID_ADDR
  157. 0x45 = ISP_NOMEM
  158. 0x46 = ISP_NO_INT
  159. */
  160. typedef enum hiISP_ERR_CODE_E
  161. {
  162. ERR_ISP_NOT_INIT = 0x40,// ISP not init
  163. ERR_ISP_MEM_NOT_INIT = 0x41,//ISP memory not init
  164. ERR_ISP_ATTR_NOT_CFG = 0x42,//ISP attribute not cfg
  165. ERR_ISP_SNS_UNREGISTER = 0x43,//ISP sensor unregister
  166. ERR_ISP_INVALID_ADDR = 0x44,//ISP invalid address
  167. ERR_ISP_NOMEM = 0x45,//ISP nomem
  168. ERR_ISP_NO_INT = 0x46,//ISP
  169. } ISP_ERR_CODE_E;
  170. #define HI_ERR_ISP_NULL_PTR HI_DEF_ERR(HI_ID_ISP, EN_ERR_LEVEL_ERROR, EN_ERR_NULL_PTR)
  171. #define HI_ERR_ISP_ILLEGAL_PARAM HI_DEF_ERR(HI_ID_ISP, EN_ERR_LEVEL_ERROR, EN_ERR_ILLEGAL_PARAM)
  172. #define HI_ERR_ISP_NOT_SUPPORT HI_DEF_ERR(HI_ID_ISP, EN_ERR_LEVEL_ERROR, EN_ERR_NOT_SUPPORT)
  173. #define HI_ERR_ISP_NOT_INIT HI_DEF_ERR(HI_ID_ISP, EN_ERR_LEVEL_ERROR, ERR_ISP_NOT_INIT)
  174. #define HI_ERR_ISP_MEM_NOT_INIT HI_DEF_ERR(HI_ID_ISP, EN_ERR_LEVEL_ERROR, ERR_ISP_MEM_NOT_INIT)
  175. #define HI_ERR_ISP_ATTR_NOT_CFG HI_DEF_ERR(HI_ID_ISP, EN_ERR_LEVEL_ERROR, ERR_ISP_ATTR_NOT_CFG)
  176. #define HI_ERR_ISP_SNS_UNREGISTER HI_DEF_ERR(HI_ID_ISP, EN_ERR_LEVEL_ERROR, ERR_ISP_SNS_UNREGISTER)
  177. #define HI_ERR_ISP_INVALID_ADDR HI_DEF_ERR(HI_ID_ISP, EN_ERR_LEVEL_ERROR, ERR_ISP_INVALID_ADDR)
  178. #define HI_ERR_ISP_NOMEM HI_DEF_ERR(HI_ID_ISP, EN_ERR_LEVEL_ERROR, ERR_ISP_NOMEM)
  179. #define HI_ERR_ISP_NO_INT HI_DEF_ERR(HI_ID_ISP, EN_ERR_LEVEL_ERROR, ERR_ISP_NO_INT)
  180. /*
  181. Defines the structure of ISP module parameters.
  182. */
  183. typedef struct hiISP_MOD_PARAM_S
  184. {
  185. HI_U32 u32IntBotHalf; /*RW;Range:[0,1]; Format:32.0; Indicate ISP interrupt bottom half,No distinction vipipe*/
  186. } ISP_MOD_PARAM_S;
  187. /*
  188. Defines the structure of ISP control parameters.
  189. */
  190. typedef struct hiISP_CTRL_PARAM_S
  191. {
  192. HI_U32 u32ProcParam; /*RW;Format:32.0; Indicate the update frequency of ISP_PROC information,No distinction vipipe*/
  193. HI_U32 u32StatIntvl; /*RW;Format:32.0; Indicate the time interval of ISP statistic information*/
  194. HI_U32 u32UpdatePos; /*RW;Range:[0,1]; Format:32.0; Indicate the location of the configuration register of ISP interrupt*/
  195. HI_U32 u32IntTimeOut; /*RW;Format:32.0; Indicate the time(unit:ms) of interrupt timeout*/
  196. HI_U32 u32PwmNumber; /*R;Format:32.0; Indicate PWM number*/
  197. } ISP_CTRL_PARAM_S;
  198. /*
  199. Defines the working mode of ISP
  200. 0 = automatic mode
  201. 1 = manual mode
  202. */
  203. typedef enum hiISP_OP_TYPE_E
  204. {
  205. OP_TYPE_AUTO = 0,
  206. OP_TYPE_MANUAL = 1,
  207. OP_TYPE_BUTT
  208. } ISP_OP_TYPE_E;
  209. /*
  210. Defines the ISP correction or detection status
  211. 0 = initial status, no calibration
  212. 1 = The static defect pixel calibration ends normally
  213. 2 = The static defect pixel calibration ends due to timeout.
  214. */
  215. typedef enum hiISP_STATE_E
  216. {
  217. ISP_STATE_INIT = 0,
  218. ISP_STATE_SUCCESS = 1,
  219. ISP_STATE_TIMEOUT = 2,
  220. ISP_STATE_BUTT
  221. } ISP_STATUS_E;
  222. typedef struct hiISP_PIPE_DIFF_ATTR_S
  223. {
  224. HI_S32 as32Offset[ISP_BAYER_CHN_NUM]; /*RW;Range:[-4095,4095];Format:12.0; Black level differences between the offset value */
  225. HI_U32 au32Gain[ISP_BAYER_CHN_NUM]; /*RW;Range:[0x80,0x400];Format:4.8; The gain difference ratio */
  226. HI_U16 au16ColorMatrix[CCM_MATRIX_SIZE];/*RW;Range:[0x0,0xFFFF];Format:8.8; Color correction matrix variance ratio */
  227. } ISP_PIPE_DIFF_ATTR_S;
  228. /*Defines the format of the input Bayer image*/
  229. typedef enum hiISP_BAYER_FORMAT_E
  230. {
  231. BAYER_RGGB = 0,
  232. BAYER_GRBG = 1,
  233. BAYER_GBRG = 2,
  234. BAYER_BGGR = 3,
  235. BAYER_BUTT
  236. } ISP_BAYER_FORMAT_E;
  237. /*Defines the bitwidth of the input Bayer image, used for lsc online calibration*/
  238. typedef enum hiISP_BAYER_RAWBIT_E
  239. {
  240. BAYER_RAWBIT_8BIT = 8,
  241. BAYER_RAWBIT_10BIT = 10,
  242. BAYER_RAWBIT_12BIT = 12,
  243. BAYER_RAWBIT_14BIT = 14,
  244. BAYER_RAWBIT_16BIT = 16,
  245. BAYER_RAWBIT_BUTT
  246. } ISP_BAYER_RAWBIT_E;
  247. /* ISP public attribute, contains the public image attribute */
  248. typedef struct hiISP_PUB_ATTR_S
  249. {
  250. RECT_S stWndRect; /* RW; Start position of the cropping window, image width, and image height */
  251. SIZE_S stSnsSize; /* RW; Width and height of the image output from the sensor*/
  252. HI_FLOAT f32FrameRate; /* RW; Range: [0, 0xFFFF]; For frame rate */
  253. ISP_BAYER_FORMAT_E enBayer; /* RW; Range:[0,3] ;Format:2.0;the format of the input Bayer image*/
  254. WDR_MODE_E enWDRMode; /* RW; WDR mode select*/
  255. HI_U8 u8SnsMode; /* RW; Range: [0, 0xFF]; Format: 8.0; For special sensor mode switches */
  256. } ISP_PUB_ATTR_S;
  257. /* Slave mode sensor sync signal generate module */
  258. typedef struct hiISP_SLAVE_SNS_SYNC_S
  259. {
  260. union
  261. {
  262. struct
  263. {
  264. HI_U32 bit16Rsv : 16;
  265. HI_U32 bitHInv : 1;
  266. HI_U32 bitVInv : 1;
  267. HI_U32 bit12Rsv : 12;
  268. HI_U32 bitHEnable : 1;
  269. HI_U32 bitVEnable : 1;
  270. } stBits;
  271. HI_U32 u32Bytes;
  272. } unCfg;
  273. HI_U32 u32VsTime;
  274. HI_U32 u32HsTime;
  275. HI_U32 u32VsCyc;
  276. HI_U32 u32HsCyc;
  277. HI_U32 u32SlaveModeTime;
  278. } ISP_SLAVE_SNS_SYNC_S;
  279. /*
  280. Defines the ISP stitch attribute.
  281. */
  282. #if 0
  283. typedef struct hiISP_STITCH_ATTR_S
  284. {
  285. HI_BOOL bStitchEnable;
  286. HI_BOOL bMainPipe;
  287. HI_U8 u8StitchPipeNum;
  288. HI_S8 as8StitchBindId[ISP_MAX_PIPE_NUM];
  289. } ISP_STITCH_ATTR_S;
  290. #endif
  291. /*
  292. Defines the ISP firmware status
  293. 0 = Running status
  294. 1 = Frozen status
  295. */
  296. typedef enum hiISP_FMW_STATE_E
  297. {
  298. ISP_FMW_STATE_RUN = 0,
  299. ISP_FMW_STATE_FREEZE,
  300. ISP_FMW_STATE_BUTT
  301. } ISP_FMW_STATE_E;
  302. /*Defines the WDR mode of the ISP*/
  303. typedef struct hiISP_WDR_MODE_S
  304. {
  305. WDR_MODE_E enWDRMode;
  306. } ISP_WDR_MODE_S;
  307. typedef union hiISP_MODULE_CTRL_U
  308. {
  309. HI_U32 u32Key;
  310. struct
  311. {
  312. HI_U32 bitBypassISPDGain : 1 ; /* RW;[0] */
  313. HI_U32 bitBypassAntiFC : 1 ; /* RW;[1] */
  314. HI_U32 bitBypassCrosstalkR : 1 ; /* RW;[2] */
  315. HI_U32 bitBypassDPC : 1 ; /* RW;[3] */
  316. HI_U32 bitBypassNR : 1 ; /* RW;[4] */
  317. HI_U32 bitBypassDehaze : 1 ; /* RW;[5] */
  318. HI_U32 bitBypassWBGain : 1 ; /* RW;[6] */
  319. HI_U32 bitBypassMeshShading : 1 ; /* RW;[7] */
  320. HI_U32 bitBypassDRC : 1 ; /* RW;[8] */
  321. HI_U32 bitBypassDemosaic : 1 ; /* RW;[9] */
  322. HI_U32 bitBypassColorMatrix : 1 ; /* RW;[10] */
  323. HI_U32 bitBypassGamma : 1 ; /* RW;[11] */
  324. HI_U32 bitBypassFSWDR : 1 ; /* RW;[12] */
  325. HI_U32 bitBypassCA : 1 ; /* RW;[13] */
  326. HI_U32 bitBypassCsConv : 1 ; /* RW;[14] */
  327. HI_U32 bitBypassRadialCrop : 1 ; /* RW;[15] */
  328. HI_U32 bitBypassSharpen : 1 ; /* RW;[16] */
  329. HI_U32 bitBypassLCAC : 1 ; /* RW;[17] */
  330. HI_U32 bitBypassGCAC : 1 ; /* RW;[18] */
  331. HI_U32 bit2ChnSelect : 2 ; /* RW;[19:20] */
  332. HI_U32 bitBypassLdci : 1 ; /* RW;[21] */
  333. HI_U32 bitBypassPreGamma : 1 ; /* RW;[22] */
  334. HI_U32 bitBypassRadialShading : 1 ; /* RW;[23] */
  335. HI_U32 bitBypassAEStatFE : 1 ; /* RW;[24] */
  336. HI_U32 bitBypassAEStatBE : 1 ; /* RW;[25] */
  337. HI_U32 bitBypassMGStat : 1 ; /* RW;[26] */
  338. HI_U32 bitBypassDE : 1 ; /* RW;[27] , not support*/
  339. HI_U32 bitBypassAFStatFE : 1 ; /* RW;[28] */
  340. HI_U32 bitBypassAFStatBE : 1 ; /* RW;[29] */
  341. HI_U32 bitBypassAWBStat : 1 ; /* RW;[30] */
  342. HI_U32 bitRsv0 : 1 ; /* H; [31] */
  343. };
  344. } ISP_MODULE_CTRL_U;
  345. /*
  346. Defines the ISP FSWDR attributes in combination mode.
  347. 0 = Short exposure data is used when combining
  348. 1 = Long exposure data is used when combining
  349. */
  350. typedef enum hiISP_COMBINE_MODE_E
  351. {
  352. FS_WDR_COMBINE_SHORT_FIRST = 0,
  353. FS_WDR_COMBINE_LONG_FIRST = 1,
  354. FS_WDR_COMBINE_BUTT
  355. } ISP_COMBINE_MODE_E;
  356. /*
  357. Defines the ISP WDR merge mode.
  358. 0 = WDR mode is used
  359. 1 = Fusion mode is used
  360. */
  361. typedef enum hiISP_WDR_MERGE_MODE_E
  362. {
  363. MERGE_WDR_MODE = 0,
  364. MERGE_FUSION_MODE = 1,
  365. MERGE_BUTT
  366. } ISP_WDR_MERGE_MODE_E;
  367. /*
  368. 0 = The function of bnr is off
  369. 1 = The function of bnr when com mode is wdr
  370. 2 = The function of bnr when com mode is fusion
  371. */
  372. typedef enum hiISP_BNR_MODE_E
  373. {
  374. BNR_OFF_MODE = 0,
  375. BNR_ON_MODE = 1,
  376. BNR_BUTT
  377. } ISP_BNR_MODE_E;
  378. typedef struct hiISP_FSWDR_MANUAL_ATTR_S
  379. {
  380. HI_U8 u8MdThrLowGain;
  381. HI_U8 u8MdThrHigGain;
  382. } ISP_FSWDR_MANUAL_ATTR_S;
  383. typedef struct hiISP_FSWDR_AUTO_ATTR_S
  384. {
  385. HI_U8 au8MdThrLowGain[ISP_AUTO_ISO_STRENGTH_NUM];
  386. HI_U8 au8MdThrHigGain[ISP_AUTO_ISO_STRENGTH_NUM];
  387. } ISP_FSWDR_AUTO_ATTR_S;
  388. typedef struct hiISP_MDT_ATTR_S
  389. {
  390. HI_BOOL bShortExpoChk; /* RW;Range:[0x0,0x1];Format:1.0;Only used for Hi3559AV100*/
  391. HI_BOOL bMDRefFlicker;
  392. ISP_OP_TYPE_E enOpType;
  393. ISP_FSWDR_MANUAL_ATTR_S stManual;
  394. ISP_FSWDR_AUTO_ATTR_S stAuto;
  395. } ISP_FSWDR_MDT_ATTR_S;
  396. typedef struct hiISP_WDR_COMBINE_ATTR_S
  397. {
  398. HI_BOOL bMotionComp; /* RW;Range:[0x0,0x1];Format:1.0; HI_TRUE: enable motion compensation; HI_FALSE: disable motion compensation*/
  399. HI_U16 u16ShortThr; /* RW;Range:[0x0,0xFFF];Format:12.0; Data above this threshold will be taken from short exposure only.*/
  400. HI_U16 u16LongThr; /* RW;Range:[0x0,0xFFF];Format:12.0; limited range :[0x0,u16ShortThr],Data below this threshold will be taken from long exposure only. */
  401. HI_BOOL bForceLong; /* RW;Range:[0x0,0x1];Format:1.0; HI_TRUE: enable Force Long; HI_FALSE: disable Force Long,Only used for Hi3519AV100*/
  402. HI_U16 u16ForceLongLowThr; /* RW;Range:[0x0,0xFFF];Format:12.0; Data above this threshold will Force to choose long frame only,Only used for Hi3519AV100*/
  403. HI_U16 u16ForceLongHigThr; /* RW;Range:[0x0,0xFFF];Format:12.0; Data below this threshold will Force to choose long frame only,Only used for Hi3519AV100*/
  404. ISP_FSWDR_MDT_ATTR_S stWDRMdt;
  405. } ISP_WDR_COMBINE_ATTR_S;
  406. typedef struct hiISP_FUSION_ATTR_S
  407. {
  408. HI_U16 au16FusionThr[4]; /* RW;Range:[0x0,0x3FFF];Format:14.0;The threshold of the 4 frame*/
  409. } ISP_FUSION_ATTR_S;
  410. typedef struct hiISP_WDR_BNR_ATTR_S
  411. {
  412. ISP_BNR_MODE_E enBnrMode; /* RW;Range:[0x0,0x1];Format:1.0; HI_TRUE:enable the bnr of wdr;HI_FALSE:disable the bnr of wdr*/
  413. HI_U8 u8BnrStr; /* RW;Range:[0x0,0x20];Format:2.4; The strength of the bnr.*/
  414. HI_BOOL bShortFrameNR; /* RW;Range:[0x0,0x1];Format:1.0; HI_TRUE:enable the bnr of short frame;HI_FALSE:disable the bnr of short frame,Only used for Hi3519AV100 */
  415. HI_U8 u8ShortFrameNRStr; /* RW;Range:[0x0,0x3F];Format:8.0;the Level 2 short frame sigma weight of G channel,Only used for Hi3519AV100 */
  416. HI_U8 u8MotionBnrStr; /* RW;Range:[0x0,0x1F];Format:5.0;the sigma weight of C channel in motion areas,Only used for Hi3519AV100 */
  417. HI_U8 u8FusionBnrStr; /* RW;Range:[0x0,0x3F];Format:3.3,Only used for Hi3519AV100 */
  418. } ISP_WDR_BNR_ATTR_S;
  419. typedef struct hiISP_WDR_FS_ATTR_S
  420. {
  421. ISP_WDR_MERGE_MODE_E enWDRMergeMode;
  422. ISP_WDR_COMBINE_ATTR_S stWDRCombine;
  423. ISP_WDR_BNR_ATTR_S stBnr;
  424. ISP_FUSION_ATTR_S stFusion;
  425. } ISP_WDR_FS_ATTR_S;
  426. typedef struct hiISP_DRC_CUBIC_POINT_ATTR_S
  427. {
  428. HI_U16 u16X; /*RW; Range: [0,1000];Format:10.0;x position of the characteristic point of the cubic curve; Only used for Hi3559AV100 */
  429. HI_U16 u16Y; /*RW; Range: [0,1000];Format:10.0;y position of the characteristic point of the cubic curve; Only used for Hi3559AV100 */
  430. HI_U16 u16Slope; /*RW; Range: [0,10000];Format:14.0;slope of the characteristic point of the cubic curve; Only used for Hi3559AV100 */
  431. } ISP_DRC_CUBIC_POINT_ATTR_S;
  432. typedef struct hiISP_DRC_ASYMMETRY_CURVE_ATTR_S
  433. {
  434. HI_U8 u8Asymmetry; /*RW; Range: [0x1,0x1E];Format:5.0;The parameter0 of DRC tone mapping curve*/
  435. HI_U8 u8SecondPole; /*RW; Range: [0x96,0xD2];Format:8.0;The parameter1 of DRC tone mapping curve*/
  436. HI_U8 u8Stretch; /*RW; Range: [0x1E,0x3C];Format:6.0;The parameter2 of DRC tone mapping curve*/
  437. HI_U8 u8Compress; /*RW; Range: [0x64,0xC8];Format:8.0;The parameter3 of DRC tone mapping curve*/
  438. } ISP_DRC_ASYMMETRY_CURVE_ATTR_S;
  439. typedef struct hiISP_DRC_MANUAL_ATTR_S
  440. {
  441. HI_U16 u16Strength; /* RW;Range: Hi3559AV100 = [0x0, 0xFF] | Hi3519AV100 = [0x0, 0x3FF] ; Strength of dynamic range compression.
  442. Higher values lead to higher differential gain between shadows and highlights. */
  443. } ISP_DRC_MANUAL_ATTR_S;
  444. typedef struct hiISP_DRC_AUTO_ATTR_S
  445. {
  446. HI_U16 u16Strength; /* RW;Range: Hi3559AV100 = [0x0, 0xFF] | Hi3519AV100 = [0x0, 0x3FF] ;
  447. It is the base strength. The strength used in ISP is generated by firmware.
  448. In linear mode, strength = f1(u16Strength, histogram, ISO)
  449. In sensor WDR mode: strength = f2(u16Strength, histogram, ISO)
  450. In 2to1 WDR mode: strength = f3(ExpRatio, ISO) */
  451. HI_U16 u16StrengthMax; /* RW; Range: Hi3559AV100 = [0x0, 0xFF] | Hi3519AV100 = [0x0, 0x3FF] ; Maximum DRC strength in Auto mode */
  452. HI_U16 u16StrengthMin; /* RW; Range: Hi3559AV100 = [0x0, 0xFF] | Hi3519AV100 = [0x0, 0x3FF] ; Minimum DRC strength in Auto mode */
  453. } ISP_DRC_AUTO_ATTR_S;
  454. /* DRC curve type: 0 = Asymmetry curve, 1 = Cubic curve, 2 = User-defined curve */
  455. typedef enum hiISP_DRC_CURVE_SELECT_E
  456. {
  457. DRC_CURVE_ASYMMETRY = 0x0,
  458. DRC_CURVE_CUBIC, /* Only used for Hi3559AV100 */
  459. DRC_CURVE_USER,
  460. DRC_CURVE_BUTT
  461. } ISP_DRC_CURVE_SELECT_E;
  462. typedef struct hiISP_DRC_ATTR_S
  463. {
  464. HI_BOOL bEnable;
  465. ISP_DRC_CURVE_SELECT_E enCurveSelect; /*RW;Range:[0x0, 0x2]; Select tone mapping curve type */
  466. HI_U8 u8PDStrength; /*RW;Range: [0x0, 0x80];Format:8.0; Controls the purple detection strength*/
  467. HI_U8 u8LocalMixingBrightMax; /*RW;Range: [0x0, 0x80];Format:8.0; Maximum enhancement strength for positive detail*/
  468. HI_U8 u8LocalMixingBrightMin; /*RW;Range: [0x0, 0x40];Format:8.0; Minimum enhancement strength for positive detail*/
  469. HI_U8 u8LocalMixingBrightThr; /*RW;Range: [0x0, 0xFF];Format:8.0; Luma threshold for enhancement strength adaptation of positive detail*/
  470. HI_S8 s8LocalMixingBrightSlo; /*RW;Range: [-7, 7];Format:4.0; Enhancement strength adaptation slope for positive detail*/
  471. HI_U8 u8LocalMixingDarkMax; /*RW;Range: [0x0, 0x80]; Format:8.0; Maximum enhancement strength for negative detail*/
  472. HI_U8 u8LocalMixingDarkMin; /*RW;Range: [0x0, 0x40]; Format:8.0; Minimum enhancement strength for negative detail*/
  473. HI_U8 u8LocalMixingDarkThr; /*RW;Range: [0x0, 0xFF]; Format:8.0; Luma threshold for enhancement strength adaptation of negative detail*/
  474. HI_S8 s8LocalMixingDarkSlo; /*RW;Range: [-7, 7]; Format:s4.0; Enhancement strength adaptation slope for negative detail*/
  475. HI_U8 u8DetailBrightStr; /*RW;Range:[0x0, 0x80];Format:8.0; Controls the gain of the non-linear positive detail enhancement; Only used for Hi3559AV100 */
  476. HI_U8 u8DetailDarkStr; /*RW;Range:[0x0, 0x80];Format:8.0; Controls the gain of the non-linear negative detail enhancement; Only used for Hi3559AV100 */
  477. HI_U8 u8DetailBrightStep; /*RW;Range:[0x0, 0x80];Format:8.0; Controls the step of the non-linear positive detail enhancement; Only used for Hi3559AV100 */
  478. HI_U8 u8DetailDarkStep; /*RW;Range:[0x0, 0x80];Format:8.0; Controls the step of the non-linear negative detail enhancement; Only used for Hi3559AV100 */
  479. HI_U8 u8BrightGainLmt; /*RW;Range:[0x0, 0xF];Format:4.0; Bright area gain high limit*/
  480. HI_U8 u8BrightGainLmtStep; /*RW;Range:[0x0, 0xF];Format:4.0; Bright area gain high limit step */
  481. HI_U8 u8DarkGainLmtY; /*RW;Range:[0x0, 0x85];Format:7.0; Dark area luma gain limit*/
  482. HI_U8 u8DarkGainLmtC; /*RW;Range:[0x0, 0x85];Format:7.0; Dark area chroma gain limit*/
  483. HI_U16 au16ColorCorrectionLut[HI_ISP_DRC_CC_NODE_NUM];/*RW;Range:[0x0, 0x400];Format:4.12; LUT of color correction coefficients */
  484. HI_U16 au16ToneMappingValue[HI_ISP_DRC_TM_NODE_NUM]; /*RW; Range: [0x0, 0xffff] */
  485. HI_U8 u8FltScaleCoarse; /* RW; Range: [0x0, 0xF]; Format: 4.0; Spatial filter scale coarse control; Only used for Hi3559AV100 and Hi3519AV100 */
  486. HI_U8 u8FltScaleFine; /* RW; Range: [0x0, 0xF]; Format: 4.0; Spatial filter scale fine control; Only used for Hi3559AV100 and Hi3519AV100 */
  487. HI_U8 u8ContrastControl; /* RW; Range: [0x0, 0xF]; Format: 4.0; Contrast control */
  488. HI_S8 s8DetailAdjustFactor; /* RW; Range: [-15, 15]; Format: 4.0; Detail adjustment factor */
  489. HI_U8 u8SpatialFltCoef; /* RW; Range: Hi3559AV100 = [0x0, 0xA] | Hi3519AV100 = [0x0, 0x5] ; Spatial filter coefficients */
  490. HI_U8 u8RangeFltCoef; /* RW; Range: [0x0, 0xA]; Format: 4.0; Range filter coefficients */
  491. HI_U8 u8RangeAdaMax; /* RW; Range: [0x0, 0x8]; Format: 4.0; Maximum range filter coefficient adaptation range */
  492. HI_U8 u8GradRevMax; /* RW; Range: [0x0, 0x40]; Format: 7.0; Maximum gradient reversal reduction strength */
  493. HI_U8 u8GradRevThr; /* RW; Range: [0x0, 0x80]; Format: 8.0; Gradient reversal reduction threshold */
  494. ISP_OP_TYPE_E enOpType;
  495. ISP_DRC_MANUAL_ATTR_S stManual;
  496. ISP_DRC_AUTO_ATTR_S stAuto;
  497. ISP_DRC_CUBIC_POINT_ATTR_S astCubicPoint[HI_ISP_DRC_CUBIC_POINT_NUM]; /* Only used for Hi3559AV100 */
  498. ISP_DRC_ASYMMETRY_CURVE_ATTR_S stAsymmetryCurve;
  499. } ISP_DRC_ATTR_S;
  500. typedef struct hiISP_LDCI_GAUSS_COEF_ATTR_S
  501. {
  502. HI_U8 u8Wgt; /*RW;Range:Hi3559AV100 = [0x0, 0x80] | Hi3519AV100 = [0x0, 0x80];Format:1.7;Weight of Gaussian distribution*/
  503. HI_U8 u8Sigma; /*RW;Range: [0x1, 0xFF];Format:0.8;Sigma of Gaussian distribution*/
  504. HI_U8 u8Mean; /*RW;Range: [0x0, 0xFF];Format:0.8;Mean of Gaussian distribution*/
  505. } ISP_LDCI_GAUSS_COEF_ATTR_S;
  506. typedef struct hiISP_LDCI_HE_WGT_ATTR_S
  507. {
  508. ISP_LDCI_GAUSS_COEF_ATTR_S stHePosWgt;
  509. ISP_LDCI_GAUSS_COEF_ATTR_S stHeNegWgt;
  510. } ISP_LDCI_HE_WGT_ATTR_S;
  511. typedef struct hiISP_LDCI_MANUAL_ATTR_S
  512. {
  513. ISP_LDCI_HE_WGT_ATTR_S stHeWgt;
  514. HI_U16 u16BlcCtrl; /*RW;Range: [0x0, 0x1FF];Format:9.0;Restrain dark region */
  515. } ISP_LDCI_MANUAL_ATTR_S;
  516. typedef struct hiISP_LDCI_AUTO_ATTR_S
  517. {
  518. ISP_LDCI_HE_WGT_ATTR_S astHeWgt[ISP_AUTO_ISO_STRENGTH_NUM];
  519. HI_U16 au16BlcCtrl[ISP_AUTO_ISO_STRENGTH_NUM]; /*RW;Range: [0x0, 0x1FF];Format:9.0;auto mode, Restrain dark region */
  520. } ISP_LDCI_AUTO_ATTR_S;
  521. typedef struct hiISP_LDCI_ATTR_S
  522. {
  523. HI_BOOL bEnable; /*RW;Range:[0x0,0x1];Format:1.0;*/
  524. HI_U8 u8GaussLPFSigma; /*RW;Range: [0x1, 0xFF];Format:0.8;Coefficient of Gaussian low-pass filter*/
  525. ISP_OP_TYPE_E enOpType;
  526. ISP_LDCI_MANUAL_ATTR_S stManual;
  527. ISP_LDCI_AUTO_ATTR_S stAuto;
  528. } ISP_LDCI_ATTR_S;
  529. /*
  530. defines CA type
  531. 0 = enable Ca module
  532. 1 = enable Cp module
  533. */
  534. typedef enum hiISP_CA_TYPE_E
  535. {
  536. ISP_CA_ENABLE = 0x0,
  537. ISP_CP_ENABLE,
  538. ISP_CA_BUTT
  539. } ISP_CA_TYPE_E;
  540. typedef struct hiISP_CA_LUT_S
  541. {
  542. HI_U32 au32YRatioLut[HI_ISP_CA_YRATIO_LUT_LENGTH]; /*RW;Range:[0,2047];Format:1.11;*/
  543. HI_S32 as32ISORatio[ISP_AUTO_ISO_STRENGTH_NUM]; /*RW;Range:[0,2047];Format:1.10;*/
  544. } ISP_CA_LUT_S;
  545. typedef struct hiISP_CP_LUT_S
  546. {
  547. HI_U8 au8CPLutY[HI_ISP_CA_YRATIO_LUT_LENGTH];/*RW;Range:[0,255];Format:8.0;*/
  548. HI_U8 au8CPLutU[HI_ISP_CA_YRATIO_LUT_LENGTH];/*RW;Range:[0,255];Format:8.0;*/
  549. HI_U8 au8CPLutV[HI_ISP_CA_YRATIO_LUT_LENGTH];/*RW;Range:[0,255];Format:8.0;*/
  550. } ISP_CP_LUT_S;
  551. typedef struct hiISP_CA_ATTR_S
  552. {
  553. HI_BOOL bEnable; /*RW;Range:[0x0,0x1];Format:1.0;*/
  554. ISP_CA_TYPE_E eCaCpEn;
  555. ISP_CA_LUT_S stCA;
  556. ISP_CP_LUT_S stCP;
  557. } ISP_CA_ATTR_S;
  558. // CSC
  559. typedef struct hiCSC_MATRX_S
  560. {
  561. HI_S16 as16CSCIdc[3]; /*RW; Range:[-1024, 1023]; Format: 11.0; Input dc component for csc matrix*/
  562. HI_S16 as16CSCOdc[3]; /*RW; Range:[-1024, 1023]; Format: 11.0; Output dc component for csc matrix*/
  563. HI_S16 as16CSCCoef[9]; /*RW; Range:[-4096, 4095]; Format: 5.10; 3x3 coefficients for csc matrix*/
  564. } CSC_MATRX_S;
  565. typedef struct hiISP_CSC_ATTR_S
  566. {
  567. HI_BOOL bEnable; /* RW; Range:[0, 1];Format:1.0; Enable/Disable CSC Function*/
  568. COLOR_GAMUT_E enColorGamut; /*RW; Range: [0, 4]; Color gamut type*/
  569. HI_U8 u8Hue; /* RW; Range:[0, 100];Format:8.0; Csc Hue Value*/
  570. HI_U8 u8Luma; /* RW; Range:[0, 100];Format:8.0; Csc Luma Value*/
  571. HI_U8 u8Contr; /* RW; Range:[0, 100];Format:8.0; Csc Contrast Value*/
  572. HI_U8 u8Satu; /* RW; Range:[0, 100];Format:8.0; Csc Saturation Value*/
  573. HI_BOOL bLimitedRangeEn; /*RW; Range: [0x0, 0x1]; Enable/Disable: Enable Limited range output mode(default full range output) */
  574. HI_BOOL bExtCscEn; /*RW; Range: [0x0, 0x1]; Enable/Disable: Enable extended luma range*/
  575. HI_BOOL bCtModeEn; /*RW; Range: [0x0, 0x1]; Enable/Disable: Enable ct mode*/
  576. CSC_MATRX_S stCscMagtrx; /*RW; Color Space Conversion matrix*/
  577. } ISP_CSC_ATTR_S;
  578. /********************** CLUT **************************************/
  579. typedef struct hiISP_CLUT_ATTR_S
  580. {
  581. HI_BOOL bEnable ; /* RW; Range:[0, 1];Format:1.0; Enable/Disable CLUT Function*/
  582. HI_U32 u32GainR ; /* RW; Range:[0,4095];Format:12.0;*/
  583. HI_U32 u32GainG ; /* RW; Range:[0,4095];Format:12.0;*/
  584. HI_U32 u32GainB ; /* RW; Range:[0,4095];Format:12.0;*/
  585. } ISP_CLUT_ATTR_S;
  586. /*CLUT LUT*/
  587. typedef struct hiISP_CLUT_LUT_S
  588. {
  589. HI_U32 au32lut[HI_ISP_CLUT_LUT_LENGTH]; /* RW; Range: Hi3559AV100 = [0, 4294967295] | Hi3519AV100 = [0x0, 1073741823];*/
  590. } ISP_CLUT_LUT_S;
  591. /*****************************************************************/
  592. /*
  593. Defines the type of static defect pixel calibration
  594. 0 = bright defect pixel calibration
  595. 1 = dark defect pixel calibration
  596. */
  597. typedef enum hiISP_STATIC_DP_TYPE_E
  598. {
  599. ISP_STATIC_DP_BRIGHT = 0x0,
  600. ISP_STATIC_DP_DARK,
  601. ISP_STATIC_DP_BUTT
  602. } ISP_STATIC_DP_TYPE_E;
  603. typedef struct hiISP_DP_STATIC_CALIBRATE_S
  604. {
  605. HI_BOOL bEnableDetect; /* RW; Range: [0, 1];Format 1.0;Set 'HI_TRUE'to start static defect-pixel calibration, and firmware will set 'HI_FALSE' when finished. */
  606. ISP_STATIC_DP_TYPE_E enStaticDPType; /* RW; Range: [0, 1];Format 1.0;Select static bright/dark defect-pixel calibration */
  607. HI_U8 u8StartThresh; /* RW; Range: [1, 255]; Format 8.0;Start threshold for static defect-pixel calibraiton.*/
  608. HI_U16 u16CountMax; /* RW; Range:Hi3559AV100 = [0, 8192] | Hi3519AV100 = [0, 8192] ;Format 14.0; limited Range: [0, STATIC_DP_COUNT_NORMAL*BlkNum]Limit of max number of static defect-pixel calibraiton.*/
  609. HI_U16 u16CountMin; /* RW; Range:Hi3559AV100 = [0, 8192] | Hi3519AV100 = [0, 8192] ;Format 14.0; limited Range: [0, u16CountMax],Limit of min number of static defect-pixel calibraiton.*/
  610. HI_U16 u16TimeLimit; /* RW; Range: [0x0, 1600];Format 11.0;Time limit for static defect-pixel calibraiton, in frame number*/
  611. HI_U32 au32Table[STATIC_DP_COUNT_MAX]; /* R; [0,0x1FFF1FFF];Format 29.0;Static defect-pixel calibraiton table,0~12 bits represents the X coordinate of the defect pixel, 16~28 bits represent the Y coordinate of the defect pixel. */
  612. HI_U8 u8FinishThresh; /* R; Range: [0, 255];Format 8.0; Finish threshold for static defect-pixel calibraiton. */
  613. HI_U16 u16Count; /* R; Range:Hi3559AV100 = [0, 8192] | Hi3519AV100 = [0, 8192];Format 14.0; Finish number for static defect-pixel calibraiton. */
  614. ISP_STATUS_E enStatus; /* R; Range: [0, 2];Format 2.0;Status of static defect-pixel calibraiton. */
  615. } ISP_DP_STATIC_CALIBRATE_S;
  616. typedef struct hiISP_DP_STATIC_ATTR_S
  617. {
  618. HI_BOOL bEnable; /* RW; Range: [0, 1];Format 1.0;Enable/disable the static defect-pixel module*/
  619. HI_U16 u16BrightCount; /* RW; Range:Hi3559AV100 = [0, 8192] | Hi3519AV100 = [0, 8192];Format 14.0;limited Range: [0, STATIC_DP_COUNT_NORMAL*BlkNum],When used as input(W), indicate the number of static bright defect pixels; As output(R),indicate the number of static bright and dark defect pixels */
  620. HI_U16 u16DarkCount; /* RW; Range:Hi3559AV100 = [0, 8192] | Hi3519AV100 = [0, 8192];Format 14.0;limited Range: [0, STATIC_DP_COUNT_NORMAL*BlkNum],When used as input(W), indicate the number of static dark defect pixels; As output(R), invalid value 0 */
  621. HI_U32 au32BrightTable[STATIC_DP_COUNT_MAX]; /* RW; Range: [0x0, 0x1FFF1FFF];Format 29.0;0~12 bits represents the X coordinate of the defect pixel, 16~28 bits represent the Y coordinate of the defect pixel
  622. Notice : When used as input(W), indicate static bright defect pixels table; As output(R), indicate static bright and dark defect pixels table */
  623. HI_U32 au32DarkTable[STATIC_DP_COUNT_MAX]; /* RW; Range: [0x0, 0x1FFF1FFF];Format 29.0;0~12 bits represents the X coordinate of the defect pixel, 16~28 bits represent the Y coordinate of the defect pixel
  624. Notice : When used as input(W), indicate static dark defect pixels table; As output(R), invalid value */
  625. HI_BOOL bShow; /*RW; Range: [0, 1];Format 1.0;RW;highlight static defect pixel*/
  626. } ISP_DP_STATIC_ATTR_S;
  627. typedef struct hiISP_DP_DYNAMIC_MANUAL_ATTR_S
  628. {
  629. HI_U16 u16Strength; /* RW; Range: [0, 255];Format:8.0;Dynamic DPC strength. */
  630. HI_U16 u16BlendRatio; /* RW; Range: [0, 128];Format:9.0;Blending ratio required for DPC*/
  631. } ISP_DP_DYNAMIC_MANUAL_ATTR_S;
  632. typedef struct hiISP_DP_DYNAMIC_AUTO_ATTR_S
  633. {
  634. HI_U16 au16Strength[ISP_AUTO_ISO_STRENGTH_NUM]; /* RW; Range: [0, 255];Format:8.0;Dynamic DPC strength. */
  635. HI_U16 au16BlendRatio[ISP_AUTO_ISO_STRENGTH_NUM];/* RW; Range: [0, 128];Format:9.0;Blending ratio required for DPC */
  636. } ISP_DP_DYNAMIC_AUTO_ATTR_S;
  637. typedef struct hiISP_DP_DYNAMIC_ATTR_S
  638. {
  639. HI_BOOL bEnable; /* RW; Range: [0, 1];Format 1.0;Enable/disable the dynamic defect-pixel module*/
  640. HI_BOOL bSupTwinkleEn; /* RW; Range: [0, 1];Format 1.0;Enable/disable the twinkle suppression module*/
  641. HI_S8 s8SoftThr; /* RW; Range: [0, 127];Format s8.0;twinkle suppression threshold*/
  642. HI_U8 u8SoftSlope; /* RW; Range: [0, 255];Format 8.0;Correction controlling parameter of the pixels whose deviation is smaller than s8SoftThr.*/
  643. ISP_OP_TYPE_E enOpType; /* RW; Range: [0, 1];Format 1.0;Working mode of dynamic DPC*/
  644. ISP_DP_DYNAMIC_MANUAL_ATTR_S stManual;
  645. ISP_DP_DYNAMIC_AUTO_ATTR_S stAuto;
  646. } ISP_DP_DYNAMIC_ATTR_S;
  647. typedef struct hiISP_DIS_ATTR_S
  648. {
  649. HI_BOOL bEnable;/* RW; Range: [0, 1];Format 1.0;Enable/disable dis module*/
  650. } ISP_DIS_ATTR_S;
  651. typedef struct hiISP_MLSC_CALIBRATION_CFG_S
  652. {
  653. ISP_BAYER_FORMAT_E enBayer; /* RW; Range: [0, 3];Format ENUM;Shows bayer pattern*/
  654. ISP_BAYER_RAWBIT_E enRawBit; /* RW; Range: {8,10,12,14,16};Format ENUM;Shows input raw bitwidth*/
  655. HI_U16 u16ImgHeight; /* RW; Range: [0, 65535];Format 16.0;Shows image height value*/
  656. HI_U16 u16ImgWidth; /* RW; Range: [0, 65535];Format 16.0;Shows image width value*/
  657. HI_U32 u32MeshScale; /* RW; Range: [0, 7];Format 32.0; Shows Mesh Scale value*/
  658. HI_U16 u16BLCOffsetR; /* RW; Range: [0, 65535];Format 16.0;BLC value for R channel*/
  659. HI_U16 u16BLCOffsetGr;/* RW; Range: [0, 65535];Format 16.0;BLC value for Gr channel*/
  660. HI_U16 u16BLCOffsetGb;/* RW; Range: [0, 65535];Format 16.0;BLC value for Gb channel*/
  661. HI_U16 u16BLCOffsetB; /* RW; Range: [0, 65535];Format 16.0;BLC value for B channel*/
  662. } ISP_MLSC_CALIBRATION_CFG_S;
  663. typedef struct hiISP_MESH_SHADING_TABLE_S
  664. {
  665. HI_U16 au16XGridWidth[16];/*RW, Range:[0x0, u32Width/4]*/
  666. HI_U16 au16YGridWidth[16];/*RW, Range:[0x0, u32Height/4]*/
  667. HI_U16 au16RGain[HI_ISP_LSC_GRID_POINTS]; /*RW; Range:[0,1023];Member used to store the calibration data of the R channel required for LSC.*/
  668. HI_U16 au16GrGain[HI_ISP_LSC_GRID_POINTS]; /*RW; Range:[0,1023];Member used to store the calibration data of the Gr channel required for LSC.*/
  669. HI_U16 au16GbGain[HI_ISP_LSC_GRID_POINTS]; /*RW; Range:[0,1023];Member used to store the calibration data of the Gb channel required for LSC.*/
  670. HI_U16 au16BGain[HI_ISP_LSC_GRID_POINTS]; /*RW; Range:[0,1023];Member used to store the calibration data of the B channel required for LSC.*/
  671. } ISP_MESH_SHADING_TABLE_S;
  672. typedef struct hiISP_SHADING_ATTR_S
  673. {
  674. HI_BOOL bEnable; /*RW; Range:[0, 1];Format:1.0; HI_TRUE: enable lsc; HI_FALSE: disable lsc*/
  675. HI_U16 u16MeshStr; /*RW; Range:[0, 65535];Format:16.0; the strength of the mesh shading correction*/
  676. HI_U16 u16BlendRatio; /*RW; Range:[0, 256];Format:9.0; the blendratio of the two mesh gain lookup-table*/
  677. } ISP_SHADING_ATTR_S;
  678. typedef struct hiISP_SHADING_LUT_S
  679. {
  680. HI_U16 au16RGain[HI_ISP_LSC_GRID_POINTS]; /*RW; Range:[0,1023];Member used to store the calibration data of the R channel required for LSC.*/
  681. HI_U16 au16GrGain[HI_ISP_LSC_GRID_POINTS]; /*RW; Range:[0,1023];Member used to store the calibration data of the Gr channel required for LSC.*/
  682. HI_U16 au16GbGain[HI_ISP_LSC_GRID_POINTS]; /*RW; Range:[0,1023];Member used to store the calibration data of the Gb channel required for LSC.*/
  683. HI_U16 au16BGain[HI_ISP_LSC_GRID_POINTS]; /*RW; Range:[0,1023];Member used to store the calibration data of the B channel required for LSC.*/
  684. } ISP_SHADING_GAIN_LUT_S;
  685. typedef struct hiISP_SHADING_LUT_ATTR_S
  686. {
  687. HI_U8 u8MeshScale; /*RW; Range:[0, 7];Format:3.0;Three bit value that selects the scale and precision for the 10 bit gain coefficients stored in mesh tables*/
  688. HI_U16 au16XGridWidth[(HI_ISP_LSC_GRID_COL - 1) / 2]; /*RW; Range:[4, 1988];Format:11.0;limited Range:[4, u32Width/4 - 60],Member used to store the width data of each GRID partition*/
  689. HI_U16 au16YGridWidth[(HI_ISP_LSC_GRID_ROW - 1) / 2]; /*RW; Range:[4, 1988];Format:11.0;limited Range:[4, u32Height/4 - 60],Member used to store the height data of each GRID partition*/
  690. ISP_SHADING_GAIN_LUT_S astLscGainLut[2];
  691. } ISP_SHADING_LUT_ATTR_S;
  692. typedef struct hiISP_RADIAL_SHADING_ATTR_S
  693. {
  694. HI_BOOL bEnable; /*RW; Range:[0, 1];Format:1.0; HI_TRUE: enable rlsc; HI_FALSE: disable rlsc*/
  695. HI_U16 u16RadialStr; /*RW; Range:[0, 65535];Format:4.12; the strength of the mesh shading correction*/
  696. } ISP_RADIAL_SHADING_ATTR_S;
  697. typedef struct hiISP_RADIAL_SHADING_LUT_S
  698. {
  699. HI_U16 au16RGain[HI_ISP_RLSC_POINTS]; /*RW; Range:[0,65535];Member used to store the calibration data of the R channel required for RLSC.*/
  700. HI_U16 au16GrGain[HI_ISP_RLSC_POINTS]; /*RW; Range:[0,65535];Member used to store the calibration data of the Gr channel required for RLSC.*/
  701. HI_U16 au16GbGain[HI_ISP_RLSC_POINTS]; /*RW; Range:[0,65535];Member used to store the calibration data of the Gb channel required for RLSC.*/
  702. HI_U16 au16BGain[HI_ISP_RLSC_POINTS]; /*RW; Range:[0,65535];Member used to store the calibration data of the B channel required for RLSC.*/
  703. } ISP_RADIAL_SHADING_GAIN_LUT_S;
  704. typedef struct hiISP_RADIAL_SHADING_LUT_ATTR_S
  705. {
  706. OPERATION_MODE_E enLightMode; /*RW; Range:[0, 1];Format:1.0; HI_TRUE: manual mode; HI_FALSE: auto mode*/
  707. HI_U16 u16BlendRatio; /*RW; Range:[0, 256];Format:8.0; Used in manual mode only, indicates the light blending strength for the first light info*/
  708. HI_U8 u8LightType1; /*RW; Range:[0, 2];Format:2.0; Used in manual mode only, indicates the first light source selected*/
  709. HI_U8 u8LightType2; /*RW; Range:[0, 2];Format:2.0; Used in manual mode only, indicates the second light source selected*/
  710. HI_U8 u8RadialScale; /*RW; Range:[0, 13];Format:4.0;Four bit value that selects the scale and precision for the 10 bit gain coefficients*/
  711. HI_U16 u16CenterRX; /*RW; Range:[0, 65535];Format:16.0;Limited Range:[0, Width], shows x value of the position of optical center of red channel*/
  712. HI_U16 u16CenterRY; /*RW; Range:[0, 65535];Format:16.0;Limited Range:[0, Height], shows y value of the position of optical center of red channel*/
  713. HI_U16 u16CenterGrX; /*RW; Range:[0, 65535];Format:16.0;Limited Range:[0, Width], shows x value of the position of optical center of gr channel*/
  714. HI_U16 u16CenterGrY; /*RW; Range:[0, 65535];Format:16.0;Limited Range:[0, Height], shows y value of the position of optical center of gr channel*/
  715. HI_U16 u16CenterGbX; /*RW; Range:[0, 65535];Format:16.0;Limited Range:[0, Width], shows x value of the position of optical center of gb channel*/
  716. HI_U16 u16CenterGbY; /*RW; Range:[0, 65535];Format:16.0;Limited Range:[0, Height], shows y value of the position of optical center of gb channel*/
  717. HI_U16 u16CenterBX; /*RW; Range:[0, 65535];Format:16.0;Limited Range:[0, Width], shows x value of the position of optical center of blue channel*/
  718. HI_U16 u16CenterBY; /*RW; Range:[0, 65535];Format:16.0;Limited Range:[0, Height], shows y value of the position of optical center of blue channel*/
  719. HI_U16 u16OffCenterR; /*RW; Range:[0, 65535];Format:16.0;related to the 1/R^2 value of red channel*/
  720. HI_U16 u16OffCenterGr; /*RW; Range:[0, 65535];Format:16.0;related to the 1/R^2 value of gr channel*/
  721. HI_U16 u16OffCenterGb; /*RW; Range:[0, 65535];Format:16.0;related to the 1/R^2 value of gb channel*/
  722. HI_U16 u16OffCenterB; /*RW; Range:[0, 65535];Format:16.0;related to the 1/R^2 value of blue channel*/
  723. ISP_RADIAL_SHADING_GAIN_LUT_S astRLscGainLut[3];
  724. } ISP_RADIAL_SHADING_LUT_ATTR_S;
  725. typedef struct hiISP_NR_MANUAL_ATTR_S
  726. {
  727. HI_U8 au8ChromaStr[BAYER_PATT_NUM]; /*RW;Range:[0x0,0x3];Format:2.0;Strength of Chrmoa noise reduction for R/Gr/Gb/B channel*/
  728. HI_U8 u8FineStr; /*RW;Range:[0x0,0x80];Format:8.0;Strength of Luma noise reduction*/
  729. HI_U16 u16CoringWgt; /*RW;Range:[0x0,0xc80];Format:12.0;Strength of reserving the random noise*/
  730. HI_U16 au16CoarseStr[BAYER_PATT_NUM]; /*RW;Range:[0x0,0x360];Format:10.0; Coarse Strength of noise reduction*/
  731. } ISP_NR_MANUAL_ATTR_S;
  732. typedef struct hiISP_NR_AUTO_ATTR_S
  733. {
  734. HI_U8 au8ChromaStr[BAYER_PATT_NUM][ISP_AUTO_ISO_STRENGTH_NUM]; /*RW;Range:[0x0,0x3];Format:2.0; Strength of chrmoa noise reduction for R/Gr/Gb/B channel*/
  735. HI_U8 au8FineStr[ISP_AUTO_ISO_STRENGTH_NUM]; /*RW;Range:[0x0,0x80];Format:8.0; Strength of luma noise reduction*/
  736. HI_U16 au16CoringWgt[ISP_AUTO_ISO_STRENGTH_NUM]; /*RW;Range:[0x0,0xc80];Format:12.0; Strength of reserving the random noise*/
  737. HI_U16 au16CoarseStr[BAYER_PATT_NUM][ISP_AUTO_ISO_STRENGTH_NUM]; /*RW;Range:[0x0,0x360];Format:10.0; Coarse Strength of noise reduction*/
  738. } ISP_NR_AUTO_ATTR_S;
  739. typedef struct hiISP_NR_WDR_ATTR_S
  740. {
  741. HI_U8 au8WDRFrameStr[WDR_MAX_FRAME_NUM]; /*RW;Range:[0x0,0x50];Format:7.0; Strength of each frame in wdr mode*/
  742. HI_U8 au8FusionFrameStr[WDR_MAX_FRAME_NUM]; /*RW;Range:[0x0,0x50];Format:7.0; Strength of each frame in wdr mode*/
  743. } ISP_NR_WDR_ATTR_S;
  744. typedef struct hiISP_NR_ATTR_S
  745. {
  746. HI_BOOL bEnable; /*RW;Range:[0x0,0x1];Format:1.0; Nr Enable*/
  747. HI_BOOL bLowPowerEnable; /*RW;Range:[0x0,0x1];Format:1.0; Nr Low Power Enable*/
  748. HI_BOOL bNrLscEnable; /*RW;Range:[0x0,0x1];Format:1.0; HI_TRUE: Noise reduction refers to lens shading; HI_FALSE: Noise reduction not refers to lens shading;*/
  749. HI_U8 u8NrLscRatio; /*RW;Range:[0x0,0xff];Format:8.0; Strength of reserving the random noise according to luma*/
  750. HI_U8 u8BnrLscMaxGain; /*RW;Range:[0x0,0xff];Format:2.6; Max gain for referring to lens shading*/
  751. HI_U16 u16BnrLscCmpStrength; /*RW;Range:[0x0,0x100];Format:1.8; Compare strength for referring to lens shading*/
  752. HI_U16 au16CoringRatio[HI_ISP_BAYERNR_LUT_LENGTH]; /*RW;Range:[0x0,0x3ff];Format:12.0; Strength of reserving the random noise according to luma*/
  753. ISP_OP_TYPE_E enOpType;
  754. ISP_NR_AUTO_ATTR_S stAuto;
  755. ISP_NR_MANUAL_ATTR_S stManual;
  756. ISP_NR_WDR_ATTR_S stWdr;
  757. } ISP_NR_ATTR_S;
  758. /*not support*/
  759. typedef struct hiISP_DE_MANUAL_ATTR_S
  760. {
  761. HI_U16 u16GlobalGain; /*RW;Range:[0x0,0x100];Format:1.8; not support*/
  762. HI_U16 u16GainLF; /*RW;Range:[0x0,0x100];Format:5.4; not support*/
  763. HI_U16 u16GainHF; /*RW;Range:[0x0,0x100];Format:5.4;not support*/
  764. } ISP_DE_MANUAL_ATTR_S;
  765. /*not support*/
  766. typedef struct hiISP_DE_AUTO_ATTR_S
  767. {
  768. HI_U16 au16GlobalGain[ISP_AUTO_ISO_STRENGTH_NUM]; /*RW;Range:[0x0,0x100];Format:1.8; not support*/
  769. HI_U16 au16GainLF[ISP_AUTO_ISO_STRENGTH_NUM]; /*RW;Range:[0x0,0x100];Format:5.4; not support*/
  770. HI_U16 au16GainHF[ISP_AUTO_ISO_STRENGTH_NUM]; /*RW;Range:[0x0,0x100];Format:5.4; not support*/
  771. } ISP_DE_AUTO_ATTR_S;
  772. /*not support*/
  773. typedef struct hiISP_DE_ATTR_S
  774. {
  775. HI_BOOL bEnable; /*RW;Range:[0x0,0x1];Format:1.0; De Enable,not support*/
  776. HI_U16 au16LumaGainLut[HI_ISP_DE_LUMA_GAIN_LUT_N]; /*RW;Range:[0x0,0x100];Format:1.8; not support*/
  777. ISP_OP_TYPE_E enOpType;
  778. ISP_DE_AUTO_ATTR_S stAuto;
  779. ISP_DE_MANUAL_ATTR_S stManual;
  780. } ISP_DE_ATTR_S;
  781. /*
  782. Defines the type of the ISP gamma curve
  783. 0 = Default curve
  784. 1 = Default BT.709 curve (Gamma Curve)
  785. 2 = Default SMPTE.2084 curve (PQ Curve)
  786. 3 = User defined Gamma curve, LUT must be correct
  787. */
  788. typedef enum hiISP_GAMMA_CURVE_TYPE_E
  789. {
  790. ISP_GAMMA_CURVE_DEFAULT = 0x0,
  791. ISP_GAMMA_CURVE_SRGB,
  792. ISP_GAMMA_CURVE_HDR,
  793. ISP_GAMMA_CURVE_USER_DEFINE,
  794. ISP_GAMMA_CURVE_BUTT
  795. } ISP_GAMMA_CURVE_TYPE_E;
  796. typedef struct hiISP_GAMMA_ATTR_S
  797. {
  798. HI_BOOL bEnable; /*RW; Range:[0, 1]; Format:1.0;Enable/Disable Gamma Function*/
  799. HI_U16 u16Table[GAMMA_NODE_NUM]; /*RW; Range:[0, 4095]; Format:12.0;Gamma LUT nodes value*/
  800. ISP_GAMMA_CURVE_TYPE_E enCurveType; /*RW; Range:[0, 3]; Format:2.0;Gamma curve type*/
  801. } ISP_GAMMA_ATTR_S;
  802. typedef struct hiISP_PREGAMMA_ATTR_S
  803. {
  804. HI_BOOL bEnable; /*RW; Range:[0, 1]; Format:1.0;Enable/Disable PreGamma Function*/
  805. HI_U32 au32Table[PREGAMMA_NODE_NUM]; /*RW; Range:[0, 1048576]; Format:21.0;PreGamma LUT nodes value*/
  806. } ISP_PREGAMMA_ATTR_S;
  807. typedef struct hiISP_PRELOGLUT_ATTR_S
  808. {
  809. HI_BOOL bEnable; /*RW; Range:[0, 1]; Format:1.0;Enable/Disable PreLogLUT Function*/
  810. } ISP_PRELOGLUT_ATTR_S;
  811. typedef struct hiISP_LOGLUT_ATTR_S
  812. {
  813. HI_BOOL bEnable; /*RW; Range:[0, 1]; Format:1.0;Enable/Disable LogLUT Function*/
  814. } ISP_LOGLUT_ATTR_S;
  815. #define ISP_SHARPEN_FREQ_CORING_LENGTH (8)
  816. #define SHRP_GAIN_LUT_SIZE (64)
  817. typedef struct hiISP_SHARPEN_MANUAL_ATTR_S
  818. {
  819. HI_U8 au8LumaWgt[ISP_SHARPEN_LUMA_NUM]; /* RW; Range: [0, 127]; Format:0.7;Adjust the sharpen strength according to luma. Sharpen strength will be weaker when it decrease. */
  820. HI_U16 au16TextureStr[ISP_SHARPEN_GAIN_NUM]; /* RW; Range: [0, 4095]; Format:7.5;Undirectional sharpen strength for texture and detail enhancement*/
  821. HI_U16 au16EdgeStr[ISP_SHARPEN_GAIN_NUM]; /* RW; Range: [0, 4095]; Format:7.5;Directional sharpen strength for edge enhancement*/
  822. HI_U16 u16TextureFreq; /* RW; Range: [0, 4095];Format:6.6; Texture frequency adjustment. Texture and detail will be finer when it increase*/
  823. HI_U16 u16EdgeFreq; /* RW; Range: [0, 4095];Format:6.6; Edge frequency adjustment. Edge will be narrower and thiner when it increase*/
  824. HI_U8 u8OverShoot; /* RW; Range: [0, 127]; Format:7.0;u8OvershootAmt*/
  825. HI_U8 u8UnderShoot; /* RW; Range: [0, 127]; Format:7.0;u8UndershootAmt*/
  826. HI_U8 u8ShootSupStr; /* RW; Range: [0, 255]; Format:8.0;overshoot and undershoot suppression strength, the amplitude and width of shoot will be decrease when shootSupSt increase*/
  827. HI_U8 u8ShootSupAdj; /* RW; Range: [0, 15]; Format:4.0;overshoot and undershoot suppression adjusting, adjust the edge shoot suppression strength*/
  828. HI_U8 u8DetailCtrl; /* RW; Range: [0, 255]; Format:8.0;Different sharpen strength for detail and edge. When it is bigger than 128, detail sharpen strength will be stronger than edge. [0, 255] */
  829. HI_U8 u8DetailCtrlThr; /* RW; Range: [0, 255]; Format:8.0; The threshold of DetailCtrl, it is used to distinguish detail and edge. */
  830. HI_U8 u8EdgeFiltStr; /* RW; Range: [0, 63]; Format:6.0;The strength of edge filtering. [0, 63] */
  831. HI_U8 u8RGain; /* RW; Range: Hi3559AV100 = [0, 31] | Hi3519AV100 = [0, 32]; Format:5.0;Sharpen Gain for Red Area*/
  832. HI_U8 u8BGain; /* RW; Range: Hi3559AV100 = [0, 31] | Hi3519AV100 = [0, 32]; Format:5.0;Sharpen Gain for Blue Area*/
  833. HI_U8 u8SkinGain; /* RW; Range: [0, 31]; Format:5.0;Sharpen Gain for Skin Area*/
  834. HI_U16 u16MaxSharpGain; /* RW; Range: [0, 0x7FF]; Format:8.3; Maximum sharpen gain*/
  835. } ISP_SHARPEN_MANUAL_ATTR_S;
  836. typedef struct hiISP_SHARPEN_AUTO_ATTR_S
  837. {
  838. HI_U8 au8LumaWgt[ISP_SHARPEN_LUMA_NUM][ISP_AUTO_ISO_STRENGTH_NUM]; /* RW; Range: [0, 127]; Format:0.7;Adjust the sharpen strength according to luma. Sharpen strength will be weaker when it decrease. */
  839. HI_U16 au16TextureStr[ISP_SHARPEN_GAIN_NUM][ISP_AUTO_ISO_STRENGTH_NUM]; /* RW; Range: [0, 4095]; Format:7.5;Undirectional sharpen strength for texture and detail enhancement*/
  840. HI_U16 au16EdgeStr[ISP_SHARPEN_GAIN_NUM][ISP_AUTO_ISO_STRENGTH_NUM]; /* RW; Range: [0, 4095]; Format:7.5;Directional sharpen strength for edge enhancement*/
  841. HI_U16 au16TextureFreq[ISP_AUTO_ISO_STRENGTH_NUM]; /* RW; Range: [0, 4095]; Format:6.6;Texture frequency adjustment. Texture and detail will be finer when it increase*/
  842. HI_U16 au16EdgeFreq[ISP_AUTO_ISO_STRENGTH_NUM]; /* RW; Range: [0, 4095]; Format:6.6;Edge frequency adjustment. Edge will be narrower and thiner when it increase*/
  843. HI_U8 au8OverShoot[ISP_AUTO_ISO_STRENGTH_NUM]; /* RW; Range: [0, 127]; Format:7.0;u8OvershootAmt*/
  844. HI_U8 au8UnderShoot[ISP_AUTO_ISO_STRENGTH_NUM]; /* RW; Range: [0, 127]; Format:7.0;u8UndershootAmt*/
  845. HI_U8 au8ShootSupStr[ISP_AUTO_ISO_STRENGTH_NUM]; /* RW; Range: [0, 255]; Format:8.0;overshoot and undershoot suppression strength, the amplitude and width of shoot will be decrease when shootSupSt increase*/
  846. HI_U8 au8ShootSupAdj[ISP_AUTO_ISO_STRENGTH_NUM]; /* RW; Range: [0, 15]; Format:4.0;overshoot and undershoot suppression adjusting, adjust the edge shoot suppression strength*/
  847. HI_U8 au8DetailCtrl[ISP_AUTO_ISO_STRENGTH_NUM]; /* RW; Range: [0, 255]; Format:8.0;Different sharpen strength for detail and edge. When it is bigger than 128, detail sharpen strength will be stronger than edge. [0, 255] */
  848. HI_U8 au8DetailCtrlThr[ISP_AUTO_ISO_STRENGTH_NUM]; /* RW; Range: [0, 255]; Format:8.0; The threshold of DetailCtrl, it is used to distinguish detail and edge. */
  849. HI_U8 au8EdgeFiltStr[ISP_AUTO_ISO_STRENGTH_NUM]; /* RW; Range: [0, 63]; Format:6.0;The strength of edge filtering. [0, 63] */
  850. HI_U8 au8RGain[ISP_AUTO_ISO_STRENGTH_NUM]; /* RW; Range: Hi3559AV100 = [0, 31] | Hi3519AV100 = [0, 32]; Format:5.0;Sharpen Gain for Red Area*/
  851. HI_U8 au8BGain[ISP_AUTO_ISO_STRENGTH_NUM]; /* RW; Range: Hi3559AV100 = [0, 31] | Hi3519AV100 = [0, 32]; Format:5.0;Sharpen Gain for Blue Area*/
  852. HI_U8 au8SkinGain[ISP_AUTO_ISO_STRENGTH_NUM]; /* RW; Range: [0, 31]; Format:5.0;Sharpen Gain for Skin Area*/
  853. HI_U16 au16MaxSharpGain[ISP_AUTO_ISO_STRENGTH_NUM]; /* RW; Range: [0, 0x7FF]; Format:8.3; Maximum sharpen gain*/
  854. } ISP_SHARPEN_AUTO_ATTR_S;
  855. typedef struct hiISP_SHARPEN_ATTR_S
  856. {
  857. HI_BOOL bEnable; /*RW; Range:[0, 1]; Format:1.0;Enable/Disable sharpen module*/
  858. HI_U8 u8SkinUmin; /* RW; Range: [0, 255]; Format:8.0; U min value of the range of skin area */
  859. HI_U8 u8SkinVmin; /* RW; Range: [0, 255]; Format:8.0; V min value of the range of skin area */
  860. HI_U8 u8SkinUmax; /* RW; Range: [0, 255]; Format:8.0; U max value of the range of skin area */
  861. HI_U8 u8SkinVmax; /* RW; Range: [0, 255]; Format:8.0; V max value of the range of skin area */
  862. ISP_OP_TYPE_E enOpType;
  863. ISP_SHARPEN_MANUAL_ATTR_S stManual;
  864. ISP_SHARPEN_AUTO_ATTR_S stAuto;
  865. } ISP_SHARPEN_ATTR_S;
  866. typedef struct hiISP_EDGEMARK_ATTR_S
  867. {
  868. HI_BOOL bEnable; /*RW; Range:[0, 1]; Format:1.0;Enable/Disable Edge Mark*/
  869. HI_U8 u8Threshold; /* RW; Range: [0, 255]; Format:8.0;*/
  870. HI_U32 u32Color; /* RW; Range: [0, 0xFFFFFF]; Format:32.0;*/
  871. } ISP_EDGEMARK_ATTR_S;
  872. //High Light Constraint
  873. typedef struct hiISP_HLC_ATTR_S
  874. {
  875. HI_BOOL bEnable; /*RW; Range:[0, 1]; Format:1.0;Enable/Disable HLC module,Only used for Hi3519AV100 */
  876. HI_U8 u8LumaThr; /*RW; Range:[0, 255];Format:8.0;Only used for Hi3519AV100 */
  877. HI_U8 u8LumaTarget; /*RW; Range:[0, 255];Format:8.0;Only used for Hi3519AV100 */
  878. } ISP_HLC_ATTR_S;
  879. /*Crosstalk Removal*/
  880. typedef struct hiISP_CR_ATTR_S
  881. {
  882. HI_BOOL bEnable; /* RW; Range: [0, 1];Format 1.0;Enable/disable the crosstalk removal module*/
  883. HI_U8 u8Slope; /* RW; Range: [0, 14];Format 4.0;Crosstalk slope value.*/
  884. HI_U8 u8SensiSlope; /* RW; Range: [0, 14];Format 4.0;Crosstalk sensitivity.*/
  885. HI_U16 u16SensiThr; /* RW; Range: [0, 16383];Format 14.0;Crosstalk sensitivity threshold.*/
  886. HI_U16 au16Strength[ISP_AUTO_ISO_STRENGTH_NUM]; /* RW; Range: [0, 256];Format 9.0;Crosstalk strength value.*/
  887. HI_U16 au16Threshold[ISP_AUTO_ISO_STRENGTH_NUM]; /* RW; Range: [0, 16383];Format 14.0;Crosstalk threshold.*/
  888. HI_U16 au16NpOffset[ISP_AUTO_ISO_STRENGTH_NUM]; /* RW; Range: [512, 16383];Format 14.0;Set Noise profile value.*/
  889. } ISP_CR_ATTR_S;
  890. typedef struct hiISP_ANTIFALSECOLOR_MANUAL_ATTR_S
  891. {
  892. HI_U8 u8AntiFalseColorThreshold; /*RW;Range:[0x0,0x20];Format:6.0;Threshold for antifalsecolor */
  893. HI_U8 u8AntiFalseColorStrength; /*RW;Range:[0x0,0x1F];Format:5.0;Strength of antifalsecolor */
  894. } ISP_ANTIFALSECOLOR_MANUAL_ATTR_S;
  895. typedef struct hiISP_ANTIFALSECOLOR_AUTO_ATTR_S
  896. {
  897. HI_U8 au8AntiFalseColorThreshold[ISP_AUTO_ISO_STRENGTH_NUM]; /*RW;Range:[0x0,0x20];Format:6.0;Threshold for antifalsecolor */
  898. HI_U8 au8AntiFalseColorStrength[ISP_AUTO_ISO_STRENGTH_NUM]; /*RW;Range:[0x0,0x1F];Format:5.0;Strength of antifalsecolor */
  899. } ISP_ANTIFALSECOLOR_AUTO_ATTR_S;
  900. typedef struct hiISP_ANTIFALSECOLOR_ATTR_S
  901. {
  902. HI_BOOL bEnable; /*RW;Range:[0x0,0x1];Format:1.0; AntiFalseColor Enable*/
  903. ISP_OP_TYPE_E enOpType;
  904. ISP_ANTIFALSECOLOR_AUTO_ATTR_S stAuto;
  905. ISP_ANTIFALSECOLOR_MANUAL_ATTR_S stManual;
  906. } ISP_ANTIFALSECOLOR_ATTR_S;
  907. typedef struct hiISP_DEMOSAIC_MANUAL_ATTR_S
  908. {
  909. HI_U8 u8NonDirStr; /*RW; Range:[0x0, 0xFF]; Format:4.4; Non-direction strength*/
  910. HI_U8 u8NonDirMFDetailEhcStr; /*RW; Range:Hi3559AV100 = [0x0, 0x10] |other = [0x0, 0x7f] ; Format:3.4; Non-direction medium frequent detail enhance strength*/
  911. HI_U8 u8NonDirHFDetailEhcStr; /*RW; Range:[0x0,0x10]; Format:2.2; Non-direction high detail enhance strength*/
  912. HI_U8 u8DetailSmoothRange; /*RW; Range:Hi3559AV100 = [0x1, 0x8] |other = [0x1, 0x7]; Format:4.0; Detail smooth range*/
  913. HI_U16 u16DetailSmoothStr; /*RW;Range:[0x0,0x100]; Format:9.0; Strength of detail smooth, Only used for Hi3559AV100*/
  914. } ISP_DEMOSAIC_MANUAL_ATTR_S;
  915. typedef struct hiISP_DEMOSAIC_AUTO_ATTR_S
  916. {
  917. HI_U8 au8NonDirStr[ISP_AUTO_ISO_STRENGTH_NUM]; /*RW; Range:[0x0, 0xFF]; Format:4.4; Non-direction strength*/
  918. HI_U8 au8NonDirMFDetailEhcStr[ISP_AUTO_ISO_STRENGTH_NUM]; /*RW; Range:Hi3559AV100 = [0x0, 0x10] |other = [0x0, 0x7f] ; Format:3.4; Non-direction medium frequent detail enhance strength*/
  919. HI_U8 au8NonDirHFDetailEhcStr[ISP_AUTO_ISO_STRENGTH_NUM]; /*RW; Range:[0x0,0x10]; Format:2.2; Non-direction high frequent detail enhance strength*/
  920. HI_U8 au8DetailSmoothRange[ISP_AUTO_ISO_STRENGTH_NUM]; /*RW; Range:Hi3559AV100 = [0x1, 0x8] |other = [0x1, 0x7]; Format:4.0; Detail smooth range*/
  921. HI_U16 au16DetailSmoothStr[ISP_AUTO_ISO_STRENGTH_NUM]; /*RW;Range:[0x0,0x100]; Format:9.0; Strength of detail smooth, Only used for Hi3559AV100*/
  922. } ISP_DEMOSAIC_AUTO_ATTR_S;
  923. typedef struct hiISP_DEMOSAIC_ATTR_S
  924. {
  925. HI_BOOL bEnable; /*RW; Range:[0, 1]; Format:1.0;Enable/Disable demosaic module*/
  926. ISP_OP_TYPE_E enOpType;
  927. ISP_DEMOSAIC_MANUAL_ATTR_S stManual;
  928. ISP_DEMOSAIC_AUTO_ATTR_S stAuto;
  929. } ISP_DEMOSAIC_ATTR_S;
  930. /*Defines the attributes of the ISP black level*/
  931. typedef struct hiISP_BLACK_LEVEL_S
  932. {
  933. ISP_OP_TYPE_E enOpType;
  934. HI_U16 au16BlackLevel[ISP_BAYER_CHN_NUM]; /* RW; Range: [0x0, 0xFFF];Format:12.0;Black level values that correspond to the black levels of the R,Gr, Gb, and B components respectively.*/
  935. } ISP_BLACK_LEVEL_S;
  936. /*
  937. Defines the FPN removal type
  938. 0 = Frame mode correction
  939. 1 = Line mode correction
  940. */
  941. typedef enum hiISP_FPN_TYPE_E
  942. {
  943. ISP_FPN_TYPE_FRAME = 0,
  944. ISP_FPN_TYPE_LINE = 1,
  945. ISP_FPN_TYPE_BUTT
  946. } ISP_FPN_TYPE_E;
  947. /*Defines the information about calibrated black frames*/
  948. typedef struct hiISP_FPN_FRAME_INFO_S
  949. {
  950. HI_U32 u32Iso; /* RW;Range:[0x64,0xFFFFFFFF];Format:32.0;FPN CALIBRATE ISO */
  951. HI_U32 u32Offset[VI_MAX_SPLIT_NODE_NUM]; /* RW;Range:[0,0xFFF];Format:12.0;FPN frame u32Offset (agv pixel value) */
  952. HI_U32 u32FrmSize; /* RW;FPN frame size (exactly frm size or compress len) */
  953. VIDEO_FRAME_INFO_S stFpnFrame; /* FPN frame info, 8bpp,10bpp,12bpp,16bpp. Compression or not */
  954. } ISP_FPN_FRAME_INFO_S;
  955. /*Defines the calibration attribute of the FPN removal module*/
  956. typedef struct hiISP_FPN_CALIBRATE_ATTR_S
  957. {
  958. HI_U32 u32Threshold; /* RW;Range:[1,0xFFF];Format:12.0;pix value > threshold means defective pixel */
  959. HI_U32 u32FrameNum; /* RW;Range:[1, 16];Format:5.0;Number of frames to be calibrated. The value range is {1, 2, 4, 8, 16},that is, the integer exponentiation of 2. */
  960. ISP_FPN_TYPE_E enFpnType; /* frame mode or line mode */
  961. ISP_FPN_FRAME_INFO_S stFpnCaliFrame;
  962. } ISP_FPN_CALIBRATE_ATTR_S;
  963. /*Defines the manual correction attribute of the FPN removal module*/
  964. typedef struct hiISP_FPN_MANUAL_ATTR_S
  965. {
  966. HI_U32 u32Strength; /* RW;Range:[0,1023];Format:10.0;Manual correction strength */
  967. } ISP_FPN_MANUAL_ATTR_S;
  968. /*Defines the automatic correction attribute of the FPN removal module*/
  969. typedef struct hiISP_FPN_AUTO_ATTR_S
  970. {
  971. HI_U32 u32Strength; /* RW;Range:[0,1023];Format:10.0;Auto correction strength */
  972. } ISP_FPN_AUTO_ATTR_S;
  973. /*Defines the correction attribute of the FPN removal module*/
  974. typedef struct hiISP_FPN_ATTR_S
  975. {
  976. HI_BOOL bEnable; /* RW;Range:[0,1];Format:1.0;*/
  977. ISP_OP_TYPE_E enOpType; /* manual or auto mode */
  978. ISP_FPN_TYPE_E enFpnType; /* frame mode or line mode */
  979. ISP_FPN_FRAME_INFO_S stFpnFrmInfo; /* input in correction mode. */
  980. ISP_FPN_MANUAL_ATTR_S stManual;
  981. ISP_FPN_AUTO_ATTR_S stAuto;
  982. } ISP_FPN_ATTR_S;
  983. /*Defines the manual dehze attribute*/
  984. typedef struct hiISP_DEHAZE_MANUAL_ATTR_S
  985. {
  986. HI_U8 u8strength; /* RW;Range:[0,0xFF];Format:8.0;Manual dehze strength */
  987. } ISP_DEHAZE_MANUAL_ATTR_S;
  988. /*Defines the automatic dehze attribute*/
  989. typedef struct hiISP_DEHAZE_AUTO_ATTR_S
  990. {
  991. HI_U8 u8strength; /* RW;Range:[0,0xFF];Format:8.0;Weighted coefficient for automatic dehaze strength. */
  992. } ISP_DEHAZE_AUTO_ATTR_S;
  993. /*Defines the ISP dehaze attribute*/
  994. typedef struct hiISP_DEHAZE_ATTR_S
  995. {
  996. HI_BOOL bEnable; /* RW;Range:[0,1];Format:1.0;*/
  997. HI_BOOL bUserLutEnable; /*RW;Range:[0,1];0:Auto Lut 1:User Lut*/
  998. HI_U8 au8DehazeLut[256];
  999. ISP_OP_TYPE_E enOpType;
  1000. ISP_DEHAZE_MANUAL_ATTR_S stManual;
  1001. ISP_DEHAZE_AUTO_ATTR_S stAuto;
  1002. } ISP_DEHAZE_ATTR_S;
  1003. /*Defines purple fringing correction manual attribute*/
  1004. typedef struct hiISP_DEPURPLESTR_MANUAL_ATTR_S
  1005. {
  1006. HI_U8 u8DePurpleCrStr; /*RW;Range: [0,8];Format:4.0;Correction strength of the R channel*/
  1007. HI_U8 u8DePurpleCbStr; /*RW;Range: [0,8];Format:4.0;Correction strength of the B channel*/
  1008. } ISP_DEPURPLESTR_MANUAL_ATTR_S;
  1009. /*Defines purple fringing correction automatic attribute*/
  1010. typedef struct hiISP_DEPURPLESTR_AUTO_ATTR_S
  1011. {
  1012. HI_U8 au8DePurpleCrStr[ISP_AUTO_ISO_STRENGTH_NUM]; /*RW;Range: [0,8];Format:4.0;Correction strength of the R channel*/
  1013. HI_U8 au8DePurpleCbStr[ISP_AUTO_ISO_STRENGTH_NUM]; /*RW;Range: [0,8];Format:4.0;Correction strength of the B channel*/
  1014. } ISP_DEPURPLESTR_AUTO_ATTR_S;
  1015. /*Purple fringing detection and correction attribute*/
  1016. typedef struct hiISP_LOCAL_CAC_ATTR_S
  1017. {
  1018. HI_BOOL bEnable; /*RW;Range: [0,1];Format:1.0; HI_TRUE: enable local cac; HI_FALSE: disable local cac*/
  1019. HI_U16 u16PurpleDetRange; /*RW;Range: [0,410];Format:9.0;Purple fringing detection scope*/
  1020. HI_U16 u16VarThr; /*RW;Range: [0,4095];Format:12.0;Edge detection threshold*/
  1021. ISP_OP_TYPE_E enOpType; /*RW;Range: [0,1];Format:1.0;Purple fringing correction working mode*/
  1022. ISP_DEPURPLESTR_MANUAL_ATTR_S stManual;
  1023. ISP_DEPURPLESTR_AUTO_ATTR_S stAuto;
  1024. } ISP_LOCAL_CAC_ATTR_S;
  1025. /*Defines the lateral chromatic aberration correction attribute*/
  1026. typedef struct hiISP_GLOBAL_CAC_ATTR_S
  1027. {
  1028. HI_BOOL bEnable; /* RW; Range: [0, 1];Format: 1.0; enable/disable global cac*/
  1029. HI_U16 u16VerCoordinate; /* RW; Range: [0, 8191];Format: 13.0; limited Range: [0, ImageHeight - 1],Vertical coordinate of the optical center*/
  1030. HI_U16 u16HorCoordinate; /* RW; Range: [0, 8191];Format: 13.0; limited range : [0, ImageWidth - 1],Horizontal coordinate of the optical center*/
  1031. HI_S16 s16ParamRedA; /* RW; Range: [-256, 255];Format: 9.0; Coefficient a of the radius polynomial corresponding to channel R*/
  1032. HI_S16 s16ParamRedB; /* RW; Range: [-256, 255];Format: 9.0; Coefficient b of the radius polynomial corresponding to channel R*/
  1033. HI_S16 s16ParamRedC; /* RW; Range: [-256, 255];Format: 9.0; Coefficient c of the radius polynomial corresponding to channel R*/
  1034. HI_S16 s16ParamBlueA; /* RW; Range: [-256, 255];Format: 9.0; Coefficient a of the radius polynomial corresponding to channel B*/
  1035. HI_S16 s16ParamBlueB; /* RW; Range: [-256, 255];Format: 9.0; Coefficient b of the radius polynomial corresponding to channel B*/
  1036. HI_S16 s16ParamBlueC; /* RW; Range: [-256, 255];Format: 9.0; Coefficient c of the radius polynomial corresponding to channel B*/
  1037. HI_U8 u8VerNormShift; /* RW; Range: [0, 7];Format: 3.0; Normalized shift parameter in the vertical direction*/
  1038. HI_U8 u8VerNormFactor; /* RW; Range: [0, 31];Format: 5.0;Normalized coefficient in the vertical direction*/
  1039. HI_U8 u8HorNormShift; /* RW; Range: [0, 7];Format: 3.0; Normalized shift parameter in the horizontal direction*/
  1040. HI_U8 u8HorNormFactor; /* RW; Range: [0, 31];Format: 5.0;Normalized coefficient in the horizontal direction*/
  1041. HI_U16 u16CorVarThr; /* RW; Range: [0, 4095];Format: 12.0;Variance threshold of lateral chromatic aberration correction*/
  1042. } ISP_GLOBAL_CAC_ATTR_S;
  1043. /*Defines the Radial Crop attribute*/
  1044. typedef struct hiISP_RC_ATTR_S
  1045. {
  1046. HI_BOOL bEnable; /*RW;Range:[0,1];Format:1.0; HI_TRUE: enable ridial crop; HI_FALSE: disable ridial crop*/
  1047. POINT_S stCenterCoor; /*RW;the coordinate of central pixel*/
  1048. HI_U32 u32Radius; /*RW;Range:[0,11586];Format:14.0; when the distance to central pixel is greater than u32Radius,the pixel value becomes 0 */
  1049. } ISP_RC_ATTR_S;
  1050. typedef struct hiISP_INNER_STATE_INFO_S
  1051. {
  1052. HI_U16 au16TextureStr[ISP_SHARPEN_GAIN_NUM]; /* RW; range: [0, 4095]; Format:7.5;Undirectional sharpen strength for texture and detail enhancement*/
  1053. HI_U16 au16EdgeStr[ISP_SHARPEN_GAIN_NUM]; /* RW; range: [0, 4095]; Format:7.5;Directional sharpen strength for edge enhancement*/
  1054. HI_U16 u16TextureFreq; /* RW; range: [0, 4095];Format:6.6; Texture frequency adjustment. Texture and detail will be finer when it increase*/
  1055. HI_U16 u16EdgeFreq; /* RW; range: [0, 4095];Format:6.6; Edge frequency adjustment. Edge will be narrower and thiner when it increase*/
  1056. HI_U8 u8OverShoot; /* RW; range: [0, 127]; Format:7.0;u8OvershootAmt*/
  1057. HI_U8 u8UnderShoot; /* RW; range: [0, 127]; Format:7.0;u8UndershootAmt*/
  1058. HI_U8 u8ShootSupStr; /* RW; range: [0, 255]; Format:8.0;overshoot and undershoot suppression strength, the amplitude and width of shoot will be decrease when shootSupSt increase*/
  1059. HI_U8 u8NrLscRatio; /*RW;Range:[0x0,0xff];Format:8.0; Strength of reserving the random noise according to luma*/
  1060. HI_U16 au16CoarseStr[BAYER_BUTT]; /*RW;Range:[0x0,0x3ff];Format:10.0; Coarse Strength of noise reduction */
  1061. HI_U8 au8WDRFrameStr[WDR_MAX_FRAME_NUM]; /*RW;Range:[0x0,0x50];Format:7.0; Coarse strength of each frame in wdr mode*/
  1062. HI_U8 au8ChromaStr[BAYER_BUTT]; /*RW;Range:[0x0,0x3];Format:2.0;Strength of Chrmoa noise reduction for R/Gr/Gb/B channel*/
  1063. HI_U8 u8FineStr; /*RW;Range:[0x0,0x80];Format:8.0;Strength of Luma noise reduction*/
  1064. HI_U16 u16CoringWgt; /*RW;Range:[0x0,0xC80];Format:12.0;Strength of reserving the random noise*/
  1065. HI_U16 u16DeHazeStrengthActual; /* RW;Range:[0,0xFF];Format:8.0;actual dehze strength */
  1066. HI_U16 u16DrcStrengthActual; /* RW;Range: Hi3559AV100 = [0x0, 0xFF] | Hi3519AV100 = [0x0, 0x3FF];Strength of dynamic range compression.
  1067. Higher values lead to higher differential gain between shadows and highlights. */
  1068. HI_U32 u32WDRExpRatioActual[3]; /*RW; Range:[0x40, 0x4000]; Format:26.6; 0x40 means 1 times.
  1069. When enExpRatioType is OP_TYPE_AUTO, u32ExpRatio is invalid.
  1070. When enExpRatioType is OP_TYPE_MANUAL, u32ExpRatio is quotient of long exposure time / short exposure time. */
  1071. HI_BOOL bWDRSwitchFinish; /* RW; Range:[0, 1];Format:1.0;HI_TRUE: WDR switch is finished*/
  1072. HI_BOOL bResSwitchFinish; /* RW; Range:[0, 1];Format:1.0;HI_TRUE: Resolution switch is finished*/
  1073. HI_U16 au16BLActual[ISP_BAYER_CHN_NUM]; /* RW; Range: [0x0, 0xFFF];Format:12.0;Actual Black level values that correspond to the black levels of the R,Gr, Gb, and B components respectively.*/
  1074. } ISP_INNER_STATE_INFO_S;
  1075. /*
  1076. The position of AE histogram in ISP BE pipeline
  1077. 0 = After DG;
  1078. 1 = After static WB;
  1079. 2 = After DRC;
  1080. */
  1081. typedef enum hiISP_AE_SWITCH_E
  1082. {
  1083. ISP_AE_AFTER_DG = 0,
  1084. ISP_AE_AFTER_WB,
  1085. ISP_AE_AFTER_DRC,
  1086. ISP_AE_SWITCH_BUTT
  1087. } ISP_AE_SWITCH_E;
  1088. /*
  1089. FourPlaneMode enable
  1090. 0 = Disabled;
  1091. 1 = Enabled
  1092. */
  1093. typedef enum hiISP_AE_FOUR_PLANE_MODE_E
  1094. {
  1095. ISP_AE_FOUR_PLANE_MODE_DISABLE = 0,
  1096. ISP_AE_FOUR_PLANE_MODE_ENABLE,
  1097. ISP_AE_FOUR_PLANE_MODE_BUTT
  1098. } ISP_AE_FOUR_PLANE_MODE_E;
  1099. typedef enum hiISP_AE_HIST_SKIP_E
  1100. {
  1101. ISP_AE_HIST_SKIP_EVERY_PIXEL = 0,
  1102. ISP_AE_HIST_SKIP_EVERY_2ND_PIXEL,
  1103. ISP_AE_HIST_SKIP_EVERY_3RD_PIXEL,
  1104. ISP_AE_HIST_SKIP_EVERY_4TH_PIXEL,
  1105. ISP_AE_HIST_SKIP_EVERY_5TH_PIXEL,
  1106. ISP_AE_HIST_SKIP_EVERY_8TH_PIXEL,
  1107. ISP_AE_HIST_SKIP_EVERY_9TH_PIXEL,
  1108. ISP_AE_HIST_SKIP_BUTT
  1109. } ISP_AE_HIST_SKIP_E;
  1110. typedef enum hiISP_AE_HIST_OFFSET_X_E
  1111. {
  1112. ISP_AE_HIST_START_FORM_FIRST_COLUMN = 0,
  1113. ISP_AE_HIST_START_FORM_SECOND_COLUMN,
  1114. ISP_AE_HIST_OFFSET_X_BUTT
  1115. } ISP_AE_HIST_OFFSET_X_E;
  1116. typedef enum hiISP_AE_HIST_OFFSET_Y_E
  1117. {
  1118. ISP_AE_HIST_START_FORM_FIRST_ROW = 0,
  1119. ISP_AE_HIST_START_FORM_SECOND_ROW,
  1120. ISP_AE_HIST_OFFSET_Y_BUTT
  1121. } ISP_AE_HIST_OFFSET_Y_E;
  1122. /*Defines the mode configuration for the sampling points during global histogram statistics.*/
  1123. typedef struct hiISP_AE_HIST_CONFIG_S
  1124. {
  1125. ISP_AE_HIST_SKIP_E enHistSkipX; /*RW; Range:[0,6]; Format:4.0;
  1126. Histogram decimation in horizontal direction: 0=every pixel; 1=every 2nd pixel; 2=every
  1127. 3rd pixel; 3=every 4th pixel; 4=every 5th pixel; 5=every 8th pixel ; 6+=every 9th pixel */
  1128. ISP_AE_HIST_SKIP_E enHistSkipY; /*RW; Range:[0,6]; Format:4.0;
  1129. Histogram decimation in vertical direction: 0=every pixel; 1=every 2nd pixel; 2=every
  1130. 3rd pixel; 3=every 4th pixel; 4=every 5th pixel; 5=every 8th pixel ; 6+=every 9th pixel */
  1131. ISP_AE_HIST_OFFSET_X_E enHistOffsetX; /*RW; Range:[0,1]; Format:1.0; 0= start from the first column; 1=start from second column */
  1132. ISP_AE_HIST_OFFSET_Y_E enHistOffsetY; /*RW; Range:[0,1]; Format:1.0; 0= start from the first row; 1= start from second row */
  1133. } ISP_AE_HIST_CONFIG_S;
  1134. typedef enum hiISP_AE_STAT_MODE__E
  1135. {
  1136. ISP_AE_NORMAL = 0,
  1137. ISP_AE_ROOT,
  1138. ISP_AE_MODE_BUTT
  1139. } ISP_AE_STAT_MODE_E;
  1140. /* config of statistics structs */
  1141. #define HIST_THRESH_NUM (4)
  1142. typedef struct hiISP_AE_STATISTICS_CFG_S
  1143. {
  1144. ISP_AE_SWITCH_E enAESwitch; /*RW; Range:[0,2]; Format:2.0;The position of AE histogram in ISP BE pipeline*/
  1145. ISP_AE_HIST_CONFIG_S stHistConfig;
  1146. ISP_AE_FOUR_PLANE_MODE_E enFourPlaneMode; /*RW; Range:[0,1]; Format:2.0;Four Plane Mode Enable*/
  1147. ISP_AE_STAT_MODE_E enHistMode; /*RW; Range:[0,1]; Format:2.0;AE Hist Rooting Mode*/
  1148. ISP_AE_STAT_MODE_E enAverMode; /*RW; Range:[0,1]; Format:2.0;AE Aver Rooting Mode*/
  1149. ISP_AE_STAT_MODE_E enMaxGainMode; /*RW; Range:[0,1]; Format:2.0;Max Gain Rooting Mode*/
  1150. HI_U8 au8Weight[AE_ZONE_ROW][AE_ZONE_COLUMN]; /*RW; Range:[0x0, 0xF]; Format:4.0; AE weighting table*/
  1151. } ISP_AE_STATISTICS_CFG_S;
  1152. /*fines whether the peak value of the zoned IIR statistics is calculated*/
  1153. typedef enum hiISP_AF_PEAK_MODE_E
  1154. {
  1155. ISP_AF_STA_NORM = 0, /* use every value of the block statistic*/
  1156. ISP_AF_STA_PEAK , /* use the maximum value in one line of the block statistic*/
  1157. ISP_AF_STA_BUTT
  1158. } ISP_AF_PEAK_MODE_E;
  1159. /*Defines whether the zoned statistics are squared in square mode*/
  1160. typedef enum hiISP_AF_SQU_MODE_E
  1161. {
  1162. ISP_AF_STA_SUM_NORM = 0, /* statistic value accumlate*/
  1163. ISP_AF_STA_SUM_SQU , /* statistic value square then accumlate*/
  1164. ISP_AF_STA_SUM_BUTT
  1165. } ISP_AF_SQU_MODE_E;
  1166. /*Crops the input image of the AF module*/
  1167. typedef struct hiISP_AF_CROP_S
  1168. {
  1169. HI_BOOL bEnable; /* RW; Range: [0,1]; Format:1.0;ble. */
  1170. HI_U16 u16X; /* RW; Range: [0x0, 0x1FFF]; Format:13.0;AF image crop start x */
  1171. HI_U16 u16Y; /* RW; Range: [0x0, 0x1FFF]; Format:13.0;AF image crop start y */
  1172. HI_U16 u16W; /* RW; Range: [0x0, 0x1FFF]; Format:13.0;AF image crop width */
  1173. HI_U16 u16H; /* RW; Range: [0x0, 0x1FFF]; Format:13.0;AF image crop height */
  1174. } ISP_AF_CROP_S;
  1175. /*Defines the position of AF module statistics*/
  1176. typedef enum hiISP_AF_STATISTICS_POS_E
  1177. {
  1178. ISP_AF_STATISTICS_AFTER_DGAIN = 0,//The AF module is placed in the raw field for statistics,AF after DGain
  1179. ISP_AF_STATISTICS_AFTER_DRC ,//The AF module is placed in the raw field for statistics,AF after DRC
  1180. ISP_AF_STATISTICS_AFTER_CSC ,//The AF module is placed in the YUV field for statistics,AF after CSC
  1181. ISP_AF_STATISTICS_BUTT
  1182. } ISP_AF_STATISTICS_POS_E;
  1183. /*Configures the Bayer field of the AF module*/
  1184. typedef struct hiISP_AF_RAW_CFG_S
  1185. {
  1186. HI_U8 GammaGainLimit; /* RW; Range: [0x0, 0x5]; Format:3.0; */
  1187. HI_U8 GammaValue; /* RW; Range: [0x0, 0x6]; Format:3.0; */
  1188. ISP_BAYER_FORMAT_E enPattern; /* RW; Range: [0x0, 0x3]; Format:2.0;raw domain pattern*/
  1189. } ISP_AF_RAW_CFG_S;
  1190. /*Configures the pre-filter of the AF module*/
  1191. typedef struct hiISP_AF_PRE_FILTER_CFG_S
  1192. {
  1193. HI_BOOL bEn; /* RW; Range: [0,1]; Format:1.0; pre filter enable . */
  1194. HI_U16 u16strength; /* RW; Range: [0x0, 0xFFFF]; Format:16.0;pre filter strength */
  1195. } ISP_AF_PRE_FILTER_CFG_S;
  1196. /*Defines AF statistics configuration parameters*/
  1197. typedef struct hiISP_AF_CFG_S
  1198. {
  1199. HI_BOOL bEnable; /* RW; Range: [0,1]; AF enable. */
  1200. HI_U16 u16Hwnd; /* RW; Range: [1, 17]; AF statistic window horizontal block. */
  1201. HI_U16 u16Vwnd; /* RW; Range: [1, 15]; AF statistic window veritical block. */
  1202. HI_U16 u16Hsize; /* RW; Range: [1, 8192]; limited Range: [1, RES_WIDTH_MAX],AF image width.*/
  1203. HI_U16 u16Vsize; /* RW; Range: [1, 8192]; limited Range: [1, RES_HEIGHT_MAX],AF image height. */
  1204. ISP_AF_PEAK_MODE_E enPeakMode; /* RW; Range: [0,1]; AF peak value statistic mode. */
  1205. ISP_AF_SQU_MODE_E enSquMode; /* RW; Range: [0,1]; AF statistic square accumulate. */
  1206. ISP_AF_CROP_S stCrop; /* RW; AF input image crop */
  1207. ISP_AF_STATISTICS_POS_E enStatisticsPos;/* RW; Range: [0,1]; AF statistic position, it can be set to yuv or raw */
  1208. ISP_AF_RAW_CFG_S stRawCfg; /* RW; When AF locate at RAW domain, these para should be cfg.*/
  1209. ISP_AF_PRE_FILTER_CFG_S stPreFltCfg; /* RW; pre filter cfg */
  1210. HI_U16 u16HighLumaTh; /* RW; Range: [0,0xFF]; high luma threshold. */
  1211. } ISP_AF_CFG_S;
  1212. /*Configures the AF level depend gain module*/
  1213. typedef struct hiISP_AF_LD_S
  1214. {
  1215. HI_BOOL bLdEn; /* RW; Range: [0, 1]; FILTER level depend gain enable. */
  1216. HI_U16 u16ThLow; /* RW; range: [0x0, 0xFF]; FILTER level depend th low */
  1217. HI_U16 u16GainLow; /* RW; range: [0x0, 0xFF]; FILTER level depend gain low */
  1218. HI_U16 u16SlpLow; /* RW; range: [0x0, 0xF]; FILTER level depend slope low */
  1219. HI_U16 u16ThHigh; /* RW; range: [0x0, 0xFF]; FILTER level depend th high */
  1220. HI_U16 u16GainHigh; /* RW; range: [0x0, 0xFF]; FILTER level depend gain high */
  1221. HI_U16 u16SlpHigh; /* RW; range: [0x0, 0xF]; FILTER level depend slope high */
  1222. } ISP_AF_LD_S;
  1223. /*Configures the AF coring module*/
  1224. typedef struct hiISP_AF_CORING_S
  1225. {
  1226. HI_U16 u16Th; /* RW; Range: [0x0, 0x7FF];FILTER coring threshold. */
  1227. HI_U16 u16Slp; /* RW; Range: [0x0, 0xF]; FILTER Coring Slope */
  1228. HI_U16 u16Lmt; /* RW; Range: [0x0, 0x7FF];FILTER coring limit */
  1229. } ISP_AF_CORING_S ;
  1230. #define IIR_EN_NUM (3)
  1231. #define IIR_GAIN_NUM (7)
  1232. #define IIR_SHIFT_NUM (4)
  1233. /*Defines the IIR parameter configuration of horizontal filters for AF statistics*/
  1234. typedef struct hiISP_AF_H_PARAM_S
  1235. {
  1236. HI_BOOL bNarrowBand; /* RW; Range: [0, 1]; IIR narrow band enable. */
  1237. HI_BOOL abIIREn[IIR_EN_NUM]; /* RW; Range: [0, 1]; IIR enable. */
  1238. HI_U8 u8IIRShift; /* RW; Range: [0, 63]; IIR Shift */
  1239. HI_S16 as16IIRGain[IIR_GAIN_NUM]; /* RW; Range: [-511, 511]. IIR gain,gain0 range:[0,255]. */
  1240. HI_U16 au16IIRShift[IIR_SHIFT_NUM];/* RW; Range: [0x0, 0x7]; IIR shift. */
  1241. ISP_AF_LD_S stLd; /* RW; filter level depend. */
  1242. ISP_AF_CORING_S stCoring; /* RW; filter coring. */
  1243. } ISP_AF_H_PARAM_S;
  1244. #define FIR_GAIN_NUM (5)
  1245. typedef struct hiISP_AF_V_PARAM_S
  1246. {
  1247. HI_S16 as16FIRH[FIR_GAIN_NUM]; /* RW; Range: [-31, 31]; FIR gain. */
  1248. ISP_AF_LD_S stLd; /* RW; filter level depend. */
  1249. ISP_AF_CORING_S stCoring; /* RW; filter coring. */
  1250. } ISP_AF_V_PARAM_S;
  1251. #define ACC_SHIFT_H_NUM (2)
  1252. #define ACC_SHIFT_V_NUM (2)
  1253. typedef struct hiISP_AF_FV_PARAM_S
  1254. {
  1255. HI_U16 u16AccShiftY; /* RW; Range: [0x0, 0xF]; luminance Y statistic shift. */
  1256. HI_U16 au16AccShiftH[ACC_SHIFT_H_NUM]; /* RW; Range: [0x0, 0xF]; IIR statistic shift. */
  1257. HI_U16 au16AccShiftV[ACC_SHIFT_V_NUM]; /* RW; Range: [0x0, 0xF]; FIR statistic shift. */
  1258. HI_U16 u16HlCntShift; /* RW; Range: [0x0, 0xF]; High luminance counter shift */
  1259. } ISP_AF_FV_PARAM_S;
  1260. typedef struct hiISP_FOCUS_STATISTICS_CFG_S
  1261. {
  1262. ISP_AF_CFG_S stConfig;
  1263. ISP_AF_H_PARAM_S stHParam_IIR0;
  1264. ISP_AF_H_PARAM_S stHParam_IIR1;
  1265. ISP_AF_V_PARAM_S stVParam_FIR0;
  1266. ISP_AF_V_PARAM_S stVParam_FIR1;
  1267. ISP_AF_FV_PARAM_S stFVParam;
  1268. } ISP_FOCUS_STATISTICS_CFG_S;
  1269. /*
  1270. the main purpose of stat key was to access individual statistic info separately...
  1271. ...for achieving performance optimization of CPU, because of we acquire stat...
  1272. ... in ISP_DRV ISR for our firmware reference and USER can also use alternative MPI...
  1273. ... to do this job, so bit1AeStat1~bit1AfStat for MPI behavior control, and bit16IsrAccess...
  1274. ... for ISR access control, they were independent. but they have the same bit order, for example...
  1275. ... bit1AeStat1 for MPI AeStat1 access key, and bit16 of u32Key for ISR AeStat1 access key
  1276. */
  1277. typedef union hiISP_STATISTICS_CTRL_U
  1278. {
  1279. HI_U64 u64Key;
  1280. struct
  1281. {
  1282. HI_U64 bit1FEAeGloStat : 1 ; /* [0] */
  1283. HI_U64 bit1FEAeLocStat : 1 ; /* [1] */
  1284. HI_U64 bit1FEAeStiGloStat : 1 ; /* [2] */
  1285. HI_U64 bit1FEAeStiLocStat : 1 ; /* [3] */
  1286. HI_U64 bit1BEAeGloStat : 1 ; /* [4] */
  1287. HI_U64 bit1BEAeLocStat : 1 ; /* [5] */
  1288. HI_U64 bit1BEAeStiGloStat : 1 ; /* [6] */
  1289. HI_U64 bit1BEAeStiLocStat : 1 ; /* [7] */
  1290. HI_U64 bit1AwbStat1 : 1 ; /* [8] */
  1291. HI_U64 bit1AwbStat2 : 1 ; /* [9] */
  1292. HI_U64 bit2Rsv0 : 2 ; /* [10:11] */
  1293. HI_U64 bit1FEAfStat : 1 ; /* [12] */
  1294. HI_U64 bit1BEAfStat : 1 ; /* [13] */
  1295. HI_U64 bit2Rsv1 : 2 ; /* [14:15] */
  1296. HI_U64 bit1Dehaze : 1 ; /* [16] */
  1297. HI_U64 bit1MgStat : 1 ; /* [17] */
  1298. HI_U64 bit14Rsv : 14; /* [18:31] */
  1299. HI_U64 bit32IsrAccess : 32; /* [32:63] */
  1300. };
  1301. } ISP_STATISTICS_CTRL_U;
  1302. /* statistics structs */
  1303. #define HIST_NUM (1024)
  1304. #define BAYER_PATTERN_NUM (4)
  1305. #define WDR_CHN_MAX (4)
  1306. #define ISP_CHN_MAX_NUM (4)
  1307. typedef struct hiISP_AE_STATISTICS_S
  1308. {
  1309. HI_U32 au32FEHist1024Value[ISP_CHN_MAX_NUM][HIST_NUM]; /*R; Range: [0x0, 0xFFFFFFFF]; Format:32.0; Global 1024 bins histogram of FE*/
  1310. HI_U16 au16FEGlobalAvg[ISP_CHN_MAX_NUM][BAYER_PATTERN_NUM]; /*R; Range: [0x0, 0xFFFF]; Format:16.0; Global average value of FE*/
  1311. HI_U16 au16FEZoneAvg[ISP_CHN_MAX_NUM][AE_ZONE_ROW][AE_ZONE_COLUMN][BAYER_PATTERN_NUM]; /*R; Range: [0x0, 0xFFFF]; Format:16.0; Zone average value of FE*/
  1312. HI_U32 au32BEHist1024Value[HIST_NUM]; /*R; Range: [0x0, 0xFFFFFFFF]; Format:32.0; Global 1024 bins histogram of BE*/
  1313. HI_U16 au16BEGlobalAvg[BAYER_PATTERN_NUM]; /*R; Range: [0x0, 0xFFFF]; Format:16.0; Global average value of BE*/
  1314. HI_U16 au16BEZoneAvg[AE_ZONE_ROW][AE_ZONE_COLUMN][BAYER_PATTERN_NUM]; /*R; Range: [0x0, 0xFFFF]; Format:16.0; Zone average value of BE*/
  1315. } ISP_AE_STATISTICS_S;
  1316. typedef struct hiISP_AE_STITCH_STATISTICS_S
  1317. {
  1318. HI_U32 au32FEHist1024Value[ISP_CHN_MAX_NUM][HIST_NUM]; /*R; Range: [0x0, 0xFFFFFFFF]; Format:32.0; Global 1024 bins histogram of FE*/
  1319. HI_U16 au16FEGlobalAvg[ISP_CHN_MAX_NUM][BAYER_PATTERN_NUM]; /*R; Range: [0x0, 0xFFFF]; Format:16.0; Global average value of FE*/
  1320. HI_U16 au16FEZoneAvg[VI_MAX_PIPE_NUM][ISP_CHN_MAX_NUM][AE_ZONE_ROW][AE_ZONE_COLUMN][BAYER_PATTERN_NUM]; /*R; Range: [0x0, 0xFFFF]; Format:16.0; Zone average value of FE*/
  1321. HI_U32 au32BEHist1024Value[HIST_NUM]; /*R; Range: [0x0, 0xFFFFFFFF]; Format:32.0; Global 1024 bins histogram of BE*/
  1322. HI_U16 au16BEGlobalAvg[BAYER_PATTERN_NUM]; /*R; Range: [0x0, 0xFFFF]; Format:16.0; Global average value of BE*/
  1323. HI_U16 au16BEZoneAvg[VI_MAX_PIPE_NUM][AE_ZONE_ROW][AE_ZONE_COLUMN][BAYER_PATTERN_NUM]; /*R; Range: [0x0, 0xFFFF]; Format:16.0; Zone average value of BE*/
  1324. } ISP_AE_STITCH_STATISTICS_S;
  1325. typedef struct hiISP_MG_STATISTICS_S
  1326. {
  1327. HI_U16 au16ZoneAvg[MG_ZONE_ROW][MG_ZONE_COLUMN][BAYER_PATTERN_NUM]; /*R; Range: [0x0, 0xFF]; Format:8.0; Zone average value*/
  1328. } ISP_MG_STATISTICS_S;
  1329. /************ AWB*************/
  1330. typedef enum hiISP_AWB_SWITCH_E
  1331. {
  1332. ISP_AWB_AFTER_DG = 0 ,
  1333. ISP_AWB_AFTER_Expander ,
  1334. ISP_AWB_AFTER_DRC ,
  1335. ISP_AWB_SWITCH_BUTT
  1336. } ISP_AWB_SWITCH_E;
  1337. /*Defines the AWB statistics configuration*/
  1338. typedef struct hiISP_WB_STATISTICS_CFG_S
  1339. {
  1340. ISP_AWB_SWITCH_E enAWBSwitch; /*RW; Range: [0x0, 0x2]; Position of AWB statistics in pipeline*/
  1341. HI_U16 u16ZoneRow; /*RW; Range: [0x1, 0x20]; Vertical Blocks*/
  1342. HI_U16 u16ZoneCol; /*RW; Range: [0x1, 0x20]; Horizontal Blocks*/
  1343. HI_U16 u16ZoneBin; /*RW; Range: [0x1, 0x4]; Brightness Bins*/
  1344. HI_U16 au16HistBinThresh[4]; /*RW; Range: [0x0, 0xFFFF]; Bin Threshold*/
  1345. HI_U16 u16WhiteLevel; /*RW; Range: [0x0, 0xFFFF];Upper limit of valid data for white region, for Bayer statistics, [0x0, 0x3FF] for RGB statistics*/
  1346. HI_U16 u16BlackLevel; /*RW; Range: [0x0, 0xFFFF];limited range: [0x0, u16WhiteLevel],Lower limit of valid data for white region . for Bayer statistics, bitwidth is 12, for RGB statistics, bitwidth is 10*/
  1347. HI_U16 u16CbMax; /*RW; Range: [0x0, 0xFFF];Maximum value of B/G for white region */
  1348. HI_U16 u16CbMin; /*RW; Range: [0x0, 0xFFF];limited range: [0x0, u16CbMax]Minimum value of B/G for white region */
  1349. HI_U16 u16CrMax; /*RW; Range: [0x0, 0xFFF];Maximum value of R/G for white region */
  1350. HI_U16 u16CrMin; /*RW; Range: [0x0, 0xFFF];limited range: [0x0, u16CrMax],Minimum value of R/G for white region */
  1351. } ISP_WB_STATISTICS_CFG_S;
  1352. typedef struct hiISP_WB_STITCH_STATISTICS_S
  1353. {
  1354. HI_U16 u16ZoneRow; /*R; Range: [0x0, 0x20]; effective horizontal block number for AWB statistic stitch window */
  1355. HI_U16 u16ZoneCol; /*R; Range: [0x0, 0x80]; effective vetical block number for AWB statistic stitch window */
  1356. HI_U16 au16ZoneAvgR[AWB_ZONE_STITCH_MAX]; /*R; Range: [0x0, 0xFFFF];Zone Average R for Stitich mode*/
  1357. HI_U16 au16ZoneAvgG[AWB_ZONE_STITCH_MAX]; /*R; Range: [0x0, 0xFFFF];Zone Average G for Stitich mode*/
  1358. HI_U16 au16ZoneAvgB[AWB_ZONE_STITCH_MAX]; /*R; Range: [0x0, 0xFFFF];Zone Average B for Stitich mode*/
  1359. HI_U16 au16ZoneCountAll[AWB_ZONE_STITCH_MAX]; /*R; Range: [0x0, 0xFFFF];normalized number of Gray points for Stitich mode*/
  1360. } ISP_WB_STITCH_STATISTICS_S;
  1361. typedef struct hiISP_WB_STATISTICS_S
  1362. {
  1363. HI_U16 u16GlobalR; /*R; Range: [0x0, 0xFFFF];Global WB output Average R */
  1364. HI_U16 u16GlobalG; /*R; Range: [0x0, 0xFFFF];Global WB output Average G */
  1365. HI_U16 u16GlobalB; /*R; Range: [0x0, 0xFFFF];Global WB output Average B */
  1366. HI_U16 u16CountAll; /*R; Range: [0x0, 0xFFFF];normalized number of Gray points */
  1367. HI_U16 au16ZoneAvgR[AWB_ZONE_NUM]; /*R; Range: [0x0, 0xFFFF];Zone Average R */
  1368. HI_U16 au16ZoneAvgG[AWB_ZONE_NUM]; /*R; Range: [0x0, 0xFFFF];Zone Average G */
  1369. HI_U16 au16ZoneAvgB[AWB_ZONE_NUM]; /*R; Range: [0x0, 0xFFFF];Zone Average B */
  1370. HI_U16 au16ZoneCountAll[AWB_ZONE_NUM]; /*R; Range: [0x0, 0xFFFF];normalized number of Gray points */
  1371. } ISP_WB_STATISTICS_S;
  1372. typedef struct hiISP_FOCUS_ZONE_S
  1373. {
  1374. HI_U16 u16v1; /*R; Range: [0x0, 0xFFFF];vertical fir block1 Statistics*/
  1375. HI_U16 u16h1; /*R; Range: [0x0, 0xFFFF];horizontal iir block1 Statistics*/
  1376. HI_U16 u16v2; /*R; Range: [0x0, 0xFFFF];vertical fir block2 Statistics*/
  1377. HI_U16 u16h2; /*R; Range: [0x0, 0xFFFF];horizontal iir block2 Statistics*/
  1378. HI_U16 u16y; /*R; Range: [0x0, 0xFFFF];Y Statistics*/
  1379. HI_U16 u16HlCnt; /*R; Range: [0x0, 0xFFFF];HlCnt Statistics*/
  1380. } ISP_FOCUS_ZONE_S;
  1381. typedef struct hiISP_FOCUS_STATISTICS_S
  1382. {
  1383. ISP_FOCUS_ZONE_S stZoneMetrics[WDR_CHN_MAX][AF_ZONE_ROW][AF_ZONE_COLUMN]; /*R; The zoned measure of contrast*/
  1384. } ISP_FOCUS_STATISTICS_S;
  1385. typedef struct hiISP_AF_STATISTICS_S
  1386. {
  1387. ISP_FOCUS_STATISTICS_S stFEAFStat;
  1388. ISP_FOCUS_STATISTICS_S stBEAFStat;
  1389. } ISP_AF_STATISTICS_S;
  1390. typedef struct hiISP_STATISTICS_CFG_S
  1391. {
  1392. ISP_STATISTICS_CTRL_U unKey;
  1393. ISP_AE_STATISTICS_CFG_S stAECfg;
  1394. ISP_WB_STATISTICS_CFG_S stWBCfg;
  1395. ISP_FOCUS_STATISTICS_CFG_S stFocusCfg;
  1396. } ISP_STATISTICS_CFG_S;
  1397. typedef struct hiISP_INIT_ATTR_S
  1398. {
  1399. HI_U32 u32ExpTime;
  1400. HI_U32 u32AGain;
  1401. HI_U32 u32DGain;
  1402. HI_U32 u32ISPDGain;
  1403. HI_U32 u32Exposure;
  1404. HI_U32 u32LinesPer500ms;
  1405. HI_U32 u32PirisFNO;
  1406. HI_U16 u16WBRgain;
  1407. HI_U16 u16WBGgain;
  1408. HI_U16 u16WBBgain;
  1409. HI_U16 u16SampleRgain;
  1410. HI_U16 u16SampleBgain;
  1411. } ISP_INIT_ATTR_S ;
  1412. /*ISP debug information*/
  1413. typedef struct hiISP_DEBUG_INFO_S
  1414. {
  1415. HI_BOOL bDebugEn; /*RW; 1:enable debug, 0:disable debug*/
  1416. HI_U64 u64PhyAddr; /*RW; phy address of debug info */
  1417. HI_U32 u32Depth; /*RW; depth of debug info */
  1418. } ISP_DEBUG_INFO_S;
  1419. typedef struct hiISP_DBG_ATTR_S
  1420. {
  1421. HI_U32 u32Rsv; /* H;need to add member */
  1422. } ISP_DBG_ATTR_S;
  1423. typedef struct hiISP_DBG_STATUS_S
  1424. {
  1425. HI_U32 u32FrmNumBgn;
  1426. HI_U32 u32Rsv; /* H;need to add member */
  1427. HI_U32 u32FrmNumEnd;
  1428. } ISP_DBG_STATUS_S;
  1429. /*
  1430. 0 = Communication between the sensor and the ISP over the I2C interface
  1431. 1 = Communication between the sensor and the ISP over the SSP interface
  1432. */
  1433. typedef enum hiISP_SNS_TYPE_E
  1434. {
  1435. ISP_SNS_I2C_TYPE = 0,
  1436. ISP_SNS_SSP_TYPE,
  1437. ISP_SNS_TYPE_BUTT,
  1438. } ISP_SNS_TYPE_E;
  1439. /* sensor communication bus */
  1440. typedef union hiISP_SNS_COMMBUS_U
  1441. {
  1442. HI_S8 s8I2cDev;
  1443. struct
  1444. {
  1445. HI_S8 bit4SspDev : 4;
  1446. HI_S8 bit4SspCs : 4;
  1447. } s8SspDev;
  1448. } ISP_SNS_COMMBUS_U;
  1449. typedef struct hiISP_I2C_DATA_S
  1450. {
  1451. HI_BOOL bUpdate; /*RW; Range: [0x0, 0x1]; Format:1.0; HI_TRUE: The sensor registers are written,HI_FALSE: The sensor registers are not written*/
  1452. HI_U8 u8DelayFrmNum; /*RW; Number of delayed frames for the sensor register*/
  1453. HI_U8 u8IntPos; /*RW;Position where the configuration of the sensor register takes effect */
  1454. HI_U8 u8DevAddr; /*RW;Sensor device address*/
  1455. HI_U32 u32RegAddr; /*RW;Sensor register address*/
  1456. HI_U32 u32AddrByteNum; /*RW;Bit width of the sensor register address*/
  1457. HI_U32 u32Data; /*RW;Sensor register data*/
  1458. HI_U32 u32DataByteNum; /*RW;Bit width of sensor register data*/
  1459. } ISP_I2C_DATA_S;
  1460. typedef struct hiISP_SSP_DATA_S
  1461. {
  1462. HI_BOOL bUpdate; /*RW; Range: [0x0, 0x1]; Format:1.0; HI_TRUE: The sensor registers are written,HI_FALSE: The sensor registers are not written*/
  1463. HI_U8 u8DelayFrmNum; /*RW; Number of delayed frames for the sensor register*/
  1464. HI_U8 u8IntPos; /*RW;Position where the configuration of the sensor register takes effect */
  1465. HI_U32 u32DevAddr; /*RW;Sensor device address*/
  1466. HI_U32 u32DevAddrByteNum; /*RW;Bit width of the sensor device address*/
  1467. HI_U32 u32RegAddr; /*RW;Sensor register address*/
  1468. HI_U32 u32RegAddrByteNum; /*RW;Bit width of the sensor register address*/
  1469. HI_U32 u32Data; /*RW;Sensor register data*/
  1470. HI_U32 u32DataByteNum; /*RW;Bit width of sensor register data*/
  1471. } ISP_SSP_DATA_S;
  1472. typedef struct hiISP_SNS_REGS_INFO_S
  1473. {
  1474. ISP_SNS_TYPE_E enSnsType;
  1475. HI_U32 u32RegNum; /*RW;Number of registers required when exposure results are written to the sensor. The member value cannot be dynamically changed*/
  1476. HI_U8 u8Cfg2ValidDelayMax; /*RW;Maximum number of delayed frames from the time when all sensor registers are configured to the
  1477. time when configurations take effect, which is used to ensure the synchronization between sensor registers and ISP registers*/
  1478. ISP_SNS_COMMBUS_U unComBus;
  1479. union
  1480. {
  1481. ISP_I2C_DATA_S astI2cData[ISP_MAX_SNS_REGS];
  1482. ISP_SSP_DATA_S astSspData[ISP_MAX_SNS_REGS];
  1483. };
  1484. struct
  1485. {
  1486. HI_BOOL bUpdate;
  1487. HI_U8 u8DelayFrmNum;
  1488. HI_U32 u32SlaveVsTime; /* RW;time of vsync. Unit: inck clock cycle */
  1489. HI_U32 u32SlaveBindDev;
  1490. } stSlvSync;
  1491. HI_BOOL bConfig;
  1492. } ISP_SNS_REGS_INFO_S;
  1493. typedef enum hiISP_VD_TYPE_E
  1494. {
  1495. ISP_VD_FE_START = 0,
  1496. ISP_VD_FE_END,
  1497. ISP_VD_BE_END,
  1498. ISP_VD_BUTT
  1499. } ISP_VD_TYPE_E;
  1500. /*Defines the attributes of the virtual addresses for the registers of ISP submodules*/
  1501. typedef struct hiISP_REG_ATTR_S
  1502. {
  1503. HI_VOID *pIspExtRegAddr; /*R;Start virtual address for the ISP external virtual registers*/
  1504. HI_U32 u32IspExtRegSize; /*R;Size of the ISP external virtual registers*/
  1505. HI_VOID *pAeExtRegAddr; /*R;Start virtual address for the AE library module*/
  1506. HI_U32 u32AeExtRegSize; /*R;Size of the AE library module*/
  1507. HI_VOID *pAwbExtRegAddr; /*R;Start virtual address for the AWB library module*/
  1508. HI_U32 u32AwbExtRegSize; /*R;Size of the AWB library module*/
  1509. } ISP_REG_ATTR_S;
  1510. /******************************************************/
  1511. /********************* AI structs ************************/
  1512. /*
  1513. Defines the ISP iris type
  1514. 0 = DC iris
  1515. 1 = P iris
  1516. */
  1517. typedef enum hiISP_IRIS_TYPE_E
  1518. {
  1519. ISP_IRIS_DC_TYPE = 0,
  1520. ISP_IRIS_P_TYPE,
  1521. ISP_IRIS_TYPE_BUTT,
  1522. } ISP_IRIS_TYPE_E;
  1523. /*
  1524. Defines the F value of the ISP iris
  1525. */
  1526. typedef enum hiISP_IRIS_F_NO_E
  1527. {
  1528. ISP_IRIS_F_NO_32_0 = 0,
  1529. ISP_IRIS_F_NO_22_0,
  1530. ISP_IRIS_F_NO_16_0,
  1531. ISP_IRIS_F_NO_11_0,
  1532. ISP_IRIS_F_NO_8_0,
  1533. ISP_IRIS_F_NO_5_6,
  1534. ISP_IRIS_F_NO_4_0,
  1535. ISP_IRIS_F_NO_2_8,
  1536. ISP_IRIS_F_NO_2_0,
  1537. ISP_IRIS_F_NO_1_4,
  1538. ISP_IRIS_F_NO_1_0,
  1539. ISP_IRIS_F_NO_BUTT,
  1540. } ISP_IRIS_F_NO_E;
  1541. typedef struct hiISP_DCIRIS_ATTR_S
  1542. {
  1543. HI_S32 s32Kp; /*RW; Range:[0, 100000]; Format:32.0; the proportional gain of PID algorithm, default value is 7000 */
  1544. HI_S32 s32Ki; /*RW; Range:[0, 1000]; Format:32.0; the integral gain of PID algorithm, default value is 100 */
  1545. HI_S32 s32Kd; /*RW; Range:[0, 100000]; Format:32.0; the derivative gain of PID algorithm, default value is 3000 */
  1546. HI_U32 u32MinPwmDuty; /*RW; Range:[0, 1000]; Format:32.0; which is the min pwm duty for dciris control */
  1547. HI_U32 u32MaxPwmDuty; /*RW; Range:[0, 1000]; Format:32.0; which is the max pwm duty for dciris control */
  1548. HI_U32 u32OpenPwmDuty; /*RW; Range:[0, 1000]; Format:32.0; which is the open pwm duty for dciris control */
  1549. } ISP_DCIRIS_ATTR_S;
  1550. typedef struct hiISP_PIRIS_ATTR_S
  1551. {
  1552. HI_BOOL bStepFNOTableChange; /*W; Range:[0, 1]; Format:1.0; Step-F number mapping table change or not */
  1553. HI_BOOL bZeroIsMax; /*RW; Range:[0, 1]; Format:1.0; Step 0 corresponds to max aperture or not, it's related to the specific iris */
  1554. HI_U16 u16TotalStep; /*RW; Range:[1, 1024]; Format:16.0; Total steps of Piris's aperture, it's related to the specific iris */
  1555. HI_U16 u16StepCount; /*RW; Range:[1, 1024]; Format:16.0; Used steps of Piris's aperture. when Piris's aperture is too small, the F number precision is not enough,
  1556. so not all the steps can be used. It's related to the specific iris*/
  1557. HI_U16 au16StepFNOTable[AI_MAX_STEP_FNO_NUM]; /*RW; Range:[1, 1024]; Format:16.0; Step-F number mapping table. F1.0 is expressed as 1024, F32 is expressed as 1, it's related to the specific iris*/
  1558. ISP_IRIS_F_NO_E enMaxIrisFNOTarget; /*RW; Range:[0, 10]; Format:4.0; Max F number of Piris's aperture, it's related to the specific iris */
  1559. ISP_IRIS_F_NO_E enMinIrisFNOTarget; /*RW; Range:[0, 10]; Format:4.0; Min F number of Piris's aperture, it's related to the specific iris */
  1560. HI_BOOL bFNOExValid; /*RW; Range:[0, 1]; Format:1.0; use equivalent gain to present FNO or not */
  1561. HI_U32 u32MaxIrisFNOTarget; /*RW; Range:[1, 1024]; Format:16.0; Max equivalent gain of F number of Piris's aperture, only used when bFNOExValid is true, it's related to the specific iris */
  1562. HI_U32 u32MinIrisFNOTarget; /*RW; Range:[1, 1024]; Format:16.0; Min equivalent gain of F number of Piris's aperture, only used when bFNOExValid is true, it's related to the specific iris */
  1563. } ISP_PIRIS_ATTR_S;
  1564. /*Defines the MI attribute*/
  1565. typedef struct hiISP_MI_ATTR_S
  1566. {
  1567. HI_U32 u32HoldValue; /*RW; Range:[0, 1000]; Format:32.0; iris hold value for DC-iris*/
  1568. ISP_IRIS_F_NO_E enIrisFNO; /*RW; Range:[0, 10]; Format:4.0; the F number of P-iris*/
  1569. } ISP_MI_ATTR_S;
  1570. /*
  1571. Defines the ISP iris status
  1572. 0 = In this mode can set the MI holdvalue
  1573. 1 = Open Iris to the max
  1574. 2 = Close Iris to the min
  1575. */
  1576. typedef enum hiISP_IRIS_STATUS_E
  1577. {
  1578. ISP_IRIS_KEEP = 0,
  1579. ISP_IRIS_OPEN = 1,
  1580. ISP_IRIS_CLOSE = 2,
  1581. ISP_IRIS_BUTT
  1582. } ISP_IRIS_STATUS_E;
  1583. /*Defines the iris attribute*/
  1584. typedef struct hiISP_IRIS_ATTR_S
  1585. {
  1586. HI_BOOL bEnable; /* RW;iris enable/disable */
  1587. ISP_OP_TYPE_E enOpType; /* auto iris or manual iris */
  1588. ISP_IRIS_TYPE_E enIrisType; /* DC-iris or P-iris */
  1589. ISP_IRIS_STATUS_E enIrisStatus; /*RW; status of Iris*/
  1590. ISP_MI_ATTR_S stMIAttr;
  1591. } ISP_IRIS_ATTR_S;
  1592. /******************************************************/
  1593. /********************* AE structs ************************/
  1594. /*
  1595. Defines the AE mode
  1596. 0 = Automatic frame rate reduction mode (slow shutter mode)
  1597. 1 = Constant frame rate mode
  1598. */
  1599. typedef enum hiISP_AE_MODE_E
  1600. {
  1601. AE_MODE_SLOW_SHUTTER = 0,
  1602. AE_MODE_FIX_FRAME_RATE = 1,
  1603. AE_MODE_BUTT
  1604. } ISP_AE_MODE_E;
  1605. /*
  1606. Defines the AE exposure policy mode
  1607. 0 = Highlight first exposure mode
  1608. 1 = Lowlight first exposure mode
  1609. */
  1610. typedef enum hiISP_AE_STRATEGY_E
  1611. {
  1612. AE_EXP_HIGHLIGHT_PRIOR = 0,
  1613. AE_EXP_LOWLIGHT_PRIOR = 1,
  1614. AE_STRATEGY_MODE_BUTT
  1615. } ISP_AE_STRATEGY_E;
  1616. /*Defines the maximum exposure time or gain and minimum exposure time or gain*/
  1617. typedef struct hiISP_AE_RANGE_S
  1618. {
  1619. HI_U32 u32Max; /*RW;Range:[0,0xFFFFFFFF];Format:32.0;Maximum value*/
  1620. HI_U32 u32Min; /*RW;Range:[0,0xFFFFFFFF];Format:32.0;limited Range:[0,u32Max],Minimum value*/
  1621. } ISP_AE_RANGE_S;
  1622. /*Defines the ISP exposure delay attribute*/
  1623. typedef struct hiISP_AE_DELAY_S
  1624. {
  1625. HI_U16 u16BlackDelayFrame; /*RW; Range:[0, 65535]; Format:16.0; AE black delay frame count*/
  1626. HI_U16 u16WhiteDelayFrame; /*RW; Range:[0, 65535]; Format:16.0; AE white delay frame count*/
  1627. } ISP_AE_DELAY_S;
  1628. /*
  1629. Defines the anti-flicker mode.
  1630. 0 = The epxosure time is fixed to be the multiplies of 1/(2*frequency) sec,it may lead to over exposure in the high-luminance environments.
  1631. 1 = The anti flicker may be closed to avoid over exposure in the high-luminance environments.
  1632. */
  1633. typedef enum hiISP_ANTIFLICKER_MODE_E
  1634. {
  1635. ISP_ANTIFLICKER_NORMAL_MODE = 0x0,
  1636. ISP_ANTIFLICKER_AUTO_MODE = 0x1,
  1637. ISP_ANTIFLICKER_MODE_BUTT
  1638. } ISP_ANTIFLICKER_MODE_E;
  1639. /*Defines the anti-flicker attribute*/
  1640. typedef struct hiISP_ANTIFLICKER_S
  1641. {
  1642. HI_BOOL bEnable; /*RW; Range:[0, 1]; Format:1.0;*/
  1643. HI_U8 u8Frequency; /*RW; Range:[0, 255]; Format:8.0; usually this value is 50 or 60 which is the frequency of the AC power supply*/
  1644. ISP_ANTIFLICKER_MODE_E enMode;
  1645. } ISP_ANTIFLICKER_S;
  1646. typedef struct hiISP_SUBFLICKER_S
  1647. {
  1648. HI_BOOL bEnable; /*RW; Range:[0, 1]; Format:1.0; */
  1649. HI_U8 u8LumaDiff; /* RW; Range:[0, 100]; Format:8.0; if subflicker mode enable, current luma is less than AE compensation plus LumaDiff,
  1650. AE will keep min antiflicker shutter time(for example: 1/100s or 1/120s) to avoid flicker. while current luma is
  1651. larger than AE compensation plus the LumaDiff, AE will reduce shutter time to avoid over-exposure and introduce
  1652. flicker in the pircture */
  1653. } ISP_SUBFLICKER_S;
  1654. /*
  1655. Defines the ISP FSWDR operating mode
  1656. 0 = Normal FSWDR mode
  1657. 1 = Long frame mode, only effective in LINE_WDR, when running in this mode FSWDR module only output the long frame data
  1658. */
  1659. typedef enum hiISP_FSWDR_MODE_E
  1660. {
  1661. ISP_FSWDR_NORMAL_MODE = 0x0,
  1662. ISP_FSWDR_LONG_FRAME_MODE = 0x1,
  1663. ISP_FSWDR_AUTO_LONG_FRAME_MODE = 0x2,/*Auto long frame mode, only effective in LINE_WDR, When running in this mode, normal WDR and long frame mode would auto switch*/
  1664. ISP_FSWDR_MODE_BUTT
  1665. } ISP_FSWDR_MODE_E;
  1666. typedef struct hiISP_AE_ATTR_S
  1667. {
  1668. /* base parameter */
  1669. ISP_AE_RANGE_S stExpTimeRange; /*RW; Range:[0x0, 0xFFFFFFFF]; Format:32.0; sensor exposure time (unit: us ), it's related to the specific sensor */
  1670. ISP_AE_RANGE_S stAGainRange; /*RW; Range:[0x400, 0xFFFFFFFF]; Format:22.10; sensor analog gain (unit: times, 10bit precision), it's related to the specific sensor */
  1671. ISP_AE_RANGE_S stDGainRange; /*RW; Range:[0x400, 0xFFFFFFFF]; Format:22.10; sensor digital gain (unit: times, 10bit precision), it's related to the specific sensor */
  1672. ISP_AE_RANGE_S stISPDGainRange; /*RW; Range:[0x400, 0x40000]; Format:22.10; ISP digital gain (unit: times, 10bit precision), it's related to the ISP digital gain range */
  1673. ISP_AE_RANGE_S stSysGainRange; /*RW; Range:[0x400, 0xFFFFFFFF]; Format:22.10; system gain (unit: times, 10bit precision), it's related to the specific sensor and ISP Dgain range */
  1674. HI_U32 u32GainThreshold; /*RW; Range:[0x400, 0xFFFFFFFF]; Format:22.10; Gain threshold for slow shutter mode (unit: times, 10bit precision)*/
  1675. HI_U8 u8Speed; /*RW; Range:[0x0, 0xFF]; Format:8.0; AE adjust step for dark scene to bright scene switch */
  1676. HI_U16 u16BlackSpeedBias; /*RW; Range:[0x0, 0xFFFF]; Format:16.0; AE adjust step bias for bright scene to dark scene switch */
  1677. HI_U8 u8Tolerance; /*RW; Range:[0x0, 0xFF]; Format:8.0; AE adjust tolerance*/
  1678. HI_U8 u8Compensation; /*RW; Range:[0x0, 0xFF]; Format:8.0; AE compensation*/
  1679. HI_U16 u16EVBias; /*RW; Range:[0x0, 0xFFFF]; Format:16.0; AE EV bias*/
  1680. ISP_AE_STRATEGY_E enAEStrategyMode; /*RW; Range:[0, 1]; Format:1.0; Support Highlight prior or Lowlight prior*/
  1681. HI_U16 u16HistRatioSlope; /*RW; Range:[0x0, 0xFFFF]; Format:16.0; AE hist ratio slope*/
  1682. HI_U8 u8MaxHistOffset; /*RW; Range:[0x0, 0xFF]; Format:8.0; Max hist offset*/
  1683. ISP_AE_MODE_E enAEMode; /*RW; Range:[0, 1]; Format:1.0; AE mode(slow shutter/fix framerate)(onvif)*/
  1684. ISP_ANTIFLICKER_S stAntiflicker;
  1685. ISP_SUBFLICKER_S stSubflicker;
  1686. ISP_AE_DELAY_S stAEDelayAttr;
  1687. HI_BOOL bManualExpValue; /*RW; Range:[0, 1]; Format:1.0; manual exposure value or not*/
  1688. HI_U32 u32ExpValue; /*RW; Range:(0x0, 0xFFFFFFFF]; Format:32.0; manual exposure value */
  1689. ISP_FSWDR_MODE_E enFSWDRMode; /*RW; Range:[0, 2]; Format:2.0; FSWDR running mode */
  1690. HI_BOOL bWDRQuick; /*RW; Range:[0, 1]; Format:1.0; WDR use delay strategy or not; If is true, WDR AE adjust will be faster */
  1691. HI_U16 u16ISOCalCoef; /*RW; Range:[0x0, 0xFFFF]; Format:8.8; The coefficient between Standard ISO and origin ISO (unit: times, 8bit precision)*/
  1692. //HI_U8 au8Weight[AE_ZONE_ROW][AE_ZONE_COLUMN]; /*RW; Range:[0x0, 0xF]; Format:4.0; AE weighting table*/
  1693. } ISP_AE_ATTR_S;
  1694. typedef struct hiISP_ME_ATTR_S
  1695. {
  1696. ISP_OP_TYPE_E enExpTimeOpType;
  1697. ISP_OP_TYPE_E enAGainOpType;
  1698. ISP_OP_TYPE_E enDGainOpType;
  1699. ISP_OP_TYPE_E enISPDGainOpType;
  1700. HI_U32 u32ExpTime; /*RW; Range:[0x0, 0xFFFFFFFF]; Format:32.0; sensor exposure time (unit: us ), it's related to the specific sensor */
  1701. HI_U32 u32AGain; /*RW; Range:[0x400, 0xFFFFFFFF]; Format:22.10; sensor analog gain (unit: times, 10bit precision), it's related to the specific sensor */
  1702. HI_U32 u32DGain; /*RW; Range:[0x400, 0xFFFFFFFF]; Format:22.10; sensor digital gain (unit: times, 10bit precision), it's related to the specific sensor */
  1703. HI_U32 u32ISPDGain; /*RW; Range:[0x400, 0x40000]; Format:22.10; ISP digital gain (unit: times, 10bit precision), it's related to the ISP digital gain range */
  1704. } ISP_ME_ATTR_S;
  1705. typedef struct hiISP_EXPOSURE_ATTR_S
  1706. {
  1707. HI_BOOL bByPass; /*RW; Range:[0, 1]; Format:1.0; */
  1708. ISP_OP_TYPE_E enOpType;
  1709. HI_U8 u8AERunInterval; /*RW; Range:[0x1, 0xFF]; Format:8.0; set the AE run interval*/
  1710. HI_BOOL bHistStatAdjust; /*RW; Range:[0, 1]; Format:1.0; HI_TRUE: 256 bin histogram statistic config will adjust when large red or blue area detected.
  1711. HI_FALSE: 256 bin histogram statistic config will not change */
  1712. HI_BOOL bAERouteExValid; /*RW; Range:[0, 1]; Format:1.0; use extend AE route or not */
  1713. ISP_ME_ATTR_S stManual;
  1714. ISP_AE_ATTR_S stAuto;
  1715. } ISP_EXPOSURE_ATTR_S;
  1716. #define ISP_AE_ROUTE_MAX_NODES (16)
  1717. typedef struct hiISP_AE_ROUTE_NODE_S
  1718. {
  1719. HI_U32 u32IntTime; /*RW; Range:(0x0, 0xFFFFFFFF]; Format:32.0; sensor exposure time (unit: us ), it's related to the specific sensor */
  1720. HI_U32 u32SysGain; /*RW; Range:[0x400, 0xFFFFFFFF]; Format:22.10; system gain (unit: times, 10bit precision), it's related to the specific sensor and ISP Dgain range */
  1721. ISP_IRIS_F_NO_E enIrisFNO; /*RW; Range:[0, 10]; Format:4.0; the F number of the iris's aperture, only support for Piris */
  1722. HI_U32 u32IrisFNOLin; /*RW; Range:[0x1, 0x400]; Format:32.0; the equivalent gain of F number of the iris's aperture, only support for Piris */
  1723. } ISP_AE_ROUTE_NODE_S;
  1724. typedef struct hiISP_AE_ROUTE_S
  1725. {
  1726. HI_U32 u32TotalNum; /*RW; Range:[0, 0x10]; Format:8.0; total node number of AE route */
  1727. ISP_AE_ROUTE_NODE_S astRouteNode[ISP_AE_ROUTE_MAX_NODES];
  1728. } ISP_AE_ROUTE_S;
  1729. #define ISP_AE_ROUTE_EX_MAX_NODES (16)
  1730. typedef struct hiISP_AE_ROUTE_EX_NODE_S
  1731. {
  1732. HI_U32 u32IntTime; /*RW; Range:(0x0, 0xFFFFFFFF]; Format:32.0; sensor exposure time (unit: us ), it's related to the specific sensor */
  1733. HI_U32 u32Again; /*RW; Range:[0x400, 0x3FFFFF]; Format:22.10; sensor analog gain (unit: times, 10bit precision), it's related to the specific sensor*/
  1734. HI_U32 u32Dgain; /*RW; Range:[0x400, 0x3FFFFF]; Format:22.10; sensor digital gain (unit: times, 10bit precision), it's related to the specific sensor*/
  1735. HI_U32 u32IspDgain; /*RW; Range:[0x400, 0x40000]; Format:22.10; ISP digital gain (unit: times, 10bit precision)*/
  1736. ISP_IRIS_F_NO_E enIrisFNO; /*RW; Range:[0, 10]; Format:4.0; the F number of the iris's aperture, only support for Piris */
  1737. HI_U32 u32IrisFNOLin; /*RW; Range:[0x1, 0x400]; Format:32.0; the equivalent gain of F number of the iris's aperture, only support for Piris */
  1738. } ISP_AE_ROUTE_EX_NODE_S;
  1739. typedef struct hiISP_AE_ROUTE_EX_S
  1740. {
  1741. HI_U32 u32TotalNum; /*RW; Range:[0, 0x10]; Format:8.0; total node number of extend AE route */
  1742. ISP_AE_ROUTE_EX_NODE_S astRouteExNode[ISP_AE_ROUTE_EX_MAX_NODES];
  1743. } ISP_AE_ROUTE_EX_S;
  1744. typedef struct hiISP_EXP_INFO_S
  1745. {
  1746. HI_U32 u32ExpTime; /*R; Range:[0x0, 0xFFFFFFFF]; Format:32.0;*/
  1747. HI_U32 u32ShortExpTime; /*R; Range:[0x0, 0xFFFFFFFF]; Format:32.0;*/
  1748. HI_U32 u32MedianExpTime; /*R; Range:[0x0, 0xFFFFFFFF]; Format:32.0;*/
  1749. HI_U32 u32LongExpTime; /*R; Range:[0x0, 0xFFFFFFFF]; Format:32.0;*/
  1750. HI_U32 u32AGain; /*R; Range:[0x400, 0xFFFFFFFF]; Format:22.10;*/
  1751. HI_U32 u32DGain; /*R; Range:[0x400, 0xFFFFFFFF]; Format:22.10;*/
  1752. HI_U32 u32ISPDGain; /*R; Range:[0x400, 0xFFFFFFFF]; Format:22.10;*/
  1753. HI_U32 u32Exposure; /*R; Range:[0x40, 0xFFFFFFFF]; Format:26.6;*/
  1754. HI_BOOL bExposureIsMAX; /*R; Range:[0, 1]; Format:1.0;*/
  1755. HI_S16 s16HistError; /*R; Range:[-32768, 32767]; Format:16.0;*/
  1756. HI_U32 au32AE_Hist1024Value[HIST_NUM]; /*R; Range:[0x0, 0xFFFFFFFF]; Format:32.0; 1024 bins histogram for channel 1 */
  1757. HI_U8 u8AveLum; /*R; Range:[0x0, 0xFF]; Format:8.0;*/
  1758. HI_U32 u32LinesPer500ms; /*R; Range:[0x0, 0xFFFFFFFF]; Format:32.0; exposure lines per 500ms */
  1759. HI_U32 u32PirisFNO; /*R; Range:[0x0, 0x400]; Format:32.0;*/
  1760. HI_U32 u32Fps; /*R; Range:[0x0, 0xFFFFFFFF]; Format:32.0; actual fps */
  1761. HI_U32 u32ISO; /*R; Range:[0x64, 0xFFFFFFFF]; Format:32.0;*/
  1762. HI_U32 u32ISOCalibrate; /*R; Range:[0x0, 0xFFFFFFFF]; Format:32.0;*/
  1763. HI_U32 u32RefExpRatio; /*R; Range:[0x40, 0x4000]; Format:26.6;*/
  1764. HI_U32 u32FirstStableTime; /*R; Range:[0x0, 0xFFFFFFFF]; Format:32.0; AE first stable time for quick start */
  1765. ISP_AE_ROUTE_S stAERoute; /*R; Actual AE route */
  1766. ISP_AE_ROUTE_EX_S stAERouteEx; /*R; Actual AE route_ex */
  1767. } ISP_EXP_INFO_S;
  1768. #define EXP_RATIO_NUM (3)
  1769. typedef struct hiISP_WDR_EXPOSURE_ATTR_S
  1770. {
  1771. ISP_OP_TYPE_E enExpRatioType; /*RW; Range:[0, 1]; Format:1.0; OP_TYPE_AUTO: The ExpRatio used in ISP is generated by firmware; OP_TYPE_MANUAL: The ExpRatio used in ISP is set by u32ExpRatio */
  1772. HI_U32 au32ExpRatio[EXP_RATIO_NUM]; /*RW; Range:[0x40, 0xFFF]; Format:26.6; 0x40 means 1 times.
  1773. When enExpRatioType is OP_TYPE_AUTO, u32ExpRatio is invalid.
  1774. When enExpRatioType is OP_TYPE_MANUAL, u32ExpRatio is quotient of long exposure time / short exposure time. */
  1775. HI_U32 u32ExpRatioMax; /*RW; Range:[0x40, 0x4000]; Format:26.6; 0x40 means 1 times.
  1776. When enExpRatioType is OP_TYPE_AUTO, u32ExpRatioMax is max(upper limit) of ExpRatio generated by firmware.
  1777. When enExpRatioType is OP_TYPE_MANUAL, u32ExpRatioMax is invalid. */
  1778. HI_U32 u32ExpRatioMin; /*RW; Range:[0x40, 0x4000]; Format:26.6; limited Range:[0x40, u32ExpRatioMax],0x40 means 1 times.
  1779. When enExpRatioType is OP_TYPE_AUTO, u32ExpRatioMin is min(lower limit) of ExpRatio generated by firmware.
  1780. When enExpRatioType is OP_TYPE_MANUAL, u32ExpRatioMin is invalid. */
  1781. HI_U16 u16Tolerance; /*RW; Range:[0x0, 0xFF]; Format:8.0;et the dynamic range tolerance. Format: unsigned 6.2-bit fixed-point. 0x4 means 1dB. */
  1782. HI_U16 u16Speed; /*RW; Range:[0x0, 0xFF]; Format:8.0; exposure ratio adjust speed */
  1783. HI_U16 u16RatioBias; /*RW; Range:[0x0, 0xFFFF]; Format:16.0; exposure ratio bias */
  1784. } ISP_WDR_EXPOSURE_ATTR_S;
  1785. typedef struct hiISP_HDR_EXPOSURE_ATTR_S
  1786. {
  1787. ISP_OP_TYPE_E enExpHDRLvType; /*RW; Range:[0, 1]; Format:1.0; OP_TYPE_AUTO: The ExpHDRLv used in ISP is generated by firmware; OP_TYPE_MANUAL: The ExpHDRLv used in ISP is set by u32ExpHDRLv */
  1788. HI_U32 u32ExpHDRLv; /*RW; Range:[0x40, 0x400]; Format:26.6; 0x40 means 1 times.
  1789. When enExpHDRLvType is OP_TYPE_AUTO, u32ExpHDRLv is invalid.
  1790. When enExpHDRLvType is OP_TYPE_MANUAL, u32ExpHDRLv is the quotient of exposure / linear exposure. */
  1791. HI_U32 u32ExpHDRLvMax; /*RW; Range:[0x40, 0x400]; Format:26.6; 0x40 means 1 times.
  1792. When enExpHDRLvType is OP_TYPE_AUTO, u32ExpHDRLvMax is max(upper limit) of ExpHDRLv generated by firmware.
  1793. When enExpHDRLvType is OP_TYPE_MANUAL, u32ExpHDRLvMax is invalid. */
  1794. HI_U32 u32ExpHDRLvMin; /*RW; Range:[0x40, 0x400]; Format:26.6; limited range:[0x40, u32ExpHDRLvMax],0x40 means 1 times.
  1795. When enExpHDRLvType is OP_TYPE_AUTO, u32ExpHDRLvMin is min(lower limit) of ExpHDRLv generated by firmware.
  1796. When enExpHDRLvType is OP_TYPE_MANUAL, u32ExpHDRLvMin is invalid. */
  1797. HI_U32 u32ExpHDRLvWeight; /*RW; Range:[0x0, 0x400]; Format:16.0; exposure HDR level weight. */
  1798. } ISP_HDR_EXPOSURE_ATTR_S;
  1799. /********************* AWB structs ************************/
  1800. /*
  1801. Defines the AWB online calibration type
  1802. u16AvgRgain: the avg value of Rgain after online calibration
  1803. u16AvgBgain: the avg value of Bgain after online calibration
  1804. */
  1805. typedef struct hiISP_AWB_Calibration_Gain_S
  1806. {
  1807. HI_U16 u16AvgRgain;
  1808. HI_U16 u16AvgBgain;
  1809. } ISP_AWB_Calibration_Gain_S;
  1810. /*
  1811. Defines the AWB algorithm type
  1812. 0 = Improved gray world algorithm.
  1813. 1 = AWB algorithm that classifies the statistics and re-filters the white blocks
  1814. */
  1815. typedef enum hiISP_AWB_ALG_TYPE_E
  1816. {
  1817. AWB_ALG_LOWCOST = 0,
  1818. AWB_ALG_ADVANCE = 1,
  1819. AWB_ALG_BUTT
  1820. } ISP_AWB_ALG_TYPE_E;
  1821. /*
  1822. Defines the AWB policy in the multi-illuminant scenario
  1823. 0 = Automatic saturation adjustment in the multi-illuminant scenario
  1824. 1 = Automatic ccm adjustment in the multi-illuminant scenario
  1825. */
  1826. typedef enum hiISP_AWB_MULTI_LS_TYPE_E
  1827. {
  1828. AWB_MULTI_LS_SAT = 0,
  1829. AWB_MULTI_LS_CCM = 1,
  1830. AWB_MULTI_LS_BUTT
  1831. } ISP_AWB_MULTI_LS_TYPE_E;
  1832. typedef enum hiISP_AWB_INDOOR_OUTDOOR_STATUS_E
  1833. {
  1834. AWB_INDOOR_MODE = 0,
  1835. AWB_OUTDOOR_MODE = 1,
  1836. AWB_INDOOR_OUTDOOR_BUTT
  1837. } ISP_AWB_INDOOR_OUTDOOR_STATUS_E;
  1838. /*Defines the AWB gain range*/
  1839. typedef struct hiISP_AWB_CT_LIMIT_ATTR_S
  1840. {
  1841. HI_BOOL bEnable;
  1842. ISP_OP_TYPE_E enOpType;
  1843. HI_U16 u16HighRgLimit; /*RW; Range:[0x0, 0xFFF]; Format:4.8; in Manual Mode, user define the Max Rgain of High Color Temperature*/
  1844. HI_U16 u16HighBgLimit; /*RW; Range:[0x0, 0xFFF]; Format:4.8; in Manual Mode, user define the Min Bgain of High Color Temperature*/
  1845. HI_U16 u16LowRgLimit; /*RW; Range:[0x0, 0xFFF]; Format:4.8; limited range:[0x0, u16HighRgLimit),in Manual Mode, user define the Min Rgain of Low Color Temperature*/
  1846. HI_U16 u16LowBgLimit; /*RW; Range:[0, 0xFFF]; Format:4.8; limited Range:(u16HighBgLimit, 0xFFF],in Manual Mode, user define the Max Bgain of Low Color Temperature*/
  1847. } ISP_AWB_CT_LIMIT_ATTR_S;
  1848. typedef struct hiISP_AWB_IN_OUT_ATTR_S
  1849. {
  1850. HI_BOOL bEnable; /*RW; Range:[0, 1]; Format:1.0; Outdoor/Indoor scenario determination enable*/
  1851. ISP_OP_TYPE_E enOpType;
  1852. ISP_AWB_INDOOR_OUTDOOR_STATUS_E enOutdoorStatus; /*RW;User should config indoor or outdoor status in Manual Mode*/
  1853. HI_U32 u32OutThresh; /*RW;Format:32.0;shutter time(in us) to judge indoor or outdoor */
  1854. HI_U16 u16LowStart; /*RW;Format:16.0;5000K is recommend*/
  1855. HI_U16 u16LowStop; /*RW;Format:16.0;limited range:(0,u16LowStart),4500K is recommend, should be smaller than u8LowStart*/
  1856. HI_U16 u16HighStart; /*RW;Format:16.0;limited range:(u16LowStart,0xFFFF],6500K is recommend, shoule be larger than u8LowStart*/
  1857. HI_U16 u16HighStop; /*RW;Format:16.0;limited range:(u16HighStart,0xFFFF],8000K is recommend, should be larger than u8HighStart*/
  1858. HI_BOOL bGreenEnhanceEn; /*RW; Range:[0, 1]; Format:1.0;If this is enabled, Green channel will be enhanced based on the ratio of green plant*/
  1859. HI_U8 u8OutShiftLimit; /*RW; Range:[0, 0xFF]; Format:8.0;Max white point zone distance to Planckian Curve*/
  1860. } ISP_AWB_IN_OUT_ATTR_S;
  1861. typedef struct hiISP_AWB_CBCR_TRACK_ATTR_S
  1862. {
  1863. HI_BOOL bEnable; /*RW; Range:[0, 1]; Format:1.0;If enabled, statistic parameter cr, cb will change according to iso*/
  1864. HI_U16 au16CrMax[ISP_AUTO_ISO_STRENGTH_NUM]; /*RW; Range:[0x0, 0xFFFF]; au16CrMax[i] >= au16CrMin[i]*/
  1865. HI_U16 au16CrMin[ISP_AUTO_ISO_STRENGTH_NUM]; /*RW; Range:[0x0, 0xFFFF]*/
  1866. HI_U16 au16CbMax[ISP_AUTO_ISO_STRENGTH_NUM]; /*RW; Range:[0x0, 0xFFFF]; au16CbMax[i] >= au16CbMin[i]*/
  1867. HI_U16 au16CbMin[ISP_AUTO_ISO_STRENGTH_NUM]; /*RW; Range:[0x0, 0xFFFF]*/
  1868. } ISP_AWB_CBCR_TRACK_ATTR_S;
  1869. #define AWB_LUM_HIST_NUM (6)
  1870. /*Defines the parameters of the luminance histogram statistics for white balance*/
  1871. typedef struct hiISP_AWB_LUM_HISTGRAM_ATTR_S
  1872. {
  1873. HI_BOOL bEnable; /*RW; Range:[0, 1]; Format:1.0; If enabled, zone weight to awb is combined with zone luma*/
  1874. ISP_OP_TYPE_E enOpType; /*In auto mode, the weight distribution follows Gaussian distribution*/
  1875. HI_U8 au8HistThresh[AWB_LUM_HIST_NUM]; /*RW; Range:[0x0, 0xFF]; Format:8.0; In manual mode, user define luma thresh, thresh[0] = 0, thresh[5] = 0xFF, thresh[i] >= thresh[i-1]*/
  1876. HI_U16 au16HistWt[AWB_LUM_HIST_NUM]; /*RW; Range:[0x0, 0xFFFF]; Format:16.0; user can define luma weight in both manual and auto mode. */
  1877. } ISP_AWB_LUM_HISTGRAM_ATTR_S;
  1878. /*Defines the information about a separate illuminant*/
  1879. typedef struct hiISP_AWB_LIGHTSOURCE_INFO_S
  1880. {
  1881. HI_U16 u16WhiteRgain; /*RW;Range:[0x0, 0xFFF]; Format:4.8; G/R of White points at this light source */
  1882. HI_U16 u16WhiteBgain; /*RW;Range:[0x0, 0xFFF]; Format:4.8; G/B of White points at this light source*/
  1883. HI_U16 u16ExpQuant; /*RW;shutter time * again * dgain >> 4, Not support Now*/
  1884. HI_U8 u8LightStatus; /*RW;Range:[0,2]; Format:2.0; idle 1:add light source 2:delete sensitive color */
  1885. HI_U8 u8Radius; /*RW;Range:[0x0, 0xFF]; Format:8.0; Radius of light source, */
  1886. } ISP_AWB_EXTRA_LIGHTSOURCE_INFO_S;
  1887. #define AWB_LS_NUM (4)
  1888. #define AWB_MULTI_CT_NUM (8)
  1889. /*extended AWB attributes*/
  1890. typedef struct hiISP_AWB_ATTR_EX_S
  1891. {
  1892. HI_U8 u8Tolerance; /*RW; Range:[0x0, 0xFF]; Format:8.0; AWB adjust tolerance*/
  1893. HI_U8 u8ZoneRadius; /*RW; Range:[0x0, 0xFF]; Format:8.0; radius of AWB blocks*/
  1894. HI_U16 u16CurveLLimit; /*RW; Range:[0x0, 0x100]; Format:9.0; Left limit of AWB Curve, recomend for indoor 0xE0, outdoor 0xE0*/
  1895. HI_U16 u16CurveRLimit; /*RW; Range:[0x100, 0xFFF]; Format:12.0; Right Limit of AWB Curve,recomend for indoor 0x130, outdoor 0x120*/
  1896. HI_BOOL bExtraLightEn; /*RW; Range:[0, 1]; Format:1.0; Enable special light source function*/
  1897. ISP_AWB_EXTRA_LIGHTSOURCE_INFO_S stLightInfo[AWB_LS_NUM];
  1898. ISP_AWB_IN_OUT_ATTR_S stInOrOut;
  1899. HI_BOOL bMultiLightSourceEn; /*RW; Range:[0, 1]; Format:1.0; If enabled, awb will do special process in multi light source enviroment*/
  1900. ISP_AWB_MULTI_LS_TYPE_E enMultiLSType; /*Saturation or CCM Tunning*/
  1901. HI_U16 u16MultiLSScaler; /*RW; Range:[0x0, 0x100]; Format:12.0; In saturation type, it means the max saturation it can achieve, in ccm type, it means the strenght of multi process. */
  1902. HI_U16 au16MultiCTBin[AWB_MULTI_CT_NUM]; /*RW; Range:[0, 0XFFFF]; Format:16.0;AWB Support divide the color temperature range by 8 bins*/
  1903. HI_U16 au16MultiCTWt[AWB_MULTI_CT_NUM]; /*RW; Range:[0x0, 0x400];Weight for different color temperature, same value of 8 means CT weight does't work, */
  1904. HI_BOOL bFineTunEn; /*RW; Range:[0x0, 0x1]; Format:1.0;If enabled, skin color scene will be optimized*/
  1905. HI_U8 u8FineTunStrength; /*RW; Range:[0x0, 0xFF]; Format:8.0;larger value means better performance of skin color scene, but will increase error probability in low color temperature scene */
  1906. } ISP_AWB_ATTR_EX_S;
  1907. #define AWB_CURVE_PARA_NUM (6)
  1908. typedef struct hiISP_AWB_ATTR_S
  1909. {
  1910. HI_BOOL bEnable; /*RW; Range:[0x0, 0x1]; Format:1.0;If AWB is disabled, static wb gain will be used, otherwise auto wb gain will be used*/
  1911. HI_U16 u16RefColorTemp; /*RW; Range:[0x0, 0xFFFF]; Format:16.0; Calibration Information*/
  1912. HI_U16 au16StaticWB[ISP_BAYER_CHN_NUM]; /*RW; Range:[0x0, 0xFFF]; Format:12.0;Calibration Information*/
  1913. HI_S32 as32CurvePara[AWB_CURVE_PARA_NUM]; /*RW; Format:32.0;Calibration Information,limited Range:as32CurvePara[3] != 0, as32CurvePara[4]==128*/
  1914. ISP_AWB_ALG_TYPE_E enAlgType;
  1915. HI_U8 u8RGStrength; /*RW; Range: [0x0, 0xFF]; Format:8.0; AWB Strength of R Channel*/
  1916. HI_U8 u8BGStrength; /*RW; Range: [0x0, 0xFF]; Format:8.0; AWB Strength of B Channel */
  1917. HI_U16 u16Speed; /*RW; Range: [0x0, 0xFFF]; Format:12.0; Convergence speed of AWB */
  1918. HI_U16 u16ZoneSel; /*RW; Range: [0, 255]; Format:8.0; A value of 0 or 0xFF means global AWB, A value between 0 and 0xFF means zoned AWB */
  1919. HI_U16 u16HighColorTemp; /*RW; Range: [0, 65535]; Format:16.0; AWB max temperature, Recommended: [8500, 10000] */
  1920. HI_U16 u16LowColorTemp; /*RW; Range: [0, 65535]; Format:16.0; Limited Range:[0, u16HighColorTemp), AWB min temperature, Recommended: [2000, 2500] */
  1921. ISP_AWB_CT_LIMIT_ATTR_S stCTLimit;
  1922. HI_BOOL bShiftLimitEn; /*RW; Range: [0, 1]; Format:1.0; If enabled, when the statistic information is out of range, it should be project back*/
  1923. HI_U8 u8ShiftLimit; /*RW; Range: [0x0, 0xFF]; Format:8.0; planckian curve range, Recommended: [0x30, 0x50] */
  1924. HI_BOOL bGainNormEn; /*RW; Range: [0, 1]; Format:1.0; if enabled, the min of RGB gain is fixed. */
  1925. ISP_AWB_CBCR_TRACK_ATTR_S stCbCrTrack;
  1926. ISP_AWB_LUM_HISTGRAM_ATTR_S stLumaHist;
  1927. } ISP_AWB_ATTR_S;
  1928. /* Attr for SPC AWB */
  1929. #define SPECAWB_FACTTBL_ELMNUM (7) /* Table number. */
  1930. #define SPECAWB_FACTTBL_SIZE (64) /* Table size for weight for light source detection. */
  1931. #define SPECAWB_BBL_SIZE (40) /* Table size for BlackBodyTable. */
  1932. typedef struct hiISP_SPECAWB_BBL_TBL_S
  1933. {
  1934. HI_S16 s16Kelvin; /* RW;Range:[-32768, 32767];Kelvin */
  1935. HI_S16 s16Wbr; /* RW;Range:[-32768, 32767];WBR value*/
  1936. HI_S16 s16Wbb; /* RW;Range:[-32768, 32767];WBB value*/
  1937. } ISP_SPECAWB_BBL_TBL_S;
  1938. typedef struct hiISP_SPECAWB_KELVIN_DBB_MAP_S
  1939. {
  1940. HI_S16 s16Kelvin;/* RW;Range:[-32768, 32767];kevin*/
  1941. HI_S16 s16DBB; /* RW;Range:[-32768, 32767];DeltaBlackBody*/
  1942. } ISP_SPECAWB_KELVIN_DBB_MAP_S;
  1943. typedef struct hiISP_SPECKCWB_S
  1944. {
  1945. HI_S32 s32RGain;/* RW;Range:[-2147483648, 214747647]; RgainValue */
  1946. HI_S32 s32BGain;/* RW;Range:[-2147483648, 214747647]; BgainValue */
  1947. } ISP_SPECKCWB_S;
  1948. typedef struct hiISP_SPECKCWBS16_S
  1949. {
  1950. HI_S16 s16RGain;/* RW;Range:[-32768, 32767]; RgainValue(16bit)*/
  1951. HI_S16 s16BGain;/* RW;Range:[-32768, 32767]; BgainValue(16bit)*/
  1952. } ISP_SPECKCWBS16_S;
  1953. typedef struct hiISP_SPECAWB_FACTTBL_ELEMENT_S
  1954. {
  1955. HI_S16 s16Bv; /*RW;Range:[-32768, 32767]; The center value of the Bv value targeted by this table. */
  1956. HI_U8 u8FactTbl[SPECAWB_FACTTBL_SIZE][SPECAWB_FACTTBL_SIZE]; /* RW;Range:[0, 0xFF]; Weight for light source detection. */
  1957. } ISP_SPECAWB_FACTTBL_ELEMENT_S;
  1958. typedef struct hiISP_SPECAWB_ATTR_S
  1959. {
  1960. ISP_SPECKCWB_S stWBCenter; /* RW;WB gain value at the center of the table: The table index is calculated as a relative value from this gain. */
  1961. ISP_SPECKCWB_S stWBMin; /* RW;Minimum value of WB gain that the table covers. */
  1962. ISP_SPECKCWB_S stWBMax; /* RW;Maximum value of WB gain that the table covers. */
  1963. ISP_SPECKCWB_S stLogFact; /* RW;Range covered by the table: 1/exp(stLogFact) to exp(stLogFact). For example, if it is 1.0, WBDelta will be 1/e to e. However, e = 2.71828 ... (base of natural logarithm) */
  1964. HI_S32 s32LimitFactMin; /* RW;Range:[0, s32LimitFactMax];AWB statics threshold value : minimum threshold value of ratio to pixel maximum value. */
  1965. HI_S32 s32LimitFactMax; /* RW;Range:[s32LimitFactMin, 0xFFFF];AWB statics threshold value : maximum threshold value of ratio to pixel maximum value. */
  1966. HI_S32 s32LimitFactLimit; /* RW;Range:[0x600, 0x4000];AWB statics limit value : ratio to (pixel maximum value * s32LimitFactMax) */
  1967. HI_S32 s32FactOffset; /* RW;Range:[0, 0x800];The offset value of the weight when calculating the AWB statics.*/
  1968. HI_S32 s32BFact; /* RW;Range:[0x399, 0x500];The value of specular weight when calculating the AWB statics.*/
  1969. HI_S32 s32ACntMin; /* RW;Range:[0, 0x20];Threshold for block adoption. If the integrated value of the AWB statics is less than m_ACntMin, the block is ignored. */
  1970. ISP_SPECKCWB_S stWBNeutral; /* RW;WB gain returned when AWB calculation can not be performed. */
  1971. HI_U8 bLastIsFlash; /* RW;Range:[1]: The last table is used for flash. 0: Used for unknown Bv value. */
  1972. HI_S16 s16BvFlashELimit; /* RW;Range:[-32768, 32767];Threshold of Bv value before strobe lighting when using table for strobe. If bLastIsFlash == TRUE and the Bv value before strobe flash is less than this value, use the table for strobe. */
  1973. HI_S32 s32APercent; /* RW;Range:[0, 100];A value percent of the WB statics*/
  1974. ISP_SPECKCWBS16_S stWBCnvTbl[SPECAWB_FACTTBL_SIZE][SPECAWB_FACTTBL_SIZE]; /*RW; WB gain conversion table (incomplete chromatic adaptation table). */
  1975. HI_U8 u8ElementNum; /*RW; Range:[7];Number of connected ISP_SPECAWB_FACTTBL_ELEMENT. */
  1976. ISP_SPECAWB_FACTTBL_ELEMENT_S stFactElement[SPECAWB_FACTTBL_ELMNUM]; /*RW; Weight Table */
  1977. ISP_SPECAWB_KELVIN_DBB_MAP_S stKelvinDBBTbl[SPECAWB_FACTTBL_SIZE][SPECAWB_FACTTBL_SIZE]; /* RW;KelvinDbb table. */
  1978. ISP_SPECAWB_BBL_TBL_S stBlackBodyTbl[SPECAWB_BBL_SIZE]; /* RW;BlackBody table. */
  1979. HI_U16 u16Fno; /*RW; Range:[10, 100];F number of the len,F1.4=14,F2.8=28,F36 =360... */
  1980. } ISP_SPECAWB_ATTR_S;
  1981. #define SPECAWB_MAX_CAA_NUM 3
  1982. #define SPECAWB_KEVIN_CONVER_MAX_NUM 8
  1983. typedef struct hiISP_SPECAWB_CAA_CONVERSION_S
  1984. {
  1985. HI_S32 s32SrcKelvin; /* RW;Range:[-2147483648, 214747647]; Source kelvin*/
  1986. HI_S32 s32DstKelvin; /* RW;Range:[-2147483648, 214747647]; Destination kelvin*/
  1987. } ISP_SPECAWB_CAA_CONVERSION_S;
  1988. typedef struct hiISP_SPECAWB_CAA_TBL_S
  1989. {
  1990. HI_U8 u8Enable; /* RW;Range:[0,1]; lut enable*/
  1991. HI_S16 s16Bv; /* RW;Range:[-32768, 32767]; Bv value*/
  1992. ISP_SPECAWB_CAA_CONVERSION_S stKelvinCon[SPECAWB_KEVIN_CONVER_MAX_NUM];
  1993. ISP_SPECKCWBS16_S stWBCnvTbl[SPECAWB_FACTTBL_SIZE][SPECAWB_FACTTBL_SIZE];
  1994. } ISP_SPECAWB_CAA_TBL_S;
  1995. typedef struct hiISP_SPECAWB_CAA_CONTROl_S
  1996. {
  1997. ISP_SPECAWB_CAA_TBL_S stControl[SPECAWB_MAX_CAA_NUM];
  1998. } ISP_SPECAWB_CAA_CONTROl_S;
  1999. typedef struct hiISP_MWB_ATTR_S
  2000. {
  2001. HI_U16 u16Rgain; /*RW; Range: [0x0, 0xFFF]; Format:4.8; Multiplier for R color channel */
  2002. HI_U16 u16Grgain; /*RW; Range: [0x0, 0xFFF]; Format:4.8; Multiplier for Gr color channel */
  2003. HI_U16 u16Gbgain; /*RW; Range: [0x0, 0xFFF]; Format:4.8; Multiplier for Gb color channel */
  2004. HI_U16 u16Bgain; /*RW; Range: [0x0, 0xFFF]; Format:4.8; Multiplier for B color channel */
  2005. } ISP_MWB_ATTR_S;
  2006. typedef enum hiISP_AWB_ALG_E
  2007. {
  2008. ALG_AWB = 0,
  2009. ALG_AWB_SPEC = 1,
  2010. ALG_BUTT
  2011. } ISP_AWB_ALG_E;
  2012. typedef struct hiISP_WB_ATTR_S
  2013. {
  2014. HI_BOOL bByPass; /*RW; Range: [0, 1]; Format:1.0; If enabled, awb will be bypassed*/
  2015. HI_U8 u8AWBRunInterval; /*RW; Range: [0x1, 0xFF]; Format:8.0; set the AWB run interval*/
  2016. ISP_OP_TYPE_E enOpType;
  2017. ISP_MWB_ATTR_S stManual;
  2018. ISP_AWB_ATTR_S stAuto;
  2019. ISP_AWB_ALG_E enAlgType;
  2020. } ISP_WB_ATTR_S;
  2021. typedef struct hiISP_COLORMATRIX_MANUAL_S
  2022. {
  2023. HI_BOOL bSatEn; /*RW; Range: [0, 1]; Format:1.0; If bSatEn=1, the active CCM = SatMatrix * ManualMatrix, else tha active CCM = ManualMatrix*/
  2024. HI_U16 au16CCM[CCM_MATRIX_SIZE]; /*RW; Range: [0x0, 0xFFFF]; Format:8.8; Manul CCM matrix,*/
  2025. } ISP_COLORMATRIX_MANUAL_S;
  2026. typedef struct hiISP_COLORMATRIX_PARAM_S
  2027. {
  2028. HI_U16 u16ColorTemp; /*RW; Range: [500, 30000]; Format:16.0; the current color temperature */
  2029. HI_U16 au16CCM[CCM_MATRIX_SIZE]; /*RW; Range: [0x0, 0xFFFF]; Format:8.8; CCM matrixes for different color temperature*/
  2030. } ISP_COLORMATRIX_PARAM_S;
  2031. typedef struct hiISP_COLORMATRIX_AUTO_S
  2032. {
  2033. HI_BOOL bISOActEn; /*RW; Range: [0, 1]; Format:1.0; if enabled, CCM will bypass in low light*/
  2034. HI_BOOL bTempActEn; /*RW; Range: [0, 1]; Format:1.0; if enabled, CCM will bypass when color temperature is larger than 10K or less than 2500K*/
  2035. HI_U16 u16CCMTabNum; /*RW; Range: [0x3, 0x7]; Format:16.0; The number of CCM matrixes*/
  2036. ISP_COLORMATRIX_PARAM_S astCCMTab[CCM_MATRIX_NUM];
  2037. } ISP_COLORMATRIX_AUTO_S;
  2038. typedef struct hiISP_COLORMATRIX_ATTR_S
  2039. {
  2040. ISP_OP_TYPE_E enOpType;
  2041. ISP_COLORMATRIX_MANUAL_S stManual;
  2042. ISP_COLORMATRIX_AUTO_S stAuto;
  2043. } ISP_COLORMATRIX_ATTR_S;
  2044. typedef struct hiISP_SATURATION_MANUAL_S
  2045. {
  2046. HI_U8 u8Saturation; /*RW; Range: [0, 0xFF]; Format:8.0; set the manual saturation of CCM */
  2047. } ISP_SATURATION_MANUAL_S;
  2048. typedef struct hiISP_SATURATION_AUTO_S
  2049. {
  2050. HI_U8 au8Sat[ISP_AUTO_ISO_STRENGTH_NUM]; /*RW; Range: [0, 0xFF]; should be decreased with increasing ISO*/
  2051. } ISP_SATURATION_AUTO_S;
  2052. typedef struct hiISP_SATURATION_ATTR_S
  2053. {
  2054. ISP_OP_TYPE_E enOpType;
  2055. ISP_SATURATION_MANUAL_S stManual;
  2056. ISP_SATURATION_AUTO_S stAuto;
  2057. } ISP_SATURATION_ATTR_S;
  2058. typedef struct hiISP_COLOR_TONE_ATTR_S
  2059. {
  2060. HI_U16 u16RedCastGain; /*RW; Range: [0x100, 0x180]; Format:4.8; R channel gain after CCM */
  2061. HI_U16 u16GreenCastGain; /*RW; Range: [0x100, 0x180]; Format:4.8; G channel gain after CCM */
  2062. HI_U16 u16BlueCastGain; /*RW; Range: [0x100, 0x180]; Format:4.8; B channel gain after CCM */
  2063. } ISP_COLOR_TONE_ATTR_S;
  2064. typedef struct hiISP_WB_INFO_S
  2065. {
  2066. HI_U16 u16Rgain; /*R; Range: [0x0, 0xFFF]; Format:8.8;AWB result of R color channel*/
  2067. HI_U16 u16Grgain; /*R; Range: [0x0, 0xFFF]; Format:8.8; AWB result of Gr color channel */
  2068. HI_U16 u16Gbgain; /*R; Range: [0x0, 0xFFF]; Format:8.8; AWB result of Gb color channel */
  2069. HI_U16 u16Bgain; /*R; Range: [0x0, 0xFFF]; Format:8.8; AWB result of B color channel */
  2070. HI_U16 u16Saturation; /*R; Range: [0x0, 0xFF];Format:8.0;Current saturation*/
  2071. HI_U16 u16ColorTemp; /*R; Range: [0x0, 0xFFFF];Format:16.0;Detect color temperature, maybe out of color cemeprature range*/
  2072. HI_U16 au16CCM[CCM_MATRIX_SIZE]; /*R; Range: [0x0, 0xFFFF];Format:16.0;Current color correction matrix*/
  2073. HI_U16 u16LS0CT; /*R; Range: [0x0, 0xFFFF];Format:16.0;color tempearture of primary light source*/
  2074. HI_U16 u16LS1CT; /*R; Range: [0x0, 0xFFFF];Format:16.0;color tempearture of secondary light source*/
  2075. HI_U16 u16LS0Area; /*R; Range: [0x0, 0xFF];Format:8.0;area of primary light source*/
  2076. HI_U16 u16LS1Area; /*R; Range: [0x0, 0xFF];Format:8.0;area of secondary light source*/
  2077. HI_U8 u8MultiDegree; /*R; Range: [0x0, 0xFF];0 means uniform light source, larger value means multi light source*/
  2078. HI_U16 u16ActiveShift; /*R; Range;[0x0,0xFF]*/
  2079. ISP_AWB_INDOOR_OUTDOOR_STATUS_E enInOutStatus; /*R; indoor or outdoor status*/
  2080. HI_S16 s16Bv; /*R; Range;[-32768, 32767]; Bv value*/
  2081. } ISP_WB_INFO_S;
  2082. /********************* AF structs ************************/
  2083. typedef struct hiISP_AF_ATTR_S
  2084. {
  2085. HI_S32 s32DistanceMax; /* RW;the focuse range */
  2086. HI_S32 s32DistanceMin;
  2087. HI_U8 u8Weight[AF_ZONE_ROW][AF_ZONE_COLUMN];/* RW;weighting table */
  2088. } ISP_AF_ATTR_S;
  2089. typedef struct hiISP_MF_ATTR_S
  2090. {
  2091. HI_S32 s32DefaultSpeed; /* RW;1,default speed(unit:m/s).(onvif)*/
  2092. } ISP_MF_ATTR_S;
  2093. typedef struct hiISP_FOCUS_ATTR_S
  2094. {
  2095. ISP_OP_TYPE_E enOpType;
  2096. ISP_MF_ATTR_S stManual;
  2097. ISP_AF_ATTR_S stAuto;
  2098. } ISP_FOCUS_ATTR_S;
  2099. /*
  2100. DNG cfalayout type
  2101. 1 = Rectangular (or square) layout
  2102. 2 = Staggered layout A: even columns are offset down by 1/2 row
  2103. 3 = Staggered layout B: even columns are offset up by 1/2 row
  2104. 4 = Staggered layout C: even rows are offset right by 1/2 column
  2105. 5 = Staggered layout D: even rows are offset left by 1/2 column
  2106. 6 = Staggered layout E: even rows are offset up by 1/2 row, even columns are offset left by 1/2 column
  2107. 7 = Staggered layout F: even rows are offset up by 1/2 row, even columns are offset right by 1/2 column
  2108. 8 = Staggered layout G: even rows are offset down by 1/2 row, even columns are offset left by 1/2 column
  2109. 9 = Staggered layout H: even rows are offset down by 1/2 row, even columns are offset right by 1/2 column
  2110. */
  2111. typedef enum hiDNG_CFALAYOUT_TYPE_E
  2112. {
  2113. CFALAYOUT_TYPE_RECTANGULAR = 1,
  2114. CFALAYOUT_TYPE_A, /*a,b,c... not support*/
  2115. CFALAYOUT_TYPE_B,
  2116. CFALAYOUT_TYPE_C,
  2117. CFALAYOUT_TYPE_D,
  2118. CFALAYOUT_TYPE_E,
  2119. CFALAYOUT_TYPE_F,
  2120. CFALAYOUT_TYPE_G,
  2121. CFALAYOUT_TYPE_H,
  2122. CFALAYOUT_TYPE_BUTT
  2123. } DNG_CFALAYOUT_TYPE_E;
  2124. typedef struct hiDNG_SRATIONAL_S
  2125. {
  2126. HI_S32 s32Numerator; /*represents the numerator of a fraction,*/
  2127. HI_S32 s32Denominator; /* the denominator. */
  2128. } DNG_SRATIONAL_S;
  2129. typedef struct hiDNG_BLCREPEATDIM_S
  2130. {
  2131. HI_U16 u16BlcRepeatRows;
  2132. HI_U16 u16BlcRepeatCols;
  2133. } DNG_BLCREPEATDIM_S;
  2134. typedef struct hiDNG_DEFAULTSCALE_S
  2135. {
  2136. DNG_RATIONAL_S stDefaultScaleH;
  2137. DNG_RATIONAL_S stDefaultScaleV;
  2138. } DNG_DEFAULTSCALE_S;
  2139. typedef struct hiDNG_REPEATPATTERNDIM_S
  2140. {
  2141. HI_U16 u16RepeatPatternDimRows;
  2142. HI_U16 u16RepeatPatternDimCols;
  2143. } DNG_REPEATPATTERNDIM_S;
  2144. /*
  2145. Defines the structure of dng raw format.
  2146. */
  2147. typedef struct hiDNG_RAW_FORMAT_S
  2148. {
  2149. HI_U8 u8BitsPerSample; /* RO;Format:8.0; Indicate the bit numbers of raw data*/
  2150. HI_U8 au8CfaPlaneColor[CFACOLORPLANE]; /* RO;Format:8.0; Indicate the planer numbers of raw data; 0:red 1:green 2: blue*/
  2151. DNG_CFALAYOUT_TYPE_E enCfaLayout; /* RO;Range:[1,9]; Describes the spatial layout of the CFA*/
  2152. DNG_BLCREPEATDIM_S stBlcRepeatDim; /* Specifies repeat pattern size for the BlackLevel*/
  2153. HI_U32 u32WhiteLevel; /* RO;Format:32.0; Indicate the WhiteLevel of the raw data*/
  2154. DNG_DEFAULTSCALE_S stDefaultScale; /* Specifies the default scale factors for each direction to convert the image to square pixels*/
  2155. DNG_REPEATPATTERNDIM_S stCfaRepeatPatternDim;/* Specifies the pixel number of repeat color planer in each direction*/
  2156. HI_U8 au8CfaPattern[ISP_BAYER_CHN]; /* RO;Format:8.0; Indicate the bayer start order; 0:red 1:green 2: blue*/
  2157. } DNG_RAW_FORMAT_S;
  2158. /*
  2159. Defines the structure of dng image static infomation. read only
  2160. */
  2161. typedef struct hiDNG_IMAGE_STATIC_INFO_S
  2162. {
  2163. DNG_RAW_FORMAT_S stDngRawFormat;
  2164. DNG_SRATIONAL_S astColorMatrix1[CCM_MATRIX_SIZE]; /* defines a transformation matrix that converts XYZ values to reference camera native color space values, under the first calibration illuminant.*/
  2165. DNG_SRATIONAL_S astColorMatrix2[CCM_MATRIX_SIZE]; /* defines a transformation matrix that converts XYZ values to reference camera native color space values, under the second calibration illuminant.*/
  2166. DNG_SRATIONAL_S astCameraCalibration1[CCM_MATRIX_SIZE];/* defines a calibration matrix that transforms reference camera native space values to individual camera native space values under the first calibration illuminant*/
  2167. DNG_SRATIONAL_S astCameraCalibration2[CCM_MATRIX_SIZE];/* defines a calibration matrix that transforms reference camera native space values to individual camera native space values under the second calibration illuminant*/
  2168. DNG_SRATIONAL_S astForwadMatrix1[CCM_MATRIX_SIZE]; /* defines a matrix that maps white balanced camera colors to XYZ D50 colors*/
  2169. DNG_SRATIONAL_S astForwadMatrix2[CCM_MATRIX_SIZE]; /* defines a matrix that maps white balanced camera colors to XYZ D50 colors*/
  2170. HI_U8 u8CalibrationIlluminant1; /* RO;Format:8.0;Light source, actually this means white balance setting. '0' means unknown, '1' daylight, '2'
  2171. fluorescent, '3' tungsten, '10' flash, '17' standard light A, '18' standard light B, '19' standard light
  2172. C, '20' D55, '21' D65, '22' D75, '255' other*/
  2173. HI_U8 u8CalibrationIlluminant2; /* RO;Format:8.0;Light source, actually this means white balance setting. '0' means unknown, '1' daylight, '2'
  2174. fluorescent, '3' tungsten, '10' flash, '17' standard light A, '18' standard light B, '19' standard light
  2175. C, '20' D55, '21' D65, '22' D75, '255' other*/
  2176. } DNG_IMAGE_STATIC_INFO_S;
  2177. /*
  2178. Defines the structure of DNG WB gain used for calculate DNG colormatrix.
  2179. */
  2180. typedef struct hiISP_DNG_WBGAIN_S
  2181. {
  2182. HI_U16 u16Rgain; /* RW;Range: [0x0, 0xFFF]; Multiplier for R color channel*/
  2183. HI_U16 u16Ggain; /* RW;Range: [0x0, 0xFFF]; Multiplier for G color channel*/
  2184. HI_U16 u16Bgain; /* RW;Range: [0x0, 0xFFF]; Multiplier for B color channel*/
  2185. } ISP_DNG_WBGAIN_S;
  2186. /*
  2187. Defines the structure of DNG color parameters.
  2188. */
  2189. typedef struct hiISP_DNG_COLORPARAM_S
  2190. {
  2191. ISP_DNG_WBGAIN_S stWbGain1;/* the calibration White balance gain of colorcheker in low colortemper light source*/
  2192. ISP_DNG_WBGAIN_S stWbGain2;/* the calibration White balance gain of colorcheker in high colortemper light source*/
  2193. } ISP_DNG_COLORPARAM_S;
  2194. #ifdef __cplusplus
  2195. #if __cplusplus
  2196. }
  2197. #endif
  2198. #endif /* End of #ifdef __cplusplus */
  2199. #endif /* __HI_COMM_ISP_H__ */