⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 v_std.h

📁 实时监控
💻 H
字号:
#ifndef _VIDEO_STANDARD_H
#define _VIDEO_STANDARD_H

typedef enum
{
	PAL_CIF		= 0x0000,
	PAL_HD1		= 0x0001,
	PAL_D1		= 0x0002,

	NTSC_CIF	= 0x1000,
	NTSC_HD1	= 0x1001,
	NTSC_D1		= 0x1002

} VIDEO_STANDARDS;

inline int vs_width(VIDEO_STANDARDS vs)
{
	static int w_table[2][3] = { {352, 704, 704}, {352, 704, 704} } ;
	
	return w_table[vs>>12][vs&0xf] ;
}

inline int vs_height(VIDEO_STANDARDS vs)
{
	static int h_table[2][3] = { {288,	288, 576}, {240, 240, 480} } ;
	
	return h_table[vs>>12][vs&0xf] ;
}

inline VIDEO_STANDARDS get_vs(int width, int height)
{
	if (width == 704)  {
		if (height == 576)
            return PAL_D1 ;
		else if (height == 480)
            return NTSC_D1 ;
		else if (height == 288)
			return PAL_HD1 ;
		else if (height == 240)
			return NTSC_HD1 ;
		else
			return PAL_CIF ;   //error
	}
	else if (width == 352)  {
		if (height == 288)
			return PAL_CIF ;
		else if (height == 240)
			return NTSC_CIF ;
		else
			return PAL_CIF ;  //error
	}
	else
		return PAL_CIF ;      //error
/*	if( width == 352 )
	{
		return PAL_CIF;
	}
	if( width == 704 )
	{
		if( height == 576 )
			return PAL_D1;
		else
			return PAL_HD1;
	}

	if( width == 320 )
	{
		return NTSC_CIF;
	}

	if( width == 640 )
	{
		if( height == 480 )
			return NTSC_D1;
		else
			return NTSC_HD1;
	}
	return PAL_CIF;
*/
}
#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -