1*53ee8cc1Swenshuai.xi //<MStar Software> 2*53ee8cc1Swenshuai.xi //****************************************************************************** 3*53ee8cc1Swenshuai.xi // MStar Software 4*53ee8cc1Swenshuai.xi // Copyright (c) 2010 - 2012 MStar Semiconductor, Inc. All rights reserved. 5*53ee8cc1Swenshuai.xi // All software, firmware and related documentation herein ("MStar Software") are 6*53ee8cc1Swenshuai.xi // intellectual property of MStar Semiconductor, Inc. ("MStar") and protected by 7*53ee8cc1Swenshuai.xi // law, including, but not limited to, copyright law and international treaties. 8*53ee8cc1Swenshuai.xi // Any use, modification, reproduction, retransmission, or republication of all 9*53ee8cc1Swenshuai.xi // or part of MStar Software is expressly prohibited, unless prior written 10*53ee8cc1Swenshuai.xi // permission has been granted by MStar. 11*53ee8cc1Swenshuai.xi // 12*53ee8cc1Swenshuai.xi // By accessing, browsing and/or using MStar Software, you acknowledge that you 13*53ee8cc1Swenshuai.xi // have read, understood, and agree, to be bound by below terms ("Terms") and to 14*53ee8cc1Swenshuai.xi // comply with all applicable laws and regulations: 15*53ee8cc1Swenshuai.xi // 16*53ee8cc1Swenshuai.xi // 1. MStar shall retain any and all right, ownership and interest to MStar 17*53ee8cc1Swenshuai.xi // Software and any modification/derivatives thereof. 18*53ee8cc1Swenshuai.xi // No right, ownership, or interest to MStar Software and any 19*53ee8cc1Swenshuai.xi // modification/derivatives thereof is transferred to you under Terms. 20*53ee8cc1Swenshuai.xi // 21*53ee8cc1Swenshuai.xi // 2. You understand that MStar Software might include, incorporate or be 22*53ee8cc1Swenshuai.xi // supplied together with third party`s software and the use of MStar 23*53ee8cc1Swenshuai.xi // Software may require additional licenses from third parties. 24*53ee8cc1Swenshuai.xi // Therefore, you hereby agree it is your sole responsibility to separately 25*53ee8cc1Swenshuai.xi // obtain any and all third party right and license necessary for your use of 26*53ee8cc1Swenshuai.xi // such third party`s software. 27*53ee8cc1Swenshuai.xi // 28*53ee8cc1Swenshuai.xi // 3. MStar Software and any modification/derivatives thereof shall be deemed as 29*53ee8cc1Swenshuai.xi // MStar`s confidential information and you agree to keep MStar`s 30*53ee8cc1Swenshuai.xi // confidential information in strictest confidence and not disclose to any 31*53ee8cc1Swenshuai.xi // third party. 32*53ee8cc1Swenshuai.xi // 33*53ee8cc1Swenshuai.xi // 4. MStar Software is provided on an "AS IS" basis without warranties of any 34*53ee8cc1Swenshuai.xi // kind. Any warranties are hereby expressly disclaimed by MStar, including 35*53ee8cc1Swenshuai.xi // without limitation, any warranties of merchantability, non-infringement of 36*53ee8cc1Swenshuai.xi // intellectual property rights, fitness for a particular purpose, error free 37*53ee8cc1Swenshuai.xi // and in conformity with any international standard. You agree to waive any 38*53ee8cc1Swenshuai.xi // claim against MStar for any loss, damage, cost or expense that you may 39*53ee8cc1Swenshuai.xi // incur related to your use of MStar Software. 40*53ee8cc1Swenshuai.xi // In no event shall MStar be liable for any direct, indirect, incidental or 41*53ee8cc1Swenshuai.xi // consequential damages, including without limitation, lost of profit or 42*53ee8cc1Swenshuai.xi // revenues, lost or damage of data, and unauthorized system use. 43*53ee8cc1Swenshuai.xi // You agree that this Section 4 shall still apply without being affected 44*53ee8cc1Swenshuai.xi // even if MStar Software has been modified by MStar in accordance with your 45*53ee8cc1Swenshuai.xi // request or instruction for your use, except otherwise agreed by both 46*53ee8cc1Swenshuai.xi // parties in writing. 47*53ee8cc1Swenshuai.xi // 48*53ee8cc1Swenshuai.xi // 5. If requested, MStar may from time to time provide technical supports or 49*53ee8cc1Swenshuai.xi // services in relation with MStar Software to you for your use of 50*53ee8cc1Swenshuai.xi // MStar Software in conjunction with your or your customer`s product 51*53ee8cc1Swenshuai.xi // ("Services"). 52*53ee8cc1Swenshuai.xi // You understand and agree that, except otherwise agreed by both parties in 53*53ee8cc1Swenshuai.xi // writing, Services are provided on an "AS IS" basis and the warranty 54*53ee8cc1Swenshuai.xi // disclaimer set forth in Section 4 above shall apply. 55*53ee8cc1Swenshuai.xi // 56*53ee8cc1Swenshuai.xi // 6. Nothing contained herein shall be construed as by implication, estoppels 57*53ee8cc1Swenshuai.xi // or otherwise: 58*53ee8cc1Swenshuai.xi // (a) conferring any license or right to use MStar name, trademark, service 59*53ee8cc1Swenshuai.xi // mark, symbol or any other identification; 60*53ee8cc1Swenshuai.xi // (b) obligating MStar or any of its affiliates to furnish any person, 61*53ee8cc1Swenshuai.xi // including without limitation, you and your customers, any assistance 62*53ee8cc1Swenshuai.xi // of any kind whatsoever, or any information; or 63*53ee8cc1Swenshuai.xi // (c) conferring any license or right under any intellectual property right. 64*53ee8cc1Swenshuai.xi // 65*53ee8cc1Swenshuai.xi // 7. These terms shall be governed by and construed in accordance with the laws 66*53ee8cc1Swenshuai.xi // of Taiwan, R.O.C., excluding its conflict of law rules. 67*53ee8cc1Swenshuai.xi // Any and all dispute arising out hereof or related hereto shall be finally 68*53ee8cc1Swenshuai.xi // settled by arbitration referred to the Chinese Arbitration Association, 69*53ee8cc1Swenshuai.xi // Taipei in accordance with the ROC Arbitration Law and the Arbitration 70*53ee8cc1Swenshuai.xi // Rules of the Association by three (3) arbitrators appointed in accordance 71*53ee8cc1Swenshuai.xi // with the said Rules. 72*53ee8cc1Swenshuai.xi // The place of arbitration shall be in Taipei, Taiwan and the language shall 73*53ee8cc1Swenshuai.xi // be English. 74*53ee8cc1Swenshuai.xi // The arbitration award shall be final and binding to both parties. 75*53ee8cc1Swenshuai.xi // 76*53ee8cc1Swenshuai.xi //****************************************************************************** 77*53ee8cc1Swenshuai.xi //<MStar Software> 78*53ee8cc1Swenshuai.xi //////////////////////////////////////////////////////////////////////////////// 79*53ee8cc1Swenshuai.xi // 80*53ee8cc1Swenshuai.xi // Copyright (c) 2006-2008 MStar Semiconductor, Inc. 81*53ee8cc1Swenshuai.xi // All rights reserved. 82*53ee8cc1Swenshuai.xi // 83*53ee8cc1Swenshuai.xi // Unless otherwise stipulated in writing, any and all information contained 84*53ee8cc1Swenshuai.xi // herein regardless in any format shall remain the sole proprietary of 85*53ee8cc1Swenshuai.xi // MStar Semiconductor Inc. and be kept in strict confidence 86*53ee8cc1Swenshuai.xi // (��MStar Confidential Information��) by the recipient. 87*53ee8cc1Swenshuai.xi // Any unauthorized act including without limitation unauthorized disclosure, 88*53ee8cc1Swenshuai.xi // copying, use, reproduction, sale, distribution, modification, disassembling, 89*53ee8cc1Swenshuai.xi // reverse engineering and compiling of the contents of MStar Confidential 90*53ee8cc1Swenshuai.xi // Information is unlawful and strictly prohibited. MStar hereby reserves the 91*53ee8cc1Swenshuai.xi // rights to any and all damages, losses, costs and expenses resulting therefrom. 92*53ee8cc1Swenshuai.xi // 93*53ee8cc1Swenshuai.xi //////////////////////////////////////////////////////////////////////////////// 94*53ee8cc1Swenshuai.xi #ifndef _MHALTVENCODER_H 95*53ee8cc1Swenshuai.xi #define _MHALTVENCODER_H 96*53ee8cc1Swenshuai.xi 97*53ee8cc1Swenshuai.xi #ifdef __cplusplus 98*53ee8cc1Swenshuai.xi extern "C" 99*53ee8cc1Swenshuai.xi { 100*53ee8cc1Swenshuai.xi #endif 101*53ee8cc1Swenshuai.xi 102*53ee8cc1Swenshuai.xi #include "MsCommon.h" 103*53ee8cc1Swenshuai.xi 104*53ee8cc1Swenshuai.xi //------------------------------------------------------------------------------------------------- 105*53ee8cc1Swenshuai.xi // Macro and Define 106*53ee8cc1Swenshuai.xi //------------------------------------------------------------------------------------------------- 107*53ee8cc1Swenshuai.xi //Video Encoder Capability 108*53ee8cc1Swenshuai.xi #define VE_SUPPORTED TRUE 109*53ee8cc1Swenshuai.xi #define ENABLE_VE_SUBTITLE TRUE 110*53ee8cc1Swenshuai.xi //Feature for: ve support isr from TVS(VE Source), and HW will report current VE Write frame index 111*53ee8cc1Swenshuai.xi #define VE_TVS_ISR_SUPPORT TRUE 112*53ee8cc1Swenshuai.xi #define VE_SUPPORT_SOURCE_SCALER_OP 0 113*53ee8cc1Swenshuai.xi 114*53ee8cc1Swenshuai.xi //Feature: predownscaling before TVS 115*53ee8cc1Swenshuai.xi #define VE_PRESCALE_SUPPORT FALSE 116*53ee8cc1Swenshuai.xi 117*53ee8cc1Swenshuai.xi #define ENABLE_VE_FIELD_INV 1 118*53ee8cc1Swenshuai.xi 119*53ee8cc1Swenshuai.xi #define VE_DE_HEND_MASK 0x1FFF //0x3B13 120*53ee8cc1Swenshuai.xi #define VE_DE_VEND_MASK 0xFFF //0x3B15 121*53ee8cc1Swenshuai.xi 122*53ee8cc1Swenshuai.xi #define VE_MIU_DATA_LENGTH 128 123*53ee8cc1Swenshuai.xi #define BYTE_PER_WORD (VE_MIU_DATA_LENGTH/8) 124*53ee8cc1Swenshuai.xi 125*53ee8cc1Swenshuai.xi //VE customized table max size 126*53ee8cc1Swenshuai.xi #define VE_CUSTBL_MAX_SIZE 64 //4bytes * 16sets (include end of table) 127*53ee8cc1Swenshuai.xi 128*53ee8cc1Swenshuai.xi #define REG_CKG_VE_IN 0x1E38 129*53ee8cc1Swenshuai.xi #define CKG_VE_IN_GATED BIT(0) 130*53ee8cc1Swenshuai.xi #define CKG_VE_IN_INVERT BIT(1) 131*53ee8cc1Swenshuai.xi #define CKG_VE_IN_MASK (BIT(5) | BIT(4) | BIT(3) | BIT(2)) 132*53ee8cc1Swenshuai.xi #define CKG_VE_IN_CLK_ADC (0 << 2) 133*53ee8cc1Swenshuai.xi #define CKG_VE_IN_CLK_DVI (1 << 2) 134*53ee8cc1Swenshuai.xi #define CKG_VE_IN_CLK_VD (2 << 2) 135*53ee8cc1Swenshuai.xi #define CKG_VE_IN_CLK_MPEG0 (3 << 2) 136*53ee8cc1Swenshuai.xi #define CKG_VE_IN_1 (4 << 2) //IDclk2 for IP_MAIN 137*53ee8cc1Swenshuai.xi #define CKG_VE_IN_CLK_EXT_DI (5 << 2) 138*53ee8cc1Swenshuai.xi #define CKG_VE_IN_0 (6 << 2) //Sub MPEG0 139*53ee8cc1Swenshuai.xi #define CKG_VE_IN_0_ (7 << 2) //ODclk 140*53ee8cc1Swenshuai.xi #define CKG_VE_IN_DFT_LIVE (8 << 2) 141*53ee8cc1Swenshuai.xi #define CKG_VE_IN_CLK_DI (10 << 2) 142*53ee8cc1Swenshuai.xi 143*53ee8cc1Swenshuai.xi #define VE_NTSC_FRAME_SIZE ((MS_U32)(720ul * 480ul)*16/VE_MIU_DATA_LENGTH) // 720*480*16bits/128bits 144*53ee8cc1Swenshuai.xi #define VE_PAL_FRAME_SIZE ((MS_U32)(720ul * 576ul)*16/VE_MIU_DATA_LENGTH) // 720*576*16bits/128bits 145*53ee8cc1Swenshuai.xi 146*53ee8cc1Swenshuai.xi //VE out 147*53ee8cc1Swenshuai.xi #define VE_OUT_CVBS_YCC 0x00 148*53ee8cc1Swenshuai.xi #define VE_OUT_CVBS_YCbCr 0x01 149*53ee8cc1Swenshuai.xi #define VE_OUT_CVBS_RGB 0x02 150*53ee8cc1Swenshuai.xi #define VE_OUT_NONE 0xFF 151*53ee8cc1Swenshuai.xi 152*53ee8cc1Swenshuai.xi #define VE_V_SCALE_DOWN_RATIO(IN, OUT) (((MS_U32)(OUT) * 2048ul / (MS_U32)(IN))+1) 153*53ee8cc1Swenshuai.xi #define VE_H_SCALE_DOWN_RATIO(IN, OUT) ((MS_U32)(OUT) * 2048ul / (MS_U32)(IN)) 154*53ee8cc1Swenshuai.xi #define VE_V_SCALE_UP_RATIO(IN, OUT) ((MS_U32)(IN - 1) * 0x100000ul / (MS_U32)(OUT - 1)) 155*53ee8cc1Swenshuai.xi #define VE_H_SCALE_UP_RATIO(IN, OUT) ((MS_U32)(IN) * 0x100000ul/ (MS_U32)(OUT)) 156*53ee8cc1Swenshuai.xi 157*53ee8cc1Swenshuai.xi #define VE_SOURCE_AFTER_DI 158*53ee8cc1Swenshuai.xi 159*53ee8cc1Swenshuai.xi typedef enum 160*53ee8cc1Swenshuai.xi { 161*53ee8cc1Swenshuai.xi EN_VE_DEMODE = 0x01, 162*53ee8cc1Swenshuai.xi EN_VE_CCIR656_IN = 0x02, 163*53ee8cc1Swenshuai.xi EN_VE_RGB_IN = 0x04, 164*53ee8cc1Swenshuai.xi EN_VE_INVERSE_HSYNC = 0x08, 165*53ee8cc1Swenshuai.xi }EN_VE_DISPLAY_STATUS; 166*53ee8cc1Swenshuai.xi 167*53ee8cc1Swenshuai.xi //MV Type 168*53ee8cc1Swenshuai.xi typedef enum 169*53ee8cc1Swenshuai.xi { 170*53ee8cc1Swenshuai.xi MS_VE_MV_NTSC_START = 0, 171*53ee8cc1Swenshuai.xi MS_VE_MV_NTSC_TYPE1 = MS_VE_MV_NTSC_START, 172*53ee8cc1Swenshuai.xi MS_VE_MV_NTSC_TYPE2, 173*53ee8cc1Swenshuai.xi MS_VE_MV_NTSC_TYPE3, 174*53ee8cc1Swenshuai.xi MS_VE_MV_NTSC_TEST_N01, 175*53ee8cc1Swenshuai.xi MS_VE_MV_NTSC_TEST_N02, 176*53ee8cc1Swenshuai.xi MS_VE_MV_NTSC_TYPE2_TTX, 177*53ee8cc1Swenshuai.xi MS_VE_MV_NTSC_TEST_N01_TTX, 178*53ee8cc1Swenshuai.xi MS_VE_MV_PAL_START = 0x10, 179*53ee8cc1Swenshuai.xi MS_VE_MV_PAL_TYPE1 = MS_VE_MV_PAL_START, 180*53ee8cc1Swenshuai.xi MS_VE_MV_PAL_TYPE2, 181*53ee8cc1Swenshuai.xi MS_VE_MV_PAL_TYPE3, 182*53ee8cc1Swenshuai.xi MS_VE_MV_PAL_TEST_P01, 183*53ee8cc1Swenshuai.xi MS_VE_MV_PAL_TEST_P02, 184*53ee8cc1Swenshuai.xi MS_VE_MV_PAL_TYPE2_TTX, 185*53ee8cc1Swenshuai.xi MS_VE_MV_PAL_TEST_P01_TTX, 186*53ee8cc1Swenshuai.xi } MS_VE_MV_TYPE; 187*53ee8cc1Swenshuai.xi 188*53ee8cc1Swenshuai.xi /* 189*53ee8cc1Swenshuai.xi * This Enum type was defined base on DCS for composite (CVBS) 190*53ee8cc1Swenshuai.xi */ 191*53ee8cc1Swenshuai.xi typedef enum 192*53ee8cc1Swenshuai.xi { 193*53ee8cc1Swenshuai.xi MS_VE_DCS_TYPE_MIN = 0, 194*53ee8cc1Swenshuai.xi MS_VE_DCS_CVBS_NTSC = MS_VE_DCS_TYPE_MIN, 195*53ee8cc1Swenshuai.xi MS_VE_DCS_CVBS_PAL, 196*53ee8cc1Swenshuai.xi MS_VE_DCS_TYPE_MAX = MS_VE_DCS_CVBS_PAL, 197*53ee8cc1Swenshuai.xi MS_VE_DCS_TYPE_NUM, 198*53ee8cc1Swenshuai.xi } MS_VE_DCS_TYPE; 199*53ee8cc1Swenshuai.xi 200*53ee8cc1Swenshuai.xi //VE capability struct 201*53ee8cc1Swenshuai.xi typedef struct 202*53ee8cc1Swenshuai.xi { 203*53ee8cc1Swenshuai.xi MS_BOOL bSupport_UpScale; 204*53ee8cc1Swenshuai.xi MS_BOOL bSupport_CropMode; 205*53ee8cc1Swenshuai.xi MS_BOOL bSupport_DolbyVerifier; 206*53ee8cc1Swenshuai.xi }MS_VE_Cap; 207*53ee8cc1Swenshuai.xi 208*53ee8cc1Swenshuai.xi typedef enum 209*53ee8cc1Swenshuai.xi { 210*53ee8cc1Swenshuai.xi MS_VE_DRAM_FORMAT_Y8C8 = 0, 211*53ee8cc1Swenshuai.xi MS_VE_DRAM_FORMAT_Y8C8M4, 212*53ee8cc1Swenshuai.xi }MS_VE_DRAM_FORMAT; 213*53ee8cc1Swenshuai.xi 214*53ee8cc1Swenshuai.xi typedef enum 215*53ee8cc1Swenshuai.xi { 216*53ee8cc1Swenshuai.xi MS_VE_INT_TVE_FIELD = 0, 217*53ee8cc1Swenshuai.xi MS_VE_INT_TVE_VSYNC_TVE_FIELD, 218*53ee8cc1Swenshuai.xi MS_VE_INT_TVS_VSYNC, 219*53ee8cc1Swenshuai.xi }MS_VE_INT_TYPE; 220*53ee8cc1Swenshuai.xi 221*53ee8cc1Swenshuai.xi //------------------------------------------------------------------------------------------------- 222*53ee8cc1Swenshuai.xi // Function and Variable 223*53ee8cc1Swenshuai.xi //------------------------------------------------------------------------------------------------- 224*53ee8cc1Swenshuai.xi 225*53ee8cc1Swenshuai.xi void MDrv_VE_PowerOn(void); 226*53ee8cc1Swenshuai.xi void MDrv_VE_PowerOff(void); 227*53ee8cc1Swenshuai.xi void Hal_VE_set_fix_color_out(MS_BOOL ben, MS_U8 u8color_y, MS_U8 u8color_cb, MS_U8 u8color_cr); 228*53ee8cc1Swenshuai.xi 229*53ee8cc1Swenshuai.xi void Hal_VE_set_wss_data(MS_BOOL ben, MS_U16 u16wssdata); 230*53ee8cc1Swenshuai.xi MS_U16 Hal_VE_get_wss_data(void); 231*53ee8cc1Swenshuai.xi void Hal_VE_set_color_convert(MS_VE_VIDEOSYS VideoSys, MS_U8 u8DACType); 232*53ee8cc1Swenshuai.xi 233*53ee8cc1Swenshuai.xi void Hal_VE_init(void); 234*53ee8cc1Swenshuai.xi MS_BOOL Hal_VE_set_output_video_std(MS_VE_VIDEOSYS VideoSystem); 235*53ee8cc1Swenshuai.xi MS_VE_VIDEOSYS Hal_VE_Get_Output_Video_Std(void); 236*53ee8cc1Swenshuai.xi 237*53ee8cc1Swenshuai.xi MS_BOOL Hal_VE_SetCusTable(MS_VE_VIDEOSYS VideoSystem, MS_U8* pu8Tbl, MS_U16 u16size); 238*53ee8cc1Swenshuai.xi void Hal_VE_EnableCusTable(MS_BOOL bEnable); 239*53ee8cc1Swenshuai.xi 240*53ee8cc1Swenshuai.xi void Hal_VE_set_capture_window(MS_U16 u16hstart, MS_U16 u16hend, MS_U16 u16vstart, MS_U16 u16vend); 241*53ee8cc1Swenshuai.xi void Hal_VE_set_hsync_inverse(MS_BOOL bEn); 242*53ee8cc1Swenshuai.xi void Hal_VE_set_cvbs_buffer_out(MS_U16 u16chnl, MS_U16 u16mux, MS_U16 u16clamp, MS_U16 u16test); 243*53ee8cc1Swenshuai.xi void Hal_VE_set_frc(MS_BOOL bfulldrop, MS_U32 u32fullnum, MS_U32 u32emptynum, MS_BOOL binterlace, MS_BOOL b3FrameMode); 244*53ee8cc1Swenshuai.xi void Hal_VE_set_field_inverse(MS_BOOL ben); 245*53ee8cc1Swenshuai.xi void Hal_VE_set_ccir656_out_pal(MS_BOOL bpal); 246*53ee8cc1Swenshuai.xi void Hal_VE_sofeware_reset(MS_BOOL ben); 247*53ee8cc1Swenshuai.xi void Hal_VE_set_vbi(MS_BOOL ben); 248*53ee8cc1Swenshuai.xi void Hal_VE_set_reg_load(MS_BOOL ben); 249*53ee8cc1Swenshuai.xi void Hal_VE_set_ctrl(MS_U16 u16enval); 250*53ee8cc1Swenshuai.xi void Hal_VE_set_h_scaling(MS_BOOL ben, MS_U16 u16ratio); 251*53ee8cc1Swenshuai.xi void Hal_VE_set_v_scaling(MS_BOOL ben, MS_U16 u16ratio); 252*53ee8cc1Swenshuai.xi void Hal_VE_set_v_scaling_Traditional(MS_BOOL ben, MS_U16 u16ratio); 253*53ee8cc1Swenshuai.xi void Hal_VE_set_v_initfactor(MS_BOOL binterlace, MS_U32 u32V_Ratio); 254*53ee8cc1Swenshuai.xi void Hal_VE_set_out_sel(MS_U8 u8out_sel); 255*53ee8cc1Swenshuai.xi void Hal_VE_set_source_sync_inv(MS_U8 u8val, MS_U8 u8Mask); 256*53ee8cc1Swenshuai.xi void Hal_VE_set_sog(MS_BOOL ben); 257*53ee8cc1Swenshuai.xi void Hal_VE_set_inputsource(PMS_VE_InputSrc_Info pInputSrcInfo); 258*53ee8cc1Swenshuai.xi void Hal_VE_set_mux(MS_U8 u8clk, MS_U8 u8data); 259*53ee8cc1Swenshuai.xi void Hal_VE_set_rgb_in(MS_BOOL ben); 260*53ee8cc1Swenshuai.xi void Hal_VE_set_ccir656_in(MS_BOOL ben); 261*53ee8cc1Swenshuai.xi void Hal_VE_set_source_interlace(MS_BOOL ben); 262*53ee8cc1Swenshuai.xi void Hal_VE_set_clk_on_off(MS_BOOL ben); 263*53ee8cc1Swenshuai.xi void Hal_VE_set_ve_on_off(MS_BOOL ben); 264*53ee8cc1Swenshuai.xi void Hal_VE_set_blackscreen(MS_BOOL ben); 265*53ee8cc1Swenshuai.xi MS_BOOL Hal_VE_is_blackscreen_enabled(void); 266*53ee8cc1Swenshuai.xi void Hal_VE_init_riu_base(MS_VIRT virtRiu_Base); 267*53ee8cc1Swenshuai.xi void Hal_VE_EnableTtx(MS_BOOL bEnable); 268*53ee8cc1Swenshuai.xi void Hal_VE_Set_ttx_Buffer(MS_U32 u32StartAddr, MS_U32 u32Size); 269*53ee8cc1Swenshuai.xi void Hal_VE_Clear_ttxReadDoneStatus(void); 270*53ee8cc1Swenshuai.xi MS_BOOL Hal_VE_Get_ttxReadDoneStatus(void); 271*53ee8cc1Swenshuai.xi void Hal_VE_Set_VbiTtxActiveLines(MS_U8 u8LinePerField); 272*53ee8cc1Swenshuai.xi void Hal_VE_SetVbiTtxRange(MS_U16 odd_start, MS_U16 odd_end, 273*53ee8cc1Swenshuai.xi MS_U16 even_start, MS_U16 enen_end); 274*53ee8cc1Swenshuai.xi void Hal_VE_Set_VbiTtxActiveLinesBitmap(MS_U32 u32Bitmap); 275*53ee8cc1Swenshuai.xi void Hal_VE_Set_winodw_offset(MS_PHY phyoffsetaddr); 276*53ee8cc1Swenshuai.xi MS_U32 Hal_VE_ConvertARGB2YUV(MS_U32 u32aRGB); 277*53ee8cc1Swenshuai.xi VE_Result Hal_VE_SetFrameColor(MS_U32 u32aRGB); 278*53ee8cc1Swenshuai.xi void Hal_VE_Set_OSD(MS_BOOL bEnable); 279*53ee8cc1Swenshuai.xi VE_Result Hal_VE_Set_OSDLayer(MS_VE_OSD_LAYER_SEL eVideoOSDLayer); 280*53ee8cc1Swenshuai.xi MS_VE_OSD_LAYER_SEL Hal_VE_Get_OSDLayer(void); 281*53ee8cc1Swenshuai.xi VE_Result Hal_VE_Set_VideoAlpha(MS_U8 u8Val); 282*53ee8cc1Swenshuai.xi VE_Result Hal_VE_Get_VideoAlpha(MS_U8 *pu8Val); 283*53ee8cc1Swenshuai.xi void Hal_VE_EnableCcSw(MS_BOOL bEnable); 284*53ee8cc1Swenshuai.xi void Hal_VE_SetCcRange(MS_U16 odd_start, MS_U16 odd_end, MS_U16 even_start, MS_U16 enen_end); 285*53ee8cc1Swenshuai.xi void Hal_VE_SendCcData(MS_BOOL bIsOdd, MS_U16 data); 286*53ee8cc1Swenshuai.xi void Hal_VE_Set_TestPattern(MS_BOOL ben); 287*53ee8cc1Swenshuai.xi 288*53ee8cc1Swenshuai.xi void Hal_VE_W2BYTE_MSK(MS_U32 u32Reg, MS_U16 u16Val, MS_U16 u16Mask); 289*53ee8cc1Swenshuai.xi MS_U16 Hal_VE_R2BYTE_MSK(MS_U32 u32Reg, MS_U16 u16Mask); 290*53ee8cc1Swenshuai.xi 291*53ee8cc1Swenshuai.xi //Dump Table 292*53ee8cc1Swenshuai.xi void Hal_VE_DumpTable(MS_U8 *pVeTable, MS_U8 u8TableType); 293*53ee8cc1Swenshuai.xi 294*53ee8cc1Swenshuai.xi //Set MV 295*53ee8cc1Swenshuai.xi VE_Result Hal_VE_SetMV(MS_BOOL bEnable, MS_VE_MV_TYPE eMvType); 296*53ee8cc1Swenshuai.xi 297*53ee8cc1Swenshuai.xi //Set DCS 298*53ee8cc1Swenshuai.xi VE_Result Hal_VE_DCS_SetType(MS_BOOL bEnable, MS_VE_DCS_TYPE eDCSType); 299*53ee8cc1Swenshuai.xi VE_Result Hal_VE_DCS_SetActivationKey(MS_U8 *pu8ActivationKeyTbl, MS_U8 u8ActivationKeyTblSize); 300*53ee8cc1Swenshuai.xi 301*53ee8cc1Swenshuai.xi MS_BOOL Hal_VE_DisableRegWrite_GetCaps(void); 302*53ee8cc1Swenshuai.xi 303*53ee8cc1Swenshuai.xi // show internal color bar 304*53ee8cc1Swenshuai.xi // TRUE: enable color bar 305*53ee8cc1Swenshuai.xi // FALSE: disable color bar 306*53ee8cc1Swenshuai.xi void Hal_VE_ShowColorBar(MS_BOOL bEnable); 307*53ee8cc1Swenshuai.xi VE_Result Hal_VE_AdjustPositionBase(MS_S32 s32WAddrAdjustment, MS_S32 s32RAddrAdjustment); 308*53ee8cc1Swenshuai.xi void Hal_VE_set_field_size(MS_U16 u16FieldSize); 309*53ee8cc1Swenshuai.xi void Hal_VE_SelMIU(MS_U8 u8MIU_Seltype); 310*53ee8cc1Swenshuai.xi void Hal_VE_SetMemAddr(MS_PHY *phyRDAddress, MS_PHY *phyWRAddress); 311*53ee8cc1Swenshuai.xi VE_Result HAL_VE_SetFrameLock(MS_U32 u32IDclk, MS_U32 u32ODclk, MS_U32 u32InitPll, MS_BOOL bEnable); 312*53ee8cc1Swenshuai.xi VE_Result Hal_VE_GetCaps(MS_VE_Cap *cap); 313*53ee8cc1Swenshuai.xi void Hal_VE_set_h_upscaling(MS_BOOL ben, MS_U32 u32ratio); 314*53ee8cc1Swenshuai.xi void Hal_VE_set_v_upscaling(MS_BOOL ben, MS_U32 u32ratio); 315*53ee8cc1Swenshuai.xi MS_VE_DRAM_FORMAT Hal_VE_Get_DRAM_Format(void); 316*53ee8cc1Swenshuai.xi void Hal_VE_Set_DRAM_Format(MS_VE_DRAM_FORMAT fmt); 317*53ee8cc1Swenshuai.xi MS_U8 Hal_VE_Get_Pack_Num_Per_Line(void); 318*53ee8cc1Swenshuai.xi void Hal_VE_Set_Pack_Num_Per_Line(MS_U8 PackNumPerLine); 319*53ee8cc1Swenshuai.xi MS_U16 Hal_VE_Get_Field_Line_Number(void); 320*53ee8cc1Swenshuai.xi void Hal_VE_Set_Field_Line_Number(MS_U16 FieldLineNumber); 321*53ee8cc1Swenshuai.xi void Hal_VE_Set_Crop_OSD_Offset(MS_U16 hstart, MS_U16 vstart); 322*53ee8cc1Swenshuai.xi void Hal_VE_Set_VScale_Output_Line_Number(MS_U16 line); 323*53ee8cc1Swenshuai.xi void Hal_VE_Set_HScale_Output_Line_Number(MS_U16 line); 324*53ee8cc1Swenshuai.xi VE_Result Hal_VE_Adjust_FrameStart(MS_S16 pixel_offset); 325*53ee8cc1Swenshuai.xi MS_BOOL Hal_VE_ISRConfig(MS_VE_INT_TYPE eIntType); 326*53ee8cc1Swenshuai.xi VE_Result Hal_VE_set_wss525_data(MS_BOOL ben, MS_U32 u32wssdata); 327*53ee8cc1Swenshuai.xi MS_U32 Hal_VE_get_wss525_data(void); 328*53ee8cc1Swenshuai.xi #define Hal_VE_set_dolby_verifier_addr(args...) 329*53ee8cc1Swenshuai.xi MS_U32 Hal_VE_get_dolby_verifier_buf_size(void); 330*53ee8cc1Swenshuai.xi void Hal_VE_Set_PreHSD(MS_VE_INPUT_SRC_TYPE eInputSrcType,MS_U16 *u16In_Hsize,MS_U16 *u16In_Vsize); 331*53ee8cc1Swenshuai.xi 332*53ee8cc1Swenshuai.xi #ifdef __cplusplus 333*53ee8cc1Swenshuai.xi } 334*53ee8cc1Swenshuai.xi #endif 335*53ee8cc1Swenshuai.xi 336*53ee8cc1Swenshuai.xi #endif 337*53ee8cc1Swenshuai.xi 338