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 drvTVEncoder.h 98 /// @brief TVEncoder interface 99 /// @author MStar Semiconductor Inc. 100 /////////////////////////////////////////////////////////////////////////////////////////////////// 101 102 /* !\defgroup VE VE interface (drvTVEncoder.h) 103 \ingroup CVBS_OUT 104 105 VE is used to covernt input video into standard definition resolution(pal/nstc) 106 and pass through the DAC to scart out. 107 108 <b> VE Block Diagram: </b> \n 109 \image html drvVE_pic01.png 110 111 *! \defgroup VE_INFO VE Information pool 112 * \ingroup VE 113 114 *! \defgroup VE_INIT VE init control 115 * \ingroup VE 116 117 *! \defgroup VE_FEATURE VE feature operation 118 * \ingroup VE 119 120 *! \defgroup VE_ToBeModified VE api to be modified 121 * \ingroup VE 122 123 *! \defgroup VE_ToBeRemove VE api to be removed 124 * \ingroup VE 125 */ 126 #ifndef _DRVTVENCODER_H 127 #define _DRVTVENCODER_H 128 129 #include "MsDevice.h" 130 #include "MsCommon.h" 131 #include "UFO.h" 132 133 #ifdef __cplusplus 134 extern "C" 135 { 136 #endif 137 138 //------------------------------------------------------------------------------------------------- 139 // Macro and Define 140 //------------------------------------------------------------------------------------------------- 141 #define MSIF_VE_TAG {'M','S','I','F'} //Version ID header 142 #define MSIF_VE_CLASS {'0','0'} //info Class code 143 #define MSIF_VE_CUS 0x6666 //Customer ID 144 #define MSIF_VE_MOD 0x6666 //Module ID 145 #define MSIF_VE_CHIP 0Xffff //CHIP ID 146 #define MSIF_VE_CPU '1' //CPU 147 #define MSIF_VE_LIB_CODE {'V','E','_','_'} //Lib code 148 #define MSIF_VE_LIBVER {'0','1'} //LIB version 149 #define MSIF_VE_BUILDNUM {'1','4'} //Build Number 150 #define MSIF_VE_CHANGELIST {'0','0','6','8','8','5','4','7'} //P4 ChangeList Number 151 //#define MSIF_OS '0' //OS 152 153 #define VE_DRV_VERSION /* Character String for DRV/API version */ \ 154 MSIF_VE_TAG, /* 'MSIF' */ \ 155 MSIF_VE_CLASS, /* '00' */ \ 156 MSIF_VE_CUS, /* 0x0000 */ \ 157 MSIF_VE_MOD, /* 0x0000 */ \ 158 MSIF_VE_CHIP, \ 159 MSIF_VE_CPU, \ 160 MSIF_VE_LIB_CODE, /* IP__ */ \ 161 MSIF_VE_LIBVER, /* 0.0 ~ Z.Z */ \ 162 MSIF_VE_BUILDNUM, /* 00 ~ 99 */ \ 163 MSIF_VE_CHANGELIST, /* CL# */ \ 164 MSIF_OS 165 166 /// version of structure 'MS_VE_VECAPTURESTATE' of current VE lib 167 #define VE_VECAPTURESTATE_VERSION 0 //Version number for compatibility with AP and VE driver 168 #define VE_INPUTSRC_INFO_VERSION 0 169 #define VE_INITDATA_VERSION 0 170 171 //------------------------------------------------------------------------------------------------- 172 // Type and Structure 173 //------------------------------------------------------------------------------------------------- 174 /// Result of VE function 175 typedef enum _VE_Result 176 { 177 E_VE_NOT_SUPPORT = -1, 178 E_VE_FAIL = 0, 179 E_VE_OK = 1, 180 E_VE_TIMEOUT, 181 E_VE_QUEUE_FULL, 182 E_VE_BUSY 183 } VE_Result; 184 185 /// definition of video system 186 typedef enum 187 { 188 MS_VE_NTSC, ///< NTSC 189 MS_VE_NTSC_443, ///< NTSC443 190 MS_VE_NTSC_J, ///< NTSC_J 191 MS_VE_PAL_M, ///< PAL_M 192 MS_VE_PAL_N, ///< PAL_N 193 MS_VE_PAL_NC, ///< PAL_Nc 194 MS_VE_PAL, ///< PAL_B 195 MS_VE_SECAM, ///< SECAM 196 MS_VE_VIDEOSYS_NUM, 197 } MS_VE_VIDEOSYS; 198 199 typedef enum 200 { 201 MS_VE_LAYER_NONE = 0, ///<0: VE LAYER NONE 202 MS_VE_LAYER_FRAME_VIDEO_MUX1_MUX2, ///<1: FrameColor->Video->osd ->osd1 203 MS_VE_LAYER_FRAME_VIDEO_MUX2_MUX1, ///<2: FrameColor->Video->osd1 ->osd 204 MS_VE_LAYER_FRAME_MUX1_VIDEO_MUX2, ///<3: FrameColor->osd ->Video->osd1 205 MS_VE_LAYER_FRAME_MUX1_MUX2_VIDEO, ///<4: FrameColor->osd ->osd1 ->Video 206 MS_VE_LAYER_FRAME_MUX2_VIDEO_MUX1, ///<5: FrameColor>osd1 ->Video->osd 207 MS_VE_LAYER_FRAME_MUX2_MUX1_VIDEO, ///<6: FrameColor->osd1 ->osd->Video 208 MS_VE_LAYER_RESERVED, 209 } MS_VE_OSD_LAYER_SEL; 210 211 /// VE cap's capability 212 typedef struct 213 { 214 MS_BOOL bNTSC; 215 MS_BOOL bPAL; 216 MS_BOOL bVESupported; ///< supported VE or not 217 } VE_Caps; 218 219 /// VE extented capability: for STB chips, not all chips support up-scaling or 220 /// crop 221 typedef struct 222 { 223 MS_BOOL bSupport_UpScale; 224 MS_BOOL bSupport_CropMode; 225 } MS_VE_Ext_Cap; 226 227 /// VE driver info. 228 typedef struct DLL_PACKED 229 { 230 VE_Caps stCaps; 231 } VE_DrvInfo; 232 233 /// VE DRV status 234 typedef struct DLL_PACKED 235 { 236 MS_VE_VIDEOSYS VideoSystem; // video std of output signal 237 MS_U16 u16H_CapStart; 238 MS_U16 u16H_CapSize; 239 MS_U16 u16V_CapStart; 240 MS_U16 u16V_CapSize; 241 242 } VE_DrvStatus; 243 244 typedef struct 245 { 246 MS_U8* pVE_TBL; 247 MS_U8* pVE_Coef_TBL; 248 MS_U8* pVBI_TBL; 249 MS_BOOL bvtotal_525; 250 MS_BOOL bPALSwitch; 251 MS_BOOL bPALout; 252 }MS_VE_Out_VideoSYS, *PMS_VE_Out_VideoSYS; 253 254 /// type of output destination for TV encoder 255 typedef enum 256 { 257 MS_VE_DEST_NONE = 0, 258 MS_VE_DEST_SCART, ///< output destination is SCART 259 MS_VE_DEST_CVBS, ///< output destination is CVBS 260 MS_VE_DEST_SVIDEO, ///< output destination is S-Video 261 MS_VE_DEST_YPBPR, ///< output destination is YPbPr 262 MS_VE_DEST_NUM, 263 } MS_VE_OUTPUT_DEST_TYPE; 264 265 /// type of input source for TV encoder 266 typedef enum 267 { 268 MS_VE_SRC_DTV = 0x00, ///< input source is DTV 269 MS_VE_SRC_ATV = 0x01, ///< input source is ATV 270 MS_VE_SRC_CVBS0 = 0x02, ///< input source is CVBS0 271 MS_VE_SRC_CVBS1 = 0x03, ///< input source is CVBS1 272 MS_VE_SRC_CVBS2 = 0x04, ///< input source is CVBS2 273 MS_VE_SRC_CVBS3 = 0x05, ///< input source is CVBS3 274 MS_VE_SRC_SVIDEO = 0x06, ///< input source is SVIDEO 275 MS_VE_SRC_DSUB = 0x07, ///< input source is DSUB 276 MS_VE_SRC_COMP = 0x08, ///< input source is COMP 277 MS_VE_SRC_HDMI_A = 0x09, ///< input source is COMP 278 MS_VE_SRC_HDMI_B = 0x0A, ///< input source is COMP 279 MS_VE_SRC_HDMI_C = 0x0B, ///< input source is COMP 280 MS_VE_SRC_MAIN = 0x0C, ///< input source is from main window 281 MS_VE_SRC_SUB = 0x0D, ///< input source is from sub window 282 MS_VE_SRC_SCALER = 0x0E, ///< input source is scaler op2 283 MS_VE_SRC_DI = 0x0F, ///< input source is DI 284 MS_VE_SRC_BT656 = 0x10, ///< input source is BT656 285 MS_VE_SRC_DTV_FROM_MVOP = 0x11, ///< input source is DTV but from MVOP 286 MS_VE_SRC_DNR = 0x12, ///< input source is DNR 287 MS_VE_SRC_NONE = 0xFF, 288 }MS_VE_INPUT_SRC_TYPE; 289 290 typedef struct 291 { 292 MS_U32 PreHScalingRatio; 293 MS_U32 PreVScalingRatio; 294 MS_U32 PostHScalingRatio; 295 MS_U32 PostVScalingRatio; 296 }MS_VE_Backup_Reg, *PMS_VE_Backup_Reg; 297 298 /// status of switchinging output destination 299 typedef enum 300 { 301 MS_VE_SWITCH_DST_SUCCESS, ///< success 302 MS_VE_SWITCH_DST_INVALID_COMBINATION, ///< invalid combination 303 MS_VE_SWITCH_DST_INVALID_PARAM, ///< invalid parameter 304 MS_VE_SWITCH_DST_FAIL, ///< fail 305 }MS_SWITCH_VE_DST_STATUS; 306 307 308 /// VE output Type 309 typedef enum 310 { 311 MS_VE_OUT_CCIR656, ///< output signal is CCIR656 312 MS_VE_OUT_TVENCODER,///< output signal from TVEncoder 313 MS_VE_OUT_CAPTURE,///< output signal from VE Capture 314 }MS_VE_OUT_TYPE; 315 316 typedef struct DLL_PACKED 317 { 318 MS_U16 u16Width; 319 MS_U16 u16height; 320 MS_PHY u32MiuBaseAddr; 321 MS_U32 u32MemSize; 322 MS_BOOL bVECapture; ///< TRUE/FALSE, enable/disable VE capture 323 }MS_VE_Output_CAPTURE, *PMS_VE_Output_CAPTURE; 324 325 /// the information of switching ouput destination for TV encoder 326 typedef struct 327 { 328 MS_VE_OUTPUT_DEST_TYPE OutputDstType; ///< type of output destination 329 MS_SWITCH_VE_DST_STATUS Status; ///< the returning status of switching output destination 330 }MS_Switch_VE_Dest_Info, *PMS_Switch_VE_Dest_Info; 331 332 typedef enum 333 { 334 MS_VE_HMirrorMode, //H mirror 335 MS_VE_VMirrorMode, //V mirror 336 MS_VE_HVBothMirrorMode, //HV mirror 337 MS_VE_NoneMirror, 338 }MS_VE_MirrorStatus; 339 340 /// status of switchinging input source 341 typedef enum 342 { 343 MS_VE_SWITCH_SRC_SUCCESS, ///< success 344 MS_VE_SWITCH_SRC_INVALID_PARAM, ///< invalid parameter 345 MS_VE_SWITCH_SRC_FAIL, ///< fail 346 }MS_SWITCH_VE_SRC_STATUS; 347 348 /// the information of switching output destination for TV encoder 349 typedef struct 350 { 351 MS_VE_INPUT_SRC_TYPE InputSrcType; ///< type of input source 352 MS_SWITCH_VE_SRC_STATUS Status; ///< the returning status of switching input source 353 }MS_Switch_VE_Src_Info, *PMS_Switch_VE_Src_Info; 354 355 typedef struct 356 { 357 MS_U16 u16Version; //< Version number for this structure 358 MS_VE_INPUT_SRC_TYPE eInputSrcType; ///< type of input source for Video encoder 359 MS_VE_INPUT_SRC_TYPE eInputSrcOfMixedSrc; // The real input source for mixed "InputSrcType" of VE, 360 // eg. Real InputSrc of "MS_VE_SRC_MAIN", "MS_VE_SRC_SUB", "MS_VE_SRC_SCALER" etc. 361 }MS_VE_InputSrc_Info, *PMS_VE_InputSrc_Info; 362 363 /// output control for VE 364 typedef struct 365 { 366 MS_BOOL bEnable; ///< TRUE/FALSE, enable/disable VE 367 MS_VE_OUT_TYPE OutputType; ///< VE output type 368 }MS_VE_Output_Ctrl, *PMS_VE_Output_Ctrl; 369 370 /// VE set mode type 371 typedef struct DLL_PACKED 372 { 373 MS_U16 u16H_CapStart; 374 MS_U16 u16H_CapSize; 375 MS_U16 u16V_CapStart; 376 MS_U16 u16V_CapSize; 377 MS_U16 u16H_SC_CapStart; 378 MS_U16 u16H_SC_CapSize; 379 MS_U16 u16V_SC_CapStart; 380 MS_U16 u16V_SC_CapSize; 381 MS_U16 u16InputVFreq; 382 MS_BOOL bHDuplicate; 383 MS_BOOL bSrcInterlace; 384 }MS_VE_Set_Mode_Type; 385 386 //VE_ApiStatus 387 typedef struct 388 { 389 PMS_VE_Output_Ctrl output_ctrl; 390 MS_Switch_VE_Src_Info src_info; 391 MS_Switch_VE_Dest_Info dst_info; 392 }MS_VE_ApiStatus; 393 394 /// Define Window position and size attribute 395 typedef struct 396 { 397 MS_U16 x; ///<start x of the window 398 MS_U16 y; ///<start y of the window 399 MS_U16 width; ///<width of the window 400 MS_U16 height; ///<height of the window 401 } MS_VE_WINDOW_TYPE; 402 403 //Display information 404 typedef struct DLL_PACKED 405 { 406 MS_U32 VDTOT; //Output vertical total 407 MS_U32 DEVST; //Output DE vertical start 408 MS_U32 DEVEND;//Output DE Vertical end 409 MS_U32 HDTOT;// Output horizontal total 410 MS_U32 DEHST; //Output DE horizontal start 411 MS_U32 DEHEND;// Output DE horizontal end 412 MS_BOOL bInterlaceMode; 413 } MS_VE_DST_DispInfo; 414 415 //VE register bank 416 typedef enum 417 { 418 MS_VE_REG_BANK_3B, 419 MS_VE_REG_BANK_3E, 420 MS_VE_REG_BANK_3F, 421 } MS_VE_REG_BANK; 422 423 //External Info 424 typedef struct 425 { 426 //op to ve timing 427 MS_U16 u16VttIn; 428 MS_U16 u16HttIn; 429 MS_U16 u16HdeIn; 430 MS_U16 u16VdeIn; 431 432 MS_U16 u16Vde_St; 433 MS_U16 u16Hde_St; 434 435 }MS_VE_PLL_InCfg; 436 437 //VE customer scaling setting 438 typedef struct DLL_PACKED 439 { 440 MS_U16 u16HScalingsrc; ///< H Source size for VE scaling 441 MS_U16 u16HScalingdst;///< H Dest size for VE scaling 442 MS_U16 u16VScalingsrc;///< V Source size for VE scaling 443 MS_U16 u16VScalingdst;///< V Dest size for VE scaling 444 MS_BOOL bHCusScalingEnable; ///< Enable/Disable H customer scaling 445 MS_BOOL bVCusScalingEnable; ///< Enable/Disable V customer scaling 446 }MS_VE_CusScalingInfo, *PMS_VE_CusScalingInfo; 447 448 //Structure AP use 449 typedef struct 450 { 451 MS_U16 u16Version; //< Version number for this structure 452 MS_U16 u16Length; //< Length of this structure, unit: byte 453 MS_BOOL bEnable; //< InOut, VE capture enable state 454 MS_U8 u8FrameCount; //< Out, Current captured frame number,value range: 0~3 455 MS_U8 u8Result; //< Out, Function return status 456 }MS_VE_VECAPTURESTATE, *PMS_VE_VECAPTURESTATE; 457 458 #ifdef UFO_VE_INITEX 459 /// Define the initial data for VE 460 typedef struct 461 { 462 // Version control 463 MS_U32 u32VEInitData_Version; ///<Version of current structure. Please always set to "VE_INIT_VERSION" as input 464 MS_U16 u16VEInitData_Length; ///<Length of this structure, u16VEInitData_Length=sizeof(VE_INITDATA) 465 // frame buffer related 466 MS_PHYADDR phyMIUAddress; ///<VE frame buffer start address, absolute without any alignment 467 MS_PHYADDR phyMIUSize; ///<VE window frame buffer size, the unit is BYTES 468 } VE_INITDATA; 469 #endif 470 471 //------------------------------------------------------------------------------------------------- 472 // Function and Variable 473 //------------------------------------------------------------------------------------------------- 474 //------------------------------------------------------------------------------------------------- 475 /// Description : Show the VE driver version 476 /// @ingroup VE_INFO 477 /// @param ppVersion \b Out: Library version string 478 /// @return @ref VE_Result 479 //------------------------------------------------------------------------------------------------- 480 VE_Result MDrv_VE_GetLibVer(const MSIF_Version **ppVersion); 481 482 //------------------------------------------------------------------------------------------------- 483 /// Description : Get VE Information 484 /// @ingroup VE_INFO 485 /// @return @ref VE_DrvInfo return the VE information in this member 486 //------------------------------------------------------------------------------------------------- 487 const VE_DrvInfo * MDrv_VE_GetInfo(void); 488 489 //------------------------------------------------------------------------------------------------- 490 /// Description : Get VE Status 491 /// @ingroup VE_INFO 492 /// @param pDrvStatus \b OUT: store the status 493 /// @return @ref VE_Result 494 //------------------------------------------------------------------------------------------------- 495 VE_Result MDrv_VE_GetStatus(VE_DrvStatus *pDrvStatus); 496 497 //------------------------------------------------------------------------------------------------- 498 /// Description : Set VE debug memesage level 499 /// @ingroup VE_INFO 500 /// @param level \b IN: the debug meseage level 501 /// @return None 502 //------------------------------------------------------------------------------------------------- 503 void MDrv_VE_SetDbgLevel(MS_U16 level); 504 505 //------------------------------------------------------------------------------------------------- 506 /// Description : Get VE capability that support which standard 507 /// @ingroup VE_INFO 508 /// @param pCaps \b OUT: the standard that VE support 509 /// @return None 510 //------------------------------------------------------------------------------------------------- 511 void MDrv_VE_GetCaps(VE_Caps* pCaps); 512 513 //------------------------------------------------------------------------------ 514 /// Description : Set the input source of video encoder 515 /// @ingroup VE_ToBeModified 516 /// @param -pSwitchInfo \b IN/OUT: the information of switching input destination of TV encodeer 517 /// @return None 518 //------------------------------------------------------------------------------ 519 void MDrv_VE_SwitchInputSource(PMS_Switch_VE_Src_Info pSwitchInfo); 520 521 //------------------------------------------------------------------------------ 522 /// Description: Extended API for set the input source of video encoder(To Expand&Replace MDrv_VE_SwitchInputSource) 523 /// @ingroup VE_EEATURE 524 /// @param -pSwitchInfo \b IN/OUT: the information of switching input destination of TV encodeer 525 /// @return @ref MS_SWITCH_VE_SRC_STATUS 526 //------------------------------------------------------------------------------ 527 MS_SWITCH_VE_SRC_STATUS MDrv_VE_SetInputSource(PMS_VE_InputSrc_Info pInputSrcInfo); 528 529 //------------------------------------------------------------------------------ 530 /// Description : Set the output destination of video encoder 531 /// @ingroup VE_FEATURE 532 /// None SCART CVBS SVIDEO YPbPr 533 /// None O O O O O 534 /// SCART O - X X X 535 /// CVBS O X - O O 536 /// S_VIDE O O X O - X 537 /// YPbPr O X O X - 538 /// 539 /// @param -pSwitchInfo \b IN/OUT: the information of switching output destination of TV encodeer 540 /// @return None 541 //------------------------------------------------------------------------------ 542 void MDrv_VE_SwitchOuputDest(PMS_Switch_VE_Dest_Info pSwitchInfo); 543 544 //------------------------------------------------------------------------------ 545 /// Description : Control the output of video encoder 546 /// @ingroup VE_FEATURE 547 /// @param -pOutputCtrl \b IN: the control information of VE 548 /// @return none 549 //------------------------------------------------------------------------------ 550 void MDrv_VE_SetOutputCtrl(PMS_VE_Output_Ctrl pOutputCtrl); 551 552 //------------------------------------------------------------------------------ 553 /// Description : Set the output video standard of video encoder 554 /// @ingroup VE_FEATURE 555 /// @param -VideoSystem \b IN: the video standard 556 /// @return TRUE: supported and success, FALSE: unsupported or unsuccess 557 //------------------------------------------------------------------------------ 558 MS_BOOL MDrv_VE_SetOutputVideoStd(MS_VE_VIDEOSYS VideoSystem); 559 560 //------------------------------------------------------------------------------ 561 /// Description : Load customized setting table for VE 562 /// User can load customized table in initialize function, then enable it. 563 /// Driver will apply customized table setting when MDrv_VE_SetOutputVideoStd 564 /// Table using sample: 565 /// MS_U8 pPALTable[12] = 566 /// {0xAA,0xBB,0xCC,0xDD, => add one customized setting. format: {bank_H, bank_L, 8-bit address, value,} 567 /// 0xFF,0xFF,0xFF,0xFF} => must set 0xFF,0xFF,0xFF,0xFF for end of table command setting 568 /// Note: Users set value which want to be changed only. 569 /// @ingroup VE_FEATURE 570 /// @param -VideoSystem \b IN: the video standard 571 /// @param -pTbl \b IN: pointer to the table 572 /// @return TRUE: supported and success, FALSE: unsupported or unsuccess 573 //------------------------------------------------------------------------------ 574 MS_BOOL MDrv_VE_SetCusTable(MS_VE_VIDEOSYS VideoSystem, MS_U8* pTbl); 575 576 //------------------------------------------------------------------------------ 577 /// Description : Enable/Disable customized table 578 /// @ingroup VE_FEATURE 579 /// @param -bEnable \b IN: Enable/Disable customized table 580 //------------------------------------------------------------------------------ 581 void MDrv_VE_EnableCusTable(MS_BOOL bEnable); 582 583 //------------------------------------------------------------------------------ 584 /// Description : Power on VE 585 /// @ingroup VE_ToBeRemove 586 /// @return none 587 //------------------------------------------------------------------------------ 588 void MDrv_VE_PowerOn(void); 589 //------------------------------------------------------------------------------ 590 /// Description : Power off VE 591 /// @ingroup VE_ToBeRemove 592 /// @return none 593 //------------------------------------------------------------------------------ 594 void MDrv_VE_PowerOff(void); 595 596 //------------------------------------------------------------------------------ 597 /// Description : Set RIU Base 598 /// @ingroup VE_FEATURE 599 /// @return TRUE: success, FALSE: unsuccess 600 //------------------------------------------------------------------------------ 601 MS_BOOL MDrv_VE_SetIOMapBase(void); 602 603 //------------------------------------------------------------------------------ 604 /// Description : Initiate VE 605 /// @ingroup VE_INIT 606 /// @param[in] u32MIUAddress \b IN: The address reserved for VE 607 /// @return none 608 //------------------------------------------------------------------------------ 609 #if defined(UFO_PUBLIC_HEADER_700) 610 void MDrv_VE_Init(MS_PHY u32MIUAddress); 611 #else 612 void MDrv_VE_Init(MS_PHYADDR u32MIUAddress); 613 #endif 614 615 #ifdef UFO_VE_INITEX 616 //------------------------------------------------------------------------------ 617 /// Description : Extended interface to initiate VE with initial parameters 618 /// @ingroup VE_INIT 619 /// @param[in] pVE_InitData \b IN: VE init data 620 /// @return none 621 //------------------------------------------------------------------------------ 622 VE_Result MDrv_VE_InitEx(VE_INITDATA *pVE_InitData); 623 #endif 624 625 //------------------------------------------------------------------------------ 626 /// Description : Get VE parameter (config) 627 /// @ingroup VE_FEATURE 628 /// @param[in] pMIUAddress \b IN: point to VE miu address 629 /// @return TRUE: success, FALSE: unsuccess 630 //------------------------------------------------------------------------------ 631 #if defined(UFO_PUBLIC_HEADER_700) 632 MS_BOOL SYMBOL_WEAK MDrv_VE_GetConfig(MS_PHY *pMIUAddress); 633 #else 634 MS_BOOL SYMBOL_WEAK MDrv_VE_GetConfig(MS_PHYADDR *pMIUAddress); 635 #endif 636 637 //------------------------------------------------------------------------------ 638 /// Description : Exit VE 639 /// @ingroup VE_FEATURE 640 /// @return TRUE: success, FALSE: unsuccess 641 //------------------------------------------------------------------------------ 642 MS_BOOL MDrv_VE_Exit(void); 643 644 //------------------------------------------------------------------------------ 645 /// Description : Set Wild-screen signal 646 /// @ingroup VE_FEATURE 647 /// @param -bEn \b IN: Enable/Disable WSS 648 /// @param -u16WSSData \b IN: The WSS data 649 /// @return none 650 //------------------------------------------------------------------------------ 651 void MDrv_VE_SetWSSData(MS_BOOL bEn, MS_U16 u16WSSData); 652 653 //------------------------------------------------------------------------------ 654 /// Description : Get Wild-screen signal data 655 /// @ingroup VE_FEATURE 656 /// @return @ref MS_U16 retun the data of WSS 657 //------------------------------------------------------------------------------ 658 MS_U16 MDrv_VE_GetWSSData(void); 659 660 //------------------------------------------------------------------------------ 661 /// Description : VE Setmode. Configurate VE for CVBS out. 662 /// @ingroup VE_FEATURE 663 /// @param[in] pVESetMode \b IN: The parameter for VE 664 /// @return none 665 //------------------------------------------------------------------------------ 666 void MDrv_VE_SetMode(MS_VE_Set_Mode_Type * pVESetMode); 667 668 //------------------------------------------------------------------------------ 669 /// Description : Output black screen from VE. This function is not for disabling VE. 670 /// @ingroup VE_FEATURE 671 /// @param[in] pVESetMode \b IN: enable or disable the black screen 672 /// @return none 673 //------------------------------------------------------------------------------ 674 void MDrv_VE_SetBlackScreen(MS_BOOL bEn); 675 676 //------------------------------------------------------------------------------ 677 /// Description : Return true if VE output black video right now. 678 /// @ingroup VE_FEATURE 679 /// @return @ref MS_BOOL 680 //------------------------------------------------------------------------------ 681 MS_BOOL MDrv_VE_IsBlackScreenEnabled(void); 682 683 //------------------------------------------------------------------------------ 684 /// Description : VE restart TVE to read data from TT buffer 685 /// @ingroup VE_FEATURE 686 /// @param[in] bEnable \b IN: enable or disable the TTX 687 /// @return none 688 //------------------------------------------------------------------------------ 689 void MDrv_VE_EnableTtx(MS_BOOL bEnable); 690 691 #if defined(UFO_PUBLIC_HEADER_500_3)||defined(UFO_PUBLIC_HEADER_700) 692 //------------------------------------------------------------------------------ 693 /// Description : VE set TTx buffer address 694 /// @ingroup VE_FEATURE 695 /// @param[in] u32StartAddr \b IN: Start of the Memory address that store TTX 696 /// @param[in] u32Size \b IN: the size of store the TTX data 697 /// @return none 698 //------------------------------------------------------------------------------ 699 void MDrv_VE_SetTtxBuffer(MS_PHY phyStartAddr, MS_U32 u32Size); 700 #else 701 //------------------------------------------------------------------------------ 702 /// Description : VE set TTx buffer address 703 /// @ingroup VE_FEATURE 704 /// @param[in] u32StartAddr \b IN: Start of the Memory address that store TTX 705 /// @param[in] u32Size \b IN: the size of store the TTX data 706 /// @return none 707 //------------------------------------------------------------------------------ 708 void MDrv_VE_SetTtxBuffer(MS_U32 u32StartAddr, MS_U32 u32Size); 709 #endif 710 711 //------------------------------------------------------------------------------ 712 /// Description : VE clear TT buffer read done status 713 /// @ingroup VE_FEATURE 714 /// @return none 715 //------------------------------------------------------------------------------ 716 void MDrv_VE_ClearTtxReadDoneStatus(void); 717 718 //------------------------------------------------------------------------------ 719 /// Description : VE TT buffer read done status 720 /// @ingroup VE_FEATURE 721 /// @return TRUE/FALSE 722 //------------------------------------------------------------------------------ 723 MS_BOOL MDrv_VE_GetTtxReadDoneStatus(void); 724 725 //------------------------------------------------------------------------------ 726 /// Description : VE Set VBI TT active Lines 727 /// @ingroup VE_FEATURE 728 /// @param[in] u8LinePerField \b IN: TTX active line 729 /// @return none 730 //------------------------------------------------------------------------------ 731 void MDrv_VE_SetVbiTtxActiveLines(MS_U8 u8LinePerField); 732 733 //------------------------------------------------------------------------------ 734 /// Description : VE Set VBI TT active Lines by the given bitmap 735 /// @ingroup VE_FEATURE 736 /// @param <IN>\b u32Bitmap: a bitmap that defines whick physical lines the teletext lines are to be inserted. 737 /// @return none 738 //------------------------------------------------------------------------------ 739 void MDrv_VE_SetVbiTtxActiveLinesBitmap(MS_U32 u32Bitmap); 740 741 //------------------------------------------------------------------------------ 742 /// Description : VE Set VBI ttx active line 743 /// @ingroup VE_FEATURE 744 /// @param <IN>\b odd_start: odd page start line 745 /// @param <IN>\b odd_end: odd page end line 746 /// @param <IN>\b even_start: even page start line 747 /// @param <IN>\b even_end: even page end line 748 /// @return none 749 //------------------------------------------------------------------------------ 750 void MDrv_VE_SetVbiTtxRange(MS_U16 odd_start, MS_U16 odd_end, 751 MS_U16 even_start, MS_U16 enen_end); 752 //------------------------------------------------------------------------------ 753 /// Description : VE Set VBI CC 754 /// @ingroup VE_FEATURE 755 /// @param[in] bEnable \b IN: enable or disable the CC 756 /// @return none 757 //------------------------------------------------------------------------------ 758 void MDrv_VE_EnableCcSw(MS_BOOL bEnable); 759 760 //------------------------------------------------------------------------------ 761 /// Description : VE Set VBI CC active line 762 /// @ingroup VE_FEATURE 763 /// @param <IN>\b odd_start: odd page start line 764 /// @param <IN>\b odd_end: odd page end line 765 /// @param <IN>\b even_start: even page start line 766 /// @param <IN>\b even_end: even page end line 767 /// @return none 768 //------------------------------------------------------------------------------ 769 void MDrv_VE_SetCcRange(MS_U16 odd_start, MS_U16 odd_end, MS_U16 even_start, MS_U16 enen_end); 770 771 //------------------------------------------------------------------------------ 772 /// Description : VE Set VBI CC data 773 /// @ingroup VE_FEATURE 774 /// @param <IN>\b bIsOdd: odd field use 775 /// @param <IN>\b data: the CC data 776 /// @return none 777 //------------------------------------------------------------------------------ 778 void MDrv_VE_SendCcData(MS_BOOL bIsOdd, MS_U16 data); 779 780 //------------------------------------------------------------------------------ 781 /// Description : VE Set display windows 782 /// @ingroup VE_FEATURE 783 /// @param <IN>\b stDispWin: the info of the display window 784 /// @return none 785 //------------------------------------------------------------------------------ 786 void MDrv_VE_set_display_window(MS_VE_WINDOW_TYPE stDispWin); 787 788 //------------------------------------------------------------------------------ 789 /// Description : VE Set output with Frame Color 790 /// @ingroup VE_FEATURE 791 /// @param <IN>\b u32aRGB: the value of frame color 792 /// @return none 793 //------------------------------------------------------------------------------ 794 VE_Result MDrv_VE_SetFrameColor(MS_U32 u32aRGB); 795 796 //------------------------------------------------------------------------------ 797 /// Description : VE Set output with OSD 798 /// @ingroup VE_FEATURE 799 /// @param <IN>\b bEnable: enable or disable the OSD 800 /// @return none 801 //------------------------------------------------------------------------------ 802 void MDrv_VE_SetOSD(MS_BOOL bEnable); 803 804 //------------------------------------------------------------------------------ 805 /// Description : Set VE OSD Layer 806 /// @ingroup VE_FEATURE 807 /// @param <IN>\b eVideoOSDLayer: set the OSD layer 808 /// @return none 809 //------------------------------------------------------------------------------ 810 VE_Result MDrv_VE_Set_OSDLayer(MS_VE_OSD_LAYER_SEL eVideoOSDLayer); 811 812 //------------------------------------------------------------------------------ 813 /// Description: Get VE OSD Layer 814 /// @ingroup VE_FEATURE 815 /// @return @ref MS_VE_OSD_LAYER_SEL 816 //------------------------------------------------------------------------------ 817 MS_VE_OSD_LAYER_SEL MDrv_VE_Get_OSDLayer(void); 818 819 //------------------------------------------------------------------------------ 820 /// Description: Set VE Video Alpha 821 /// @ingroup VE_FEATURE 822 /// @param <IN>\b u8Val: set the video alpha value 823 /// @return @ref VE_Result 824 //------------------------------------------------------------------------------ 825 VE_Result MDrv_VE_Set_VideoAlpha(MS_U8 u8Val); 826 827 //------------------------------------------------------------------------------ 828 /// Description: Get VE Video Alpha 829 /// @ingroup VE_FEATURE 830 /// @param <OUT>\b pu8Val: pointer to the value 831 /// @return @ref VE_Result 832 //------------------------------------------------------------------------------ 833 VE_Result MDrv_VE_Get_VideoAlpha(MS_U8 *pu8Val); 834 835 //------------------------------------------------------------------------------ 836 /// Description: VE Set RGB In 837 /// @ingroup VE_FEATURE 838 /// @param <IN>\b bEnable: set the input is RGB or not 839 /// @return none 840 //------------------------------------------------------------------------------ 841 void MDrv_VE_SetRGBIn(MS_BOOL bEnable); 842 843 //------------------------------------------------------------------------------ 844 /// Description: VE Get output video standard 845 /// @ingroup VE_FEATURE 846 /// @return @ref MS_VE_VIDEOSYS 847 //------------------------------------------------------------------------------ 848 MS_VE_VIDEOSYS MDrv_VE_Get_Output_Video_Std(void); 849 850 //------------------------------------------------------------------------------ 851 /// Description: VE Set Capture Mode 852 /// @ingroup VE_FEATURE 853 /// @param <IN>\b bEnable: enable or disable the capture mode 854 /// @return none 855 //------------------------------------------------------------------------------ 856 void MDrv_VE_SetCaptureMode(MS_BOOL bEnable); 857 858 //------------------------------------------------------------------------------ 859 /// Description: VE Get Destination Information for GOP mixer 860 /// @param <OUT>\b pDstInfo: output DST display info 861 /// @param <IN>\b u32SizeofDstInfo: The size of DST display info 862 /// @return @ref MS_BOOL 863 //------------------------------------------------------------------------------ 864 MS_BOOL MApi_VE_GetDstInfo(MS_VE_DST_DispInfo *pDstInfo, MS_U32 u32SizeofDstInfo); 865 866 //------------------------------------------------------------------------------ 867 /// Description: VE Set Test pattern 868 /// @ingroup VE_FEATURE 869 /// @param <IN>\b bEnable: enable or disable the test pattern 870 /// @return none 871 //------------------------------------------------------------------------------ 872 void MDrv_VE_Set_TestPattern(MS_BOOL bEn); 873 874 //------------------------------------------------------------------------------ 875 /// Description: Write the VE register 876 /// @ingroup VE_FEATURE 877 /// @param <IN>\b VE_BK: select the VE bank 878 /// @param <IN>\b u32Reg: the register to be set 879 /// @param <IN>\b u16Val: set value 880 /// @param <IN>\b u16Mask: the mask value 881 /// @return none 882 //------------------------------------------------------------------------------ 883 void MApi_VE_W2BYTE_MSK(MS_VE_REG_BANK VE_BK, MS_U32 u32Reg, MS_U16 u16Val, MS_U16 u16Mask); 884 885 //------------------------------------------------------------------------------ 886 /// Description: Write the VE register 887 /// @ingroup VE_FEATURE 888 /// @param <IN>\b VE_BK: select the VE bank 889 /// @param <IN>\b u32Reg: the register to be read 890 /// @param <IN>\b u16Mask: the mask value 891 /// @return @ref MS_U16 892 //------------------------------------------------------------------------------ 893 MS_U16 MApi_VE_R2BYTE_MSK(MS_VE_REG_BANK VE_BK, MS_U32 u32Reg, MS_U16 u16Mask); 894 895 //------------------------------------------------------------------------------ 896 /// Description: VE Dump Table Interface 897 /// @ingroup VE_FEATURE 898 /// @param <IN>\b pVETable: pointer to the table 899 /// @param <IN>\b u8TableType: the type of table 900 /// @return none 901 //------------------------------------------------------------------------------ 902 void MDrv_VE_DumpTable(MS_U8 *pVETable, MS_U8 u8TableType); 903 904 //------------------------------------------------------------------------------ 905 /// Description: This routine set flag to mask register write for special case \n 906 /// e.g. MBoot to APP with logo display 907 /// @ingroup VE_FEATURE 908 /// @param <IN>\b bFlag: TRUE: Mask register write, FALSE: not Mask 909 /// @return @ref VE_Result 910 //------------------------------------------------------------------------------ 911 VE_Result MDrv_VE_DisableRegWrite(MS_BOOL bFlag); 912 913 //------------------------------------------------------------------------------ 914 /// Description: VE show internal color bar (test pattern) 915 /// @ingroup VE_FEATURE 916 /// @param <IN>\b bEnable: TRUE to enable color; false to disable color bar 917 /// @return None 918 //------------------------------------------------------------------------------ 919 void MDrv_VE_ShowColorBar(MS_BOOL bEnable); 920 921 //------------------------------------------------------------------------------ 922 /// Description: This routine set read/write addjustment to centralize VE display window.\n 923 /// Set the adjustment and it works after MDrv_VE_set_display_window() API is invoked. \n 924 /// @ingroup VE_FEATURE 925 /// @param <IN>\b s32WAddrAdjustment: the pixel units to adjust on write address 926 /// @param <IN>\b s32RAddrAdjustment: the pixel units to adjust on read address 927 /// @return @ref VE_Result 928 //------------------------------------------------------------------------------ 929 VE_Result MDrv_VE_AdjustPositionBase(MS_S32 s32WAddrAdjustment, MS_S32 s32RAddrAdjustment); 930 931 //------------------------------------------------------------------------------ 932 /// Description: In STB Chip, VE needs to set vepll to lock frame rate with HD Path.\n 933 /// @ingroup VE_FEATURE 934 /// @param <IN>\b pInCfg: Information of HD path 935 /// @param <IN>\b bEnable: enable/disable frame lock 936 /// @return @ref VE_Result 937 //------------------------------------------------------------------------------ 938 VE_Result MDrv_VE_SetFrameLock(MS_VE_PLL_InCfg *pInCfg, MS_BOOL bEnable); 939 940 //------------------------------------------------------------------------------ 941 /// Description: Provide the capability of Customer scaling for VE.\n 942 /// @ingroup VE_FEATURE 943 /// @param <IN>\b pstVECusScalingInfo : Src and Dest info for customer scaling, @ref MS_VE_CusScalingInfo 944 /// @return @ref VE_Result 945 //------------------------------------------------------------------------------ 946 VE_Result MDrv_VE_Set_Customer_Scaling(MS_VE_CusScalingInfo *pstVECusScalingInfo); 947 //------------------------------------------------------------------------------ 948 /// Description: MDrv_VE_set_crop_window, set up crop window (crop video frame in MIU) 949 /// @ingroup VE_FEATURE 950 /// @param <IN>\b stCropWin: crop window 951 /// @return @ref VE_Result 952 //------------------------------------------------------------------------------ 953 VE_Result MDrv_VE_set_crop_window(MS_VE_WINDOW_TYPE stCropWin); 954 //------------------------------------------------------------------------------ 955 /// Description: VE be set display window (backend), after MIU 956 /// @ingroup VE_FEATURE 957 /// @param <IN>\b stDispWin: display window 958 /// @return @ref VE_Result 959 //------------------------------------------------------------------------------ 960 VE_Result MDrv_VE_set_be_display_window(MS_VE_WINDOW_TYPE stDispWin); 961 //------------------------------------------------------------------------------ 962 /// Description: MDrv_VE_Get_Ext_Caps: get VE extented capability 963 /// @ingroup VE_FEATURE 964 /// @param <OUT>\b cap: Get capbility 965 /// @return @ref VE_Result 966 //------------------------------------------------------------------------------ 967 VE_Result MDrv_VE_Get_Ext_Caps(MS_VE_Ext_Cap *cap); 968 //------------------------------------------------------------------------------ 969 /// Description: MDrv_VE_SetWindow, set crop window and display window in one API. 970 /// @ingroup VE_FEATURE 971 /// @argument: 972 /// @param <IN>\b stSrcWin: a pointer to MS_VE_WINDOW_TYPE - source window, depends on input size 973 /// @param <IN>\b stCropWin: a pointer to MS_VE_WINDOW_TYPE - crop window, depends on source window size 974 /// @param <IN>\b stDispWin: a pointer to MS_VE_WINDOW_TYPE - display window, depends on output size 975 /// @return @ref VE_Result 976 //------------------------------------------------------------------------------ 977 VE_Result MDrv_VE_SetWindow(MS_VE_WINDOW_TYPE *stSrcWin, MS_VE_WINDOW_TYPE *stCropWin, 978 MS_VE_WINDOW_TYPE *stDispWin); 979 980 //------------------------------------------------------------------------------ 981 /// Description: Init and config the VE capture 982 /// @ingroup VE_FEATURE 983 /// @param pVECapture \b IN : @ref PMS_VE_Output_CAPTURE 984 /// @return none 985 //------------------------------------------------------------------------------ 986 void MDrv_VE_InitVECapture(PMS_VE_Output_CAPTURE pVECapture); 987 988 //------------------------------------------------------------------------------ 989 /// Description: Enable VE capture 990 /// @ingroup VE_FEATURE 991 /// @param <IN>\b pstVECapState: a pointer to caputre state 992 /// @return @ref MS_BOOL 993 //------------------------------------------------------------------------------ 994 MS_BOOL MDrv_VE_EnaVECapture(PMS_VE_VECAPTURESTATE pstVECapState); 995 996 //------------------------------------------------------------------------------ 997 /// Description: Get VE capture state 998 /// @ingroup VE_FEATURE 999 /// @param <IN>\b pstVECapState: a pointer to get caputre state 1000 /// @return @ref MS_BOOL 1001 //------------------------------------------------------------------------------ 1002 MS_BOOL MDrv_VE_GetVECaptureState(PMS_VE_VECAPTURESTATE pstVECapState); 1003 1004 //------------------------------------------------------------------------------------------------- 1005 /// Description: Wait on the finish of specified frame: Check if the frame is captured, 1006 /// if Yes, return TRUE, otherwise sleep until the next Vsync ISR 1007 /// @ingroup VE_FEATURE 1008 /// @param <IN>\b pstVECapState: a pointer to caputre state 1009 /// @return @ref MS_BOOL 1010 //------------------------------------------------------------------------------------------------- 1011 MS_BOOL MDrv_VE_VECaptureWaitOnFrame(PMS_VE_VECAPTURESTATE pstVECapState); 1012 1013 //////////////////////////////////////////////////////////////////////////////// 1014 /// Description : the frame start is used to adjust output video (in pixel) 1015 /// @ingroup VE_FEATURE 1016 /// @param <IN> \b stSrcWin :source window, depends on input size 1017 /// @param <IN>\b pixel_offset : set pixel offset value 1018 /// @return @ref VE_Result 1019 //////////////////////////////////////////////////////////////////////////////// 1020 VE_Result MDrv_VE_Adjust_FrameStart(MS_VE_WINDOW_TYPE *stSrcWin,MS_S16 pixel_offset); 1021 1022 //------------------------------------------------------------------------------------------------- 1023 /// Description : Start or Stop to send WSS data on 525i system 1024 /// @ingroup VE_FEATURE 1025 /// @param <IN>\b bEn: enable/disable wss525 1026 /// @param <IN>\b u32WSSData: 20-bit wss data includes 14 bits of data and 6 bits of CRC 1027 /// @return @ref VE_Result 1028 //------------------------------------------------------------------------------------------------- 1029 VE_Result MDrv_VE_SetWSS525Data(MS_BOOL bEn, MS_U32 u32WSSData); 1030 1031 //------------------------------------------------------------------------------------------------- 1032 /// Description : Get current wss data 1033 /// @ingroup VE_FEATURE 1034 /// @return 32-bit wss data, it includes 14 bits of data and 6 bits of CRC in lower 20 bits 1035 //------------------------------------------------------------------------------------------------- 1036 MS_U32 MDrv_VE_GetWSS525Data(void); 1037 1038 //------------------------------------------------------------------------------------------------- 1039 /// @brief \b Function \b Name: MDrv_VE_OnOffWSS() 1040 /// @brief \b Function \b Description : Control VE WSS En/Disable 1041 /// @param ben enable/disable WSS 1042 /// @return None 1043 //------------------------------------------------------------------------------------------------- 1044 void MDrv_VE_OnOffWSS(MS_BOOL ben); 1045 1046 //------------------------------------------------------------------------------------------------- 1047 /// @brief \b Function \b Name: MDrv_VE_GetWSSStatus() 1048 /// @brief \b Function \b Description : Get VE WSS En/Disable 1049 /// @param void 1050 /// @return TRUE: Enable, FALSE: Disable 1051 //------------------------------------------------------------------------------------------------- 1052 MS_BOOL MDrv_VE_GetWSSStatus(void); 1053 1054 //------------------------------------------------------------------------------------------------- 1055 /// @brief \b Function \b Name: MDrv_VE_OnOffMV() 1056 /// @brief \b Function \b Description : Control VE Microvision En/Disable 1057 /// @param ben enable/disable Microvision 1058 /// @return None 1059 //------------------------------------------------------------------------------------------------- 1060 void MDrv_VE_OnOffMV(MS_BOOL ben); 1061 1062 //------------------------------------------------------------------------------------------------- 1063 /// @brief \b Function \b Name: MDrv_VE_GetMVStatus() 1064 /// @brief \b Function \b Description : Get VE Microvision En/Disable 1065 /// @param void 1066 /// @return TRUE: Enable, FALSE: Disable 1067 //------------------------------------------------------------------------------------------------- 1068 MS_BOOL MDrv_VE_GetMVStatus(void); 1069 1070 //------------------------------------------------------------------------------------------------- 1071 /// @brief \b Function \b Name: MDrv_VE_OnOffDCS() 1072 /// @brief \b Function \b Description : Control VE DCS En/Disable 1073 /// @param ben enable/disable DCS 1074 /// @return None 1075 //------------------------------------------------------------------------------------------------- 1076 void MDrv_VE_OnOffDCS(MS_BOOL ben); 1077 1078 //------------------------------------------------------------------------------------------------- 1079 /// @brief \b Function \b Name: MDrv_VE_GetDCSStatus() 1080 /// @brief \b Function \b Description : Get VE DCS En/Disable 1081 /// @param void 1082 /// @return TRUE: Enable, FALSE: Disable 1083 //------------------------------------------------------------------------------------------------- 1084 MS_BOOL MDrv_VE_GetDCSStatus(void); 1085 1086 //------------------------------------------------------------------------------------------------- 1087 /// Description : Set the state for supesend 1088 /// @ingroup VE_FEATURE 1089 /// @param <IN>\b u16PowerState: The state for suspend 1090 /// @return @ref MS_U32 , TRUE for success, false for fail 1091 //------------------------------------------------------------------------------------------------- 1092 MS_U32 MDrv_TVE_SetPowerState(EN_POWER_MODE u16PowerState); 1093 1094 #if defined(UFO_PUBLIC_HEADER_212) || defined(UFO_PUBLIC_HEADER_500_3) 1095 //------------------------------------------------------------------------------------------------- 1096 /// @brief \b Function \b Name: MDrv_VE_ReloadSetting() 1097 /// @brief \b Function \b Description : Do SW resetting do confirm all change are applied 1098 /// @param void 1099 /// 1100 /// @return @ref VE_Result 1101 //------------------------------------------------------------------------------------------------- 1102 VE_Result MDrv_VE_ReloadSetting(void); 1103 #endif 1104 1105 #ifdef UFO_PUBLIC_HEADER_212 1106 //------------------------------------------------------------------------------ 1107 /// @brief \b Function \b Name: MDrv_VE_Set_PreHSD_ScalingRatio 1108 /// @brief \b Function \b Description : Set HSD size and scaling factor 1109 /// @param u16In_Hsize input H size 1110 /// @param u16Out_Hsize output H size 1111 /// @param u16In_RatioHsize input H size for calculate scaling factor 1112 /// @param u16Out_RatioHsize output H size for calculate scaling factor 1113 /// 1114 /// @return @ref VE_Result 1115 //------------------------------------------------------------------------------ 1116 VE_Result MDrv_VE_Set_PreHSD_ScalingRatio(MS_U16 u16In_Hsize,MS_U16 u16Out_Hsize,MS_U16 u16In_RatioHsize,MS_U16 u16Out_RatioHsize); 1117 1118 //------------------------------------------------------------------------------ 1119 /// @brief \b Function \b Name: MDrv_VE_Set_PreVSD_ScalingRatio 1120 /// @brief \b Function \b Description : Set VSD size and scaling factor 1121 /// @param u16In_Vsize input V size 1122 /// @param u16Out_Vsize output V size 1123 /// @param u16In_RatioVsize input V size for calculate scaling factor 1124 /// @param u16Out_RatioVsize output V size for calculate scaling factor 1125 /// 1126 /// @return @ref VE_Result 1127 //------------------------------------------------------------------------------ 1128 VE_Result MDrv_VE_Set_PreVSD_ScalingRatio(MS_U16 u16In_Vsize,MS_U16 u16Out_Vsize,MS_U16 u16In_RatioVsize,MS_U16 u16Out_RatioVsize); 1129 1130 //------------------------------------------------------------------------------ 1131 /// @brief \b Function \b Name: MDrv_VE_Set_v_upscaling 1132 /// @brief \b Function \b Description : Set VSD size and scaling factor 1133 /// @param Benable enable/disable VSP 1134 /// @param u16In_Vsize input V size 1135 /// @param u16Out_Vsize output V size 1136 /// 1137 /// @return @ref VE_Result 1138 //------------------------------------------------------------------------------ 1139 VE_Result MDrv_VE_Set_v_upscaling(MS_BOOL Benable,MS_U16 u16In_Vsize,MS_U16 u16Out_Vsize); 1140 #endif 1141 1142 #ifdef __cplusplus 1143 } 1144 #endif 1145 1146 #endif // _DRVTVENCODER_H 1147