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