// //****************************************************************************** // 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.h /// @brief XC Interface /// @author MStar Semiconductor Inc. /////////////////////////////////////////////////////////////////////////////////////////////////// /*! \defgroup Video Video modules XC is used for \n 1. video display \n 2. 3D support \n 3. mirror mode spoort \n 4. frame rate convert and output timing control \n 5. OSDC timing control \n For more information,see \link XC_CORE XC_CORE modules \endlink \n There are three parts as follow,\n ACE is used for \n 1. control the picture quality,include brightness, contrast, CSC ,etc.\n 2. MWE function.\n DBC is used for\n 1. Dynamic Backlight Curve : Calculate the DBC base on average value.\n 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 XC_BE XC_BE modules \endlink \n ADC is used to control ADC relative setting for YPbPr, VGA, SCART, AV, SV, ATV.\n For more information,see \link XC_SRC XC_SRC modules \endlink \n There are three parts as follow,\n Auto is used to implement auto adjust and auto calibration.\n Mode Parse mechanism is a fast and easy way to look up input timing according to different timing characteristics.\n PC monitor is used to detect signal information.\n For more information,see \link XC_FE XC_FE modules \endlink \n DIP is a video capture function ,the whole function block separate four part,source select, clip window, HV scaling down , output window.\n For more information,see \link XC_DWIN XC_DWIN modules \endlink * \defgroup XC_CORE XC_CORE modules * \ingroup Video XC is used for \n 1. video display \n 2. 3D support \n 3. mirror mode spoort \n 4. frame rate convert and output timing control \n 5. OSDC timing control \n For more information,see \link XC XC interface (apiXC.h) \endlink * \defgroup XC XC interface (apiXC.h) * \ingroup XC_CORE XC is used for: - 1. video display - support input source as VGA, ATV, CVBS, S-video, YPbPr, SCART, HDMI, DTV, MM - support output as main window, sub window, CVBS out - suoport crop, scaling video to any size and position for display - 2. 3D support - support 3D input format as frame packing, field alternative, line alternative, side by side, top bottom, checker board, frame alternative - support 3D output format as line alternative, top bottom, side by side, frame alternative, checker board, pixel alternative, only L frame, only R frame - support normal 2D convert to 3D - 3. mirror mode spoort - support H mirror, V mirror, and H+V mirror - 4. frame rate convert and output timing control - 5. OSDC timing control - support for video and OSD seperate transfer with VB1 Operation Code Flow: \n check flow chart directly. \image html apiXC_code_follow.png * \defgroup XC_INIT XC init control * \ingroup XC *! \defgroup XC_INFO XC Infomation pool * \ingroup XC *! \defgroup XC_TIMING_DETECT XC Timing detect * \ingroup XC *! \defgroup XC_MUX XC mux and path setting * \ingroup XC *! \defgroup XC_SCALER XC scaler function * \ingroup XC *! \defgroup XC_FRC XC embedded FRC function * \ingroup XC *! \defgroup XC_3D XC 3D function * \ingroup XC *! \defgroup XC_DS XC DS function * \ingroup XC *! \defgroup XC_PQ XC PQ related function * \ingroup XC *! \defgroup XC_LD XC Local Dimming function * \ingroup XC *! \defgroup XC_OSD XC OSD related function * \ingroup XC *! \defgroup XC_VE XC VE function * \ingroup XC *! \defgroup XC_DISPLAY XC display function * \ingroup XC *! \defgroup XC_GAMMA XC gamma function * \ingroup XC *! \defgroup XC_TEST_PATTERN XC test pattern * \ingroup XC *! \defgroup XC_UTILITY XC utility function * \ingroup XC *! \defgroup XC_ToBeModified XC api to be modified * \ingroup XC *! \defgroup XC_ToBeRemove XC api to be removed * \ingroup XC */ #ifndef _API_XC_H_ #define _API_XC_H_ #include "MsDevice.h" // Driver #include "drvXC_IOPort.h" #include "UFO.h" //? SYMBOL_WEAK defined here , but cause SN compile error //#include "MsCommon.h" #ifdef __cplusplus extern "C" { #endif #ifdef MVIDEO_C #define INTERFACE #else #define INTERFACE extern #endif //------------------------------------------------------------------------------------------------- // Macro and Define //------------------------------------------------------------------------------------------------- //------------------------------------------------------------------------------------------------- // This macro defined in mscommon.h originally, here just for avoid SN compile error //------------------------------------------------------------------------------------------------- #ifdef MSOS_TYPE_LINUX_KERNEL #define SYMBOL_WEAK #else #define SYMBOL_WEAK __attribute__((weak)) #endif // library information #define MSIF_XC_LIB_CODE {'X','C','_','_'} #define MSIF_XC_LIBVER {'0','9'} #define MSIF_XC_BUILDNUM {'1','0'} #define MSIF_XC_CHANGELIST {'0','0','7','0','9','8','0','1'} #define XC_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_XC_LIB_CODE , /* IP__ */ \ MSIF_XC_LIBVER , /* 0.0 ~ Z.Z */ \ MSIF_XC_BUILDNUM , /* 00 ~ 99 */ \ MSIF_XC_CHANGELIST, /* CL# */ \ MSIF_OS #define XC_INITDATA_VERSION 1 #define XC_OUTPUT_TIMING_ADJUST_VERSION 1 /// PANEL_INFO_EX version of current XC lib #define PANEL_INFO_EX_VERSION 2 /// hw 2d to 3d para version #define HW2DTO3DPARA_VERSION 2 /// 3d detect format para version #define DETECT3DFORMATPARA_VERSION 1 /// ApiStatusEX version of current XC lib /// Define below to distinguish from API_PNLSTATUS_EX_VERSION #if defined(UFO_PUBLIC_HEADER_300) #define API_XCSTATUS_EX_VERSION 4 #elif defined(UFO_PUBLIC_HEADER_500_3) || defined(UFO_PUBLIC_HEADER_212) #define API_XCSTATUS_EX_VERSION 5 #else #define API_XCSTATUS_EX_VERSION 9 #endif #define API_STATUS_EX_VERSION API_XCSTATUS_EX_VERSION /// 3d fp info version of current XC lib #define XC_3D_FPINFOPARA_VERSION 1 /// report pixel info version of current XC lib #define XC_REPORT_PIXELINFO_VERSION 1 /// OPTEE structure version #define XC_OPTEE_HANDLER_VERSION 1 #if defined(UFO_PUBLIC_HEADER_500_3) || defined(UFO_PUBLIC_HEADER_300) #define API_XCDS_INFO_VERSION 4 #else #define API_XCDS_INFO_VERSION 3 #endif #define API_DS_INFO_VERSION API_XCDS_INFO_VERSION /// osdc disp info version of current XC lib #define ODSC_DISPINFO_VERSIN 1 #define XC_INVALID_HEAP_ID 0xFFFFFFFF #define MAX_FRC_TABLE_INDEX 10 #define _BIT(_bit_) (1 << (_bit_)) //---------------------------- // Return value //---------------------------- /// XC Return Value typedef enum { E_APIXC_RET_FAIL = 0, ///Not using it by now #define XC_DBGLEVEL_MUX (0x0008) ///< Mux / Path Creation #define XC_DBGLEVEL_MODEPARSE (0x0010) ///< Mode Parse ======>Not using it by now #define XC_DBGLEVEL_HDMIMONITOR (0x0020) ///< HDMI and Package Monitor ===>Not using it by now #define XC_DBGLEVEL_AUTOGEOMETRY (0x0040) ///< Auto Geometry / Auto Calibration #define XC_DGBLEVEL_CROPCALC (0x0080) ///< Crop Window / Memory / OPM / IPM calculation #define XC_DBGLEVEL_SETTIMING_ISR (0x0100) ///< ISR / SetPanelTiming #define XC_DBGLEVEL_DWIN_SETWINDOW (0x0200) ///< DWIN / Set Window #define XC_DBGLEVEL_FUNCTION_TRACE (0x0400) ///< Trace XC function using status #define XC_DBGLEVEL_PARAMETER_TRACE (0x0800) ///< Trace XC function parameter #define XC_DBGLEVEL_SEAMLESSZAP (0x1000) ///< Seamless Zapping #define XC_DBGLEVEL_ATVTiming (0x2000) ///< Seamless Trace ATV Timing //---------------------------- // Input signal detect //---------------------------- #define XC_MD_VSYNC_POR_BIT _BIT(0) ///< VSnc polarity bit(0/1 = positive/negative) #define XC_MD_HSYNC_POR_BIT _BIT(1) ///< HSync polarity bit(0/1 = positive/negative) #define XC_MD_HSYNC_LOSS_BIT _BIT(2) ///< HSync loss bit #define XC_MD_VSYNC_LOSS_BIT _BIT(3) ///< VSync loss bit #define XC_MD_INTERLACE_BIT _BIT(4) ///< Interlace mode #define XC_MD_USER_MODE_BIT _BIT(7) ///< User new mode (Not found in mode table) #define XC_MD_SYNC_LOSS (XC_MD_HSYNC_LOSS_BIT | XC_MD_VSYNC_LOSS_BIT) ///< VSync & HSync loss bit //---------------------------- // 3D macros //---------------------------- #define DOUBLEHD_PRESCALE_VONEHDSIZE (540) #define DOUBLEHD_1080X2I_FRAME_VSIZE (1080) #define DOUBLEHD_1080X2I_FIELD_VSIZE (540) #define DOUBLEHD_1080X2I_HSIZE (1920) #define DOUBLEHD_1080X2I_VACT_SPACE1 (23) #define DOUBLEHD_1080X2I_VACT_SPACE2 (22) #define DOUBLEHD_1080X2I_VSIZE (DOUBLEHD_1080X2I_FRAME_VSIZE*2+DOUBLEHD_1080X2I_VACT_SPACE1*2+DOUBLEHD_1080X2I_VACT_SPACE2) #define DOUBLEHD_1080X2I_50_VACT_SPACE1 (85) // not sure spec #define DOUBLEHD_1080X2I_50_VACT_SPACE2 (85) // not sure spec #define DOUBLEHD_1080X2I_50_VSIZE (DOUBLEHD_1080X2I_FRAME_VSIZE*2+DOUBLEHD_1080X2I_50_VACT_SPACE1*2+DOUBLEHD_1080X2I_50_VACT_SPACE1) #define DOUBLEHD_576X2I_FRAME_VSIZE (576) #define DOUBLEHD_576X2I_FIELD_VSIZE (288) #if defined(UFO_PUBLIC_HEADER_212) ||defined(UFO_PUBLIC_HEADER_500_3) ||defined(UFO_PUBLIC_HEADER_700) #define DOUBLEHD_576X2I_HSIZE (720) #else #define DOUBLEHD_576X2I_HSIZE (1440) #endif #define DOUBLEHD_576X2I_VACT_SPACE1 (25) #define DOUBLEHD_576X2I_VACT_SPACE2 (24) #define DOUBLEHD_576X2I_VSIZE (DOUBLEHD_576X2I_FRAME_VSIZE*2+DOUBLEHD_576X2I_VACT_SPACE1*2+DOUBLEHD_576X2I_VACT_SPACE2) #define DOUBLEHD_480X2I_FRAME_VSIZE (480) #define DOUBLEHD_480X2I_FIELD_VSIZE (240) #if defined(UFO_PUBLIC_HEADER_212) ||defined(UFO_PUBLIC_HEADER_500_3) ||defined(UFO_PUBLIC_HEADER_700) #define DOUBLEHD_480X2I_HSIZE (720) #else #define DOUBLEHD_480X2I_HSIZE (1440) #endif #define DOUBLEHD_480X2I_VACT_SPACE1 (23) #define DOUBLEHD_480X2I_VACT_SPACE2 (22) #define DOUBLEHD_480X2I_VSIZE (DOUBLEHD_480X2I_FRAME_VSIZE*2+DOUBLEHD_480X2I_VACT_SPACE1*2+DOUBLEHD_480X2I_VACT_SPACE2) #define DOUBLEHD_1080X2P_VSIZE (2205) #define DOUBLEHD_1080X2P_FRAME_VSIZE (1080) #define DOUBLEHD_1080X2P_HSIZE (1920) #define DOUBLEHD_1080X2P_GARBAGE_VSIZE (45) #define DOUBLEHD_720X2P_VSIZE (1470) #define DOUBLEHD_720X2P_FRAME_VSIZE (720) #define DOUBLEHD_720X2P_HSIZE (1280) #define DOUBLEHD_720X2P_GARBAGE_VSIZE (30) #define DOUBLEHD_576X2P_VSIZE (1201) #define DOUBLEHD_576X2P_FRAME_VSIZE (576) #define DOUBLEHD_576X2P_HSIZE (720) #define DOUBLEHD_576X2P_GARBAGE_VSIZE (49) //720X480p #define DOUBLEHD_480X2P_VSIZE (1005) #define DOUBLEHD_480X2P_FRAME_VSIZE (480) #define DOUBLEHD_480X2P_HSIZE (720) #define DOUBLEHD_480X2P_GARBAGE_VSIZE (45) //640X480p #define DOUBLEHD_640_480X2P_VSIZE (1005) #define DOUBLEHD_640_480X2P_FRAME_VSIZE (480) #define DOUBLEHD_640_480X2P_HSIZE (640) #define DOUBLEHD_640_480X2P_GARBAGE_VSIZE (45) #define DOUBLEHD_288X2P_VSIZE (600) #define DOUBLEHD_288X2P_FRAME_VSIZE (288) #define DOUBLEHD_288X2P_HSIZE (1440) #define DOUBLEHD_288X2P_GARBAGE_VSIZE (24) #define DOUBLEHD_240X2P_VSIZE (502) #define DOUBLEHD_240X2P_FRAME_VSIZE (240) #define DOUBLEHD_240X2P_HSIZE (1440) #define DOUBLEHD_240X2P_GARBAGE_VSIZE (22) #define DOUBLEHD_240X2P_1_VSIZE (503) #define DOUBLEHD_240X2P_1_FRAME_VSIZE (240) #define DOUBLEHD_240X2P_1_HSIZE (1440) #define DOUBLEHD_240X2P_1_GARBAGE_VSIZE (23) // Field Interleave #define FIELD_INTERLEAVE_1080X2I_FRAME_VSIZE (1080) #define FIELD_INTERLEAVE_1080X2I_FIELD_VISZE (540) #define FIELD_INTERLEAVE_1080X2I_HISZE (1920) #define FIELD_INTERLEAVE_1080X2I_VACT_SPACE (23) #define FIELD_INTERLEAVE_1080X2I_VISZE (FIELD_INTERLEAVE_1080X2I_FRAME_VSIZE+FIELD_INTERLEAVE_1080X2I_VACT_SPACE) #define FIELD_INTERLEAVE_576X2I_FRAME_VSIZE (576) #define FIELD_INTERLEAVE_576X2I_FIELD_VISZE (288) #define FIELD_INTERLEAVE_576X2I_HISZE (1440) #define FIELD_INTERLEAVE_576X2I_VACT_SPACE (25) #define FIELD_INTERLEAVE_576X2I_VISZE (FIELD_INTERLEAVE_576X2I_FRAME_VSIZE+FIELD_INTERLEAVE_576X2I_VACT_SPACE) #define FIELD_INTERLEAVE_480X2I_FRAME_VSIZE (480) #define FIELD_INTERLEAVE_480X2I_FIELD_VISZE (240) #define FIELD_INTERLEAVE_480X2I_HISZE (1440) #define FIELD_INTERLEAVE_480X2I_VACT_SPACE (23) #define FIELD_INTERLEAVE_480X2I_VISZE (FIELD_INTERLEAVE_480X2I_FRAME_VSIZE+FIELD_INTERLEAVE_480X2I_VACT_SPACE) ///< When disable panel_info_ex, this means disable all valid panel info #define PANEL_INFO_EX_INVALID_ALL 0xFFFF //------------------------------------------------------------------------------------------------- // Type and Structure //------------------------------------------------------------------------------------------------- #if defined(UFO_PUBLIC_HEADER_700) INTERFACE void* pu32XC_Kernel_Inst; #endif //---------------------------- // Common //---------------------------- /// Define mute type #ifdef UFO_XC_FORCEWRITE_V2 typedef enum { E_BACKEND_MUTE = 1, ///< Backend mute E_MUTE_MAX }EN_MUTE_TYPE; #else typedef enum { E_MAIN_WINDOW_MUTE =0, ///< main window mute E_SUB_WINDOW_MUTE =1, ///< sub window mute E_PANEL_MUTE = 2 ///< panel mute }EN_MUTE_TYPE; #endif typedef enum { E_XC_FB_LEVEL_FB, // frame buff mode E_XC_FB_LEVEL_FBL, // same as fbl,not use miu E_XC_FB_LEVEL_RFBL_DI, // use miu to deinterlace E_XC_FB_LEVEL_NUM, // number } E_XC_FB_LEVEL; /// Define window type typedef enum { MAIN_WINDOW=0, ///< main window if with PIP or without PIP SUB_WINDOW=1, ///< sub window if PIP MAX_WINDOW /// The max support window }SCALER_WIN; #define PIP_WINDOWS MAX_WINDOW /// Define Window position and size attribute typedef struct __attribute__((packed)) { MS_U16 x; ///=INPUT_SOURCE_CVBS)&&((x)<=INPUT_SOURCE_CVBS_MAX))/// x is AV #define IsSrcTypeSV(x) (((x)>=INPUT_SOURCE_SVIDEO)&&((x)<=INPUT_SOURCE_SVIDEO_MAX))///< x is SV #define IsSrcTypeATV(x) ((x)==INPUT_SOURCE_TV)///< x is ATV #define IsSrcTypeScart(x) (((x)>=INPUT_SOURCE_SCART)&&((x)<=INPUT_SOURCE_SCART_MAX))///< x is Scart #define IsSrcTypeHDMI(x) (((x)>=INPUT_SOURCE_HDMI)&&((x)<=INPUT_SOURCE_HDMI_MAX))///< x is HDMI #define IsSrcTypeVga(x) (((x)==INPUT_SOURCE_VGA) || ((x)==INPUT_SOURCE_VGA2) || ((x)==INPUT_SOURCE_VGA3))///< x is VGA #define IsSrcTypeYPbPr(x) (((x)>=INPUT_SOURCE_YPBPR)&&((x)<=INPUT_SOURCE_YPBPR_MAX))///< x is YPbPr #define IsSrcTypeDTV(x) (((x)==INPUT_SOURCE_DTV) || ((x)==INPUT_SOURCE_DTV2) || ((x)==INPUT_SOURCE_DTV3))///< x is DTV #define IsSrcTypeDVI(x) (((x)>=INPUT_SOURCE_DVI)&&((x)<=INPUT_SOURCE_DVI_MAX))///< x is DVI #define IsSrcTypeJpeg(x) ((x)==INPUT_SOURCE_JPEG)///< x is JPEG #define IsSrcTypeStorage(x) (((x)==INPUT_SOURCE_STORAGE) || ((x)==INPUT_SOURCE_STORAGE2) ||IsSrcTypeJpeg(x))///< x is Storage #define IsSrcTypeDigitalVD(x) ( IsSrcTypeAV(x)||IsSrcTypeSV(x)||IsSrcTypeATV(x)||IsSrcTypeScart(x))///< x is VD #define IsSrcTypeAnalog(x) ( IsSrcTypeVga(x)|| IsSrcTypeYPbPr(x))///< x is Analog #define IsSrcTypeVideo(x) ( IsSrcTypeYPbPr(x) || IsSrcTypeATV(x) || IsSrcTypeAV(x) || IsSrcTypeSV(x) || IsSrcTypeScart(x) || IsSrcTypeDTV(x) ) ///< x is Video #define IsSrcTypeCapture(x) ((x)==INPUT_SOURCE_SCALER_OP)///< x is scaler OP //////////////////////////////////////////////////////////////////////////////// // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!! // This is abstract output source for XC library. If you want to add another one. // Please contace with XC member //////////////////////////////////////////////////////////////////////////////// /// Define output type typedef enum { OUTPUT_NONE = 0, /// osd layer 0 -> osd layer 1 -> osd layer 2 -> osd layer 3 -> osd layer 4 E_VIDEO_ON_OSD_LAYER_0 = 1, ///< osd layer 0 -> video -> osd layer 1 -> osd layer 2 -> osd layer 3 -> osd layer 4 E_VIDEO_ON_OSD_LAYER_1 = 2, ///< osd layer 0 -> osd layer 1 -> video -> osd layer 2 -> osd layer 3 -> osd layer 4 E_VIDEO_ON_OSD_LAYER_2 = 3, ///< osd layer 0 -> osd layer 1 -> osd layer 2 -> video -> osd layer 3 -> osd layer 4 E_VIDEO_ON_OSD_LAYER_3 = 4, ///< osd layer 0 -> osd layer 1 -> osd layer 2 -> osd layer 3 -> video -> osd layer 4 E_VIDEO_ON_OSD_LAYER_4 = 5, ///< osd layer 0 -> osd layer 1 -> osd layer 2 -> osd layer 3 -> osd layer 4 -> video E_VIDEO_ON_OSD_LAYER_NUM, } E_VIDEO_ON_OSD_LAYER; /// Define panel information typedef struct __attribute__((packed)) { // XC need below information do to frame lock MS_U16 u16HStart; /// MSB /// OP (32bits) -> IP (32bits) /// [7:0] [15:8] [23:16] [31:24] /// Data_L Data_H Reg_Addr(16bit) Reg_Bank /// /// 16 bit alignment /// LSB ----> MSB /// OP (32bits) -> IP (32bits) -> 0xFFFFFFFF, 0xFFFFFFFF (dummy) /// /// If bIP_DS_On == FALSE, the DS will ignore the IP information /// If bOP_DS_On == FALSE, the DS will ignore the OP information typedef struct DLL_PACKED { MS_PHY u32DS_Info_BaseAddr; ///< The memory base address to update IP/OP dynamic scaling registers. Absolute without any alignment. MS_U8 u8MIU_Select; ///< 0: MIU0, 1: MIU1, etc. MS_U8 u8DS_Index_Depth; ///< The index depth (how many entries to fire per MVOP Vsync falling) of DS MS_BOOL bOP_DS_On; ///< OP dynamic scaling on/off MS_BOOL bIPS_DS_On; ///< IPS dynamic scaling on/off MS_BOOL bIPM_DS_On; ///< IPM dynamic scaling on/off } XC_DynamicScaling_Info; /// Define source type for DIP typedef enum { SCALER_DIP_SOURCE_TYPE_SUB2 = 0, ///< DIP from SUB2(IP_F3) SCALER_DIP_SOURCE_TYPE_MAIN = 1, ///< DIP from MAIN(IP_MAIN) SCALER_DIP_SOURCE_TYPE_SUB = 2, ///< DIP from SUB (IP_SUB) SCALER_DIP_SOURCE_TYPE_OP_MAIN = 3, ///< HVSP MAIN SCALER_DIP_SOURCE_TYPE_OP_SUB = 4, ///< HVSP SUB SCALER_DIP_SOURCE_TYPE_DRAM = 5, ///< DIP from DRAM SCALER_DIP_SOURCE_TYPE_OP_CAPTURE = 6, ///< DIP from OP capture SCALER_DIP_SOURCE_TYPE_OSD = 7, ///< DIP from OSD capture SCALER_DIP_SOURCE_TYPE_SC2_OP_CAPTURE = 8, ///< DIP from SC2 OP capture SCALER_DIP_SOURCE_TYPE_OP_SC1_CAPTURE = 9, ///< DIP from OP SC1 capture #if defined (UFO_PUBLIC_HEADER_212) ||defined (UFO_PUBLIC_HEADER_500_3) ||defined (UFO_PUBLIC_HEADER_700) SCALER_DIP_SOURCE_TYPE_MVOP0 =10, ///< DIP from MVOP0 capture SCALER_DIP_SOURCE_TYPE_MVOP1 =11, ///< DIP from MVOP1 capture #else SCALER_DIP_SOURCE_TYPE_VE_CAPTURE = 10, ///< DIP from SC1 OP capture SCALER_DIP_SOURCE_TYPE_MVOP0 =11, ///< DIP from MVOP0 capture SCALER_DIP_SOURCE_TYPE_MVOP1 =12, ///< DIP from MVOP1 capture #endif MAX_SCALER_DIP_SOURCE_NUM ///< The max support window }SCALER_DIP_SOURCE_TYPE; /// Define the path type typedef enum { PATH_TYPE_SYNCHRONOUS, ///= 9 MS_U16 u16PanelInterfaceType; ///< Panel Type #endif #endif }XC_ApiStatusEx; /// XC API status typedef struct DLL_PACKED { MS_U32 u32ApiStatusEx_Version; ///50,30-->60,24-->48,50-->100,60-->120----FRC 1:2 E_XC_3D_OUTPUT_FRAME_L, E_XC_3D_OUTPUT_FRAME_R, E_XC_3D_OUTPUT_FRAME_ALTERNATIVE_NOFRC, //50->50, 60->60-------------------------------FRC 1:1 E_XC_3D_OUTPUT_CHECKBOARD_HW, //for hw 2d to 3d use E_XC_3D_OUTPUT_LINE_ALTERNATIVE_HW, //for hw 2d to 3d use E_XC_3D_OUTPUT_PIXEL_ALTERNATIVE_HW, //for hw 2d to 3d use E_XC_3D_OUTPUT_FRAME_L_HW, //for hw 2d to 3d use E_XC_3D_OUTPUT_FRAME_R_HW, //for hw 2d to 3d use E_XC_3D_OUTPUT_FRAME_ALTERNATIVE_HW, //for hw 2d to 3d use E_XC_3D_OUTPUT_TOP_BOTTOM_HW, //for hw 2d to 3d use, it based on E_XC_3D_OUTPUT_TOP_BOTTOM implement E_XC_3D_OUTPUT_SIDE_BY_SIDE_HALF_HW, //for hw 2d to 3d use, it based on E_XC_3D_OUTPUT_SIDE_BY_SIDE_HALF implement E_XC_3D_OUTPUT_FRAME_PACKING, E_XC_3D_OUTPUT_FRAME_ALTERNATIVE_LLRR,//for 4k0.5k@240 3D E_XC_3D_OUTPUT_FRAME_ALTERNATIVE_LLRR_HW,//for HW 2Dto3D 4k0.5k@240 3D E_XC_3D_OUTPUT_TOP_TOP, E_XC_3D_OUTPUT_BOTTOM_BOTTOM, E_XC_3D_OUTPUT_LEFT_LEFT, E_XC_3D_OUTPUT_RIGHT_RIGHT, } E_XC_3D_OUTPUT_MODE; typedef enum { E_XC_3D_OUTPUT_FI_MODE_NONE , E_XC_3D_OUTPUT_FI_1920x1080 , E_XC_3D_OUTPUT_FI_960x1080 , E_XC_3D_OUTPUT_FI_1920x540 , E_XC_3D_OUTPUT_FI_1280x720 , } E_XC_3D_OUTPUT_FI_MODE; typedef enum { E_XC_3D_AUTODETECT_SW, E_XC_3D_AUTODETECT_HW, E_XC_3D_AUTODETECT_HW_COMPATIBLE, E_XC_3D_AUTODETECT_MAX }E_XC_3D_AUTODETECT_METHOD; typedef enum { E_XC_3D_PANEL_NONE, E_XC_3D_PANEL_SHUTTER, //240hz panel, which can process updown, leftright,vertical or horizontal line weave E_XC_3D_PANEL_PELLICLE, //120hz panel, which can only process horizontal line weave E_XC_3D_PANEL_4K1K_SHUTTER, //120hz 4K1K panel, which can process updown, leftright,vertical or horizontal line weave E_XC_3D_PANEL_MAX, } E_XC_3D_PANEL_TYPE; //hw 2d to 3d para typedef struct __attribute__((packed)) { MS_U32 u32Hw2dTo3dPara_Version; MS_U16 u16Concave; MS_U16 u16Gain; MS_U16 u16Offset; MS_U16 u16ArtificialGain; MS_U16 u16EleSel; MS_U16 u16ModSel; MS_U16 u16EdgeBlackWidth; } MS_XC_3D_HW2DTO3D_PARA; //detect 3d format para typedef struct DLL_PACKED { MS_U32 u32Detect3DFormatPara_Version; //version control, back compatible //////////////////obsolete field begin/////////////////////////////////////////////////////////////////////////////////////////////////////////// MS_U16 u16HorSearchRange; //the horizontal range for find the similar pixel at R image MS_U16 u16VerSearchRange; //the vertical range for find the similar pixel at R image MS_U16 u16GYPixelThreshold; //g/y pixel threshold for define the similar pixel MS_U16 u16RCrPixelThreshold; //r/cr pixel threshold for define the similar pixel MS_U16 u16BCbPixelThreshold; //b/cb pixel threshold for define the similar pixel MS_U16 u16HorSampleCount; //the horizontal sample count, the total checked pixel will be u16HorSampleCount*u16VerSampleCount MS_U16 u16VerSampleCount; //the vertical sample count, the total checked pixel will be u16HorSampleCount*u16VerSampleCount MS_U16 u16MaxCheckingFrameCount; //the max checking frame count MS_U16 u16HitPixelPercentage; //the percentage about hit pixel in one frame total checked pixel, for example: 70%, need set as 70 //////////////////obsolete field end///////////////////////////////////////////////////////////////////////////////////////////////////////////// MS_BOOL bEnableOverscan; //detect 3d format for considering overscan shift } MS_XC_3D_DETECT3DFORMAT_PARA; //define 3d fp info para typedef struct DLL_PACKED { MS_U32 u32FPInfoPara_Version; //version control, back compatible MS_U16 u16HBlank; //horizontal blank MS_BOOL bEnableUserSetting; //enable user setting } MS_XC_3D_FPINFO_PARA; typedef enum { DBG_FPLL_MODE_DISABLE_ALL = 0, DBG_FPLL_MODE_DISABLE = 1, DBG_FPLL_MODE_ENABLE = 2, DBG_FPLL_MODE_MAX, }EN_FPLL_DBG_MODE;//For debug purpose only! typedef enum { DBG_FPLL_FLAG_PHASELIMIT = 0, DBG_FPLL_FLAG_D5D6D7 = 1, DBG_FPLL_FLAG_IGAIN = 2, DBG_FPLL_FLAG_PGAIN = 3, DBG_FPLL_FLAG_INITSETSTEP = 4, DBG_FPLL_FLAG_INITSETDELAY= 5, DBG_FPLL_FLAG_MAX, }EN_FPLL_DBG_FLAG;//For debug purpose only! typedef enum { E_FPLL_MODE_DISABLE_ALL = 0, /// Disable all current FPLL customer setting(then scaler will auto decide it) E_FPLL_MODE_DISABLE = 1, /// Disable the specified(by other function parameter) FPLL customer setting E_FPLL_MODE_ENABLE = 2, /// Enable the specified(by other function parameter) FPLL customer setting E_FPLL_MODE_MAX, }EN_FPLL_MODE; typedef enum { E_FPLL_FLAG_PHASELIMIT = 0, ///Set customer setting of PHASE limit E_FPLL_FLAG_D5D6D7 = 1,///Set customer setting of D5D6D7 limit E_FPLL_FLAG_IGAIN = 2,///Set customer setting of IGAIN E_FPLL_FLAG_PGAIN = 3,///Set customer setting of PGAIN E_FPLL_FLAG_INITSETSTEP = 4, ///steps to set DCLK E_FPLL_FLAG_INITSETDELAY= 5, ///delay between steps when setting DCLK E_FPLL_FLAG_MAX, }EN_FPLL_FLAG; typedef enum { E_MLOAD_UNSUPPORTED = 0, E_MLOAD_DISABLED = 1, E_MLOAD_ENABLED = 2, }MLOAD_TYPE; typedef enum { E_MLCLIENT_MAIN_HDR = 0, E_MLCLIENT_MAX, }EN_MLOAD_CLIENT_SELECT; typedef enum { E_MLG_UNSUPPORTED = 0, E_MLG_DISABLED = 1, E_MLG_ENABLED = 2, }MLG_TYPE; typedef enum { HDMI_SYNC_DE, HDMI_SYNC_HV, } E_HDMI_SYNC_TYPE; typedef enum { MS_FRC_1_1 = 0, MS_FRC_1_2 = 1, MS_FRC_5_12 = 2, MS_FRC_2_5 = 3, MS_FRC_1_4 = 4, MS_FRC_1_3 = 5, MS_FRC_2_1 = 8, MS_FRC_4_5 = 9, } MS_FRC_TYPE; // scaler FRC table typedef struct __attribute__((packed)) { MS_U16 u16LowerBound; MS_U16 u16HigherBound; MS_U8 u8Padding; MS_U8 u8FRC_In; // ivs MS_U8 u8FRC_Out; // ovs MS_FRC_TYPE eFRC_Type; } SC_FRC_SETTING; typedef enum { E_PQ_IOCTL_GET_HSD_SAMPLING, E_PQ_IOCTL_MAX, }E_PQ_IOCTL_FLAG; typedef enum { E_GET_PIXEL_RET_FAIL = 0, /// valid, valid -> none) SC_INT_F1_CSOG, SC_INT_F2_RESERVED2, // scaler dosen't have this interrupt now, before is SC_INT_F2_ATS_READY SC_INT_F1_RESERVED2, // scaler dosen't have this interrupt now, before is SC_INT_F1_ATS_READY SC_INT_F2_ATP_READY, // auto phase ready interrupt SC_INT_F1_ATP_READY, SC_INT_F2_RESERVED3, // scaler dosen't have this interrupt now, before is SC_INT_F2_ATG_READY SC_INT_F1_RESERVED3, // scaler dosen't have this interrupt now, before is SC_INT_F1_ATG_READY MAX_SC_INT, } SC_INT_SRC; typedef enum { // 0x00, first 4 bits are unused XC_INT_RESERVED1 = 4, ///< scaler dosen't have this interrupt now XC_INT_VSINT, ///< output Vsync interrupt XC_INT_F2_VTT_CHG, ///< main window, HDMI mute or Vsync polarity changed, Vtt change exceed BK1_1D[11:8] XC_INT_F1_VTT_CHG, XC_INT_F2_VS_LOSE, ///< didn't received Vsync for a while or Vtt count BK1_1F[10:0] exceed max value XC_INT_F1_VS_LOSE, XC_INT_F2_JITTER, ///< H/V start/end didn't be the same with privous value, usually used in HDMI/DVI input XC_INT_F1_JITTER, XC_INT_F2_IPVS_SB, ///< input V sync interrupt XC_INT_F1_IPVS_SB, XC_INT_F2_IPHCS_DET, ///< input H sync interrupt XC_INT_F1_IPHCS_DET, // 0x10 XC_INT_PWM_RP_L_INT, ///< pwm rising edge of left frame, please use MDrv_XC_InterruptAvaliable() to check if avalible or not XC_INT_PWM_FP_L_INT, ///< pwm falling edge of left frame, please use MDrv_XC_InterruptAvaliable() to check if avalible or not XC_INT_F2_HTT_CHG, ///< Hsync polarity changed or Hperiod change exceed BK1_1D[5:0] XC_INT_F1_HTT_CHG, XC_INT_F2_HS_LOSE, ///< didn't received H sync for a while or Hperiod count BK1_20[13:0] exceed max value XC_INT_F1_HS_LOSE, XC_INT_PWM_RP_R_INT, ///< pwm rising edge of right frame, please use MDrv_XC_InterruptAvaliable() to check if avalible or not XC_INT_PWM_FP_R_INT, ///< pwm falling edge of right frame, please use MDrv_XC_InterruptAvaliable() to check if avalible or not XC_INT_F2_CSOG, ///< composite sync or SoG input signal type changed (for example, SoG signal from none -> valid, valid -> none) XC_INT_F1_CSOG, XC_INT_F2_RESERVED2, ///< scaler dosen't have this interrupt now XC_INT_F1_RESERVED2, XC_INT_F2_ATP_READY, ///< auto phase ready interrupt XC_INT_F1_ATP_READY, XC_INT_F2_RESERVED3, ///< scaler dosen't have this interrupt now XC_INT_F1_RESERVED3, } XC_INT_SRC; /// OP2 Video/GOP layer switch typedef enum { E_VOP_LAYER_VIDEO_MUX1_MUX2 = 0, ///<0: Video->GOP1->GOP2 (GOP2 is one pipe later than GOP1) E_VOP_LAYER_FRAME_VIDEO_MUX1_MUX2, ///<1: FrameColor->Video->GOP1->GOP2 (GOP1/GOP2 smae pipe) E_VOP_LAYER_FRAME_VIDEO_MUX2_MUX1, ///<2: FrameColor->Video->GOP2->GOP1 (GOP1/GOP2 smae pipe) E_VOP_LAYER_FRAME_MUX1_VIDEO_MUX2, ///<3: FrameColor->GOP1->Video->GOP2 (GOP1/GOP2 smae pipe) E_VOP_LAYER_FRAME_MUX1_MUX2_VIDEO, ///<4: FrameColor->GOP1->GOP2->Video (GOP1/GOP2 smae pipe) E_VOP_LAYER_FRAME_MUX2_VIDEO_MUX1, ///<5: FrameColor->GOP2->Video->GOP1 (GOP1/GOP2 smae pipe) E_VOP_LAYER_FRAME_MUX2_MUX1_VIDEO, ///<6: FrameColor->GOP2->GOP1->Video (GOP1/GOP2 smae pipe) E_VOP_LAYER_VIDEO_MUX1_MUX2_MUX3_MUX4 = E_VOP_LAYER_VIDEO_MUX1_MUX2, /// Video->GOP1->GOP2->GOP3->GOP4 (GOP2 is one pipe later than GOP1) E_VOP_LAYER_FRAME_VIDEO_MUX1_MUX2_MUX3_MUX4 = 7, /// FrameColor->Video->GOP1->GOP2->GOP3->GOP4 (GOP1/GOP2/GOP3/GOP4 smae pipe) E_VOP_LAYER_FRAME_MUX1_VIDEO_MUX2_MUX3_MUX4 = E_VOP_LAYER_FRAME_MUX1_VIDEO_MUX2, /// FrameColor->GOP1->Video->GOP2->GOP3->GOP4 (GOP1/GOP2/GOP3/GOP4 smae pipe) E_VOP_LAYER_FRAME_MUX1_MUX2_VIDEO_MUX3_MUX4 = E_VOP_LAYER_FRAME_MUX1_MUX2_VIDEO, /// FrameColor->GOP1->GOP2->Video->GOP3->GOP4 (GOP1/GOP2/GOP3/GOP4 smae pipe) E_VOP_LAYER_FRAME_MUX1_MUX2_MUX3_VIDEO_MUX4 = 8, /// FrameColor->GOP1->GOP2->GOP3->Video->GOP4 (GOP1/GOP2/GOP3/GOP4 smae pipe) E_VOP_LAYER_FRAME_MUX1_MUX2_MUX3_MUX4_VIDEO = 9, E_VOP_LAYER_RESERVED, } E_VOP_OSD_LAYER_SEL; /// OP2VOP de select typedef enum { E_OP2VOPDE_MAINWINDOW = 0, ///<0: capture main display window, no osd E_OP2VOPDE_SUBWINDOW, ///<1: capture sub display window, no osd E_OP2VOPDE_WHOLEFRAME, ///<2: Whole frame of panel DE, no osd E_OP2VOPDE_WHOLEFRAME_WITHOSD, ///<3: Whole frame of panel DE, with osd } E_OP2VOP_DE_SEL; typedef void (*SC_InterruptCb) (SC_INT_SRC enIntNum, void *pParam); ///< Interrupt callback function //Define Output Frame control typedef struct DLL_PACKED { MS_U32 u32XC_version; /// R 7:5, G 4:2, B 1:0 /// @param eWindow \b IN: The window which need to be set. //------------------------------------------------------------------------------------------------- void MApi_XC_SetDispWindowColor(MS_U8 u8Color, SCALER_WIN eWindow); //------------------------------------------------------------------------------------------------- /// Query the capability of scaler about source to Video encoder(VE) /// @ingroup XC_VE /// @param OutputCapability \b OUT: Which part of scaler can output data to Video Encoder (VE). ///Check E_XC_SOURCE_TO_VE for capability bit. Take an example, if bit0 of OutputCapability equal to 1, ///Scaler can output data to ve from its E_XC_IP(IP) ///@return @ref MS_BOOL True if query success. //------------------------------------------------------------------------------------------------- E_APIXC_ReturnValue MApi_XC_SupportSourceToVE(MS_U16* pOutputCapability); //------------------------------------------------------------------------------------------------- /// Enable output capture for output data to VE. Return False if current platform does not support E_XC_SOURCE_TO_VE /// Note: this source is not only for VE, but Scaler IP or DIP /// @ingroup XC_VE /// @param bEnable \b IN: Enable output capture function /// @param eSourceToVE \b IN: Specific output source. The source listed in E_XC_SOURCE_TO_VE is a "point" which can be retrieve data. //------------------------------------------------------------------------------------------------- E_APIXC_ReturnValue MApi_XC_SetOutputCapture(MS_BOOL bEnable,E_XC_SOURCE_TO_VE eSourceToVE); //------------------------------------------------------------------------------------------------- /// Setup Gamma function ON/OFF /// @ingroup XC_GAMMA /// @param bEnable \b IN: Enable or Disable //------------------------------------------------------------------------------------------------- void MApi_XC_SetGammaOnOff (MS_BOOL bEnable); //------------------------------------------------------------------------------------------------- /// Set VOP Gain for Main Window(after 3x3 before Gamma) /// @ingroup XC_GAMMA /// @param eVop_Channel \b IN: Select VOP R/G/B /// @param u16Val \b IN: Set value //------------------------------------------------------------------------------------------------- void MApi_XC_SetPreGammaGain(SCALER_WIN eWindow, MS_XC_VOP_CHANNEL_t eVop_Channel, MS_U16 u16Val); //------------------------------------------------------------------------------------------------- /// Set VOP Offset for Main Window(after 3x3 before Gamma) /// @ingroup XC_GAMMA /// @param eVop_Channel \b IN: Select VOP R/G/B /// @param u16Val \b IN: Set value //------------------------------------------------------------------------------------------------- void MApi_XC_SetPreGammaOffset(SCALER_WIN eWindow, MS_XC_VOP_CHANNEL_t eVop_Channel, MS_U16 u16Val); //------------------------------------------------------------------------------------------------- // Output timing related //------------------------------------------------------------------------------------------------- //------------------------------------------------------------------------------------------------- /// Setup panel timing (output DCLK)/FRC/FramePLL, and enable input source /// @ingroup XC_DISPLAY /// @param pTimingInfo \b IN: the information of the timing to set @ref XC_SetTiming_Info //------------------------------------------------------------------------------------------------- void MApi_XC_SetPanelTiming(XC_SetTiming_Info *pTimingInfo, SCALER_WIN eWindow); //------------------------------------------------------------------------------------------------- /// Set current output type. This is set in Panel structure. You can adjust it here. /// @ingroup XC_DISPLAY /// @param enPnl_Out_Timing_Mode \b IN: The output type //------------------------------------------------------------------------------------------------- void MApi_XC_SetOutTimingMode(E_XC_PNL_OUT_TIMING_MODE enPnl_Out_Timing_Mode); //------------------------------------------------------------------------------------------------- /// set free run display window timing /// @ingroup XC_DISPLAY /// @return void Output type. //------------------------------------------------------------------------------------------------- void MApi_XC_SetFreeRunTiming(void); //------------------------------------------------------------------------------------------------- /// Adjust V sync FrontPorch , Sync Width for specific output frame rate (You can adjust in advance by using MApi_XC_SetExPanelInfo) /// @ingroup XC_DISPLAY /// @param u16FrontPorch \b IN: Front porch of output Vsync /// @param u16SyncWidth \b IN: Sync width of output Vsync /// @param u16OutputVfreq \b IN: The output frame rate you want to adjust. /// @return MS_BOOL True: Success False : Fail //------------------------------------------------------------------------------------------------- MS_BOOL MApi_XC_Set_CustomerSyncInfo(MS_U16 u16FrontPorch, MS_U16 u16SyncWidth, MS_U16 u16OutputVfreq); //------------------------------------------------------------------------------------------------- /// Wait FPLL finished /// @ingroup XC_DISPLAY /// @return @ref MS_BOOL indicate FPLL finished or not (frame lock finished or not) //------------------------------------------------------------------------------------------------- MS_BOOL MApi_XC_WaitFPLLDone(void); //------------------------------------------------------------------------------------------------- /// Get scaler output vertical frequency /// @ingroup XC_DISPLAY /// @return @ref MS_U16 return output vertical frequency x 100 //------------------------------------------------------------------------------------------------- MS_U16 MApi_XC_GetOutputVFreqX100(void); //------------------------------------------------------------------------------------------------- /// Get scaler output vertical frequency /// @ingroup XC_DISPLAY /// @return @ref MS_U16 return output vertical frequency x 100 //------------------------------------------------------------------------------------------------- MS_U16 MApi_XC_GetOP1OutputVFreqX100(void); //------------------------------------------------------------------------------------------------- /// Frame Lock Check /// @ingroup XC_DISPLAY /// @ref MS_BOOL TURE=Frame Lock ; FALSE= Not Frame Lock //------------------------------------------------------------------------------------------------- MS_BOOL MApi_XC_FrameLockCheck(void); //------------------------------------------------------------------------------------------------- /// Set a customize FRC table into driver /// You can customize frc table in driver. The max number of FRC setting is 5 (Can be changed in driver layer). /// /// Here is an example of 5 FRC items with 6 maximal number of FRC setting. /// Please fill {0xFFFF, 0xFFFF, 1, 1, MS_FRC_1_1} at unused FRC item slot. /// /// {0, 160, 1, 4, MS_FRC_1_4}, <-- FRC item 0 /// {160, 245, 2, 5, MS_FRC_2_5}, <-- FRC item 1 /// {245, 260, 1, 2, MS_FRC_1_2}, <-- FRC item 2 /// {260, 400, 1, 2, MS_FRC_1_2}, <-- FRC item 3 /// {400, 0xFFFF, 1, 1, MS_FRC_1_1}, <-- FRC item 4 /// {0xFFFF, 0xFFFF, 1, 1, MS_FRC_1_1} <-- FRC item 5 (Unused) /// @ingroup XC_DISPLAY /// @param stFRCTable \b IN: The pointer which point to a FRC table. You can refer above description. /// if pass NULL, driver will use default frc table. /// @return @ref E_APIXC_ReturnValue Return status. //------------------------------------------------------------------------------------------------- E_APIXC_ReturnValue MApi_XC_CustomizeFRCTable(SC_FRC_SETTING* stFRCTable); //------------------------------------------------------------------------------------------------- /// Set specific in / out framerate control (Using in Box proejct only.) /// @ingroup XC_DISPLAY /// @param bEnable \b IN: TRUE: Enable ouput frame control /// @param pPanelInfoEx \b IN: The information about in / out framerate. /// @param pPanelInfoEx \b IN: The window which need to be controlled. /// @return @ref E_APIXC_ReturnValue return type. //------------------------------------------------------------------------------------------------- E_APIXC_ReturnValue MApi_XC_OutputFrameCtrl(MS_BOOL bEnable,XC_OUTPUTFRAME_Info * stOutFrameInfo,SCALER_WIN eWindow); //------------------------------------------------------------------------------------------------- /// Set the FPLL mode: /// @ingroup XC_DISPLAY /// @param bTrue \b IN: True: FSM mode, False: Non FSM mode //------------------------------------------------------------------------------------------------- void MApi_SC_Enable_FPLL_FSM(MS_BOOL bTrue); //------------------------------------------------------------------------------------------------- /// This function will force freerun in MDrv_Scaler_SetPanelTiming(), /// otherwise MDrv_Scaler_SetPanelTiming() will decide to do framelock or not by itself. /// /// Note: this function is difference with MDrv_SC_set_fpll() which is used to /// unlock framelock after MDrv_Scaler_SetPanelTiming(). /// But this function is used to affect MDrv_Scaler_SetPanelTiming()'s behavior. /// @ingroup XC_DISPLAY /// @param bEnable \b IN: TRUE: Enable force freerun. FALSE: disable force free run. //------------------------------------------------------------------------------------------------- void MApi_SC_ForceFreerun(MS_BOOL bEnable); //------------------------------------------------------------------------------------------------- /// Get Force freerun status. /// @ingroup XC_DISPLAY /// @return @ref MS_BOOL True: Current is in Force freerun mode. False: Current is not in Force Freerun mode //------------------------------------------------------------------------------------------------- MS_BOOL MApi_SC_IsForceFreerun(void); //------------------------------------------------------------------------------------------------- /// Set specific in / out framerate control (Using in Box proejct only.) /// @ingroup XC_DISPLAY /// @param bEnable \b IN: TRUE: Enable ouput frame control /// @param pPanelInfoEx \b IN: The information about in / out framerate. /// @param pPanelInfoEx \b IN: The window which need to be controlled. /// @return @ref E_APIXC_ReturnValue return type. //------------------------------------------------------------------------------------------------- void MApi_SC_SetFreerunVFreq(E_VFREQ_SEL VFreq); //------------------------------------------------------------------------------------------------- /// Set external panel info for output /// Currently, only support setting of two different vfreqs at same time /// The set ExPanelInfo will take effect after running of function MApi_XC_SetPanelTiming /// @ingroup XC_DISPLAY /// @param bEnable \b IN: TRUE: Enable this XC_PANEL_INFO_EX, FALSE: Disable this XC_PANEL_INFO_EX /// @param pPanelInfoEx \b IN: The extern panel information to set @ref XC_PANEL_INFO_EX /// @return @ref MS_BOOL TRUE: Success, FALSE: Failed //------------------------------------------------------------------------------------------------- MS_BOOL MApi_XC_SetExPanelInfo(MS_BOOL bEnable, XC_PANEL_INFO_EX *pPanelInfoEx); //------------------------------------------------------------------------------------------------- /// Set the FPLL thresh mode: /// @ingroup XC_DISPLAY /// @param bEnable \b IN: TRUE: Thresh mode, FALSE: Non-Thresh mode //------------------------------------------------------------------------------------------------- void MApi_XC_Enable_FPLL_Thresh_Mode(MS_BOOL bEnable); //------------------------------------------------------------------------------------------------- /// Get the FPLL Thresh mode: /// @ingroup XC_DISPLAY /// @return TRUE: Thresh mode, FALSE: Non-Thresh mode //------------------------------------------------------------------------------------------------- MS_BOOL MApi_XC_Get_FPLL_Thresh_Mode(void); //------------------------------------------------------------------------------------------------- /// Enable auto no signal mode /// @ingroup XC_TIMING_DETECT /// @param bEnable \b IN: True: Enable auto no signal mode. /// @eWindow \b IN: The window (main or sub) which need to be controled. /// @return @ref E_APIXC_ReturnValue TRUE: eWindow is in auto no signal mode. FALSE: eWindow is not in auto no signal mode //------------------------------------------------------------------------------------------------- E_APIXC_ReturnValue MApi_XC_EnableIPAutoNoSignal(MS_BOOL bEnable, SCALER_WIN eWindow ); //------------------------------------------------------------------------------------------------- /// Return true is current is in auto nosignal mode. /// @ingroup XC_TIMING_DETECT /// @param eWindow \b IN: IP auto nosignal in specific window /// @return @ref MS_BOOL TRUE: eWindow is in auto no signal mode. FALSE: eWindow is not in auto no signal mode //------------------------------------------------------------------------------------------------- MS_BOOL MApi_XC_GetIPAutoNoSignal(SCALER_WIN eWindow ); //------------------------------------------------------------------------------------------------- /// Enable or disable IP auto coast /// @ingroup XC_TIMING_DETECT /// @param bEnable \b IN: Enable or Disable //------------------------------------------------------------------------------------------------- void MApi_XC_EnableIPAutoCoast(MS_BOOL bEnable); //------------------------------------------------------------------------------------------------- /// Enable IP auto Coast debounce (the debounce time is 1 (default) in driver) /// @ingroup XC_TIMING_DETECT //------------------------------------------------------------------------------------------------- void MApi_XC_EnableIPCoastDebounce(void); //------------------------------------------------------------------------------------------------- /// Clear IP auto Coast debounce /// @ingroup XC_TIMING_DETECT //------------------------------------------------------------------------------------------------- void MApi_XC_ClearIPCoastStatus(void); //------------------------------------------------------------------------------------------------- /// Enable FPLL related settings not by program but by user's setting from TV tool /// @ingroup XC_DISPLAY /// Including PhaseLimit, limitD5D6D7_RK /// @param bEnable @ref MS_BOOL \b IN: enable or not //------------------------------------------------------------------------------------------------- void MApi_XC_EnableFpllManualSetting(MS_BOOL bEnable); // debug purpose //-------------------------------------------------------------------------------------------------------------------- /// Test if panel output is ok by changing output DClk, this is to test max range that FPLL can do /// @ingroup XC_DISPLAY /// @param u32FpllSetOffset @ref MS_U32 \b IN: the offset to be add/minus the typical DClk output, unit is SET /// @param u16TestCnt @ref MS_U16 \b IN: the times to do boundary test //-------------------------------------------------------------------------------------------------------------------- void MApi_XC_FpllBoundaryTest(MS_U32 u32FpllSetOffset, MS_U16 u16TestCnt); // debug purpose //------------------------------ // Offline signal detection related //------------------------------ //----------------------------------------------------------------------------- /// Set the source need to be detect in offline detection. /// @ingroup XC_TIMING_DETECT /// @param INPUT_SOURCE_TYPE_t \b IN: The source need to be monitor //------------------------------------------------------------------------------------------------- void MApi_XC_SetOffLineDetection (INPUT_SOURCE_TYPE_t); //------------------------------------------------------------------------------------------------- /// Get Offline detection status to specific input source /// @ingroup XC_TIMING_DETECT /// @param u8InputSourceType \b IN: the specific input source type to do offline detection /// @return @ref MS_U8 TRUE: Success, FALSE: Failed //------------------------------------------------------------------------------------------------- MS_U8 MApi_XC_GetOffLineDetection( INPUT_SOURCE_TYPE_t); //------------------------------------------------------------------------------------------------- /// Set Offline detection Sog Threshold /// @ingroup XC_TIMING_DETECT /// @param u8Threshold \b IN: threshold value t2,u3,u4: 0~31 other chip: 0~255 /// @Return TRUE: Successful FALSE: Fail //------------------------------------------------------------------------------------------------- MS_BOOL MApi_XC_SetOffLineSogThreshold(MS_U8 u8Threshold); //t2,u3,u4: 0~31 other chip: 0~255 //------------------------------------------------------------------------------------------------- /// Set Offline Detection Sog filter bandwidth /// @ingroup XC_TIMING_DETECT /// @param u8BW \b IN: bandwidth value t2,u3,u4: 0~7 other chip: 0~31 /// @Return TRUE: Successful FALSE: Fail //------------------------------------------------------------------------------------------------- MS_BOOL MApi_XC_SetOffLineSogBW(MS_U8 u8BW); //----------------------------------------------------------------------------- /// Initial offline detect procedure. /// @ingroup XC_TIMING_DETECT /// @return @ref MS_BOOL TRUE: Success, FALSE: Failed //----------------------------------------------------------------------------- MS_BOOL MApi_XC_OffLineInit(void); //------------------------------ // PIP //------------------------------ //------------------------------------------------------------------------------------------------- /// Set Extra fetch number. (This setting is usually used in PIP mode. Please set carefully) /// @ingroup XC_SCALER /// @param u8val \b IN: The extra fetch number. //------------------------------------------------------------------------------------------------- void MApi_XC_Set_Extra_fetch_adv_line(MS_U8 u8val); //------------------------------------------------------------------------------------------------- /// Set the VGA SOG on or off /// @ingroup XC_INFO /// @param bEnable \b IN: bEnable =1, Turn on the VGA SOG; bEnable =0, Turn off the VGA SOG //------------------------------------------------------------------------------------------------- E_APIXC_ReturnValue MApi_XC_SetVGASogEn(MS_BOOL bVGASogEn); //------------------------------------------------------------------------------------------------- /// Control the output window(Main/Sub) on or off /// @ingroup XC_SCALER /// @param bEnable \b IN: bEnable =1, Turn on the window; bEnable =0, Turn off the window /// @param eWindow \b IN: eWindow =0, for MAIN; eWindow =1, for SUB; //------------------------------------------------------------------------------------------------- void MApi_XC_EnableWindow(MS_BOOL bEnable, SCALER_WIN eWindow); //------------------------------------------------------------------------------------------------- /// whether sub window is enable /// @ingroup XC_SCALER /// @param void \b IN: none //------------------------------------------------------------------------------------------------- MS_BOOL MApi_XC_Is_SubWindowEanble(void); //------------------------------------------------------------------------------------------------- /// Set Border format /// @ingroup XC_SCALER /// @param u8WidthIn \b IN: In-box width /// @param u8WidthOut \b IN: Out-box width /// @param u8color \b IN: border color /// @param eWindow \b IN: which window we are going to set //------------------------------------------------------------------------------------------------- void MApi_XC_SetBorderFormat( MS_U8 u8Left, MS_U8 u8Right, MS_U8 u8Up, MS_U8 u8Down, MS_U8 u8color, SCALER_WIN eWindow ); //------------------------------------------------------------------------------------------------- /// enable or disable Border /// @ingroup XC_SCALER /// @param bEnable \b IN: Enable or Disable /// @param eWindow \b IN: which window we are going to set //------------------------------------------------------------------------------------------------- void MApi_XC_EnableBorder(MS_BOOL bEnable, SCALER_WIN eWindow); //------------------------------------------------------------------------------------------------- /// Set Z-order main window first or not /// @ingroup XC_SCALER /// @param bMainFirst \b IN: TRUE: Main window first; FALSE: Sub window first //------------------------------------------------------------------------------------------------- void MApi_XC_ZorderMainWindowFirst(MS_BOOL bMainFirst); //------------------------------ // PQ Load Function //------------------------------ //------------------------------------------------------------------------------------------------- /// Create a function for PQ in SC. /// @ingroup XC_PQ /// @param PQ_Function_Info \b IN: the information of the function /// @param u32InitDataLen \b IN: the length of the PQ_Function_Info //------------------------------------------------------------------------------------------------- void MApi_XC_PQ_LoadFunction(PQ_Function_Info* function_Info , MS_U32 u32InitDataLen); //------------------------------------------------------------------------------------------------- /// Return true if current status is H nonlinear scaling /// @ingroup XC_PQ /// @param u32InitDataLen \b IN: the length of the PQ_Function_Info /// @return @ref MS_U8 True: Using HNonLinearScaling False: Not in Nonlinear status //------------------------------------------------------------------------------------------------- MS_BOOL MApi_XC_Check_HNonLinearScaling(void); //------------------------------ // EURO Function //------------------------------ // Enable/Disable Euro/Australia Hdtv Detection support in driver //----------------------------------------------------------------------------- /// Enable/Disable Euro/Australia Hdtv Detection support in driver /// @ingroup XC_TIMING_DETECT /// @param bEnable: /// - ENABLE : enable support /// - DISABLE : disable disable /// @return None. //----------------------------------------------------------------------------- void MApi_XC_EnableEuroHdtvSupport(MS_BOOL bEnable); //----------------------------------------------------------------------------- /// Enable Euro/Australia Hdtv Detection /// @ingroup XC_TIMING_DETECT /// @param bEnable: /// - ENABLE : enable detection /// - DISABLE : disable detection /// @return None. //----------------------------------------------------------------------------- void MApi_XC_EnableEuroHdtvDetection(MS_BOOL bEnable, SCALER_WIN eWindow); //------------------------------ // Genenal R/W Function //------------------------------ //------------------------------------------------------------------------------------------------- /// General Read Byte Function /// @ingroup XC_UTILITY /// @param u32Reg \b IN: which value shouldn't contain xc sub bank and address /// @return @ref MS_U8 //------------------------------------------------------------------------------------------------- MS_U8 MApi_XC_ReadByte(MS_U32 u32Reg); //------------------------------------------------------------------------------------------------- /// General Write Byte Function /// @ingroup XC_UTILITY /// @param u32Reg \b IN: which value shouldn't contain xc sub bank and address /// @return @ref MS_U8 //------------------------------------------------------------------------------------------------- void MApi_XC_WriteByte(MS_U32 u32Reg, MS_U8 u8Val); //------------------------------------------------------------------------------------------------- /// General Write Byte Function /// @ingroup XC_UTILITY /// @param u32Reg \b IN: which value shouldn't contain xc sub bank and address /// @param u8Val \b IN: setting value /// @param u8Msk \b IN: setting value //------------------------------------------------------------------------------------------------- void MApi_XC_WriteByteMask(MS_U32 u32Reg, MS_U8 u8Val, MS_U8 u8Msk); //------------------------------------------------------------------------------------------------- /// General 2 Write Byte Function /// @ingroup XC_UTILITY /// @param u32Reg \b IN: which value shouldn't contain xc sub bank and address /// @param u16Val \b IN: setting value /// @param u16Msk \b IN: setting value //------------------------------------------------------------------------------------------------- void MApi_XC_Write2ByteMask(MS_U32 u32Reg, MS_U16 u16val, MS_U16 u16Mask); //------------------------------ // XC R/W Function, using mutex to protect //------------------------------ //------------------------------------------------------------------------------------------------- /// Scaler Write 2 Byte Function, and use mutex to protect while switch bank and write address /// @ingroup XC_UTILITY /// @param u32Reg \b IN: which value contain xc sub bank and address /// @param u16Val \b IN: setting value //------------------------------------------------------------------------------------------------- void MApi_XC_W2BYTE(MS_U32 u32Reg, MS_U16 u16Val); //------------------------------------------------------------------------------------------------- /// Scaler Read 2 Byte Function, and use mutex to protect while switch bank and write address /// @ingroup XC_UTILITY /// @param u32Reg \b IN: which value contain xc sub bank and address /// @return @ref MS_U16 //------------------------------------------------------------------------------------------------- MS_U16 MApi_XC_R2BYTE(MS_U32 u32Reg); //------------------------------------------------------------------------------------------------- /// Scaler Write 4 Byte Function, and use mutex to protect while switch bank and write address /// @ingroup XC_UTILITY /// @param u32Reg \b IN: which value contain xc sub bank and address /// @param u32Val \b IN: setting value //------------------------------------------------------------------------------------------------- void MApi_XC_W4BYTE(MS_U32 u32Reg, MS_U32 u32Val); //------------------------------------------------------------------------------------------------- /// Scaler Read 4 Byte Function, and use mutex to protect while switch bank and write address /// @ingroup XC_UTILITY /// @param u32Reg \b IN: which value contain xc sub bank and address /// @return @ref MS_U32 //------------------------------------------------------------------------------------------------- MS_U32 MApi_XC_R4BYTE(MS_U32 u32Reg); //------------------------------------------------------------------------------------------------- /// Scaler Read 2 Byte Mask Function, and use mutex to protect while switch bank and write address /// @ingroup XC_UTILITY /// @param u32Reg \b IN: which value contain xc sub bank and address /// @param u16mask \b IN: decide which bit is valied /// @return @ref MS_U16 //------------------------------------------------------------------------------------------------- MS_U16 MApi_XC_R2BYTEMSK(MS_U32 u32Reg, MS_U16 u16Mask); //------------------------------------------------------------------------------------------------- /// Scaler Write 2 Byte Mask Function, and use mutex to protect while switch bank and write address /// @ingroup XC_UTILITY /// @param u32Reg \b IN: which value contain xc sub bank and address /// @param u16Val \b IN: Setting value /// @param u16mask \b IN: decide which bit is valied //------------------------------------------------------------------------------------------------- void MApi_XC_W2BYTEMSK(MS_U32 u32Reg, MS_U16 u16Val, MS_U16 u16Mask); //------------------------------ // MLoad Function, xc command burst //------------------------------ //------------------------------------------------------------------------------------------------- /// Initialize the Menuload /// @ingroup XC_UTILITY /// @param PhyAddr \b IN: the physical address for the menuload /// @param u32BufByteLen \b IN: the buffer length of the menu load commands //------------------------------------------------------------------------------------------------- void MApi_XC_MLoad_Init(MS_PHY PhyAddr, MS_U32 u32BufByteLen); //------------------------------------------------------------------------------------------------- /// Enable/Disable the MLoad /// @ingroup XC_UTILITY /// @return void //------------------------------------------------------------------------------------------------- void MApi_XC_MLoad_Enable(MS_BOOL bEnable); /// Initialize the Menuload by different client /// @ingroup XC_UTILITY /// @param eMloadSelect \b IN: the client id for the different Mload user /// @param PhyAddr \b IN: the physical address for the menuload /// @param u32BufByteLen \b IN: the buffer length of the menu load commands //------------------------------------------------------------------------------------------------- void SYMBOL_WEAK MApi_XC_MLoad_Cus_Init(EN_MLOAD_CLIENT_SELECT eMloadSelect, MS_PHY PhyAddr, MS_U32 u32BufByteLen); //------------------------------------------------------------------------------------------------- /// Enable/Disable the MLoad by different client /// @ingroup XC_UTILITY /// @param eMloadSelect \b IN: the client id for the different Mload user /// @param bEnable \b IN: Enable/Disable /// @return void //------------------------------------------------------------------------------------------------- void SYMBOL_WEAK MApi_XC_MLoad_Cus_Enable(EN_MLOAD_CLIENT_SELECT eMloadSelect, MS_BOOL bEnable); //------------------------------------------------------------------------------------------------- /// Get the status of MLoad /// @ingroup XC_UTILITY /// @return @ref MLOAD_TYPE //------------------------------------------------------------------------------------------------- MLOAD_TYPE MApi_XC_MLoad_GetStatus(void); //------------------------------------------------------------------------------------------------- /// write signal command to Mload and fire /// @ingroup XC_UTILITY /// @param u32Addr \b IN: register /// @param u16Data \b IN: value /// @param u16Mask \b IN: mask /// @return @ref MS_BOOL //------------------------------------------------------------------------------------------------- MS_BOOL MApi_XC_MLoad_WriteCmd_And_Fire(MS_U32 u32Addr, MS_U16 u16Data, MS_U16 u16Mask); //------------------------------------------------------------------------------------------------- /// write multi commands to Mload and fire /// @ingroup XC_UTILITY /// @param pu32Addr \b IN: buffer of register /// @param pu16Data \b IN: buffer of value /// @param pu16Mask \b IN: buffer of mask /// @param u16CmdCnt \b IN: counter of command //------------------------------------------------------------------------------------------------- MS_BOOL MApi_XC_MLoad_WriteCmds_And_Fire(MS_U32 *pu32Addr, MS_U16 *pu16Data, MS_U16 *pu16Mask, MS_U16 u16CmdCnt); //------------------------------ // Menuload Gamma Function //------------------------------ //------------------------------------------------------------------------------------------------- /// Initialize the Menuload Gamma /// @ingroup XC_UTILITY /// @param PhyAddr \b IN: the physical address for the menuload /// @param u32BufByteLen \b IN: the buffer length of the menu load commands //------------------------------------------------------------------------------------------------- void MApi_XC_MLG_Init(MS_PHY PhyAddr, MS_U32 u32BufByteLen); //------------------------------------------------------------------------------------------------- /// Enable/Disable the Menuload Gamma /// @ingroup XC_UTILITY /// @return void //------------------------------------------------------------------------------------------------- void MApi_XC_MLG_Enable(MS_BOOL bEnable); //------------------------------------------------------------------------------------------------- /// Get the caps of Menuload Gamma /// @ingroup XC_UTILITY /// @return TRUE if succeed, FALSE if failed //------------------------------------------------------------------------------------------------- MS_BOOL MApi_XC_MLG_GetCaps(void); //------------------------------------------------------------------------------------------------- /// Get the status of MLoad /// @ingroup XC_UTILITY /// @return @ref MLG_TYPE //------------------------------------------------------------------------------------------------- MLG_TYPE MApi_XC_MLG_GetStatus(void); //------------------------------ // For U4 set VOP data mux to VE //------------------------------ //------------------------------------------------------------------------------------------------- /// Select the source which need to connect to VE. /// @ingroup XC_OSD /// @param eVOPSelOSD_MUX \b IN: The source need to connect to VE. //------------------------------------------------------------------------------------------------- void MApi_XC_SetOSD2VEMode(EN_VOP_SEL_OSD_XC2VE_MUX eVOPSelOSD_MUX); //------------------------------------------------------------------------------------------------- /// Enable or disable prefilter in Scaler. /// @ingroup XC_SCALER /// @param bEnable \b IN: True: Enable: pre-filter. Disable: pre-filter //------------------------------------------------------------------------------------------------- void MApi_XC_IP2_PreFilter_Enable(MS_BOOL bEnable); //------------------------------------------------------------------------------------------------- /// Get pixel data with RGB format. /// @ingroup XC_SCALER /// @param u16x \b IN: X coordinate /// @param u16Y \b IN: Y coordinate /// @param eWindow \b IN: The window for retrieving data. /// @return @ref u32r return the R data /// @return @ref u32g return the G data /// @return @ref u32b return the B data //------------------------------------------------------------------------------------------------- E_APIXC_GET_PixelRGB_ReturnValue MApi_XC_Get_Pixel_RGB(XC_Get_Pixel_RGB *pData, SCALER_WIN eWindow); //------------------------------------------------------------------------------------------------- /// During retrieve pixel data, system have a cursor on the screen. This function can keep the cursor on the screen. /// @ingroup XC_SCALER /// @param bEnable \b IN: Enable if you want to keep cursor on the screen //------------------------------------------------------------------------------------------------- void MApi_XC_KeepPixelPointerAppear(MS_BOOL bEnable); //------------------------------------------------------------------------------------------------- /// @param eMemFmt \b IN: the format of memory /// @ingroup XC_SCALER /// Set memory format /// @ref MS_BOOL //------------------------------------------------------------------------------------------------- MS_BOOL MApi_XC_Set_MemFmtEx(MS_XC_MEM_FMT eMemFmt, SCALER_WIN eWindow); //------------------------------------------------------------------------------------------------- /// Get frame buffer less mode status /// @ingroup XC_SCALER /// @return @ref MS_BOOL retun the status about FrameBufferLess mode //------------------------------------------------------------------------------------------------- MS_BOOL MApi_XC_IsRequestFrameBufferLessMode(void); //------------------------------------------------------------------------------------------------- /// Set Flag to bypass software reset in MApi_XC_Init() /// @ingroup XC_SCALER /// @param bFlag \b TRUE: initialize XC by skipping SW reset; FALSE: initialize XC in normal case /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL //------------------------------------------------------------------------------------------------- E_APIXC_ReturnValue MApi_XC_SkipSWReset(MS_BOOL bFlag); //------------------------------------------------------------------------------------------------- /// MApi_XC_EnableRepWindowForFrameColor /// @ingroup XC_SCALER /// @param bEnable \b IN: enable //------------------------------------------------------------------------------------------------- void MApi_XC_EnableRepWindowForFrameColor(MS_BOOL bEnable); //------------------------------------------------------------------------------------------------- /// Set VOP Video and OSD Laler //------------------------------------------------------------------------------------------------- //------------------------------------------------------------------------------------------------- /// Set OSD Layer in Box Project ( In TV chips, please use MApi_XC_SetVideoOnOSD) /// @ingroup XC_OSD /// @param eVOPOSDLayer \b IN: OSD and Video layer selection /// @param eWindow \b IN: The window The alpha value of current window. //------------------------------------------------------------------------------------------------- E_APIXC_ReturnValue MApi_XC_SetOSDLayer(E_VOP_OSD_LAYER_SEL eVOPOSDLayer, SCALER_WIN eWindow); //------------------------------------------------------------------------------------------------- /// Get OSD Layer in Box Project /// @ingroup XC_OSD /// @param eWindow \b IN: The window The alpha value of current window. //------------------------------------------------------------------------------------------------- E_VOP_OSD_LAYER_SEL MApi_XC_GetOSDLayer(SCALER_WIN eWindow); //------------------------------------------------------------------------------------------------- /// Set Constant Alpha of Video //------------------------------------------------------------------------------------------------- //------------------------------------------------------------------------------------------------- /// Set alpha value of video (now only support in box) /// @ingroup XC_SCALER /// @param u8Val \b IN: The alpha value of video with specific window /// @param eWindow \b IN: The window which need to be adjust //------------------------------------------------------------------------------------------------- E_APIXC_ReturnValue MApi_XC_SetVideoAlpha(MS_U8 u8Val, SCALER_WIN eWindow); //------------------------------------------------------------------------------------------------- /// Get alpha value of video (now only support in box) /// @ingroup XC_SCALER /// @param pu8Val \b IN: The alpha value of video with specific window /// @param eWindow \b IN: The alpha value of a window. //------------------------------------------------------------------------------------------------- E_APIXC_ReturnValue MApi_XC_GetVideoAlpha(MS_U8 *pu8Val, SCALER_WIN eWindow); //------------------------------------------------------------------------------------------------- /// Skip Wait Vsync /// @ingroup XC_UTILITY /// @param eWindow \b IN: Enable /// @param Skip wait Vsync \b IN: Disable wait Vsync //------------------------------------------------------------------------------------------------- E_APIXC_ReturnValue MApi_XC_SkipWaitVsync( MS_BOOL eWindow,MS_BOOL bIsSkipWaitVsyn); //------------------------------------------------------------------------------------------------- /// Set XC CMA Heap ID /// @param u8CMAHeapID \b IN: CMA Heap ID /// @param eWindow \b IN: which window we are going to set //------------------------------------------------------------------------------------------------- E_APIXC_ReturnValue MApi_XC_SetCMAHeapID(MS_U8 u8CMAHeapID, SCALER_WIN eWindow); //------------------------------------------------------------------------------------------------- /// Select which DE to vop /// @ingroup XC_SCALER /// @param bFlag \b IN: @ref E_OP2VOP_DE_SEL /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL //------------------------------------------------------------------------------------------------- E_APIXC_ReturnValue MApi_XC_OP2VOPDESel(E_OP2VOP_DE_SEL eVopDESel); //------------------------------------------------------------------------------------------------- /// Set FRC Window /// @ingroup XC_FRC /// @param e3dInputMode \b IN: @ref E_XC_3D_INPUT_MODE /// @param e3dOutputMode \b IN: @ref E_XC_3D_OUTPUT_MODE /// @param e3dPanelType \b IN: @ref E_XC_3D_PANEL_TYPE //------------------------------------------------------------------------------------------------- void MApi_XC_FRC_SetWindow(E_XC_3D_INPUT_MODE e3dInputMode, E_XC_3D_OUTPUT_MODE e3dOutputMode, E_XC_3D_PANEL_TYPE e3dPanelType); //------------------------------------------------------------------------------------------------- /// XC update bwd configuration /// @param eType \b IN: bwd configuration type /// @param pstParam \b IN: data /// @param eWindow \b IN: window type /// @return result of power state control. //------------------------------------------------------------------------------------------------- #ifdef SUPPORT_BWD MS_BOOL SYMBOL_WEAK MApi_XC_SetBwdConfig(E_XC_BWD_CONFIG_TYPE eType, void *pstParam, SCALER_WIN eWindow); #endif //------------------------------------------------------------------------------------------------- /// XC config cma configuration /// @param pstXC_CMA_Config \b IN: XC_CMA_CONFIG cma config struct /// @param enCmaClient \b IN: cma client /// @param u32DataLen \b IN: data len /// @param eWindow \b IN: window type //------------------------------------------------------------------------------------------------- MS_BOOL MApi_XC_ConfigCMA(XC_CMA_CONFIG *pstXC_CMA_Config, XC_CMA_CLIENT enCmaClient, MS_U32 u32DataLen, SCALER_WIN eWindow); //------------------------------------------------------------------------------------------------- /// Set two initial factors mode to improve quality in FBL /// @ingroup XC_PQ /// @param bEnable \b IN: enable or disable two initial factors mode /// @param eWindow \b IN: @ref SCALER_WIN //------------------------------------------------------------------------------------------------- MS_BOOL MApi_XC_Enable_TwoInitFactor(MS_BOOL bEnable, SCALER_WIN eWindow); //------------------------------------------------------------------------------------------------- /// Get field packing mode support status /// @ingroup XC_3D /// @return TRUE(success) or FALSE(fail) //------------------------------------------------------------------------------------------------- MS_BOOL MApi_XC_IsFieldPackingModeSupported(void); //------------------------------------------------------------------------------------------------- /// Pre Init before XC Init /// @ingroup XC_INIT /// @param u16Type \b IN: @ref E_OP2VOP_DE_SEL /// @param para \b IN: parameter /// @param u32Length \b IN: size of parameter /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL //------------------------------------------------------------------------------------------------- E_APIXC_ReturnValue MApi_XC_PreInit( E_XC_PREINIT_t eType ,void* para, MS_U32 u32Length); //------------------------------------------------------------------------------------------------- /// Get RGB data from memory buffer /// @ingroup XC_SCALER /// @param eBufType \b IN: get RGB 8 bits or 10 bits format data /// @param pRect \b IN: the widnow for getting data area in memory, need to refer to pre-scaling /// @param pRectBuf \b IN: the buffer for getting data, the buffer typs must be the same as eBufType /// @param eWindow \b IN: get main or sub video data from memory //------------------------------------------------------------------------------------------------- void MApi_XC_Get_BufferData(E_XC_OUTPUTDATA_TYPE eBufType, MS_WINDOW_TYPE *pRect, void *pRectBuf, SCALER_WIN eWindow); //------------------------------------------------------------------------------------------------- /// Set RGB data to memory buffer /// @ingroup XC_SCALER /// @param eBufType \b IN: set RGB 8 bits or 10 bits format data /// @param pDstRect \b IN: the widnow for setting data area in memory, need to refer to pre-scaling /// @param pSrcBuf \b IN: the buffer with RGB data for setting to memory, the buffer typs must be the same as eBufType /// @param pSrcRect \b IN: the widnow for picking data area in pSrcBuf /// @param eWindow \b IN: set main or sub video data to memory //------------------------------------------------------------------------------------------------- void MApi_XC_Set_BufferData(E_XC_INPUTDATA_TYPE eBufType, MS_WINDOW_TYPE *pDstRect, void *pSrcBuf, MS_WINDOW_TYPE *pSrcRect, SCALER_WIN eWindow); //------------------------------------------------------------------------------------------------- /// Control the main window on or off /// @ingroup XC_ToBeModified /// @param bEnable \b IN: bEnable =1, Turn on the window; bEnable =0, Turn off the window //------------------------------------------------------------------------------------------------- void MApi_XC_EnableMainWindow(MS_BOOL bEnable); // Turn on/off main/sub window //------------------------------------------------------------------------------------------------- /// Enable sub window and control the window size /// @ingroup XC_ToBeRemove /// @param *pstDispWin \b IN: Window type //------------------------------------------------------------------------------------------------- void MApi_XC_EnableSubWindow(MS_WINDOW_TYPE *pstDispWin); //------------------------------------------------------------------------------------------------- /// Disable sub window /// @ingroup XC_ToBeRemove /// @param void \b IN: none //------------------------------------------------------------------------------------------------- void MApi_XC_DisableSubWindow(void); //------------------------------------------------------------------------------------------------- /// Set pixel shift /// @ingroup XC_DISPLAY /// @param s8H \b IN: pixel shift H /// @param s8V \b IN: pixel shift V /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL //------------------------------------------------------------------------------------------------- E_APIXC_ReturnValue MApi_XC_SetPixelShift(MS_S8 s8H, MS_S8 s8V); //------------------------------------------------------------------------------------------------- /// Set Pixel Shift Features /// @ingroup XC_DISPLAY /// @param u16HPixelShiftRange \b IN: horizontal shift range, if it is +/- 4, please assign 4 to this parameter /// @param u16VPixelShiftRange \b IN: vertical shift range, if it is +/- 3, please assign 3 to this parameter /// @param ePixelShiftFeature \b IN: decide which feature to be used, use "|" for multiple features /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL //------------------------------------------------------------------------------------------------- E_APIXC_ReturnValue MApi_XC_SetPixelShiftFeatures(MS_U16 u16HPixelShiftRange, MS_U16 u16VPixelShiftRange, PIXEL_SHIFT_FEATURE ePixelShiftFeature); //------------------------------------------------------------------------------------------------- /// MApi_XC_Combine_MLoadEn /// @ingroup XC_UTILITY /// @param bEnable \b IN: whether to menuload /// Do an example when you want to menuload OSDLayer : /// MApi_XC_Combine_MLoadEn(TRUE) /// xc function /// MApi_XC_Combine_MLoadEn(FALSE) /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL //------------------------------------------------------------------------------------------------- E_APIXC_ReturnValue MApi_XC_Combine_MLoadEn(MS_BOOL bEn); //------------------------------------------------------------------------------------------------- /// MApi_XC_SetVideoOnOSD /// @ingroup XC_OSD /// @param E_VDO_ON_OSD_LAYER \b IN: set video show on which osd layer /// @param eWindow \b IN: set main or sub video data to memory /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL //------------------------------------------------------------------------------------------------- E_APIXC_ReturnValue MApi_XC_SetVideoOnOSD(E_VIDEO_ON_OSD_LAYER enlayer, SCALER_WIN eWindow); //------------------------------------------------------------------------------------------------- /// MApi_XC_SetOSDLayerBlending /// @ingroup XC_OSD /// @param u8Layer \b IN: which osd layer will blend /// @param bEnable \b IN: whether to blend /// @param eWindow \b IN: which window blend with /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL //------------------------------------------------------------------------------------------------- E_APIXC_ReturnValue MApi_XC_SetOSDLayerBlending(MS_U8 u8Layer, MS_BOOL bEnable, SCALER_WIN eWindow); //------------------------------------------------------------------------------------------------- /// MApi_XC_SetOSDLayerAlpha /// @ingroup XC_OSD /// @param u8Layer \b IN: which osd layer will blend /// @param u8Alpha \b IN: blending alpha /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL //------------------------------------------------------------------------------------------------- E_APIXC_ReturnValue MApi_XC_SetOSDLayerAlpha(MS_U8 u8Layer, MS_U8 u8Alpha); //------------------------------------------------------------------------------------------------- /// MApi_XC_SetOSDBlendingFormula /// @ingroup XC_OSD /// @param enOsdIndex \b IN: osd index /// @param enType \b IN: osd blending type /// @param eWindow \b IN: blending with main or sub video /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL //------------------------------------------------------------------------------------------------- E_APIXC_ReturnValue MApi_XC_SetOSDBlendingFormula(E_XC_OSD_INDEX enOsdIndex, E_XC_OSD_BlENDING_TYPE enType, SCALER_WIN eWindow); //------------------------------------------------------------------------------------------------- // usage: // MS_XC_REPORT_PIXELINFO stRepPixInfo; // memset(&stRepPixInfo, 0, sizeof(MS_XC_REPORT_PIXELINFO)); // stRepPixInfo.u32ReportPixelInfo_Version = XC_REPORT_PIXELINFO_VERSION; // stRepPixInfo.u16ReportPixelInfo_Length = sizeof(MS_XC_REPORT_PIXELINFO); // stRepPixInfo.enStage = E_XC_GET_PIXEL_STAGE_AFTER_OSD; // stRepPixInfo.u16XStart = xxxx; // stRepPixInfo.u16XEnd = xxxx; // stRepPixInfo.u16YStart = xxxx; // stRepPixInfo.u16YEnd = xxxx; // MApi_XC_ReportPixelInfo(&stRepPixInfo); // /// Report Pixel Info /// @ingroup XC_SCALER /// @param pstRepPixInfo \b IN: pointer to struct MS_XC_REPORT_PIXELINFO /// @return TRUE if succeed, FALSE if failed //------------------------------------------------------------------------------------------------- MS_BOOL MApi_XC_ReportPixelInfo(MS_XC_REPORT_PIXELINFO *pstRepPixInfo); //------------------------------------------------------------------------------------------------- /// MApi_XC_SetScaling /// @ingroup XC_SCALER /// @param bEnable \b IN: set enable or disable /// @param eScaling_type \b IN: set scaling type, pre-scaling, post-scaling, both-scaling /// @param eVector_type \b IN: set H vector, v vector, and HV vector /// @param eWindow \b IN: set main or sub video data to memory //------------------------------------------------------------------------------------------------- void MApi_XC_SetScaling( MS_BOOL bEnable, E_XC_SCALING_TYPE eScaling_type, E_XC_VECTOR_TYPE eVector_type, SCALER_WIN eWindow ); //------------------------------------------------------------------------------------------------- /// MApi_XC_SetMCDIBufferAddress /// @ingroup XC_PQ /// @param u32FBAddress \b IN: frame buffer base addr /// @param u32FBSize \b IN: frame buffer size /// @param eType \b IN: set frame buffer for MCDI ME1 or ME2 //------------------------------------------------------------------------------------------------- void MApi_XC_SetMCDIBufferAddress(MS_PHY u32FBAddress, MS_PHY u32FBSize, E_XC_MCDI_TYPE eType); //------------------------------------------------------------------------------------------------- /// MApi_XC_EnableMCDI /// @ingroup XC_PQ /// @param bEnable \b IN: enable/disable MCDI /// @param eType \b IN: control MCDI ME1 or ME2 or both //------------------------------------------------------------------------------------------------- void MApi_XC_EnableMCDI(MS_BOOL bEnable, E_XC_MCDI_TYPE eType); //------------------------------------------------------------------------------------------------- /// MApi_XC_SendCmdToFRC /// @ingroup XC_FRC /// @param u8Cmd \b IN: CMD /// @param count \b IN: parameter Counter /// @param pFRC_R2_Para \b IN: input parameter /// @return TRUE if succeed, FALSE if failed //------------------------------------------------------------------------------------------------- MS_BOOL MApi_XC_SendCmdToFRC( MS_U8 u8Cmd, MS_U8 count, FRC_R2_CMD_PARAMETER_t pFRC_R2_Para ); //------------------------------------------------------------------------------------------------- /// MApi_XC_GetMsgFromFRC /// @ingroup XC_FRC /// @param u8Cmd \b IN: CMD /// @param pu8ParaCount \b IN: Counter /// @param pu8Para \b IN: input parameter /// @return TRUE if succeed, FALSE if failed //------------------------------------------------------------------------------------------------- MS_BOOL MApi_XC_GetMsgFromFRC(MS_U8* pu8Cmd, MS_U8* pu8ParaCount, MS_U8* pu8Para); //------------------------------------------------------------------------------------------------- /// Enable/Disable RW bank auto /// @ingroup XC_SCALER /// @param bEnable \b IN: enable or disable /// @param eWindow \b IN: which window we are going to enable or disable //------------------------------------------------------------------------------------------------- void MApi_XC_EnableRWBankAuto(MS_BOOL bEnable, SCALER_WIN eWindow); void MApi_XC_Dump_SHM(void); //------------------------------------------------------------------------------------------------- /// Set XC W/R Bank Mapping Number /// @ingroup XC_SCALER /// @param u8Val \b IN: W/R bank mapping value /// @param eWindow \b IN: which window we are going to set //------------------------------------------------------------------------------------------------- void MApi_XC_SetWRBankMappingNum(MS_U8 u8Val, SCALER_WIN eWindow); //------------------------------------------------------------------------------------------------- /// Get XC W/R Bank Mapping Number /// @ingroup XC_SCALER /// @param eWindow \b IN: which window we are going to get /// @return MS_U8 W/R bank mapping number //------------------------------------------------------------------------------------------------- MS_U8 MApi_XC_GetWRBankMappingNum(SCALER_WIN eWindow); //------------------------------------------------------------------------------------------------- /// Get XC W/R Bank Mapping Number for Zap (including UC effect) /// @ingroup XC_SCALER /// @param eWindow \b IN: which window we are going to get /// @return MS_U8 W/R bank mapping number //------------------------------------------------------------------------------------------------- MS_U8 MApi_XC_GetWRBankMappingNumForZap(SCALER_WIN eWindow); //------------------------------------------------------------------------------------------------- /// Set BOB mode /// @ingroup XC_PQ /// @param bEnable \b IN: Enable BOB mode or not /// @param eWindow \b IN: which window we are going to set /// @return TRUE - succeed, FALSE - fail //------------------------------------------------------------------------------------------------- MS_BOOL MApi_XC_SetBOBMode(MS_BOOL bEnable, SCALER_WIN eWindow); //------------------------------------------------------------------------------------------------- /// Set XC force read bank /// @ingroup XC_SCALER /// @param bEnable \b IN: Enable force read bank or not /// @param u8Bank \b IN: Force read bank index /// @param eWindow \b IN: which window we are going to set //------------------------------------------------------------------------------------------------- void MApi_XC_SetForceReadBank(MS_BOOL bEnable, MS_U8 u8Bank, SCALER_WIN eWindow); //------------------------------------------------------------------------------------------------- /// Set XC lock point /// @ingroup XC_SCALER /// @param u16LockPoint \b IN: lock point count /// @param eWindow \b IN: which window we are going to set //------------------------------------------------------------------------------------------------- void MApi_XC_SetLockPoint(MS_U16 u16LockPoint, SCALER_WIN eWindow); //------------------------------ // LD //------------------------------------------------------------------------------------------------- /// LD set panel type /// @ingroup XC_LD /// @param eLdPanelType \b IN: panel type /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL //------------------------------------------------------------------------------------------------- MS_BOOL MApi_XC_LD_Init(EN_LD_PANEL_TYPE eLDPanelType ); //------------------------------------------------------------------------------------------------- /// LD set memory address /// @ingroup XC_LD /// @param u8MIU \b IN: MIU Select /// @param u32LDFBase0 \b IN: LDF memeory0 address /// @param u32LDFBase1 \b IN: LDF memeory1 address /// @param u32LDBBase0 \b IN: LDB memeory0 address /// @param u32LDBBase1 \b IN: LDB memeory1 address /// @param u32EDGE2DBase \b IN: EDGE2D memeory address /// @param u32LEDoffset \b IN: LED data offset /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL //------------------------------------------------------------------------------------------------- MS_BOOL MApi_XC_LD_SetMemoryAddress(MS_U8 u8MIU ,MS_PHY u32LDFBase0,MS_PHY u32LDFBase1,MS_PHY u32LDBBase0,MS_PHY u32LDBBase1,MS_PHY u32EDGE2DBase,MS_PHY u32LEDoffset); //------------------------------------------------------------------------------------------------- /// Get LD value /// @ingroup XC_LD /// @param pu8LDValue @ref MS_U8 \b OUT: get the LD back light value (The amount is u8WSize x u8HSize) /// @param u8WSize @ref MS_U8 \b IN: set the LD back light width /// @param u8HSize @ref MS_U8 \b IN: set the LD back light height /// @Return TRUE: Successful FALSE: Fail //------------------------------------------------------------------------------------------------- MS_BOOL MApi_XC_LD_Get_Value(MS_U8 *pu8LDValue, MS_U8 u8WSize, MS_U8 u8HSize); //------------------------------------------------------------------------------------------------- /// set LD Level /// @ingroup XC_LD /// @param eMode \b IN: LD level /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL //------------------------------------------------------------------------------------------------- MS_BOOL MApi_XC_LD_SetLevel(EN_LD_MODE eMode); //------------------------------------------------------------------------------------------------- /// set LD backlight is zero flags /// @ingroup XC_LD /// @param eMode \b IN: backlight is zero flags /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL //------------------------------------------------------------------------------------------------- MS_BOOL MApi_Set_TurnoffLDBL(MS_BOOL bturnoffbl); //------------------------------------------------------------------------------------------------- /// set not update SPI data Flags /// @ingroup XC_LD /// @param brefreshSpidata \b IN: refresh Spi data flags /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL //------------------------------------------------------------------------------------------------- MS_BOOL MApi_Set_notUpdateSPIDataFlags(MS_BOOL brefreshSpidata); //------------------------------------------------------------------------------------------------- /// set User mode LD Flags /// @ingroup XC_LD /// @param buserLDFlags \b IN: User mode LD Flags /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL //------------------------------------------------------------------------------------------------- MS_BOOL MApi_Set_UsermodeLDFlags(MS_BOOL buserLDFlags); //------------------------------------------------------------------------------------------------- /// set LD backlight level /// @ingroup XC_LD /// @param u8BLLeve \b IN: backlight level /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL //------------------------------------------------------------------------------------------------- MS_BOOL MApi_Set_BLLevel(MS_U8 u8BLLeve); //------------------------------------------------------------------------------------------------- /// set XC bandwidth saving X-mode /// @ingroup XC_PQ /// @param bEnable \b IN: enable or disable /// @param eWindow \b IN: which window we are going to enable or disable //------------------------------------------------------------------------------------------------- void MApi_XC_Set_BWS_Mode(MS_BOOL bEnable, SCALER_WIN eWindow); //------------------------------------------------------------------------------------------------- /// set FRC ColorPathCtrl /// @ingroup XC_FRC /// @param epath_type \b IN: Select one of path in the FRC_COLOR_PATH_TYPE /// @param bEnable \b IN: enable or disable //------------------------------------------------------------------------------------------------- void MApi_XC_FRC_ColorPathCtrl(MS_U16 u16Path_sel, MS_BOOL bEnable); //------------------------------------------------------------------------------------------------- /// set FRC_OP2 SetRGBGain /// @ingroup XC_FRC /// @param u16RedGain \b IN: Red Gain /// @param u16GreenGain \b IN: Green Gain /// @param u16BlueGain \b IN: Blue Gain //------------------------------------------------------------------------------------------------- void MApi_XC_FRC_OP2_SetRGBGain(MS_U16 u16RedGain, MS_U16 u16GreenGain, MS_U16 u16BlueGain); //------------------------------------------------------------------------------------------------- /// set FRC_OP2 SetRGBOffset /// @ingroup XC_FRC /// @param u16RedOffset \b IN: Red Offset /// @param u16GreenOffset \b IN: Green Offset /// @param u16BlueOffset \b IN: Blue Offset //------------------------------------------------------------------------------------------------- void MApi_XC_FRC_OP2_SetRGBOffset(MS_U16 u16RedOffset, MS_U16 u16GreenOffset, MS_U16 u16BlueOffset); //------------------------------------------------------------------------------------------------- /// set FRC_OP2 SetDither /// @ingroup XC_FRC /// @param u16dither \b IN: Dither setting //------------------------------------------------------------------------------------------------- void MApi_XC_FRC_OP2_SetDither(MS_U16 u16dither); //------------------------------------------------------------------------------------------------- /// set XC Bypass MFC /// @ingroup XC_FRC /// @param eEnable \b IN: Enable or Disable /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL //------------------------------------------------------------------------------------------------- MS_BOOL MApi_XC_FRC_BypassMFC(MS_BOOL bEnable); //------------------------------------------------------------------------------------------------- /// set XC FRC Mute /// @ingroup XC_FRC /// @param bEnable \b IN: Enable or Disable //------------------------------------------------------------------------------------------------- void MApi_XC_FRC_Mute(MS_BOOL bEnable); //------------------------------------------------------------------------------------------------- /// MApi_XC_ForceReadFrame /// @ingroup XC_SCALER /// @param bEnable \b IN: enable/disable keep specified frame /// @param u16FrameIndex \b IN: control specified frame to show //------------------------------------------------------------------------------------------------- E_APIXC_ReturnValue MApi_XC_ForceReadFrame(MS_BOOL bEnable, MS_U16 u16FrameIndex); //------------------------------------------------------------------------------------------------- /// MApi_XC_SetCsc /// @ingroup XC_PQ /// @param bEnable \b IN: enable/disable keep specified frame /// @param eWindow \b IN: which window we are going to enable or disable //------------------------------------------------------------------------------------------------- void MApi_XC_SetCsc( MS_BOOL bEnable, SCALER_WIN eWindow ); //------------------------------------------------------------------------------------------------- /// Register PQ Set FPLL thresh mode function /// @ingroup XC_DISPLAY /// @param fpPQCB \b IN: function pointer of PQ set FPLL thresh mode //------------------------------------------------------------------------------------------------- void MApi_XC_RegisterPQSetFPLLThreshMode(void (*fpPQCB)(MS_U8 u8PQWin)); //------------------------------------------------------------------------------------------------- /// Get XC free run status /// @ingroup XC_DISPLAY /// @return TRUE if it is free run, FALSE if not //------------------------------------------------------------------------------------------------- MS_BOOL MApi_XC_GetFreeRunStatus(void); //------------------------------------------------------------------------------------------------- /// MApi_XC_Get_DSForceIndexSupported /// @ingroup XC_DS /// @param eWindow \b IN: which window we are going to enable or disable //------------------------------------------------------------------------------------------------- E_APIXC_ReturnValue MApi_XC_Get_DSForceIndexSupported(SCALER_WIN eWindow); //------------------------------------------------------------------------------------------------- /// MApi_XC_Set_DSForceIndex /// @ingroup XC_DS /// @param bEnable \b IN: ENABLE/DISABLE force DS index or not /// @param u8Index \b IN: the index that needs to be forced in. /// @param eWindow \b IN: which window we are going to enable or disable //------------------------------------------------------------------------------------------------- E_APIXC_ReturnValue MApi_XC_Set_DSForceIndex(MS_BOOL bEnable, MS_U8 u8Index, SCALER_WIN eWindow); //------------------------------------------------------------------------------------------------- /// MApi_XC_Set_DSIndexSourceSelect /// @ingroup XC_DS /// @param eDSIdxSrc \b IN: choose where the DS index comes from. /// @param eWindow \b IN: which window we are going to enable or disable //------------------------------------------------------------------------------------------------- E_APIXC_ReturnValue MApi_XC_Set_DSIndexSourceSelect(E_XC_DS_INDEX_SOURCE eDSIdxSrc, SCALER_WIN eWindow); //------------------------------------------------------------------------------------------------- /// Use Dynamic Scaling to write register /// @param bEnable \b IN: enable or disable DS write reg mode /// @param u32Flag \b IN: options for this function /// @param eWindow \b IN: which window we are going to enable or disable //------------------------------------------------------------------------------------------------- E_APIXC_ReturnValue MApi_XC_EnableDSRegMode(MS_BOOL bEnable, SCALER_WIN eWindow); //------------------------------------------------------------------------------------------------- /// MApi_XC_Set_DSForceIndex /// @ingroup XC_OSD /// @param bEnable \b IN: ENABLE/DISABLE force DS index or not /// @param u8Index \b IN: the index that needs to be forced in. /// @param eWindow \b IN: which window we are going to enable or disable /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL //------------------------------------------------------------------------------------------------- E_APIXC_ReturnValue MApi_XC_OSDC_InitSetting(E_XC_OSDC_TGEN_Type E_XC_OSDC_TGEN_Type, MS_XC_OSDC_TGEN_INFO *pstOC_Tgen_Cus, MS_XC_OSDC_CTRL_INFO *pstOC_Ctrl); //------------------------------------------------------------------------------------------------- /// MApi_XC_Set_DSForceIndex /// @ingroup XC_OSD /// @param eCtrl_type \b IN: ENABLE/DISABLE force DS index or not /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL //------------------------------------------------------------------------------------------------- E_APIXC_ReturnValue MApi_XC_OSDC_Control(MS_U32 eCtrl_type); //------------------------------------------------------------------------------------------------- /// MApi_XC_OSDC_GetDstInfo /// @ingroup XC_OSD /// @param pDstInfo \b IN: get the Desternation info /// @param u32SizeofDstInfo \b IN: size check /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL //------------------------------------------------------------------------------------------------- E_APIXC_ReturnValue MApi_XC_OSDC_GetDstInfo(MS_OSDC_DST_DispInfo *pDstInfo, MS_U32 u32SizeofDstInfo); //------------------------------------------------------------------------------------------------- /// MApi_XC_OSDC_SetOutVfreqx10 /// @ingroup XC_OSD /// @param u16Vfreq \b IN: output V freq x10 //------------------------------------------------------------------------------------------------- void MApi_XC_OSDC_SetOutVfreqx10(MS_U16 u16Vfreq); //------------------------------------------------------------------------------------------------- /// MApi_XC_SetByPassOSDVsyncPos /// @ingroup XC_OSD /// @param u16VsyncStart \b IN: OSD vsync start /// @param u16VsyncEnd \b IN: OSD vsync end //------------------------------------------------------------------------------------------------- void MApi_XC_BYPASS_SetOSDVsyncPos(MS_U16 u16VsyncStart, MS_U16 u16VsyncEnd); //------------------------------------------------------------------------------------------------- /// MApi_XC_BYPASS_SetInputSrc /// @ingroup XC_SCALER /// @param bEnable \b IN: ENABLE/DISABLE bypass mode /// @param input \b IN: Select the input source for bypass mode //------------------------------------------------------------------------------------------------- void MApi_XC_BYPASS_SetInputSrc(MS_BOOL bEnable,E_XC_BYPASS_InputSource input); //------------------------------------------------------------------------------------------------- /// MApi_XC_BYPASS_SetCSC /// @ingroup XC_SCALER /// @param bEnable \b IN: ENABLE/DISABLE the color space convert //------------------------------------------------------------------------------------------------- void MApi_XC_BYPASS_SetCSC(MS_BOOL bEnable); //------------------------------------------------------------------------------------------------- /// MApi_XC_SetSeamlessZapping /// @ingroup XC_UTILITY /// @param eWindow \b IN: which window we are going to enable or disable /// @param bEnable \b IN: ENABLE/DISABLE seamless zapping /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL //------------------------------------------------------------------------------------------------- E_APIXC_ReturnValue MApi_XC_SetSeamlessZapping(SCALER_WIN eWindow, MS_BOOL bEnable); //------------------------------------------------------------------------------------------------- /// MApi_XC_GetSeamlessZappingStatus /// @ingroup XC_UTILITY /// @ingroup XC_SCALER /// @param eWindow \b IN: which window we are going to get status /// @param pbEnable \b IN: get current seamless zapping status /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL //------------------------------------------------------------------------------------------------- E_APIXC_ReturnValue MApi_XC_GetSeamlessZappingStatus(SCALER_WIN eWindow, MS_BOOL* pbEnable); //------------------------------------------------------------------------------------------------- /// MApi_XC_Vtrack_SetPayloadData /// @ingroup XC_PQ /// @param u16Timecode \b IN: The time code is coded on 16 bits. It is calculated based on the number of days from January 1st. /// @param u8ID \b IN: Operator ID //------------------------------------------------------------------------------------------------- E_APIXC_ReturnValue MApi_XC_Vtrack_SetPayloadData(MS_U16 u16Timecode, MS_U8 u8OperatorID); //------------------------------------------------------------------------------------------------- /// MApi_XC_Vtrack_SetUserDefindedSetting /// @ingroup XC_PQ /// @param bEnable \b IN: ENABLE/DISABLE Customized Setting /// @param pu8Setting \b IN: pointer to targert user definded setting data (include setting1 to setting3) //------------------------------------------------------------------------------------------------- E_APIXC_ReturnValue MApi_XC_Vtrack_SetUserDefindedSetting(MS_BOOL bUserDefinded, MS_U8 *pu8Setting); //------------------------------------------------------------------------------------------------- /// MApi_XC_Vtrack_Enable /// @ingroup XC_PQ /// @param u8FrameRate \b IN: ENABLE/DISABLE The FrameRateIn is based on the output format of the box /// @param bEnable \b IN: ENABLE/DISABLE Vtrack //------------------------------------------------------------------------------------------------- E_APIXC_ReturnValue MApi_XC_Vtrack_Enable(MS_U8 u8FrameRate, MS_BOOL bEnable); //------------------------------------------------------------------------------------------------- /// Pre-set the specific window with PQ info /// @ingroup XC_PQ /// @param pstXC_SetWin_Info \b IN: the information of the window setting /// @param eWindow \b IN: which window we are going to set //------------------------------------------------------------------------------------------------- void MApi_XC_PreSetPQInfo(XC_SETWIN_INFO *pstXC_SetWin_Info, SCALER_WIN eWindow); //------------------------------------------------------------------------------------------------- /// Mapi_XC_Is_OP1_TestPattern_Enabled /// @ingroup XC_TEST_PATTERN /// @return MS_BOOL: TRUE - enabled, FALSED - disabled //------------------------------------------------------------------------------------------------- MS_BOOL MApi_XC_Is_OP1_TestPattern_Enabled(void); //------------------------------------------------------------------------------------------------- /// MApi_XC_Set_OP1_TestPattern /// @ingroup XC_TEST_PATTERN /// @param ePattern \b IN: select test pattern /// @param eMode \b IN: choose the patgen mode (only support E_XC_OP1_PATGEN_DISP_LB_MODE now) /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL or E_APIXC_RET_FAIL_FUN_NOT_SUPPORT //------------------------------------------------------------------------------------------------- E_APIXC_ReturnValue MApi_XC_Set_OP1_TestPattern(EN_XC_OP1_PATTERN ePattern, EN_XC_OP1_PATGEN_MODE eMode); //------------------------------------------------------------------------------------------------- /// MApi_XC_CheckWhiteBalancePatternModeSupport /// @ingroup XC_TEST_PATTERN /// @param eWBPatternMode \b IN: White balance Pattern gen Mode /// @return MS_BOOL: TRUE - support, FALSED - unsupport //------------------------------------------------------------------------------------------------- MS_BOOL MApi_XC_CheckWhiteBalancePatternModeSupport(EN_XC_WB_PATTERN_MODE enWBPatternMode); //------------------------------------------------------------------------------------------------- /// MApi_XC_SetHLinearScaling /// @ingroup XC_PQ /// @param bEnable \b IN: enable or disalbe h linear scaling /// @param bSign \b IN: sign of delta /// @param u16Delta \b IN: the slop of scaling /// @param eWindow \b IN: which window we are going to set /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL or E_APIXC_RET_FAIL_FUN_NOT_SUPPORT //------------------------------------------------------------------------------------------------- E_APIXC_ReturnValue MApi_XC_SetHLinearScaling(MS_BOOL bEnable, MS_BOOL bSign, MS_U16 u16Delta, SCALER_WIN eWindow); //------------------------------------------------------------------------------------------------- /// XC power state control for fastboot /// @ingroup XC_UTILITY /// @param u16PowerState \b IN: power state /// @return result of power state control. //------------------------------------------------------------------------------------------------- MS_U32 MApi_XC_SetPowerState(EN_POWER_MODE enPowerState); //------------------------------------------------------------------------------------------------- /// MApi_XC_EnableT3D /// @ingroup XC_3D /// @param bEnable \b IN: enable or disalbe T3D /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL or E_APIXC_RET_FAIL_FUN_NOT_SUPPORT //------------------------------------------------------------------------------------------------- E_APIXC_ReturnValue MApi_XC_EnableT3D(MS_BOOL bEnable); //------------------------------------------------------------------------------------------------- /// MApi_XC_Set_FRC_InputTiming /// @ingroup XC_FRC /// @param enFRC_InputTiming \b IN: FRC input timing /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL or E_APIXC_RET_FAIL_FUN_NOT_SUPPORT //------------------------------------------------------------------------------------------------- E_APIXC_ReturnValue MApi_XC_Set_FRC_InputTiming(E_XC_FRC_InputTiming enFRC_InputTiming); //------------------------------------------------------------------------------------------------- /// MApi_XC_Get_FRC_InputTiming /// @ingroup XC_FRC /// @param penFRC_InputTiming \b IN: FRC input timing /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL or E_APIXC_RET_FAIL_FUN_NOT_SUPPORT //------------------------------------------------------------------------------------------------- E_APIXC_ReturnValue MApi_XC_Get_FRC_InputTiming(E_XC_FRC_InputTiming *penFRC_InputTiming); //------------------------------------------------------------------------------------------------- /// MApi_XC_Get_VirtualBox_Info /// @ingroup XC_SCALER /// @param pstXC_VboxInfo \b IN: virtual box info /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL or E_APIXC_RET_FAIL_FUN_NOT_SUPPORT //------------------------------------------------------------------------------------------------- E_APIXC_ReturnValue MApi_XC_Get_VirtualBox_Info(XC_VBOX_INFO *pstXC_VboxInfo); //------------------------------------------------------------------------------------------------- /// MApi_XC_Set_OSD_Detect /// @ingroup XC_OSD /// @param bEnable \b IN: enable or disalbe OSD detect /// @param Threhold \b IN: setup the threashold /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL or E_APIXC_RET_FAIL_FUN_NOT_SUPPORT //------------------------------------------------------------------------------------------------- E_APIXC_ReturnValue MApi_XC_Set_OSD_Detect(MS_BOOL bEnable, MS_U32 Threhold); //------------------------------------------------------------------------------------------------- /// MApi_XC_Get_OSD_Detect /// @ingroup XC_OSD /// @param bEnable \b IN: enable or disalbe OSD detect /// @param Threhold \b IN: setup the threashold /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL or E_APIXC_RET_FAIL_FUN_NOT_SUPPORT //------------------------------------------------------------------------------------------------- E_APIXC_ReturnValue MApi_XC_Get_OSD_Detect(MS_BOOL *pbOSD); //------------------------------------------------------------------------------------------------- /// Get XC work mode: 2K2K mode or normal mode /// @ingroup XC_FRC /// @return MS_BOOL: TRUE - 2K2K mode, FALSE - Normal mode //------------------------------------------------------------------------------------------------- MS_BOOL MApi_XC_Is2K2KToFrcMode(void); //------------------------------------------------------------------------------------------------- /// The Main and Sub Window will switch zorder alternately. /// @param bEnable \b IN: enable or disalbe /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL //------------------------------------------------------------------------------------------------- E_APIXC_ReturnValue __attribute__((weak)) MApi_XC_EnableSwitchMainSubZorder(MS_BOOL bEnable); //------------------------------------------------------------------------------------------------- /// Set XC work mode: 2P mode or 4K2K@50/60Hz /// @return MS_BOOL: TRUE - Success, FALSE - Fail //------------------------------------------------------------------------------------------------- //MS_BOOL MApi_XC_Set_2P_Mode(MS_BOOL bEnable,SCALER_WIN eWindow); //------------------------------------------------------------------------------------------------- /// MApi_XC_Enable_LockFreqOnly /// @param bEnable \b IN: enable or disalbe LPLL LockFreqOnly mode /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL or E_APIXC_RET_FAIL_FUN_NOT_SUPPORT //------------------------------------------------------------------------------------------------- E_APIXC_ReturnValue MApi_XC_Enable_LockFreqOnly(MS_BOOL bEnable); #ifdef UFO_XC_TEST_PATTERN //------------------------------------------------------------------------------------------------- /// To generate designated test pattern,you should follow the following example /// Ex: /// XC_SET_IPMUX_TESTPATTERN_t ipmux_test_pattern; /// ipmux_test_pattern.bEnable = TRUE; /// ipmux_test_pattern.u16R_CR_Data = xxx; /// ipmux_test_pattern.u16G_Y_Data = xxx; /// ipmux_test_pattern.u16B_CB_Data = xxx; /// MApi_XC_GenerateTestPattern(E_XC_IPMUX_PATTERN_MODE,(void *)&ipmux_test_pattern,sizeof(XC_SET_IPMUX_TESTPATTERN_t)); /// ------------------------------------------------------------------------------------------------ /// @param ePatternMode \b IN: pattern type /// @param para \b IN: test pattern struct point /// @param u16Length \b IN: data length /// ePatternMode = E_XC_ADC_PATTERN_MODE; para = p_XC_SET_ADC_TESTPATTERN_t struct point; /// ePatternMode = E_XC_IPMUX_PATTERN_MODE; para = p_XC_SET_IPMUX_TESTPATTERN_t struct point; /// ePatternMode = E_XC_IP1_PATTERN_MODE; para = p_XC_SET_IP1_TESTPATTERN_t struct point; /// ePatternMode = E_XC_OP_PATTERN_MODE; para = p_XC_SET_OP_TESTPATTERN_t struct point; /// ePatternMode = E_XC_VOP_PATTERN_MODE; para = p_XC_SET_VOP_TESTPATTERN_t struct point; /// ePatternMode = E_XC_VOP2_PATTERN_MODE; para = p_XC_SET_VOP2_TESTPATTERN_t struct point; /// ePatternMode = E_XC_MOD_PATTERN_MODE; para = p_XC_SET_MOD_TESTPATTERN_t struct point; //------------------------------------------------------------------------------------------------- void SYMBOL_WEAK MApi_XC_GenerateTestPattern (EN_XC_TEST_PATTERN_MODE ePatternMode,void* para, MS_U16 u16Length); #endif //================================ Obsolete Function Start ======================================= //------------------------------------------------------------------------------------------------- /// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Alert !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! /// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Alert !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! /// !!! below function will be "REMOVED" or "REFACTORING" later, please do not use it !!!!!!!!! //------------------------------------------------------------------------------------------------- //------------------------------------------------------------------------------------------------- /// mvideo_sc_get_output_vfreq /// @ingroup XC_ToBeRemove //------------------------------------------------------------------------------------------------- MS_U16 mvideo_sc_get_output_vfreq(void); //Replaced by MApi_XC_GetOutputVFreqX100 //------------------------------------------------------------------------------------------------- /// MApi_XC_Get_Current_OutputVFreqX100 /// @ingroup XC_ToBeRemove //------------------------------------------------------------------------------------------------- MS_U32 MApi_XC_Get_Current_OutputVFreqX100(void); //Replaced by MApi_XC_GetOutputVFreqX100 //------------------------------------------------------------------------------------------------- /// MApi_XC_SetMemoryWriteRequest /// @ingroup XC_ToBeRemove //------------------------------------------------------------------------------------------------- E_APIXC_ReturnValue MApi_XC_SetMemoryWriteRequest(MS_BOOL bEnable); //Replaced by MApi_XC_SetScalerMemoryRequest //------------------------------------------------------------------------------------------------- /// MApi_XC_Set_MemFmt /// @ingroup XC_ToBeRemove //------------------------------------------------------------------------------------------------- MS_BOOL MApi_XC_Set_MemFmt(MS_XC_MEM_FMT eMemFmt); //------------------------------------------------------------------------------------------------- /// MApi_XC_SetOutputAdjustSetting /// @ingroup XC_ToBeRemove //------------------------------------------------------------------------------------------------- E_APIXC_ReturnValue MApi_XC_SetOutputAdjustSetting(XC_OUTPUT_TIMING_ADJUST_SETTING *stAdjSetting); // Replaced by MApi_XC_SetExPanelInfo //------------------------------------------------------------------------------------------------- /// msAPI_Scaler_FPLL_FSM /// @ingroup XC_ToBeRemove //------------------------------------------------------------------------------------------------- void msAPI_Scaler_FPLL_FSM(SCALER_WIN eWindow); //------------------------------------------------------------------------------------------------- /// MApi_XC_EnableMirrorMode /// @ingroup XC_ToBeRemove //------------------------------------------------------------------------------------------------- void MApi_XC_EnableMirrorMode( MS_BOOL bEnable ); //------------------------------------------------------------------------------------------------- /// MApi_XC_EnableMirrorMode2 /// @ingroup XC_ToBeRemove //------------------------------------------------------------------------------------------------- void MApi_XC_EnableMirrorMode2( MirrorMode_t eMirrorMode ); //------------------------------------------------------------------------------------------------- /// MApi_XC_GetMirrorModeType /// @ingroup XC_ToBeRemove //------------------------------------------------------------------------------------------------- MirrorMode_t MApi_XC_GetMirrorModeType( void ); //------------------------------------------------------------------------------------------------- /// MApi_XC_set_FD_Mask /// @ingroup XC_ToBeRemove //------------------------------------------------------------------------------------------------- void MApi_XC_set_FD_Mask(MS_BOOL bEnable); //------------------------------------------------------------------------------------------------- /// MApi_XC_Get_FD_Mask /// @ingroup XC_ToBeRemove //------------------------------------------------------------------------------------------------- MS_BOOL MApi_XC_Get_FD_Mask(void); //------------------------------------------------------------------------------------------------- /// MApi_XC_GetAccurateVFreqx1K is obsolete, please use MApi_XC_CalculateVFreqx10 instead! /// the return vfreq of this function is not accurate when signal is not stable or have noise, so it's not /// suitable as interface for Ap use at any time. /// @ingroup XC_ToBeRemove //------------------------------------------------------------------------------------------------- //------------------------------------------------------------------------------------------------- MS_U32 MApi_XC_GetAccurateVFreqx1K(SCALER_WIN eWindow); //================================ Obsolete Function End ======================================= //------------------------------------------------------------------------------------------------- /// Handler xc customer request. /// @param u32Cmd \b IN:cmd type /// @param pbuf \b IN:input value depend on cmd type /// @param u32Cmd \b IN:input structure size for validatition /// @return MS_BOOL: TRUE - Success, FALSE - Fail //------------------------------------------------------------------------------------------------- MS_BOOL MApi_XC_S_Disp_Ctrl(MS_U32 u32Cmd,void *pbuf,MS_U32 u32BufSize); #ifdef UFO_XC_SETBLACKVIDEOBYMODE //------------------------------------------------------------------------------------------------- /// This function will enable/diable output black pattern by mode /// @param bEnable \b IN: TRUE: enable, FALSE: otherwise /// @param eWindow \b IN: which window we are going to query /// @param eMode \b IN: which black video mode we are going to use //------------------------------------------------------------------------------------------------- E_APIXC_ReturnValue SYMBOL_WEAK MApi_XC_GenerateBlackVideoByMode(MS_BOOL bEnable, SCALER_WIN eWindow, EN_XC_BLACK_VIDEO_MODE eMode); #endif //================================ Obsolete Function End ======================================= //------------------------------------------------------------------------------------------------- /// MApi_XC_IsSupport2StepScaling /// @return MS_BOOL: TRUE - Support 2 Step Scaling, FALSE - Not Support 2 Step Scaling //------------------------------------------------------------------------------------------------- MS_BOOL MApi_XC_IsSupport2StepScaling(void); //------------------------------------------------------------------------------------------------- /// MApi_XC_GetPQFlowStatus /// @param u16Width \b IN: timing width /// @param u16Height \b IN: timing height /// @return MS_BOOL: TRUE - is 4k timing, FALSE - Not 4k timing //------------------------------------------------------------------------------------------------- #ifdef UFO_XC_PQ_PATH MS_BOOL SYMBOL_WEAK MApi_XC_GetPQPathStatus(E_XC_PQ_Path_Type ePqPathType, MS_U16 u16Width, MS_U16 u16Height); #endif //------------------------------------------------------------------------------------------------- /// Set Scaler IP input test pattern. /// @ingroup XC_TEST_PATTERN /// @param u8Enable \b IN: Set 1 to enable. Bit(0) is horizontal pattern and Bit(1) is vertical pattern /// @param u6Pattern_type \b IN: The pattern type. (the width of each pattern) /// @param eWindow \b IN: @ref SCALER_WIN //------------------------------------------------------------------------------------------------- void MApi_XC_SetIP1TestPattern(MS_U8 u8Enable, MS_U16 u16Pattern_type, SCALER_WIN eWindow); //------------------------------------------------------------------------------------------------- /// MApi_XC_Set_OP2_Pattern /// @ingroup XC_TEST_PATTERN /// @param bEnable \b IN: enable/disable OP2 pattern /// @param u16R_Data \b IN: when enable OP2 patter ,Data Generator for r_cr constant /// @param u16G_Data \b IN: when enable OP2 patter ,Data Generator for g_y constant /// @param u16B_Data \b IN: when enable OP2 patter ,Data Generator for b_cb constant /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL or E_APIXC_RET_FAIL_FUN_NOT_SUPPORT //------------------------------------------------------------------------------------------------- E_APIXC_ReturnValue MApi_XC_Set_OP2_Pattern(MS_BOOL bEnable, MS_U16 u16R_Data, MS_U16 u16G_Data ,MS_U16 u16B_Data); #ifdef UFO_XC_FORCEWRITE_V2 //------------------------------------------------------------------------------------------------- /// When the muteType is enabled, the vsync will be skipped and the registers will be written directly /// @param enMuteType \b IN: the mute type could be MainWindow, SubWindow and Panel /// @param bIsForceWrite \b IN: Force write or not //------------------------------------------------------------------------------------------------- E_APIXC_ReturnValue SYMBOL_WEAK MApi_XC_SetForceWrite( EN_MUTE_TYPE enMuteType, MS_BOOL bIsForceWrite); //------------------------------------------------------------------------------------------------- /// Get the status of enMuteType which is writen directly or not. /// @param enMuteType \b IN: the mute type could be MainWindow, SubWindow and Panel //------------------------------------------------------------------------------------------------- MS_BOOL SYMBOL_WEAK MApi_XC_GetForceWrite( EN_MUTE_TYPE enMuteType); #endif //------------------------------------------------------------------------------------------------- /// Video Playback Controller. /// @param u32Cmd \b IN:cmd type /// @param pbuf \b IN:input value depend on cmd type /// @param u32Cmd \b IN:input structure size for validatition /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL //------------------------------------------------------------------------------------------------- E_APIXC_ReturnValue SYMBOL_WEAK MApi_XC_VideoPlaybackCtrl(MS_U32 u32Cmd,void *pCmdArgs,MS_U32 u32CmdArgsSize); #ifdef UFO_XC_AUTO_DOWNLOAD //------------------------------------------------------------------------------------------------- /// Config auto download. /// note: /// Please call MApi_XC_GetChipCaps(E_XC_SUPPORT_AUTODOWNLOAD_CLIENT) before calling the api. /// if the client is supported, and then call the api, otherwise, it would be fail. /// @param pstConfigInfo \b IN: pointer to config info, refer to XC_AUTODOWNLOAD_CONFIG_INFO /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL //------------------------------------------------------------------------------------------------- E_APIXC_ReturnValue SYMBOL_WEAK MApi_XC_AutoDownload_Config(XC_AUTODOWNLOAD_CONFIG_INFO *pstConfigInfo); //------------------------------------------------------------------------------------------------- /// Write data to auto download. /// note: /// Please call MApi_XC_GetChipCaps(E_XC_SUPPORT_AUTODOWNLOAD_CLIENT) before calling the api. /// if the client is supported, and then call the api, otherwise, it would be fail. /// @param pstConfigInfo \b IN: pointer to data info, refer to XC_AUTODOWNLOAD_DATA_INFO /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL //------------------------------------------------------------------------------------------------- E_APIXC_ReturnValue SYMBOL_WEAK MApi_XC_AutoDownload_Write(XC_AUTODOWNLOAD_DATA_INFO *pstDataInfo); //------------------------------------------------------------------------------------------------- /// fire auto download for writting data into SRAM. /// note: /// Please call MApi_XC_GetChipCaps(E_XC_SUPPORT_AUTODOWNLOAD_CLIENT) before calling the api. /// if the client is supported, and then call the api, otherwise, it would be fail. /// @param enClient \b IN: current client /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL //------------------------------------------------------------------------------------------------- E_APIXC_ReturnValue SYMBOL_WEAK MApi_XC_AutoDownload_Fire(EN_XC_AUTODOWNLOAD_CLIENT enClient); #endif #ifdef UFO_XC_HDR #if (UFO_XC_HDR_VERSION == 2) //------------------------------------------------------------------------------------------------- /// Control HDR. /// HDMI dobly case usage: /// /// FILE * pFile = fopen("/xxx/3d_lut.bin","rw"); /// MS_U32 u32ReadSize = 0; /// MS_U32 u32Size = ftell (pFile); /// MS_U8 *pu8Data = (MS_U8 *)malloc(u32Size); /// u32ReadSize = fread(pData, 1, u32Size, pFile); /// /// XC_HDR_3DLUT_INFO st3DLutInfo; /// memset(&st3DLutInfo, 0, sizeof(XC_HDR_3DLUT_INFO)); /// st3DLutInfo.u323DLutInfo_Version = HDR_3DLUT_INFO_VERSION; /// st3DLutInfo.u163DLutInfo_Length = sizeof(XC_HDR_3DLUT_INFO); /// st3DLutInfo.pu8Data = pu8Data; /// st3DLutInfo.u32Size = u32ReadSize; /// MApi_XC_HDR_Control(E_XC_HDR_CTRL_SET_3DLUT, &st3DLutInfo); /// /// EN_XC_HDR_TYPE enType = E_XC_HDR_TYPE_DOLBY; /// MApi_XC_HDR_Control(E_XC_HDR_CTRL_SET_TYPE, &enType); /// /// MMapInfo_t *minfo = MMAPInfo::GetInstance()->get_mmap(MMAPInfo::GetInstance()->StrToMMAPID("XXXX")); /// /// XC_HDR_DMA_INIT_INFO stDMAInitInfo; /// memset(&stDMAInitInfo, 0, sizeof(XC_HDR_DMA_INIT_INFO)); /// stDMAInitInfo.u32DMAInitInfo_Version = HDR_DMA_INIT_INFO_VERSION; /// stDMAInitInfo.u16DMAInitInfo_Length = sizeof(XC_HDR_DMA_INIT_INFO); /// stDMAInitInfo.phyBaseAddr = minfo->u32Addr; /// stDMAInitInfo.u32Size = minfo->u32Size; /// MApi_XC_HDR_Control(E_XC_HDR_CTRL_INIT_DMA, &stDMAInitInfo); /// /// EN_XC_HDR_COLOR_FORMAT enColorFormat = E_XC_HDR_COLOR_YUV422; /// MApi_XC_HDR_Control(E_XC_HDR_CTRL_SET_COLOR_FORMAT, &enColorFormat); /// /// XC_HDR_DMA_CONFIG_INFO stDMAConfigInfo; /// memset(&stDMAConfigInfo, 0, sizeof(XC_HDR_DMA_CONFIG_INFO)); /// stDMAConfigInfo.u32DMAConfigInfo_Version = HDR_DMA_CONFIG_INFO_VERSION; /// stDMAConfigInfo.u16DMAConfigInfo_Length = sizeof(XC_HDR_DMA_CONFIG_INFO); /// stDMAConfigInfo.eMode = E_XC_HDR_DMA_MODE_12BIT; /// MApi_XC_HDR_Control(E_XC_HDR_CTRL_CONFIG_DMA, &stDMAConfigInfo); /// /// MS_BOOL bEnable = TRUE; /// //after these previous API are called, then call it. /// MApi_XC_HDR_Control(E_XC_HDR_CTRL_ENABLE, &bEnable); /// /// HDMI open case usage: /// EN_XC_HDR_TYPE enType = E_XC_HDR_TYPE_OPEN; /// MApi_XC_HDR_Control(E_XC_HDR_CTRL_SET_TYPE, &enType); /// /// EN_XC_HDR_COLOR_FORMAT enColorFormat = E_XC_HDR_COLOR_YUV422; /// MApi_XC_HDR_Control(E_XC_HDR_CTRL_SET_COLOR_FORMAT, &enColorFormat); /// /// XC_HDR_OPEN_METADATA_INFO stOpenMetadtaInfo; /// ...... /// MApi_XC_HDR_Control(E_XC_HDR_CTRL_SET_OPEN_METADATA, &stOpenMetadtaInfo); /// /// MS_BOOL bEnable = TRUE; /// //after these previous API are called, then call it. /// MApi_XC_HDR_Control(E_XC_HDR_CTRL_ENABLE, &bEnable); /// /// @param enCtrlType \b IN: ctrl type /// @param pParam \b IN: param, refer to EN_XC_HDR_CTRL_TYPE /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL //------------------------------------------------------------------------------------------------- E_APIXC_ReturnValue SYMBOL_WEAK MApi_XC_HDR_Control(EN_XC_HDR_CTRL_TYPE enCtrlType, void *pParam); #endif #endif #ifdef UFO_XC_SCAN_TYPE //------------------------------------------------------------------------------------------------- /// Set different scan type. /// @param enScanType \b IN: scan type. Normal/ForceP/ForceI /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL //------------------------------------------------------------------------------------------------- E_APIXC_ReturnValue SYMBOL_WEAK MApi_XC_SetScanType(E_XC_SCAN_TYPE enScanType); #endif //------------------------------------------------------------------------------------------------- /// This function will set FB level which decide the method of how to use xc buffer /// @param eFBLevel \b IN: FB level /// @param eWindow \b IN: which window we are going to query /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL //------------------------------------------------------------------------------------------------- E_APIXC_ReturnValue SYMBOL_WEAK MApi_XC_Set_FB_Level(E_XC_FB_LEVEL eFBLevel, SCALER_WIN eWindow); //---------------------------------------------------------------------------------------------- /// This function will get current FB level which decide the method of how to use xc buffer /// @param peFBLevel \b OUT: FB level /// @param eWindow \b IN: which window we are going to query /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL //------------------------------------------------------------------------------------------------- E_XC_FB_LEVEL SYMBOL_WEAK MApi_XC_Get_FB_Level(SCALER_WIN eWindow); //------------------------------------------------------------------------------------------------- /// fire DS comment /// @param eWindow \b IN:main win / sub win //------------------------------------------------------------------------------------------------- void SYMBOL_WEAK MApi_SWDS_Fire(SCALER_WIN eWindow ); //------------------------------------------------------------------------------------------------- /// OPTEE secure lock xc /// note: /// @param u32PipeID \b IN: pipeline ID /// @param U32RetResNum \b IN: RetResNum /// @param pResource \b IN: Resource /// @return U32 //------------------------------------------------------------------------------------------------- MS_U32 MApi_XC_GetResourceByPipeID(MS_U32 u32PipeID, MS_U32* u32RetResNum, RESOURCE* pResource); //------------------------------------------------------------------------------------------------- /// OPTEE secure update xc setting /// note: /// @param u32PipeID \b IN: pipeline ID /// @param u32SecureDMA \b IN: SecureDMA /// @param u32OperationMode \b IN: OperationMode /// @return U32 //------------------------------------------------------------------------------------------------- MS_BOOL MApi_XC_OPTEE_CheckRBase(SCALER_WIN eWindow); //------------------------------------------------------------------------------------------------- /// OPTEE secure check memory access is legal /// note: /// @param eWindow \b IN:main win / sub win /// @return BOOL //------------------------------------------------------------------------------------------------- MS_U32 MApi_XC_ConfigPipe(MS_U32 u32PipeID, MS_U32 u32SecureDMA, MS_U32 u32OperationMode); //------------------------------------------------------------------------------------------------- /// OPTEE check pipleline ID /// note: /// @param u32PipeID \b IN: pipeline ID /// @param u32SecureDMA \b IN: SecureDMA /// @param u32OperationMode \b IN: OperationMode /// @return U32 //------------------------------------------------------------------------------------------------- MS_U32 MApi_XC_CheckPipe(MS_U32 u32PipeID, MS_U32 u32SecureDMA, MS_U32 u32OperationMode); //------------------------------------------------------------------------------------------------- /// Set OPTEE control action for xc part /// note: /// @param action \b IN: control action type /// @param xc_handler \b IN: xc handler data /// @return BOOL //------------------------------------------------------------------------------------------------- MS_BOOL MApi_XC_OPTEE_Control(EN_XC_OPTEE_ACTION action,XC_OPTEE_HANDLER* xc_handler); //------------------------------------------------------------------------------------------------- /// Set OPTEE control action for ipmux part /// note: /// @param action \b IN: control action type /// @param xc_mux_data \b IN: ipmux handler data /// @return BOOL //------------------------------------------------------------------------------------------------- MS_BOOL MApi_XC_OPTEE_Mux(EN_XC_OPTEE_ACTION action,XC_OPTEE_MUX_DATA xc_mux_data); //---------------------------------------------------------------------------------------------- /// This function is uesd for Poll kernel event /// @return TURE/FALSE //------------------------------------------------------------------------------------------------- MS_BOOL SYMBOL_WEAK MApi_XC_PollEvent(void); #ifdef UFO_XC_DE_MODE void SYMBOL_WEAK MApi_XC_Set_HandshakeMode(MS_U8 u8MD, SCALER_WIN eWindow); #endif //------------------------------------------------------------------------------------------------- /// XC scmi dual miu control /// @param bEnable \b IN:Disable or enable Dual. /// @param u32LeftFactor \b IN:Dual bw ratio left factor. XC BW use will be u32LeftFactor:u32RightFactor /// @param u32RightFactor \b IN:Dual bw ratio right factor. This Ratio should is recomanded between 1:3 and 3:1. /// @param eWindow \b IN:main win / sub win /// @return TRUE or FALSE //------------------------------------------------------------------------------------------------- MS_BOOL SYMBOL_WEAK MApi_XC_EnableMiuDualMode(MS_BOOL bEnable, MS_U32 u32LeftFactor, MS_U32 u32RightFactor, SCALER_WIN eWindow); //------------------------------------------------------------------------------------------------------ /// MApi_XC_Get3DFormat /// @param e3DAttrType \b IN: The attribute of 3D /// @param para \b IN: A pointer points to parameters which need to pass value according to attribute type /// @param p3DFormat \b out: A pointer points to 3D format. It may input 3D format or output 3D format depending /// value of para. If value of para is HW IP, the 3D format is input 3D format. If value of para is HW OP, the 3D format is /// output 3D format. /// example: /// 1 *para == E_XC_3D_OSD_BLENDING_SC_IP or E_XC_3D_OSD_BLENDING_FRC_IP /// => *p3DFormat == E_XC_3D_INPUT_MODE /// 2 *para == E_XC_3D_OSD_BLENDING_SC_OP or E_XC_3D_OSD_BLENDING_FRC_OP /// => *p3DFormat == E_XC_3D_OUTPUT_MODE /// @return MS_BOOL \b OUT: TRUE->get 3D format successfully, FALSE->fail to get 3D format //------------------------------------------------------------------------------------------------------ MS_BOOL SYMBOL_WEAK MApi_XC_Get3DFormat(E_XC_3D_ATTRIBUTE_TYPE e3DAttrType, void* para, void* p3DFormat); //------------------------------------------------------------------------------------------------- /// Set SWDR Information /// @ingroup CFD /// @param pSWDR_INFO \b IN: SWDR information /// @return TRUE or FALSE //------------------------------------------------------------------------------------------------- MS_BOOL SYMBOL_WEAK MApi_XC_SetSWDRInfo(XC_SWDR_INFO *pSWDR_INFO); //------------------------------------------------------------------------------------------------- /// Get SWDR Information /// @ingroup CFD /// @param pSWDR_INFO \b IN: SWDR information /// @return TRUE or FALSE //------------------------------------------------------------------------------------------------- MS_BOOL SYMBOL_WEAK MApi_XC_GetSWDRInfo(XC_SWDR_INFO *pSWDR_INFO); #ifdef UFO_XC_SUPPORT_HDMI_DOWNSCALE_OUTPUT_POLICY //------------------------------------------------------------------------------------------------- /// Get policy Information /// @ingroup OPTEE /// @return policy information // +-----+-----+-----+-----+ // |8bits|8bits|8bits|8bits| // +-----+-----+-----+-----+ // | 4K | FHD | HD | SD | // +-----+-----+-----+-----+ // 8bits info: 0->none, 1->BLUESCREEN, 2->SD, 3->HD, 4->FHD, 5->4K2K //------------------------------------------------------------------------------------------------- MS_U32 SYMBOL_WEAK MApi_XC_GetHDMIPolicy(void); #endif #undef INTERFACE #ifdef __cplusplus } #endif #endif /* _API_XC_H_ */