📄 hi_viu.h
字号:
/****************************************************************************** Copyright (C), 2005, Hisilicon Tech. Co., Ltd. ****************************************************************************** File Name : viu.h Version : Initial Draft Author : Hisilicon multimedia software group Created : 2005/5/23 Last Modified : Description : video input unit public driver header file History : 1.Date : 2005/5/23 Author : y36721 Modification: Created file******************************************************************************/#ifndef __HI_VIU_H__#define __HI_VIU_H__/****************************************************************************** Enumerated Constants****************************************************************************//* First is control enumeration. *//* enumeration of possible VIU capture mode select(bit9:8). */typedef enum{ VIU_CAP_MODE_BT656 = 0, VIU_CAP_MODE_BT601, VIU_CAP_MODE_DIGCAMERA, VIU_CAP_MODE_RAWDATA} VIU_CAPMODE_t;/* enumeration of possible VIU chroma resample(bit10) */typedef enum{ VIU_CHROMA_RESAMPLE_NOT = 0, VIU_CHROMA_RESAMPLE} VIU_CHROMARESAMPLE_t;/* enumeration of possible VIU down scaling(bit11) */typedef enum{ VIU_DOWN_SCALING_NOT = 0, VIU_DOWN_SCALING} VIU_DOWNSACLING_t;/* enumeration of possible VIU capture select(bit13:12) */typedef enum{ VIU_CAP_SEL0 = 0, //only odd line VIU_CAP_SEL1, //only even line VIU_CAP_SEL2, //odd and even line VIU_CAP_SEL3 //reserved} VIU_CAPSEL_t;/* enumeration of possible date valid reverse configure(bit14). */typedef enum{ VIU_DV_REV_NOT = 0, VIU_DV_REV} VIU_DVREV_t;/* enumeration of possible VIU master or slaver mode configure(bit15). */typedef enum{ VIU_SLAVER_MODE = 0, VIU_MASTER_MODE} VIU_MASTERMODE_t;/* enumeration of possible VIU capture sequence(bit18:17) */typedef enum{ VIU_CAP_SEQ0 = 0, //uyvy VIU_CAP_SEQ1, //vyuy VIU_CAP_SEQ2, //yuyv VIU_CAP_SEQ3 //yvyu} VIU_CAPSEQ_t;/* enumeration of possible VIU V sync configure(bit19). */typedef enum{ VIU_VSYNC_NOT = 0, VIU_VSYNC} VIU_VSYNC_t;/* enumeration of possible VIU H sync configure(bit20). */typedef enum{ VIU_HSYNC_NOT = 0, VIU_HSYNC} VIU_HSYNC_t;/* enumeration of possible VIU field identify configure. Only when vsync = 0.(bit20)*/typedef enum{ VIU_HIGH_EVENFLD_NOT = 0, VIU_HIGH_EVENFLD} VIU_EVENFLD_t;/* enumeration of possible VIU sync negitive configure(bit 21). */typedef enum{ VIU_SYNC_NEG_NOT = 0, VIU_SYNC_NEG} VIU_SYNCNEG_t;/* enumeration of possible VIU endian select(bit22). */typedef enum{ VIU_BIG_ENDIAN = 0, VIU_LITTLE_ENDIAN} VIU_ENDIAN_t;/* enumeration of viu int shift bit. */typedef enum{ VIU_CC_INT = 0x1, VIU_OVF_INT = 0x2, VIU_DATATHROW_INT = 0x4, VIU_BUSERR_INT = 0x8, VIU_PROCERR_INT = 0x10, VIU_REGUPDATE_INT = 0x20, VIU_FRAMEPULSE_INT = 0x40} VIU_INTSHIFT_t;/* enumeration of viu status shift bit. */typedef enum{ VIU_STATUS_IMAGE_DONE = 0x1, VIU_STATUS_BUFF_OVF = 0x2, VIU_STATUS_DATA_THROW = 0x4, VIU_STATUS_BUS_ERR = 0x8, VIU_STATUS_PROC_ERR = 0x10, VIU_STATUS_SNOOZE = 0x20, VIU_STATUS_FIELD2 = 0x40, VIU_STATUS_VI_BUSY = 0x80} VIU_STATUSSHIFT_t;HI_RET VIU_Init(UINT32 ccir,UINT32 norm, UINT32 masterMode); //same as v2HI_RET VIU_SetCapOption(UINT32 ccir, UINT32 norm, UINT32 masterMode); //same as v2HI_RET VIU_Enable(void); //same as v2HI_RET VIU_Disable(void); //same as v2HI_RET VIU_FirEnable(void); //same as v2, but in fact it does not workHI_RET VIU_FirDisable(void); //same as v2, but in fact it does not workHI_RET VIU_SetActiveVideo(UINT32 actWidth, UINT32 actHeight); //v2 has no this APIHI_RET VIU_SetCap( UINT32 capStartX, UINT32 capStartY, UINT32 capWidth, UINT32 capHeight); //same as v2HI_RET VIU_SetMemAddrStride( UINT32 yAddr, UINT32 cAddr, UINT32 yStride, UINT32 cStride); //different from v2, only 4 params, but v2 has 6 params.HI_RET VIU_InterruptSet(UINT32 mask); //same as v2HI_RET VIU_Start(void); //same as v2UINT32 VIU_GetInterruptStatus(void); //same as v2HI_RET VIU_ClrInterruptStatus(UINT32 clrInt); //same as v2UINT32 VIU_GetStatus(void); //same as v2VIU_DOWNSACLING_t VIU_GetDownScaling(void); //same as v2HI_RET VIU_SetDownScaling(VIU_DOWNSACLING_t downScaling); //same as v2VIU_CHROMARESAMPLE_t VIU_GetChromaResample(void); //same as v2HI_RET VIU_SetChromaResample(VIU_CHROMARESAMPLE_t chromaResample); //same as v2/* deleted by yuanyb for no need for v1 VIU_STOREMETHOD_t VIU_GetStoreMethod(void);int VIU_SetStoreMethod(VIU_STOREMETHOD_t storeMethod);*/VIU_CAPSEL_t VIU_GetCapSel(void); //same as v2HI_RET VIU_SetCapSel(VIU_CAPSEL_t capSel); //same as v2VIU_CAPSEQ_t VIU_GetCapSeq(void); //same as v2HI_RET VIU_SetCapSeq(VIU_CAPSEQ_t capSeq); //same as v2VIU_ENDIAN_t VIU_GetEndian(void); //same as v2HI_RET VIU_SetEndian(VIU_ENDIAN_t endian); //same as v2/*deleted by yuanyb for no need for v1VIU_DATASEL_t VIU_GetDataSel(void);int VIU_SetDataSel(VIU_DATASEL_t dataSel);VIU_DATAWIDTH_t VIU_GetDataWidth(void);int VIU_SetDataWidth(VIU_DATAWIDTH_t dataWidth);*/VIU_CAPMODE_t VIU_GetCapMode(void); //same as v2HI_RET VIU_SetCapMode(VIU_CAPMODE_t capMode); //same as v2HI_RET VIU_SetSync( VIU_SYNCNEG_t syncNeg, VIU_EVENFLD_t evenFld, VIU_HSYNC_t hSync, VIU_VSYNC_t vSync, VIU_DVREV_t dvRev ); //different from v2, params is different.VIU_MASTERMODE_t VIU_GetMasterMode(void); //same as v2HI_RET VIU_SetMasterMode(VIU_MASTERMODE_t masterMode); //same as v2HI_RET VIU_SetCCInterrupt(void);HI_RET VIU_CheckCCStatus(void);#endif /*end of __HI_VIU_H__*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -