📄 ircmd_video.c
字号:
/*
* Terry,2003/8/20 08:21PM
*
*/
#include "pic_mainproc.h"
#include "vpp.h"
//#define P_SCAN_ONLY_CHG_INT_MODE]
#ifdef ADD_DVI311_SETUP
#include "spv301.h"
#endif
#ifdef DVD_SETUP_REENG
#include "setup_VA.h"
#include "setup_def.h"
extern void run_save_sel_cmd(BYTE page,BYTE index);
extern BYTE dvi311_tv_mode;
extern void scaler_6500_main(void);
extern void exe_setup_function(UINT8 tt_id, UINT8 sub_id, UINT8 exe);
#endif
#ifdef QSI_PLATFORM //qsi: merge by johnson 20040712
void ircmd_tvout(void);
//qsi: add by sharon
#endif
#ifdef HW_FIX_TV_NINT_GRAB_WRONG_FIELD
//zxb 2007-7-12 9:09 merge from tw.
extern UINT8 set_osdtv_int;
extern UINT8 frame_cnt;
#endif // #endif HW_FIX_TV_NINT_GRAB_WRONG_FIELD
#if defined(DVB_MENU_SETUP_STYLE)||(defined(SUPPORT_DVB_GUI_NEW)&&defined(DVB_IR_PSCAN_ON)) //sunzhh add 2005-3-7
UINT8 rem_format_id;
#endif
const UINT8 tv_out_map[MODE_MAX_PSCAN] = {VIDEO_SET_MODE};//{INTERLACE,TV_SVIDEO,TV_RGB,P_SCAN,PC_VGA};
const UINT8 video_setup_id[] = {VIDEO_SETUP_STRING};//nono 2003-7-14 10:12
#define MODE_MAX_FORMAT TV_FORMAT_MAX
UINT8 ap_tv_out_id = 0;
//UINT8 is_ap_svideo;
#ifdef DYNAMIC_SPECTRUM //fengjl 3-10-30 15:04
void Show3dspectrum(void);
#endif
#ifdef BBK_DVD//zhaoyanhua add 3-11-26 16:41
#define VIDEO_OUTPUT_ADDR 240
#define VIDEO_VFD_DELAY_TIME 100
int tv_output_vfd_time = 0;
#endif
#ifdef SUPPORT_OSDID3//suqiaoli add 2004-3-26
extern void osd_init_OSDID3(void);
extern void show_id3(void);
#endif
#ifdef DISPLAY_CD_TEXT//lizhx add 2004/08/24
#include"CDTextUtil.h"
#endif
#ifdef SUPPORT_MP4_SUBTITLE // David 2004-5-12
extern void osd_init_OSDSRT(void);
#endif
#ifdef SUPPORT_DVB_GUI_NEW //wangcj 2005-9-8 15:20
#include "..\dvb_h\dvb_menu.h"
#include "..\dvb_h\Dvb_Macro_Def.h"
extern ReturnResult_E SysConfig_Init(BYTE iSecondSelect);
#endif
#ifdef SCALER_6500
extern UINT8 HDVD_MOD; //helm 050627
extern UINT8 Ksetup_tv_format;
#endif
//========================== Decleration the Functions ========================
static inline void ircmd_TV_format_toggle(void);
void hd_setting_start(void);
void hd_setting_end(void);
#ifdef SUPPORT_HD_RESOLUTION//added by wangyong for compile warning 2007-1-16 02:51下午
extern INT32 jpg_is_decoding_process();
extern int pause_n_fields();
#endif
// ============================================================================
// Video Video Video Video Video
// ============================================================================
void setup_tv_out(UINT8 id)
{
#ifdef SUPPORT_HD_RESOLUTION
int old_tv_resolution = GET_TV_RESOLUTION();
SET_TV_RESOLUTION(SD_576);
#endif
int old_mode=p_scan;
extern UINT8 srv_on;
#ifdef SUPPORT_D_TERMINAL //jwk 2005-9-29 14:51
if(tv_out_id==P_SCAN)
{
SET_D_TERMINAL_VFORMAT_CTRL_PSCAN();
}
else
{
SET_D_TERMINAL_VFORMAT_CTRL_INTERRACE();
}
#endif
#ifdef TVOUT6_4DAC_ON //terry,2003-8-19 17:44
if(id==TV_SVIDEO)
#ifdef SPHE1000 //MIKEY 2004.07.06
tv_dacoff( (0x01<<4)|(0x01<<5) ); // dac off //SPHE1000 use DAC C as C signal in S-Video
#else
#ifdef MP_BOARD_216_PIN_NON_SHARE // ronnie 2004/09/09
tv_dacoff( (0x01<<1)|(0x01<<2) );
#else
tv_dacoff( (0x01<<3)|(0x01<<4)|(0x01<<5) ); // dac off
#endif
#endif
#ifdef P_SCAN_TURNOFF_CVBS_SVIDEO
else if( (id==P_SCAN)||(id==PC_VGA)||(id==INTERLACE)||(id==TV_RGB) )//nono 20030920
#ifdef SPHE1000
tv_dacoff( (0x01<<1) ); // dac off
#else
tv_dacoff( (0x01<<1)|(0x01<<2) ); // dac off
#endif
#endif
#ifdef S_VIDEO_RGB_OUT_IN_THE_SAME_TIME//4-1-15 16:05
else if(id==TV_RGB)
tv_dacoff( (0x00<<1)|(0x00<<2)|(0x00<<3)|(0x00<<4)|(0x00<<5) ); // dac off
#endif//S_VIDEO_RGB_OUT_IN_THE_SAME_TIME
else
#ifdef SPHE1000 //wrwu, 2004/11/03, fix a bug of the SPHE100X changing video output
tv_dacoff(0);
#else
tv_dacoff( (0x01<<1)|(0x01<<2) ); // dac off
#endif
#endif//#ifdef TVOUT6_4DAC_ON //terry,2003-8-19 17:44
//wanghaoying 2003-11-6 22:54
#ifdef TV_USE_4_DAC
#ifdef SETUP_CVBS_OUTPUT
if (id == CVBS )
{//terry,2003/12/25 09:19PM
tv_dacoff( (0x01<<1)|(0x01<<2)|(0x01<<3)|(0x01<<4)|(0x01<<5) );
}
else if(id==TV_RGB) //zhongshan for rgb not output in the define
tv_dacoff( (0x00<<1)|(0x00<<2)|(0x00<<3)|(0x00<<4)|(0x00<<5) ); // dac off
#endif
#endif
//gerry add for gbm,when we set to S-VIDEO,tv dac3 will be off,2004-5-13 15:44
//#define S_VIDEO_SET_TV_DAC3_OFF
#if defined(TV_USE_4_DAC)&&defined(S_VIDEO_SET_TV_DAC3_OFF)
if(id==TV_SVIDEO)
tv_dacoff( (0x01<<3) ); // dac off
else
tv_dacoff( (0x00<<3) ); // dac on
#endif//#if defined(TV_USE_4_DAC)&&defined(S_VIDEO_SET_TV_DAC3_OFF)
#if defined(TV_USE_4_DAC)&&defined(S_VIDEO_SET_TV_DAC2_OFF)
if(id==TV_SVIDEO)
tv_dacoff( (0x01<<2) ); // dac off
else
tv_dacoff( (0x00<<2) ); // dac on
#endif//#if defined(TV_USE_4_DAC)&&defined(S_VIDEO_SET_TV_DAC2_OFF)
/////////////////////////////////////////////////////////////////////////////////////////
// Start - Setup TV interlace/non-interlace
#ifdef SUPPORT_ALL_TIME_DEINTERLACE
// When all time deinterlace is enabled, we need TV to be set to nint
extern UINT8 buffer_switching_enable;
tv_setup_nint();
p_scan = 1;
goto END_TV_SETUP_INT_NINT;
#endif // #endif SUPPORT_ALL_TIME_DEINTERLACE
if( (id==INTERLACE)||(id==TV_RGB)||(id==TV_SVIDEO) )//terry,2003/8/3 05:30PM
{
tv_setup_int();
p_scan=0;
}
#ifdef SETUP_CVBS_OUTPUT //wanghaoying 2003-11-6 22:55
else if( id==CVBS )//terry,2003/8/3 05:30PM
{
tv_setup_int();
p_scan=0;
}
#endif
else
{
#ifdef ADD_DVI311_SETUP
if(id==P_SCAN)
{
#ifdef For_TsingHua//Modifed by chenzhao on 2004-12-14 15:34
if(dvi311_tv_mode>0x84)
dvi311_mode=Mode_480P; //576P @kevin 2k40708
else if(dvi311_tv_mode==0x84)
dvi311_mode=Mode_576P; //480P @kevin 2k406708
#ifdef DVD_SETUP_REENG//Modifed by chenzhao on 2004-11-24 21:8
setup_VA[SETUP_VA_SPV311MODE]=dvi311_mode+MIN_ITEM_SEL;
#endif
#endif
#ifdef For_TsingHua
tv_setup_nint();
p_scan=1;
#endif
}
if(id==PC_VGA)
{
//dvi311_mode=5; //SVGA @kevin 2k406708
if(Power_off_311==1) //setoutput @kevin0710
{
close_pll(0xff);
}//reset 311 kevin0710
#ifdef For_TsingHua
setup_tv_out(1);
#endif
}
scaler_main();
#else
tv_setup_nint();
p_scan=1; //kevin forbid it for HDDVD @2k40706
#endif
}
// End - Setup TV interlace/non-interlace
/////////////////////////////////////////////////////////////////////////////////////////
END_TV_SETUP_INT_NINT:
/*
** don't mark this, because
** HDMI need progressive input, helm 051205
*/
#ifdef SCALER_6500
tv_setup_nint();
p_scan=1;
#endif
#ifdef ADD_DVI311_SETUP
HD_display(id);
#endif
#ifdef SUPPORT_HD_RESOLUTION
if((p_scan!=old_mode) || (old_tv_resolution != GET_TV_RESOLUTION() ))
#else
if(p_scan!=old_mode)
#endif
{
if (full_scrn & SETUP)
{
//printf("show setup page\n");
osd_init_setup();
#ifdef SETUP_TAB
ShowSetupPage(2);
#else
ShowSetupPage();
#endif
}else if(srv_on)
{
#if defined(SUPPORT_DVB_GUI_NEW)
if(Is_Dvb_State())
{
if(g_CurScreenType == SCREEN_TYPE_MENU)
{
UINT32 index1 = 0;
UINT32 index2 = 0;
index1 = GetFourthCurrentSelect();
index2 = GetThirdCurrentSelect();
DVBMenu_Init();
SetFirstCurrentSelect(1);
SetSecondCurrentSelect(0);
#ifndef DVB_SETUP_REENG //20061030 tiany add
DVBMenu_InitMainMenu(0);
#endif//#ifndef DVB_SETUP_REENG
full_scrn = DVB_T_SETUP_MENU;//temp use!!!
SetFourthCurrentSelect(index1);
SetThirdCurrentSelect(index2);
SysConfig_Init(DVB_TV_SETTING);
full_scrn = 0;
}
else
{
DVBMenu_Init();
}
}
else
{
osd_init();
}
#else
osd_init();
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -