// //****************************************************************************** // MStar Software // Copyright (c) 2010 - 2012 MStar Semiconductor, Inc. All rights reserved. // All software, firmware and related documentation herein ("MStar Software") are // intellectual property of MStar Semiconductor, Inc. ("MStar") and protected by // law, including, but not limited to, copyright law and international treaties. // Any use, modification, reproduction, retransmission, or republication of all // or part of MStar Software is expressly prohibited, unless prior written // permission has been granted by MStar. // // By accessing, browsing and/or using MStar Software, you acknowledge that you // have read, understood, and agree, to be bound by below terms ("Terms") and to // comply with all applicable laws and regulations: // // 1. MStar shall retain any and all right, ownership and interest to MStar // Software and any modification/derivatives thereof. // No right, ownership, or interest to MStar Software and any // modification/derivatives thereof is transferred to you under Terms. // // 2. You understand that MStar Software might include, incorporate or be // supplied together with third party`s software and the use of MStar // Software may require additional licenses from third parties. // Therefore, you hereby agree it is your sole responsibility to separately // obtain any and all third party right and license necessary for your use of // such third party`s software. // // 3. MStar Software and any modification/derivatives thereof shall be deemed as // MStar`s confidential information and you agree to keep MStar`s // confidential information in strictest confidence and not disclose to any // third party. // // 4. MStar Software is provided on an "AS IS" basis without warranties of any // kind. Any warranties are hereby expressly disclaimed by MStar, including // without limitation, any warranties of merchantability, non-infringement of // intellectual property rights, fitness for a particular purpose, error free // and in conformity with any international standard. You agree to waive any // claim against MStar for any loss, damage, cost or expense that you may // incur related to your use of MStar Software. // In no event shall MStar be liable for any direct, indirect, incidental or // consequential damages, including without limitation, lost of profit or // revenues, lost or damage of data, and unauthorized system use. // You agree that this Section 4 shall still apply without being affected // even if MStar Software has been modified by MStar in accordance with your // request or instruction for your use, except otherwise agreed by both // parties in writing. // // 5. If requested, MStar may from time to time provide technical supports or // services in relation with MStar Software to you for your use of // MStar Software in conjunction with your or your customer`s product // ("Services"). // You understand and agree that, except otherwise agreed by both parties in // writing, Services are provided on an "AS IS" basis and the warranty // disclaimer set forth in Section 4 above shall apply. // // 6. Nothing contained herein shall be construed as by implication, estoppels // or otherwise: // (a) conferring any license or right to use MStar name, trademark, service // mark, symbol or any other identification; // (b) obligating MStar or any of its affiliates to furnish any person, // including without limitation, you and your customers, any assistance // of any kind whatsoever, or any information; or // (c) conferring any license or right under any intellectual property right. // // 7. These terms shall be governed by and construed in accordance with the laws // of Taiwan, R.O.C., excluding its conflict of law rules. // Any and all dispute arising out hereof or related hereto shall be finally // settled by arbitration referred to the Chinese Arbitration Association, // Taipei in accordance with the ROC Arbitration Law and the Arbitration // Rules of the Association by three (3) arbitrators appointed in accordance // with the said Rules. // The place of arbitration shall be in Taipei, Taiwan and the language shall // be English. // The arbitration award shall be final and binding to both parties. // //****************************************************************************** // //////////////////////////////////////////////////////////////////////////////// // // Copyright (c) 2008-2009 MStar Semiconductor, Inc. // All rights reserved. // // Unless otherwise stipulated in writing, any and all information contained // herein regardless in any format shall remain the sole proprietary of // MStar Semiconductor Inc. and be kept in strict confidence // ("MStar Confidential Information") by the recipient. // Any unauthorized act including without limitation unauthorized disclosure, // copying, use, reproduction, sale, distribution, modification, disassembling, // reverse engineering and compiling of the contents of MStar Confidential // Information is unlawful and strictly prohibited. MStar hereby reserves the // rights to any and all damages, losses, costs and expenses resulting therefrom. // //////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////// /// /// @file apiXC_Dlc.h /// @brief DLC API layer Interface /// @author MStar Semiconductor Inc. // CL171075++: sync to DLC libv32.59 : // 1.Add guard condition to msDlcOnOff & msDlc_CGC_Init; msDlcOnOff & msDlc_CGC_Init will check // DLC On/Off status before execution. /////////////////////////////////////////////////////////////////////////////////////////////////// /*! \defgroup Video Video modules * \defgroup XC_BE XC_BE modules * \ingroup Video DLC is used for\n 1. Dynamic Luma Curve : Calculate the DLC curve base on histogram and average value.\n For more information,see \link DLC DLC interface (apiXC_DLC.h) \endlink * \defgroup DLC DLC interface (apiXC_DLC.h) * \ingroup XC_BE DLC is used for: - Dynamic Luma Curve : Calculate the DLC curve base on histogram and average value. Operation Code Flow: \n check flow chart directly. \image html apiXC_DLC_DBC_Handler_flow.png * \defgroup DLC_INIT DLC init control * \ingroup DLC *! \defgroup DLC_FEATURE DLC feature operation * \ingroup DLC *! \defgroup DLC_INFO DLC Infomation pool * \ingroup DLC *! \defgroup DLC_ToBeModified DLC api to be modified * \ingroup DLC *! \defgroup DLC_ToBeRemove DLC api to be removed * \ingroup DLC */ #ifndef _API_XC_DLC_H_ #define _API_XC_DLC_H_ #include "MsCommon.h" #include "MsDevice.h" #include "UFO.h" #ifdef __cplusplus extern "C" { #endif //------------------------------------------------------------------------------------------------- // Macro and Define //------------------------------------------------------------------------------------------------- //------------------------------------------------------------------------------------------------- // Type and Structure //------------------------------------------------------------------------------------------------- #define MSIF_DLC_LIB_CODE {'D','L','C','_'} #define MSIF_DLC_LIBVER {'0','0'} #define MSIF_DLC_BUILDNUM {'3','0'} #define MSIF_DLC_CHANGELIST {'0','0','6','1','8','0','7','0'} #define XC_DLC_API_VERSION /* Character String for DRV/API version */ \ MSIF_TAG , /* 'MSIF' */ \ MSIF_CLASS , /* '00' */ \ MSIF_CUS , /* 0x0000 */ \ MSIF_MOD , /* 0x0000 */ \ MSIF_CHIP , \ MSIF_CPU , \ MSIF_DLC_LIB_CODE , /* IP__ */ \ MSIF_DLC_LIBVER , /* 0.0 ~ Z.Z */ \ MSIF_DLC_BUILDNUM , /* 00 ~ 99 */ \ MSIF_DLC_CHANGELIST, /* CL# */ \ MSIF_OS #if defined(UFO_PUBLIC_HEADER_500) #define XC_DLC_HDR_VERSION 1 #else #define XC_DLC_HDR_VERSION 4 #endif #define ENABLE_10_BIT_DLC 0 /// 0: Init /// 1: Add SDR panel gain /// 2: Add u16Smin, u16Smed, u16Smax, u16Tmin, u16Tmed, u16Tmax /// 3: Add bRefMode, used for UHDA test. /// 4: Add TMO 1D LUT #if defined(UFO_PUBLIC_HEADER_500) #define DLC_TMO_INFO_VERSION 3 #else #define DLC_TMO_INFO_VERSION 4 #endif /// DLC_MFINIT_Ex version of current DLC lib #if defined(UFO_PUBLIC_HEADER_300) || defined(UFO_PUBLIC_HEADER_212) #define DLC_MFINIT_EX_VERSION 1 #else #define DLC_MFINIT_EX_VERSION 2 #endif /// The ucDlcHistogramLimitCurve arrary num #define DLC_HISTOGRAM_LIMIT_CURVE_ARRARY_NUM 17 #ifndef UNUSED #define UNUSED(x) (void)(x) #endif /*! * The DLC curve settings, ways of enable DLC or, disable DLC. */ typedef enum { /// DLC curve E_XC_DLC_PURE_IMAGE_DLC_CURVE = 0, /// Linear curve E_XC_DLC_PURE_IMAGE_LINEAR_CURVE , /// get base address failed when initialize panel driver E_XC_DLC_PURE_IMAGE_DO_NOTHING , } E_XC_DLC_PURE_IMAGE_CURVE ; /*! * The DLC curve mode, ways of decide DLC algorithm. */ typedef enum { /// E_XC_DLC_CURVE_MODE_BY_YAVG = 0, /// E_XC_DLC_CURVE_MODE_BY_HISTOGRAM , /// E_XC_DLC_CURVE_MODE_BY_MIX , } E_XC_DLC_CURVE_MODE ; /*! * The DLC algorthm mode, ways of decide DLC algorithm. */ typedef enum { /// E_XC_DLC_ALGORITHM_OLD = 0, /// E_XC_DLC_ALGORITHM_NEW , } E_XC_DLC_ALGORITHM_MODE ; /*! * The DLC curve settings, ways of enable DLC or, disable DLC. */ typedef enum { /// fail E_XC_DLC_FAIL = 0, /// ok E_XC_DLC_OK = 1, /// get base address failed when initialize panel driver E_XC_DLC_GET_BASEADDR_FAIL, /// obtain mutex timeout when calling this function E_XC_DLC_OBTAIN_MUTEX_FAIL, } E_XC_DLC_RESULT; typedef enum { E_XC_DLC_HISTOGRAM_32, E_XC_DLC_HISTOGRAM_8, }E_XC_DLC_HISTOGRAM_TYPE; /******************************************************************************/ /* Structures */ /******************************************************************************/ //---------------------------- // XC DLC initialize //---------------------------- /*! * Initial Settings of MF Dyanmic Luma Curve */ typedef struct { /// Default luma curve MS_U8 ucLumaCurve[16]; /// Default luma curve 2a MS_U8 ucLumaCurve2_a[16]; /// Default luma curve 2b MS_U8 ucLumaCurve2_b[16]; /// Default luma curve 2 MS_U8 ucLumaCurve2[16]; /// default value: 10 MS_U8 u8_L_L_U; /// default value: 10 MS_U8 u8_L_L_D; /// default value: 10 MS_U8 u8_L_H_U; /// default value: 10 MS_U8 u8_L_H_D; /// default value: 128 (0x80) MS_U8 u8_S_L_U; /// default value: 128 (0x80) MS_U8 u8_S_L_D; /// default value: 128 (0x80) MS_U8 u8_S_H_U; /// default value: 128 (0x80) MS_U8 u8_S_H_D; /// -31 ~ 31 (bit7 = minus, ex. 0x88 => -8) MS_U8 ucCGCCGain_offset; /// 0x00~0x6F MS_U8 ucCGCChroma_GainLimitH; /// 0x00~0x10 MS_U8 ucCGCChroma_GainLimitL; /// 0x01~0x20 MS_U8 ucCGCYCslope; /// 0x01 MS_U8 ucCGCYth; /// Compare difference of max and min bright MS_U8 ucDlcPureImageMode; /// n = 0 ~ 4 => Limit n levels => ex. n=2, limit 2 level 0xF7, 0xE7 MS_U8 ucDlcLevelLimit; /// n = 0 ~ 50, default value: 12 MS_U8 ucDlcAvgDelta; /// n = 0 ~ 15 => 0: disable still curve, 1 ~ 15: enable still curve MS_U8 ucDlcAvgDeltaStill; /// min 17 ~ max 32 MS_U8 ucDlcFastAlphaBlending; /// some event is triggered, DLC must do slowly // for PIP On/Off, msMultiPic.c MS_U8 ucDlcSlowEvent; /// for IsrApp.c MS_U8 ucDlcTimeOut; /// for force to do fast DLC in a while MS_U8 ucDlcFlickAlphaStart; /// default value: 128 MS_U8 ucDlcYAvgThresholdH; /// default value: 0 MS_U8 ucDlcYAvgThresholdL; /// n = 24 ~ 64, default value: 48 MS_U8 ucDlcBLEPoint; /// n = 24 ~ 64, default value: 48 MS_U8 ucDlcWLEPoint; /// 1: enable; 0: disable MS_U8 bCGCCGainCtrl : 1; /// 1: enable; 0: disable MS_U8 bEnableBLE : 1; /// 1: enable; 0: disable MS_U8 bEnableWLE : 1; } XC_DLC_MFinit; typedef struct { MS_U32 u32DLC_MFinit_Ex_Version; /// -8) MS_U8 ucCGCCGain_offset; /// 0x00~0x6F MS_U8 ucCGCChroma_GainLimitH; /// 0x00~0x10 MS_U8 ucCGCChroma_GainLimitL; /// 0x01~0x20 MS_U8 ucCGCYCslope; /// 0x01 MS_U8 ucCGCYth; /// Compare difference of max and min bright MS_U8 ucDlcPureImageMode; /// n = 0 ~ 4 => Limit n levels => ex. n=2, limit 2 level 0xF7, 0xE7 MS_U8 ucDlcLevelLimit; /// n = 0 ~ 50, default value: 12 MS_U8 ucDlcAvgDelta; /// n = 0 ~ 15 => 0: disable still curve, 1 ~ 15: enable still curve MS_U8 ucDlcAvgDeltaStill; /// min 17 ~ max 32 MS_U8 ucDlcFastAlphaBlending; /// some event is triggered, DLC must do slowly // for PIP On/Off, msMultiPic.c MS_U8 ucDlcSlowEvent; /// for IsrApp.c MS_U8 ucDlcTimeOut; /// for force to do fast DLC in a while MS_U8 ucDlcFlickAlphaStart; /// default value: 128 MS_U8 ucDlcYAvgThresholdH; /// default value: 0 MS_U8 ucDlcYAvgThresholdL; /// n = 24 ~ 64, default value: 48 MS_U8 ucDlcBLEPoint; /// n = 24 ~ 64, default value: 48 MS_U8 ucDlcWLEPoint; /// 1: enable; 0: disable MS_U8 bCGCCGainCtrl : 1; /// 1: enable; 0: disable MS_U8 bEnableBLE : 1; /// 1: enable; 0: disable MS_U8 bEnableWLE : 1; /// default value: 64 MS_U8 ucDlcYAvgThresholdM; /// Compare difference of max and min bright MS_U8 ucDlcCurveMode; /// min 00 ~ max 128 MS_U8 ucDlcCurveModeMixAlpha; /// MS_U8 ucDlcAlgorithmMode; /// Dlc Histogram Limit Curve MS_U8 ucDlcHistogramLimitCurve[DLC_HISTOGRAM_LIMIT_CURVE_ARRARY_NUM]; /// MS_U8 ucDlcSepPointH; /// MS_U8 ucDlcSepPointL; /// MS_U16 uwDlcBleStartPointTH; /// MS_U16 uwDlcBleEndPointTH; /// MS_U8 ucDlcCurveDiff_L_TH; /// MS_U8 ucDlcCurveDiff_H_TH; /// MS_U16 uwDlcBLESlopPoint_1; /// MS_U16 uwDlcBLESlopPoint_2; /// MS_U16 uwDlcBLESlopPoint_3; /// MS_U16 uwDlcBLESlopPoint_4; /// MS_U16 uwDlcBLESlopPoint_5; /// MS_U16 uwDlcDark_BLE_Slop_Min; /// MS_U8 ucDlcCurveDiffCoringTH; /// MS_U8 ucDlcAlphaBlendingMin; /// MS_U8 ucDlcAlphaBlendingMax; /// MS_U8 ucDlcFlicker_alpha; /// MS_U8 ucDlcYAVG_L_TH; /// MS_U8 ucDlcYAVG_H_TH; /// MS_U8 ucDlcDiffBase_L; /// MS_U8 ucDlcDiffBase_M; /// MS_U8 ucDlcDiffBase_H; #if defined(UFO_PUBLIC_HEADER_500_3) || defined(UFO_PUBLIC_HEADER_500) || defined(UFO_PUBLIC_HEADER_700) MS_U8 u8LMaxThreshold; MS_U8 u8LMinThreshold; MS_U8 u8LMaxCorrection; MS_U8 u8LMinCorrection; MS_U8 u8RMaxThreshold; MS_U8 u8RMinThreshold; MS_U8 u8RMaxCorrection; MS_U8 u8RMinCorrection; MS_U8 u8AllowLoseContrast; #endif } XC_DLC_MFinit_Ex; /*! * Initial Settings of Dynamic Backlight Control */ typedef struct { /// Max PWM MS_U8 ucMaxPWM; /// Min PWM MS_U8 ucMinPWM; /// Max Video MS_U8 ucMax_Video; /// Mid Video MS_U8 ucMid_Video; /// Min Video MS_U8 ucMin_Video; /// Current PWM MS_U8 ucCurrentPWM; /// Alpha MS_U8 ucAlpha; /// Backlight thres MS_U8 ucBackLight_Thres; /// Avg delta MS_U8 ucAvgDelta; /// Flick alpha MS_U8 ucFlickAlpha; /// Fast alpha blending, min 17 ~ max 32 MS_U8 ucFastAlphaBlending; // TBD MS_U8 ucLoop_Dly; // TBD MS_U8 ucLoop_Dly_H_Init; // TBD MS_U8 ucLoop_Dly_MH_Init; // TBD MS_U8 ucLoop_Dly_ML_Init; // TBD MS_U8 ucLoop_Dly_L_Init; /// Y gain H MS_U8 ucY_Gain_H; /// C gain H MS_U8 ucC_Gain_H; /// Y gain M MS_U8 ucY_Gain_M; /// C gain M MS_U8 ucC_Gain_M; /// Y gain L MS_U8 ucY_Gain_L; /// C gain L MS_U8 ucC_Gain_L; /// 1: enable; 0: disable MS_U8 bYGainCtrl : 1; /// 1: enable; 0: disable MS_U8 bCGainCtrl : 1; }XC_DLC_DBC_MFinit; typedef struct __attribute__((packed)) { MS_U8 u8ColorPrimaries; MS_U8 u8TransferCharacteristics; MS_U8 u8MatrixCoefficients; } XC_DLC_HDRMetadataMpegVUI; // Data format follows HDR_Metadata_MpegSEI_MasteringColorVolume typedef struct __attribute__((packed)) { MS_U16 display_primaries_x[3]; // x = data*0.00002 [709] {15000, 7500, 32000} MS_U16 display_primaries_y[3]; // y = data*0.00002 [709] {30000, 3000, 16500} MS_U16 white_point_x; // x = data*0.00002 [709] 15635 MS_U16 white_point_y; // y = data*0.00002 [709] 16450 MS_U32 max_display_mastering_luminance; // data*0.0001 nits [600nits] 6000000 MS_U32 min_display_mastering_luminance; // data*0.0001 nits [0.3nits] 3000 } XC_DLC_HDRMetadataMpegSEIMasteringColorVolume; ///HDR Code//// typedef struct __attribute__((packed)) { MS_U16 u16Smin; // 0.10 MS_U16 u16Smed; // 0.10 MS_U16 u16Smax; // 0.10 MS_U16 u16Tmin; // 0.10 MS_U16 u16Tmed; // 0.10 MS_U16 u16Tmax; // 0.10 MS_U16 u16MidSourceOffset; MS_U16 u16MidTargetOffset; MS_U16 u16MidSourceRatio; MS_U16 u16MidTargetRatio; } XC_DLC_HDRToneMappingData; typedef struct __attribute__((packed)) { MS_U16 u16tRx; // target Rx MS_U16 u16tRy; // target Ry MS_U16 u16tGx; // target Gx MS_U16 u16tGy; // target Gy MS_U16 u16tBx; // target Bx MS_U16 u16tBy; // target By MS_U16 u16tWx; // target Wx MS_U16 u16tWy; // target Wy } XC_DLC_HDRGamutMappingData; typedef struct __attribute__((packed)) { MS_U8 u8EOTF; // 0:SDR gamma, 1:HDR gamma, 2:SMPTE ST2084, 3:Future EOTF, 4-7:Reserved MS_U16 u16Rx; // display primaries Rx MS_U16 u16Ry; // display primaries Ry MS_U16 u16Gx; // display primaries Gx MS_U16 u16Gy; // display primaries Gy MS_U16 u16Bx; // display primaries Bx MS_U16 u16By; // display primaries By MS_U16 u16Wx; // display primaries Wx MS_U16 u16Wy; // display primaries Wy MS_U16 u16Lmax; // max display mastering luminance MS_U16 u16Lmin; // min display mastering luminance MS_U16 u16MaxCLL; // maximum content light level MS_U16 u16MaxFALL; // maximum frame-average light level } XC_DLC_HDRMetadataHdmiTxInfoFrame; // HDR customer DLC curve. typedef struct __attribute__((packed)) { MS_BOOL bFixHdrCurve; MS_U16 u16DlcCurveSize; MS_U8 *pucDlcCurve; #if !defined (__aarch64__) void *pDummy; #endif } XC_DLC_HDRCustomerDlcCurve; /// HDR customer color primaries setting. typedef struct __attribute__((packed)) { MS_BOOL bCustomerEnable; MS_U16 u16sWx; MS_U16 u16sWy; } XC_DLC_HDRCustomerColorPrimaries; typedef struct __attribute__((packed)) { MS_U8 PixelFormat; // Pixel Format MS_U8 Colorimetry; // Color imetry MS_U8 ExtendedColorimetry; // Extended Color imetry MS_U8 RgbQuantizationRange; // Rgb Quantization Range MS_U8 YccQuantizationRange; // Ycc Quantization Range MS_U8 StaticMetadataDescriptorID; //Static Metadata Descriptor ID } XC_DLC_HDRHdmiTxAviInfoFrame; typedef struct __attribute__((packed)) { MS_BOOL bUsed; MS_BOOL bContentLightLevelEnabled; MS_U16 u16MaxContentLightLevel; MS_U16 u16MaxPicAverageLightLevel; } XC_DLC_HDRMetadataSeiContentLightLevel; // HDR new tone mapping parameters. typedef struct __attribute__((packed)) { // TMO MS_U16 u16SrcMinRatio; //default 10 MS_U16 u16SrcMedRatio; //default 512 MS_U16 u16SrcMaxRatio; //default 990 MS_U8 u8TgtMinFlag; //default 1 MS_U16 u16TgtMin; //default 500 MS_U8 u8TgtMaxFlag; //default 0 MS_U16 u16TgtMax; //default 300 MS_U16 u16FrontSlopeMin; //default 256 MS_U16 u16FrontSlopeMax; //default 512 MS_U16 u16BackSlopeMin; //default 128 MS_U16 u16BackSlopeMax; //default 256 MS_U16 u16SceneChangeThrd; //default 1024 MS_U16 u16SceneChangeRatioMax; //default 1024 MS_U8 u8IIRRatio; //default 31 MS_U8 u8TMO_TargetMode; // default 0. 0 : keeps the value in initial function 1 : from output source } XC_DLC_HDRNewToneMapping; /*! * Initial HDR Settings */ typedef struct __attribute__((packed)) { /// HDR Version Info MS_U16 u16HDRVerInfo; /// HDR init Length MS_U16 u16HDRInitLength; /// HDR Enable MS_BOOL bHDREnable; /// HDR Function Select MS_U16 u16HDRFunctionSelect; /// HDR Metadata Mpeg VUI XC_DLC_HDRMetadataMpegVUI DLC_HDRMetadataMpegVUI; // HDR Tone Mapping Data XC_DLC_HDRToneMappingData DLC_HDRToneMappingData; // HDR Gamut Mapping Data XC_DLC_HDRGamutMappingData DLC_HDRGamutMappingData; // HDR Metadata Hdmi Tx Info Frame XC_DLC_HDRMetadataHdmiTxInfoFrame DLC_HDRMetadataHdmiTxInfoFrame; // Customer DLC Curve XC_DLC_HDRCustomerDlcCurve DLC_HDRCustomerDlcCurve; // Customer color primaries. XC_DLC_HDRCustomerColorPrimaries DLC_HDRCustomerColorPrimaries; //HDR Hdmi Tx Avi Info Frame XC_DLC_HDRHdmiTxAviInfoFrame DLC_HDRHdmiTxAviInfoFrame; #if defined(UFO_PUBLIC_HEADER_212) || defined(UFO_PUBLIC_HEADER_300) || defined(UFO_PUBLIC_HEADER_500_3) || defined(UFO_PUBLIC_HEADER_700) /// HDR metadata MPEG SEI mastering color volume/ XC_DLC_HDRMetadataMpegSEIMasteringColorVolume DLC_HDRMetadataMpegSEIMasteringColorVolume; #endif /// New tone mapping parameters. XC_DLC_HDRNewToneMapping DLC_HDRNewToneMapping; } XC_DLC_HDRinit; /*! * Initial Settings of Dyanmic Luma Curve */ typedef struct { /// Scaler DCL MF init XC_DLC_MFinit DLC_MFinit; /// Scaler DCL MF init Ex XC_DLC_MFinit_Ex DLC_MFinit_Ex; /// Curve Horizontal start MS_U16 u16CurveHStart; /// Curve Horizontal end MS_U16 u16CurveHEnd; /// Curve Vertical start MS_U16 u16CurveVStart; /// Curve Vertical end MS_U16 u16CurveVEnd; /// Scaler DLC MF init XC_DLC_DBC_MFinit DLC_DBC_MFinit; #if (ENABLE_10_BIT_DLC) /// DLC init ext MS_BOOL b10BitsEn; #endif #if defined(UFO_PUBLIC_HEADER_500) || defined(UFO_PUBLIC_HEADER_500_3) || defined(UFO_PUBLIC_HEADER_700) #if defined(UFO_XC_HDR_VERSION) && (UFO_XC_HDR_VERSION == 2) MS_U8 u8DlcMode; MS_U8 u8TmoMode; #endif #endif } XC_DLC_init; /*! * Luma Statistics & Data of Dyanmic Luma Curve */ typedef struct { /// Luma histogram 32H MS_U16 g_wLumaHistogram32H[32]; /// Luma total count MS_U16 g_wLumiTotalCount; /// Luma average temp MS_U16 g_wLumiAverageTemp; /// table MS_U8 g_ucTable[16]; /// Histogram max MS_U8 g_ucHistogramMax; /// Histogram min MS_U8 g_ucHistogramMin; } XC_DLC_lumadata; /*! * Infomation of XC_DLC library. */ typedef struct { } XC_DLC_ApiInfo; /*! * Current Status of XC_DLC and library info. */ typedef struct DLL_PACKED { /// Scaler DLC init XC_DLC_init DLCinit; /// Scaler DLC Luma data XC_DLC_lumadata DLCluma; /// DLC Lib version MS_U8 u8DLC_LibVer; /// DLC MF version MS_U16 u16DLC_MFVer; /// DLC CGC MF version MS_U16 u16DLC_CGC_MFVer; /// DLC DBC init XC_DLC_DBC_MFinit DLC_DBCinit; /// DLC DBC MF version MS_U16 u16DLC_DBC_MFVer; } XC_DLC_ApiStatus; /* * DLC capture Range */ typedef struct DLL_PACKED { MS_U16 wHStart; MS_U16 wHEnd; MS_U16 wVStart; MS_U16 wVEnd; }XC_DLC_CAPTURE_Range; #ifdef UFO_XC_HDR #if (UFO_XC_HDR_VERSION == 2) #if defined(UFO_PUBLIC_HEADER_700) typedef struct DLL_PACKED { MS_U32 u32OutputNits[512]; MS_U16 u16InputPoint[512]; MS_U16 u16ControlPoints; MS_S16 s16LastLess1IndexOutputnits; MS_S16 s16LastIndexM10000Outputs; MS_S16 s16LastIndexM100Outputs; }ST_XC_DLC_TMO_1DLUT; #endif typedef struct DLL_PACKED { MS_U32 u32TMOInfo_Version; ///