1 //<MStar Software> 2 //****************************************************************************** 3 // MStar Software 4 // Copyright (c) 2010 - 2012 MStar Semiconductor, Inc. All rights reserved. 5 // All software, firmware and related documentation herein ("MStar Software") are 6 // intellectual property of MStar Semiconductor, Inc. ("MStar") and protected by 7 // law, including, but not limited to, copyright law and international treaties. 8 // Any use, modification, reproduction, retransmission, or republication of all 9 // or part of MStar Software is expressly prohibited, unless prior written 10 // permission has been granted by MStar. 11 // 12 // By accessing, browsing and/or using MStar Software, you acknowledge that you 13 // have read, understood, and agree, to be bound by below terms ("Terms") and to 14 // comply with all applicable laws and regulations 15 // 16 // 1. MStar shall retain any and all right, ownership and interest to MStar 17 // Software and any modification/derivatives thereof. 18 // No right, ownership, or interest to MStar Software and any 19 // modification/derivatives thereof is transferred to you under Terms. 20 // 21 // 2. You understand that MStar Software might include, incorporate or be 22 // supplied together with third party`s software and the use of MStar 23 // Software may require additional licenses from third parties. 24 // Therefore, you hereby agree it is your sole responsibility to separately 25 // obtain any and all third party right and license necessary for your use of 26 // such third party`s software. 27 // 28 // 3. MStar Software and any modification/derivatives thereof shall be deemed as 29 // MStar`s confidential information and you agree to keep MStar`s 30 // confidential information in strictest confidence and not disclose to any 31 // third party. 32 // 33 // 4. MStar Software is provided on an "AS IS" basis without warranties of any 34 // kind. Any warranties are hereby expressly disclaimed by MStar, including 35 // without limitation, any warranties of merchantability, non-infringement of 36 // intellectual property rights, fitness for a particular purpose, error free 37 // and in conformity with any international standard. You agree to waive any 38 // claim against MStar for any loss, damage, cost or expense that you may 39 // incur related to your use of MStar Software. 40 // In no event shall MStar be liable for any direct, indirect, incidental or 41 // consequential damages, including without limitation, lost of profit or 42 // revenues, lost or damage of data, and unauthorized system use. 43 // You agree that this Section 4 shall still apply without being affected 44 // even if MStar Software has been modified by MStar in accordance with your 45 // request or instruction for your use, except otherwise agreed by both 46 // parties in writing. 47 // 48 // 5. If requested, MStar may from time to time provide technical supports or 49 // services in relation with MStar Software to you for your use of 50 // MStar Software in conjunction with your or your customer`s product 51 // ("Services"). 52 // You understand and agree that, except otherwise agreed by both parties in 53 // writing, Services are provided on an "AS IS" basis and the warranty 54 // disclaimer set forth in Section 4 above shall apply. 55 // 56 // 6. Nothing contained herein shall be construed as by implication, estoppels 57 // or otherwise 58 // (a) conferring any license or right to use MStar name, trademark, service 59 // mark, symbol or any other identification; 60 // (b) obligating MStar or any of its affiliates to furnish any person, 61 // including without limitation, you and your customers, any assistance 62 // of any kind whatsoever, or any information; or 63 // (c) conferring any license or right under any intellectual property right. 64 // 65 // 7. These terms shall be governed by and construed in accordance with the laws 66 // of Taiwan, R.O.C., excluding its conflict of law rules. 67 // Any and all dispute arising out hereof or related hereto shall be finally 68 // settled by arbitration referred to the Chinese Arbitration Association, 69 // Taipei in accordance with the ROC Arbitration Law and the Arbitration 70 // Rules of the Association by three (3) arbitrators appointed in accordance 71 // with the said Rules. 72 // The place of arbitration shall be in Taipei, Taiwan and the language shall 73 // be English. 74 // The arbitration award shall be final and binding to both parties. 75 // 76 //****************************************************************************** 77 78 #ifndef _DLC_V2_H_ 79 #define _DLC_V2_H_ 80 81 #ifdef __cplusplus 82 extern "C" 83 { 84 #endif 85 86 #include "MsTypes.h" 87 //******** ENUM DEFINITIONS ********// 88 enum 89 { 90 E_DLC_POOL_ID_INTERNAL = 0, // just for test, please refine. 91 } E_DLC_POOL_ID; 92 93 94 typedef enum 95 { 96 E_DLC_CMD_INIT_EX, 97 E_DLC_CMD_SET_SETTING_EX, 98 E_DLC_CMD_SET_CURVE, 99 E_DLC_CMD_SET_BLE_SLOP_POINT, 100 E_DLC_CMD_SET_HDR_INFO, 101 E_DLC_CMD_EXIT, 102 E_DLC_CMD_SET_ON_OFF, 103 E_DLC_CMD_SET_HANDLER_ON_OFF, 104 E_DLC_CMD_SET_BLE_ON_OFF, 105 E_DLC_CMD_ENABLE_MAIN_SUB_CURVE_SYNCHRONIZATION, 106 E_DLC_CMD_HANDLER, 107 E_DLC_CMD_GET_HISTOGRAM_HANDLER, 108 E_DLC_CMD_GET_AVERAGE_VALUE, 109 E_DLC_CMD_GET_AVERAGE_VALUE_EX, 110 E_DLC_CMD_INIT_CURVE, 111 E_DLC_CMD_SPEEDUP_TRIGGER, 112 E_DLC_CMD_GET_LUMA_CURVE_STATUS, 113 E_DLC_CMD_CGC_RESET_C_GAIN, 114 E_DLC_CMD_CGC_CHECK_C_GAIN_IN_PQ_COM, 115 E_DLC_CMD_CGC_RESET_Y_GAIN, 116 E_DLC_CMD_CGC_CHECK_Y_GAIN_IN_PQ_COM, 117 E_DLC_CMD_CGC_RESET, 118 E_DLC_CMD_CGC_INIT, 119 E_DLC_CMD_CGC_REINIT, 120 E_DLC_CMD_CGC_HANDLER, 121 E_DLC_CMD_GET_LIB_VER, 122 E_DLC_CMD_GET_INFO, 123 E_DLC_CMD_GET_STATUS_EX, 124 E_DLC_CMD_SET_DBG_LEVEL, 125 E_DLC_CMD_WRITE_CURVE, 126 E_DLC_CMD_WRITE_CURVE_SUB, 127 E_DLC_CMD_GET_HISTOGRAM, 128 E_DLC_CMD_DECODE_EXT_CMD, 129 E_DLC_CMD_SET_CAPTURE_RANGE, 130 E_DLC_CMD_SET_SETTING, 131 E_DLC_CMD_INIT, 132 E_DLC_CMD_GET_STATUS, 133 E_DLC_CMD_SET_POWERSTATE, 134 E_DBC_CMD_DLC_INIT, 135 E_DBC_CMD_INIT, 136 E_DBC_CMD_SET_STATUS, 137 E_DBC_CMD_GET_STATUS, 138 E_DBC_CMD_SET_READY, 139 E_DBC_CMD_SET_DEBUG_MODE, 140 E_DBC_CMD_GET_DEBUG_MODE, 141 E_DBC_CMD_UPDATE_PWM, 142 E_DBC_CMD_HANDLER, 143 E_DBC_CMD_ADJUST_YC_GAIN, 144 E_DBC_CMD_YC_GAIN_INIT, 145 E_DBC_CMD_RESET, 146 E_DBC_CMD_DECODE_EXT_CMD, 147 E_DBC_CMD_NUM, 148 E_DLC_CMD_MAX = E_DBC_CMD_NUM, 149 } E_DLC_IOCTL_CMDS; 150 151 152 typedef struct _stDLC_SetHDRInitData 153 { 154 XC_DLC_HDRinit *pstDLC_HDRInitData; 155 MS_BOOL bReturn; 156 } stDLC_SetHDRInitData, *pstDLC_HDRInitData; 157 158 typedef struct _stDLC_Init_Ex 159 { 160 XC_DLC_init *pstXC_DLC_InitData; 161 MS_U32 u32InitDataLen; 162 MS_BOOL bReturn; 163 } stDLC_Init_Ex, *pstDLC_Init_Ex; 164 165 166 typedef struct _stDLC_SetSetting_Ex 167 { 168 XC_DLC_MFinit_Ex *DLC_MFinit_Ex; 169 } stDLC_SetSetting_Ex, *pstDLC_SetSetting_Ex; 170 171 172 typedef struct _stDLC_SetCurve 173 { 174 MS_U8 *pNormal; 175 MS_U8 *pLight; 176 MS_U8 *pDark; 177 } stDLC_SetCurve, *pstDLC_SetCurve; 178 179 180 typedef struct _stDLC_SetBleSlopPoint 181 { 182 MS_U16 *pBLESlopPoint; 183 } stDLC_SetBleSlopPoint, *pstDLC_SetBleSlopPoint; 184 185 186 typedef struct _stDLC_Exit 187 { 188 MS_BOOL bReturn; 189 } stDLC_Exit, *pstDLC_Exit; 190 191 192 typedef struct _stDLC_SetOnOff 193 { 194 MS_BOOL bSwitch; 195 MS_BOOL bWindow; 196 } stDLC_SetOnOff, *pstDLC_SetOnOff; 197 198 199 typedef struct _stDLC_SetDlcHandlerOnOff 200 { 201 MS_BOOL bDlcEnable; 202 MS_BOOL bReturn; 203 } stDLC_SetDlcHandlerOnOff, *pstDLC_SetDlcHandlerOnOff; 204 205 206 typedef struct _stDLC_SetBleOnOff 207 { 208 MS_BOOL bSwitch; 209 MS_BOOL bReturn; 210 } stDLC_SetBleOnOff, *pstDLC_SetBleOnOff; 211 212 213 typedef struct _stDLC_EnableMainSubCurveSynchronization 214 { 215 MS_BOOL bEnable; 216 } stDLC_EnableMainSubCurveSynchronization, *pstDLC_EnableMainSubCurveSynchronization; 217 218 219 typedef struct _stDLC_Handler 220 { 221 MS_BOOL bWindow; 222 } stDLC_Handler, *pstDLC_Handler; 223 224 225 typedef struct _stDLC_GetHistogramHandler 226 { 227 MS_BOOL bWindow; 228 MS_BOOL bReturn; 229 } stDLC_GetHistogramHandler, *pstDLC_GetHistogramHandler; 230 231 232 typedef struct _stDLC_GetAverageValue 233 { 234 MS_U8 u8Return; 235 } stDLC_GetAverageValue, *pstDLC_GetAverageValue; 236 237 238 typedef struct _stDLC_GetAverageValue_Ex 239 { 240 MS_U16 u16Return; 241 } stDLC_GetAverageValue_Ex, *pstDLC_GetAverageValue_Ex; 242 243 244 typedef struct _stDLC_InitCurve 245 { 246 MS_U16 u16HStart; 247 MS_U16 u16HEnd; 248 MS_U16 u16VStart; 249 MS_U16 u16VEnd; 250 } stDLC_InitCurve, *pstDLC_InitCurve; 251 252 253 typedef struct _stDLC_SpeedupTrigger 254 { 255 MS_U8 u8Loop; 256 } stDLC_SpeedupTrigger, *pstDLC_SpeedupTrigger; 257 258 259 typedef struct _stDLC_GetLumaCurveStatus 260 { 261 MS_BOOL bReturn; 262 } stDLC_GetLumaCurveStatus, *pstDLC_GetLumaCurveStatus; 263 264 265 typedef struct _stDLC_CGC_ResetCGain 266 { 267 268 } stDLC_CGC_ResetCGain, *pstDLC_CGC_ResetCGain; 269 270 271 typedef struct _stDLC_CGC_CheckCGainInPQCom 272 { 273 274 } stDLC_CGC_CheckCGainInPQCom, *pstDLC_CGC_CheckCGainInPQCom; 275 276 277 typedef struct _stDLC_CGC_ResetYGain 278 { 279 280 } stDLC_CGC_ResetYGain, *pstDLC_CGC_ResetYGain; 281 282 283 typedef struct _stDLC_CGC_CheckYGainInPQCom 284 { 285 286 } stDLC_CGC_CheckYGainInPQCom, *pstDLC_CGC_CheckYGainInPQCom; 287 288 289 typedef struct _stDLC_CGC_Reset 290 { 291 292 } stDLC_CGC_Reset, *pstDLC_CGC_Reset; 293 294 295 typedef struct _stDLC_CGC_Init 296 { 297 298 } stDLC_CGC_Init, *pstDLC_CGC_Init; 299 300 301 typedef struct _stDLC_CGC_ReInit 302 { 303 304 } stDLC_CGC_ReInit, *pstDLC_CGC_ReInit; 305 306 307 typedef struct _stDLC_CGC_Handler 308 { 309 310 } stDLC_CGC_Handler, *pstDLC_CGC_Handler; 311 312 313 typedef struct _stDLC_GetLibVer 314 { 315 const MSIF_Version **ppVersion; 316 E_XC_DLC_RESULT eResult; 317 } stDLC_GetLibVer, *pstDLC_GetLibVer; 318 319 320 typedef struct _stDLC_GetInfo 321 { 322 const XC_DLC_ApiInfo * eResult; 323 } stDLC_GetInfo, *pstDLC_GetInfo; 324 325 326 typedef struct _stDLC_GetStatus_Ex 327 { 328 XC_DLC_ApiStatus *pDrvStatus; 329 MS_BOOL bWindow; 330 MS_BOOL bReturn; 331 } stDLC_GetStatus_Ex, *pstDLC_GetStatus_Ex; 332 333 334 typedef struct _stDLC_SetDbgLevel 335 { 336 MS_U16 u16DbgSwitch; 337 MS_BOOL bReturn; 338 } stDLC_SetDbgLevel, *pstDLC_SetDbgLevel; 339 340 341 typedef struct _stDLC_WriteCurve 342 { 343 MS_U8 *pu8Table; 344 MS_BOOL bReturn; 345 } stDLC_WriteCurve, *pstDLC_WriteCurve; 346 347 348 typedef struct _stDLC_WriteCurve_Sub 349 { 350 MS_U8 *pu8Table; 351 MS_BOOL bReturn; 352 } stDLC_WriteCurve_Sub, *pstDLC_WriteCurve_Sub; 353 354 355 typedef struct _stDLC_GetHistogram 356 { 357 MS_U16 *pu16Histogram; 358 E_XC_DLC_HISTOGRAM_TYPE enHistogramType; 359 MS_BOOL bReturn; 360 } stDLC_GetHistogram, *pstDLC_GetHistogram; 361 362 363 typedef struct _stDLC_DecodeExtCmd 364 { 365 tDLC_CONTROL_PARAMS *params; 366 } stDLC_DecodeExtCmd, *pstDLC_DecodeExtCmd; 367 368 369 typedef struct _stDLC_SetCaptureRange 370 { 371 XC_DLC_CAPTURE_Range *pu16_Range; 372 } stDLC_SetCaptureRange, *pstDLC_SetCaptureRange; 373 374 375 typedef struct _stDLC_SetSetting 376 { 377 XC_DLC_MFinit DLC_MFinit; 378 } stDLC_SetSetting, *pstDLC_SetSetting; 379 380 381 typedef struct _stDLC_Init 382 { 383 XC_DLC_init *pstXC_DLC_InitData; 384 MS_U32 u32InitDataLen; 385 MS_BOOL bReturn; 386 } stDLC_Init, *pstDLC_Init; 387 388 389 typedef struct _stDLC_GetStatus 390 { 391 XC_DLC_ApiStatus *pDrvStatus; 392 MS_BOOL bWindow; 393 MS_BOOL bReturn; 394 } stDLC_GetStatus, *pstDLC_GetStatus; 395 396 typedef struct _stDLC_SetPowerState 397 { 398 EN_POWER_MODE enPowerState; 399 MS_U32 u32Return; 400 } stDLC_SetPowerState, *pstDLC_SetPowerState; 401 402 403 typedef struct _stDBC_DLC_Init 404 { 405 XC_DLC_DBC_MFinit DLC_DBC_MFinit; 406 } stDBC_DLC_Init, *pstDBC_DLC_Init; 407 408 409 typedef struct _stDBC_Init 410 { 411 412 } stDBC_Init, *pstDBC_Init; 413 414 415 typedef struct _stDBC_Setstatus 416 { 417 MS_BOOL bDBCEnable; 418 } stDBC_Setstatus, *pstDBC_Setstatus; 419 420 421 typedef struct _stDBC_Getstatus 422 { 423 MS_BOOL bReturn; 424 } stDBC_Getstatus, *pstDBC_Getstatus; 425 426 427 typedef struct _stDBC_SetReady 428 { 429 MS_BOOL bDBCReady; 430 } stDBC_SetReady, *pstDBC_SetReady; 431 432 433 typedef struct _stDBC_SetDebugMode 434 { 435 MS_U8 ucDBC_DebugMode; 436 } stDBC_SetDebugMode, *pstDBC_SetDebugMode; 437 438 439 typedef struct _stDBC_GetDebugMode 440 { 441 MS_U8 u8Return; 442 } stDBC_GetDebugMode, *pstDBC_GetDebugMode; 443 444 445 typedef struct _stDBC_UpdatePWM 446 { 447 MS_U8 u8PWMvalue; 448 } stDBC_UpdatePWM, *pstDBC_UpdatePWM; 449 450 451 typedef struct _stDBC_Handler 452 { 453 MS_U16 u16Return; 454 } stDBC_Handler, *pstDBC_Handler; 455 456 457 typedef struct _stDBC_AdjustYCGain 458 { 459 460 } stDBC_AdjustYCGain, *pstDBC_AdjustYCGain; 461 462 463 typedef struct _stDBC_YCGainInit 464 { 465 MS_U8 u8YGain_M; 466 MS_U8 u8YGain_L; 467 MS_U8 u8CGain_M; 468 MS_U8 u8CGain_L; 469 } stDBC_YCGainInit, *pstDBC_YCGainInit; 470 471 472 typedef struct _stDBC_Reset 473 { 474 475 } stDBC_Reset, *pstDBC_Reset; 476 477 478 typedef struct _stDBC_DecodeExtCmd 479 { 480 tDBC_CONTROL_PARAMS *params; 481 } stDBC_DecodeExtCmd, *pstDBC_DecodeExtCmd; 482 483 #ifdef __cplusplus 484 } 485 #endif 486 487 #undef _DLC_V2_H_ 488 #endif //_DLC_V2_H_ 489 490