📄 video.h
字号:
//----------------------------------------------------------------------------------------------------
// ID Code : Video.h No.0000
// Update Note :
//
//----------------------------------------------------------------------------------------------------
#if(_VIDEO_SUPPORT == _ON)
#define _VIDEO_50HZ 0
#define _VIDEO_60HZ 1
#define _VIDEO_NOT_EXIST _MODE_NOSIGNAL
#define _VIDEO_EXIST _MODE_EXIST
#ifdef __VIDEO__
//--------------------------------------------------
// Video Tables
//--------------------------------------------------
BYTE code tVIDEO_TABLE_SET_SCALER[] =
{
/*
5, _AUTOINC, _VGIP_CTRL_05, 0x09,0x11,
4, _AUTOINC, _VGIP_ODD_CTRL_08, 0x4f,
#if (_PCB_TYPE == _PCB_PTX23A21)
4, _AUTOINC, _IPH_ACT_WID_H_0B, 0x88, //swap Video8 input port.
#elif (_PCB_TYPE == _PCB_PV013BA1 || \
_PCB_TYPE == _PCB_RIGHTECH_A)
4, _AUTOINC, _IPH_ACT_WID_H_0B, 0x08, //no swap Video8 input port.
#endif
4, _AUTOINC, _SCALE_CTRL_19, 0x80,
#if (_PCB_TYPE == _PCB_PTX23A21)
4, _AUTOINC, _VSYNC_COUNTER_LEVEL_MSB_4C,0x23,
#elif (_PCB_TYPE == _PCB_PV013BA1 || \
_PCB_TYPE == _PCB_RIGHTECH_A)
4, _AUTOINC, _VSYNC_COUNTER_LEVEL_MSB_4C,0x03, // why ??
4, _AUTOINC, _ADC_POWER_CTRL_E8, 0x08, //
#endif
4, _AUTOINC, _SYNC_CTRL_49, 0x05,
// 89H
5, _AUTOINC, _YUV2RGB_CTRL_89, 0x08,0x05,
5, _AUTOINC, _YUV2RGB_CTRL_89, 0x28,0x80,
5, _AUTOINC, _YUV2RGB_CTRL_89, 0x48,0x01,
5, _AUTOINC, _YUV2RGB_CTRL_89, 0x68,0x40,
5, _AUTOINC, _YUV2RGB_CTRL_89, 0x88,0x00,
5, _AUTOINC, _YUV2RGB_CTRL_89, 0xa8,0xa0,
5, _AUTOINC, _YUV2RGB_CTRL_89, 0xc8,0x07,
5, _AUTOINC, _YUV2RGB_CTRL_89, 0xe8,0x00,
4, _NON_AUTOINC, _YUV2RGB_CTRL_89, 0x07,
_END*/
//version 200D
5, _AUTOINC, _VGIP_CTRL_05, 0x09,0x11,
4, _AUTOINC, _VGIP_ODD_CTRL_08, 0x4f,
#if (_PCB_TYPE == _PCB_PTX23A21 ||_PCB_TYPE==_PCB_JIALUHUA|| _PCB_TYPE == _PCB_PV023BC1)
4, _AUTOINC, _IPH_ACT_WID_H_0B, 0x88, //swap Video8 input port.
#elif (_PCB_TYPE == _PCB_PV013BA1 || \
_PCB_TYPE == _PCB_RIGHTECH_A)
4, _AUTOINC, _IPH_ACT_WID_H_0B, 0x08, //no swap Video8 input port.
#else
4, _AUTOINC, _IPH_ACT_WID_H_0B, 0x08, //no swap Video8 input port.
#endif
4, _AUTOINC, _SCALE_CTRL_19, 0x80,
#if (_PCB_TYPE == _PCB_PTX23A21 ||_PCB_TYPE==_PCB_JIALUHUA|| _PCB_TYPE == _PCB_PV023BC1)
4, _AUTOINC, _VSYNC_COUNTER_LEVEL_MSB_4C,0x23,
#elif (_PCB_TYPE == _PCB_PV013BA1 || \
_PCB_TYPE == _PCB_RIGHTECH_A)
4, _AUTOINC, _VSYNC_COUNTER_LEVEL_MSB_4C,0x03, // why ??
4, _AUTOINC, _ADC_POWER_CTRL_E8, 0x08, //
#endif
// 4, _AUTOINC, _VSYNC_COUNTER_LEVEL_MSB_4C,0x23, //x.hu, this line is in v200D, error
4, _AUTOINC, _SYNC_CTRL_49, 0x05,
// 89H
5, _AUTOINC, _YUV2RGB_CTRL_89, 0x08,0x05,
5, _AUTOINC, _YUV2RGB_CTRL_89, 0x28,0x80,
5, _AUTOINC, _YUV2RGB_CTRL_89, 0x48,0x01,
5, _AUTOINC, _YUV2RGB_CTRL_89, 0x68,0x40,
5, _AUTOINC, _YUV2RGB_CTRL_89, 0x88,0x00,
5, _AUTOINC, _YUV2RGB_CTRL_89, 0xa8,0xa0,
5, _AUTOINC, _YUV2RGB_CTRL_89, 0xc8,0x07,
5, _AUTOINC, _YUV2RGB_CTRL_89, 0xe8,0x00,
4, _NON_AUTOINC, _YUV2RGB_CTRL_89, 0x07,
_END
};
//--------------------------------------------------
// Global Variables
//--------------------------------------------------
bit bVideoType;
BYTE idata ucSourceControl=0;
BYTE idata ucStatus=0; //bit0: for source hint status. 1=is showing
//bit1: for osd showing while no signal. 1=is showing
//bit2: 1=load tVIDEO_TABLE_SET_SCALER[] when power on or source change
//--------------------------------------------------
// Function Prototypes
//--------------------------------------------------
void CVideoDisplaySet(void);
bit CSourceChange(void);
#else
extern BYTE code tVIDEO_TABLE_SET_SCALER[];
//--------------------------------------------------
// Extern Global Variables
//--------------------------------------------------
extern bit bVideoType;
extern BYTE idata ucSourceControl;
extern BYTE idata ucStatus;
//--------------------------------------------------
// Extern Function Prototypes
//--------------------------------------------------
extern void CVideoDisplaySet(void);
extern bit CSourceChange(void);
#endif
//--------------------------------------------------
// Macro of Input Sync Type
//--------------------------------------------------
#define CHECK60HZ() (bVideoType == _VIDEO_60HZ)
#define CHECK50HZ() (bVideoType == _VIDEO_50HZ)
#define SET60HZ() (bVideoType = _VIDEO_60HZ)
#define SET50HZ() (bVideoType = _VIDEO_50HZ)
#define CHECKVIDEOTYPE() (bVideoType)
#endif // #if(_VIDEO_SUPPORT == _ON)
//--------------------------------------------------
// Macro of Source Change
// 0: none
// 1: input_port_0
// 2: input_port_1
// 3: input_port_2
// 4: input_port_3
//--------------------------------------------------
#define GET_SOURCESTATUS() (ucSourceControl)
#define SET_SOURCESTATUS(x) (ucSourceControl = x)
#define CLR_SOURCESTATUS() (ucSourceControl = 0)
//--------------------------------------------------
// Macro of Source Hint Status
//--------------------------------------------------
#define GET_SOURCEHINTSTATUS() ((ucStatus&_BIT0)? _TRUE : _FALSE)
#define SET_SOURCEHINTSTATUS() (ucStatus |= _BIT0)
#define CLR_SOURCEHINTSTATUS() (ucStatus &= 0xFE)
//--------------------------------------------------
// Macro of OSD page showing status while No Signal
//--------------------------------------------------
#define GET_OSDPAGE_AT_NOSIGNAL() ((ucStatus&_BIT1)? _TRUE : _FALSE)
#define SET_OSDPAGE_AT_NOSIGNAL() (ucStatus |= _BIT1) //OSD page is showing while no signal
#define CLR_OSDPAGE_AT_NOSIGNAL() (ucStatus &= 0xFD)
//--------------------------------------------------
// Macro of load tVIDEO_TABLE_SET_SCALER
//--------------------------------------------------
#define GET_VIDEO_TABLE_SET_SCALER() ((ucStatus&_BIT2)? _TRUE : _FALSE)
#define SET_VIDEO_TABLE_SET_SCALER() (ucStatus |= _BIT2) //request to load tVIDEO_TABLE_SET_SCALER[]
#define CLR_VIDEO_TABLE_SET_SCALER() (ucStatus &= 0xFB)
#if (_CUSTOM_TYPE == _CUSTOM_HAOZHEN)
//--------------------------------------------------
// Macro of Video PAL/NTSC switch action
//--------------------------------------------------
#define GET_VIDEO_PN_ACTION() ((ucStatus&_BIT3)? _TRUE : _FALSE)
#define SET_VIDEO_PN_ACTION() (ucStatus |= _BIT3)
#define CLR_VIDEO_PN_ACTION() (ucStatus &= (~_BIT3))
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -