//<MStar Software>
//******************************************************************************
// 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.
//
//******************************************************************************
//<MStar Software>
////////////////////////////////////////////////////////////////////////////////
//
// 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.
//
////////////////////////////////////////////////////////////////////////////////

#ifndef SC_DIP_H
#define SC_DIP_H
////===========================>>SW DB Buffer
#ifdef DRV_SC_DIPSCALING_C
#define INTERFACE
#else
#define INTERFACE extern
#endif

#define ALIGN_CHECK(value,factor) ((value + factor-1) & (~(factor-1)))
#define DIP_BYTE_PER_WORD       16UL
#define DIP_HVD_TILE_BLOCK_H    16UL
#define DIP_HVD_TILE_BLOCK_V    32UL
#define DIP_H265_TILE_BLOCK_H   32UL
#define DWIN_W_LIMITE_OFT       31UL
#define DIP_TRY_RESOURCE_TIMES 1000UL
#define DIP_DIPR_TRY_RESOURCE_TIMES 2UL

#ifndef UNUSED
#define UNUSED(var)             (void)(var)
#endif
#define DIP_TRY_RESOURCE_TIMES 1000UL

typedef struct
{
    MS_U16 u16H_CapStart;
    MS_U16 u16H_CapSize;
    MS_U16 u16V_CapStart;
    MS_U16 u16V_CapSize;

    MS_U32 u32H_PreScalingRatio;
    MS_U32 u32V_PreScalingRatio;

    MS_U16 u16DNROffset;
    MS_U16 u16DNRFetch;
}SC_DIP_SWDB_INFO, *P_SC_DIP_SWDB_INFO;

/// DWIN scan mode
typedef enum
{
    GOPDWIN_SCAN_MODE_AUTO = 0,
    GOPDWIN_SCAN_MODE_PROGRESSIVE = GOPDWIN_SCAN_MODE_AUTO,  ///< Progressive scan
    GOPDWIN_SCAN_MODE_INTERLACE,  ///< Interlace scan
    GOPDWIN_SCAN_MODE_MAX
} EN_XC_DWIN_SCAN_TYPE;

/// DWIN source data format
typedef enum
{
    /// YCrYCb.
    XC_DWIN_DATA_FMT_YUV422 = 0,
    /// RGB domain
    XC_DWIN_DATA_FMT_RGB565,
    /// RGB domain
    XC_DWIN_DATA_FMT_ARGB8888,
    /// YUV420 HVD tile fmt
    XC_DWIN_DATA_FMT_YUV420,
    /// YC separate 422
    XC_DWIN_DATA_FMT_YC422,
    /// YUV420 H265 tile fmt
    XC_DWIN_DATA_FMT_YUV420_H265,
    /// YUV420 H265 10 bits tile fmt
    XC_DWIN_DATA_FMT_YUV420_H265_10BITS,
    /// YUV420 planer
    XC_DWIN_DATA_FMT_YUV420_PLANER,
    /// YUV420 semi planer
    XC_DWIN_DATA_FMT_YUV420_SEMI_PLANER,
    /// YUV422 2.5D DI Top field
    XC_DWIN_DATA_FMT_YUV422_MED_DI_FIELDTYPE_TOP,
    /// YUV422 2.5D DI Bottom field
    XC_DWIN_DATA_FMT_YUV422_MED_DI_FIELDTYPE_BOTTOM,
    /// YUV420 2.5D DI Top field
    XC_DWIN_DATA_FMT_YUV420_MED_DI_FIELDTYPE_TOP,
    /// YUV420 2.5D DI Bottom field
    XC_DWIN_DATA_FMT_YUV420_MED_DI_FIELDTYPE_BOTTOM,
    /// YUV444 24 bits
    XC_DWIN_DATA_FMT_YUV444_24BITS,
    /// RGB domain
    XC_DWIN_DATA_FMT_ABGR8888,
    /// RGB domain
    XC_DWIN_DATA_FMT_RGBA8888,
    /// RGB domain
    XC_DWIN_DATA_FMT_BGRA8888,
    /// RGB domain
    XC_DWIN_DATA_FMT_ARGB_2101010,
    XC_DWIN_DATA_FMT_MAX
} EN_DRV_XC_DWIN_DATA_FMT;

/// DIP OP-TEE Operation mode
typedef enum
{
    /// unLock_output.
    XC_DIP_OPMODE_UNLOCK_OUTPUT = 0,
    /// unLock_output.
    XC_DIP_OPMODE_LOCK_OUTPUT = 1,
    /// Enable.
    XC_DIP_OPMODE_ENABLE = 2,
    /// Disable.
    XC_DIP_OPMODE_DISABLE = 3,
} EN_DRV_XC_DIP_OPERATIONMODE;

typedef struct
{
    MS_U32 u32PipeID;
    MS_U32 u32SecureDMA;
    MS_U32 u32OperationMode;
    MS_U32 u32ReturnValue;
}DIP_CONFIG_PIPE;

/// DIP resource enum
typedef enum
{
    /// get resource
    XC_DIP_GET_RESOURCE = 0,
    /// release resource
    XC_DIP_RELEASE_RESOURCE = 1,
} EN_DRV_XC_DIP_RESOURCE;

/// DIP DIPR resource enum
typedef enum
{
    /// dipr get resource
    XC_DIP_DIPR_GET_RESOURCE = 0,
    /// dipr release resource
    XC_DIP_DIPR_RELEASE_RESOURCE = 1,
} EN_DRV_XC_DIP_DIPR_RESOURCE;

typedef struct DLL_PACKED
{
    MS_U8  operation;
    MS_U32 u32RiuAddr;
    MS_U16 u16value;
    MS_U16 mask;
}ST_DIP_CMD_INFO;

/// Define DIP driver/hal layer return status
typedef enum
{
    E_DIP_FAIL = 0,
    E_DIP_SUCCESS,
    E_DIP_INVALID_PARAMETERS,
    E_DIP_MAX,
}EN_DIP_RETURN_STATUS;

typedef struct DLL_PACKED
{
    EN_XC_DIP_DATA_FMT enDataFmt;
    EN_XC_DIP_TILE_BLOCK enRdTileFmt;
    MS_BOOL bMfdEna;
}ST_DRV_CAPS_DIPR_WIDTH_MAX;

typedef struct DLL_PACKED
{
    SCALER_DIP_WIN eWindow;
    SCALER_DIP_SOURCE_TYPE enSource;
    INPUT_SOURCE_TYPE_t enInputSourceType;
    MS_U16 u16VsyncPos;
    MS_U16 u16Width;
    MS_U16 u16Height;
    MS_U32 u32HDMIClkRate;
    MS_BOOL bIsHDMI2P1;
}ST_DRV_DIP_HDMI_INFO;

INTERFACE SC_DIP_SWDB_INFO stDIP_DBreg[MAX_DIP_WINDOW];         ///< SW double buffer

typedef struct DLL_PACKED
{
    MS_U32 u32Version;
    MS_U32 u32Length;
    MS_U16 u16MainCapWidth;
    MS_U16 u16MainCapHeight;
    MS_BOOL bMainHskMode;
    MS_BOOL bMain2pEna;
    MS_U16 u16MainDispDEWidth;
    MS_U16 u16MainDispDEHeight;
    MS_U16 u16MainOPMFetch;
    MS_U16 u16SubCapWidth;
    MS_U16 u16SubCapHeight;
    MS_U16 u16SubDispDEWidth;
    MS_U16 u16SubDispDEHeight;
    MS_U16 u16SubOPMFetch;
    MS_BOOL bMainHFRPathEn;
    MS_BOOL bSubHFRPathEn;
    MS_U16 u16MainCropWidth;
    MS_U16 u16MainCropHeight;
    MS_BOOL bIsOP120Hz;
}ST_DRV_DIP_GET_XC_STATUS;

typedef enum
{
    E_DRV_DIP_BUFFER_NONE = 0x0,
    E_DRV_DIP_DI_DNR_BUFFER = 0x1,
}EN_DRV_DIP_BUF_TYPE;

typedef struct DLL_PACKED
{
    EN_DRV_DIP_BUF_TYPE enBufType;
    MS_PHY phyBufAddr;
    MS_U32 u32BufSize;
    SCALER_DIP_WIN eWindow;
}ST_DRV_DIP_Buffer;

typedef enum
{
    E_DRV_XC_DIPR0 = 0x0,
}EN_DRV_XC_DIPR_ENGINE;

typedef enum
{
    E_DRV_XC_BLENDING_COMPOSER = 0x0,
    E_DRV_XC_BLENDING_HFR = 0x1,
}EN_DRV_XC_DIPR_BLENDING_DST;

typedef struct DLL_PACKED
{
	EN_DRV_XC_DIPR_ENGINE enDIPRSel;
	EN_DRV_XC_DIPR_BLENDING_DST enDIPRDst;
	MS_BOOL bEnable;
}ST_DRV_DIP_DIPR_BLENDING_MODE_SETTINGS;

typedef struct DLL_PACKED
{
   INPUT_SOURCE_TYPE_t enXCInputSrcType;
   SCALER_DIP_SOURCE_TYPE enDipCapSource;
   MS_WINDOW_TYPE stXCCapWin;
   MS_BOOL bInterlace;
   MS_BOOL bPathEnabled;
}ST_DRV_DIP_XCPathInfo;

typedef struct DLL_PACKED
{
    SCALER_DIP_WIN eWindow;
    ST_DRV_DIP_XCPathInfo stXCInfo;
}ST_DRV_DIP_SET_XCPATH_INFO;

void MDrv_XC_DIP_SWReset(void* pInstance,SCALER_DIP_WIN eWindow);
void MDrv_XC_DIP_Init(void* pInstance,SCALER_DIP_WIN eWindow);
void MDrv_XC_DIP_CMDQ_SetAction(void* pInstance,EN_XC_DIP_CMDQ_ACTION eAction, SCALER_DIP_WIN eWindow);
void MDrv_XC_DWIN_init_swdb(void* pInstance,SCALER_DIP_WIN eWindow);
void MDrv_XC_DWIN_sw_db(void* pInstance,P_SC_DIP_SWDB_INFO pDBreg, SCALER_DIP_WIN eWindow);
void MDrv_XC_DWIN_SetInputSource(void* pInstance,INPUT_SOURCE_TYPE_t enInputSourceType, SCALER_DIP_WIN eWindow);
void MDrv_XC_DWIN_GetInputSource(void* pInstance,INPUT_SOURCE_TYPE_t *enInputSourceType,SCALER_DIP_WIN eWindow);
void MDrv_XC_DWIN_DisableInputSource(void* pInstance,MS_BOOL bDisable, SCALER_DIP_WIN eWindow);
void MDrv_XC_DWIN_SetFrameBufferAddress(void* pInstance,MS_PHY u64FBAddress, MS_PHY u64FBSize, SCALER_DIP_WIN eWindow);
void MDrv_XC_DWIN_set_capture_v_start(void* pInstance,MS_U16 u16Vstart , SCALER_DIP_WIN eWindow);
void MDrv_XC_DWIN_set_capture_h_start(void* pInstance,MS_U16 u16Vstart , SCALER_DIP_WIN eWindow);
void MDrv_XC_DWIN_set_capture_v_size(void* pInstance,MS_U16 u16Vsize , SCALER_DIP_WIN eWindow);
void MDrv_XC_DWIN_set_capture_h_size(void* pInstance,MS_U16 u16Hsize , SCALER_DIP_WIN eWindow);
void MDrv_XC_DWIN_set_capture_window(void* pInstance,SCALER_DIP_WIN eWindow);
void MDrv_XC_DWIN_get_capture_window(void* pInstance,MS_WINDOW_TYPE* capture_win,SCALER_DIP_WIN eWindow);
void MDrv_XC_DWIN_get_DE_Window(void* pInstance,MS_WINDOW_TYPE* psWin,SCALER_DIP_WIN eWindow);
void MDrv_XC_DWIN_EnableR2YCSC(void* pInstance,MS_BOOL benable, SCALER_DIP_WIN eWindow);
void MDrv_XC_DWIN_set_delayline(void* pInstance,MS_U8 u8DelayLines, SCALER_DIP_WIN eWindow );
void MDrv_XC_DWIN_set_prescaling_ratio(void* pInstance,INPUT_SOURCE_TYPE_t enInputSourceType, XC_DIP_InternalStatus *pSrcInfo, SCALER_DIP_WIN eWindow);
void MDrv_XC_DWIN_set_storeFrameNUM(void* pInstance,SCALER_DIP_WIN eWindow,MS_U8 u8FrameNum);
void MDrv_XC_DWIN_set_fetch_number_limit(void* pInstance,XC_DIP_InternalStatus *pSrcInfo, SCALER_DIP_WIN eWindow);
void MDrv_XC_DWIN_EnableIPAutoCoast(void* pInstance,MS_BOOL bEnable, SCALER_DIP_WIN eWindow);
void MDrv_XC_DWIN_Scaler_Field_Detect(void* pInstance,INPUT_SOURCE_TYPE_t enInputSrcType, EN_XC_DWIN_SCAN_TYPE enScanType, SCALER_DIP_WIN eWindow);
void MDrv_XC_DWIN_Disable_IPM_ReadWriteRequest(void* pInstance,MS_BOOL bDisable, SCALER_DIP_WIN eWindow);
void MDrv_XC_DWIN_SetMode(void* pInstance,INPUT_SOURCE_TYPE_t enInputSourceType, XC_DIP_InternalStatus *pSrcInfo, SCALER_DIP_WIN eWindow);
//==============Set===================
void MDrv_XC_DIP_SetSourceInfo(void* pInstance,ST_DIP_SET_SOURCE_INFO *pstSetSrcInfo, SCALER_DIP_WIN eWindow);
void MDrv_XC_DIP_SetWindow(void* pInstance,XC_SETWIN_INFO *pstXC_SetWin_Info, MS_U32 u32InitDataLen, SCALER_DIP_WIN eWindow);
void MDrv_XC_DIP_SetFRC(void* pInstance,MS_BOOL bEnable,MS_U16 u16In,MS_U16 u16Out,SCALER_DIP_WIN eWindow);
void MDrv_XC_DIP_SetWinProperty(void* pInstance,ST_XC_DIP_WINPROPERTY *pstDIPWinProperty, SCALER_DIP_WIN eWindow);
MS_BOOL MDrv_XC_DIP_CaptureOneFrame(void* pInstance,SCALER_DIP_WIN eWindow);
void MDrv_XC_DIP_CaptureOneFrame2(void* pInstance,SCALER_DIP_WIN eWindow);
void MDrv_XC_DIP_EnableIntr(void* pInstance,MS_U16 u8mask, MS_BOOL bEnable,SCALER_DIP_WIN eWindow);
void MDrv_XC_DIP_ClearIntr(void* pInstance,MS_U16 u16mask,SCALER_DIP_WIN eWindow);
void MDrv_XC_DIP_EnableCaptureStream(void* pInstance,MS_BOOL bEnable,SCALER_DIP_WIN eWindow);
void MDrv_XC_DIP_SelectSourceScanType(void* pInstance,EN_XC_DWIN_SCAN_TYPE enScan,SCALER_DIP_WIN eWindow);
void MDrv_XC_DIP_SetInterlaceWrite(void* pInstance,MS_BOOL bEnable,SCALER_DIP_WIN eWindow);
void MDrv_XC_DIP_SetDataFmt(void* pInstance,EN_DRV_XC_DWIN_DATA_FMT fmt,SCALER_DIP_WIN eWindow);
void MDrv_XC_DIP_SetAlphaValue(void* pInstance,MS_U8 u8AlphaVal,SCALER_DIP_WIN eWindow);
void MDrv_XC_DIP_SetY2R(void* pInstance,MS_BOOL bEnable,SCALER_DIP_WIN eWindow);
void MDrv_XC_DIP_SetUVSwap(void* pInstance,MS_BOOL bEnable,SCALER_DIP_WIN eWindow);
void MDrv_XC_DIP_SetYCSwap(void* pInstance,MS_BOOL bEnable,SCALER_DIP_WIN eWindow);
void MDrv_XC_DIP_SetRGBSwap(void* pInstance,MS_BOOL bEnable,SCALER_DIP_WIN eWindow);
void MDrv_XC_DIP_SetOutputCapture(void* pInstance,MS_BOOL bEnable,EN_XC_DIP_OP_CAPTURE eOpCapture,SCALER_DIP_WIN eWindow);
void MDrv_XC_DIP_SetMirror(void* pInstance,MS_BOOL bHMirror,MS_BOOL bVMirror,SCALER_DIP_WIN eWindow);
MS_BOOL MDrv_XC_DIP_DrvResourceControl(void);
MS_BOOL MDrv_XC_DIP_Resource_Control(void* pInstance, EN_DRV_XC_DIP_RESOURCE eResource, SCALER_DIP_WIN eWindow);
MS_BOOL MDrv_XC_DIP_DIPR_ShareCheck(void);
MS_BOOL MDrv_XC_DIP_DIPR_ShareControl(void* pInstance, EN_DRV_XC_DIP_DIPR_RESOURCE eResource, SCALER_DIP_WIN eWindow);
void MDrv_XC_DIP_SetDIPRProperty(void* pInstance,ST_XC_DIPR_PROPERTY *pstDIPRProperty, SCALER_DIP_WIN eWindow);
void MDrv_XC_DIP_SetDIPRProperty_EX(void* pInstance,ST_XC_DIPR_PROPERTY_EX *pstDIPRProperty_ex, SCALER_DIP_WIN eWindow);
void MDrv_XC_DIP_InterruptAttach(void* pInstance,InterruptCb pIntCb,SCALER_DIP_WIN eWindow);
void MDrv_XC_DIP_InterruptDetach(void* pInstance,SCALER_DIP_WIN eWindow);
void MDrv_XC_DIP_SetRotation(void* pInstance,MS_BOOL bRotation,EN_XC_DIP_ROTATION eRoDirection,SCALER_DIP_WIN eTmpWindow);
void MDrv_XC_DIP_SetPinpon(void* pInstance,MS_BOOL bPinpon,MS_PHY u64PinponAddr,SCALER_DIP_WIN eWindow);
MS_BOOL MDrv_XC_DIP_SetHVSP(void* pInstance,MS_BOOL bSelect, SCALER_DIP_WIN eWindow);
MS_BOOL MDrv_XC_DIP_Set420TileBlock(void* pInstance,EN_XC_DIP_TILE_BLOCK eTileBlock,SCALER_DIP_WIN eWindow);
void MDrv_XC_DIP_SetBdgLevel(EN_XC_DIP_DEBUG_LEVEL level);
MS_BOOL MDrv_XC_DIP_SC1_SCMI_ENABLE(void* pInstance,MS_BOOL bEnable,MS_U8 u8FrameCnt, SCALER_DIP_WIN eWindow);
MS_BOOL MDrv_XC_DIP_Set_Secure_Mode(void* pInstance, MS_BOOL bEnable, ST_DIP_SET_SECURE_MODE_EXTEND stSecureExtend, SCALER_DIP_WIN eWindow);
MS_BOOL MDrv_XC_DIP_Set_PowerState(void* pInstance, EN_POWER_MODE enPowerState);
#ifdef CONFIG_UTOPIA_PROC_DBG_SUPPORT
void MDrv_XC_DIP_Mdb_Cmdline(MS_U64* u64ReqHdl,MS_U32 u32CmdSize,char *pcCmdLine);
void MDrv_XC_DIP_Mdb_GetInfo(MS_U64* u64ReqHdl);
#endif
//==============Get===================
MS_U16 MDrv_XC_DIP_GetIntrStatus(void* pInstance,SCALER_DIP_WIN eWindow);
#ifdef STELLAR
MS_U16 MDrv_XC_DIP_QueryIntr(void* pInstance,SCALER_DIP_WIN eWindow);
MS_U16 MDrv_XC_DIP_GetLatestFrame(void* pInstance, SCALER_DIP_WIN eWindow);
#endif
BUFFER_INFO MDrv_XC_DIP_GetBufferInfo(void* pInstance,SCALER_DIP_WIN eWindow);
//==============OP TEE===================
MS_U32 MDrv_XC_DIP_ConfigPipe_U2(void* pInstance,MS_U32 u32PipeID, MS_U32 u32SecureDMA, MS_U32 u32OperationMode);
void MDrv_XC_DIP_IMI_ENABLE(void* pInstance,MS_BOOL bEnable, SCALER_DIP_WIN eWindow);
EN_DIP_RETURN_STATUS MDrv_XC_DIP_SCALING_ADVANCE_MODE(void* pInstance, MS_BOOL bEnable, SCALER_DIP_WIN eWindow);
MS_BOOL MDrv_XC_DIP_GetBusSize(void* pInstance, MS_U16* u16BusSize, SCALER_DIP_WIN eWindow);
MS_BOOL MDrv_XC_DIP_GetDIPRCapsWidthMax(void* pInstance, ST_DRV_CAPS_DIPR_WIDTH_MAX stDrvDiprWidthMax, MS_U16* pu16Width);
MS_BOOL MDrv_XC_DIP_GetDIPWCapsWidthMax(void* pInstance, EN_XC_DIP_DATA_FMT enDataFmt, MS_U16* pu16Width);
MS_BOOL MDrv_XC_DIP_GetDIPRCapsWidthMin(void* pInstance, MS_U16 u16bpp, MS_U16* pu16Width);
MS_BOOL MDrv_XC_DIP_GetDIPCapsIrqSupport(void* pInstance, MS_BOOL* bIrqSupport);
MS_BOOL MDrv_XC_DIP_GetVScalingMaxWidth(void* pInstance, MS_U16* pu16MaxWidth, SCALER_DIP_WIN eWindow);
MS_BOOL MDrv_XC_DIP_GetDIEngineSupport(void* pInstance, MS_BOOL* pbDIEngineSupport, SCALER_DIP_WIN eWindow);
MS_BOOL MDrv_XC_DIP_FillXCApiStatus(void* pInstance, ST_DRV_DIP_GET_XC_STATUS *pstdrvGetXCStatus);
MS_BOOL MDrv_XC_DIP_SetBuffer(void* pInstance,ST_DRV_DIP_Buffer *pstSetBuffInfo);
MS_BOOL MDrv_XC_DIP_SetDIMode(void* pInstance, MS_BOOL bEnable,SCALER_DIP_WIN eWindow);
MS_BOOL MDrv_XC_DIP_SetPDNRMode(void* pInstance, MS_BOOL bEnable,SCALER_DIP_WIN eWindow);
MS_BOOL MDrv_XC_DIP_SetDIPRBlending(void* pInstance, EN_DRV_XC_DIPR_ENGINE enDIPRSel,EN_DRV_XC_DIPR_BLENDING_DST enDIPRDst,MS_BOOL bEnable,SCALER_DIP_WIN eWindow);
MS_BOOL MDrv_XC_DIP_SET_XC_PATH_INFO(void* pInstance, ST_DRV_DIP_SET_XCPATH_INFO *pstSetXCPathInfo);
MS_BOOL MDrv_XC_DIP_SetHDMIInfo(void* pInstance, ST_DRV_DIP_HDMI_INFO *pstHDMIInfo);
MS_BOOL MDrv_XC_DIP_Set_LR_Clip(void* pInstance, MS_BOOL bEnable, SCALER_DIP_WIN eWindow);
MS_BOOL MDrv_XC_DIP_CheckIntIndependent(void* pInstance, SCALER_DIP_WIN eWindow);

#undef INTERFACE
#endif /* DRV_SC_SCALING_H */

