1 //<MStar Software> 2 //****************************************************************************** 3 // MStar Software 4 // Copyright (c) 2010 - 2012 MStar Semiconductor, Inc. All rights reserved. 5 // All software, firmware and related documentation herein ("MStar Software") are 6 // intellectual property of MStar Semiconductor, Inc. ("MStar") and protected by 7 // law, including, but not limited to, copyright law and international treaties. 8 // Any use, modification, reproduction, retransmission, or republication of all 9 // or part of MStar Software is expressly prohibited, unless prior written 10 // permission has been granted by MStar. 11 // 12 // By accessing, browsing and/or using MStar Software, you acknowledge that you 13 // have read, understood, and agree, to be bound by below terms ("Terms") and to 14 // comply with all applicable laws and regulations: 15 // 16 // 1. MStar shall retain any and all right, ownership and interest to MStar 17 // Software and any modification/derivatives thereof. 18 // No right, ownership, or interest to MStar Software and any 19 // modification/derivatives thereof is transferred to you under Terms. 20 // 21 // 2. You understand that MStar Software might include, incorporate or be 22 // supplied together with third party`s software and the use of MStar 23 // Software may require additional licenses from third parties. 24 // Therefore, you hereby agree it is your sole responsibility to separately 25 // obtain any and all third party right and license necessary for your use of 26 // such third party`s software. 27 // 28 // 3. MStar Software and any modification/derivatives thereof shall be deemed as 29 // MStar`s confidential information and you agree to keep MStar`s 30 // confidential information in strictest confidence and not disclose to any 31 // third party. 32 // 33 // 4. MStar Software is provided on an "AS IS" basis without warranties of any 34 // kind. Any warranties are hereby expressly disclaimed by MStar, including 35 // without limitation, any warranties of merchantability, non-infringement of 36 // intellectual property rights, fitness for a particular purpose, error free 37 // and in conformity with any international standard. You agree to waive any 38 // claim against MStar for any loss, damage, cost or expense that you may 39 // incur related to your use of MStar Software. 40 // In no event shall MStar be liable for any direct, indirect, incidental or 41 // consequential damages, including without limitation, lost of profit or 42 // revenues, lost or damage of data, and unauthorized system use. 43 // You agree that this Section 4 shall still apply without being affected 44 // even if MStar Software has been modified by MStar in accordance with your 45 // request or instruction for your use, except otherwise agreed by both 46 // parties in writing. 47 // 48 // 5. If requested, MStar may from time to time provide technical supports or 49 // services in relation with MStar Software to you for your use of 50 // MStar Software in conjunction with your or your customer`s product 51 // ("Services"). 52 // You understand and agree that, except otherwise agreed by both parties in 53 // writing, Services are provided on an "AS IS" basis and the warranty 54 // disclaimer set forth in Section 4 above shall apply. 55 // 56 // 6. Nothing contained herein shall be construed as by implication, estoppels 57 // or otherwise: 58 // (a) conferring any license or right to use MStar name, trademark, service 59 // mark, symbol or any other identification; 60 // (b) obligating MStar or any of its affiliates to furnish any person, 61 // including without limitation, you and your customers, any assistance 62 // of any kind whatsoever, or any information; or 63 // (c) conferring any license or right under any intellectual property right. 64 // 65 // 7. These terms shall be governed by and construed in accordance with the laws 66 // of Taiwan, R.O.C., excluding its conflict of law rules. 67 // Any and all dispute arising out hereof or related hereto shall be finally 68 // settled by arbitration referred to the Chinese Arbitration Association, 69 // Taipei in accordance with the ROC Arbitration Law and the Arbitration 70 // Rules of the Association by three (3) arbitrators appointed in accordance 71 // with the said Rules. 72 // The place of arbitration shall be in Taipei, Taiwan and the language shall 73 // be English. 74 // The arbitration award shall be final and binding to both parties. 75 // 76 //****************************************************************************** 77 //<MStar Software> 78 //////////////////////////////////////////////////////////////////////////////// 79 // 80 // Copyright (c) 2008-2009 MStar Semiconductor, Inc. 81 // All rights reserved. 82 // 83 // Unless otherwise stipulated in writing, any and all information contained 84 // herein regardless in any format shall remain the sole proprietary of 85 // MStar Semiconductor Inc. and be kept in strict confidence 86 // ("MStar Confidential Information") by the recipient. 87 // Any unauthorized act including without limitation unauthorized disclosure, 88 // copying, use, reproduction, sale, distribution, modification, disassembling, 89 // reverse engineering and compiling of the contents of MStar Confidential 90 // Information is unlawful and strictly prohibited. MStar hereby reserves the 91 // rights to any and all damages, losses, costs and expenses resulting therefrom. 92 // 93 //////////////////////////////////////////////////////////////////////////////// 94 95 /////////////////////////////////////////////////////////////////////////////////////////////////// 96 /// 97 /// @file apiXC_EX.h 98 /// @brief XC EXTENSION Interface FOR DUAL STREAMS 99 /// @author MStar Semiconductor Inc. 100 /////////////////////////////////////////////////////////////////////////////////////////////////// 101 102 #ifndef _API_XC_EX_H_ 103 #define _API_XC_EX_H_ 104 105 #include "MsCommon.h" 106 // Driver 107 #include "drvXC_IOPort.h" 108 109 #ifdef __cplusplus 110 extern "C" 111 { 112 #endif 113 114 115 //------------------------------------------------------------------------------------------------- 116 // Macro and Define 117 //------------------------------------------------------------------------------------------------- 118 // library information 119 #define MSIF_XC_EX_LIB_CODE {'X','C','E','X'} 120 #define MSIF_XC_EX_LIBVER {'0','9'} 121 #define MSIF_XC_EX_BUILDNUM {'0','8'} 122 #define MSIF_XC_EX_CHANGELIST {'0','0','7','0','9','8','0','1'} 123 #define XC_EX_API_VERSION /* Character String for DRV/API version */ \ 124 MSIF_TAG, /* 'MSIF' */ \ 125 MSIF_CLASS, /* '00' */ \ 126 MSIF_CUS, /* 0x0000 */ \ 127 MSIF_MOD, /* 0x0000 */ \ 128 MSIF_CHIP, \ 129 MSIF_CPU, \ 130 MSIF_XC_EX_LIB_CODE , /* IP__ */ \ 131 MSIF_XC_EX_LIBVER , /* 0.0 ~ Z.Z */ \ 132 MSIF_XC_EX_BUILDNUM , /* 00 ~ 99 */ \ 133 MSIF_XC_EX_CHANGELIST, /* CL# */ \ 134 MSIF_OS 135 136 #define XC_EX_INITDATA_VERSION 1 137 #define XC_EX_OUTPUT_TIMING_ADJUST_VERSION 1 138 /// PANEL_INFO_EX version of current XC lib 139 #define XC_EX_PANEL_INFO_EX_VERSION 2 140 /// hw 2d to 3d para version 141 #define XC_EX_HW2DTO3DPARA_VERSION 2 142 /// 3d detect format para version 143 #define XC_EX_DETECT3DFORMATPARA_VERSION 1 144 145 /// ApiStatusEX version of current XC lib 146 /// Define below to distinguish from API_PNLSTATUS_EX_VERSION 147 #define XC_EX_APISTATUS_EX_VERSION 2 148 //#define API_STATUS_EX_VERSION XC_EX_APISTATUS_EX_VERSION 149 150 /// 3d fp info version of current XC lib 151 #define XC_EX_3D_FPINFOPARA_VERSION 1 152 /// report pixel info version of current XC lib 153 #define XC_EX_REPORT_PIXELINFO_VERSION 1 154 155 /// osdc disp info version of current XC lib 156 #define XC_EX_ODSC_DISPINFO_VERSIN 1 157 158 #define _XC_EX_BIT(_bit_) (1 << (_bit_)) 159 160 //---------------------------- 161 // Return value 162 //---------------------------- 163 164 /// XC Return Value 165 typedef enum 166 { 167 E_XC_EX_RET_FAIL = 0, ///<Fail 168 E_XC_EX_RET_OK, ///<OK 169 E_XC_EX_RET_FAIL_FUN_NOT_SUPPORT, ///<Fail 170 E_XC_EX_RET_FAIL_ENUM_NOT_SUPPORT, ///<Fail 171 E_XC_EX_RET_FAIL_INVALID_PARAMETER, ///<Fail 172 } XC_EX_RETURN_VALUE; 173 174 //---------------------------- 175 // Debug Switch 176 //---------------------------- 177 #define XC_EX_DBGLEVEL_OFF (0x0000) ///< Turn off 178 #define XC_EX_DBGLEVEL_SETWINDOW (0x0001) ///< Set Window 179 #define XC_EX_DBGLEVEL_SETTIMING (0x0002) ///< LPLL / SetPanelTiming 180 #define XC_EX_DBGLEVEL_SYNCDETECT (0x0004) ///< Sync detection ======>Not using it by now 181 #define XC_EX_DBGLEVEL_MUX (0x0008) ///< Mux / Path Creation 182 #define XC_EX_DBGLEVEL_MODEPARSE (0x0010) ///< Mode Parse ======>Not using it by now 183 #define XC_EX_DBGLEVEL_HDMIMONITOR (0x0020) ///< HDMI and Package Monitor ===>Not using it by now 184 #define XC_EX_DBGLEVEL_AUTOGEOMETRY (0x0040) ///< Auto Geometry / Auto Calibration 185 #define XC_EX_DGBLEVEL_CROPCALC (0x0080) ///< Crop Window / Memory / OPM / IPM calculation 186 187 #define XC_EX_DBGLEVEL_SETTIMING_ISR (0x0100) ///< ISR / SetPanelTiming 188 #define XC_EX_DBGLEVEL_DWIN_SETWINDOW (0x0200) ///< DWIN / Set Window 189 #define XC_EX_DBGLEVEL_FUNCTION_TRACE (0x0400) ///< Trace XC function using status 190 #define XC_EX_DBGLEVEL_PARAMETER_TRACE (0x0800) ///< Trace XC function parameter 191 192 //---------------------------- 193 // Input signal detect 194 //---------------------------- 195 196 #define XC_EX_MD_VSYNC_POR_BIT _XC_EX_BIT(0) ///< VSnc polarity bit(0/1 = positive/negative) 197 #define XC_EX_MD_HSYNC_POR_BIT _XC_EX_BIT(1) ///< HSync polarity bit(0/1 = positive/negative) 198 #define XC_EX_MD_HSYNC_LOSS_BIT _XC_EX_BIT(2) ///< HSync loss bit 199 #define XC_EX_MD_VSYNC_LOSS_BIT _XC_EX_BIT(3) ///< VSync loss bit 200 #define XC_EX_MD_INTERLACE_BIT _XC_EX_BIT(4) ///< Interlace mode 201 #define XC_EX_MD_USER_MODE_BIT _XC_EX_BIT(7) ///< User new mode (Not found in mode table) 202 #define XC_EX_MD_SYNC_LOSS (XC_EX_MD_HSYNC_LOSS_BIT | XC_EX_MD_VSYNC_LOSS_BIT) ///< VSync & HSync loss bit 203 204 //---------------------------- 205 // 3D macros 206 //---------------------------- 207 #define XC_EX_DOUBLEHD_PRESCALE_VONEHDSIZE (540) 208 209 #define XC_EX_DOUBLEHD_1080X2I_FRAME_VSIZE (1080) 210 #define XC_EX_DOUBLEHD_1080X2I_FIELD_VSIZE (540) 211 #define XC_EX_DOUBLEHD_1080X2I_HSIZE (1920) 212 #define XC_EX_DOUBLEHD_1080X2I_VACT_SPACE1 (23) 213 #define XC_EX_DOUBLEHD_1080X2I_VACT_SPACE2 (22) 214 #define XC_EX_DOUBLEHD_1080X2I_VSIZE (XC_EX_DOUBLEHD_1080X2I_FRAME_VSIZE*2+XC_EX_DOUBLEHD_1080X2I_VACT_SPACE1*2+XC_EX_DOUBLEHD_1080X2I_VACT_SPACE2) 215 216 #define XC_EX_DOUBLEHD_1080X2P_VSIZE (2205) 217 #define XC_EX_DOUBLEHD_1080X2P_FRAME_VSIZE (1080) 218 #define XC_EX_DOUBLEHD_1080X2P_HSIZE (1920) 219 #define XC_EX_DOUBLEHD_1080X2P_GARBAGE_VSIZE (45) 220 221 #define XC_EX_DOUBLEHD_720X2P_VSIZE (1470) 222 #define XC_EX_DOUBLEHD_720X2P_FRAME_VSIZE (720) 223 #define XC_EX_DOUBLEHD_720X2P_HSIZE (1280) 224 #define XC_EX_DOUBLEHD_720X2P_GARBAGE_VSIZE (30) 225 226 #define XC_EX_DOUBLEHD_576X2P_VSIZE (1201) 227 #define XC_EX_DOUBLEHD_576X2P_FRAME_VSIZE (576) 228 #define XC_EX_DOUBLEHD_576X2P_HSIZE (720) 229 #define XC_EX_DOUBLEHD_576X2P_GARBAGE_VSIZE (49) 230 231 232 #define XC_EX_DOUBLEHD_480X2P_VSIZE (1005) 233 #define XC_EX_DOUBLEHD_480X2P_FRAME_VSIZE (480) 234 #define XC_EX_DOUBLEHD_480X2P_HSIZE (720) 235 #define XC_EX_DOUBLEHD_480X2P_GARBAGE_VSIZE (45) 236 237 // Field Interleave 238 #define XC_EX_FIELD_INTERLEAVE_1080X2I_FRAME_VSIZE (1080) 239 #define XC_EX_FIELD_INTERLEAVE_1080X2I_FIELD_VISZE (540) 240 #define XC_EX_FIELD_INTERLEAVE_1080X2I_HISZE (1920) 241 #define XC_EX_FIELD_INTERLEAVE_1080X2I_VACT_SPACE (23) 242 #define XC_EX_FIELD_INTERLEAVE_1080X2I_VISZE (XC_EX_FIELD_INTERLEAVE_1080X2I_FRAME_VSIZE+XC_EX_FIELD_INTERLEAVE_1080X2I_VACT_SPACE) 243 244 245 ///< When disable panel_info_ex, this means disable all valid panel info 246 #define XC_EX_PANEL_INFO_EX_INVALID_ALL 0xFFFF 247 //------------------------------------------------------------------------------------------------- 248 // Type and Structure 249 //------------------------------------------------------------------------------------------------- 250 251 //---------------------------- 252 // Common 253 //---------------------------- 254 255 /// Define window type 256 typedef enum 257 { 258 E_XC_EX_MAIN_WINDOW=0, ///< main window if with PIP or without PIP 259 E_XC_EX_SUB_WINDOW=1, ///< sub window if PIP 260 E_XC_EX_MAX_WINDOW /// The max support window 261 } XC_EX_SCALER_WIN; 262 263 #define XC_EX_PIP_WINDOWS E_XC_EX_MAX_WINDOW 264 265 /// Define Window position and size attribute 266 typedef struct 267 { 268 MS_U16 x; ///<start x of the window 269 MS_U16 y; ///<start y of the window 270 MS_U16 width; ///<width of the window 271 MS_U16 height; ///<height of the window 272 } XC_EX_WINDOW_TYPE; 273 274 //////////////////////////////////////////////////////////////////////////////// 275 // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 276 // This is abstract input source for XC library. If you want to add another one. 277 // Please contace with XC member 278 //////////////////////////////////////////////////////////////////////////////// 279 280 /// Define Input type 281 typedef enum 282 { 283 E_XC_EX_INPUT_SOURCE_VGA, ///<0 VGA input 284 E_XC_EX_INPUT_SOURCE_TV, ///<1 TV input 285 286 E_XC_EX_INPUT_SOURCE_CVBS, ///<2 AV 1 287 E_XC_EX_INPUT_SOURCE_CVBS2, ///<3 AV 2 288 E_XC_EX_INPUT_SOURCE_CVBS3, ///<4 AV 3 289 E_XC_EX_INPUT_SOURCE_CVBS4, ///<5 AV 4 290 E_XC_EX_INPUT_SOURCE_CVBS5, ///<6 AV 5 291 E_XC_EX_INPUT_SOURCE_CVBS6, ///<7 AV 6 292 E_XC_EX_INPUT_SOURCE_CVBS7, ///<8 AV 7 293 E_XC_EX_INPUT_SOURCE_CVBS8, ///<9 AV 8 294 E_XC_EX_INPUT_SOURCE_CVBS_MAX, ///<10 AV max 295 296 E_XC_EX_INPUT_SOURCE_SVIDEO, ///<11 S-video 1 297 E_XC_EX_INPUT_SOURCE_SVIDEO2, ///<12 S-video 2 298 E_XC_EX_INPUT_SOURCE_SVIDEO3, ///<13 S-video 3 299 E_XC_EX_INPUT_SOURCE_SVIDEO4, ///<14 S-video 4 300 E_XC_EX_INPUT_SOURCE_SVIDEO_MAX, ///<15 S-video max 301 302 E_XC_EX_INPUT_SOURCE_YPBPR, ///<16 Component 1 303 E_XC_EX_INPUT_SOURCE_YPBPR2, ///<17 Component 2 304 E_XC_EX_INPUT_SOURCE_YPBPR3, ///<18 Component 3 305 E_XC_EX_INPUT_SOURCE_YPBPR_MAX, ///<19 Component max 306 307 E_XC_EX_INPUT_SOURCE_SCART, ///<20 Scart 1 308 E_XC_EX_INPUT_SOURCE_SCART2, ///<21 Scart 2 309 E_XC_EX_INPUT_SOURCE_SCART_MAX, ///<22 Scart max 310 311 E_XC_EX_INPUT_SOURCE_HDMI, ///<23 HDMI 1 312 E_XC_EX_INPUT_SOURCE_HDMI2, ///<24 HDMI 2 313 E_XC_EX_INPUT_SOURCE_HDMI3, ///<25 HDMI 3 314 E_XC_EX_INPUT_SOURCE_HDMI4, ///<26 HDMI 4 315 E_XC_EX_INPUT_SOURCE_HDMI_MAX, ///<27 HDMI max 316 317 E_XC_EX_INPUT_SOURCE_DTV, ///<28 DTV 318 319 E_XC_EX_INPUT_SOURCE_DVI, ///<29 DVI 1 320 E_XC_EX_INPUT_SOURCE_DVI2, ///<30 DVI 2 321 E_XC_EX_INPUT_SOURCE_DVI3, ///<31 DVI 2 322 E_XC_EX_INPUT_SOURCE_DVI4, ///<32 DVI 4 323 E_XC_EX_INPUT_SOURCE_DVI_MAX, ///<33 DVI max 324 325 // Application source 326 E_XC_EX_INPUT_SOURCE_STORAGE, ///<34 Storage 327 E_XC_EX_INPUT_SOURCE_KTV, ///<35 KTV 328 E_XC_EX_INPUT_SOURCE_JPEG, ///<36 JPEG 329 330 //Support Dual MVOP port 331 E_XC_EX_INPUT_SOURCE_DTV2, ///<37 DTV 332 E_XC_EX_INPUT_SOURCE_STORAGE2, ///<38 Storage 333 334 //Support Third MVOP port 335 E_XC_EX_INPUT_SOURCE_DTV3, ///<39 DTV 336 337 // Support OP capture 338 E_XC_EX_INPUT_SOURCE_SCALER_OP, ///<40 scaler OP 339 340 E_XC_EX_INPUT_SOURCE_NUM, ///<41 number of the source 341 E_XC_EX_INPUT_SOURCE_NONE = E_XC_EX_INPUT_SOURCE_NUM, ///<NULL input 342 } XC_EX_INPUT_SOURCE_TYPE; 343 344 #define XC_EX_IsSrcTypeAV(x) (((x)>=E_XC_EX_INPUT_SOURCE_CVBS)&&((x)<=E_XC_EX_INPUT_SOURCE_CVBS_MAX))/// x is AV 345 #define XC_EX_IsSrcTypeSV(x) (((x)>=E_XC_EX_INPUT_SOURCE_SVIDEO)&&((x)<=E_XC_EX_INPUT_SOURCE_SVIDEO_MAX))///< x is SV 346 #define XC_EX_IsSrcTypeATV(x) ((x)==E_XC_EX_INPUT_SOURCE_TV)///< x is ATV 347 #define XC_EX_IsSrcTypeScart(x) (((x)>=E_XC_EX_INPUT_SOURCE_SCART)&&((x)<=E_XC_EX_INPUT_SOURCE_SCART_MAX))///< x is Scart 348 #define XC_EX_IsSrcTypeHDMI(x) (((x)>=E_XC_EX_INPUT_SOURCE_HDMI)&&((x)<=E_XC_EX_INPUT_SOURCE_HDMI_MAX))///< x is HDMI 349 #define XC_EX_IsSrcTypeVga(x) ((x)==E_XC_EX_INPUT_SOURCE_VGA)///< x is VGA 350 #define XC_EX_IsSrcTypeYPbPr(x) (((x)>=E_XC_EX_INPUT_SOURCE_YPBPR)&&((x)<=E_XC_EX_INPUT_SOURCE_YPBPR_MAX))///< x is YPbPr 351 #define XC_EX_IsSrcTypeDTV(x) (((x)==E_XC_EX_INPUT_SOURCE_DTV) || ((x)==E_XC_EX_INPUT_SOURCE_DTV2) || ((x)==E_XC_EX_INPUT_SOURCE_DTV3))///< x is DTV 352 #define XC_EX_IsSrcTypeDVI(x) (((x)>=E_XC_EX_INPUT_SOURCE_DVI)&&((x)<=E_XC_EX_INPUT_SOURCE_DVI_MAX))///< x is DVI 353 #define XC_EX_IsSrcTypeJpeg(x) ((x)==E_XC_EX_INPUT_SOURCE_JPEG)///< x is JPEG 354 #define XC_EX_IsSrcTypeStorage(x) (((x)==E_XC_EX_INPUT_SOURCE_STORAGE) || ((x)==E_XC_EX_INPUT_SOURCE_STORAGE2) || XC_EX_IsSrcTypeJpeg(x))///< x is Storage 355 #define XC_EX_IsSrcTypeDigitalVD(x) ( XC_EX_IsSrcTypeAV(x)||XC_EX_IsSrcTypeSV(x)||XC_EX_IsSrcTypeATV(x)||XC_EX_IsSrcTypeScart(x))///< x is VD 356 #define XC_EX_IsSrcTypeAnalog(x) ( XC_EX_IsSrcTypeVga(x)|| XC_EX_IsSrcTypeYPbPr(x))///< x is Analog 357 #define XC_EX_IsSrcTypeVideo(x) ( XC_EX_IsSrcTypeYPbPr(x) || XC_EX_IsSrcTypeATV(x) || XC_EX_IsSrcTypeAV(x) || XC_EX_IsSrcTypeSV(x) || XC_EX_IsSrcTypeScart(x) || XC_EX_IsSrcTypeDTV(x) ) ///< x is Video 358 #define XC_EX_IsSrcTypeCapture(x) ((x)==E_XC_EX_INPUT_SOURCE_SCALER_OP)///< x is scaler OP 359 360 //////////////////////////////////////////////////////////////////////////////// 361 // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 362 // This is abstract output source for XC library. If you want to add another one. 363 // Please contace with XC member 364 //////////////////////////////////////////////////////////////////////////////// 365 366 /// Define XC device ID 367 typedef struct 368 { 369 MS_U32 u32Version; 370 MS_U32 u32Id; 371 } XC_DEVICE_ID; 372 373 /// Define XC device enum 374 typedef enum 375 { 376 E_XC_EX_DEVICE0, 377 E_XC_EX_DEVICE1, 378 E_XC_EX_DEVICE_MAX, 379 } XC_EX_DEVICE_NUM; 380 381 /// Define output type 382 typedef enum 383 { 384 E_XC_EX_OUTPUT_NONE = 0, ///<NULL output 385 E_XC_EX_OUTPUT_SCALER_MAIN_WINDOW, ///<output to Scaler main window 386 E_XC_EX_OUTPUT_SCALER_SUB_WINDOW = 10, ///<output to Scaler sub window 387 388 E_XC_EX_OUTPUT_CVBS1 = 20, ///<output to CVBS1 389 E_XC_EX_OUTPUT_CVBS2, ///<output to CVBS2 390 // Reserved area 391 392 E_XC_EX_OUTPUT_YPBPR0 = 40, ///<output to YPBPR0 393 E_XC_EX_OUTPUT_YPBPR1, ///<output to YPBPR1 394 // Reserved area 395 396 E_XC_EX_OUTPUT_HDMI1 = 60, ///<output to HDMI1 397 E_XC_EX_OUTPUT_HDMI2, ///<output to HDMI2 398 399 E_XC_EX_OUTPUT_OFFLINE_DETECT = 80, ///<output to OFFLINE detect 400 401 E_XC_EX_OUTPUT_SCALER_DWIN = 100, ///<output to Dwin 402 403 E_XC_EX_OUTPUT_NUM, ///<number of outputs 404 }XC_EX_DEST_TYPE; 405 406 407 /// Define DeInterlace mode 408 typedef enum 409 { 410 411 E_XC_EX_DEINT_OFF=0, ///<deinterlace mode off 412 E_XC_EX_DEINT_2DDI_BOB, ///<deinterlace mode: BOB 413 E_XC_EX_DEINT_2DDI_AVG, ///<deinterlace mode: AVG 414 E_XC_EX_DEINT_3DDI_HISTORY, ///<deinterlace mode: HISTORY // 24 bit 415 E_XC_EX_DEINT_3DDI, ///<deinterlace mode:3DDI// 16 bit 416 } XC_EX_DEINTERLACE_MODE; 417 418 419 /// Define the members of IP Sync Status 420 typedef struct 421 { 422 MS_U8 u8SyncStatus; ///< IP Sync status: refer to MD_VSYNC_POR_BIT, etc 423 MS_U16 u16Hperiod; ///<H Period 424 MS_U16 u16Vtotal; ///<Vertcal total 425 } XC_EX_IP_SYNC_STATUS; 426 427 /// Define Freerun color 428 typedef enum 429 { 430 E_XC_EX_FREE_RUN_COLOR_BLACK, 431 E_XC_EX_FREE_RUN_COLOR_WHITE, 432 E_XC_EX_FREE_RUN_COLOR_BLUE, 433 E_XC_EX_FREE_RUN_COLOR_RED, 434 E_XC_EX_FREE_RUN_COLOR_GREEN, 435 E_XC_EX_FREE_RUN_COLOR_MAX, 436 } XC_EX_FREERUN_COLOR; 437 438 /// Define which panel output timing change mode is used to change VFreq for same panel 439 typedef enum 440 { 441 E_XC_EX_PNL_CHG_DCLK = 0, ///<change output DClk to change Vfreq. 442 E_XC_EX_PNL_CHG_HTOTAL = 1, ///<change H total to change Vfreq. 443 E_XC_EX_PNL_CHG_VTOTAL = 2, ///<change V total to change Vfreq. 444 } XC_EX_PNL_OUT_TIMING_MODE; 445 446 typedef enum 447 { 448 E_XC_EX_PNL_LPLL_TTL, ///< TTL type 449 E_XC_EX_PNL_LPLL_LVDS, ///< LVDS type 450 E_XC_EX_PNL_LPLL_RSDS, ///< RSDS type 451 E_XC_EX_PNL_LPLL_MINILVDS, ///< TCON //E_XC_EX_PNL_LPLL_MINILVDS_6P_2Link 452 E_XC_EX_PNL_LPLL_ANALOG_MINILVDS, ///< Analog TCON 453 E_XC_EX_PNL_LPLL_DIGITAL_MINILVDS, ///< Digital TCON 454 E_XC_EX_PNL_LPLL_MFC, ///< Ursa (TTL output to Ursa) 455 E_XC_EX_PNL_LPLL_DAC_I, ///< DAC output 456 E_XC_EX_PNL_LPLL_DAC_P, ///< DAC output 457 E_XC_EX_PNL_LPLL_PDPLVDS, ///< For PDP(Vsync use Manually MODE) 458 E_XC_EX_PNL_LPLL_EXT, 459 } XC_EX_PNL_LPLL_TYPE; 460 461 462 typedef enum 463 { 464 465 E_XC_EX_PNL_LPLL_EPI34_8P = E_XC_EX_PNL_LPLL_EXT, 466 E_XC_EX_PNL_LPLL_EPI28_8P, 467 E_XC_EX_PNL_LPLL_EPI34_6P, 468 E_XC_EX_PNL_LPLL_EPI28_6P, 469 470 ///< replace this with E_XC_EX_PNL_LPLL_MINILVD 471 E_XC_EX_PNL_LPLL_MINILVDS_5P_2L, 472 E_XC_EX_PNL_LPLL_MINILVDS_4P_2L, 473 E_XC_EX_PNL_LPLL_MINILVDS_3P_2L, 474 E_XC_EX_PNL_LPLL_MINILVDS_6P_1L, 475 E_XC_EX_PNL_LPLL_MINILVDS_5P_1L, 476 E_XC_EX_PNL_LPLL_MINILVDS_4P_1L, 477 E_XC_EX_PNL_LPLL_MINILVDS_3P_1L, 478 479 E_XC_EX_PNL_LPLL_HS_LVDS, ///< High speed LVDS 480 E_XC_EX_PNL_LPLL_HF_LVDS, ///< High Freqquency LVDS 481 482 E_XC_EX_PNL_LPLL_TTL_TCON, 483 E_XC_EX_PNL_LPLL_MINILVDS_2CH_3P_8BIT, ///< 2 channel, 3 pair, 8 bits 484 E_XC_EX_PNL_LPLL_MINILVDS_2CH_4P_8BIT, ///< 2 channel, 4 pair, 8 bits 485 E_XC_EX_PNL_LPLL_MINILVDS_2CH_5P_8BIT, ///< 2 channel, 5 pair, 8 bits 486 E_XC_EX_PNL_LPLL_MINILVDS_2CH_6P_8BIT, ///< 2 channel, 6 pair, 8 bits 487 488 E_XC_EX_PNL_LPLL_MINILVDS_1CH_3P_8BIT, ///< 1 channel, 3 pair, 8 bits 489 E_XC_EX_PNL_LPLL_MINILVDS_1CH_4P_8BIT, ///< 1 channel, 4 pair, 8 bits 490 E_XC_EX_PNL_LPLL_MINILVDS_1CH_5P_8BIT, ///< 1 channel, 5 pair, 8 bits 491 E_XC_EX_PNL_LPLL_MINILVDS_1CH_6P_8BIT, ///< 1 channel, 6 pair, 8 bits 492 493 E_XC_EX_PNL_LPLL_MINILVDS_2CH_3P_6BIT, ///< 2 channel, 3 pari, 6 bits 494 E_XC_EX_PNL_LPLL_MINILVDS_2CH_4P_6BIT, ///< 2 channel, 4 pari, 6 bits 495 E_XC_EX_PNL_LPLL_MINILVDS_2CH_5P_6BIT, ///< 2 channel, 5 pari, 6 bits 496 E_XC_EX_PNL_LPLL_MINILVDS_2CH_6P_6BIT, ///< 2 channel, 6 pari, 6 bits 497 498 E_XC_EX_PNL_LPLL_MINILVDS_1CH_3P_6BIT, ///< 1 channel, 3 pair, 6 bits 499 E_XC_EX_PNL_LPLL_MINILVDS_1CH_4P_6BIT, ///< 1 channel, 4 pair, 6 bits 500 E_XC_EX_PNL_LPLL_MINILVDS_1CH_5P_6BIT, ///< 1 channel, 5 pair, 6 bits 501 E_XC_EX_PNL_LPLL_MINILVDS_1CH_6P_6BIT, ///< 1 channel, 6 pair, 6 bits 502 503 } XC_EX_PNL_LPLL_EXT_TYPE; 504 505 typedef enum 506 { 507 E_XC_EX_MOD_OUTPUT_SINGLE = 0, ///< single channel 508 E_XC_EX_MOD_OUTPUT_DUAL = 1, ///< dual channel 509 510 E_XC_EX_MOD_OUTPUT_QUAD = 2, ///< quad channel 511 512 } XC_EX_OUTPUT_MODE; 513 514 typedef enum 515 { 516 E_XC_EX_VFREQ_50HZ = 0x00, 517 E_XC_EX_VFREQ_60HZ = 0x01, 518 E_XC_EX_VFREQ_FROM_SRC = 0x02, 519 E_XC_EX_VFREQ_FROM_PANEL = 0x03, 520 } XC_EX_VFREQ_SEL; 521 522 /// Sources to VE 523 typedef enum 524 { 525 E_XC_EX_NONE =0x00, 526 E_XC_EX_IP = 0x01, ///< Scaler IP 527 E_XC_EX_VOP2 = 0x02, ///< Scaler VOP2 528 E_XC_EX_BRI = 0x04, ///< Scaler BRI 529 530 /// Please use this for OSD OP video capture!!! 531 E_XC_EX_OP2 = 0x08, ///< Scaler OP2 - After Blending with OSD 532 E_XC_EX_GAM = 0x10, ///< Scaler Gamma - Without Blending with OSD 533 E_XC_EX_DITHER = 0x20, ///< Scaler noise dither - Without Blending with OSD 534 535 /// Please use this for non-OSD OP video capture!!! 536 E_XC_EX_OVERLAP = 0x40, ///< Scaler color overlap - Without Blending with OSD 537 E_XC_EX_IP_SUB = 0x80, ///< Scaler IP of sub window 538 } XC_EX_SOURCE_TO_VE; 539 540 ///Port connect to pin 8 of SCART 541 typedef enum 542 { 543 E_XC_EX_SCARTID_NONE = 0x00, ///< No connection 544 E_XC_EX_SCARTID_TO_HSYNC0 = 0x01, ///< Pin 8 of SCART connects to Hsync 0 545 E_XC_EX_SCARTID_TO_HSYNC1 = 0x02, ///< Pin 8 of SCART connects to Hsync 1 546 E_XC_EX_SCARTID_TO_HSYNC2 = 0x04, ///< Pin 8 of SCART connects to Hsync 2 547 E_XC_EX_SCARTID_TO_SOG0 = 0x08, ///< Pin 8 of SCART connects to SOG0 548 E_XC_EX_SCARTID_TO_SOG1 = 0x10, ///< Pin 8 of SCART connects to SOG1 549 E_XC_EX_SCARTID_TO_SOG2 = 0x20, ///< Pin 8 of SCART connects to SOG2 550 } XC_EX_SCART_ID_PORT; 551 552 /// Items for query driver or H/W capability. 553 typedef enum 554 { 555 E_XC_EX_SUPPORT_IMMESWITCH = 0x00000001, ///< return true if H/W support HDMI immeswitch 556 557 E_XC_EX_SUPPORT_DVI_AUTO_EQ = 0x00000005, ///< return true if driver support Auto EQ. 558 559 E_XC_EX_SUPPORT_FRC_INSIDE = 0x00000100, ///< return true if scaler driver support FRC (MFC) function. 560 561 } XC_EX_CAPABILITY; 562 563 typedef enum 564 { 565 E_XC_EX_IMMESWITCH = 0x00000001, ///< return true if H/W support HDMI immeswitch 566 567 E_XC_EX_DVI_AUTO_EQ = 0x00000002, ///< return true if driver support Auto EQ. 568 569 E_XC_EX_FRC_INSIDE = 0x00000004, ///< return true if scaler driver support FRC (MFC) function. 570 571 E_XC_EX_DIP_CHIP_CAPS = 0x00000008, ///< return dip chip caps. 572 573 E_XC_EX_3D_FBL_CAPS = 0x00000010, ///< return true if chip support fbl 3d.attention:fbl 3d only support sbs to lbl and sbs to sbs 574 575 E_XC_EX_HW_SEAMLESS_ZAPPING = 0x00000020, ///< return true if H/W support seamless zapping 576 577 E_XC_EX_SUPPORT_DEVICE1 = 0x00000040, ///< return true if H/W support scaler device1 578 579 E_XC_EX_SUPPORT_DETECT3D_IN3DMODE = 0x00000080, ///< return true if H/W support detecting 3d when already in 3d mode 580 581 E_XC_EX_2DTO3D_VERSION = 0x00000100, ///< return value 2D-to-3D version 582 583 E_XC_EX_SUPPORT_FORCE_VSP_IN_DS_MODE = 0x00000200, ///< return if H/W support force post-Vscalin-down in DS mode 584 585 } XC_EX_CAPS; 586 587 typedef enum 588 { 589 E_XC_EX_DS_INDEX_MVOP, 590 E_XC_EX_DS_INDEX_SCALER, 591 E_XC_EX_DS_INDEX_MAX, 592 } XC_EX_DS_INDEX_SOURCE; 593 594 /// Define panel information 595 typedef struct 596 { 597 // XC need below information do to frame lock 598 599 MS_U16 u16HStart; ///<DE H start 600 601 MS_U16 u16VStart; ///<DE V start 602 603 MS_U16 u16Width; ///<DE H width 604 605 MS_U16 u16Height; ///< DE V height 606 607 MS_U16 u16HTotal; ///<H total 608 609 MS_U16 u16VTotal; ///<V total 610 611 MS_U16 u16DefaultVFreq; ///<Panel output Vfreq., used in free run 612 613 MS_U8 u8LPLL_Mode; ///<0: single mode, 1: dual mode 614 XC_EX_PNL_OUT_TIMING_MODE enPnl_Out_Timing_Mode; ///<Define which panel output timing change mode is used to change VFreq for same panel 615 616 // Later need to refine to use Min/Max SET for PDP panel, but for LCD, it maybe no need to check the Min/Max SET 617 MS_U16 u16DefaultHTotal; ///<default H total 618 MS_U16 u16DefaultVTotal; ///<default V total 619 620 MS_U32 u32MinSET; 621 MS_U32 u32MaxSET; 622 XC_EX_PNL_LPLL_TYPE eLPLL_Type; /// 623 } XC_EX_PANEL_INFO; 624 625 626 /// Define the extern special panel information for FPLL or other usage 627 /// Usage: 628 /// The first 3 members of below structure must be set as their corresponding description 629 /// The other members are set according to your request, none used members should be cleared to zero 630 /// Example code of set VTT slowly: 631 /// XC_PANEL_INFO_EX stPanelInfoEx; 632 /// memset(&stPanelInfoEx, 0, sizeof(XC_PANEL_INFO_EX)); 633 /// stPanelInfoEx.u32PanelInfoEx_Version = EX_PANEL_INFO_EX_VERSION; 634 /// stPanelInfoEx.u16PanelInfoEX_Length = sizeof(XC_PANEL_INFO_EX); 635 /// 636 /// stPanelInfoEx.bVttStepsValid = TRUE; 637 /// stPanelInfoEx.bVttDelayValid = TRUE; 638 /// stPanelInfoEx.u16VttSteps = xx; //set how many steps u want to set the vtt 639 /// stPanelInfoEx.u16VttDelay = xx;// set the delay between steps of setting vtt 640 /// stPanelInfoEx.u16VFreq = 500; //this step setting info is only for 50hz 641 /// if(MApi_XC_EX_SetExPanelInfo(TRUE, &stPanelInfoEx))//Check the set is accepted or not 642 /// stPanelInfoEx.u16VFreq = 600; //set same steps info for 60 hz 643 /// if(MApi_XC_EX_SetExPanelInfo(TRUE, &stPanelInfoEx))//Check the set is accepted or not 644 /// 645 typedef struct 646 { 647 MS_U32 u32PanelInfoEx_Version; ///<Version of current structure. Please always set to "EX_PANEL_INFO_EX_VERSION" as input 648 MS_U16 u16PanelInfoEX_Length; ///<Length of this structure, u16PanelInfoEX_Length=sizeof(XC_PANEL_INFO_EX) 649 MS_U16 u16VFreq; ///<Output Vfreq, unit: (1Hz/10), range 0~EX_PANEL_INFO_EX_INVALID_ALL 650 ///<If disable ex panel info and u16VFreq = 0xFFFF means disable all valid ex panel info 651 ///<If disable ex panel info and u16VFreq = 600 means disable the valid ex panel info for 60 hz 652 MS_U16 u16HTotal; ///<H total of output "u16VFreq" 653 MS_BOOL bHTotalValid; ///H total setting is valid in this structure 654 MS_U16 u16VTotal; ///<V total of output "u16VFreq" 655 MS_BOOL bVTotalValid; ///V total setting is valid in this structure 656 MS_U32 u32DClk; ///<DCLK of output "u16VFreq", unit: KHz 657 MS_BOOL bDClkValid; ///DCLK, unit: KHz 658 MS_U16 u16MinHTotal; ///<Min H total 659 MS_BOOL bMinHTotalValid; ///Min H total 660 MS_U16 u16MinVTotal; ///<Min V total 661 MS_BOOL bMinVTotalValid; ///Min V total 662 MS_U32 u32MinDClk; ///<Min DCLK, unit: KHz 663 MS_BOOL bMinDClkValid; ///Min DCLK, unit: KHz 664 MS_U16 u16MaxHTotal; ///<Max H total 665 MS_BOOL bMaxHTotalValid; ///Max H total 666 MS_U16 u16MaxVTotal; ///<Max V total 667 MS_BOOL bMaxVTotalValid; ///Max V total 668 MS_U32 u32MaxDClk; ///<Min DCLK, unit: KHz 669 MS_BOOL bMaxDClkValid; ///Min DCLK, unit: KHz 670 // sync related 671 MS_U16 u16HSyncWidth; ///<VOP_01[7:0], PANEL_HSYNC_WIDTH 672 MS_BOOL bHSyncWidthValid; ///< VOP_01[7:0], PANEL_HSYNC_WIDTH 673 MS_U16 u16HSyncBackPorch; ///<PANEL_HSYNC_BACK_PORCH, no register setting, provide value for query only 674 ///<not support Manuel VSync Start/End now 675 ///<VOP_02[10:0] VSync start = Vtt - VBackPorch - VSyncWidth 676 ///<VOP_03[10:0] VSync end = Vtt - VBackPorch 677 MS_BOOL bHSyncBackPorchValid; 678 MS_U16 u16VSyncWidth; ///<define PANEL_VSYNC_WIDTH 679 MS_BOOL bVSyncWidthValid; 680 MS_U16 u16VSyncBackPorch; ///<define PANEL_VSYNC_BACK_PORCH 681 MS_BOOL bVSyncBackPorchValid; 682 //step by step adjustment when 50/60 HZ Output switch 683 MS_U16 u16HttSteps; ///<Number of adjusting step from Old Htt to new htt 684 MS_BOOL bHttStepsValid; 685 MS_U16 u16HttDelay; ///<Delay time in two steps 686 MS_BOOL bHttDelayValid; 687 MS_U16 u16VttSteps; ///<Number of adjusting step from Old Htt to new htt 688 MS_BOOL bVttStepsValid; 689 MS_U16 u16VttDelay; ///<Delay time in two steps 690 MS_BOOL bVttDelayValid; 691 MS_U16 u16DclkSteps; ///<Number of adjusting step from Old Htt to new htt 692 MS_BOOL bDclkStepsValid; 693 MS_U16 u16DclkDelay; ///<Delay time in two steps 694 MS_BOOL bDclkDelayValid; ///<DclkDelay setting is valid in this structure 695 }XC_EX_PANEL_INFO_EX; 696 697 /// Define new panel information 698 typedef struct 699 { 700 MS_U32 u32TimingAdjustSetting_version; ///<Version of current structure. Please always set this value as XC_EX_OUTPUT_TIMING_ADJUST_VERSION 701 702 MS_U16 u16HTotal_Step; ///<Number of adjusting step from Old Htt to new htt 703 MS_U16 u16HTotal_Delay; ///<Delay time in two steps 704 MS_U16 u16HTotal_Ratio; ///<Ratio of Htt for change to specific framerate (X10). 705 706 MS_U16 u16VTotal_Step; ///<Number of adjusting step from Old Vtt to new Vtt 707 MS_U16 u16VTotal_Delay; ///<Delay time in two steps 708 MS_U16 u16VTotal_Ratio; ///<Ratio of Vtt for change to specific framerate (X10). 709 710 MS_U16 u16Dclk_Step; ///<Number of adjusting step from Old Dclk to new Dclk 711 MS_U16 u16Dclk_Delay; ///<Delay time in two steps 712 MS_U16 u16Dclk_Ratio; ///<Ratio of Dclk for change to specific framerate (X10). 713 714 } XC_EX_OUTPUT_TIMING_ADJUST_SETTING; 715 716 /// Define the initial data for XC 717 typedef struct 718 { 719 MS_U32 u32XC_version; ///<Version of current structure. 720 // system related 721 MS_U32 u32XTAL_Clock; ///<Crystal clock in Hz 722 723 // frame buffer related 724 MS_PHY u32Main_FB_Start_Addr; ///<scaler main window frame buffer start address, absolute without any alignment 725 MS_PHY u32Main_FB_Size; ///<scaler main window frame buffer size, the unit is BYTES 726 MS_PHY u32Sub_FB_Start_Addr; ///<scaler sub window frame buffer start address, absolute without any alignment 727 MS_PHY u32Sub_FB_Size; ///<scaler sub window frame buffer size, the unit is BYTES 728 729 // HDMI related, will be moved to HDMI module 730 MS_BOOL bCEC_Use_Interrupt; ///<CEC use interrupt or not, if not, will use polling 731 732 // This is related to chip package. ( Share Ground / Non-Share Ground ) 733 MS_BOOL bIsShareGround; 734 735 // function related 736 MS_BOOL bEnableIPAutoCoast; ///<Enable IP auto coast 737 738 MS_BOOL bMirror; ///<mirror mode 739 740 // panel related 741 XC_EX_PANEL_INFO stPanelInfo; ///<panel infomation 742 743 // DLC 744 MS_BOOL bDLC_Histogram_From_VBlank; ///<If set to TRUE, the Y max/min report value is read from V blanking area 745 746 // This is related to layout 747 MS_U16 eScartIDPort_Sel; ///<This is port selection (E_XC_SCART_ID_PORT) of Scart ID pin 8 748 749 // frcm frame buffer related 750 MS_PHY u32Main_FRCM_FB_Start_Addr; ///<scaler main window frcm frame buffer start address, absolute without any alignment 751 MS_PHY u32Main_FRCM_FB_Size; ///<scaler main window frcm frame buffer size, the unit is BYTES 752 MS_PHY u32Sub_FRCM_FB_Start_Addr; ///<scaler sub window frcm frame buffer start address, absolute without any alignment 753 MS_PHY u32Sub_FRCM_FB_Size; ///<scaler sub window frcm frame buffer size, the unit is BYTES 754 } XC_EX_INITDATA; 755 756 /// define generic API infomation 757 typedef struct 758 { 759 MS_U8 u8MaxWindowNum; ///<max window number that XC driver supports such as MAIN/SUB window 760 MS_U8 u8NumOfDigitalDDCRam; ///<indicate how many Digital DDCRam that use can use without external EDID EEPROM 761 MS_U8 u8MaxFrameNumInMem; ///<indicate maximal number of frames (Progressive mode) supported by scaler simultaneously 762 MS_U8 u8MaxFieldNumInMem; ///<indicate maximal number of fields (Interlace mode) supported by scaler simultaneously 763 } XC_EX_ApiInfo; 764 765 /// define the information of set window 766 typedef struct 767 { 768 //------------- 769 // Input 770 //------------- 771 XC_EX_INPUT_SOURCE_TYPE enInputSourceType; ///<Input source 772 773 //------------- 774 // Window 775 //------------- 776 XC_EX_WINDOW_TYPE stCapWin; ///<Capture window 777 XC_EX_WINDOW_TYPE stDispWin; ///<Display window 778 XC_EX_WINDOW_TYPE stCropWin; ///<Crop window 779 780 //------------- 781 // Timing 782 //------------- 783 MS_BOOL bInterlace; ///<Interlaced or Progressive 784 MS_BOOL bHDuplicate; ///<flag for vop horizontal duplicate, for MVD, YPbPr, indicate input double sampled or not 785 MS_U16 u16InputVFreq; ///<Input V Frequency, VFreqx10, for calculate output panel timing 786 MS_U16 u16InputVTotal; ///<Input Vertical total, for calculate output panel timing 787 MS_U16 u16DefaultHtotal; ///<Default Htotal for VGA/YPbPr input 788 MS_U8 u8DefaultPhase; ///<Obsolete 789 790 //------------------------- 791 // customized post scaling 792 //------------------------- 793 MS_BOOL bHCusScaling; ///<assign post H customized scaling instead of using XC scaling 794 MS_U16 u16HCusScalingSrc; ///<post H customized scaling src width 795 MS_U16 u16HCusScalingDst; ///<post H customized scaling dst width 796 MS_BOOL bVCusScaling; ///<assign post V manuel scaling instead of using XC scaling 797 MS_U16 u16VCusScalingSrc; ///<post V customized scaling src height 798 MS_U16 u16VCusScalingDst; ///<post V customized scaling dst height 799 800 //-------------- 801 // 9 lattice 802 //-------------- 803 MS_BOOL bDisplayNineLattice; ///<used to indicate where to display in panel and where to put in frame buffer 804 805 //------------------------- 806 // customized pre scaling 807 //------------------------- 808 MS_BOOL bPreHCusScaling; ///<assign pre H customized scaling instead of using XC scaling 809 MS_U16 u16PreHCusScalingSrc; ///<pre H customized scaling src width 810 MS_U16 u16PreHCusScalingDst; ///<pre H customized scaling dst width 811 MS_BOOL bPreVCusScaling; ///<assign pre V manuel scaling instead of using XC scaling 812 MS_U16 u16PreVCusScalingSrc; ///<pre V customized scaling src height 813 MS_U16 u16PreVCusScalingDst; ///<pre V customized scaling dst height 814 MS_U16 u16DefaultPhase; ///<Default Phase for VGA/YPbPr input 815 } XC_EX_SETWIN_INFO; 816 817 /// define the information for dynamic scaling (DS) 818 /// one entry of DS is: 819 /// 820 /// 8 bit alignment 821 /// LSB ----> MSB 822 /// OP (32bits) -> IP (32bits) 823 /// [7:0] [15:8] [23:16] [31:24] 824 /// Data_L Data_H Reg_Addr(16bit) Reg_Bank 825 /// 826 /// 16 bit alignment 827 /// LSB ----> MSB 828 /// OP (32bits) -> IP (32bits) -> 0xFFFFFFFF, 0xFFFFFFFF (dummy) 829 /// 830 /// If bIP_DS_On == FALSE, the DS will ignore the IP information 831 /// If bOP_DS_On == FALSE, the DS will ignore the OP information 832 typedef struct 833 { 834 MS_PHY u32DS_Info_BaseAddr; ///< The memory base address to update IP/OP dynamic scaling registers. Absolute without any alignment. 835 MS_U8 u8MIU_Select; ///< 0: MIU0, 1: MIU1, etc. 836 MS_U8 u8DS_Index_Depth; ///< The index depth (how many entries to fire per MVOP Vsync falling) of DS 837 MS_BOOL bOP_DS_On; ///< OP dynamic scaling on/off 838 MS_BOOL bIPS_DS_On; ///< IPS dynamic scaling on/off 839 MS_BOOL bIPM_DS_On; ///< IPM dynamic scaling on/off 840 } XC_EX_DynamicScaling_Info; 841 842 /// define the prescaling destiniation size limit 843 typedef struct 844 { 845 MS_U16 u16MinDstWidth; ///Minimum destination Width 846 MS_U16 u16MinDstHeight; ///Minimum destination Height 847 MS_BOOL bEna; ///Enable this limit 848 } XC_EX_PreScalingLimit_Info; 849 850 /// Define source type for DIP 851 typedef enum 852 { 853 E_XC_DIP_EX_SOURCE_TYPE_SUB2 = 0, ///< DIP from SUB2(IP_F3) 854 E_XC_DIP_EX_SOURCE_TYPE_MAIN = 1, ///< DIP from MAIN(IP_MAIN) 855 E_XC_DIP_EX_SOURCE_TYPE_SUB = 2, ///< DIP from SUB (IP_SUB) 856 E_XC_DIP_EX_SOURCE_TYPE_OP_MAIN = 3, ///< HVSP MAIN 857 E_XC_DIP_EX_SOURCE_TYPE_OP_SUB = 4, ///< HVSP SUB 858 E_XC_DIP_EX_SOURCE_TYPE_DRAM = 5, ///< DIP from DRAM 859 E_XC_DIP_EX_SOURCE_TYPE_OP_CAPTURE = 6, ///< DIP from OP capture 860 E_XC_DIP_EX_SOURCE_TYPE_OP_SC1_CAPTURE = 7, ///< DIP from OP SC1 capture 861 E_XC_DIP_EX_MAX_SOURCE_NUM ///< The max support window 862 } XC_DIP_EX_SOURCE_TYPE; 863 864 /// Define the path type 865 typedef enum 866 { 867 E_XC_EX_PATH_TYPE_SYNCHRONOUS, ///<synchronous path type 868 E_XC_EX_PATH_TYPE_ASYNCHRONOUS, ///<asynchronous path type 869 } XC_EX_PATH_TYPE; 870 871 /// Define the mux path information 872 typedef struct 873 { 874 XC_EX_PATH_TYPE Path_Type; ///<path type 875 XC_EX_INPUT_SOURCE_TYPE src; ///<source input type 876 XC_EX_DEST_TYPE dest; ///<destination type of output 877 878 void (* path_thread)(XC_EX_INPUT_SOURCE_TYPE src, MS_BOOL bRealTimeMonitorOnly); ///<path read 879 void (* SyncEventHandler )(XC_EX_INPUT_SOURCE_TYPE src, void* para); ///<sync event handler 880 void (* DestOnOff_Event_Handler )(XC_EX_INPUT_SOURCE_TYPE src, void* para); ///<destination on off event handler 881 void (* dest_periodic_handler )(XC_EX_INPUT_SOURCE_TYPE src, MS_BOOL bRealTimeMonitorOnly) ; ///<destination periodic handler 882 } XC_EX_MUX_PATH_INFO; 883 884 /// Image store format in XC 885 typedef enum 886 { 887 E_XC_EX_IMAGE_STORE_444_24BIT, ///< (8+8+8) Y Cb Cr / B G R 888 E_XC_EX_IMAGE_STORE_422_16BIT, ///< (8+8) Y Cb Y Cr / G B G R 889 E_XC_EX_IMAGE_STORE_422_24BIT, ///< (10+10+4) Y Cb Y Cr / G B G R -- Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0 - C5 C4 C3 C2 C1 C0 Y9 Y8 - xx xx xx xx C9 C8 C7 C6 890 } XC_EX_IMAGE_STORE_FMT; 891 892 /// XC API status 893 typedef struct 894 { 895 //---------------------- 896 // Customer setting 897 //---------------------- 898 XC_EX_INPUT_SOURCE_TYPE enInputSourceType; ///< Input source type 899 900 //---------------------- 901 // Window 902 //---------------------- 903 XC_EX_WINDOW_TYPE stCapWin; ///<Capture window 904 XC_EX_WINDOW_TYPE stDispWin; ///<Display window 905 XC_EX_WINDOW_TYPE stCropWin; ///<Crop window 906 907 //---------------------- 908 // Timing 909 //---------------------- 910 MS_BOOL bInterlace; ///<Interlaced or Progressive 911 MS_BOOL bHDuplicate; ///<flag for vop horizontal duplicate, for MVD, YPbPr, indicate input double sampled or not 912 MS_U16 u16InputVFreq; ///<Input V Frequency, VFreqx10, for calculate output panel timing 913 MS_U16 u16InputVTotal; ///<Input Vertical total, for calculate output panel timing 914 MS_U16 u16DefaultHtotal; ///<Default Htotal for VGA/YPbPr input 915 MS_U8 u8DefaultPhase; ///<Obsolete, use u16DefaultPhase instead 916 917 //---------------------- 918 // customized scaling 919 //---------------------- 920 MS_BOOL bHCusScaling; ///<assign H customized scaling instead of using XC scaling 921 MS_U16 u16HCusScalingSrc; ///<H customized scaling src width 922 MS_U16 u16HCusScalingDst; ///<H customized scaling dst width 923 MS_BOOL bVCusScaling; ///<assign V manuel scaling instead of using XC scaling 924 MS_U16 u16VCusScalingSrc; ///<V customized scaling src height 925 MS_U16 u16VCusScalingDst; ///<V customized scaling dst height 926 927 //-------------- 928 // 9 lattice 929 //-------------- 930 MS_BOOL bDisplayNineLattice; ///<used to indicate where to display in panel and where to put in frame buffer 931 932 //---------------------- 933 // XC internal setting 934 //---------------------- 935 936 /* scaling ratio */ 937 MS_U16 u16H_SizeAfterPreScaling; ///<Horizontal size after prescaling 938 MS_U16 u16V_SizeAfterPreScaling; ///<Vertical size after prescaling 939 MS_BOOL bPreV_ScalingDown; ///<define whether it's pre-Vertical scaling down 940 941 /* real crop win in memory */ 942 XC_EX_WINDOW_TYPE ScaledCropWin; 943 944 /* others */ 945 MS_U32 u32Op2DclkSet; ///<OP to Dot clock set 946 947 /* Video screen status */ 948 MS_BOOL bBlackscreenEnabled; ///<Black screen status 949 MS_BOOL bBluescreenEnabled; ///<Blue screen status 950 MS_U16 u16VideoDark; ///<Video dark 951 952 MS_U16 u16V_Length; ///<for MDrv_Scaler_SetFetchNumberLimit 953 MS_U16 u16BytePerWord; ///<BytePerWord in Scaler 954 MS_U16 u16OffsetPixelAlignment; ///<Pixel alignment of Offset (including IPM/OPM) 955 MS_U8 u8BitPerPixel; ///<Bits number Per Pixel 956 XC_EX_DEINTERLACE_MODE eDeInterlaceMode; ///<De-interlace mode 957 MS_U8 u8DelayLines; ///<delay lines 958 MS_BOOL bMemFmt422; ///<whether memory format is 422, for easy usage 959 XC_EX_IMAGE_STORE_FMT eMemory_FMT; ///<memory format 960 MS_BOOL bForceNRoff; ///<Force NR off 961 MS_BOOL bEn3DNR; ///<whether it's 3DNR enabled 962 MS_BOOL bUseYUVSpace; ///< color format before 3x3 matrix 963 MS_BOOL bMemYUVFmt; ///< memroy color format 964 MS_BOOL bForceRGBin; ///<Force set format in memory as RGB (only for RGB input source) 965 MS_BOOL bLinearMode; ///<Is current memory format LinearMode? 966 967 // frame lock related 968 // only main can select FB/FBL because panel output timing depends on main window, sub will always use FB 969 MS_BOOL bFBL; ///<whether it's framebufferless case 970 MS_BOOL bFastFrameLock; ///<whether framelock is enabled or not 971 MS_BOOL bDoneFPLL; ///<whether the FPLL is done 972 MS_BOOL bEnableFPLL; ///<enable FPLL or not 973 MS_BOOL bFPLL_LOCK; ///<whether FPLL is locked (in specific threshold.) 974 975 // Capture_Memory 976 MS_U32 u32IPMBase0; ///<IPM base 0 977 MS_U32 u32IPMBase1; ///<IPM base 1 978 MS_U32 u32IPMBase2; ///<IPM base 2 979 MS_U16 u16IPMOffset; ///<IPM offset 980 MS_U32 u16IPMFetch; ///<IPM fetch 981 } XC_EX_ApiStatus; 982 983 /// XC API status 984 typedef struct 985 { 986 MS_U32 u32ApiStatusEx_Version; ///<Version of current structure. Please always set to "EX_PANEL_INFO_EX_VERSION" as input 987 MS_U16 u16ApiStatusEX_Length; ///<Length of this structure, u16PanelInfoEX_Length=sizeof(XC_PANEL_INFO_EX) 988 989 //---------------------- 990 // Customer setting 991 //---------------------- 992 XC_EX_INPUT_SOURCE_TYPE enInputSourceType; ///< Input source type 993 994 //---------------------- 995 // Window 996 //---------------------- 997 XC_EX_WINDOW_TYPE stCapWin; ///<Capture window 998 XC_EX_WINDOW_TYPE stDispWin; ///<Display window 999 XC_EX_WINDOW_TYPE stCropWin; ///<Crop window 1000 1001 //---------------------- 1002 // Timing 1003 //---------------------- 1004 MS_BOOL bInterlace; ///<Interlaced or Progressive 1005 MS_BOOL bHDuplicate; ///<flag for vop horizontal duplicate, for MVD, YPbPr, indicate input double sampled or not 1006 MS_U16 u16InputVFreq; ///<Input V Frequency, VFreqx10, for calculate output panel timing 1007 MS_U16 u16InputVTotal; ///<Input Vertical total, for calculate output panel timing 1008 MS_U16 u16DefaultHtotal; ///<Default Htotal for VGA/YPbPr input 1009 MS_U8 u8DefaultPhase; ///<Obsolete, use u16DefaultPhase instead 1010 1011 //---------------------- 1012 // Post customized scaling 1013 //---------------------- 1014 MS_BOOL bHCusScaling; ///<assign H customized scaling instead of using XC scaling 1015 MS_U16 u16HCusScalingSrc; ///<H customized scaling src width 1016 MS_U16 u16HCusScalingDst; ///<H customized scaling dst width 1017 MS_BOOL bVCusScaling; ///<assign V manuel scaling instead of using XC scaling 1018 MS_U16 u16VCusScalingSrc; ///<V customized scaling src height 1019 MS_U16 u16VCusScalingDst; ///<V customized scaling dst height 1020 1021 //-------------- 1022 // 9 lattice 1023 //-------------- 1024 MS_BOOL bDisplayNineLattice; ///<used to indicate where to display in panel and where to put in frame buffer 1025 1026 //---------------------- 1027 // XC internal setting 1028 //---------------------- 1029 1030 /* scaling ratio */ 1031 MS_U16 u16H_SizeAfterPreScaling; ///<Horizontal size after prescaling 1032 MS_U16 u16V_SizeAfterPreScaling; ///<Vertical size after prescaling 1033 MS_BOOL bPreV_ScalingDown; ///<define whether it's pre-Vertical scaling down 1034 1035 /* real crop win in memory */ 1036 XC_EX_WINDOW_TYPE ScaledCropWin; 1037 1038 /* others */ 1039 MS_U32 u32Op2DclkSet; ///<OP to Dot clock set 1040 1041 /* Video screen status */ 1042 MS_BOOL bBlackscreenEnabled; ///<Black screen status 1043 MS_BOOL bBluescreenEnabled; ///<Blue screen status 1044 MS_U16 u16VideoDark; ///<Video dark 1045 1046 MS_U16 u16V_Length; ///<for MDrv_Scaler_SetFetchNumberLimit 1047 MS_U16 u16BytePerWord; ///<BytePerWord in Scaler 1048 MS_U16 u16OffsetPixelAlignment; ///<Pixel alignment of Offset (including IPM/OPM) 1049 MS_U8 u8BitPerPixel; ///<Bits number Per Pixel 1050 XC_EX_DEINTERLACE_MODE eDeInterlaceMode; ///<De-interlace mode 1051 MS_U8 u8DelayLines; ///<delay lines 1052 MS_BOOL bMemFmt422; ///<whether memory format is 422, for easy usage 1053 XC_EX_IMAGE_STORE_FMT eMemory_FMT; ///<memory format 1054 MS_BOOL bForceNRoff; ///<Force NR off 1055 MS_BOOL bEn3DNR; ///<whether it's 3DNR enabled 1056 MS_BOOL bUseYUVSpace; ///< color format before 3x3 matrix 1057 MS_BOOL bMemYUVFmt; ///< memroy color format 1058 MS_BOOL bForceRGBin; ///<Force set format in memory as RGB (only for RGB input source) 1059 MS_BOOL bLinearMode; ///<Is current memory format LinearMode? 1060 1061 // frame lock related 1062 // only main can select FB/FBL because panel output timing depends on main window, sub will always use FB 1063 MS_BOOL bFBL; ///<whether it's framebufferless case 1064 MS_BOOL bFastFrameLock; ///<whether framelock is enabled or not 1065 MS_BOOL bDoneFPLL; ///<whether the FPLL is done 1066 MS_BOOL bEnableFPLL; ///<enable FPLL or not 1067 MS_BOOL bFPLL_LOCK; ///<whether FPLL is locked (in specific threshold.) 1068 1069 // Capture_Memory 1070 MS_U32 u32IPMBase0; ///<IPM base 0 1071 MS_U32 u32IPMBase1; ///<IPM base 1 1072 MS_U32 u32IPMBase2; ///<IPM base 2 1073 MS_U16 u16IPMOffset; ///<IPM offset 1074 MS_U32 u16IPMFetch; ///<IPM fetch 1075 1076 //---------------------- 1077 // Pre customized scaling 1078 //---------------------- 1079 MS_BOOL bPreHCusScaling; ///<assign H customized scaling instead of using XC scaling 1080 MS_U16 u16PreHCusScalingSrc; ///<H customized scaling src width 1081 MS_U16 u16PreHCusScalingDst; ///<H customized scaling dst width 1082 MS_BOOL bPreVCusScaling; ///<assign V manuel scaling instead of using XC scaling 1083 MS_U16 u16PreVCusScalingSrc; ///<V customized scaling src height 1084 MS_U16 u16PreVCusScalingDst; ///<V customized scaling dst height 1085 1086 MS_BOOL bPQSetHSD;///<H_SizeAfterPreScaling is changed manually, which will skip PQ HSD sampling and filter 1087 1088 MS_U16 u16DefaultPhase; ///<Default Phase for VGA/YPbPr input 1089 MS_BOOL bIsHWDepthAdjSupported; ///<Is hw depth adjustment for real 3d supported or not 1090 MS_BOOL bIs2LineMode; ///<Is 2 line mode or not 1091 MS_BOOL bIsPNLYUVOutput; ///<Is Scaler YUV output 1092 1093 MS_U8 u8HDMIPixelRepetition; ///<the HDMI pixel repetition info 1094 }XC_EX_ApiStatusEx; 1095 1096 /// Define the set timing information 1097 typedef struct 1098 { 1099 MS_U32 u32HighAccurateInputVFreq; ///<high accurate input V frequency 1100 MS_U16 u16InputVFreq; ///<input V frequency 1101 MS_U16 u16InputVTotal; ///<input vertical total 1102 MS_BOOL bMVOPSrc; ///<MVOP source 1103 MS_BOOL bFastFrameLock; ///<whether it's fast frame lock case 1104 MS_BOOL bInterlace; ///<whether it's interlace 1105 } XC_EX_SetTiming_Info; 1106 1107 //------------------------------ 1108 // XC Auto 1109 //------------------------------ 1110 1111 /// internal calibration 1112 typedef struct 1113 { 1114 MS_U16 u16CH_AVG[3]; 1115 } XC_EX_AUTOADC_TYPE; 1116 1117 /// get IP1 report min/max R/G/B 1118 typedef enum 1119 { 1120 E_XC_EX_AUTO_MIN_R , 1121 E_XC_EX_AUTO_MIN_G , 1122 E_XC_EX_AUTO_MIN_B , 1123 E_XC_EX_AUTO_MAX_R , 1124 E_XC_EX_AUTO_MAX_G , 1125 E_XC_EX_AUTO_MAX_B , 1126 } XC_EX_AUTO_GAIN_TYPE; 1127 1128 /// the tming types for internal calibration 1129 typedef enum 1130 { 1131 E_XC_EX_OFF, 1132 E_XC_EX_480P, 1133 E_XC_EX_576P, 1134 E_XC_EX_720P, 1135 E_XC_EX_1080P, 1136 E_XC_EX_480I, 1137 E_XC_EX_576I, 1138 E_XC_EX_720I, 1139 E_XC_EX_1080I, 1140 } XC_EX_Internal_TimingType; 1141 1142 //------------------------------ 1143 // Software Reset 1144 //------------------------------ 1145 /// software reset type 1146 typedef enum 1147 { 1148 E_XC_EX_REST_SCALER_ALL = _XC_EX_BIT(0), 1149 E_XC_EX_REST_IP_F1 = _XC_EX_BIT(1), 1150 E_XC_EX_REST_IP_F2 = _XC_EX_BIT(2), 1151 E_XC_EX_REST_OP = _XC_EX_BIT(3), 1152 E_XC_EX_REST_IP_ALL = _XC_EX_BIT(4), 1153 E_XC_EX_REST_CLK = (_XC_EX_BIT(6)|_XC_EX_BIT(3)), 1154 } XC_EX_SOFTWARE_REST_TYPE_t; 1155 1156 /// Detect Europe HDTV status type 1157 typedef enum 1158 { 1159 E_XC_EX_EURO_AUS_HDTV_NORMAL = 0, ///<not detected Euro or Aus HDTV 1160 E_XC_EX_EURO_HDTV_DETECTED, ///<Euro HDTV detected 1161 E_XC_EX_AUSTRALIA_HDTV_DETECTED, ///<Aus HDTV detected 1162 } XC_EX_DETECT_EURO_HDTV_STATUS_TYPE; 1163 1164 1165 //Capture_Memory 1166 1167 /// Define the rectangle information 1168 typedef struct 1169 { 1170 MS_S16 s16X_Start; ///<rectangle start x 1171 MS_S16 s16Y_Start; ///<rectangle start x 1172 MS_S16 s16X_Size; ///<rectangle horizontal size 1173 MS_S16 s16Y_Size; ///<rectangle vertical size 1174 1175 MS_U8 *pRect; ///<the buffer address for the rectangle 1176 MS_U32 u32RectPitch; ///<rectangle pitch 1177 MS_U16 u16PointSize; ///<point size, consider the memory size 1178 } XC_EX_RECT_INFO; 1179 1180 /// Define for format of pixel 24 bit 1181 typedef struct 1182 { 1183 MS_U8 R_Cr; 1184 MS_U8 G_Y; 1185 MS_U8 B_Cb; 1186 } XC_EX_PIXEL_24BIT; 1187 1188 /// Define for format of pixel 32 bit 1189 typedef struct 1190 { 1191 MS_U32 B_Cb :10; 1192 MS_U32 G_Y :10; 1193 MS_U32 R_Cr :10; 1194 MS_U32 u8Dummy:2; 1195 } XC_EX_PIXEL_32BIT; 1196 1197 /// Define for format of pixel 16 bit 1198 typedef struct 1199 { 1200 MS_U8 u8G_Y; 1201 MS_U8 u8BR_CbCr; 1202 } XC_EX_PIXEL_422_8BIT; 1203 1204 typedef enum 1205 { 1206 E_XC_EX_OUTPUTDATA_RGB10BITS = 0x00, ///< Dummy[31:30] R[29:20] G[19:10] B[9:0] 1207 E_XC_EX_OUTPUTDATA_RGB8BITS = 0x01, ///< R[23:16] G[15:8] B[7:0] 1208 E_XC_EX_OUTPUTDATA_4228BITS = 0x03, ///< CbCr[15:8] Y[7:0] 1209 1210 E_XC_EX_OUTPUTDATA_FRC_RGB10BITS = 0x04, ///< Dummy[31:30] R[29:20] G[19:10] B[9:0] 1211 E_XC_EX_OUTPUTDATA_FRC_RGB8BITS = 0x05, ///< R[23:16] G[15:8] B[7:0] 1212 E_XC_EX_OUTPUTDATA_FRC_4228BITS = 0x06, ///< CbCr[15:8] Y[7:0] 1213 } XC_EX_OUTPUTDATA_TYPE; 1214 1215 typedef enum 1216 { 1217 E_XC_EX_INPUTDATA_RGB10BITS = 0x00, ///< Dummy[31:30] R[29:20] G[19:10] B[9:0] 1218 E_XC_EX_INPUTDATA_RGB8BITS = 0x01, ///< R[23:16] G[15:8] B[7:0] 1219 E_XC_EX_INPUTDATA_4228BITS = 0x03, ///< CbCr[15:8] Y[7:0] 1220 } XC_EX_INPUTDATA_TYPE; 1221 1222 1223 /// define for the auto calbration window type 1224 typedef struct 1225 { 1226 MS_U16 u16X; ///<window start x 1227 MS_U16 u16Xsize; ///<window horizontal size 1228 MS_U16 u16Y; ///<window start y 1229 MS_U16 u16Ysize; ///<window vertical size 1230 } XC_EX_AUTO_CAL_WINDOW; 1231 1232 typedef struct 1233 { 1234 XC_EX_IMAGE_STORE_FMT eStoreFmt; ///<image store format 1235 XC_EX_AUTO_CAL_WINDOW eCal_Win_Size; ///<auto calbration window type 1236 XC_EX_AUTOADC_TYPE pixelMax; ///<maximum value among the pixels 1237 XC_EX_AUTOADC_TYPE pixelMin; ///<minimum value among the pixels 1238 XC_EX_AUTOADC_TYPE pixelAverage; ///<average value among the pixels 1239 } XC_EX_IMAGE_MEM_INFO; 1240 1241 /// defined channel select for contrast adjusting. 1242 typedef enum 1243 { 1244 E_XC_EX_VOP_CHR = 0, ///< Channel R 1245 E_XC_EX_VOP_CHG, ///< Channel G 1246 E_XC_EX_VOP_CHB, ///< Channel B 1247 E_XC_EX_VOP_ALL, ///< All Channel 1248 } XC_EX_VOP_CHANNEL; 1249 1250 /// Define Scaler GOP IP setting. 1251 typedef enum 1252 { 1253 E_XC_EX_IP0_SEL_GOP0, 1254 E_XC_EX_IP0_SEL_GOP1, 1255 E_XC_EX_IP0_SEL_GOP2, 1256 E_XC_EX_NIP_SEL_GOP0, 1257 E_XC_EX_NIP_SEL_GOP1, 1258 E_XC_EX_NIP_SEL_GOP2, 1259 E_XC_EX_MVOP_SEL, 1260 } XC_EX_IPSEL_GOP; 1261 1262 /// Define Scaler memory format 1263 typedef enum 1264 { 1265 E_XC_EX_MEM_FMT_AUTO = 0, 1266 E_XC_EX_MEM_FMT_444 = 1, 1267 E_XC_EX_MEM_FMT_422 = 2, 1268 } XC_EX_MEM_FMT; 1269 1270 /// Define the PQ path information 1271 /** 1272 * The active Window for PQ function to takes place. 1273 */ 1274 typedef enum 1275 { 1276 /// Main window 1277 PQ_EX_MAIN_WINDOW=0, 1278 /// Sub window 1279 PQ_EX_SUB_WINDOW=1, 1280 /// The max support window of PQ 1281 PQ_EX_MAX_WINDOW 1282 } PQ_EX_WIN; 1283 1284 /** 1285 * FOURCE COLOR FMT 1286 */ 1287 typedef enum 1288 { 1289 /// Default 1290 PQ_EX_FOURCE_COLOR_DEFAULT, 1291 /// RGB 1292 PQ_EX_FOURCE_COLOR_RGB, 1293 /// YUV 1294 PQ_EX_FOURCE_COLOR_YUV, 1295 } PQ_EX_FOURCE_COLOR_FMT; 1296 1297 /** 1298 * PQ DEINTERLACE MODE 1299 */ 1300 typedef enum 1301 { 1302 /// off 1303 PQ_EX_DEINT_OFF=0, 1304 /// 2DDI BOB 1305 PQ_EX_DEINT_2DDI_BOB, 1306 /// 2DDI AVG 1307 PQ_EX_DEINT_2DDI_AVG, 1308 /// 3DDI History(24 bit) 1309 PQ_EX_DEINT_3DDI_HISTORY, 1310 /// 3DDI(16 bit) 1311 PQ_EX_DEINT_3DDI, 1312 } PQ_EX_DEINTERLACE_MODE; 1313 /** 1314 * Video data information to supply when in PQ mode. 1315 */ 1316 typedef struct 1317 { 1318 /// is FBL or not 1319 MS_BOOL bFBL; 1320 /// is interlace mode or not 1321 MS_BOOL bInterlace; 1322 /// input Horizontal size 1323 MS_U16 u16input_hsize; 1324 /// input Vertical size 1325 MS_U16 u16input_vsize; 1326 /// input Vertical total 1327 MS_U16 u16input_vtotal; 1328 /// input Vertical frequency 1329 MS_U16 u16input_vfreq; 1330 /// output Vertical frequency 1331 MS_U16 u16ouput_vfreq; 1332 /// Display Horizontal size 1333 MS_U16 u16display_hsize; 1334 /// Display Vertical size 1335 MS_U16 u16display_vsize; 1336 }MS_PQ_EX_Mode_Info; 1337 /** 1338 * INPUT SOURCE TYPE 1339 */ 1340 typedef enum 1341 { 1342 /// VGA 1343 PQ_EX_INPUT_SOURCE_VGA, 1344 /// TV 1345 PQ_EX_INPUT_SOURCE_TV, 1346 1347 /// CVBS 1348 PQ_EX_INPUT_SOURCE_CVBS, 1349 1350 /// S-video 1351 PQ_EX_INPUT_SOURCE_SVIDEO, 1352 1353 /// Component 1354 PQ_EX_INPUT_SOURCE_YPBPR, 1355 /// Scart 1356 PQ_EX_INPUT_SOURCE_SCART, 1357 1358 1359 /// HDMI 1360 PQ_EX_INPUT_SOURCE_HDMI, 1361 1362 /// DTV 1363 PQ_EX_INPUT_SOURCE_DTV, 1364 1365 /// DVI 1366 PQ_EX_INPUT_SOURCE_DVI, 1367 1368 // Application source 1369 /// Storage 1370 PQ_EX_INPUT_SOURCE_STORAGE, 1371 /// KTV 1372 PQ_EX_INPUT_SOURCE_KTV, 1373 /// JPEG 1374 PQ_EX_INPUT_SOURCE_JPEG, 1375 1376 /// The max support number of PQ input source 1377 PQ_EX_INPUT_SOURCE_NUM, 1378 /// None 1379 PQ_EX_INPUT_SOURCE_NONE = PQ_EX_INPUT_SOURCE_NUM, 1380 } PQ_EX_INPUT_SOURCE_TYPE; 1381 1382 1383 // PQ Function 1384 typedef enum 1385 { 1386 E_PQ_EX_IOCTL_NONE = 0x00000000, 1387 E_PQ_EX_IOCTL_HSD_SAMPLING = 0x00000001, 1388 E_PQ_EX_IOCTL_PREVSD_BILINEAR = 0x00000002, 1389 E_PQ_EX_IOCTL_ADC_SAMPLING = 0x00000003, 1390 E_PQ_EX_IOCTL_RFBL_CTRL = 0x00000004, 1391 E_PQ_EX_IOCTL_PQ_SUGGESTED_FRAMENUM = 0x00000008, 1392 E_PQ_EX_IOCTL_SET_UCFEATURE = 0x00000010, 1393 E_PQ_EX_IOCTL_SKIP_MADI_TBL = 0x00000020, 1394 E_PQ_EX_IOCTL_NUM, 1395 } PQ_EX_IOCTL_FLAG_TYPE; 1396 1397 typedef struct s_PQ_EX_Function 1398 { 1399 1400 void (* pq_disable_filmmode)(PQ_EX_WIN eWindow, MS_BOOL bOn); 1401 1402 MS_BOOL (* pq_load_scalingtable)(PQ_EX_WIN eWindow, MS_U8 eXRuleType, MS_BOOL bPreV_ScalingDown, 1403 MS_BOOL bInterlace, MS_BOOL bColorSpaceYUV, MS_U16 u16InputSize, MS_U16 u16SizeAfterScaling); 1404 1405 MS_BOOL (* pq_set_csc)(PQ_EX_WIN eWindow, PQ_EX_FOURCE_COLOR_FMT enFourceColor); 1406 1407 PQ_EX_DEINTERLACE_MODE (* pq_set_memformat)(PQ_EX_WIN eWindow, MS_BOOL bMemFmt422, MS_BOOL bFBL, MS_U8 *u8BitsPerPixel); 1408 1409 void (* pq_set_420upsampling)(PQ_EX_WIN eWindow, MS_BOOL bFBL, MS_BOOL bPreV_ScalingDown, MS_U16 u16V_CropStart); 1410 1411 void (* pq_set_modeInfo)(PQ_EX_WIN eWindow, PQ_EX_INPUT_SOURCE_TYPE enInputSourceType, MS_PQ_EX_Mode_Info *pstPQModeInfo); 1412 1413 void (* pq_deside_srctype)(PQ_EX_WIN eWindow, PQ_EX_INPUT_SOURCE_TYPE enInputSourceType); 1414 1415 MS_BOOL (* pq_get_memyuvfmt)(PQ_EX_WIN eWindow, PQ_EX_FOURCE_COLOR_FMT enFourceColor); 1416 1417 MS_BOOL (* pq_ioctl)(PQ_EX_WIN eWindow, MS_U32 u32Flag, void *pBuf, MS_U32 u32BufSize); 1418 }PQ_EX_Function_Info; 1419 1420 typedef struct 1421 { 1422 MS_U32 u32ratio; 1423 MS_BOOL bADVMode; 1424 } PQ_EX_HSD_SAMPLING_INFO; 1425 1426 typedef struct 1427 { 1428 PQ_EX_INPUT_SOURCE_TYPE enPQSourceType; 1429 MS_PQ_EX_Mode_Info stPQModeInfo; 1430 MS_U16 u16ratio; 1431 } PQ_EX_ADC_SAMPLING_INFO; 1432 1433 //Display information 1434 typedef struct 1435 { 1436 MS_U32 VDTOT; //Output vertical total 1437 MS_U32 DEVST; //Output DE vertical start 1438 MS_U32 DEVEND;//Output DE Vertical end 1439 MS_U32 HDTOT;// Output horizontal total 1440 MS_U32 DEHST; //Output DE horizontal start 1441 MS_U32 DEHEND;// Output DE horizontal end 1442 MS_BOOL bInterlaceMode; 1443 MS_BOOL bYUVInput; 1444 } XC_EX_DST_DispInfo; 1445 1446 typedef enum 1447 { 1448 ///IP2 path. 1449 E_XC_EX_GOP_XCDST_IP2=0, 1450 1451 /// IP man path. 1452 E_XC_EX_GOP_XCDST_IP1_MAIN=1, 1453 1454 ///IP sub path. 1455 E_XC_EX_GOP_XCDST_IP1_SUB=2, 1456 1457 /// op1 main path. 1458 E_XC_EX_GOP_XCDST_OP1_MAIN=3, 1459 1460 E_XC_EX_MAX_GOP_XCDST_SUPPORT 1461 1462 } XC_EX_GOP_XCDST_TYPE; 1463 1464 /// Set data mux to VE 1465 typedef enum 1466 { 1467 /// GOP mux0 to VE 1468 E_XC_EX_VOP_SEL_OSD_BLEND0, 1469 /// GOP mux1 to VE 1470 E_XC_EX_VOP_SEL_OSD_BLEND1, 1471 /// GOP mux2 to VE 1472 E_XC_EX_VOP_SEL_OSD_BLEND2, 1473 /// mux from XC MACE 1474 E_XC_EX_VOP_SEL_MACE_RGB, 1475 1476 E_XC_EX_VOP_SEL_OSD_NONE 1477 } XC_EX_VOP_SEL_OSD_XC2VE_MUX; 1478 1479 // 3D info 1480 typedef enum 1481 { 1482 //range [0000 ~ 1111] reserved for hdmi 3D spec 1483 E_XC_EX_3D_INPUT_FRAME_PACKING = 0x00, //0000 1484 E_XC_EX_3D_INPUT_FIELD_ALTERNATIVE = 0x01, //0001 1485 E_XC_EX_3D_INPUT_LINE_ALTERNATIVE = 0x02, //0010 1486 E_XC_EX_3D_INPUT_SIDE_BY_SIDE_FULL = 0x03, //0011 1487 E_XC_EX_3D_INPUT_L_DEPTH = 0x04, //0100 1488 E_XC_EX_3D_INPUT_L_DEPTH_GRAPHICS_GRAPHICS_DEPTH = 0x05, //0101 1489 E_XC_EX_3D_INPUT_TOP_BOTTOM = 0x06, //0110 1490 E_XC_EX_3D_INPUT_SIDE_BY_SIDE_HALF = 0x08, //1000 1491 1492 E_XC_EX_3D_INPUT_CHECK_BORAD = 0x09, //1001 1493 1494 //user defined 1495 E_XC_EX_3D_INPUT_MODE_USER = 0x10, 1496 E_XC_EX_3D_INPUT_MODE_NONE = E_XC_EX_3D_INPUT_MODE_USER, 1497 E_XC_EX_3D_INPUT_FRAME_ALTERNATIVE, 1498 E_XC_EX_3D_INPUT_SIDE_BY_SIDE_HALF_INTERLACE, 1499 // optimize for format: in:E_XC_3D_INPUT_FRAME_PACKING, out:E_XC_3D_OUTPUT_TOP_BOTTOM,E_XC_3D_OUTPUT_SIDE_BY_SIDE_HALF 1500 E_XC_EX_3D_INPUT_FRAME_PACKING_OPT, 1501 // optimize for format: in:E_XC_3D_INPUT_TOP_BOTTOM, out:E_XC_3D_OUTPUT_SIDE_BY_SIDE_HALF 1502 E_XC_EX_3D_INPUT_TOP_BOTTOM_OPT, 1503 E_XC_EX_3D_INPUT_NORMAL_2D, 1504 E_XC_EX_3D_INPUT_NORMAL_2D_INTERLACE, 1505 E_XC_EX_3D_INPUT_NORMAL_2D_INTERLACE_PTP, 1506 E_XC_EX_3D_INPUT_SIDE_BY_SIDE_HALF_INTERLACE_OPT, 1507 E_XC_EX_3D_INPUT_NORMAL_2D_HW, //for hw 2D to 3D use 1508 E_XC_EX_3D_INPUT_PIXEL_ALTERNATIVE, 1509 } XC_EX_3D_INPUT_MODE; 1510 1511 1512 typedef enum 1513 { 1514 E_XC_EX_3D_OUTPUT_MODE_NONE, 1515 E_XC_EX_3D_OUTPUT_LINE_ALTERNATIVE , 1516 E_XC_EX_3D_OUTPUT_TOP_BOTTOM, 1517 E_XC_EX_3D_OUTPUT_SIDE_BY_SIDE_HALF, 1518 E_XC_EX_3D_OUTPUT_FRAME_ALTERNATIVE, //25-->50,30-->60,24-->48,50-->100,60-->120----FRC 1:2 1519 E_XC_EX_3D_OUTPUT_FRAME_L, 1520 E_XC_EX_3D_OUTPUT_FRAME_R, 1521 E_XC_EX_3D_OUTPUT_FRAME_ALTERNATIVE_NOFRC, //50->50, 60->60-------------------------------FRC 1:1 1522 E_XC_EX_3D_OUTPUT_CHECKBOARD_HW, //for hw 2d to 3d use 1523 E_XC_EX_3D_OUTPUT_LINE_ALTERNATIVE_HW, //for hw 2d to 3d use 1524 E_XC_EX_3D_OUTPUT_PIXEL_ALTERNATIVE_HW, //for hw 2d to 3d use 1525 E_XC_EX_3D_OUTPUT_FRAME_L_HW, //for hw 2d to 3d use 1526 E_XC_EX_3D_OUTPUT_FRAME_R_HW, //for hw 2d to 3d use 1527 E_XC_EX_3D_OUTPUT_FRAME_ALTERNATIVE_HW, //for hw 2d to 3d use 1528 E_XC_EX_3D_OUTPUT_TOP_BOTTOM_HW, //for hw 2d to 3d use, it based on E_XC_3D_OUTPUT_TOP_BOTTOM implement 1529 E_XC_EX_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 1530 E_XC_EX_3D_OUTPUT_FRAME_PACKING, 1531 } XC_EX_3D_OUTPUT_MODE; 1532 1533 typedef enum 1534 { 1535 E_XC_EX_3D_OUTPUT_FI_MODE_NONE , 1536 E_XC_EX_3D_OUTPUT_FI_1920x1080 , 1537 E_XC_EX_3D_OUTPUT_FI_960x1080 , 1538 E_XC_EX_3D_OUTPUT_FI_1920x540 , 1539 1540 E_XC_EX_3D_OUTPUT_FI_1280x720 , 1541 } XC_EX_3D_OUTPUT_FI_MODE; 1542 1543 typedef enum 1544 { 1545 E_XC_EX_3D_AUTODETECT_SW, 1546 E_XC_EX_3D_AUTODETECT_HW, 1547 E_XC_EX_3D_AUTODETECT_HW_COMPATIBLE, 1548 E_XC_EX_3D_AUTODETECT_MAX 1549 } XC_EX_3D_AUTODETECT_METHOD; 1550 1551 typedef enum 1552 { 1553 E_XC_EX_3D_PANEL_NONE, 1554 E_XC_EX_3D_PANEL_SHUTTER, //240hz panel, which can process updown, leftright,vertical or horizontal line weave 1555 E_XC_EX_3D_PANEL_PELLICLE, //120hz panel, which can only process horizontal line weave 1556 E_XC_EX_3D_PANEL_4K1K_SHUTTER, //120hz 4K1K panel, which can process updown, leftright,vertical or horizontal line weave 1557 E_XC_EX_3D_PANEL_MAX, 1558 } XC_EX_3D_PANEL_TYPE; 1559 1560 //hw 2d to 3d para 1561 typedef struct 1562 { 1563 MS_U32 u32Hw2dTo3dPara_Version; 1564 MS_U16 u16Concave; 1565 MS_U16 u16Gain; 1566 MS_U16 u16Offset; 1567 MS_U16 u16ArtificialGain; 1568 MS_U16 u16EleSel; 1569 MS_U16 u16ModSel; 1570 MS_U16 u16EdgeBlackWidth; 1571 } XC_EX_3D_HW2DTO3D_PARA; 1572 1573 //detect 3d format para 1574 typedef struct 1575 { 1576 MS_U32 u32Detect3DFormatPara_Version; //version control, back compatible 1577 //////////////////obsolete field begin/////////////////////////////////////////////////////////////////////////////////////////////////////////// 1578 MS_U16 u16HorSearchRange; //the horizontal range for find the similar pixel at R image 1579 MS_U16 u16VerSearchRange; //the vertical range for find the similar pixel at R image 1580 MS_U16 u16GYPixelThreshold; //g/y pixel threshold for define the similar pixel 1581 MS_U16 u16RCrPixelThreshold; //r/cr pixel threshold for define the similar pixel 1582 MS_U16 u16BCbPixelThreshold; //b/cb pixel threshold for define the similar pixel 1583 MS_U16 u16HorSampleCount; //the horizontal sample count, the total checked pixel will be u16HorSampleCount*u16VerSampleCount 1584 MS_U16 u16VerSampleCount; //the vertical sample count, the total checked pixel will be u16HorSampleCount*u16VerSampleCount 1585 MS_U16 u16MaxCheckingFrameCount; //the max checking frame count 1586 MS_U16 u16HitPixelPercentage; //the percentage about hit pixel in one frame total checked pixel, for example: 70%, need set as 70 1587 //////////////////obsolete field end///////////////////////////////////////////////////////////////////////////////////////////////////////////// 1588 MS_BOOL bEnableOverscan; //detect 3d format for considering overscan shift 1589 } XC_EX_3D_DETECT3DFORMAT_PARA; 1590 1591 //define 3d fp info para 1592 typedef struct 1593 { 1594 MS_U32 u32FPInfoPara_Version; //version control, back compatible 1595 MS_U16 u16HBlank; //horizontal blank 1596 MS_BOOL bEnableUserSetting; //enable user setting 1597 } XC_EX_3D_FPINFO_PARA; 1598 1599 typedef enum 1600 { 1601 E_XC_EX_DBG_FPLL_MODE_DISABLE_ALL = 0, 1602 E_XC_EX_DBG_FPLL_MODE_DISABLE = 1, 1603 E_XC_EX_DBG_FPLL_MODE_ENABLE = 2, 1604 E_XC_EX_DBG_FPLL_MODE_MAX, 1605 } XC_EX_FPLL_DBG_MODE;//For debug purpose only! 1606 1607 typedef enum 1608 { 1609 E_XC_EX_DBG_FPLL_FLAG_PHASELIMIT = 0, 1610 E_XC_EX_DBG_FPLL_FLAG_D5D6D7 = 1, 1611 E_XC_EX_DBG_FPLL_FLAG_IGAIN = 2, 1612 E_XC_EX_DBG_FPLL_FLAG_PGAIN = 3, 1613 E_XC_EX_DBG_FPLL_FLAG_INITSETSTEP = 4, 1614 E_XC_EX_DBG_FPLL_FLAG_INITSETDELAY= 5, 1615 E_XC_EX_DBG_FPLL_FLAG_MAX, 1616 } XC_EX_FPLL_DBG_FLAG;//For debug purpose only! 1617 1618 typedef enum 1619 { 1620 E_XC_EX_FPLL_MODE_DISABLE_ALL = 0, /// Disable all current FPLL customer setting(then scaler will auto decide it) 1621 E_XC_EX_FPLL_MODE_DISABLE = 1, /// Disable the specified(by other function parameter) FPLL customer setting 1622 E_XC_EX_FPLL_MODE_ENABLE = 2, /// Enable the specified(by other function parameter) FPLL customer setting 1623 E_XC_EX_FPLL_MODE_MAX, 1624 } XC_EX_FPLL_MODE; 1625 1626 typedef enum 1627 { 1628 E_XC_EX_FPLL_FLAG_PHASELIMIT = 0, ///Set customer setting of PHASE limit 1629 E_XC_EX_FPLL_FLAG_D5D6D7 = 1,///Set customer setting of D5D6D7 limit 1630 E_XC_EX_FPLL_FLAG_IGAIN = 2,///Set customer setting of IGAIN 1631 E_XC_EX_FPLL_FLAG_PGAIN = 3,///Set customer setting of PGAIN 1632 E_XC_EX_FPLL_FLAG_INITSETSTEP = 4, ///steps to set DCLK 1633 E_XC_EX_FPLL_FLAG_INITSETDELAY= 5, ///delay between steps when setting DCLK 1634 E_XC_EX_FPLL_FLAG_MAX, 1635 } XC_EX_FPLL_FLAG; 1636 1637 typedef enum 1638 { 1639 E_XC_EX_MLOAD_UNSUPPORTED = 0, 1640 E_XC_EX_MLOAD_DISABLED = 1, 1641 E_XC_EX_MLOAD_ENABLED = 2, 1642 } XC_EX_MLOAD_TYPE; 1643 1644 typedef enum 1645 { 1646 E_XC_EX_MLG_UNSUPPORTED = 0, 1647 E_XC_EX_MLG_DISABLED = 1, 1648 E_XC_EX_MLG_ENABLED = 2, 1649 } XC_EX_MLG_TYPE; 1650 1651 typedef enum 1652 { 1653 E_XC_EX_HDMI_SYNC_DE, 1654 E_XC_EX_HDMI_SYNC_HV, 1655 } XC_EX_HDMI_SYNC_TYPE; 1656 1657 typedef enum 1658 { 1659 E_XC_EX_FRC_1_1 = 0, 1660 E_XC_EX_FRC_1_2 = 1, 1661 E_XC_EX_FRC_5_12 = 2, 1662 E_XC_EX_FRC_2_5 = 3, 1663 E_XC_EX_FRC_1_4 = 4, 1664 } XC_EX_FRC_TYPE; 1665 1666 // scaler FRC table 1667 typedef struct 1668 { 1669 MS_U16 u16LowerBound; 1670 MS_U16 u16HigherBound; 1671 MS_U8 u8FRC_In:4; // ivs 1672 MS_U8 u8FRC_Out:4; // ovs 1673 XC_EX_FRC_TYPE eFRC_Type; 1674 } XC_EX_FRC_SETTING; 1675 1676 typedef enum 1677 { 1678 E_PQ_ex_IOCTL_GET_HSD_SAMPLING, 1679 E_PQ_ex_IOCTL_MAX, 1680 } E_PQ_ex_IOCTL_FLAG; 1681 1682 1683 typedef enum 1684 { 1685 E_XC_EX_GET_PIXEL_RET_FAIL = 0, ///<Fail 1686 E_XC_EX_GET_PIXEL_RET_OK, ///<OK 1687 E_XC_EX_GET_PIXEL_RET_OUT_OF_RANGE, ///< out of range 1688 } XC_EX_GET_PixelRGB_ReturnValue; 1689 1690 1691 typedef enum 1692 { 1693 E_XC_EX_GET_PIXEL_STAGE_AFTER_DLC = 0x01, 1694 E_XC_EX_GET_PIXEL_STAGE_PRE_GAMMA = 0x02, 1695 E_XC_EX_GET_PIXEL_STAGE_AFTER_OSD = 0x03, 1696 E_XC_EX_GET_PIXEL_STAGE_MAX = 0xFF, 1697 } XC_EX_GET_PIXEL_RGB_STAGE; 1698 1699 typedef struct 1700 { 1701 XC_EX_GET_PIXEL_RGB_STAGE enStage; 1702 MS_U16 u16x; 1703 MS_U16 u16y; 1704 MS_U32 u32r; 1705 MS_U32 u32g; 1706 MS_U32 u32b; 1707 } XC_EX_Get_Pixel_RGB; 1708 1709 typedef struct 1710 { 1711 MS_U32 u32ReportPixelInfo_Version; ///<Input: Version of current structure. Please always set to "XC_EX_REPORT_PIXELINFO_VERSION" as input 1712 MS_U16 u16ReportPixelInfo_Length; ///<Input: Length of this structure, u16ReportPixelInfo_Length=sizeof(MS_XC_REPORT_PIXELINFO) 1713 XC_EX_GET_PIXEL_RGB_STAGE enStage; ///<Input: Pixel info report stage 1714 MS_U16 u16RepWinColor; ///<Input:Report window Color 1715 MS_U16 u16XStart; ///<Input: X start location of report window 1716 MS_U16 u16XEnd; ///<Input: X end location of report window 1717 MS_U16 u16YStart; ///<Input: Y start location of report window 1718 MS_U16 u16YEnd; ///<Input: Y end location of report window 1719 MS_U16 u16RCrMin; ///<Output:R or Cr min value 1720 MS_U16 u16RCrMax; ///<Output:R or Cr max value 1721 MS_U16 u16GYMin; ///<Output:G or Y min value 1722 MS_U16 u16GYMax; ///<Output:G or Y max value 1723 MS_U16 u16BCbMin; ///<Output:B or Cb min value 1724 MS_U16 u16BCbMax; ///<Output:B or Cb max value 1725 MS_U32 u32RCrSum; ///<Output:R or Cr sum value 1726 MS_U32 u32GYSum; ///<Output:G or Y sum value 1727 MS_U32 u32BCbSum; ///<Output:B or Cb sum value 1728 MS_BOOL bShowRepWin; ///<Input: Show report window or not 1729 } XC_EX_REPORT_PIXELINFO; 1730 1731 // scaler interrupt sources 1732 typedef enum 1733 { 1734 // 0x00, first 4 bits are unused 1735 E_SC_EX_INT_DIPW = 1, //DIPW write one frame done interrupt 1736 E_SC_EX_INT_START = 4, 1737 E_SC_EX_INT_RESERVED1 = E_SC_EX_INT_START, // before is SC_INT_TUNE_FAIL_P, FBL line buffer overrun/underrun 1738 // scaler dosen't have this interrupt now, 1739 1740 E_SC_EX_INT_VSINT, // output Vsync interrupt, can select polarity with BK0_04[1] 1741 E_SC_EX_INT_F2_VTT_CHG, // main window, HDMI mute or Vsync polarity changed, Vtt change exceed BK1_1D[11:8] 1742 E_SC_EX_INT_F1_VTT_CHG, 1743 E_SC_EX_INT_F2_VS_LOSE, // didn't received Vsync for a while or Vtt count BK1_1F[10:0] exceed max value 1744 E_SC_EX_INT_F1_VS_LOSE, 1745 E_SC_EX_INT_F2_JITTER, // H/V start/end didn't be the same with privous value, usually used in HDMI/DVI input 1746 E_SC_EX_INT_F1_JITTER, 1747 E_SC_EX_INT_F2_IPVS_SB, // input V sync interrupt, can select which edge to trigger this interrupt with BK0_04[0] 1748 E_SC_EX_INT_F1_IPVS_SB, 1749 E_SC_EX_INT_F2_IPHCS_DET, // input H sync interrupt 1750 E_SC_EX_INT_F1_IPHCS_DET, 1751 1752 // 0x10 1753 E_SC_EX_INT_PWM_RP_L_INT, // pwm rising edge of left frame 1754 E_SC_EX_INT_PWM_FP_L_INT, // pwm falling edge of left frame 1755 E_SC_EX_INT_F2_HTT_CHG, // Hsync polarity changed or Hperiod change exceed BK1_1D[5:0] 1756 E_SC_EX_INT_F1_HTT_CHG, 1757 E_SC_EX_INT_F2_HS_LOSE, // didn't received H sync for a while or Hperiod count BK1_20[13:0] exceed max value 1758 E_SC_EX_INT_F1_HS_LOSE, 1759 E_SC_EX_INT_PWM_RP_R_INT, // pwm rising edge of right frame 1760 E_SC_EX_INT_PWM_FP_R_INT, // pwm falling edge of right frame 1761 E_SC_EX_INT_F2_CSOG, // composite sync or SoG input signal type changed (for example, SoG signal from none -> valid, valid -> none) 1762 E_SC_EX_INT_F1_CSOG, 1763 E_SC_EX_INT_F2_RESERVED2, // scaler dosen't have this interrupt now, before is SC_INT_F2_ATS_READY 1764 E_SC_EX_INT_F1_RESERVED2, // scaler dosen't have this interrupt now, before is SC_INT_F1_ATS_READY 1765 E_SC_EX_INT_F2_ATP_READY, // auto phase ready interrupt 1766 E_SC_EX_INT_F1_ATP_READY, 1767 E_SC_EX_INT_F2_RESERVED3, // scaler dosen't have this interrupt now, before is SC_INT_F2_ATG_READY 1768 E_SC_EX_INT_F1_RESERVED3, // scaler dosen't have this interrupt now, before is SC_INT_F1_ATG_READY 1769 1770 E_SC_EX_MAX_SC_INT, 1771 } SC_EX_INT_SRC; 1772 1773 typedef enum 1774 { 1775 // 0x00, first 4 bits are unused 1776 E_XC_EX_INT_RESERVED1 = 4, ///< scaler dosen't have this interrupt now 1777 E_XC_EX_INT_VSINT, ///< output Vsync interrupt 1778 E_XC_EX_INT_F2_VTT_CHG, ///< main window, HDMI mute or Vsync polarity changed, Vtt change exceed BK1_1D[11:8] 1779 E_XC_EX_INT_F1_VTT_CHG, 1780 E_XC_EX_INT_F2_VS_LOSE, ///< didn't received Vsync for a while or Vtt count BK1_1F[10:0] exceed max value 1781 E_XC_EX_INT_F1_VS_LOSE, 1782 E_XC_EX_INT_F2_JITTER, ///< H/V start/end didn't be the same with privous value, usually used in HDMI/DVI input 1783 E_XC_EX_INT_F1_JITTER, 1784 E_XC_EX_INT_F2_IPVS_SB, ///< input V sync interrupt 1785 E_XC_EX_INT_F1_IPVS_SB, 1786 E_XC_EX_INT_F2_IPHCS_DET, ///< input H sync interrupt 1787 E_XC_EX_INT_F1_IPHCS_DET, 1788 1789 // 0x10 1790 E_XC_EX_INT_PWM_RP_L_INT, ///< pwm rising edge of left frame, please use MDrv_XC_InterruptAvaliable() to check if avalible or not 1791 E_XC_EX_INT_PWM_FP_L_INT, ///< pwm falling edge of left frame, please use MDrv_XC_InterruptAvaliable() to check if avalible or not 1792 E_XC_EX_INT_F2_HTT_CHG, ///< Hsync polarity changed or Hperiod change exceed BK1_1D[5:0] 1793 E_XC_EX_INT_F1_HTT_CHG, 1794 E_XC_EX_INT_F2_HS_LOSE, ///< didn't received H sync for a while or Hperiod count BK1_20[13:0] exceed max value 1795 E_XC_EX_INT_F1_HS_LOSE, 1796 E_XC_EX_INT_PWM_RP_R_INT, ///< pwm rising edge of right frame, please use MDrv_XC_InterruptAvaliable() to check if avalible or not 1797 E_XC_EX_INT_PWM_FP_R_INT, ///< pwm falling edge of right frame, please use MDrv_XC_InterruptAvaliable() to check if avalible or not 1798 E_XC_EX_INT_F2_CSOG, ///< composite sync or SoG input signal type changed (for example, SoG signal from none -> valid, valid -> none) 1799 E_XC_EX_INT_F1_CSOG, 1800 E_XC_EX_INT_F2_RESERVED2, ///< scaler dosen't have this interrupt now 1801 E_XC_EX_INT_F1_RESERVED2, 1802 E_XC_EX_INT_F2_ATP_READY, ///< auto phase ready interrupt 1803 E_XC_EX_INT_F1_ATP_READY, 1804 E_XC_EX_INT_F2_RESERVED3, ///< scaler dosen't have this interrupt now 1805 E_XC_EX_INT_F1_RESERVED3, 1806 } XC_EX_INT_SRC; 1807 1808 /// OP2 Video/GOP layer switch 1809 typedef enum 1810 { 1811 E_XC_EX_VOP_LAYER_VIDEO_MUX1_MUX2 = 0, ///<0: Video->GOP1->GOP2 (GOP2 is one pipe later than GOP1) 1812 E_XC_EX_VOP_LAYER_FRAME_VIDEO_MUX1_MUX2, ///<1: FrameColor->Video->GOP1->GOP2 (GOP1/GOP2 smae pipe) 1813 E_XC_EX_VOP_LAYER_FRAME_VIDEO_MUX2_MUX1, ///<2: FrameColor->Video->GOP2->GOP1 (GOP1/GOP2 smae pipe) 1814 E_XC_EX_VOP_LAYER_FRAME_MUX1_VIDEO_MUX2, ///<3: FrameColor->GOP1->Video->GOP2 (GOP1/GOP2 smae pipe) 1815 E_XC_EX_VOP_LAYER_FRAME_MUX1_MUX2_VIDEO, ///<4: FrameColor->GOP1->GOP2->Video (GOP1/GOP2 smae pipe) 1816 E_XC_EX_VOP_LAYER_FRAME_MUX2_VIDEO_MUX1, ///<5: FrameColor->GOP2->Video->GOP1 (GOP1/GOP2 smae pipe) 1817 E_XC_EX_VOP_LAYER_FRAME_MUX2_MUX1_VIDEO, ///<6: FrameColor->GOP2->GOP1->Video (GOP1/GOP2 smae pipe) 1818 E_XC_EX_VOP_LAYER_RESERVED, 1819 } XC_EX_VOP_OSD_LAYER_SEL; 1820 1821 /// OP2VOP de select 1822 typedef enum 1823 { 1824 E_XC_EX_OP2VOPDE_MAINWINDOW = 0, ///<0: capture main display window, no osd 1825 E_XC_EX_OP2VOPDE_SUBWINDOW, ///<1: capture sub display window, no osd 1826 E_XC_EX_OP2VOPDE_WHOLEFRAME, ///<2: Whole frame of panel DE, no osd 1827 E_XC_EX_OP2VOPDE_WHOLEFRAME_WITHOSD, ///<3: Whole frame of panel DE, with osd 1828 } XC_EX_OP2VOP_DE_SEL; 1829 1830 typedef void (*SC_EX_InterruptCb) (SC_EX_INT_SRC enIntNum, void *pParam); ///< Interrupt callback function 1831 1832 1833 //Define Output Frame control 1834 typedef struct 1835 { 1836 MS_U32 u32XC_version; ///<Version of current structure. 1837 MS_U16 u16InVFreq; ///<input V frequency 1838 MS_U16 u16OutVFreq; ///<output V frequncy 1839 MS_BOOL bInterlace; ///<whether it's interlace 1840 1841 } XC_EX_OUTPUTFRAME_Info; 1842 1843 /// Define XC Init MISC 1844 /// please enum use BIT0 = 1, BIT1 = 2, BIT3 = 4 1845 typedef enum 1846 { 1847 E_XC_EX_INIT_MISC_A_NULL = 0, 1848 E_XC_EX_INIT_MISC_A_IMMESWITCH = 1, 1849 E_XC_EX_INIT_MISC_A_IMMESWITCH_DVI_POWERSAVING = 2, 1850 E_XC_EX_INIT_MISC_A_DVI_AUTO_EQ = 4, 1851 1852 E_XC_EX_INIT_MISC_A_FRC_INSIDE = 8, 1853 E_XC_EX_INIT_MISC_A_OSD_TO_HSLVDS = 0x10, 1854 E_XC_EX_INIT_MISC_A_FRC_INSIDE_60HZ = 0x20, // for 60Hz FRC case 1855 E_XC_EX_INIT_MISC_A_FRC_INSIDE_240HZ = 0x40, // for 240Hz FRC case 1856 } XC_EX_INIT_MISC_A; 1857 1858 1859 /// Define the initial MISC for XC 1860 typedef struct 1861 { 1862 MS_U32 u32XCMISC_version; ///<Version of current structure. 1863 MS_U32 u32MISC_A; 1864 MS_U32 u32MISC_B; 1865 MS_U32 u32MISC_C; 1866 MS_U32 u32MISC_D; 1867 } XC_EX_INITMISC; 1868 1869 typedef enum 1870 { 1871 E_XC_EX_FLOCK_DIV_OFF = 0, 1872 E_XC_EX_FLOCK_DIV_ON, 1873 E_XC_EX_FLOCK_FPLL_ON, 1874 1875 } XC_EX_FLOCK_TYPE; 1876 1877 typedef struct 1878 { 1879 // memory 1880 MS_PHY u32FRC_MEMC_MemAddr; 1881 MS_PHY u32FRC_MEMC_MemSize; 1882 MS_PHY u32FRC_OD_MemAddr; 1883 MS_PHY u32FRC_OD_MemSize; 1884 MS_PHY u32FRC_LD_MemAddr; 1885 MS_PHY u32FRC_LD_MemSize; 1886 MS_PHY u32FRC_ME1_MemAddr; 1887 MS_PHY u32FRC_ME1_MemSize; 1888 MS_PHY u32FRC_ME2_MemAddr; 1889 MS_PHY u32FRC_ME2_MemSize; 1890 MS_PHY u32FRC_2D3D_Render_MemAddr; 1891 MS_PHY u32FRC_2D3D_Render_MemSize; 1892 MS_PHY u32FRC_2D3D_Render_Detection_MemAddr; 1893 MS_PHY u32FRC_2D3D_Render_Detection_MemSize; 1894 MS_PHY u32FRC_Halo_MemAddr; 1895 MS_PHY u32FRC_Halo_MemSize; 1896 MS_PHY u32FRC_R2_MemAddr; 1897 MS_PHY u32FRC_R2_MemSize; 1898 MS_PHY u32FRC_ADL_MemAddr; 1899 MS_PHY u32FRC_ADL_MemSize; 1900 1901 MS_PHY u32FRC_FrameSize; 1902 1903 MS_U16 u16FB_YcountLinePitch; 1904 MS_U16 u16PanelWidth; 1905 MS_U16 u16PanelHeigh; 1906 MS_U8 u8FRC3DPanelType; 1907 MS_U8 u83Dmode; 1908 MS_U8 u8IpMode; 1909 MS_U8 u8MirrorMode; 1910 MS_U8 u83D_FI_out; 1911 MS_BOOL bFRC; 1912 1913 } XC_EX_FRC_INFO, *p_XC_EX_FRC_INFO; 1914 1915 typedef struct 1916 { 1917 MS_U32 u32XC_PREINIT_version; ///<Version of current structure. 1918 // FRC control info 1919 XC_EX_FRC_INFO FRCInfo; 1920 1921 MS_U16 u16VTrigX; 1922 MS_U16 u16VTrigY; 1923 1924 /////////////////////////////////////////////// 1925 // panel timing spec. 1926 /////////////////////////////////////////////// 1927 // sync related 1928 MS_U8 u8PanelHSyncWidth; ///< VOP_01[7:0], PANEL_HSYNC_WIDTH 1929 MS_U8 u8PanelHSyncBackPorch; ///< PANEL_HSYNC_BACK_PORCH, no register setting, provide value for query only 1930 1931 ///< not support Manuel VSync Start/End now 1932 ///< VOP_02[10:0] VSync start = Vtt - VBackPorch - VSyncWidth 1933 ///< VOP_03[10:0] VSync end = Vtt - VBackPorch 1934 MS_U8 u8PanelVSyncWidth; ///< define PANEL_VSYNC_WIDTH 1935 MS_U8 u8PanelVSyncBackPorch; ///< define PANEL_VSYNC_BACK_PORCH 1936 1937 } XC_EX_PREINIT_INFO, *p_XC_EX_PREINIT_INFO; 1938 1939 typedef enum 1940 { 1941 E_XC_EX_PREINIT_NULL = 0x00, 1942 E_XC_EX_PREINIT_FRC = 0x01, 1943 1944 E_XC_EX_PREINIT_NUM, 1945 1946 } XC_EX_PREINIT; 1947 1948 typedef enum 1949 { 1950 E_XC_EX_MIRROR_NORMAL, 1951 E_XC_EX_MIRROR_H_ONLY, 1952 E_XC_EX_MIRROR_V_ONLY, 1953 E_XC_EX_MIRROR_HV, 1954 E_XC_EX_MIRROR_MAX, 1955 } XC_EX_MirrorMode; 1956 1957 typedef enum 1958 { 1959 E_XC_EX_MEMORY_IP_READ_REQUEST, ///< memory request for IP read 1960 E_XC_EX_MEMORY_IP_WRITE_REQUEST, ///< memory request for IP write 1961 E_XC_EX_MEMORY_OP_READ_REQUEST, ///< memory request for OP read 1962 E_XC_EX_MEMORY_OP_WRITE_REQUEST, ///< memory request for OP write 1963 E_XC_EX_MEMORY_REQUEST_MAX, ///< Invalid request 1964 } XC_EX_MEMORY_REQUEST_TYPE; 1965 1966 1967 /// OP2 Video/GOP layer switch 1968 typedef enum 1969 { 1970 E_XC_EX_VIDEO_ON_OSD_LAYER_DEAFULT = 0, ///< video -> osd layer 0 -> osd layer 1 -> osd layer 2 -> osd layer 3 1971 E_XC_EX_VIDEO_ON_OSD_LAYER_0 = 1, ///< osd layer 0 -> video -> osd layer 1 -> osd layer 2 -> osd layer 3 1972 E_XC_EX_VIDEO_ON_OSD_LAYER_1 = 2, ///< osd layer 0 -> osd layer 1 -> video -> osd layer 2 -> osd layer 3 1973 E_XC_EX_VIDEO_ON_OSD_LAYER_2 = 3, ///< osd layer 0 -> osd layer 1 -> osd layer 2 -> video -> osd layer 3 1974 E_XC_EX_VIDEO_ON_OSD_LAYER_3 = 4, ///< osd layer 0 -> osd layer 1 -> osd layer 2 -> osd layer 3 -> video 1975 E_XC_EX_VIDEO_ON_OSD_LAYER_NUM, 1976 } XC_EX_VIDEO_ON_OSD_LAYER; 1977 1978 /// Osd Index 1979 typedef enum 1980 { 1981 E_XC_EX_OSD_0 = 0, ///< osd0 1982 E_XC_EX_OSD_1 = 1, ///< osd1 1983 E_XC_EX_OSD_2 = 2, ///< osd2 1984 E_XC_EX_OSD_3 = 3, ///< osd3 1985 E_XC_EX_OSD_NUM, 1986 } E_XC_EX_OSD_INDEX; 1987 1988 /// Osd Index 1989 typedef enum 1990 { 1991 E_XC_EX_OSD_BlENDING_MODE0 = 0, ///< a*OSD + (1-a)*Video 1992 E_XC_EX_OSD_BlENDING_MODE1 = 1, ///< OSD + (1-a)*Video 1993 E_XC_EX_OSD_BlENDING_TYPE_NUM, 1994 } XC_EX_OSD_BlENDING_TYPE; 1995 1996 /// Scaling type 1997 typedef enum 1998 { 1999 E_XC_EX_PRE_SCALING = 0, 2000 E_XC_EX_POST_SCALING, 2001 E_XC_EX_BOTH_SCALING, 2002 } XC_EX_SCALING_TYPE; 2003 2004 /// HV Vector type 2005 typedef enum 2006 { 2007 E_XC_EX_H_VECTOR = 0, 2008 E_XC_EX_V_VECTOR, 2009 E_XC_EX_HV_VECTOR, 2010 } XC_EX_VECTOR_TYPE; 2011 2012 /// Define MCDI buffer type 2013 typedef enum 2014 { 2015 E_XC_EX_MCDI_ME1 = 0, ///< Main MDCI ME1 2016 E_XC_EX_MCDI_ME2 = 1, ///< Main MDCI ME2 2017 E_XC_EX_MCDI_BOTH, ///< Main MDCI ME1+ME2 2018 E_XC_EX_MCDI_SUB_ME1, ///< Sub MDCI ME1 2019 E_XC_EX_MCDI_SUB_ME2, ///< Sub MDCI ME2 2020 E_XC_EX_MCDI_SUB_BOTH, ///< Sub MDCI ME1+ME2 2021 } XC_EX_MCDI_TYPE; 2022 2023 typedef struct 2024 { 2025 MS_U8 p1; 2026 MS_U8 p2; 2027 MS_U8 p3; 2028 MS_U8 p4; 2029 MS_U8 p5; 2030 MS_U8 p6; 2031 MS_U8 p7; 2032 MS_U8 p8; 2033 } XC_EX_FRC_R2_CMD_PARAMETER, *p_XC_EX_FRC_R2_CMD_PARAMETER; 2034 //LD 2035 2036 typedef enum 2037 { 2038 E_XC_EX_LD_PANEL_LG32inch_LR10 = 0x0, 2039 E_XC_EX_LD_PANEL_LG37inch_LR10 = 0x1, 2040 E_XC_EX_LD_PANEL_LG42inch_LR16 = 0x2, 2041 E_XC_EX_LD_PANEL_LG47inch_LR16 = 0x3, 2042 E_XC_EX_LD_PANEL_LG55inch_LR16 = 0x4, 2043 E_XC_EX_LD_PANEL_LG55inch_LR12 = 0x5, 2044 E_XC_EX_LD_PANEL_CMO42inch_LR16 = 0x6, 2045 E_XC_EX_LD_PANEL_DEFAULT, 2046 E_XC_EX_LD_PANEL_NUMS, 2047 } XC_EX_LD_PANEL_TYPE; 2048 2049 typedef enum 2050 { 2051 E_XC_EX_LD_MODE_OFF = 0, 2052 E_XC_EX_LD_MODE_LOW = 1, 2053 E_XC_EX_LD_MODE_MID = 2, 2054 E_XC_EX_LD_MODE_HIGH = 3, 2055 } XC_EX_LD_MODE; 2056 2057 //parameters for detecting nine lattice 2058 typedef struct 2059 { 2060 MS_U16 u16PixelStep; // distance between sample points 2061 MS_U8 u8ColorThreshold; // max color difference 2062 MS_U8 u8TryTimes; // max times for detecting 2063 MS_U16 u16LinearDiff; // difference for every 3 lattice in a line 2064 } XC_EX_DETECTNL_PARA; 2065 2066 #define XC_EX_FRC_PATHCTRL_ALLOFF (0x0000) 2067 #define XC_EX_FRC_PATHCTRL_OP2COLORMATRIX (0x0001) 2068 #define XC_EX_FRC_PATHCTRL_OP2CSCDITHER (0x0002) 2069 #define XC_EX_FRC_PATHCTRL_OP2BRIGHTNESS (0x0004) 2070 #define XC_EX_FRC_PATHCTRL_OP2CONTRAST (0x0008) 2071 #define XC_EX_FRC_PATHCTRL_OP2NOISEROUND (0x0010) 2072 2073 // OSDC TIMING GEN 2074 typedef struct 2075 { 2076 MS_U16 u16OC_Tgen_HTotal; 2077 MS_U16 u16OC_Tgen_VTotal; 2078 2079 MS_U16 u16OC_Tgen_Hsync_Start; 2080 MS_U16 u16OC_Tgen_Hsync_End; 2081 MS_U16 u16OC_Tgen_HframDE_Start; 2082 MS_U16 u16OC_Tgen_HframDE_End; 2083 2084 MS_U16 u16OC_Tgen_Vsync_Start; 2085 MS_U16 u16OC_Tgen_Vsync_End; 2086 MS_U16 u16OC_Tgen_VframDE_Start; 2087 MS_U16 u16OC_Tgen_VframDE_End; 2088 } XC_EX_OSDC_TGEN_INFO; 2089 2090 // OSDC MISC Control 2091 typedef struct 2092 { 2093 MS_BOOL bOC_ClK_En; 2094 MS_BOOL bOC_Mixer_Bypass_En; 2095 MS_BOOL bOC_Mixer_InvAlpha_En; 2096 MS_BOOL bOC_Mixer_Hsync_Vfde_Out; // 1:hs_out = hs&vfde 2097 MS_BOOL bOC_Mixer_Hfde_Vfde_Out; // 1:hs_out = de(hfde)&vfde 2098 MS_U16 u16OC_Lpll_type; 2099 MS_U8 u8OC_OutputFormat; // output bit order 2100 } XC_EX_OSDC_CTRL_INFO; 2101 2102 typedef enum 2103 { 2104 E_XC_EX_OSDC_TGEN_MANUAL = 0, 2105 E_XC_EX_OSDC_TGEN_1366x768, 2106 E_XC_EX_OSDC_TGEN_1920x1080, 2107 E_XC_EX_OSDC_TGEN_3840x2160, 2108 2109 E_XC_EX_OSDC_TGEN_MAX, 2110 } XC_EX_OSDC_TGEN_Type; 2111 2112 typedef enum 2113 { 2114 E_XC_EX_OSDC_INIT = 0, 2115 E_XC_EX_OSDC_CTRL_TGEN, 2116 E_XC_EX_OSDC_CTRL_MISC, 2117 2118 } XC_EX_OSDC_CTRL_TYPE; 2119 2120 //OSDC Display information 2121 typedef struct 2122 { 2123 MS_U32 ODSC_DISPInfo_Version; ///<Version of current structure. Please always set to "u32Osdc_dispinfo_Version" as input 2124 2125 MS_U32 VDTOT; //Output vertical total 2126 MS_U32 DEVST; //Output DE Vertical start 2127 MS_U32 DEVEND; //Output DE Vertical end 2128 MS_U32 HDTOT; // Output horizontal total 2129 MS_U32 DEHST; //Output DE horizontal start 2130 MS_U32 DEHEND; // Output DE horizontal end 2131 2132 MS_U32 SYNCHST; 2133 MS_U32 SYNCHEND; 2134 MS_U32 SYNCVST; 2135 MS_U32 SYNCVEND; 2136 2137 MS_BOOL bCLK_EN; // OUTPUT ENABLE 2138 MS_BOOL bMIXER_BYPASS_EN; // MIXER BYPASS ENABLE 2139 MS_BOOL bMIXER_INVALPHA_EN; 2140 MS_BOOL bMIXER_HSTVFDEOUT_EN;// 1:hs_out = hs&vfde 2141 MS_BOOL bMIXER_HFDEVFDEOUT_EN;// 1:hs_out = de(hfde)&vfde 2142 2143 } XC_EX_OSDC_DST_DispInfo; 2144 2145 //select the input for bypass mode. 2146 typedef enum 2147 { 2148 E_XC_EX_BYPASS_HDMI = 0, 2149 E_XC_EX_BYPASS_DC_MAIN, 2150 E_XC_EX_BYPASS_DC_SUB, 2151 }XC_EX_BYPASS_InputSource; 2152 2153 2154 // For HW internal test pattern 2155 typedef enum 2156 { 2157 E_XC_EX_OP1_PATGEN_DISP_LB_MODE, // pattern gen on display line buffer, can't support post-sclaing 2158 E_XC_EX_OP1_PATGEN_OPM_MODE, // pattern gen before post scaling engine, can support post-scaling, but not implement now 2159 }XC_EX_OP1_PATGEN_MODE; 2160 2161 typedef enum{ 2162 E_XC_EX_OP1_PATTERN_OFF = 0, 2163 E_XC_EX_OP1_WB_PATTERN, // 1: 2164 E_XC_EX_OP1_PURE_RED_PATTERN, // 2: red 2165 E_XC_EX_OP1_PURE_GREEN_PATTERN, // 3: green 2166 E_XC_EX_OP1_PURE_BLUE_PATTERN, // 4: blue 2167 E_XC_EX_OP1_PURE_WHITE_PATTERN, // 5: white 2168 E_XC_EX_OP1_PURE_BLACK_PATTERN, // 6: black 2169 E_XC_EX_OP1_PURE_GREY_PATTERN, // 7: gray 2170 E_XC_EX_OP1_PURE_COLOR_V_BAR_PATTERN, // 8: vertical color-bar 2171 E_XC_EX_OP1_PURE_COLOR_H_BAR_PATTERN, // 9: horizontal color-bar 2172 E_XC_EX_OP1_PURE_GREY_BAR_16_PATTERN, // 10: 16 vertical gray-bar 2173 E_XC_EX_OP1_PURE_GREY_BAR_32_PATTERN, // 11: 32 vertical gray-bar 2174 E_XC_EX_OP1_PURE_GREY_BAR_64_PATTERN, // 12: 64 vertical gray-bar 2175 E_XC_EX_OP1_PURE_GREY_RGB_32_PATTERN, // 13: 32 vertical 4 color bar 2176 E_XC_EX_OP1_PURE_RGB_CHECKERBOARD_PATTERN, // 14: 3x3 checkerboard R/B/G 2177 E_XC_EX_OP1_DOAFADE_GRAY_PATTERN, // 15: dotfade gary 2178 E_XC_EX_OP1_CALIBRATION_COLOR_DOTFADE_PATTERN, // 16: checkerboard + dotfade gary 2179 E_XC_EX_OP1_CALIBRATION_PATTERN, // 17: checkerboard 2180 E_XC_EX_OP1_PATTERN_1, // 18 2181 E_XC_EX_OP1_PATTERN_2, // 19: 2182 E_XC_EX_OP1_PATTERN_3, // 20: same as pattern2, but not full screen 2183 E_XC_EX_OP1_3D_PATTERN, // 21: side-by-side, if enable 3D effect, can see the word "3D" 2184 E_XC_EX_OP1_PURE_RED_100IRE_PATTERN, // 22: red 2185 E_XC_EX_OP1_PURE_GREEN_100IRE_PATTERN, // 23: green 2186 E_XC_EX_OP1_PURE_BLUE_100IRE_PATTERN, // 24: blue 2187 E_XC_EX_OP1_PURE_RED_70IRE_PATTERN, // 25 2188 E_XC_EX_OP1_PURE_GREEN_70IRE_PATTERN, // 26 2189 E_XC_EX_OP1_PURE_BLUE_70IRE_PATTERN, // 27 2190 E_XC_EX_OP1_PURE_RED_40IRE_PATTERN, // 28 2191 E_XC_EX_OP1_PURE_GREEN_40IRE_PATTERN, // 29 2192 E_XC_EX_OP1_PURE_BLUE_40IRE_PATTERN, // 30 2193 E_XC_EX_OP1_PURE_RED_20IRE_PATTERN, // 31 2194 E_XC_EX_OP1_PURE_GREEN_20IRE_PATTERN, // 32 2195 E_XC_EX_OP1_PURE_BLUE_20IRE_PATTERN, // 33 2196 E_XC_EX_OP1_PURE_RED_10IRE_PATTERN, // 34 2197 E_XC_EX_OP1_PURE_GREEN_10IRE_PATTERN, // 35 2198 E_XC_EX_OP1_PURE_BLUE_10IRE_PATTERN, // 36 2199 E_XC_EX_OP1_PURE_WHITE_100IRE_PATTERN, // 37 2200 E_XC_EX_OP1_PURE_WHITE_90IRE_PATTERN, // 38 2201 E_XC_EX_OP1_PURE_WHITE_80IRE_PATTERN, // 39 2202 E_XC_EX_OP1_PURE_WHITE_70IRE_PATTERN, // 40 2203 E_XC_EX_OP1_PURE_WHITE_60IRE_PATTERN, // 41 2204 E_XC_EX_OP1_PURE_WHITE_50IRE_PATTERN, // 42 2205 E_XC_EX_OP1_PURE_WHITE_40IRE_PATTERN, // 43 2206 E_XC_EX_OP1_PURE_WHITE_30IRE_PATTERN, // 44 2207 E_XC_EX_OP1_PURE_WHITE_20IRE_PATTERN, // 45 2208 E_XC_EX_OP1_PURE_WHITE_10IRE_PATTERN, // 46 2209 E_XC_EX_OP1_PURE_GAMMA_GREY1_PATTERN, // 47: gray 2210 E_XC_EX_OP1_PURE_GAMMA_GREY2_PATTERN, // 48: gray 2211 E_XC_EX_OP1_PURE_RGB_CHECKERBOARD_PATTERN_2, // 49: 3x3 checkerboard R/G/B 2212 }XC_EX_OP1_PATTERN; 2213 2214 //////////////////////////////////////////// 2215 //------------------------------------------------------------------------------------------------- 2216 // Function and Variable 2217 //------------------------------------------------------------------------------------------------- 2218 2219 2220 //---------------------------- 2221 // Must have functions 2222 //---------------------------- 2223 //------------------------------------------------------------------------------------------------- 2224 /// Get XC library version 2225 /// @param ppVersion \b OUT: store the version in this member 2226 /// @return @ref XC_EX_RETURN_VALUE 2227 //------------------------------------------------------------------------------------------------- 2228 // DLL_PUBLIC XC_EX_RETURN_VALUE MApi_XC_EX_GetLibVer(const MSIF_Version **ppVersion); 2229 2230 //------------------------------------------------------------------------------------------------- 2231 /// Get XC Information 2232 /// @return @ref XC_ApiInfo returnthe XC information in this member 2233 //------------------------------------------------------------------------------------------------- 2234 // DLL_PUBLIC const XC_EX_ApiInfo * MApi_XC_EX_GetInfo(XC_DEVICE_ID *pDeviceId); 2235 2236 //------------------------------------------------------------------------------------------------- 2237 /// Get XC Status of specific window(Main/Sub) 2238 /// @param pDrvStatus \b OUT: store the status 2239 /// @param eWindow \b IN: which window(Main/Sub) is going to get status 2240 /// @return @ref MS_BOOL 2241 //------------------------------------------------------------------------------------------------- 2242 DLL_PUBLIC MS_BOOL MApi_XC_EX_GetStatus(XC_DEVICE_ID *pDeviceId, XC_EX_ApiStatus *pDrvStatus, XC_EX_SCALER_WIN eWindow); 2243 2244 //------------------------------------------------------------------------------------------------- 2245 /// Extended interface to Get XC Status of specific window(Main/Sub) with version info 2246 /// usage: 2247 /// XC_ApiStatusEx stXCStatus; 2248 /// memset(&stXCStatus, 0, sizeof(XC_ApiStatusEx)); 2249 /// stXCStatus.u16ApiStatusEX_Length = sizeof(XC_ApiStatusEx); 2250 /// stXCStatus.u32ApiStatusEx_Version = EX_API_STATUS_EX_VERSION; 2251 /// if(MApi_XC_EX_GetStatusEx(&stXCStatusEx, E_XC_EX_MAIN_WINDOW) == sizeof(XC_ApiStatusEx)) 2252 /// { 2253 /// ...... 2254 /// } 2255 /// @param pDrvStatusEx \b OUT: store the status 2256 /// @param eWindow \b IN: which window(Main/Sub) is going to get status 2257 /// @return @ref MS_U16 return the copied length of input structure 2258 //------------------------------------------------------------------------------------------------- 2259 // DLL_PUBLIC MS_U16 MApi_XC_EX_GetStatusEx(XC_DEVICE_ID *pDeviceId, XC_EX_ApiStatusEx *pDrvStatusEx, XC_EX_SCALER_WIN eWindow); 2260 2261 //------------------------------- 2262 // Set Debug Level 2263 // @para u16DbgSwitch: XC_EX_DBGLEVEL_OFF,XC_EX_DBGLEVEL_SETWINDOW,XC_EX_DBGLEVEL_SETTIMING,XC_EX_DBGLEVEL_SYNCDETECT,XC_EX_DBGLEVEL_MUX 2264 // currently, only used XC_EX_DBGLEVEL_OFF,XC_EX_DBGLEVEL_SETTIMING 2265 //------------------------------- 2266 // DLL_PUBLIC MS_BOOL MApi_XC_EX_SetDbgLevel(MS_U16 u16DbgSwitch); 2267 2268 //For debug purpose only! 2269 //------------------------------- 2270 // Set Debug Mode for scaler framelock 2271 // @para DbgMode: Disable/Enable debug 2272 // @para DbgFlag: The debug item 2273 // @para u32Data: The debug data 2274 //------------------------------- 2275 // DLL_PUBLIC void MApi_XC_EX_FPLLDbgMode(XC_DEVICE_ID *pDeviceId, XC_EX_FPLL_DBG_MODE DbgMode, XC_EX_FPLL_DBG_FLAG DbgFlag, MS_U32 u32Data); 2276 2277 //------------------------------- 2278 // Set customer mode for scaler framelock 2279 // @para eMode: Disable/Enable customer mode 2280 // @para eFlag: The customer item 2281 // @para u32Data: The customer data 2282 //------------------------------- 2283 // DLL_PUBLIC void MApi_XC_EX_FPLLCustomerMode(XC_DEVICE_ID *pDeviceId, XC_EX_FPLL_MODE eMode, XC_EX_FPLL_FLAG eFlag, MS_U32 u32Data); 2284 2285 //---------------------------- 2286 // Initialize 2287 //---------------------------- 2288 // DLL_PUBLIC MS_BOOL MDrv_XC_EX_SetIOMapBase(XC_DEVICE_ID *pDeviceId); 2289 //------------------------------------------------------------------------------------------------- 2290 2291 /// Initialize the XC 2292 /// @param pXC_InitData \b IN: the Initialized Data 2293 /// @param u32InitDataLen \b IN: the length of the initialized data 2294 /// @return @ref MS_BOOL 2295 //------------------------------------------------------------------------------------------------- 2296 DLL_PUBLIC MS_BOOL MApi_XC_EX_Init(XC_DEVICE_ID *pDeviceId, XC_EX_INITDATA *pXC_InitData, MS_U32 u32InitDataLen); 2297 2298 //------------------------------------------------------------------------------------------------- 2299 /// Initialize the XC MISC 2300 /// @param pXC_Init_Misc \b IN: the Initialized XC MISC 2301 /// @return E_XC_EX_RET_OK or E_XC_EX_RET_FAIL 2302 //------------------------------------------------------------------------------------------------- 2303 // DLL_PUBLIC XC_EX_RETURN_VALUE MApi_XC_EX_Init_MISC(XC_DEVICE_ID *pDeviceId, XC_EX_INITMISC *pXC_Init_Misc, MS_U32 u32InitMiscDataLen); 2304 2305 2306 //------------------------------------------------------------------------------------------------- 2307 /// Get XC Init MISC Status 2308 /// @param pXC_Init_Misc \b OUT: store the status 2309 /// @return E_XC_EX_RET_OK or E_XC_EX_RET_FAIL 2310 //------------------------------------------------------------------------------------------------- 2311 // DLL_PUBLIC XC_EX_RETURN_VALUE MApi_XC_EX_GetMISCStatus(XC_DEVICE_ID *pDeviceId, XC_EX_INITMISC *pXC_Init_Misc); 2312 2313 2314 //------------------------------------------------------------------------------------------------- 2315 /// Get XC Capability 2316 /// @param u32Id (you can get detail from E_XC_CAPABILITY enum) 2317 /// @return output data for each query item. 2318 //------------------------------------------------------------------------------------------------- 2319 // DLL_PUBLIC MS_U32 MApi_XC_EX_GetCapability(MS_U32 u32Id); 2320 2321 //------------------------------------------------------------------------------------------------- 2322 /// Get XC Capability 2 2323 //------------------------------------------------------------------------------------------------- 2324 // DLL_PUBLIC XC_EX_RETURN_VALUE MApi_XC_EX_GetChipCaps(XC_EX_CAPS eCapType, MS_U32* pRet, MS_U32 ret_size); 2325 //------------------------------------------------------------------------------------------------- 2326 /// Exit the XC 2327 /// @return @ref MS_BOOL 2328 //------------------------------------------------------------------------------------------------- 2329 // DLL_PUBLIC MS_BOOL MApi_XC_EX_Exit(XC_DEVICE_ID *pDeviceId); 2330 2331 //------------------------------- 2332 // Set Window & Scaling 2333 //------------------------------- 2334 2335 //------------------------------------------------------------------------------------------------- 2336 /// Set Dynamic Scaling 2337 /// @param pstDSInfo \b IN: the information of Dynamic Scaling 2338 /// @param u32DSInforLen \b IN: the length of the pstDSInfo 2339 /// @param eWindow \b IN: which window we are going to set 2340 /// @return @ref MS_BOOL 2341 //------------------------------------------------------------------------------------------------- 2342 DLL_PUBLIC MS_BOOL MApi_XC_EX_SetDynamicScaling(XC_DEVICE_ID *pDeviceId, XC_EX_DynamicScaling_Info *pstDSInfo, MS_U32 u32DSInfoLen, XC_EX_SCALER_WIN eWindow); 2343 2344 //------------------------------------------------------------------------------------------------- 2345 /// Get Dynamic Scaling Status 2346 /// @return @ref MS_BOOL TRUE: dynamic scaling is enabled; FALSE: dynamic scaling is not enabled. 2347 //------------------------------------------------------------------------------------------------- 2348 DLL_PUBLIC MS_BOOL MApi_XC_EX_GetDynamicScalingStatus(XC_DEVICE_ID *pDeviceId); 2349 2350 //------------------------------------------------------------------------------------------------- 2351 /// Get DNR Base offset 2352 /// @param eWindow \b IN: which window we are going to set 2353 /// @return @ref MS_U32 return the DNR Base offset 2354 //------------------------------------------------------------------------------------------------- 2355 // DLL_PUBLIC MS_U32 MApi_XC_EX_Get_DNRBaseOffset(XC_DEVICE_ID *pDeviceId, XC_EX_SCALER_WIN eWindow); 2356 2357 //------------------------------------------------------------------------------------------------- 2358 /// Get the FrameStoreNum's factor number, which is usually to calcuate buffer offset 2359 /// @param eWindow \b IN: which window we are going to set 2360 /// @return @ref MS_U8 return the store frame number factor 2361 //------------------------------------------------------------------------------------------------- 2362 #define MApi_XC_EX_Get_StoreFrameNum MApi_XC_EX_Get_FrameNumFactor 2363 // DLL_PUBLIC MS_U8 MApi_XC_EX_Get_FrameNumFactor(XC_DEVICE_ID *pDeviceId, XC_EX_SCALER_WIN eWindow); 2364 2365 //------------------------------------------------------------------------------------------------- 2366 /// Set Pre down scaling minimum size 2367 /// @param pXCPrescalingLimit \b IN: the information of Limit size 2368 /// @param eWindow \b IN: which window we are going to set 2369 //------------------------------------------------------------------------------------------------- 2370 // DLL_PUBLIC void MApi_XC_EX_SetPreScalingLimit(XC_DEVICE_ID *pDeviceId, XC_EX_PreScalingLimit_Info *pXCPrescalingLimit, XC_EX_SCALER_WIN eWindow); 2371 2372 //------------------------------------------------------------------------------------------------- 2373 /// Set the specific window 2374 /// @param pstXC_SetWin_Info \b IN: the information of the window setting 2375 /// @param u32InitDataLen \b IN: the length of the pstXC_SetWin_Info 2376 /// @param eWindow \b IN: which window we are going to set 2377 /// @return @ref MS_BOOL 2378 //------------------------------------------------------------------------------------------------- 2379 DLL_PUBLIC MS_BOOL MApi_XC_EX_SetWindow(XC_DEVICE_ID *pDeviceId, XC_EX_SETWIN_INFO *pstXC_SetWin_Info, MS_U32 u32InitDataLen, XC_EX_SCALER_WIN eWindow); 2380 2381 //------------------------------------------------------------------------------------------------- 2382 /// Set main and sub window 2383 /// @param pstXC_SetWin_Info_Main \b IN: the information of the main window setting 2384 /// @param pstXC_SetWin_Info_Sub \b IN: the information of the sub window setting 2385 /// @return @ref MS_BOOL 2386 //------------------------------------------------------------------------------------------------- 2387 // DLL_PUBLIC MS_BOOL MApi_XC_EX_SetDualWindow(XC_DEVICE_ID *pDeviceId, XC_EX_SETWIN_INFO *pstXC_SetWin_Info_Main, XC_EX_SETWIN_INFO *pstXC_SetWin_Info_Sub); 2388 2389 //------------------------------------------------------------------------------------------------- 2390 /// Set the specific window for traveling mode(VE capture function) 2391 /// @param pstXC_SetWin_Info \b IN: the information of the window setting 2392 /// @param u32InitDataLen \b IN: the length of the pstXC_SetWin_Info 2393 /// @param eWindow \b IN: which window we are going to set 2394 /// @return @ref MS_BOOL 2395 //------------------------------------------------------------------------------------------------- 2396 // DLL_PUBLIC MS_BOOL MApi_XC_EX_SetTravelingWindow(XC_DEVICE_ID *pDeviceId, XC_EX_SETWIN_INFO *pstXC_SetWin_Info, MS_U32 u32InitDataLen, XC_EX_SCALER_WIN eWindow); 2397 2398 //------------------------------- 2399 // Mode Related 2400 //------------------------------- 2401 //------------------------------------------------------------------------------------------------- 2402 /// Set input source type 2403 /// @param enInputSourceType \b IN: which input source typewe are going to set 2404 /// @param eWindow \b IN: which window we are going to set 2405 /// @return void 2406 //------------------------------------------------------------------------------------------------- 2407 DLL_PUBLIC void MApi_XC_EX_SetInputSource( XC_DEVICE_ID *pDeviceId, XC_EX_INPUT_SOURCE_TYPE enInputSourceType, XC_EX_SCALER_WIN eWindow ); 2408 2409 //------------------------------------------------------------------------------------------------- 2410 /// check whether the specific window is YUV space 2411 /// @param eWindow \b IN: which window we are going to set 2412 /// @return @ref MS_BOOL 2413 //------------------------------------------------------------------------------------------------- 2414 // DLL_PUBLIC MS_BOOL MApi_XC_EX_IsYUVSpace(XC_DEVICE_ID *pDeviceId, XC_EX_SCALER_WIN eWindow); 2415 2416 //------------------------------------------------------------------------------------------------- 2417 /// check whether specific window is memory format 422 2418 /// @param eWindow \b IN: which window we are going to query 2419 /// @return @ref MS_BOOL 2420 //------------------------------------------------------------------------------------------------- 2421 // DLL_PUBLIC MS_BOOL MApi_XC_EX_IsMemoryFormat422(XC_DEVICE_ID *pDeviceId, XC_EX_SCALER_WIN eWindow); 2422 2423 //------------------------------------------------------------------------------------------------- 2424 /// Enable/Disable force RGB in 2425 /// @param bEnable \b IN: enable or disable 2426 /// @param eWindow \b IN: which window we are going to enable or disable 2427 //------------------------------------------------------------------------------------------------- 2428 // DLL_PUBLIC void MApi_XC_EX_EnableForceRGBin(XC_DEVICE_ID *pDeviceId, MS_BOOL bEnable, XC_EX_SCALER_WIN eWindow); 2429 2430 //------------------------------------------------------------------------------------------------- 2431 /// Set XC mirror mode for main or sub window 2432 /// @param eMirrorMode \b IN: enable or disable XC mirror mode 2433 /// @param eWindow \b IN: main or sub window 2434 /// @return @ref MS_BOOL 2435 //------------------------------------------------------------------------------------------------- 2436 // DLL_PUBLIC MS_BOOL MApi_XC_EX_EnableMirrorModeEx( XC_DEVICE_ID *pDeviceId, XC_EX_MirrorMode eMirrorMode, XC_EX_SCALER_WIN eWindow); 2437 2438 //------------------------------------------------------------------------------------------------- 2439 /// Get XC mirror mode for main or sub window 2440 /// @param eWindow \b IN: main or sub window 2441 /// @return @ref MirrorMode_t 2442 //------------------------------------------------------------------------------------------------- 2443 // DLL_PUBLIC XC_EX_MirrorMode MApi_XC_EX_GetMirrorModeTypeEx(XC_DEVICE_ID *pDeviceId, XC_EX_SCALER_WIN eWindow); 2444 2445 //------------------------------- 2446 // Timing detect 2447 //------------------------------- 2448 2449 //------------------------------------------------------------------------------------------------- 2450 /// Get the specific window's sync status 2451 /// @param eCurrentSrc \b IN: the current input source 2452 /// @param sXC_Sync_Status \b OUT:store the sync status 2453 /// @param eWindow \b IN: which window we are going to get 2454 //------------------------------------------------------------------------------------------------- 2455 // DLL_PUBLIC void MApi_XC_EX_GetSyncStatus(XC_DEVICE_ID *pDeviceId, XC_EX_INPUT_SOURCE_TYPE eCurrentSrc , XC_EX_IP_SYNC_STATUS *sXC_Sync_Status, XC_EX_SCALER_WIN eWindow); 2456 2457 //------------------------------------------------------------------------------------------------- 2458 /// wait for output sync 2459 /// @param u8NumVSyncs \b IN: the number of VSync we are going to wait 2460 /// @param u16Timeout \b IN: time out 2461 /// @return @ref MS_U8 retun the number of left Vsync if timeout 2462 //------------------------------------------------------------------------------------------------- 2463 // DLL_PUBLIC MS_U8 MApi_XC_EX_WaitOutputVSync(XC_DEVICE_ID *pDeviceId, MS_U8 u8NumVSyncs, MS_U16 u16Timeout, XC_EX_SCALER_WIN eWindow); 2464 2465 //------------------------------------------------------------------------------------------------- 2466 /// wait for input sync 2467 /// @param u8NumVSyncs \b IN: the number of VSync we are going to wait 2468 /// @param u16Timeout \b IN: time out 2469 /// @return @ref MS_U8 retun the number of left Vsync if timeout 2470 //------------------------------------------------------------------------------------------------- 2471 // DLL_PUBLIC MS_U8 MApi_XC_EX_WaitInputVSync(XC_DEVICE_ID *pDeviceId,MS_U8 u8NumVSyncs, MS_U16 u16Timeout, XC_EX_SCALER_WIN eWindow); 2472 2473 //------------------------------------------------------------------------------------------------- 2474 /// Set HDMI detect mode. (HDMI has DE and HV mode. You can set what you want to use.) 2475 /// @param esynctype \b IN: HDMI detect mode 2476 //------------------------------------------------------------------------------------------------- 2477 // DLL_PUBLIC void MApi_XC_EX_SetHdmiSyncMode(XC_EX_HDMI_SYNC_TYPE esynctype); 2478 2479 //------------------------------------------------------------------------------------------------- 2480 /// Set HDMI detect mode. (HDMI has DE and HV mode. You can set what you want to use.) 2481 /// @return @ref E_HDMI_SYNC_TYPE Get current HDMI sync type 2482 //------------------------------------------------------------------------------------------------- 2483 // DLL_PUBLIC XC_EX_HDMI_SYNC_TYPE MApi_XC_EX_GetHdmiSyncMode(void); 2484 2485 //------------------------------- 2486 // Display control 2487 //------------------------------- 2488 //------------------------------------------------------------------------------------------------- 2489 /// Set report window 2490 /// @param bEnable \b IN: enable or disable report window 2491 /// @param Window \b IN: the window position and size 2492 /// @param u8Color \b IN: report window's color 2493 //------------------------------------------------------------------------------------------------- 2494 // DLL_PUBLIC void MApi_XC_EX_SetRepWindow(XC_DEVICE_ID *pDeviceId, MS_BOOL bEnable, XC_EX_WINDOW_TYPE Window, MS_U8 u8Color); 2495 2496 //------------------------------------------------------------------------------------------------- 2497 /// update the OPWriteOff variable status instead of direcly modifying the register itself 2498 /// instead, the state machine will take care of modifying the register by checking this status. 2499 /// @param bMCNRPQSetting \b IN: MCNR PQ status enable or not. 2500 /// @param eWindow \b IN: Main or sub window 2501 //------------------------------------------------------------------------------------------------- 2502 // DLL_PUBLIC void MApi_XC_EX_Set_OPWriteOffEnable(XC_DEVICE_ID *pDeviceId, MS_BOOL bEnable, XC_EX_SCALER_WIN eWindow); 2503 2504 //------------------------------------------------------------------------------------------------- 2505 /// update the OPWriteOff variable status, set force flag, and direcly modifying the register 2506 /// @param bMCNRPQSetting \b IN: MCNR PQ status enable or not. 2507 /// @param eWindow \b IN: Main or sub window 2508 //------------------------------------------------------------------------------------------------- 2509 // DLL_PUBLIC void MApi_XC_EX_ForceSet_OPWriteOffEnable(XC_DEVICE_ID *pDeviceId, MS_BOOL bEnable , XC_EX_SCALER_WIN eWindow); 2510 2511 //------------------------------------------------------------------------------------------------- 2512 /// update display window registers with input window 2513 /// @param eWindow \b IN: Main or sub window 2514 /// @param pdspwin \b IN: window info that will be setted to registers 2515 //------------------------------------------------------------------------------------------------- 2516 // DLL_PUBLIC void MApi_XC_EX_SetDispWinToReg(XC_DEVICE_ID *pDeviceId, XC_EX_WINDOW_TYPE *pstDspwin, XC_EX_SCALER_WIN eWindow); 2517 2518 //------------------------------------------------------------------------------------------------- 2519 /// get current display window registers setting 2520 /// @param eWindow \b IN : Main or sub window 2521 /// @param pdspwin \b OUT: Pointer for ouput disp window register 2522 //------------------------------------------------------------------------------------------------- 2523 // DLL_PUBLIC void MApi_XC_EX_GetDispWinFromReg(XC_DEVICE_ID *pDeviceId, XC_EX_WINDOW_TYPE *pstDspwin, XC_EX_SCALER_WIN eWindow); 2524 2525 //------------------------------------------------------------------------------------------------- 2526 /// let display video freeze by disable scaler buffer write 2527 /// @param bEnable \b IN: TRUE: enable, FALSE: otherwise 2528 /// @param eWindow \b IN: which window we are going to set 2529 //------------------------------------------------------------------------------------------------- 2530 DLL_PUBLIC void MApi_XC_EX_FreezeImg(XC_DEVICE_ID *pDeviceId, MS_BOOL bEnable, XC_EX_SCALER_WIN eWindow); 2531 2532 //------------------------------------------------------------------------------------------------- 2533 /// Query whether the specific window is freeze image status or not 2534 /// @param eWindow \b IN: which window we are going to query 2535 /// @return @ref MS_BOOL 2536 //------------------------------------------------------------------------------------------------- 2537 // DLL_PUBLIC MS_BOOL MApi_XC_EX_IsFreezeImg(XC_DEVICE_ID *pDeviceId, XC_EX_SCALER_WIN eWindow); 2538 2539 //------------------------------------------------------------------------------------------------- 2540 /// This function will enable/diable output black pattern 2541 /// @param bEnable \b IN: TRUE: enable, FALSE: otherwise 2542 //------------------------------------------------------------------------------------------------- 2543 // DLL_PUBLIC void MApi_XC_EX_GenerateBlackVideoForBothWin( XC_DEVICE_ID *pDeviceId, MS_BOOL bEnable); 2544 2545 //------------------------------------------------------------------------------------------------- 2546 /// This function will enable/diable output black pattern 2547 /// @param bEnable \b IN: TRUE: enable, FALSE: otherwise 2548 //------------------------------------------------------------------------------------------------- 2549 // DLL_PUBLIC void MApi_XC_EX_Set_BLSK(XC_DEVICE_ID *pDeviceId, MS_BOOL bEnable); 2550 2551 //------------------------------------------------------------------------------------------------- 2552 /// This function will enable/diable output black pattern 2553 /// @param bEnable \b IN: TRUE: enable, FALSE: otherwise 2554 //------------------------------------------------------------------------------------------------- 2555 DLL_PUBLIC void MApi_XC_EX_GenerateBlackVideo(XC_DEVICE_ID *pDeviceId, MS_BOOL bEnable, XC_EX_SCALER_WIN eWindow); 2556 2557 //------------------------------------------------------------------------------------------------- 2558 /// Query whether current XC is black video enabled or not 2559 /// @return @ref MS_BOOL 2560 //------------------------------------------------------------------------------------------------- 2561 DLL_PUBLIC MS_BOOL MApi_XC_EX_IsBlackVideoEnable(XC_DEVICE_ID *pDeviceId, XC_EX_SCALER_WIN eWindow); 2562 2563 //------------------------------------------------------------------------------------------------- 2564 /// This function will enable/diable framebufferless mode 2565 /// @param bEnable \b IN: TRUE: enable, FALSE: otherwise 2566 //------------------------------------------------------------------------------------------------- 2567 DLL_PUBLIC void MApi_XC_EX_EnableFrameBufferLess(XC_DEVICE_ID *pDeviceId, MS_BOOL bEnable); 2568 2569 //------------------------------------------------------------------------------------------------- 2570 /// Query whether current XC is framebufferless or not 2571 /// @return @ref MS_BOOL 2572 //------------------------------------------------------------------------------------------------- 2573 // DLL_PUBLIC MS_BOOL MApi_XC_EX_IsCurrentFrameBufferLessMode(XC_DEVICE_ID *pDeviceId); 2574 2575 2576 //------------------------------------------------------------------------------------------------- 2577 /// This function will enable/diable request framebufferless mode 2578 /// @param bEnable \b IN: TRUE: enable, FALSE: otherwise 2579 //------------------------------------------------------------------------------------------------- 2580 // DLL_PUBLIC void MApi_XC_EX_EnableRequest_FrameBufferLess(XC_DEVICE_ID *pDeviceId, MS_BOOL bEnable); 2581 2582 //------------------------------------------------------------------------------------------------- 2583 /// Query whether current XC is request framebufferless or not 2584 /// @return @ref MS_BOOL 2585 //------------------------------------------------------------------------------------------------- 2586 // DLL_PUBLIC MS_BOOL MApi_XC_EX_IsCurrentRequest_FrameBufferLessMode(XC_DEVICE_ID *pDeviceId); 2587 2588 //------------------------------- 2589 // 3D control 2590 //------------------------------- 2591 // DLL_PUBLIC MS_U16 MApi_XC_EX_Get_3D_HW_Version(XC_DEVICE_ID *pDeviceId); 2592 // DLL_PUBLIC MS_BOOL MApi_XC_EX_Get_3D_IsSupportedHW2DTo3D(XC_DEVICE_ID *pDeviceId); 2593 // DLL_PUBLIC MS_BOOL MApi_XC_EX_Set_3D_Mode(XC_DEVICE_ID *pDeviceId, 2594 // XC_EX_3D_INPUT_MODE e3dInputMode, 2595 // XC_EX_3D_OUTPUT_MODE e3dOutputMode, 2596 // XC_EX_3D_PANEL_TYPE e3dPanelType, 2597 // XC_EX_SCALER_WIN eWindow); 2598 // DLL_PUBLIC MS_BOOL MApi_XC_EX_Set_3D_MainWin_FirstMode(XC_DEVICE_ID *pDeviceId, MS_BOOL bMainFirst); 2599 // DLL_PUBLIC MS_BOOL MApi_XC_EX_Set_3D_LR_Frame_Exchg(XC_DEVICE_ID *pDeviceId, XC_EX_SCALER_WIN eWindow); 2600 // DLL_PUBLIC MS_BOOL MApi_XC_EX_3D_Is_LR_Frame_Exchged(XC_DEVICE_ID *pDeviceId, XC_EX_SCALER_WIN eWindow); 2601 // DLL_PUBLIC XC_EX_3D_INPUT_MODE MApi_XC_EX_Get_3D_Input_Mode(XC_DEVICE_ID *pDeviceId, XC_EX_SCALER_WIN eWindow); 2602 // DLL_PUBLIC XC_EX_3D_OUTPUT_MODE MApi_XC_EX_Get_3D_Output_Mode(XC_DEVICE_ID *pDeviceId); 2603 // DLL_PUBLIC XC_EX_3D_PANEL_TYPE MApi_XC_EX_Get_3D_Panel_Type(XC_DEVICE_ID *pDeviceId); 2604 // DLL_PUBLIC MS_BOOL MApi_XC_EX_Get_3D_MainWin_First(XC_DEVICE_ID *pDeviceId); 2605 // DLL_PUBLIC MS_BOOL MApi_XC_EX_3DMainSub_IPSync(XC_DEVICE_ID *pDeviceId); 2606 // DLL_PUBLIC MS_BOOL MApi_XC_EX_Set_3D_VerVideoOffset(XC_DEVICE_ID *pDeviceId, MS_U16 u163DVerVideoOffset); 2607 // DLL_PUBLIC MS_U16 MApi_XC_EX_Get_3D_VerVideoOffset(XC_DEVICE_ID *pDeviceId); 2608 // DLL_PUBLIC MS_BOOL MApi_XC_EX_Is3DFormatSupported(XC_DEVICE_ID *pDeviceId, 2609 // XC_EX_3D_INPUT_MODE e3dInputMode, 2610 // XC_EX_3D_OUTPUT_MODE e3dOutputMode); 2611 // DLL_PUBLIC MS_BOOL MApi_XC_EX_Set_3D_HShift(XC_DEVICE_ID *pDeviceId, MS_U16 u16HShift); 2612 // DLL_PUBLIC MS_BOOL MApi_XC_EX_Enable_3D_LR_Sbs2Line(XC_DEVICE_ID *pDeviceId, MS_BOOL bEnable); 2613 // DLL_PUBLIC MS_U16 MApi_XC_EX_Get_3D_HShift(XC_DEVICE_ID *pDeviceId); 2614 // DLL_PUBLIC MS_BOOL MApi_XC_EX_Set_3D_HW2DTo3D_Buffer(XC_DEVICE_ID *pDeviceId, MS_PHY u32HW2DTO3D_DD_Buf, MS_PHY u32HW2DTO3D_DR_Buf); 2615 // DLL_PUBLIC MS_BOOL MApi_XC_EX_Set_3D_HW2DTo3D_Parameters(XC_DEVICE_ID *pDeviceId, XC_EX_3D_HW2DTO3D_PARA st3DHw2DTo3DPara); 2616 // DLL_PUBLIC MS_BOOL MApi_XC_EX_Get_3D_HW2DTo3D_Parameters(XC_DEVICE_ID *pDeviceId, XC_EX_3D_HW2DTO3D_PARA *pst3DHw2DTo3DPara); 2617 // DLL_PUBLIC MS_BOOL MApi_XC_EX_Set_3D_Detect3DFormat_Parameters(XC_DEVICE_ID *pDeviceId, XC_EX_3D_DETECT3DFORMAT_PARA *pstDetect3DFormatPara); 2618 // DLL_PUBLIC MS_BOOL MApi_XC_EX_Get_3D_Detect3DFormat_Parameters(XC_DEVICE_ID *pDeviceId, XC_EX_3D_DETECT3DFORMAT_PARA *pstDetect3DFormatPara); 2619 // DLL_PUBLIC XC_EX_3D_INPUT_MODE MApi_XC_EX_Detect3DFormatByContent(XC_DEVICE_ID *pDeviceId, XC_EX_SCALER_WIN eWindow); 2620 // DLL_PUBLIC MS_BOOL MApi_XC_EX_DetectNL(XC_DEVICE_ID *pDeviceId, XC_EX_SCALER_WIN eWindow, XC_EX_DETECTNL_PARA* pstDetectNLatticePara); 2621 // DLL_PUBLIC MS_BOOL MApi_XC_EX_3D_PostPQSetting(XC_DEVICE_ID *pDeviceId, XC_EX_SCALER_WIN eWindow); 2622 // DLL_PUBLIC MS_BOOL MApi_XC_EX_Set_3D_FPInfo(XC_DEVICE_ID *pDeviceId, XC_EX_3D_FPINFO_PARA *pstFPInfoPara); 2623 // DLL_PUBLIC MS_BOOL MApi_XC_EX_EnableAutoDetect3D(XC_DEVICE_ID *pDeviceId, MS_BOOL bEnable, XC_EX_3D_AUTODETECT_METHOD enDetectMethod); 2624 // DLL_PUBLIC MS_BOOL MApi_XC_EX_GetAutoDetect3DFlag(XC_DEVICE_ID *pDeviceId, XC_EX_3D_AUTODETECT_METHOD *penDetectMethod, MS_BOOL *pbEnable); 2625 // DLL_PUBLIC MS_BOOL MApi_XC_EX_Set_3D_SubWinClk(XC_DEVICE_ID *pDeviceId); 2626 //------------------------------------------------------------------------------------------------------ 2627 /// Is 3D reg_3dlr_side2line_en enabled or not 2628 /// @return MS_BOOL \b OUT: TRUE: enabled FALSE: is not enabled 2629 //------------------------------------------------------------------------------------------------------ 2630 // DLL_PUBLIC MS_BOOL MApi_XC_EX_3D_Is_LR_Sbs2Line(XC_DEVICE_ID *pDeviceId); 2631 2632 //------------------------------------------------------------------------------------------------- 2633 /// This function will get the skip status of default flag 2634 /// @return @ref MS_BOOL return the the skip status of default flag 2635 //------------------------------------------------------------------------------------------------- 2636 // DLL_PUBLIC MS_BOOL MApi_SC_EX_3D_Is_Skip_Default_LR_Flag(XC_DEVICE_ID *pDeviceId); 2637 2638 //------------------------------------------------------------------------------------------------- 2639 /// This function will enable/diable skip default LR flag 2640 /// @param bEnable \b IN: TRUE: enable, FALSE: otherwise 2641 /// @return @ref MS_BOOL TRUE: Success, FALSE: Failed 2642 //------------------------------------------------------------------------------------------------- 2643 // DLL_PUBLIC MS_BOOL MApi_XC_EX_3D_Enable_Skip_Default_LR_Flag(XC_DEVICE_ID *pDeviceId, MS_BOOL bEnable); 2644 2645 //------------------------------- 2646 // Mux control 2647 //------------------------------- 2648 #define XC_EX_MAX_SYNC_DATA_PATH_SUPPORTED (6) // (3),3 is not enough, because Main+SUB+Scart 1+Scart 2 =4, but in order to support off-line det + DWIN, modify to 6 first 2649 #define XC_EX_MAX_ASYNC_DATA_PATH_SUPPORTED (2) 2650 #define XC_EX_MAX_DATA_PATH_SUPPORTED (XC_EX_MAX_SYNC_DATA_PATH_SUPPORTED+XC_EX_MAX_ASYNC_DATA_PATH_SUPPORTED) 2651 2652 //------------------------------------------------------------------------------------------------- 2653 /// Initialize Mux before using Mux controller 2654 /// @param input_source_to_input_port \b IN: a function to map from input source to input port 2655 //------------------------------------------------------------------------------------------------- 2656 DLL_PUBLIC void MApi_XC_EX_Mux_Init(XC_DEVICE_ID *pDeviceId, void (*input_source_to_input_port)(XC_EX_INPUT_SOURCE_TYPE src_ids , E_MUX_INPUTPORT* port_ids , MS_U8* u8port_count ) ); 2657 2658 //------------------------------------------------------------------------------------------------- 2659 /// Monitor the source of Mux 2660 /// @param bRealTimeMonitorOnly \b IN: define whether do the monitor routine only for real time 2661 //------------------------------------------------------------------------------------------------- 2662 // DLL_PUBLIC void MApi_XC_EX_Mux_SourceMonitor(XC_DEVICE_ID *pDeviceId, MS_BOOL bRealTimeMonitorOnly); 2663 2664 //------------------------------------------------------------------------------------------------- 2665 /// Create a path in Mux Controller. 2666 /// @param Path_Info \b IN: the information of the path 2667 /// @param u32InitDataLen \b IN: the length of the Path_Info 2668 /// @return @ref MS_S16 return the path id, or -1 when any error is happened 2669 //------------------------------------------------------------------------------------------------- 2670 DLL_PUBLIC MS_S16 MApi_XC_EX_Mux_CreatePath(XC_DEVICE_ID *pDeviceId, XC_EX_MUX_PATH_INFO* Path_Info, MS_U32 u32InitDataLen); 2671 2672 //------------------------------------------------------------------------------------------------- 2673 /// delete a path from Mux Controller. 2674 /// @param src \b IN: Type of input source of a path you want to delete 2675 /// @param dest \b IN: Type of destination of a path you want to delete 2676 /// @return 1 if delete successfuly. Return -1 if delete fail 2677 //------------------------------------------------------------------------------------------------- 2678 DLL_PUBLIC MS_S16 MApi_XC_EX_Mux_DeletePath(XC_DEVICE_ID *pDeviceId, XC_EX_INPUT_SOURCE_TYPE src, XC_EX_DEST_TYPE dest); 2679 2680 //------------------------------------------------------------------------------------------------- 2681 /// A path is disabled after creating it (\ref MApi_XC_EX_Mux_CreatePath) 2682 /// If a path is not enabled, \ref MApi_XC_Mux_SourceMonitor will bypass it. 2683 /// @param PathId \b IN: PathId The Path you want to enable 2684 /// @return 1 if enable successfuly. Return -1 if enable fail 2685 //------------------------------------------------------------------------------------------------- 2686 DLL_PUBLIC MS_S16 MApi_XC_EX_Mux_EnablePath(XC_DEVICE_ID *pDeviceId, MS_U16 PathId); 2687 2688 //------------------------------------------------------------------------------------------------- 2689 /// Trigger Sync Event on Mux Controller. 2690 /// The Mux Controller will pass src and *para to each Sync Event Handler (refer synchronous_event_handler of MUX_DATA_PATH also). 2691 /// ( Delegate Function: 2692 /// Send necessary parameter to SyncEventHandler of each synchronous_path which source is 'src' ) 2693 /// @param src \b IN: The input source which triggers Sync Event 2694 /// @param para \b IN: A pointer points to parameters which need to pass to Event Handler 2695 //------------------------------------------------------------------------------------------------- 2696 // DLL_PUBLIC void MApi_XC_EX_Mux_TriggerPathSyncEvent(XC_DEVICE_ID *pDeviceId, XC_EX_INPUT_SOURCE_TYPE src , void* para); 2697 2698 //------------------------------------------------------------------------------------------------- 2699 /// Set the specific window 2700 /// @param src \b IN: the source type for handler 2701 /// @param para \b IN: A pointer points to parameters which need to pass to Event Handler 2702 //------------------------------------------------------------------------------------------------- 2703 // DLL_PUBLIC void MApi_XC_EX_Mux_TriggerDestOnOffEvent(XC_DEVICE_ID *pDeviceId, XC_EX_INPUT_SOURCE_TYPE src , void* para); 2704 2705 //------------------------------------------------------------------------------------------------- 2706 /// This function was used to enable/disable the destination periodic handler 2707 /// After enabled periodic hander, Mux Controller will pass the parameters to this handler and execute it periodically 2708 /// @param src \b IN: the source type for handler 2709 /// @param bEnable \b IN: Enable/Disable the priodic handler. 2710 /// @return 1 if successfuly. Return -1 if failed. 2711 //------------------------------------------------------------------------------------------------- 2712 // DLL_PUBLIC MS_S16 MApi_XC_EX_Mux_OnOffPeriodicHandler(XC_DEVICE_ID *pDeviceId, XC_EX_INPUT_SOURCE_TYPE src, MS_BOOL bEnable); 2713 2714 //------------------------------------------------------------------------------------------------- 2715 /// Get Paths in driver. 2716 /// @param Paths \b OUT: Path information 2717 /// @return @ref MS_U8 2718 //------------------------------------------------------------------------------------------------- 2719 DLL_PUBLIC MS_U8 MApi_XC_EX_Mux_GetPathInfo(XC_DEVICE_ID *pDeviceId, XC_EX_MUX_PATH_INFO* Paths); // Return current all path info. Max path number is MAX_DATA_PATH_SUPPORTED 2720 2721 //------------------------------------------------------------------------------------------------- 2722 /// Set Support MHL Path Info 2723 /// @param u8MhlSupportInfo \b IN: MHL Support Info 2724 ///@return @ref MS_BOOL True if query success. 2725 //------------------------------------------------------------------------------------------------- 2726 // DLL_PUBLIC XC_EX_RETURN_VALUE MApi_XC_EX_Mux_SetSupportMhlPathInfo(XC_DEVICE_ID *pDeviceId, MS_U8 u8MhlSupportInfo); 2727 2728 //------------------------------------------------------------------------------------------------- 2729 /// Set MHL Hot Plug Inverse Info 2730 /// @param bIsMhlHotPlugInverse \b IN: MHL Hot Plug Inverse Info 2731 ///@return @ref MS_BOOL True if query success. 2732 //------------------------------------------------------------------------------------------------- 2733 // DLL_PUBLIC XC_EX_RETURN_VALUE MApi_XC_EX_Mux_SetMhlHotPlugInverseInfo(XC_DEVICE_ID *pDeviceId, MS_BOOL bIsMhlHotPlugInverse); 2734 2735 //------------------------------------------------------------------------------------------------- 2736 /// Get input port from input HDMI source type 2737 /// @param src \b IN: the query based on the input HDMI type 2738 /// @return @ref E_MUX_INPUTPORT 2739 //------------------------------------------------------------------------------------------------- 2740 // DLL_PUBLIC E_MUX_INPUTPORT MApi_XC_EX_Mux_GetHDMIPort( XC_DEVICE_ID *pDeviceId, XC_EX_INPUT_SOURCE_TYPE src ); 2741 2742 //------------------------------------------------------------------------------------------------- 2743 /// Map input source to VD Ymux port 2744 /// @param u8InputSourceType \b IN: input source type 2745 /// @return @ref MS_U8 2746 //------------------------------------------------------------------------------------------------- 2747 // DLL_PUBLIC MS_U8 MApi_XC_EX_MUX_MapInputSourceToVDYMuxPORT( XC_DEVICE_ID *pDeviceId, XC_EX_INPUT_SOURCE_TYPE u8InputSourceType ); 2748 2749 //------------------------------ 2750 // PQ related 2751 //------------------------------ 2752 // DLL_PUBLIC void MApi_XC_EX_Set_NR(XC_DEVICE_ID *pDeviceId, MS_BOOL bEn, XC_EX_SCALER_WIN eWindow); 2753 2754 // DLL_PUBLIC void MApi_XC_EX_FilmMode_P(XC_DEVICE_ID *pDeviceId); 2755 2756 //------------------------------------------------------------------------------------------------- 2757 /// Check if UC is enabled 2758 /// @param eWindow \b IN: which window(main or sub) to get 2759 /// @return MS_BOOL TRUE: UC enabled, FALSE: UC disabled 2760 //------------------------------------------------------------------------------------------------- 2761 // DLL_PUBLIC MS_BOOL MApi_XC_EX_GetUCEnabled(XC_DEVICE_ID *pDeviceId, XC_EX_SCALER_WIN eWindow); 2762 2763 //------------------------------ 2764 // Auto related 2765 //------------------------------ 2766 // DLL_PUBLIC void MApi_XC_EX_GenSpecificTiming(XC_DEVICE_ID *pDeviceId, XC_EX_Internal_TimingType timingtype); 2767 2768 //------------------------------ 2769 // Scaler IP Related 2770 //------------------------------ 2771 // DE-Bypass Mode 2772 //------------------------------------------------------------------------------------------------- 2773 /// This function get DE-Bypass Mode 2774 /// @param eWindow \b IN: which window(main or sub) to get 2775 /// @return @ref MS_BOOL 2776 //------------------------------------------------------------------------------------------------- 2777 // DLL_PUBLIC MS_BOOL MApi_XC_EX_GetDEBypassMode(XC_DEVICE_ID *pDeviceId, XC_EX_SCALER_WIN eWindow); 2778 2779 // Data enable 2780 //------------------------------------------------------------------------------------------------- 2781 /// This function get DE window 2782 /// @param psWin \b OUT: window info to get 2783 /// @param eWindow \b IN: which window(main or sub) to get 2784 //------------------------------------------------------------------------------------------------- 2785 // DLL_PUBLIC void MApi_XC_EX_GetDEWindow(XC_DEVICE_ID *pDeviceId, XC_EX_WINDOW_TYPE *psWin, XC_EX_SCALER_WIN eWindow); 2786 2787 //------------------------------------------------------------------------------------------------- 2788 /// This function get DE window in DE ByPass Mode. (T12 / T13 can not support HDMI HV mode. So DE window from BK1 can not be retrieved if set to HV mode.) 2789 /// We Bypass pre-scaling and get H/V size from BK2 MDrv_SC_get_vsd_line_count & MDrv_SC_get_hsd_pixel_count. 2790 /// Prepare this function for using in the feature. 2791 /// @param psWin \b OUT: window info to get 2792 /// @param eWindow \b IN: which window(main or sub) to get 2793 //------------------------------------------------------------------------------------------------- 2794 // DLL_PUBLIC void MApi_XC_EX_GetDEWidthHeightInDEByPassMode(XC_DEVICE_ID *pDeviceId, MS_U16* pu16Width,MS_U16* pu16Height ,XC_EX_SCALER_WIN eWindow); 2795 2796 //Get Capture Window 2797 //------------------------------------------------------------------------------------------------- 2798 /// Get the capture window for specific window 2799 /// @param capture_win \b OUT: the window info to get 2800 /// @param eWindow \b IN: which window(main or sub) to get 2801 //------------------------------------------------------------------------------------------------- 2802 // DLL_PUBLIC void MApi_XC_EX_GetCaptureWindow(XC_DEVICE_ID *pDeviceId, XC_EX_WINDOW_TYPE* capture_win, XC_EX_SCALER_WIN eWindow); 2803 2804 2805 //Set Capture Window 2806 //------------------------------------------------------------------------------------------------- 2807 /// Set the Vertical start of capture window for specific window 2808 /// @param u16Vstart \b IN: the window info to get 2809 /// @param eWindow \b IN: which window(main or sub) to set 2810 //------------------------------------------------------------------------------------------------- 2811 // DLL_PUBLIC void MApi_XC_EX_SetCaptureWindowVstart(XC_DEVICE_ID *pDeviceId, MS_U16 u16Vstart , XC_EX_SCALER_WIN eWindow); 2812 2813 //------------------------------------------------------------------------------------------------- 2814 /// Set the horizontal start of capture window for specific window 2815 /// @param u16Hstart \b IN: the window info to get 2816 /// @param eWindow \b IN: which window(main or sub) to set 2817 //------------------------------------------------------------------------------------------------- 2818 // DLL_PUBLIC void MApi_XC_EX_SetCaptureWindowHstart(XC_DEVICE_ID *pDeviceId, MS_U16 u16Hstart , XC_EX_SCALER_WIN eWindow); 2819 2820 //------------------------------------------------------------------------------------------------- 2821 /// Set the Vertical size of capture window for specific window 2822 /// @param u16Vsize \b IN: the window info to get 2823 /// @param eWindow \b IN: which window(main or sub) to set 2824 //------------------------------------------------------------------------------------------------- 2825 // DLL_PUBLIC void MApi_XC_EX_SetCaptureWindowVsize(XC_DEVICE_ID *pDeviceId, MS_U16 u16Vsize , XC_EX_SCALER_WIN eWindow); 2826 2827 //------------------------------------------------------------------------------------------------- 2828 /// Set the Horizontal size of capture window for specific window 2829 /// @param u16Hsize \b IN: the window info to get 2830 /// @param eWindow \b IN: which window(main or sub) to set 2831 //------------------------------------------------------------------------------------------------- 2832 // DLL_PUBLIC void MApi_XC_EX_SetCaptureWindowHsize(XC_DEVICE_ID *pDeviceId, MS_U16 u16Hsize , XC_EX_SCALER_WIN eWindow); 2833 2834 // Utility 2835 //------------------------------------------------------------------------------------------------- 2836 /// do the software reset for the specific window 2837 /// @param u8Reset \b IN: reset IP @ref SOFTWARE_REST_TYPE_t 2838 /// @param eWindow \b IN: which window we are going to set 2839 //------------------------------------------------------------------------------------------------- 2840 // DLL_PUBLIC void MApi_XC_EX_SoftwareReset(XC_DEVICE_ID *pDeviceId, MS_U8 u8Reset, XC_EX_SCALER_WIN eWindow); 2841 2842 //------------------------------------------------------------------------------------------------- 2843 /// This function will calculate and return H Frequency x 10 2844 /// @param u16HPeriod \b IN: Horizontal period 2845 /// @return MS_U16: H Frequency x 10 2846 //------------------------------------------------------------------------------------------------- 2847 // DLL_PUBLIC MS_U16 MApi_XC_EX_CalculateHFreqx10(XC_DEVICE_ID *pDeviceId, MS_U16 u16HPeriod); 2848 2849 //------------------------------------------------------------------------------------------------- 2850 /// This function will calculate and return H Frequency x 1000 2851 /// @param u16HPeriod \b IN: Horizontal period 2852 /// @return MS_U32: H Frequency x 1000 2853 //------------------------------------------------------------------------------------------------- 2854 // DLL_PUBLIC MS_U32 MApi_XC_EX_CalculateHFreqx1K(XC_DEVICE_ID *pDeviceId, MS_U16 u16HPeriod); 2855 2856 //------------------------------------------------------------------------------------------------- 2857 /// This function will calculate and return V Frequency x 10 2858 /// @param u16HFreq \b IN: Horizontal frequency 2859 /// @param u16VTotal \b IN: Vertical Total, usually the scan lines counts of a frame 2860 /// @return MS_U16: V Frequency x 10 2861 //------------------------------------------------------------------------------------------------- 2862 // DLL_PUBLIC MS_U16 MApi_XC_EX_CalculateVFreqx10(XC_DEVICE_ID *pDeviceId, MS_U16 u16HFreq, MS_U16 u16VTotal); 2863 2864 //------------------------------------------------------------------------------------------------- 2865 /// This function will calculate and return V Frequency x 1000 2866 /// @param u16HFreq \b IN: Horizontal frequency 2867 /// @param u16VTotal \b IN: Vertical Total, usually the scan lines counts of a frame 2868 /// @return MS_U32: V Frequency x 1000 2869 //------------------------------------------------------------------------------------------------- 2870 // DLL_PUBLIC MS_U32 MApi_XC_EX_CalculateVFreqx1K(XC_DEVICE_ID *pDeviceId, MS_U32 u16HFreq, MS_U16 u16VTotal); 2871 2872 //------------------------------------------------------------------------------------------------- 2873 /// This function will get V Frequency x 1000 2874 /// @param eWindow \b IN: the window we are going to get V frequency 2875 /// @return MS_U32: Accurate V Frequency x 1000 2876 //------------------------------------------------------------------------------------------------- 2877 // DLL_PUBLIC MS_U32 MApi_XC_EX_GetAccurateVFreqx1K(XC_DEVICE_ID *pDeviceId, XC_EX_SCALER_WIN eWindow); 2878 2879 //------------------------------------------------------------------------------------------------- 2880 /// Attach a Call back function info Interrupt. 2881 /// @param eIntNum \b IN: The interrupt type (@ref SC_INT_SRC) 2882 /// @param pIntCb \b IN: Call back function prototype. 2883 /// @param pParam \b IN: Parameter for IntCb 2884 /// @return MS_BOOL True: Success , False: Fail 2885 //------------------------------------------------------------------------------------------------- 2886 // DLL_PUBLIC MS_BOOL MApi_XC_EX_InterruptAttach(XC_DEVICE_ID *pDeviceId, SC_EX_INT_SRC enIntNum, SC_EX_InterruptCb pIntCb, void * pParam); 2887 2888 //------------------------------------------------------------------------------------------------- 2889 /// DeAttach a Call back function info Interrupt. 2890 /// @param eIntNum \b IN: The interrupt type (@ref SC_INT_SRC) 2891 /// @param pIntCb \b IN: Call back function prototype. 2892 /// @param pParam \b IN: Parameter for IntCb 2893 /// @return MS_BOOL True: Success , False: Fail 2894 //------------------------------------------------------------------------------------------------- 2895 // DLL_PUBLIC MS_BOOL MApi_XC_EX_InterruptDeAttach(XC_DEVICE_ID *pDeviceId, SC_EX_INT_SRC enIntNum, SC_EX_InterruptCb pIntCb, void * pParam); 2896 2897 //------------------------------------------------------------------------------------------------- 2898 /// This function will disable input source 2899 /// @param bDisable \b IN: TRUE : Disable; FALSE: Enable 2900 //------------------------------------------------------------------------------------------------- 2901 DLL_PUBLIC void MApi_XC_EX_DisableInputSource(XC_DEVICE_ID *pDeviceId, MS_BOOL bDisable, XC_EX_SCALER_WIN eWidnow); 2902 2903 //------------------------------------------------------------------------------------------------- 2904 /// This function will check is input source disabled or not 2905 /// @param eWindow \b IN: which window(main or sub) to set 2906 /// @return MS_BOOL True: inputsource is disabled, False: inputsource is not disabled 2907 //------------------------------------------------------------------------------------------------- 2908 // DLL_PUBLIC MS_BOOL MApi_XC_EX_IsInputSourceDisabled(XC_DEVICE_ID *pDeviceId, XC_EX_SCALER_WIN eWindow); 2909 2910 //------------------------------------------------------------------------------------------------- 2911 /// This function will change panel type dynamically 2912 /// @param pstPanelInfo \b IN: the new panel type 2913 //------------------------------------------------------------------------------------------------- 2914 DLL_PUBLIC void MApi_XC_EX_ChangePanelType(XC_DEVICE_ID *pDeviceId, XC_EX_PANEL_INFO *pstPanelInfo); 2915 2916 //------------------------------------------------------------------------------------------------- 2917 // 2918 // Attention! This function should only be used in the xc interrupt!!! 2919 // 2920 /// This function will tell the current read bank 2921 /// @param eWindow \b IN: Window 2922 /// @return MS_U16 Current read bank 2923 //------------------------------------------------------------------------------------------------- 2924 // DLL_PUBLIC MS_U16 MApi_XC_EX_GetCurrentReadBank(XC_DEVICE_ID *pDeviceId, XC_EX_SCALER_WIN eWindow); 2925 2926 //------------------------------------------------------------------------------------------------- 2927 // 2928 // Attention! This function should only be used in the xc interrupt!!! 2929 // 2930 /// This function will tell the current write bank 2931 /// @param eWindow \b IN: Window 2932 /// @return MS_U16 Current write bank 2933 //------------------------------------------------------------------------------------------------- 2934 // DLL_PUBLIC MS_U16 MApi_XC_EX_GetCurrentWriteBank(XC_DEVICE_ID *pDeviceId, XC_EX_SCALER_WIN eWindow); 2935 2936 //------------------------------------------------------------------------------------------------- 2937 /// 1. calculate H/V pre-scaling down ratio accroding to frame buffer size 2938 /// 2. must be called after MApi_XC_SetFrameBufferAddress() and before MApi_XC_EX_SetWindow() 2939 /// @param bEnable \b IN: Enable auto pre scaling 2940 /// @param eWindow \b IN: Window 2941 //------------------------------------------------------------------------------------------------- 2942 // DLL_PUBLIC void MApi_XC_EX_SetAutoPreScaling(XC_DEVICE_ID *pDeviceId, MS_BOOL bEnable, XC_EX_SCALER_WIN eWindow); 2943 2944 //------------------------------------------------------------------------------------------------- 2945 /// Get V sync width of current input source. 2946 /// @param eWindow \b IN: The Vsync width of specific window. 2947 /// @return MS_U8 Sync width of input V sync 2948 //------------------------------------------------------------------------------------------------- 2949 // DLL_PUBLIC MS_U8 MApi_XC_EX_GetVSyncWidth(XC_DEVICE_ID *pDeviceId, XC_EX_SCALER_WIN eWindow); 2950 2951 //------------------------------------------------------------------------------ 2952 /// Set blanding point of GOP in Scaler. 2953 /// @param MaxGOP \b IN: The mux number. 2954 /// @param UseNum \b IN: GOP selection. 2955 /// @param u8MuxNum \b IN: The mux number. 2956 /// @param bEnable \b IN: Enable GOP 2957 /// @return MS_BOOL TRUE: Success FALSE: Fail 2958 //------------------------------------------------------------------------------ 2959 // DLL_PUBLIC MS_BOOL MApi_XC_EX_set_GOP_Enable(XC_DEVICE_ID *pDeviceId, MS_U8 MaxGOP, MS_U8 UseNum, MS_U8 u8MuxNum, MS_BOOL bEnable); 2960 2961 //------------------------------------------------------------------------------ 2962 /// Set blanding point of GOP in Scaler. 2963 /// @param u8MuxNum \b IN: The mux number. 2964 /// @param ipSelGop \b IN: GOP selection. 2965 //------------------------------------------------------------------------------ 2966 // DLL_PUBLIC void MApi_XC_EX_ip_sel_for_gop(XC_DEVICE_ID *pDeviceId, MS_U8 u8MuxNum , XC_EX_IPSEL_GOP ipSelGop); 2967 2968 //------------------------------------------------------------------------------ 2969 /// Set Scaler VOP New blending level 2970 //------------------------------------------------------------------------------ 2971 // DLL_PUBLIC void MApi_XC_EX_SetVOPNBL(XC_DEVICE_ID *pDeviceId); 2972 2973 //------------------------------------------------------------------------------ 2974 /// XC IP0 Get Destination Information for GOP mixer 2975 /// @return TRUE/FALSE 2976 //------------------------------------------------------------------------------ 2977 // DLL_PUBLIC MS_BOOL MApi_XC_EX_GetDstInfo(XC_DEVICE_ID *pDeviceId, XC_EX_DST_DispInfo *pDstInfo, MS_U32 u32SizeofDstInfo, XC_EX_GOP_XCDST_TYPE XCDstType); 2978 2979 //------------------------------------------------------------------------------------------------- 2980 /// Allow decoder to control Field R / W bank status of scaler. 2981 /// @param u8Enable \b IN: True: Decoder can control the R/W bank status. False: Decoder can not control the R/W bank status 2982 //------------------------------------------------------------------------------------------------- 2983 // DLL_PUBLIC void MApi_XC_EX_set_FD_Mask(XC_DEVICE_ID *pDeviceId, MS_BOOL bEnable); 2984 2985 //------------------------------------------------------------------------------------------------- 2986 /// Get XC FD_Mask status. 2987 /// @return TRUE/FALSE 2988 //------------------------------------------------------------------------------------------------- 2989 // DLL_PUBLIC MS_BOOL MApi_XC_EX_Get_FD_Mask(XC_DEVICE_ID *pDeviceId); 2990 2991 //------------------------------------------------------------------------------------------------- 2992 /// Allow decoder to control Field R / W bank status of scaler. 2993 /// @param u8Enable \b IN: True: Decoder can control the R/W bank status. False: Decoder can not control the R/W bank status 2994 //------------------------------------------------------------------------------------------------- 2995 // DLL_PUBLIC void MApi_XC_EX_set_FD_Mask_byWin(XC_DEVICE_ID *pDeviceId, MS_BOOL bEnable, XC_EX_SCALER_WIN eWindow); 2996 2997 //------------------------------------------------------------------------------------------------- 2998 /// Get XC FD_Mask status. 2999 /// @return TRUE/FALSE 3000 //------------------------------------------------------------------------------------------------- 3001 // DLL_PUBLIC MS_BOOL MApi_XC_EX_Get_FD_Mask_byWin(XC_DEVICE_ID *pDeviceId, XC_EX_SCALER_WIN eWindow); 3002 3003 //------------------------------------------------------------------------------------------------- 3004 /// Set Scaler IP input test pattern. 3005 /// @param u8Enable \b IN: Set 1 to enable. Bit(0) is horizontal pattern and Bit(1) is vertical pattern 3006 /// @param u6Pattern_type \b IN: The pattern type. (the width of each pattern) 3007 /// @param eWindow \b IN: @ref XC_EX_SCALER_WIN 3008 //------------------------------------------------------------------------------------------------- 3009 // DLL_PUBLIC void MApi_XC_EX_SetIP1TestPattern(XC_DEVICE_ID *pDeviceId, MS_U8 u8Enable, MS_U16 u6Pattern_type, XC_EX_SCALER_WIN eWindow); 3010 3011 //------------------------------------------------------------------------------------------------- 3012 /// Auto create input timing. To use this feature, the system must provide clock to scaler. 3013 /// @param timingtype \b IN: the timing type. 3014 //------------------------------------------------------------------------------------------------- 3015 // DLL_PUBLIC void MApi_XC_EX_InitIPForInternalTiming(XC_DEVICE_ID *pDeviceId, XC_EX_Internal_TimingType timingtype); 3016 3017 //------------------------------------------------------------------------------------------------- 3018 /// Set Main window IP mux directly. 3019 /// @param u8Val \b IN: The value need to be set into register 3020 //------------------------------------------------------------------------------------------------- 3021 DLL_PUBLIC void MApi_XC_EX_SetIPMux(XC_DEVICE_ID *pDeviceId, MS_U8 u8Val); 3022 3023 /// status of input H/V sync 3024 //------------------------------------------------------------------------------------------------- 3025 /// Return true if input H sync of scaler is exist. 3026 /// @param eWindow \b IN: @ref XC_EX_SCALER_WIN 3027 /// @return @ref MS_BOOL TRUE: Exist FALSE: not Exist 3028 //------------------------------------------------------------------------------------------------- 3029 // DLL_PUBLIC MS_BOOL MApi_XC_EX_Is_H_Sync_Active(XC_DEVICE_ID *pDeviceId, XC_EX_SCALER_WIN eWindow); 3030 3031 //------------------------------------------------------------------------------------------------- 3032 /// Return true if input V sync of scaler is exist. 3033 /// @param eWindow \b IN: @ref XC_EX_SCALER_WIN 3034 /// @return @ref MS_BOOL TRUE: Exist FALSE: not Exist 3035 //------------------------------------------------------------------------------------------------- 3036 // DLL_PUBLIC MS_BOOL MApi_XC_EX_Is_V_Sync_Active(XC_DEVICE_ID *pDeviceId, XC_EX_SCALER_WIN eWindow); 3037 3038 //------------------------------------------------------------------------------------------------- 3039 /// get auto position window with the corresponding valid data threshold 3040 /// @param u8ValidData \b IN: valid data threshold 3041 /// @param eWindow \b IN: which window we are going to get 3042 /// @param pstAutoPositionWindow \b OUT: auto position window parameters 3043 /// @return MS_BOOL TRUE: auto position window is valid FALSE: auto position window is invalid 3044 //------------------------------------------------------------------------------------------------- 3045 // DLL_PUBLIC MS_BOOL MApi_XC_EX_GetAutoPositionWindow(XC_DEVICE_ID *pDeviceId, MS_U8 u8ValidData, XC_EX_SCALER_WIN eWindow, XC_EX_WINDOW_TYPE *pstAutoPositionWindow); 3046 3047 3048 //------------------------------ 3049 // Scaler & Memory 3050 //------------------------------ 3051 //------------------------------------------------------------------------------------------------- 3052 /// Set Frame buffer address and size for scaler. 3053 /// @param u32FBAddress \b IN: Start address of frame buffer. 3054 /// @param u32FBSize \b IN: Frame buffer size for Scaler 3055 /// @param eWindow \b IN: @ref XC_EX_SCALER_WIN 3056 //------------------------------------------------------------------------------------------------- 3057 // DLL_PUBLIC void MApi_XC_EX_SetFrameBufferAddress(XC_DEVICE_ID *pDeviceId, MS_PHY u32FBAddress, MS_PHY u32FBSize, XC_EX_SCALER_WIN eWindow); 3058 3059 //------------------------------------------------------------------------------------------------- 3060 /// Check if the buffer size is enough or not. 3061 /// @param pstXC_SetWin_Info \b IN: @ref E_XC_MEMORY_REQUEST_TYPE 3062 /// @param eWindow \b IN: @ref XC_EX_SCALER_WIN 3063 /// @return @ref MS_BOOL TRUE: Buffer size is enough FALSE: Buffer is not enough 3064 //------------------------------------------------------------------------------------------------- 3065 // DLL_PUBLIC MS_BOOL MApi_XC_EX_IsFrameBufferEnoughForCusScaling(XC_DEVICE_ID *pDeviceId, XC_EX_SETWIN_INFO *pstXC_SetWin_Info, XC_EX_SCALER_WIN eWindow); 3066 3067 //------------------------------------------------------------------------------------------------- 3068 /// Enable or disable scaler memory read/write request 3069 /// @param bEnable \b IN: TURE=Enable memory request of 'eType'; FALSE= Disable memory request of 'eType' 3070 /// @param eType \b IN: @ref E_XC_MEMORY_REQUEST_TYPE 3071 /// @param eWindow \b IN: @ref XC_EX_SCALER_WIN 3072 /// @return @ref XC_EX_RETURN_VALUE 3073 //------------------------------------------------------------------------------------------------- 3074 // DLL_PUBLIC XC_EX_RETURN_VALUE MApi_XC_EX_SetScalerMemoryRequest(XC_DEVICE_ID *pDeviceId, MS_BOOL bEnable, XC_EX_MEMORY_REQUEST_TYPE eType, XC_EX_SCALER_WIN eWindow); 3075 3076 //Capture_Memory 3077 3078 //------------------------------------------------------------------------------------------------- 3079 /// Get pixel data specify by u16CorX and u16CorY. 3080 /// This pixel data is catured after scaler memory (not after OSD or gamma). And it will latch 20ms for retrieving data. 3081 /// Also note the x , y coordinate should be small or equel to input source size. (not panel size) 3082 /// @param u16CorX \b IN: X coordinate 3083 /// @param u16CorY \b IN: Y coordinate. 3084 /// @param eWindow \b IN: @ref XC_EX_SCALER_WIN 3085 /// @return void 3086 //------------------------------------------------------------------------------------------------- 3087 // DLL_PUBLIC void MApi_XC_EX_Get_PixelData(XC_DEVICE_ID *pDeviceId, MS_U16 u16CorX, MS_U16 u16CorY, XC_EX_PIXEL_32BIT* pixel); 3088 3089 //------------------------------------------------------------------------------------------------- 3090 /// calc widht or height based on existed dnr buffer and byte/pixel 3091 /// Fomula : Scaler buffer size / u8FBNum / (byte / pixel) / InputSize 3092 /// @param eWindow \b IN: The window need to be calc 3093 /// @param u8FBNum \b IN: frame cout 3094 /// @param u32InputSize \b IN: The input source size. 3095 /// @return MS_U32 The size of frames. 3096 //------------------------------------------------------------------------------------------------- 3097 // DLL_PUBLIC MS_U32 MApi_XC_EX_GetAvailableSize(XC_DEVICE_ID *pDeviceId, XC_EX_SCALER_WIN eWindow, MS_U8 u8FBNum, MS_U32 u32InputSize); 3098 3099 //------------------------------ 3100 // Display & Output 3101 //------------------------------ 3102 // Display related 3103 3104 //------------------------------------------------------------------------------------------------- 3105 /// Set Scaler Frame color 3106 /// @param u32aRGB \b IN: the 4 bytes in aRGB are "a: no use, R 23:16, G 15:8, B 7:0" (B is in LSB) 3107 //------------------------------------------------------------------------------------------------- 3108 // DLL_PUBLIC void MApi_XC_EX_SetFrameColor(XC_DEVICE_ID *pDeviceId, MS_U32 u32aRGB); 3109 3110 //------------------------------------------------------------------------------------------------- 3111 /// Set color of main / sub window. This color will be shown when black screen enabled. 3112 /// @param u8Color \b IN: format in a byte => R 7:5, G 4:2, B 1:0 3113 /// @param eWindow \b IN: The window which need to be set. 3114 //------------------------------------------------------------------------------------------------- 3115 // DLL_PUBLIC void MApi_XC_EX_SetDispWindowColor(XC_DEVICE_ID *pDeviceId, MS_U8 u8Color, XC_EX_SCALER_WIN eWindow); 3116 3117 //------------------------------------------------------------------------------------------------- 3118 /// Query the capability of scaler about source to Video encoder(VE) 3119 /// @param OutputCapability \b OUT: Which part of scaler can output data to Video Encoder (VE). 3120 ///Check E_XC_SOURCE_TO_VE for capability bit. Take an example, if bit0 of OutputCapability equal to 1, 3121 ///Scaler can output data to ve from its E_XC_IP(IP) 3122 ///@return @ref MS_BOOL True if query success. 3123 //------------------------------------------------------------------------------------------------- 3124 // DLL_PUBLIC XC_EX_RETURN_VALUE MApi_XC_EX_SupportSourceToVE(XC_DEVICE_ID *pDeviceId, MS_U16* pOutputCapability); 3125 3126 //------------------------------------------------------------------------------------------------- 3127 /// Enable output capture for output data to VE. Return False if current platform does not support E_XC_SOURCE_TO_VE 3128 /// Note: this source is not only for VE, but Scaler IP or DIP 3129 /// @param bEnable \b IN: Enable output capture function 3130 /// @param eSourceToVE \b IN: Specific output source. The source listed in E_XC_SOURCE_TO_VE is a "point" which can be retrieve data. 3131 //------------------------------------------------------------------------------------------------- 3132 // DLL_PUBLIC XC_EX_RETURN_VALUE MApi_XC_EX_SetOutputCapture(XC_DEVICE_ID *pDeviceId, MS_BOOL bEnable, XC_EX_SOURCE_TO_VE eSourceToVE); 3133 3134 //------------------------------------------------------------------------------------------------- 3135 /// Setup Gamma function ON/OFF 3136 /// @param bEnable \b IN: Enable or Disable 3137 //------------------------------------------------------------------------------------------------- 3138 // DLL_PUBLIC void MApi_XC_EX_SetGammaOnOff (XC_DEVICE_ID *pDeviceId, MS_BOOL bEnable); 3139 3140 //------------------------------------------------------------------------------------------------- 3141 /// Set VOP Gain for Main Window(after 3x3 before Gamma) 3142 /// @param eVop_Channel \b IN: Select VOP R/G/B 3143 /// @param u16Val \b IN: Set value 3144 //------------------------------------------------------------------------------------------------- 3145 // DLL_PUBLIC void MApi_XC_EX_SetPreGammaGain(XC_DEVICE_ID *pDeviceId, XC_EX_SCALER_WIN eWindow, XC_EX_VOP_CHANNEL eVop_Channel, MS_U16 u16Val); 3146 3147 //------------------------------------------------------------------------------------------------- 3148 /// Set VOP Offset for Main Window(after 3x3 before Gamma) 3149 /// @param eVop_Channel \b IN: Select VOP R/G/B 3150 /// @param u16Val \b IN: Set value 3151 //------------------------------------------------------------------------------------------------- 3152 // DLL_PUBLIC void MApi_XC_EX_SetPreGammaOffset(XC_DEVICE_ID *pDeviceId, XC_EX_SCALER_WIN eWindow, XC_EX_VOP_CHANNEL eVop_Channel, MS_U16 u16Val); 3153 3154 //------------------------------------------------------------------------------------------------- 3155 // Output timing related 3156 //------------------------------------------------------------------------------------------------- 3157 //------------------------------------------------------------------------------------------------- 3158 /// Setup panel timing (output DCLK)/FRC/FramePLL, and enable input source 3159 /// @param pTimingInfo \b IN: the information of the timing to set @ref XC_SetTiming_Info 3160 //------------------------------------------------------------------------------------------------- 3161 // DLL_PUBLIC void MApi_XC_EX_SetPanelTiming(XC_DEVICE_ID *pDeviceId, XC_EX_SetTiming_Info *pTimingInfo, XC_EX_SCALER_WIN eWindow); 3162 3163 //------------------------------------------------------------------------------------------------- 3164 /// Set current output type. This is set in Panel structure. You can adjust it here. 3165 /// @param enPnl_Out_Timing_Mode \b IN: The output type 3166 //------------------------------------------------------------------------------------------------- 3167 // DLL_PUBLIC void MApi_XC_EX_SetOutTimingMode(XC_DEVICE_ID *pDeviceId, XC_EX_PNL_OUT_TIMING_MODE enPnl_Out_Timing_Mode); 3168 3169 //------------------------------------------------------------------------------------------------- 3170 /// set free run display window timing 3171 /// @return void Output type. 3172 //------------------------------------------------------------------------------------------------- 3173 // DLL_PUBLIC void MApi_XC_EX_SetFreeRunTiming(XC_DEVICE_ID *pDeviceId); 3174 3175 //------------------------------------------------------------------------------------------------- 3176 /// Adjust V sync FrontPorch , Sync Width for specific output frame rate (You can adjust in advance by using MApi_XC_EX_SetExPanelInfo) 3177 /// @param u16FrontPorch \b IN: Front porch of output Vsync 3178 /// @param u16SyncWidth \b IN: Sync width of output Vsync 3179 /// @param u16OutputVfreq \b IN: The output frame rate you want to adjust. 3180 /// @return MS_BOOL True: Success False : Fail 3181 //------------------------------------------------------------------------------------------------- 3182 // DLL_PUBLIC MS_BOOL MApi_XC_EX_Set_CustomerSyncInfo(XC_DEVICE_ID *pDeviceId, MS_U16 u16FrontPorch, MS_U16 u16SyncWidth, MS_U16 u16OutputVfreq); 3183 3184 //------------------------------------------------------------------------------------------------- 3185 /// Wait FPLL finished 3186 /// @return @ref MS_BOOL indicate FPLL finished or not (frame lock finished or not) 3187 //------------------------------------------------------------------------------------------------- 3188 // DLL_PUBLIC MS_BOOL MApi_XC_EX_WaitFPLLDone(XC_DEVICE_ID *pDeviceId); 3189 3190 //------------------------------------------------------------------------------------------------- 3191 /// Get scaler output vertical frequency 3192 /// @return @ref MS_U16 return output vertical frequency x 100 3193 //------------------------------------------------------------------------------------------------- 3194 // DLL_PUBLIC MS_U16 MApi_XC_EX_GetOutputVFreqX100(XC_DEVICE_ID *pDeviceId); 3195 3196 //------------------------------------------------------------------------------------------------- 3197 /// Frame Lock Check 3198 /// @ref MS_BOOL TURE=Frame Lock ; FALSE= Not Frame Lock 3199 //------------------------------------------------------------------------------------------------- 3200 // DLL_PUBLIC MS_BOOL MApi_XC_EX_FrameLockCheck(XC_DEVICE_ID *pDeviceId); 3201 3202 //------------------------------------------------------------------------------------------------- 3203 /// Set a customize FRC table into driver 3204 /// You can customize frc table in driver. The max number of FRC setting is 5 (Can be changed in driver layer). 3205 /// 3206 /// Here is an example of 5 FRC items with 6 maximal number of FRC setting. 3207 /// Please fill {0xFFFF, 0xFFFF, 1, 1, MS_FRC_1_1} at unused FRC item slot. 3208 /// 3209 /// {0, 160, 1, 4, MS_FRC_1_4}, <-- FRC item 0 3210 /// {160, 245, 2, 5, MS_FRC_2_5}, <-- FRC item 1 3211 /// {245, 260, 1, 2, MS_FRC_1_2}, <-- FRC item 2 3212 /// {260, 400, 1, 2, MS_FRC_1_2}, <-- FRC item 3 3213 /// {400, 0xFFFF, 1, 1, MS_FRC_1_1}, <-- FRC item 4 3214 /// {0xFFFF, 0xFFFF, 1, 1, MS_FRC_1_1} <-- FRC item 5 (Unused) 3215 /// @param stFRCTable \b IN: The pointer which point to a FRC table. You can refer above description. 3216 /// if pass NULL, driver will use default frc table. 3217 /// @return @ref XC_EX_RETURN_VALUE Return status. 3218 //------------------------------------------------------------------------------------------------- 3219 // DLL_PUBLIC XC_EX_RETURN_VALUE MApi_XC_EX_CustomizeFRCTable(XC_DEVICE_ID *pDeviceId, XC_EX_FRC_SETTING* stFRCTable); 3220 3221 //------------------------------------------------------------------------------------------------- 3222 /// Set specific in / out framerate control (Using in Box proejct only.) 3223 /// @param bEnable \b IN: TRUE: Enable ouput frame control 3224 /// @param pPanelInfoEx \b IN: The information about in / out framerate. 3225 /// @param pPanelInfoEx \b IN: The window which need to be controlled. 3226 /// @return @ref XC_EX_RETURN_VALUE return type. 3227 //------------------------------------------------------------------------------------------------- 3228 // DLL_PUBLIC XC_EX_RETURN_VALUE MApi_XC_EX_OutputFrameCtrl(XC_DEVICE_ID *pDeviceId, MS_BOOL bEnable, XC_EX_OUTPUTFRAME_Info * stOutFrameInfo,XC_EX_SCALER_WIN eWindow); 3229 3230 //------------------------------------------------------------------------------------------------- 3231 /// Set the FPLL mode: 3232 /// @param bTrue \b IN: True: FSM mode, False: Non FSM mode 3233 //------------------------------------------------------------------------------------------------- 3234 // DLL_PUBLIC void MApi_SC_EX_Enable_FPLL_FSM(XC_DEVICE_ID *pDeviceId, MS_BOOL bTrue); 3235 3236 //------------------------------------------------------------------------------------------------- 3237 /// This function will force freerun in MDrv_Scaler_SetPanelTiming(), 3238 /// otherwise MDrv_Scaler_SetPanelTiming() will decide to do framelock or not by itself. 3239 /// 3240 /// Note: this function is difference with MDrv_SC_set_fpll() which is used to 3241 /// unlock framelock after MDrv_Scaler_SetPanelTiming(). 3242 /// But this function is used to affect MDrv_Scaler_SetPanelTiming()'s behavior. 3243 /// @param bEnable \b IN: TRUE: Enable force freerun. FALSE: disable force free run. 3244 //------------------------------------------------------------------------------------------------- 3245 // DLL_PUBLIC void MApi_SC_EX_ForceFreerun(XC_DEVICE_ID *pDeviceId, MS_BOOL bEnable); 3246 3247 //------------------------------------------------------------------------------------------------- 3248 /// Get Force freerun status. 3249 /// @return @ref MS_BOOL True: Current is in Force freerun mode. False: Current is not in Force Freerun mode 3250 //------------------------------------------------------------------------------------------------- 3251 // DLL_PUBLIC MS_BOOL MApi_SC_EX_IsForceFreerun(XC_DEVICE_ID *pDeviceId); 3252 3253 //------------------------------------------------------------------------------------------------- 3254 /// Set specific in / out framerate control (Using in Box proejct only.) 3255 /// @param bEnable \b IN: TRUE: Enable ouput frame control 3256 /// @param pPanelInfoEx \b IN: The information about in / out framerate. 3257 /// @param pPanelInfoEx \b IN: The window which need to be controlled. 3258 /// @return @ref XC_EX_RETURN_VALUE return type. 3259 //------------------------------------------------------------------------------------------------- 3260 // DLL_PUBLIC void MApi_SC_EX_SetFreerunVFreq(XC_DEVICE_ID *pDeviceId, XC_EX_VFREQ_SEL VFreq); 3261 3262 //------------------------------------------------------------------------------------------------- 3263 /// Set external panel info for output 3264 /// Currently, only support setting of two different vfreqs at same time 3265 /// The set ExPanelInfo will take effect after running of function MApi_XC_SetPanelTiming 3266 /// @param bEnable \b IN: TRUE: Enable this XC_PANEL_INFO_EX, FALSE: Disable this XC_PANEL_INFO_EX 3267 /// @param pPanelInfoEx \b IN: The extern panel information to set @ref XC_PANEL_INFO_EX 3268 /// @return @ref MS_BOOL TRUE: Success, FALSE: Failed 3269 //------------------------------------------------------------------------------------------------- 3270 // DLL_PUBLIC MS_BOOL MApi_XC_EX_SetExPanelInfo(XC_DEVICE_ID *pDeviceId, MS_BOOL bEnable, XC_EX_PANEL_INFO_EX *pPanelInfoEx); 3271 3272 //------------------------------------------------------------------------------------------------- 3273 /// Set the FPLL thresh mode: 3274 /// @param bEnable \b IN: TRUE: Thresh mode, FALSE: Non-Thresh mode 3275 //------------------------------------------------------------------------------------------------- 3276 // DLL_PUBLIC void MApi_XC_EX_Enable_FPLL_Thresh_Mode(XC_DEVICE_ID *pDeviceId, MS_BOOL bEnable); 3277 3278 //------------------------------------------------------------------------------------------------- 3279 /// Enable auto no signal mode 3280 /// @param bEnable \b IN: True: Enable auto no signal mode. 3281 /// @eWindow \b IN: The window (main or sub) which need to be controled. 3282 /// @return @ref XC_EX_RETURN_VALUE TRUE: eWindow is in auto no signal mode. FALSE: eWindow is not in auto no signal mode 3283 //------------------------------------------------------------------------------------------------- 3284 // DLL_PUBLIC XC_EX_RETURN_VALUE MApi_XC_EX_EnableIPAutoNoSignal(XC_DEVICE_ID *pDeviceId, MS_BOOL bEnable, XC_EX_SCALER_WIN eWindow ); 3285 3286 //------------------------------------------------------------------------------------------------- 3287 /// Return true is current is in auto nosignal mode. 3288 /// @param eWindow \b IN: IP auto nosignal in specific window 3289 /// @return @ref MS_BOOL TRUE: eWindow is in auto no signal mode. FALSE: eWindow is not in auto no signal mode 3290 //------------------------------------------------------------------------------------------------- 3291 // DLL_PUBLIC MS_BOOL MApi_XC_EX_GetIPAutoNoSignal(XC_DEVICE_ID *pDeviceId, XC_EX_SCALER_WIN eWindow ); 3292 3293 //------------------------------------------------------------------------------------------------- 3294 /// Enable or disable IP auto coast 3295 /// @param bEnable \b IN: Enable or Disable 3296 //------------------------------------------------------------------------------------------------- 3297 // DLL_PUBLIC void MApi_XC_EX_EnableIPAutoCoast(XC_DEVICE_ID *pDeviceId, MS_BOOL bEnable); 3298 3299 //------------------------------------------------------------------------------------------------- 3300 /// Enable IP auto Coast debounce (the debounce time is 1 (default) in driver) 3301 /// @return void 3302 //------------------------------------------------------------------------------------------------- 3303 // DLL_PUBLIC void MApi_XC_EX_EnableIPCoastDebounce(XC_DEVICE_ID *pDeviceId); 3304 3305 //------------------------------------------------------------------------------------------------- 3306 /// Clear IP auto Coast debounce 3307 /// @return void 3308 //------------------------------------------------------------------------------------------------- 3309 // DLL_PUBLIC void MApi_XC_EX_ClearIPCoastStatus(XC_DEVICE_ID *pDeviceId); 3310 3311 //------------------------------------------------------------------------------------------------- 3312 /// Enable FPLL related settings not by program but by user's setting from TV tool 3313 /// Including PhaseLimit, limitD5D6D7_RK 3314 /// @param bEnable @ref MS_BOOL \b IN: enable or not 3315 //------------------------------------------------------------------------------------------------- 3316 // DLL_PUBLIC void MApi_XC_EX_EnableFpllManualSetting(XC_DEVICE_ID *pDeviceId, MS_BOOL bEnable); // debug purpose 3317 3318 //-------------------------------------------------------------------------------------------------------------------- 3319 /// Test if panel output is ok by changing output DClk, this is to test max range that FPLL can do 3320 /// @param u32FpllSetOffset @ref MS_U32 \b IN: the offset to be add/minus the typical DClk output, unit is SET 3321 /// @param u16TestCnt @ref MS_U16 \b IN: the times to do boundary test 3322 //-------------------------------------------------------------------------------------------------------------------- 3323 // DLL_PUBLIC void MApi_XC_EX_FpllBoundaryTest(XC_DEVICE_ID *pDeviceId, MS_U32 u32FpllSetOffset, MS_U16 u16TestCnt); // debug purpose 3324 3325 //------------------------------ 3326 // Offline signal detection related 3327 //------------------------------ 3328 //----------------------------------------------------------------------------- 3329 /// Set the source need to be detect in offline detection. 3330 /// @param XC_EX_INPUT_SOURCE_TYPE \b IN: The source need to be monitor 3331 //------------------------------------------------------------------------------------------------- 3332 // DLL_PUBLIC void MApi_XC_EX_SetOffLineDetection ( XC_DEVICE_ID *pDeviceId, XC_EX_INPUT_SOURCE_TYPE u8InputSourceType ); 3333 //------------------------------------------------------------------------------------------------- 3334 /// Get Offline detection status to specific input source 3335 /// @param u8InputSourceType \b IN: the specific input source type to do offline detection 3336 /// @return @ref MS_U8 TRUE: Success, FALSE: Failed 3337 //------------------------------------------------------------------------------------------------- 3338 // DLL_PUBLIC MS_U8 MApi_XC_EX_GetOffLineDetection( XC_DEVICE_ID *pDeviceId, XC_EX_INPUT_SOURCE_TYPE u8InputSourceType); 3339 //------------------------------------------------------------------------------------------------- 3340 /// Set Offline detection Sog Threshold 3341 /// @param u8Threshold \b IN: threshold value t2,u3,u4: 0~31 other chip: 0~255 3342 /// @Return TRUE: Successful FALSE: Fail 3343 //------------------------------------------------------------------------------------------------- 3344 // DLL_PUBLIC MS_BOOL MApi_XC_EX_SetOffLineSogThreshold(XC_DEVICE_ID *pDeviceId, MS_U8 u8Threshold); //t2,u3,u4: 0~31 other chip: 0~255 3345 //------------------------------------------------------------------------------------------------- 3346 /// Set Offline Detection Sog filter bandwidth 3347 /// @param u8BW \b IN: bandwidth value t2,u3,u4: 0~7 other chip: 0~31 3348 /// @Return TRUE: Successful FALSE: Fail 3349 //------------------------------------------------------------------------------------------------- 3350 // DLL_PUBLIC MS_BOOL MApi_XC_EX_SetOffLineSogBW(XC_DEVICE_ID *pDeviceId, MS_U8 u8BW); 3351 3352 //----------------------------------------------------------------------------- 3353 /// Initial offline detect procedure. 3354 /// @return @ref MS_BOOL TRUE: Success, FALSE: Failed 3355 //----------------------------------------------------------------------------- 3356 // DLL_PUBLIC MS_BOOL MApi_XC_EX_OffLineInit(XC_DEVICE_ID *pDeviceId); 3357 3358 //------------------------------ 3359 // PIP 3360 //------------------------------ 3361 //------------------------------------------------------------------------------------------------- 3362 /// Set Extra fetch number. (This setting is usually used in PIP mode. Please set carefully) 3363 /// @param u8val \b IN: The extra fetch number. 3364 //------------------------------------------------------------------------------------------------- 3365 // DLL_PUBLIC void MApi_XC_EX_Set_Extra_fetch_adv_line(XC_DEVICE_ID *pDeviceId, MS_U8 u8val); 3366 3367 //------------------------------------------------------------------------------------------------- 3368 /// Set the VGA SOG on or off 3369 /// @param bEnable \b IN: bEnable =1, Turn on the VGA SOG; bEnable =0, Turn off the VGA SOG 3370 //------------------------------------------------------------------------------------------------- 3371 // DLL_PUBLIC XC_EX_RETURN_VALUE MApi_XC_EX_SetVGASogEn(XC_DEVICE_ID *pDeviceId, MS_BOOL bVGASogEn); 3372 3373 //------------------------------------------------------------------------------------------------- 3374 /// Control the output window(Main/Sub) on or off 3375 /// @param bEnable \b IN: bEnable =1, Turn on the window; bEnable =0, Turn off the window 3376 /// @param eWindow \b IN: eWindow =0, for MAIN; eWindow =1, for SUB; 3377 //------------------------------------------------------------------------------------------------- 3378 DLL_PUBLIC void MApi_XC_EX_EnableWindow(XC_DEVICE_ID *pDeviceId, MS_BOOL bEnable, XC_EX_SCALER_WIN eWindow); 3379 3380 //------------------------------------------------------------------------------------------------- 3381 /// whether sub window is enable 3382 /// @param void \b IN: none 3383 //------------------------------------------------------------------------------------------------- 3384 // DLL_PUBLIC MS_BOOL MApi_XC_EX_Is_SubWindowEanble(XC_DEVICE_ID *pDeviceId); 3385 3386 //------------------------------------------------------------------------------------------------- 3387 /// Set Border format 3388 /// @param u8WidthIn \b IN: In-box width 3389 /// @param u8WidthOut \b IN: Out-box width 3390 /// @param u8color \b IN: border color 3391 /// @param eWindow \b IN: which window we are going to set 3392 //------------------------------------------------------------------------------------------------- 3393 // DLL_PUBLIC void MApi_XC_EX_SetBorderFormat( XC_DEVICE_ID *pDeviceId, MS_U8 u8Left, MS_U8 u8Right, MS_U8 u8Up, MS_U8 u8Down, MS_U8 u8color, XC_EX_SCALER_WIN eWindow ); 3394 3395 //------------------------------------------------------------------------------------------------- 3396 /// enable or disable Border 3397 /// @param bEnable \b IN: Enable or Disable 3398 /// @param eWindow \b IN: which window we are going to set 3399 //------------------------------------------------------------------------------------------------- 3400 // DLL_PUBLIC void MApi_XC_EX_EnableBorder(XC_DEVICE_ID *pDeviceId, MS_BOOL bEnable, XC_EX_SCALER_WIN eWindow); 3401 3402 //------------------------------------------------------------------------------------------------- 3403 /// Set Z-order main window first or not 3404 /// @param bMainFirst \b IN: TRUE: Main window first; FALSE: Sub window first 3405 //------------------------------------------------------------------------------------------------- 3406 DLL_PUBLIC void MApi_XC_EX_ZorderMainWindowFirst(XC_DEVICE_ID *pDeviceId, MS_BOOL bMainFirst); 3407 3408 //------------------------------ 3409 // PQ Load Function 3410 //------------------------------ 3411 //------------------------------------------------------------------------------------------------- 3412 /// Create a function for PQ in SC. 3413 /// @param PQ_Function_Info \b IN: the information of the function 3414 /// @param u32InitDataLen \b IN: the length of the PQ_Function_Info 3415 //------------------------------------------------------------------------------------------------- 3416 DLL_PUBLIC void MApi_XC_EX_PQ_LoadFunction(XC_DEVICE_ID *pDeviceId, PQ_EX_Function_Info* function_Info , MS_U32 u32InitDataLen); 3417 //------------------------------------------------------------------------------------------------- 3418 /// Return true if current status is H nonlinear scaling 3419 /// @param u32InitDataLen \b IN: the length of the PQ_Function_Info 3420 /// @return @ref MS_U8 True: Using HNonLinearScaling False: Not in Nonlinear status 3421 //------------------------------------------------------------------------------------------------- 3422 // DLL_PUBLIC MS_BOOL MApi_XC_EX_Check_HNonLinearScaling(XC_DEVICE_ID *pDeviceId); 3423 3424 //------------------------------ 3425 // EURO Function 3426 //------------------------------ 3427 3428 // Enable/Disable Euro/Australia Hdtv Detection support in driver 3429 //----------------------------------------------------------------------------- 3430 /// Enable/Disable Euro/Australia Hdtv Detection support in driver 3431 /// @param bEnable: 3432 /// - ENABLE : enable support 3433 /// - DISABLE : disable disable 3434 /// @return None. 3435 //----------------------------------------------------------------------------- 3436 // DLL_PUBLIC void MApi_XC_EX_EnableEuroHdtvSupport(XC_DEVICE_ID *pDeviceId, MS_BOOL bEnable); 3437 3438 //----------------------------------------------------------------------------- 3439 /// Enable Euro/Australia Hdtv Detection 3440 /// @param bEnable: 3441 /// - ENABLE : enable detection 3442 /// - DISABLE : disable detection 3443 /// @return None. 3444 //----------------------------------------------------------------------------- 3445 // DLL_PUBLIC void MApi_XC_EX_EnableEuroHdtvDetection(XC_DEVICE_ID *pDeviceId, MS_BOOL bEnable, XC_EX_SCALER_WIN eWindow); 3446 3447 //------------------------------ 3448 // Genenal R/W Function 3449 //------------------------------ 3450 3451 //------------------------------------------------------------------------------------------------- 3452 /// General Read Byte Function 3453 /// @param u32Reg \b IN: which value shouldn't contain xc sub bank and address 3454 /// @return @ref MS_U8 3455 //------------------------------------------------------------------------------------------------- 3456 // DLL_PUBLIC MS_U8 MApi_XC_EX_ReadByte(MS_U32 u32Reg); 3457 3458 //------------------------------------------------------------------------------------------------- 3459 /// General Write Byte Function 3460 /// @param u32Reg \b IN: which value shouldn't contain xc sub bank and address 3461 /// @return @ref MS_U8 3462 //------------------------------------------------------------------------------------------------- 3463 // DLL_PUBLIC void MApi_XC_EX_WriteByte(MS_U32 u32Reg, MS_U8 u8Val); 3464 3465 //------------------------------------------------------------------------------------------------- 3466 /// General Write Byte Function 3467 /// @param u32Reg \b IN: which value shouldn't contain xc sub bank and address 3468 /// @param u8Val \b IN: setting value 3469 /// @param u8Msk \b IN: setting value 3470 //------------------------------------------------------------------------------------------------- 3471 // DLL_PUBLIC void MApi_XC_EX_WriteByteMask(MS_U32 u32Reg, MS_U8 u8Val, MS_U8 u8Msk); 3472 3473 //------------------------------------------------------------------------------------------------- 3474 /// General 2 Write Byte Function 3475 /// @param u32Reg \b IN: which value shouldn't contain xc sub bank and address 3476 /// @param u16Val \b IN: setting value 3477 /// @param u16Msk \b IN: setting value 3478 //------------------------------------------------------------------------------------------------- 3479 // DLL_PUBLIC void MApi_XC_EX_Write2ByteMask(MS_U32 u32Reg, MS_U16 u16val, MS_U16 u16Mask); 3480 3481 //------------------------------ 3482 // XC R/W Function, using mutex to protect 3483 //------------------------------ 3484 3485 //------------------------------------------------------------------------------------------------- 3486 /// Scaler Write 2 Byte Function, and use mutex to protect while switch bank and write address 3487 /// @param u32Reg \b IN: which value contain xc sub bank and address 3488 /// @param u16Val \b IN: setting value 3489 //------------------------------------------------------------------------------------------------- 3490 // DLL_PUBLIC void MApi_XC_EX_W2BYTE(XC_DEVICE_ID *pDeviceId, MS_U32 u32Reg, MS_U16 u16Val); 3491 3492 //------------------------------------------------------------------------------------------------- 3493 /// Scaler Read 2 Byte Function, and use mutex to protect while switch bank and write address 3494 /// @param u32Reg \b IN: which value contain xc sub bank and address 3495 /// @return @ref MS_U16 3496 //------------------------------------------------------------------------------------------------- 3497 // DLL_PUBLIC MS_U16 MApi_XC_EX_R2BYTE(XC_DEVICE_ID *pDeviceId, MS_U32 u32Reg); 3498 3499 //------------------------------------------------------------------------------------------------- 3500 /// Scaler Write 4 Byte Function, and use mutex to protect while switch bank and write address 3501 /// @param u32Reg \b IN: which value contain xc sub bank and address 3502 /// @param u32Val \b IN: setting value 3503 //------------------------------------------------------------------------------------------------- 3504 // DLL_PUBLIC void MApi_XC_EX_W4BYTE(XC_DEVICE_ID *pDeviceId, MS_U32 u32Reg, MS_U32 u32Val); 3505 3506 //------------------------------------------------------------------------------------------------- 3507 /// Scaler Read 4 Byte Function, and use mutex to protect while switch bank and write address 3508 /// @param u32Reg \b IN: which value contain xc sub bank and address 3509 /// @return @ref MS_U32 3510 //------------------------------------------------------------------------------------------------- 3511 // DLL_PUBLIC MS_U32 MApi_XC_EX_R4BYTE(XC_DEVICE_ID *pDeviceId, MS_U32 u32Reg); 3512 3513 //------------------------------------------------------------------------------------------------- 3514 /// Scaler Read 2 Byte Mask Function, and use mutex to protect while switch bank and write address 3515 /// @param u32Reg \b IN: which value contain xc sub bank and address 3516 /// @param u16mask \b IN: decide which bit is valied 3517 /// @return @ref MS_U16 3518 //------------------------------------------------------------------------------------------------- 3519 // DLL_PUBLIC MS_U16 MApi_XC_EX_R2BYTEMSK(XC_DEVICE_ID *pDeviceId, MS_U32 u32Reg, MS_U16 u16Mask); 3520 3521 //------------------------------------------------------------------------------------------------- 3522 /// Scaler Write 2 Byte Mask Function, and use mutex to protect while switch bank and write address 3523 /// @param u32Reg \b IN: which value contain xc sub bank and address 3524 /// @param u16Val \b IN: Setting value 3525 /// @param u16mask \b IN: decide which bit is valied 3526 //------------------------------------------------------------------------------------------------- 3527 // DLL_PUBLIC void MApi_XC_EX_W2BYTEMSK(XC_DEVICE_ID *pDeviceId, MS_U32 u32Reg, MS_U16 u16Val, MS_U16 u16Mask); 3528 3529 //------------------------------ 3530 // MLoad Function, xc command burst 3531 //------------------------------ 3532 //------------------------------------------------------------------------------------------------- 3533 /// Initialize the Menuload 3534 /// @param PhyAddr \b IN: the physical address for the menuload 3535 /// @param u32BufByteLen \b IN: the buffer length of the menu load commands 3536 //------------------------------------------------------------------------------------------------- 3537 DLL_PUBLIC void MApi_XC_EX_MLoad_Init(XC_DEVICE_ID *pDeviceId, MS_PHY PhyAddr, MS_U32 u32BufByteLen); 3538 3539 //------------------------------------------------------------------------------------------------- 3540 /// Enable/Disable the MLoad 3541 /// @return void 3542 //------------------------------------------------------------------------------------------------- 3543 DLL_PUBLIC void MApi_XC_EX_MLoad_Enable(XC_DEVICE_ID *pDeviceId, MS_BOOL bEnable); 3544 3545 //------------------------------------------------------------------------------------------------- 3546 /// Get the status of MLoad 3547 //------------------------------------------------------------------------------------------------- 3548 // DLL_PUBLIC XC_EX_MLOAD_TYPE MApi_XC_EX_MLoad_GetStatus(XC_DEVICE_ID *pDeviceId); 3549 3550 //------------------------------------------------------------------------------------------------- 3551 /// write signal command to Mload and fire 3552 /// @param u32Addr \b IN: register 3553 /// @param u16Data \b IN: value 3554 /// @param u16Mask \b IN: mask 3555 //------------------------------------------------------------------------------------------------- 3556 // DLL_PUBLIC MS_BOOL MApi_XC_EX_MLoad_WriteCmd_And_Fire(XC_DEVICE_ID *pDeviceId, MS_U32 u32Addr, MS_U16 u16Data, MS_U16 u16Mask); 3557 3558 //------------------------------------------------------------------------------------------------- 3559 /// write multi commands to Mload and fire 3560 /// @param pu32Addr \b IN: buffer of register 3561 /// @param pu16Data \b IN: buffer of value 3562 /// @param pu16Mask \b IN: buffer of mask 3563 /// @param u16CmdCnt \b IN: counter of command 3564 //------------------------------------------------------------------------------------------------- 3565 // DLL_PUBLIC MS_BOOL MApi_XC_EX_MLoad_WriteCmds_And_Fire(XC_DEVICE_ID *pDeviceId, MS_U32 *pu32Addr, MS_U16 *pu16Data, MS_U16 *pu16Mask, MS_U16 u16CmdCnt); 3566 3567 //------------------------------ 3568 // Menuload Gamma Function 3569 //------------------------------ 3570 //------------------------------------------------------------------------------------------------- 3571 /// Initialize the Menuload Gamma 3572 /// @param PhyAddr \b IN: the physical address for the menuload 3573 /// @param u32BufByteLen \b IN: the buffer length of the menu load commands 3574 //------------------------------------------------------------------------------------------------- 3575 // DLL_PUBLIC void MApi_XC_EX_MLG_Init(XC_DEVICE_ID *pDeviceId, MS_PHY PhyAddr, MS_U32 u32BufByteLen); 3576 3577 //------------------------------------------------------------------------------------------------- 3578 /// Enable/Disable the Menuload Gamma 3579 /// @return void 3580 //------------------------------------------------------------------------------------------------- 3581 // DLL_PUBLIC void MApi_XC_EX_MLG_Enable(XC_DEVICE_ID *pDeviceId, MS_BOOL bEnable); 3582 3583 //------------------------------------------------------------------------------------------------- 3584 /// Get the caps of Menuload Gamma 3585 /// @return TRUE if succeed, FALSE if failed 3586 //------------------------------------------------------------------------------------------------- 3587 // DLL_PUBLIC MS_BOOL MApi_XC_EX_MLG_GetCaps(XC_DEVICE_ID *pDeviceId); 3588 3589 //------------------------------------------------------------------------------------------------- 3590 /// Get the status of MLoad 3591 /// @return @ref MLG_TYPE 3592 //------------------------------------------------------------------------------------------------- 3593 // DLL_PUBLIC XC_EX_MLG_TYPE MApi_XC_EX_MLG_GetStatus(XC_DEVICE_ID *pDeviceId); 3594 3595 //------------------------------ 3596 // For U4 set VOP data mux to VE 3597 //------------------------------ 3598 //------------------------------------------------------------------------------------------------- 3599 /// Select the source which need to connect to VE. 3600 /// @param eVOPSelOSD_MUX \b IN: The source need to connect to VE. 3601 //------------------------------------------------------------------------------------------------- 3602 // DLL_PUBLIC void MApi_XC_EX_SetOSD2VEMode(XC_DEVICE_ID *pDeviceId, XC_EX_VOP_SEL_OSD_XC2VE_MUX eVOPSelOSD_MUX); 3603 3604 //------------------------------------------------------------------------------------------------- 3605 /// Enable or disable prefilter in Scaler. 3606 /// @param bEnable \b IN: True: Enable: pre-filter. Disable: pre-filter 3607 //------------------------------------------------------------------------------------------------- 3608 // DLL_PUBLIC void MApi_XC_EX_IP2_PreFilter_Enable(XC_DEVICE_ID *pDeviceId, MS_BOOL bEnable); 3609 3610 //------------------------------------------------------------------------------------------------- 3611 /// Get pixel data with RGB format. 3612 /// @param u16x \b IN: X coordinate 3613 /// @param u16Y \b IN: Y coordinate 3614 /// @param eWindow \b IN: The window for retrieving data. 3615 /// @return @ref u32r return the R data 3616 /// @return @ref u32g return the G data 3617 /// @return @ref u32b return the B data 3618 //------------------------------------------------------------------------------------------------- 3619 // DLL_PUBLIC XC_EX_GET_PixelRGB_ReturnValue MApi_XC_EX_Get_Pixel_RGB(XC_DEVICE_ID *pDeviceId, XC_EX_Get_Pixel_RGB *pData, XC_EX_SCALER_WIN eWindow); 3620 3621 //------------------------------------------------------------------------------------------------- 3622 /// During retrieve pixel data, system have a cursor on the screen. This function can keep the cursor on the screen. 3623 /// @param bEnable \b IN: Enable if you want to keep cursor on the screen 3624 //------------------------------------------------------------------------------------------------- 3625 // DLL_PUBLIC void MApi_XC_EX_KeepPixelPointerAppear(XC_DEVICE_ID *pDeviceId, MS_BOOL bEnable); 3626 3627 //------------------------------------------------------------------------------------------------- 3628 /// @param eMemFmt \b IN: the format of memory 3629 /// Set memory format 3630 /// @ref MS_BOOL 3631 //------------------------------------------------------------------------------------------------- 3632 // DLL_PUBLIC MS_BOOL MApi_XC_EX_Set_MemFmtEx(XC_DEVICE_ID *pDeviceId, XC_EX_MEM_FMT eMemFmt, XC_EX_SCALER_WIN eWindow); 3633 3634 //------------------------------------------------------------------------------------------------- 3635 /// Get frame buffer less mode status 3636 /// @return @ref MS_BOOL retun the status about FrameBufferLess mode 3637 //------------------------------------------------------------------------------------------------- 3638 // DLL_PUBLIC MS_BOOL MApi_XC_EX_IsRequestFrameBufferLessMode(XC_DEVICE_ID *pDeviceId); 3639 3640 //------------------------------------------------------------------------------------------------- 3641 /// Set Flag to bypass software reset in MApi_XC_EX_Init() 3642 /// @param bFlag \b TRUE: initialize XC by skipping SW reset; FALSE: initialize XC in normal case 3643 /// @return E_XC_EX_RET_OK or E_XC_EX_RET_FAIL 3644 //------------------------------------------------------------------------------------------------- 3645 // DLL_PUBLIC XC_EX_RETURN_VALUE MApi_XC_EX_SkipSWReset(XC_DEVICE_ID *pDeviceId, MS_BOOL bFlag); 3646 3647 // DLL_PUBLIC void MApi_XC_EX_EnableRepWindowForFrameColor(XC_DEVICE_ID *pDeviceId, MS_BOOL bEnable); 3648 3649 //------------------------------------------------------------------------------------------------- 3650 /// Set VOP Video and OSD Laler 3651 //------------------------------------------------------------------------------------------------- 3652 //------------------------------------------------------------------------------------------------- 3653 /// Set OSD Layer in Box Project ( In TV chips, please use MApi_XC_SetVideoOnOSD) 3654 /// @param eVOPOSDLayer \b IN: OSD and Video layer selection 3655 /// @param eWindow \b IN: The window The alpha value of current window. 3656 //------------------------------------------------------------------------------------------------- 3657 // DLL_PUBLIC XC_EX_RETURN_VALUE MApi_XC_EX_SetOSDLayer(XC_DEVICE_ID *pDeviceId, XC_EX_VOP_OSD_LAYER_SEL eVOPOSDLayer, XC_EX_SCALER_WIN eWindow); 3658 //------------------------------------------------------------------------------------------------- 3659 /// Get OSD Layer in Box Project 3660 /// @param eWindow \b IN: The window The alpha value of current window. 3661 //------------------------------------------------------------------------------------------------- 3662 // DLL_PUBLIC XC_EX_VOP_OSD_LAYER_SEL MApi_XC_EX_GetOSDLayer(XC_DEVICE_ID *pDeviceId, XC_EX_SCALER_WIN eWindow); 3663 3664 //------------------------------------------------------------------------------------------------- 3665 /// Set Constant Alpha of Video 3666 //------------------------------------------------------------------------------------------------- 3667 //------------------------------------------------------------------------------------------------- 3668 /// Set alpha value of video (now only support in box) 3669 /// @param u8Val \b IN: The alpha value of video with specific window 3670 /// @param eWindow \b IN: The window which need to be adjust 3671 //------------------------------------------------------------------------------------------------- 3672 // DLL_PUBLIC XC_EX_RETURN_VALUE MApi_XC_EX_SetVideoAlpha(XC_DEVICE_ID *pDeviceId, MS_U8 u8Val, XC_EX_SCALER_WIN eWindow); 3673 3674 //------------------------------------------------------------------------------------------------- 3675 /// Get alpha value of video (now only support in box) 3676 /// @param pu8Val \b IN: The alpha value of video with specific window 3677 /// @param eWindow \b IN: The alpha value of a window. 3678 //------------------------------------------------------------------------------------------------- 3679 // DLL_PUBLIC XC_EX_RETURN_VALUE MApi_XC_EX_GetVideoAlpha(XC_DEVICE_ID *pDeviceId, MS_U8 *pu8Val, XC_EX_SCALER_WIN eWindow); 3680 3681 //------------------------------------------------------------------------------------------------- 3682 /// Skip Wait Vsync 3683 /// @param eWindow \b IN: Enable 3684 /// @param Skip wait Vsync \b IN: Disable wait Vsync 3685 //------------------------------------------------------------------------------------------------- 3686 // DLL_PUBLIC XC_EX_RETURN_VALUE MApi_XC_EX_SkipWaitVsync( XC_DEVICE_ID *pDeviceId, MS_BOOL eWindow, MS_BOOL bIsSkipWaitVsyn); 3687 3688 //------------------------------------------------------------------------------------------------- 3689 /// Select which DE to vop 3690 /// @param bFlag \b IN: @ref E_OP2VOP_DE_SEL 3691 /// @return E_XC_EX_RET_OK or E_XC_EX_RET_FAIL 3692 //------------------------------------------------------------------------------------------------- 3693 // DLL_PUBLIC XC_EX_RETURN_VALUE MApi_XC_EX_OP2VOPDESel(XC_DEVICE_ID *pDeviceId, XC_EX_OP2VOP_DE_SEL eVopDESel); 3694 3695 //------------------------------------------------------------------------------------------------- 3696 /// Set FRC Window 3697 /// @param e3dInputMode \b IN: @ref E_XC_3D_INPUT_MODE 3698 /// @param e3dOutputMode \b IN: @ref E_XC_3D_OUTPUT_MODE 3699 /// @param e3dPanelType \b IN: @ref E_XC_3D_PANEL_TYPE 3700 //------------------------------------------------------------------------------------------------- 3701 // DLL_PUBLIC void MApi_XC_EX_FRC_SetWindow(XC_DEVICE_ID *pDeviceId, XC_EX_3D_INPUT_MODE e3dInputMode, XC_EX_3D_OUTPUT_MODE e3dOutputMode, XC_EX_3D_PANEL_TYPE e3dPanelType); 3702 3703 //------------------------------------------------------------------------------------------------- 3704 /// Set two initial factors mode to improve quality in FBL 3705 /// @param bEnable \b IN: enable or disable two initial factors mode 3706 /// @param eWindow \b IN: @ref XC_EX_SCALER_WIN 3707 //------------------------------------------------------------------------------------------------- 3708 // DLL_PUBLIC MS_BOOL MApi_XC_EX_Enable_TwoInitFactor(XC_DEVICE_ID *pDeviceId, MS_BOOL bEnable, XC_EX_SCALER_WIN eWindow); 3709 3710 //------------------------------------------------------------------------------------------------- 3711 /// Get field packing mode support status 3712 /// @return TRUE(success) or FALSE(fail) 3713 //------------------------------------------------------------------------------------------------- 3714 // DLL_PUBLIC MS_BOOL MApi_XC_EX_IsFieldPackingModeSupported(void); 3715 3716 //------------------------------------------------------------------------------------------------- 3717 /// Pre Init before XC Init 3718 /// @param u16Type \b IN: @ref E_OP2VOP_DE_SEL 3719 /// @param para \b IN: parameter 3720 /// @param u32Length \b IN: size of parameter 3721 /// @return E_XC_EX_RET_OK or E_XC_EX_RET_FAIL 3722 //------------------------------------------------------------------------------------------------- 3723 // DLL_PUBLIC XC_EX_RETURN_VALUE MApi_XC_EX_PreInit( XC_DEVICE_ID *pDeviceId, XC_EX_PREINIT eType ,void* para, MS_U32 u32Length); 3724 3725 //------------------------------------------------------------------------------------------------- 3726 /// Get RGB data from memory buffer 3727 /// @param eBufType \b IN: get RGB 8 bits or 10 bits format data 3728 /// @param pRect \b IN: the widnow for getting data area in memory, need to refer to pre-scaling 3729 /// @param pRectBuf \b IN: the buffer for getting data, the buffer typs must be the same as eBufType 3730 /// @param eWindow \b IN: get main or sub video data from memory 3731 //------------------------------------------------------------------------------------------------- 3732 // DLL_PUBLIC void MApi_XC_EX_Get_BufferData(XC_DEVICE_ID *pDeviceId, XC_EX_OUTPUTDATA_TYPE eBufType, XC_EX_WINDOW_TYPE *pRect, void *pRectBuf, XC_EX_SCALER_WIN eWindow); 3733 3734 //------------------------------------------------------------------------------------------------- 3735 /// Set RGB data to memory buffer 3736 /// @param eBufType \b IN: set RGB 8 bits or 10 bits format data 3737 /// @param pDstRect \b IN: the widnow for setting data area in memory, need to refer to pre-scaling 3738 /// @param pSrcBuf \b IN: the buffer with RGB data for setting to memory, the buffer typs must be the same as eBufType 3739 /// @param pSrcRect \b IN: the widnow for picking data area in pSrcBuf 3740 /// @param eWindow \b IN: set main or sub video data to memory 3741 //------------------------------------------------------------------------------------------------- 3742 // DLL_PUBLIC void MApi_XC_EX_Set_BufferData(XC_DEVICE_ID *pDeviceId, XC_EX_INPUTDATA_TYPE eBufType, XC_EX_WINDOW_TYPE *pDstRect, void *pSrcBuf, XC_EX_WINDOW_TYPE *pSrcRect, XC_EX_SCALER_WIN eWindow); 3743 3744 //------------------------------------------------------------------------------------------------- 3745 /// Control the main window on or off 3746 /// @param bEnable \b IN: bEnable =1, Turn on the window; bEnable =0, Turn off the window 3747 //------------------------------------------------------------------------------------------------- 3748 // DLL_PUBLIC void MApi_XC_EX_EnableMainWindow(XC_DEVICE_ID *pDeviceId, MS_BOOL bEnable); // Turn on/off main/sub window 3749 3750 //------------------------------------------------------------------------------------------------- 3751 /// Enable sub window and control the window size 3752 /// @param *pstDispWin \b IN: Window type 3753 //------------------------------------------------------------------------------------------------- 3754 // DLL_PUBLIC void MApi_XC_EX_EnableSubWindow(XC_DEVICE_ID *pDeviceId, XC_EX_WINDOW_TYPE *pstDispWin); 3755 3756 //------------------------------------------------------------------------------------------------- 3757 /// Disable sub window 3758 /// @param void \b IN: none 3759 //------------------------------------------------------------------------------------------------- 3760 // DLL_PUBLIC void MApi_XC_EX_DisableSubWindow(XC_DEVICE_ID *pDeviceId); 3761 3762 //------------------------------------------------------------------------------------------------- 3763 /// Set pixel shift 3764 /// @param s8H \b IN: pixel shift H 3765 /// @param s8V \b IN: pixel shift V 3766 /// @return E_XC_EX_RET_OK or E_XC_EX_RET_FAIL 3767 //------------------------------------------------------------------------------------------------- 3768 // DLL_PUBLIC XC_EX_RETURN_VALUE MApi_XC_EX_SetPixelShift(XC_DEVICE_ID *pDeviceId, MS_S8 s8H, MS_S8 s8V); 3769 3770 //------------------------------------------------------------------------------------------------- 3771 /// MApi_XC_SetVideoOnOSD 3772 /// @param E_VDO_ON_OSD_LAYER \b IN: set video show on which osd layer 3773 /// @param eWindow \b IN: set main or sub video data to memory 3774 /// @return E_XC_EX_RET_OK or E_XC_EX_RET_FAIL 3775 //------------------------------------------------------------------------------------------------- 3776 // DLL_PUBLIC XC_EX_RETURN_VALUE MApi_XC_EX_SetVideoOnOSD(XC_DEVICE_ID *pDeviceId, XC_EX_VIDEO_ON_OSD_LAYER enlayer, XC_EX_SCALER_WIN eWindow); 3777 3778 3779 //------------------------------------------------------------------------------------------------- 3780 /// MApi_XC_SetOSDBlendingFormula 3781 /// @param enOsdIndex \b IN: osd index 3782 /// @param enType \b IN: osd blending type 3783 /// @param eWindow \b IN: blending with main or sub video 3784 /// @return E_XC_EX_RET_OK or E_XC_EX_RET_FAIL 3785 //------------------------------------------------------------------------------------------------- 3786 // DLL_PUBLIC XC_EX_RETURN_VALUE MApi_XC_EX_SetOSDBlendingFormula(XC_DEVICE_ID *pDeviceId, E_XC_EX_OSD_INDEX enOsdIndex, XC_EX_OSD_BlENDING_TYPE enType, XC_EX_SCALER_WIN eWindow); 3787 3788 //------------------------------------------------------------------------------------------------- 3789 // usage: 3790 // MS_XC_REPORT_PIXELINFO stRepPixInfo; 3791 // memset(&stRepPixInfo, 0, sizeof(MS_XC_REPORT_PIXELINFO)); 3792 // stRepPixInfo.u32ReportPixelInfo_Version = XC_EX_REPORT_PIXELINFO_VERSION; 3793 // stRepPixInfo.u16ReportPixelInfo_Length = sizeof(MS_XC_REPORT_PIXELINFO); 3794 // stRepPixInfo.enStage = E_XC_GET_PIXEL_STAGE_AFTER_OSD; 3795 // stRepPixInfo.u16XStart = xxxx; 3796 // stRepPixInfo.u16XEnd = xxxx; 3797 // stRepPixInfo.u16YStart = xxxx; 3798 // stRepPixInfo.u16YEnd = xxxx; 3799 // MApi_XC_ReportPixelInfo(&stRepPixInfo); 3800 // 3801 /// Report Pixel Info 3802 /// @param pstRepPixInfo \b IN: pointer to struct MS_XC_REPORT_PIXELINFO 3803 /// @return TRUE if succeed, FALSE if failed 3804 //------------------------------------------------------------------------------------------------- 3805 // DLL_PUBLIC MS_BOOL MApi_XC_EX_ReportPixelInfo(XC_DEVICE_ID *pDeviceId, XC_EX_REPORT_PIXELINFO *pstRepPixInfo); 3806 3807 //------------------------------------------------------------------------------------------------- 3808 /// MApi_XC_SetScaling 3809 /// @param bEnable \b IN: set enable or disable 3810 /// @param eScaling_type \b IN: set scaling type, pre-scaling, post-scaling, both-scaling 3811 /// @param eVector_type \b IN: set H vector, v vector, and HV vector 3812 /// @param eWindow \b IN: set main or sub video data to memory 3813 //------------------------------------------------------------------------------------------------- 3814 // DLL_PUBLIC void MApi_XC_EX_SetScaling( XC_DEVICE_ID *pDeviceId, MS_BOOL bEnable, XC_EX_SCALING_TYPE eScaling_type, XC_EX_VECTOR_TYPE eVector_type, XC_EX_SCALER_WIN eWindow ); 3815 3816 //------------------------------------------------------------------------------------------------- 3817 /// MApi_XC_EX_SetMCDIBufferAddress 3818 /// @param u32FBAddress \b IN: frame buffer base addr 3819 /// @param u32FBSize \b IN: frame buffer size 3820 /// @param eType \b IN: set frame buffer for MCDI ME1 or ME2 3821 //------------------------------------------------------------------------------------------------- 3822 // DLL_PUBLIC void MApi_XC_EX_SetMCDIBufferAddress(XC_DEVICE_ID *pDeviceId, MS_PHY u32FBAddress, MS_PHY u32FBSize, XC_EX_MCDI_TYPE eType); 3823 3824 //------------------------------------------------------------------------------------------------- 3825 /// MApi_XC_EnableMCDI 3826 /// @param bEnable \b IN: enable/disable MCDI 3827 /// @param eType \b IN: control MCDI ME1 or ME2 or both 3828 //------------------------------------------------------------------------------------------------- 3829 // DLL_PUBLIC void MApi_XC_EX_EnableMCDI(XC_DEVICE_ID *pDeviceId, MS_BOOL bEnable, XC_EX_MCDI_TYPE eType); 3830 3831 3832 //------------------------------------------------------------------------------------------------- 3833 /// MApi_XC_SendCmdToFRC 3834 /// @param u8Cmd \b IN: CMD 3835 /// @param count \b IN: parameter Counter 3836 /// @param pFRC_R2_Para \b IN: input parameter 3837 /// @return TRUE if succeed, FALSE if failed 3838 //------------------------------------------------------------------------------------------------- 3839 // DLL_PUBLIC MS_BOOL MApi_XC_EX_SendCmdToFRC( XC_DEVICE_ID *pDeviceId, MS_U8 u8Cmd, MS_U8 count, XC_EX_FRC_R2_CMD_PARAMETER pFRC_R2_Para ); 3840 3841 //------------------------------------------------------------------------------------------------- 3842 /// MApi_XC_GetMsgFromFRC 3843 /// @param u8Cmd \b IN: CMD 3844 /// @param pu8ParaCount \b IN: Counter 3845 /// @param pu8Para \b IN: input parameter 3846 /// @return TRUE if succeed, FALSE if failed 3847 //------------------------------------------------------------------------------------------------- 3848 // DLL_PUBLIC MS_BOOL MApi_XC_EX_GetMsgFromFRC(XC_DEVICE_ID *pDeviceId, MS_U8* pu8Cmd, MS_U8* pu8ParaCount, MS_U8* pu8Para); 3849 3850 //------------------------------------------------------------------------------------------------- 3851 /// Enable/Disable RW bank auto 3852 /// @param bEnable \b IN: enable or disable 3853 /// @param eWindow \b IN: which window we are going to enable or disable 3854 //------------------------------------------------------------------------------------------------- 3855 // DLL_PUBLIC void MApi_XC_EX_EnableRWBankAuto(XC_DEVICE_ID *pDeviceId, MS_BOOL bEnable, XC_EX_SCALER_WIN eWindow); 3856 3857 //------------------------------------------------------------------------------------------------- 3858 /// Set XC W/R Bank Mapping Number 3859 /// @param u8Val \b IN: W/R bank mapping value 3860 /// @param eWindow \b IN: which window we are going to set 3861 //------------------------------------------------------------------------------------------------- 3862 // DLL_PUBLIC void MApi_XC_EX_SetWRBankMappingNum(XC_DEVICE_ID *pDeviceId, MS_U8 u8Val, XC_EX_SCALER_WIN eWindow); 3863 3864 //------------------------------------------------------------------------------------------------- 3865 /// Get XC W/R Bank Mapping Number 3866 /// @param eWindow \b IN: which window we are going to get 3867 /// @return MS_U8 W/R bank mapping number 3868 //------------------------------------------------------------------------------------------------- 3869 // DLL_PUBLIC MS_U8 MApi_XC_EX_GetWRBankMappingNum(XC_DEVICE_ID *pDeviceId, XC_EX_SCALER_WIN eWindow); 3870 3871 //------------------------------------------------------------------------------------------------- 3872 /// Get XC W/R Bank Mapping Number for Zap (including UC effect) 3873 /// @param eWindow \b IN: which window we are going to get 3874 /// @return MS_U8 W/R bank mapping number 3875 //------------------------------------------------------------------------------------------------- 3876 // DLL_PUBLIC MS_U8 MApi_XC_EX_GetWRBankMappingNumForZap(XC_DEVICE_ID *pDeviceId, XC_EX_SCALER_WIN eWindow); 3877 3878 //------------------------------------------------------------------------------------------------- 3879 /// Set BOB mode 3880 /// @param bEnable \b IN: Enable BOB mode or not 3881 /// @param eWindow \b IN: which window we are going to set 3882 /// @return TRUE - succeed, FALSE - fail 3883 //------------------------------------------------------------------------------------------------- 3884 // DLL_PUBLIC MS_BOOL MApi_XC_EX_SetBOBMode(XC_DEVICE_ID *pDeviceId, MS_BOOL bEnable, XC_EX_SCALER_WIN eWindow); 3885 3886 //------------------------------------------------------------------------------------------------- 3887 /// Set XC force read bank 3888 /// @param bEnable \b IN: Enable force read bank or not 3889 /// @param u8Bank \b IN: Force read bank index 3890 /// @param eWindow \b IN: which window we are going to set 3891 //------------------------------------------------------------------------------------------------- 3892 // DLL_PUBLIC void MApi_XC_EX_SetForceReadBank(XC_DEVICE_ID *pDeviceId, MS_BOOL bEnable, MS_U8 u8Bank, XC_EX_SCALER_WIN eWindow); 3893 3894 //------------------------------ 3895 // LD 3896 //------------------------------------------------------------------------------------------------- 3897 /// LD set panel type 3898 /// @param eLdPanelType \b IN: panel type 3899 /// @return E_XC_EX_RET_OK or E_XC_EX_RET_FAIL 3900 //------------------------------------------------------------------------------------------------- 3901 // DLL_PUBLIC MS_BOOL MApi_XC_EX_LD_Init(XC_DEVICE_ID *pDeviceId, XC_EX_LD_PANEL_TYPE eLDPanelType ); 3902 //------------------------------------------------------------------------------------------------- 3903 /// LD set memory address 3904 /// @param u8MIU \b IN: MIU Select 3905 /// @param u32LDFBase0 \b IN: LDF memeory0 address 3906 /// @param u32LDFBase1 \b IN: LDF memeory1 address 3907 /// @param u32LDBBase0 \b IN: LDB memeory0 address 3908 /// @param u32LDBBase1 \b IN: LDB memeory1 address 3909 /// @param u32EDGE2DBase \b IN: EDGE2D memeory address 3910 /// @param u32LEDoffset \b IN: LED data offset 3911 /// @return E_XC_EX_RET_OK or E_XC_EX_RET_FAIL 3912 //------------------------------------------------------------------------------------------------- 3913 // DLL_PUBLIC MS_BOOL MApi_XC_EX_LD_SetMemoryAddress(XC_DEVICE_ID *pDeviceId, MS_U8 u8MIU ,MS_U32 u32LDFBase0,MS_U32 u32LDFBase1,MS_U32 u32LDBBase0,MS_U32 u32LDBBase1,MS_U32 u32EDGE2DBase,MS_U32 u32LEDoffset); 3914 //------------------------------------------------------------------------------------------------- 3915 /// set LD Level 3916 /// @param eMode \b IN: LD level 3917 /// @return E_XC_EX_RET_OK or E_XC_EX_RET_FAIL 3918 //------------------------------------------------------------------------------------------------- 3919 // DLL_PUBLIC MS_BOOL MApi_XC_EX_LD_SetLevel(XC_DEVICE_ID *pDeviceId, XC_EX_LD_MODE eMode); 3920 //------------------------------------------------------------------------------------------------- 3921 /// set LD backlight is zero flags 3922 /// @param eMode \b IN: backlight is zero flags 3923 /// @return E_XC_EX_RET_OK or E_XC_EX_RET_FAIL 3924 //------------------------------------------------------------------------------------------------- 3925 // DLL_PUBLIC MS_BOOL MApi_XC_EX_Set_TurnoffLDBL(XC_DEVICE_ID *pDeviceId, MS_BOOL bturnoffbl); 3926 //------------------------------------------------------------------------------------------------- 3927 /// set not update SPI data Flags 3928 /// @param brefreshSpidata \b IN: refresh Spi data flags 3929 /// @return E_XC_EX_RET_OK or E_XC_EX_RET_FAIL 3930 //------------------------------------------------------------------------------------------------- 3931 // DLL_PUBLIC MS_BOOL MApi_XC_EX_Set_notUpdateSPIDataFlags(XC_DEVICE_ID *pDeviceId, MS_BOOL brefreshSpidata); 3932 //------------------------------------------------------------------------------------------------- 3933 /// set User mode LD Flags 3934 /// @param buserLDFlags \b IN: User mode LD Flags 3935 /// @return E_XC_EX_RET_OK or E_XC_EX_RET_FAIL 3936 //------------------------------------------------------------------------------------------------- 3937 // DLL_PUBLIC MS_BOOL MApi_XC_EX_Set_UsermodeLDFlags(XC_DEVICE_ID *pDeviceId, MS_BOOL buserLDFlags); 3938 //------------------------------------------------------------------------------------------------- 3939 /// set LD backlight level 3940 /// @param u8BLLeve \b IN: backlight level 3941 /// @return E_XC_EX_RET_OK or E_XC_EX_RET_FAIL 3942 //------------------------------------------------------------------------------------------------- 3943 // DLL_PUBLIC MS_BOOL MApi_XC_EX_Set_BLLevel(XC_DEVICE_ID *pDeviceId, MS_U8 u8BLLevel); 3944 3945 //------------------------------------------------------------------------------------------------- 3946 /// set XC bandwidth saving X-mode 3947 /// @param bEnable \b IN: enable or disable 3948 /// @param eWindow \b IN: which window we are going to enable or disable 3949 //------------------------------------------------------------------------------------------------- 3950 // DLL_PUBLIC void MApi_XC_EX_Set_BWS_Mode(XC_DEVICE_ID *pDeviceId, MS_BOOL bEnable, XC_EX_SCALER_WIN eWindow); 3951 3952 //------------------------------------------------------------------------------------------------- 3953 /// set FRC ColorPathCtrl 3954 /// @param epath_type \b IN: Select one of path in the FRC_COLOR_PATH_TYPE 3955 /// @param bEnable \b IN: enable or disable 3956 //------------------------------------------------------------------------------------------------- 3957 // DLL_PUBLIC void MApi_XC_EX_FRC_ColorPathCtrl(XC_DEVICE_ID *pDeviceId, MS_U16 u16Path_sel, MS_BOOL bEnable); 3958 3959 //------------------------------------------------------------------------------------------------- 3960 /// set FRC_OP2 SetRGBGain 3961 /// @param u16RedGain \b IN: Red Gain 3962 /// @param u16GreenGain \b IN: Green Gain 3963 /// @param u16BlueGain \b IN: Blue Gain 3964 //------------------------------------------------------------------------------------------------- 3965 // DLL_PUBLIC void MApi_XC_EX_FRC_OP2_SetRGBGain(XC_DEVICE_ID *pDeviceId, MS_U16 u16RedGain, MS_U16 u16GreenGain, MS_U16 u16BlueGain); 3966 3967 //------------------------------------------------------------------------------------------------- 3968 /// set FRC_OP2 SetRGBOffset 3969 /// @param u16RedOffset \b IN: Red Offset 3970 /// @param u16GreenOffset \b IN: Green Offset 3971 /// @param u16BlueOffset \b IN: Blue Offset 3972 //------------------------------------------------------------------------------------------------- 3973 // DLL_PUBLIC void MApi_XC_EX_FRC_OP2_SetRGBOffset(XC_DEVICE_ID *pDeviceId, MS_U16 u16RedOffset, MS_U16 u16GreenOffset, MS_U16 u16BlueOffset); 3974 3975 //------------------------------------------------------------------------------------------------- 3976 /// set FRC_OP2 SetDither 3977 /// @param u16dither \b IN: Dither setting 3978 //------------------------------------------------------------------------------------------------- 3979 // DLL_PUBLIC void MApi_XC_EX_FRC_OP2_SetDither(XC_DEVICE_ID *pDeviceId, MS_U16 u16dither); 3980 3981 //------------------------------------------------------------------------------------------------- 3982 /// set XC Bypass MFC 3983 /// @param eEnable \b IN: Enable or Disable 3984 /// @return E_XC_EX_RET_OK or E_XC_EX_RET_FAIL 3985 //------------------------------------------------------------------------------------------------- 3986 // DLL_PUBLIC MS_BOOL MApi_XC_EX_FRC_BypassMFC(XC_DEVICE_ID *pDeviceId, MS_BOOL bEnable); 3987 3988 //------------------------------------------------------------------------------------------------- 3989 /// MApi_XC_ForceReadFrame 3990 /// @param bEnable \b IN: enable/disable keep specified frame 3991 /// @param u16FrameIndex \b IN: control specified frame to show 3992 //------------------------------------------------------------------------------------------------- 3993 // DLL_PUBLIC XC_EX_RETURN_VALUE MApi_XC_EX_ForceReadFrame(XC_DEVICE_ID *pDeviceId, MS_BOOL bEnable, MS_U16 u16FrameIndex); 3994 //------------------------------------------------------------------------------------------------- 3995 /// MApi_XC_SetCsc 3996 /// @param bEnable \b IN: enable/disable keep specified frame 3997 /// @param eWindow \b IN: which window we are going to enable or disable 3998 //------------------------------------------------------------------------------------------------- 3999 // DLL_PUBLIC void MApi_XC_EX_SetCsc( XC_DEVICE_ID *pDeviceId, MS_BOOL bEnable, XC_EX_SCALER_WIN eWindow ); 4000 4001 //------------------------------------------------------------------------------------------------- 4002 /// Register PQ Set FPLL thresh mode function 4003 /// @param fpPQCB \b IN: function pointer of PQ set FPLL thresh mode 4004 //------------------------------------------------------------------------------------------------- 4005 // DLL_PUBLIC void MApi_XC_EX_RegisterPQSetFPLLThreshMode(XC_DEVICE_ID *pDeviceId, void (*fpPQCB)(MS_U8 u8PQWin)); 4006 4007 //------------------------------------------------------------------------------------------------- 4008 /// Get XC free run status 4009 /// @return TRUE if it is free run, FALSE if not 4010 //------------------------------------------------------------------------------------------------- 4011 // DLL_PUBLIC MS_BOOL MApi_XC_EX_GetFreeRunStatus(XC_DEVICE_ID *pDeviceId); 4012 4013 //------------------------------------------------------------------------------------------------- 4014 /// MApi_XC_Get_DSForceIndexSupported 4015 /// @param eWindow \b IN: which window we are going to enable or disable 4016 //------------------------------------------------------------------------------------------------- 4017 // DLL_PUBLIC XC_EX_RETURN_VALUE MApi_XC_EX_Get_DSForceIndexSupported(XC_DEVICE_ID *pDeviceId, XC_EX_SCALER_WIN eWindow); 4018 4019 //------------------------------------------------------------------------------------------------- 4020 /// MApi_XC_Set_DSForceIndex 4021 /// @param bEnable \b IN: ENABLE/DISABLE force DS index or not 4022 /// @param u8Index \b IN: the index that needs to be forced in. 4023 /// @param eWindow \b IN: which window we are going to enable or disable 4024 //------------------------------------------------------------------------------------------------- 4025 // DLL_PUBLIC XC_EX_RETURN_VALUE MApi_XC_EX_Set_DSForceIndex(XC_DEVICE_ID *pDeviceId, MS_BOOL bEnable, MS_U8 u8Index, XC_EX_SCALER_WIN eWindow); 4026 4027 //------------------------------------------------------------------------------------------------- 4028 /// MApi_XC_Set_DSIndexSourceSelect 4029 /// @param eDSIdxSrc \b IN: choose where the DS index comes from. 4030 /// @param eWindow \b IN: which window we are going to enable or disable 4031 //------------------------------------------------------------------------------------------------- 4032 // DLL_PUBLIC XC_EX_RETURN_VALUE MApi_XC_EX_Set_DSIndexSourceSelect(XC_DEVICE_ID *pDeviceId, XC_EX_DS_INDEX_SOURCE eDSIdxSrc, XC_EX_SCALER_WIN eWindow); 4033 4034 4035 4036 //------------------------------------------------------------------------------------------------- 4037 /// MApi_XC_Set_DSForceIndex 4038 /// @param bEnable \b IN: ENABLE/DISABLE force DS index or not 4039 /// @param u8Index \b IN: the index that needs to be forced in. 4040 /// @param eWindow \b IN: which window we are going to enable or disable 4041 /// @return E_XC_EX_RET_OK or E_XC_EX_RET_FAIL 4042 //------------------------------------------------------------------------------------------------- 4043 // DLL_PUBLIC XC_EX_RETURN_VALUE MApi_XC_EX_OSDC_InitSetting(XC_DEVICE_ID *pDeviceId, 4044 // XC_EX_OSDC_TGEN_Type E_XC_OSDC_TGEN_Type, 4045 // XC_EX_OSDC_TGEN_INFO *pstOC_Tgen_Cus, 4046 // XC_EX_OSDC_CTRL_INFO *pstOC_Ctrl); 4047 //------------------------------------------------------------------------------------------------- 4048 /// MApi_XC_Set_DSForceIndex 4049 /// @param eCtrl_type \b IN: ENABLE/DISABLE force DS index or not 4050 /// @return E_XC_EX_RET_OK or E_XC_EX_RET_FAIL 4051 //------------------------------------------------------------------------------------------------- 4052 // DLL_PUBLIC XC_EX_RETURN_VALUE MApi_XC_EX_OSDC_Control(XC_DEVICE_ID *pDeviceId, MS_U32 eCtrl_type); 4053 4054 //------------------------------------------------------------------------------------------------- 4055 /// MApi_XC_EX_OSDC_GetDstInfo 4056 /// @param pDstInfo \b IN: get the Desternation info 4057 /// @param u32SizeofDstInfo \b IN: size check 4058 /// @return E_XC_EX_RET_OK or E_XC_EX_RET_FAIL 4059 //------------------------------------------------------------------------------------------------- 4060 // DLL_PUBLIC XC_EX_RETURN_VALUE MApi_XC_EX_OSDC_GetDstInfo(XC_DEVICE_ID *pDeviceId, XC_EX_OSDC_DST_DispInfo *pDstInfo, MS_U32 u32SizeofDstInfo); 4061 4062 //------------------------------------------------------------------------------------------------- 4063 /// MApi_XC_EX_OSDC_SetOutVfreqx10 4064 /// @param u16Vfreq \b IN: output V freq x10 4065 //------------------------------------------------------------------------------------------------- 4066 // DLL_PUBLIC void MApi_XC_EX_OSDC_SetOutVfreqx10(XC_DEVICE_ID *pDeviceId, MS_U16 u16Vfreq); 4067 4068 //------------------------------------------------------------------------------------------------- 4069 /// MApi_XC_EX_SetByPassOSDVsyncPos 4070 /// @param u16VsyncStart \b IN: OSD vsync start 4071 /// @param u16VsyncEnd \b IN: OSD vsync end 4072 //------------------------------------------------------------------------------------------------- 4073 // DLL_PUBLIC void MApi_XC_EX_BYPASS_SetOSDVsyncPos(XC_DEVICE_ID *pDeviceId, MS_U16 u16VsyncStart, MS_U16 u16VsyncEnd); 4074 4075 //------------------------------------------------------------------------------------------------- 4076 /// MApi_XC_EX_BYPASS_SetInputSrc 4077 /// @param bEnable \b IN: ENABLE/DISABLE bypass mode 4078 /// @param input \b IN: Select the input source for bypass mode 4079 //------------------------------------------------------------------------------------------------- 4080 // DLL_PUBLIC void MApi_XC_EX_BYPASS_SetInputSrc(XC_DEVICE_ID *pDeviceId, MS_BOOL bEnable, XC_EX_BYPASS_InputSource input); 4081 4082 //------------------------------------------------------------------------------------------------- 4083 /// MApi_XC_EX_BYPASS_SetCSC 4084 /// @param bEnable \b IN: ENABLE/DISABLE the color space convert 4085 //------------------------------------------------------------------------------------------------- 4086 // DLL_PUBLIC void MApi_XC_EX_BYPASS_SetCSC(XC_DEVICE_ID *pDeviceId, MS_BOOL bEnable); 4087 4088 //------------------------------------------------------------------------------------------------- 4089 /// MApi_XC_EX_SetSeamlessZapping 4090 /// @param pDeviceId \b IN: which XC device we are going to enable or disable 4091 /// @param eWindow \b IN: which window we are going to enable or disable 4092 /// @param bEnable \b IN: ENABLE/DISABLE seamless zapping 4093 /// @return E_XC_EX_RET_OK or E_XC_EX_RET_FAIL 4094 //------------------------------------------------------------------------------------------------- 4095 DLL_PUBLIC XC_EX_RETURN_VALUE MApi_XC_EX_SetSeamlessZapping(XC_DEVICE_ID *pDeviceId, XC_EX_SCALER_WIN eWindow, MS_BOOL bEnable); 4096 4097 //------------------------------------------------------------------------------------------------- 4098 /// MApi_XC_EX_Vtrack_SetPayloadData 4099 /// @param u16Timecode \b IN: The time code is coded on 16 bits. It is calculated based on the number of days from January 1st. 4100 /// @param u8ID \b IN: Operator ID 4101 //------------------------------------------------------------------------------------------------- 4102 // DLL_PUBLIC XC_EX_RETURN_VALUE MApi_XC_EX_Vtrack_SetPayloadData(XC_DEVICE_ID *pDeviceId, MS_U16 u16Timecode, MS_U8 u8OperatorID); 4103 4104 4105 //------------------------------------------------------------------------------------------------- 4106 /// MApi_XC_EX_Vtrack_SetUserDefindedSetting 4107 /// @param bEnable \b IN: ENABLE/DISABLE Customized Setting 4108 /// @param pu8Setting \b IN: pointer to targert user definded setting data (include setting1 to setting3) 4109 //------------------------------------------------------------------------------------------------- 4110 // DLL_PUBLIC XC_EX_RETURN_VALUE MApi_XC_EX_Vtrack_SetUserDefindedSetting(XC_DEVICE_ID *pDeviceId, MS_BOOL bUserDefinded, MS_U8 *pu8Setting); 4111 4112 4113 //------------------------------------------------------------------------------------------------- 4114 /// MApi_XC_EX_Vtrack_Enable 4115 /// @param u8FrameRate \b IN: ENABLE/DISABLE The FrameRateIn is based on the output format of the box 4116 /// @param bEnable \b IN: ENABLE/DISABLE Vtrack 4117 //------------------------------------------------------------------------------------------------- 4118 // DLL_PUBLIC XC_EX_RETURN_VALUE MApi_XC_EX_Vtrack_Enable(XC_DEVICE_ID *pDeviceId, MS_U8 u8FrameRate, MS_BOOL bEnable); 4119 4120 //------------------------------------------------------------------------------------------------- 4121 /// Pre-set the specific window with PQ info 4122 /// @param pstXC_SetWin_Info \b IN: the information of the window setting 4123 /// @param eWindow \b IN: which window we are going to set 4124 //------------------------------------------------------------------------------------------------- 4125 // DLL_PUBLIC void MApi_XC_EX_PreSetPQInfo(XC_DEVICE_ID *pDeviceId, XC_EX_SETWIN_INFO *pstXC_SetWin_Info, XC_EX_SCALER_WIN eWindow); 4126 4127 //------------------------------------------------------------------------------------------------- 4128 /// MApi_XC_EX_Is_OP1_TestPattern_Enabled 4129 /// @return MS_BOOL: TRUE - enabled, FALSED - disabled 4130 //------------------------------------------------------------------------------------------------- 4131 // DLL_PUBLIC MS_BOOL MApi_XC_EX_Is_OP1_TestPattern_Enabled(XC_DEVICE_ID *pDeviceId); 4132 4133 //------------------------------------------------------------------------------------------------- 4134 /// MApi_XC_EX_Set_OP1_TestPattern 4135 /// @param ePattern \b IN: select test pattern 4136 /// @param eMode \b IN: choose the patgen mode (only support E_XC_OP1_PATGEN_DISP_LB_MODE now) 4137 /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL or E_APIXC_RET_FAIL_FUN_NOT_SUPPORT 4138 //------------------------------------------------------------------------------------------------- 4139 // DLL_PUBLIC XC_EX_RETURN_VALUE MApi_XC_EX_Set_OP1_TestPattern(XC_DEVICE_ID *pDeviceId, XC_EX_OP1_PATTERN ePattern, XC_EX_OP1_PATGEN_MODE eMode); 4140 4141 4142 //------------------------------------------------------------------------------------------------- 4143 /// MApi_XC_Set_WhiteBalance_Pattern 4144 /// @param bEnable \b IN: enable/disable white balance test pattern 4145 /// @param u16R_CR_Data \b IN: when enable white balance test pattern ,Data Generator for r_cr constant 4146 /// @param u16G_Y_Data \b IN: when enable white balance test pattern ,Data Generator for g_y constant 4147 /// @param u16B_CB_Data \b IN: when enable white balance test pattern ,Data Generator for b_cb constant 4148 /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL or E_APIXC_RET_FAIL_FUN_NOT_SUPPORT 4149 //------------------------------------------------------------------------------------------------- 4150 // DLL_PUBLIC XC_EX_RETURN_VALUE MApi_XC_EX_Set_WhiteBalance_Pattern(XC_DEVICE_ID *pDeviceId, MS_BOOL bEnable, MS_U16 u16R_CR_Data, MS_U16 u16G_Y_Data ,MS_U16 u16B_CB_Data); 4151 4152 4153 #ifdef __cplusplus 4154 } 4155 #endif 4156 4157 #endif /* _API_XC_EX_H_ */ 4158 4159 4160