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 //<MStar Software> 78 #include "UFO.h" 79 #ifdef __cplusplus 80 extern "C" 81 { 82 #endif 83 84 #define DLC_HDR_VERSION 4 85 86 typedef struct 87 { 88 MS_U16 g_wLumaHistogram32H[32]; 89 MS_U16 g_wLumiTotalCount; 90 MS_U16 g_wLumiAverageTemp; 91 MS_U8 g_ucTable[16]; 92 MS_U8 g_ucHistogramMax; 93 MS_U8 g_ucHistogramMin; 94 } DLC_LUMADATA; 95 96 97 typedef struct 98 { /// Default luma curve 99 MS_U16 uwLumaCurve[16]; 100 /// Default luma curve 2a 101 MS_U16 uwLumaCurve2_a[16]; 102 /// Default luma curve 2b 103 MS_U16 uwLumaCurve2_b[16]; 104 /// Default luma curve 2 105 MS_U16 uwLumaCurve2[16]; 106 MS_BOOL b10BitsCruveEn; 107 }DLC_init_Ext; 108 109 /* 110 * DLC capture Range 111 */ 112 typedef struct 113 { 114 MS_U16 wHStart; 115 MS_U16 wHEnd; 116 MS_U16 wVStart; 117 MS_U16 wVEnd; 118 }StuDbc_CAPTURE_Range; 119 120 121 typedef struct __attribute__((packed)) 122 { 123 MS_U8 u8ColorPrimaries; 124 MS_U8 u8TransferCharacteristics; 125 MS_U8 u8MatrixCoefficients; 126 } DLC_HDRMetadataMpegVUI; 127 128 // Data format follows HDR_Metadata_MpegSEI_MasteringColorVolume 129 typedef struct __attribute__((packed)) 130 { 131 MS_U16 display_primaries_x[3]; // x = data*0.00002 [709] {15000, 7500, 32000} 132 MS_U16 display_primaries_y[3]; // y = data*0.00002 [709] {30000, 3000, 16500} 133 MS_U16 white_point_x; // x = data*0.00002 [709] 15635 134 MS_U16 white_point_y; // y = data*0.00002 [709] 16450 135 MS_U32 max_display_mastering_luminance; // data*0.0001 nits [600nits] 6000000 136 MS_U32 min_display_mastering_luminance; // data*0.0001 nits [0.3nits] 3000 137 } DLC_HDRMetadataMpegSEIMasteringColorVolume; 138 139 typedef struct __attribute__((packed)) 140 { 141 MS_U16 u16Smin; // 0.10 142 MS_U16 u16Smed; // 0.10 143 MS_U16 u16Smax; // 0.10 144 MS_U16 u16Tmin; // 0.10 145 MS_U16 u16Tmed; // 0.10 146 MS_U16 u16Tmax; // 0.10 147 MS_U16 u16MidSourceOffset; 148 MS_U16 u16MidTargetOffset; 149 MS_U16 u16MidSourceRatio; 150 MS_U16 u16MidTargetRatio; 151 } DLC_HDRToneMappingData; 152 153 typedef struct __attribute__((packed)) 154 { 155 MS_U16 u16tRx; // target Rx 156 MS_U16 u16tRy; // target Ry 157 MS_U16 u16tGx; // target Gx 158 MS_U16 u16tGy; // target Gy 159 MS_U16 u16tBx; // target Bx 160 MS_U16 u16tBy; // target By 161 MS_U16 u16tWx; // target Wx 162 MS_U16 u16tWy; // target Wy 163 } DLC_HDRGamutMappingData; 164 165 typedef struct __attribute__((packed)) 166 { 167 MS_U8 u8EOTF; // 0:SDR gamma, 1:HDR gamma, 2:SMPTE ST2084, 3:Future EOTF, 4-7:Reserved 168 MS_U16 u16Rx; // display primaries Rx 169 MS_U16 u16Ry; // display primaries Ry 170 MS_U16 u16Gx; // display primaries Gx 171 MS_U16 u16Gy; // display primaries Gy 172 MS_U16 u16Bx; // display primaries Bx 173 MS_U16 u16By; // display primaries By 174 MS_U16 u16Wx; // display primaries Wx 175 MS_U16 u16Wy; // display primaries Wy 176 MS_U16 u16Lmax; // max display mastering luminance 177 MS_U16 u16Lmin; // min display mastering luminance 178 MS_U16 u16MaxCLL; // maximum content light level 179 MS_U16 u16MaxFALL; // maximum frame-average light level 180 } DLC_HDRMetadataHdmiTxInfoFrame; 181 182 // HDR use customer DLC curve. 183 typedef struct __attribute__((packed)) 184 { 185 MS_BOOL bFixHdrCurve; 186 MS_U16 u16DlcCurveSize; 187 MS_U8 *pucDlcCurve; 188 #if !defined (__aarch64__) 189 void *pDummy; 190 #endif 191 } DLC_HDRCustomerDlcCurve; 192 193 // HDR use customer color primaries. 194 typedef struct __attribute__((packed)) 195 { 196 MS_BOOL bCustomerEnable; 197 MS_U16 u16sWx; 198 MS_U16 u16sWy; 199 } DLC_HDRCustomerColorPrimaries; 200 201 typedef struct __attribute__((packed)) 202 { 203 MS_U8 PixelFormat; // Pixel Format 204 MS_U8 Colorimetry; // Color imetry 205 MS_U8 ExtendedColorimetry; // Extended Color imetry 206 MS_U8 RgbQuantizationRange; // Rgb Quantization Range 207 MS_U8 YccQuantizationRange; // Ycc Quantization Range 208 MS_U8 StaticMetadataDescriptorID; //Static Metadata Descriptor ID 209 } DLC_HDRHdmiTxAviInfoFrame; 210 211 // HDR new tone mapping parameters. 212 typedef struct __attribute__((packed)) 213 { 214 // TMO 215 MS_U16 u16SrcMinRatio; //default 10 216 MS_U16 u16SrcMedRatio; //default 512 217 MS_U16 u16SrcMaxRatio; //default 990 218 219 MS_U8 u8TgtMinFlag; //default 1 220 MS_U16 u16TgtMin; //default 500 221 MS_U8 u8TgtMaxFlag; //default 0 222 MS_U16 u16TgtMax; //default 300 223 224 MS_U16 u16FrontSlopeMin; //default 256 225 MS_U16 u16FrontSlopeMax; //default 512 226 MS_U16 u16BackSlopeMin; //default 128 227 MS_U16 u16BackSlopeMax; //default 256 228 229 MS_U16 u16SceneChangeThrd; //default 1024 230 MS_U16 u16SceneChangeRatioMax; //default 1024 231 232 MS_U8 u8IIRRatio; //default 31 233 MS_U8 u8TMO_TargetMode; // default 0. 0 : keeps the value in initial function 1 : from output source 234 235 } DLC_HDRNewToneMapping; 236 237 /*! 238 * Initial HDR Settings 239 */ 240 typedef struct __attribute__((packed)) 241 { 242 /// HDR Version Info 243 MS_U16 u16HDRVerInfo; 244 /// HDR init Length 245 MS_U16 u16HDRInitLength; 246 /// HDR Enable 247 MS_BOOL bHDREnable; 248 /// HDR Function Select 249 MS_U16 u16HDRFunctionSelect; 250 /// HDR Metadata Mpeg VUI 251 DLC_HDRMetadataMpegVUI DLC_HDRMetadataMpegVUI; 252 //HDR Tone Mapping Data 253 DLC_HDRToneMappingData DLC_HDRToneMappingData; 254 //HDR Gamut Mapping Data 255 DLC_HDRGamutMappingData DLC_HDRGamutMappingData; 256 //HDR Metadata Hdmi Tx Info Frame 257 DLC_HDRMetadataHdmiTxInfoFrame DLC_HDRMetadataHdmiTxInfoFrame; 258 // Customer DLC Curve 259 DLC_HDRCustomerDlcCurve DLC_HDRCustomerDlcCurve; 260 // Customer color primarie. 261 DLC_HDRCustomerColorPrimaries DLC_HDRCustomerColorPrimaries; 262 //HDR Hdmi Tx Avi Info Frame 263 DLC_HDRHdmiTxAviInfoFrame DLC_HDRHdmiTxAviInfoFrame; 264 /// HDR metadata MPEG SEI mastering color volume/ 265 DLC_HDRMetadataMpegSEIMasteringColorVolume DLC_HDRMetadataMpegSEIMasteringColorVolume; 266 /// New tone mapping parameters. 267 DLC_HDRNewToneMapping DLC_HDRNewToneMapping; 268 } DLC_HDRinit; 269 270 #ifdef UFO_XC_HDR 271 #if (UFO_XC_HDR_VERSION == 2) 272 273 typedef struct DLL_PACKED 274 { 275 MS_U32 u32OutputNits[512]; 276 MS_U16 u16InputPoint[512]; 277 MS_U16 u16ControlPoints; 278 MS_S16 s16LastLess1IndexOutputnits; 279 MS_S16 s16LastIndexM10000Outputs; 280 MS_S16 s16LastIndexM100Outputs; 281 }ST_DLC_TMO_1DLUT; 282 283 typedef struct DLL_PACKED 284 { 285 MS_U32 u32TMOInfo_Version; ///<Version of current structure. Please always set to "DLC_TMO_INFO_VERSION" as input 286 MS_U16 u16TMOInfo_Length; ///<Length of this structure, u163DLutInfo_Length=sizeof(ST_DLC_TMO_INFO) 287 // TMO 288 MS_U16 u16SrcMinRatio; //default 10 289 MS_U16 u16SrcMedRatio; //default 512 290 MS_U16 u16SrcMaxRatio; //default 990 291 292 MS_U16 u16TgtMin; //default 500 293 MS_U16 u16TgtMed; 294 MS_U16 u16TgtMax; //default 300 295 296 MS_U16 u16FrontSlopeMin; //default 256 297 MS_U16 u16FrontSlopeMax; //default 512 298 MS_U16 u16BackSlopeMin; //default 128 299 MS_U16 u16BackSlopeMax; //default 256 300 301 MS_U16 u16SceneChangeThrd; //default 1024 302 MS_U16 u16SceneChangeRatioMax; //default 1024 303 304 MS_U8 u8IIRRatio; //default 31 305 MS_U8 u8TMOTargetMode; // default 0. 0 : keeps the value in initial function 1 : from output source 306 MS_U16 u16SDRPanelGain; // 307 308 MS_U16 u16Smin; 309 MS_U16 u16Smed; 310 MS_U16 u16Smax; 311 MS_U16 u16Tmin; 312 MS_U16 u16Tmed; 313 MS_U16 u16Tmax; 314 315 MS_BOOL bRefMode; 316 317 MS_U8 u8TMOUseIniControls; 318 ST_DLC_TMO_1DLUT stTMO1DLUT; 319 320 } ST_DLC_TMO_INFO; 321 #endif 322 #endif 323 324 MS_U16 msDlcLibVersionCheck(void); 325 //void msDlcInitWithCurve( MS_U16 wHStart, MS_U16 wHEnd, MS_U16 wVStart, MS_U16 wVEnd ); 326 //void msDlcOnOff(MS_BOOL bSwitch, MS_BOOL bWindow); 327 //void msDlcHandler(MS_BOOL bWindow); 328 MS_BOOL msGetHistogramHandler(MS_BOOL bWindow); 329 MS_U8 msGetAverageLuminous(void); 330 MS_U16 msGetAverageLuminous_x4(void); 331 332 //void msDlcSpeedupTrigger(MS_U8 u8Loop); 333 //MS_U16 msDlcLibVersionCheck(void); 334 //------------------------------------------------------------------------ 335 // CGC 336 //------------------------------------------------------------------------ 337 //void msDlc_CGC_Init(void); 338 //void msDlc_CGC_ReInit(void); 339 //void msDlc_CGC_SetGain(MS_U8 u8CGain); 340 //void msDlc_CGC_Handler(void); 341 //MS_U16 msDlcCGCLibVersionCheck(void); 342 343 //------------------------------------------------------------------------ 344 // For Debug Command 345 //------------------------------------------------------------------------ 346 typedef void (*MDrv_XC_DLC_Print_Callback) (MS_U8 /*PWM_VALUE*/); 347 348 //void msDLC_ParametersTool(MS_U8 *pCmdBuff); 349 350 /******************************************************************************/ 351 /* Function Prototypes */ 352 /******************************************************************************/ 353 //////////////////////////////////////////////////////////////////////////////// 354 /// @brief \b Function \b Name: MDrv_DLC_GetMFVer() 355 /// @brief \b Function \b Description: Get version of DLC library 356 /// @param <IN> \b None 357 /// @param <OUT> \b None 358 /// @param <RET> \b Version 359 /// @param <GLOBAL> \b None 360 //////////////////////////////////////////////////////////////////////////////// 361 MS_U16 MDrv_DLC_GetMFVer(void); 362 363 //////////////////////////////////////////////////////////////////////////////// 364 /// @brief \b Function \b Name: MDrv_DLC_InitCurve() 365 /// @brief \b Function \b Description: Initiate DLC HW 366 /// @param <IN> \b wHStart 367 /// @param <IN> \b wHEnd 368 /// @param <IN> \b wVStart 369 /// @param <IN> \b wVEnd 370 /// @param <IN> \b dwCustomMode 371 /// @param <OUT> \b None 372 /// @param <RET> \b None 373 /// @param <GLOBAL> \b None 374 //////////////////////////////////////////////////////////////////////////////// 375 void MDrv_DLC_InitCurve (MS_U16 u16HStart, MS_U16 u16HEnd, MS_U16 u16VStart, MS_U16 u16VEnd); 376 377 //////////////////////////////////////////////////////////////////////////////// 378 /// @brief \b Function \b Name: MDrv_DLC_SetCurve() 379 /// @brief \b Function \b Description: Set DLC curve 380 /// @param <IN> \b pNormal 381 /// @param <IN> \b pLight 382 /// @param <IN> \b pDark 383 /// @param <OUT> \b None 384 /// @param <RET> \b None 385 /// @param <GLOBAL> \b None 386 //////////////////////////////////////////////////////////////////////////////// 387 void MDrv_DLC_SetCurve(MS_U8 *pNormal, MS_U8 *pLight, MS_U8 *pDark ); 388 389 //////////////////////////////////////////////////////////////////////////////// 390 /// @brief \b Function \b Name: MDrv_DLC_SendDlcInitCurveChangeInfo() 391 /// @brief \b Function \b Description: Send DLC curve to kernel DLC 392 /// @param <IN> \b None 393 /// @param <OUT> \b None 394 /// @param <RET> \b None 395 /// @param <GLOBAL> \b None 396 //////////////////////////////////////////////////////////////////////////////// 397 MS_BOOL MDrv_DLC_SendDlcInitCurveChangeInfo(MS_BOOL bCurveChange,MS_U8 *pNormal, MS_U8 *pLight, MS_U8 *pDark); 398 399 //////////////////////////////////////////////////////////////////////////////// 400 /// @brief \b Function \b Name: MDrv_DLC_SendBleChangeInfo() 401 /// @brief \b Function \b Description: Send BLE Slop Point to kernel 402 /// @param <IN> \b None 403 /// @param <OUT> \b None 404 /// @param <RET> \b None 405 /// @param <GLOBAL> \b None 406 //////////////////////////////////////////////////////////////////////////////// 407 MS_BOOL MDrv_DLC_SendBleChangeInfo(MS_BOOL bBLEPointChange,MS_U16 *pBLESlopPoint); 408 409 //////////////////////////////////////////////////////////////////////////////// 410 /// @brief \b Function \b Name: MDrv_DLC_SetHDRInit() 411 /// @brief \b Function \b Description: Send HDR Init Info to kernel 412 /// @param <IN> \b None 413 /// @param <OUT> \b None 414 /// @param <RET> \b None 415 /// @param <GLOBAL> \b None 416 //////////////////////////////////////////////////////////////////////////////// 417 MS_BOOL MDrv_DLC_SetHDRInit(DLC_HDRinit * pstDLC_HDRInitData); 418 419 //////////////////////////////////////////////////////////////////////////////// 420 /// @brief \b Function \b Name: MDrv_DLC_SetTMOInfo() 421 /// @brief \b Function \b Description: Send TMO info to kernel 422 /// @param <IN> \b None 423 /// @param <OUT> \b None 424 /// @param <RET> \b None 425 /// @param <GLOBAL> \b None 426 //////////////////////////////////////////////////////////////////////////////// 427 #ifdef UFO_XC_HDR 428 #if (UFO_XC_HDR_VERSION == 2) 429 //ST_DLC_TMO_INFO is defined by (UFO_XC_HDR_VERSION == 2) 430 MS_BOOL MDrv_DLC_SetTMOInfo(ST_DLC_TMO_INFO * pstDLCTMOInfo); 431 #endif 432 #endif 433 434 //////////////////////////////////////////////////////////////////////////////// 435 /// @brief \b Function \b Name: MDrv_DLC_SetBleOnOff() 436 /// @brief \b Function \b Description: On/Off BLE function 437 /// @param <IN> \b bSwitch 438 /// @param <IN> \b bWindow 439 /// @param <OUT> \b None 440 /// @param <RET> \b None 441 /// @param <GLOBAL> \b None 442 //////////////////////////////////////////////////////////////////////////////// 443 MS_BOOL MDrv_DLC_SetBleOnOff(MS_BOOL bSwitch); 444 445 //////////////////////////////////////////////////////////////////////////////// 446 /// @brief \b Function \b Name: MDrv_DLC_Set_SlowDwonStep() 447 /// @brief \b Function \b Description: Set slow down step 448 /// @param <IN> \b bEn 449 /// @param <IN> \b u8Step 450 /// @param <OUT> \b None 451 /// @param <RET> \b None 452 /// @param <GLOBAL> \b None 453 //////////////////////////////////////////////////////////////////////////////// 454 void MDrv_DLC_Set_SlowDwonStep(MS_BOOL bEn, MS_U8 u8Step); 455 456 //////////////////////////////////////////////////////////////////////////////// 457 /// @brief \b Function \b Name: MDrv_DLC_SetOnOff() 458 /// @brief \b Function \b Description: On/Off DLC function 459 /// @param <IN> \b bSwitch 460 /// @param <IN> \b bWindow 461 /// @param <OUT> \b None 462 /// @param <RET> \b None 463 /// @param <GLOBAL> \b None 464 //////////////////////////////////////////////////////////////////////////////// 465 void MDrv_DLC_SetOnOff(MS_BOOL bSwitch, MS_BOOL bWindow); 466 467 //////////////////////////////////////////////////////////////////////////////// 468 /// @brief \b Function \b Name: MDrv_DLC_SetDlcHandlerOnOff() 469 /// @brief \b Function \b Description: Set DlcHandler On or Off 470 /// @param <IN> \b None 471 /// @param <OUT> \b None 472 /// @param <RET> \b None 473 /// @param <GLOBAL> \b None 474 //////////////////////////////////////////////////////////////////////////////// 475 MS_BOOL MDrv_DLC_SetDlcHandlerOnOff(MS_BOOL bSwitch); 476 477 //////////////////////////////////////////////////////////////////////////////// 478 /// @brief \b Function \b Name: MDrv_DLC_EnableMainSubCurveSynchronization() 479 /// @brief \b Function \b Description: On/Off DLC Set Curve both for main and sub function 480 /// @param <IN> \b bEnable 481 /// @param <IN> \b None 482 /// @param <OUT> \b None 483 /// @param <RET> \b None 484 /// @param <GLOBAL> \b None 485 void MDrv_DLC_EnableMainSubCurveSynchronization(MS_BOOL bEnable); 486 487 //////////////////////////////////////////////////////////////////////////////// 488 /// @brief \b Function \b Name: MDrv_DLC_Handler() 489 /// @brief \b Function \b Description: Handle DLC function 490 /// @param <IN> \b bWindow 491 /// @param <OUT> \b None 492 /// @param <RET> \b None 493 /// @param <GLOBAL> \b None 494 //////////////////////////////////////////////////////////////////////////////// 495 void MDrv_DLC_Handler(MS_BOOL bWindow); 496 497 //////////////////////////////////////////////////////////////////////////////// 498 /// @brief \b Function \b Name: MDrv_DLC_GetHistogram() 499 /// @brief \b Function \b Description: Get Histogram 500 /// @param <IN> \b bWindow 501 /// @param <OUT> \b None 502 /// @param <RET> \b ucReturn 503 /// @param <GLOBAL> \b None 504 //////////////////////////////////////////////////////////////////////////////// 505 MS_BOOL MDrv_DLC_GetHistogram(MS_BOOL bWindow); 506 507 //////////////////////////////////////////////////////////////////////////////// 508 /// @brief \b Function \b Name: MDrv_DLC_GetAverageValue() 509 /// @brief \b Function \b Description: Get Average of Luminous Value 510 /// @param <IN> \b None 511 /// @param <OUT> \b None 512 /// @param <RET> \b uwTmpAvr 513 /// @param <GLOBAL> \b None 514 //////////////////////////////////////////////////////////////////////////////// 515 MS_U8 MDrv_DLC_GetAverageValue(void); 516 517 //////////////////////////////////////////////////////////////////////////////// 518 /// @brief \b Function \b Name: MDrv_DLC_GetAverageValue_x4() 519 /// @brief \b Function \b Description: Get Average exactness of Luminous Value 520 /// @param <IN> \b None 521 /// @param <OUT> \b None 522 /// @param <RET> \b uwTmpAvr 523 /// @param <GLOBAL> \b None 524 //////////////////////////////////////////////////////////////////////////////// 525 MS_U16 MDrv_DLC_GetAverageValue_x4(void); 526 527 //////////////////////////////////////////////////////////////////////////////// 528 /// @brief \b Function \b Name: MDrv_DLC_SpeedupTrigger() 529 /// @brief \b Function \b Description: Speedup Trigger 530 /// @param <IN> \b ucLoop 531 /// @param <OUT> \b None 532 /// @param <RET> \b None 533 /// @param <GLOBAL> \b None 534 //////////////////////////////////////////////////////////////////////////////// 535 void MDrv_DLC_SpeedupTrigger(MS_U8 u8Loop); 536 537 //////////////////////////////////////////////////////////////////////////////// 538 /// @brief \b Function \b Name: MDrv_DLC_CGC_ResetCGain() 539 /// @brief \b Function \b Description: 540 /// @param <IN> \b None 541 /// @param <OUT> \b None 542 /// @param <RET> \b None 543 /// @param <GLOBAL> \b None 544 //////////////////////////////////////////////////////////////////////////////// 545 void MDrv_DLC_CGC_ResetCGain(void); 546 547 //////////////////////////////////////////////////////////////////////////////// 548 /// @brief \b Function \b Name: MDrv_DLC_CGC_GetCGain() 549 /// @brief \b Function \b Description: 550 /// @param <IN> \b None 551 /// @param <OUT> \b None 552 /// @param <RET> \b None 553 /// @param <GLOBAL> \b None 554 //////////////////////////////////////////////////////////////////////////////// 555 MS_U8 MDrv_DLC_CGC_GetCGain(void); 556 557 //////////////////////////////////////////////////////////////////////////////// 558 /// @brief \b Function \b Name: MDrv_DLC_CGC_SetCGain() 559 /// @brief \b Function \b Description: 560 /// @param <IN> \b None 561 /// @param <OUT> \b None 562 /// @param <RET> \b None 563 /// @param <GLOBAL> \b None 564 //////////////////////////////////////////////////////////////////////////////// 565 void MDrv_DLC_CGC_SetCGain(MS_U8 u8CGain); 566 567 //////////////////////////////////////////////////////////////////////////////// 568 /// @brief \b Function \b Name: MDrv_DLC_CGC_ResetYGain() 569 /// @brief \b Function \b Description: 570 /// @param <IN> \b None 571 /// @param <OUT> \b None 572 /// @param <RET> \b None 573 /// @param <GLOBAL> \b None 574 //////////////////////////////////////////////////////////////////////////////// 575 void MDrv_DLC_CGC_ResetYGain(void); 576 577 //////////////////////////////////////////////////////////////////////////////// 578 /// @brief \b Function \b Name: MDrv_DLC_CGC_GetYGain() 579 /// @brief \b Function \b Description: 580 /// @param <IN> \b None 581 /// @param <OUT> \b None 582 /// @param <RET> \b None 583 /// @param <GLOBAL> \b None 584 //////////////////////////////////////////////////////////////////////////////// 585 MS_U8 MDrv_DLC_CGC_GetYGain(void); 586 587 //////////////////////////////////////////////////////////////////////////////// 588 /// @brief \b Function \b Name: MDrv_DLC_CGC_SetYGain() 589 /// @brief \b Function \b Description: 590 /// @param <IN> \b None 591 /// @param <OUT> \b None 592 /// @param <RET> \b None 593 /// @param <GLOBAL> \b None 594 //////////////////////////////////////////////////////////////////////////////// 595 void MDrv_DLC_CGC_SetYGain(MS_U8 u8YGain); 596 597 //////////////////////////////////////////////////////////////////////////////// 598 /// @brief \b Function \b Name: MDrv_DLC_CGC_Init() 599 /// @brief \b Function \b Description: 600 /// @param <IN> \b None 601 /// @param <OUT> \b None 602 /// @param <RET> \b None 603 /// @param <GLOBAL> \b None 604 //////////////////////////////////////////////////////////////////////////////// 605 void MDrv_DLC_CGC_Init(void); 606 607 //////////////////////////////////////////////////////////////////////////////// 608 /// @brief \b Function \b Name: MDrv_DLC_CGC_ReInit() 609 /// @brief \b Function \b Description: 610 /// @param <IN> \b None 611 /// @param <OUT> \b None 612 /// @param <RET> \b None 613 /// @param <GLOBAL> \b None 614 //////////////////////////////////////////////////////////////////////////////// 615 void MDrv_DLC_CGC_ReInit(void); 616 617 //////////////////////////////////////////////////////////////////////////////// 618 /// @brief \b Function \b Name: MDrv_DLC_CGC_Handler() 619 /// @brief \b Function \b Description: Handle DLC CGC function 620 /// @param <IN> \b None 621 /// @param <OUT> \b None 622 /// @param <RET> \b None 623 /// @param <GLOBAL> \b None 624 //////////////////////////////////////////////////////////////////////////////// 625 void MDrv_DLC_CGC_Handler(void); 626 627 //////////////////////////////////////////////////////////////////////////////// 628 /// @brief \b Function \b Name: MDrv_DLC_CGC_GetMFVer() 629 /// @brief \b Function \b Description: 630 /// @param <IN> \b None 631 /// @param <OUT> \b None 632 /// @param <RET> \b None 633 /// @param <GLOBAL> \b None 634 //////////////////////////////////////////////////////////////////////////////// 635 MS_U16 MDrv_DLC_CGC_GetMFVer(void); 636 637 //////////////////////////////////////////////////////////////////////////////// 638 /// @brief \b Function \b Name: MDrv_DLC_WriteCurve() 639 /// @brief \b Function \b Description: 640 /// @param <IN> \b None 641 /// @param <OUT> \b None 642 /// @param <RET> \b None 643 /// @param <GLOBAL> \b None 644 //////////////////////////////////////////////////////////////////////////////// 645 void MDrv_DLC_WriteCurve(MS_U8 *pu8Table); 646 647 //////////////////////////////////////////////////////////////////////////////// 648 /// @brief \b Function \b Name: MDrv_DLC_WriteCurve_Sub() 649 /// @brief \b Function \b Description: 650 /// @param <IN> \b None 651 /// @param <OUT> \b None 652 /// @param <RET> \b None 653 /// @param <GLOBAL> \b None 654 //////////////////////////////////////////////////////////////////////////////// 655 void MDrv_DLC_WriteCurve_Sub(MS_U8 *pu8Table); 656 657 //////////////////////////////////////////////////////////////////////////////// 658 /// @brief \b Function \b Name: MDrv_DLC_WriteCurve() 659 /// @brief \b Function \b Description: 660 /// @param <IN> \b None 661 /// @param <OUT> \b None 662 /// @param <RET> \b None 663 /// @param <GLOBAL> \b None 664 //////////////////////////////////////////////////////////////////////////////// 665 MS_BOOL MDrv_DLC_get_histogram32(MS_U16 *pu16Histogram32); 666 667 void MDrv_DLC_Init(StuDlc_FinetuneParamaters DLC_MFinit); 668 void MDrv_DLC_Init_Ext(DLC_init_Ext *pDLC_InitExt); 669 MS_BOOL MDrv_DLC_GetDLCInfo(StuDlc_FinetuneParamaters *pDLCInitData, MS_U32 u32InitDataLen); 670 MS_BOOL MDrv_DLC_GetLumaInfo(DLC_LUMADATA *pDLCLumaData, MS_U32 u32LumaDataLen); 671 void MDrv_DLC_init_riu_base( MS_VIRT ptr_riu_base ); 672 MS_BOOL MDrv_DLC_GetLumaCurveStatus( void ); 673 void MDrv_DLC_set_CaptureRange(StuDbc_CAPTURE_Range *pu16Cap_rang); 674 675 // DCR library start 676 677 678 // DCR library end 679 680 #ifdef __cplusplus 681 } 682 #endif 683