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 _DLC_C_ 82 #define INTERFACE 83 #else 84 #define INTERFACE extern 85 #endif 86 87 #ifdef __cplusplus 88 extern "C" 89 { 90 #endif 91 92 #include "UFO.h" 93 #include "MsTypes.h" 94 //******** ENUM DEFINITIONS ********// 95 INTERFACE enum 96 { 97 E_DLC_POOL_ID_INTERNAL = 0, // just for test, please refine. 98 } E_DLC_POOL_ID; 99 100 101 typedef enum 102 { 103 E_DLC_CMD_INIT_EX, 104 E_DLC_CMD_SET_SETTING_EX, 105 E_DLC_CMD_SET_CURVE, 106 E_DLC_CMD_SET_BLE_SLOP_POINT, 107 #if defined(UFO_PUBLIC_HEADER_500_3) || defined(UFO_PUBLIC_HEADER_500) || defined(UFO_PUBLIC_HEADER_700) 108 E_DLC_CMD_SET_HDR_INFO, 109 #endif 110 E_DLC_CMD_EXIT, 111 E_DLC_CMD_SET_ON_OFF, 112 E_DLC_CMD_SET_HANDLER_ON_OFF, 113 E_DLC_CMD_SET_BLE_ON_OFF, 114 E_DLC_CMD_ENABLE_MAIN_SUB_CURVE_SYNCHRONIZATION, 115 E_DLC_CMD_HANDLER, 116 E_DLC_CMD_GET_HISTOGRAM_HANDLER, 117 E_DLC_CMD_GET_AVERAGE_VALUE, 118 E_DLC_CMD_GET_AVERAGE_VALUE_EX, 119 E_DLC_CMD_INIT_CURVE, 120 E_DLC_CMD_SPEEDUP_TRIGGER, 121 E_DLC_CMD_GET_LUMA_CURVE_STATUS, 122 E_DLC_CMD_CGC_RESET_C_GAIN, 123 E_DLC_CMD_CGC_CHECK_C_GAIN_IN_PQ_COM, 124 E_DLC_CMD_CGC_RESET_Y_GAIN, 125 E_DLC_CMD_CGC_CHECK_Y_GAIN_IN_PQ_COM, 126 E_DLC_CMD_CGC_RESET, 127 E_DLC_CMD_CGC_INIT, 128 E_DLC_CMD_CGC_REINIT, 129 E_DLC_CMD_CGC_HANDLER, 130 E_DLC_CMD_GET_LIB_VER, 131 E_DLC_CMD_GET_INFO, 132 E_DLC_CMD_GET_STATUS_EX, 133 E_DLC_CMD_SET_DBG_LEVEL, 134 E_DLC_CMD_WRITE_CURVE, 135 E_DLC_CMD_WRITE_CURVE_SUB, 136 E_DLC_CMD_GET_HISTOGRAM, 137 E_DLC_CMD_DECODE_EXT_CMD, 138 E_DLC_CMD_SET_CAPTURE_RANGE, 139 E_DLC_CMD_SET_SETTING, 140 E_DLC_CMD_INIT, 141 E_DLC_CMD_GET_STATUS, 142 E_DLC_CMD_SET_POWERSTATE, 143 #if defined(UFO_PUBLIC_HEADER_500_3) || defined(UFO_PUBLIC_HEADER_500) || defined(UFO_PUBLIC_HEADER_700) 144 E_DLC_CMD_SET_TMOINFO, 145 #endif 146 E_DBC_CMD_DLC_INIT, 147 E_DBC_CMD_INIT, 148 E_DBC_CMD_SET_STATUS, 149 E_DBC_CMD_GET_STATUS, 150 E_DBC_CMD_SET_READY, 151 E_DBC_CMD_SET_DEBUG_MODE, 152 E_DBC_CMD_GET_DEBUG_MODE, 153 E_DBC_CMD_UPDATE_PWM, 154 E_DBC_CMD_HANDLER, 155 E_DBC_CMD_ADJUST_YC_GAIN, 156 E_DBC_CMD_YC_GAIN_INIT, 157 E_DBC_CMD_RESET, 158 E_DBC_CMD_DECODE_EXT_CMD, 159 E_DLC_CMD_GET_EOTF_INFO, 160 E_DBC_CMD_NUM, 161 E_DLC_CMD_MAX = E_DBC_CMD_NUM, 162 } E_DLC_IOCTL_CMDS; 163 164 165 typedef struct DLL_PACKED _stDLC_SetHDRInitData 166 { 167 XC_DLC_HDRinit *pstDLC_HDRInitData; 168 MS_BOOL bReturn; 169 } stDLC_SetHDRInitData, *pstDLC_HDRInitData; 170 171 #if defined(UFO_XC_HDR_VERSION) && (UFO_XC_HDR_VERSION == 2) 172 typedef struct DLL_PACKED _stDLC_SetTMOInfo 173 { 174 ST_XC_DLC_TMO_INFO *pstDLC_TMOInfo; 175 MS_BOOL bReturn; 176 } stDLC_SetTMOInfo, *pstDLC_SetTMOInfo; 177 #endif 178 179 typedef struct _stDLC_Init_Ex 180 { 181 XC_DLC_init *pstXC_DLC_InitData; 182 MS_U32 u32InitDataLen; 183 MS_BOOL bReturn; 184 } stDLC_Init_Ex, *pstDLC_Init_Ex; 185 186 typedef struct _stDLC_SetSetting_Ex 187 { 188 XC_DLC_MFinit_Ex *DLC_MFinit_Ex; 189 } stDLC_SetSetting_Ex, *pstDLC_SetSetting_Ex; 190 191 192 typedef struct _stDLC_SetCurve 193 { 194 MS_U8 *pNormal; 195 MS_U8 *pLight; 196 MS_U8 *pDark; 197 } stDLC_SetCurve, *pstDLC_SetCurve; 198 199 200 typedef struct _stDLC_SetBleSlopPoint 201 { 202 MS_U16 *pBLESlopPoint; 203 } stDLC_SetBleSlopPoint, *pstDLC_SetBleSlopPoint; 204 205 206 typedef struct _stDLC_Exit 207 { 208 MS_BOOL bReturn; 209 } stDLC_Exit, *pstDLC_Exit; 210 211 212 typedef struct _stDLC_SetOnOff 213 { 214 MS_BOOL bSwitch; 215 MS_BOOL bWindow; 216 } stDLC_SetOnOff, *pstDLC_SetOnOff; 217 218 219 typedef struct _stDLC_SetDlcHandlerOnOff 220 { 221 MS_BOOL bDlcEnable; 222 MS_BOOL bReturn; 223 } stDLC_SetDlcHandlerOnOff, *pstDLC_SetDlcHandlerOnOff; 224 225 226 typedef struct _stDLC_SetBleOnOff 227 { 228 MS_BOOL bSwitch; 229 MS_BOOL bReturn; 230 } stDLC_SetBleOnOff, *pstDLC_SetBleOnOff; 231 232 233 typedef struct _stDLC_EnableMainSubCurveSynchronization 234 { 235 MS_BOOL bEnable; 236 } stDLC_EnableMainSubCurveSynchronization, *pstDLC_EnableMainSubCurveSynchronization; 237 238 239 typedef struct _stDLC_Handler 240 { 241 MS_BOOL bWindow; 242 } stDLC_Handler, *pstDLC_Handler; 243 244 245 typedef struct _stDLC_GetHistogramHandler 246 { 247 MS_BOOL bWindow; 248 MS_BOOL bReturn; 249 } stDLC_GetHistogramHandler, *pstDLC_GetHistogramHandler; 250 251 252 typedef struct _stDLC_GetAverageValue 253 { 254 MS_U8 u8Return; 255 } stDLC_GetAverageValue, *pstDLC_GetAverageValue; 256 257 258 typedef struct _stDLC_GetAverageValue_Ex 259 { 260 MS_U16 u16Return; 261 } stDLC_GetAverageValue_Ex, *pstDLC_GetAverageValue_Ex; 262 263 264 typedef struct _stDLC_InitCurve 265 { 266 MS_U16 u16HStart; 267 MS_U16 u16HEnd; 268 MS_U16 u16VStart; 269 MS_U16 u16VEnd; 270 } stDLC_InitCurve, *pstDLC_InitCurve; 271 272 273 typedef struct _stDLC_SpeedupTrigger 274 { 275 MS_U8 u8Loop; 276 } stDLC_SpeedupTrigger, *pstDLC_SpeedupTrigger; 277 278 279 typedef struct _stDLC_GetLumaCurveStatus 280 { 281 MS_BOOL bReturn; 282 } stDLC_GetLumaCurveStatus, *pstDLC_GetLumaCurveStatus; 283 284 285 typedef struct _stDLC_CGC_ResetCGain 286 { 287 288 } stDLC_CGC_ResetCGain, *pstDLC_CGC_ResetCGain; 289 290 291 typedef struct _stDLC_CGC_CheckCGainInPQCom 292 { 293 294 } stDLC_CGC_CheckCGainInPQCom, *pstDLC_CGC_CheckCGainInPQCom; 295 296 297 typedef struct _stDLC_CGC_ResetYGain 298 { 299 300 } stDLC_CGC_ResetYGain, *pstDLC_CGC_ResetYGain; 301 302 303 typedef struct _stDLC_CGC_CheckYGainInPQCom 304 { 305 306 } stDLC_CGC_CheckYGainInPQCom, *pstDLC_CGC_CheckYGainInPQCom; 307 308 309 typedef struct _stDLC_CGC_Reset 310 { 311 312 } stDLC_CGC_Reset, *pstDLC_CGC_Reset; 313 314 315 typedef struct _stDLC_CGC_Init 316 { 317 318 } stDLC_CGC_Init, *pstDLC_CGC_Init; 319 320 321 typedef struct _stDLC_CGC_ReInit 322 { 323 324 } stDLC_CGC_ReInit, *pstDLC_CGC_ReInit; 325 326 327 typedef struct _stDLC_CGC_Handler 328 { 329 330 } stDLC_CGC_Handler, *pstDLC_CGC_Handler; 331 332 333 typedef struct DLL_PACKED _stDLC_GetLibVer 334 { 335 const MSIF_Version **ppVersion; 336 E_XC_DLC_RESULT eResult; 337 } stDLC_GetLibVer, *pstDLC_GetLibVer; 338 339 340 typedef struct _stDLC_GetInfo 341 { 342 const XC_DLC_ApiInfo * eResult; 343 } stDLC_GetInfo, *pstDLC_GetInfo; 344 345 346 typedef struct DLL_PACKED _stDLC_GetStatus_Ex 347 { 348 XC_DLC_ApiStatus *pDrvStatus; 349 MS_BOOL bWindow; 350 MS_BOOL bReturn; 351 } stDLC_GetStatus_Ex, *pstDLC_GetStatus_Ex; 352 353 354 typedef struct _stDLC_SetDbgLevel 355 { 356 MS_U16 u16DbgSwitch; 357 MS_BOOL bReturn; 358 } stDLC_SetDbgLevel, *pstDLC_SetDbgLevel; 359 360 361 typedef struct DLL_PACKED _stDLC_WriteCurve 362 { 363 MS_U8 *pu8Table; 364 MS_BOOL bReturn; 365 } stDLC_WriteCurve, *pstDLC_WriteCurve; 366 367 368 typedef struct DLL_PACKED _stDLC_WriteCurve_Sub 369 { 370 MS_U8 *pu8Table; 371 MS_BOOL bReturn; 372 } stDLC_WriteCurve_Sub, *pstDLC_WriteCurve_Sub; 373 374 375 typedef struct DLL_PACKED _stDLC_GetHistogram 376 { 377 MS_U16 *pu16Histogram; 378 E_XC_DLC_HISTOGRAM_TYPE enHistogramType; 379 MS_BOOL bReturn; 380 } stDLC_GetHistogram, *pstDLC_GetHistogram; 381 382 383 typedef struct DLL_PACKED _stDLC_DecodeExtCmd 384 { 385 tDLC_CONTROL_PARAMS *params; 386 } stDLC_DecodeExtCmd, *pstDLC_DecodeExtCmd; 387 388 389 typedef struct DLL_PACKED _stDLC_SetCaptureRange 390 { 391 XC_DLC_CAPTURE_Range *pu16_Range; 392 } stDLC_SetCaptureRange, *pstDLC_SetCaptureRange; 393 394 395 typedef struct _stDLC_SetSetting 396 { 397 XC_DLC_MFinit DLC_MFinit; 398 } stDLC_SetSetting, *pstDLC_SetSetting; 399 400 401 typedef struct _stDLC_Init 402 { 403 XC_DLC_init *pstXC_DLC_InitData; 404 MS_U32 u32InitDataLen; 405 MS_BOOL bReturn; 406 } stDLC_Init, *pstDLC_Init; 407 408 409 typedef struct _stDLC_GetStatus 410 { 411 XC_DLC_ApiStatus *pDrvStatus; 412 MS_BOOL bWindow; 413 MS_BOOL bReturn; 414 } stDLC_GetStatus, *pstDLC_GetStatus; 415 416 typedef struct _stDLC_SetPowerState 417 { 418 EN_POWER_MODE enPowerState; 419 MS_U32 u32Return; 420 } stDLC_SetPowerState, *pstDLC_SetPowerState; 421 422 423 typedef struct _stDBC_DLC_Init 424 { 425 XC_DLC_DBC_MFinit DLC_DBC_MFinit; 426 } stDBC_DLC_Init, *pstDBC_DLC_Init; 427 428 429 typedef struct _stDBC_Init 430 { 431 432 } stDBC_Init, *pstDBC_Init; 433 434 435 typedef struct _stDBC_Setstatus 436 { 437 MS_BOOL bDBCEnable; 438 } stDBC_Setstatus, *pstDBC_Setstatus; 439 440 441 typedef struct _stDBC_Getstatus 442 { 443 MS_BOOL bReturn; 444 } stDBC_Getstatus, *pstDBC_Getstatus; 445 446 447 typedef struct _stDBC_SetReady 448 { 449 MS_BOOL bDBCReady; 450 } stDBC_SetReady, *pstDBC_SetReady; 451 452 453 typedef struct _stDBC_SetDebugMode 454 { 455 MS_U8 ucDBC_DebugMode; 456 } stDBC_SetDebugMode, *pstDBC_SetDebugMode; 457 458 459 typedef struct _stDBC_GetDebugMode 460 { 461 MS_U8 u8Return; 462 } stDBC_GetDebugMode, *pstDBC_GetDebugMode; 463 464 465 typedef struct _stDBC_UpdatePWM 466 { 467 MS_U8 u8PWMvalue; 468 } stDBC_UpdatePWM, *pstDBC_UpdatePWM; 469 470 471 typedef struct _stDBC_Handler 472 { 473 MS_U16 u16Return; 474 } stDBC_Handler, *pstDBC_Handler; 475 476 477 typedef struct _stDBC_AdjustYCGain 478 { 479 480 } stDBC_AdjustYCGain, *pstDBC_AdjustYCGain; 481 482 483 typedef struct _stDBC_YCGainInit 484 { 485 MS_U8 u8YGain_M; 486 MS_U8 u8YGain_L; 487 MS_U8 u8CGain_M; 488 MS_U8 u8CGain_L; 489 } stDBC_YCGainInit, *pstDBC_YCGainInit; 490 491 492 typedef struct _stDBC_Reset 493 { 494 495 } stDBC_Reset, *pstDBC_Reset; 496 497 498 typedef struct DLL_PACKED _stDBC_DecodeExtCmd 499 { 500 tDBC_CONTROL_PARAMS *params; 501 } stDBC_DecodeExtCmd, *pstDBC_DecodeExtCmd; 502 503 typedef struct _stDLC_GetEOTFInfo 504 { 505 MS_U32 u32SupportType; 506 } stDLC_GetEOTFInfo, *pstDLC_GetEOTFInfo; 507 508 #undef INTERFACE 509 510 #ifdef __cplusplus 511 } 512 #endif 513 514 #undef _DLC_V2_H_ 515 #endif //_DLC_V2_H_ 516 517