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

📄 ircmd_video.c

📁 OSD显示,单片机实现,ICCAVR! 代码风格严谨,为高人所写.我仅为了上传换取资料
💻 C
📖 第 1 页 / 共 2 页
字号:
    #endif
    }
#endif

}


#if defined(TV_FORMAT_CHG2_VIDEO_MODE)||defined(ADD_TV_VIDEO_MODE)
void ircmd_tv_sys_mode(void)
{   
#ifdef INVALID_TV_MODE_KEY_IN_SETUP           //hq, 2004-3-13 15:24
    if(full_scrn&SETUP)
    {       
        return;
    }
#endif  
#ifdef DVD_5_DISC_RESUME_8202S_1X16//LIJD 2005-4-14 16:50 		
    		//ircmd_stop();
		//resumeMSF = 1;
		run_pause_setting();
		LoadModual(MODUAL_CDROM); 		
#endif
    
#if !defined ( ADJUSTING_ACTION_VALID_RIGHT_NOW )&&!defined ( ADD_COMPONENT_MODE )//libing 2005-7-5 14:58    
    if(action_click)
#endif//ADJUSTING_ACTION_VALID_RIGHT_NOW
    {
//        printf("in, tv_out_id:%x ap_tv_out_id:%x\n",tv_out_id,ap_tv_out_id);
        if(tv_out_id==TV_SVIDEO)
        {
          //if(p_scan)
          //   tv_out_id=P_SCAN;
          //else
#ifdef MIN_SCART_TV_2
             tv_out_id=TV_RGB;          
#else//MIN_SCART_TV_2
             tv_out_id=INTERLACE;          
#endif//MIN_SCART_TV_2
        }
        #ifdef ADD_COMPONENT_MODE//lijd 2005-4-13 16:49
         #ifdef SCART_TV_OP//caoh 2005-6-27 13:33
        else if(tv_out_id==INTERLACE)
        {          
             tv_out_id=TV_RGB;  
        }
        else if(tv_out_id==TV_RGB)
        {          
             tv_out_id=P_SCAN;          
          }
        #else
         else if(tv_out_id==INTERLACE)
         {          
             tv_out_id=P_SCAN;  
         }
        #endif

        #endif
        
        else
        #ifdef EASTWIN_PORTABLE_DVD
        if(tv_out_id==INTERLACE)//tulijuan040805
        {
             tv_out_id=P_SCAN;          

        }else/*
        if(tv_out_id==P_SCAN )//tulijuan040908
        {
          tv_out_id=OFF;          

        }else*/
        #endif
        #ifdef SCART_TV_OP//caoh 2005-6-29 13:26
          tv_out_id=INTERLACE; 
        #elif defined(SCART_TV_OP1)
          tv_out_id=TV_RGB; 
        #else  
          tv_out_id=TV_SVIDEO;
	#endif       
        setup_tv_out(tv_out_id);
        search_ap_tv_out_id();
        setup_SetPScan();
//        printf("out, tv_out_id:%x ap_tv_out_id:%x\n",tv_out_id,ap_tv_out_id);
    }
    #ifdef EASTWIN_PORTABLE_DVD
    run_save_total_userSet();//tulijuan040825 save tv_mode
    #endif

    OSD1000ISP_STATUS(tv_out_id, OSDIR_SCAN_VGA);

    PrintOsdMsg(video_setup_id[ap_tv_out_id],REGION1,1,0);
}
#endif//#if defined(TV_FORMAT_CHG2_VIDEO_MODE)||defined(ADD_TV_VIDEO_MODE)


#if defined(TV_FORMAT_CHG2_VIDEO_MODE)||defined(ADD_TV_VIDEO_MODE)||defined(SUPPORT_IR_I2P_KEY)

static inline void ircmd_p_scan_mode(void)
{   
#ifdef MIN_SCART_TV_2
if( (tv_out_id!=TV_RGB)&&(tv_out_id!=P_SCAN) )
#else//#ifdef MIN_SCART_TV_2
if( (tv_out_id!=INTERLACE)&&(tv_out_id!=P_SCAN) )
#endif//#ifdef MIN_SCART_TV_2

{
    invalid_key();
    return; 
}

#ifndef ADJUSTING_ACTION_VALID_RIGHT_NOW    
    if(1)//action_click)
#endif//ADJUSTING_ACTION_VALID_RIGHT_NOW
    {
        //printf("in, tv_out_id:%x ap_tv_out_id:%x p_scan:%x id:%x\n",tv_out_id,ap_tv_out_id,p_scan,video_setup_id[ap_tv_out_id]);
        if(p_scan)
        {
//            if(is_ap_svideo)
//              tv_out_id=TV_SVIDEO;
//            else
#ifdef MIN_SCART_TV_2
             tv_out_id=TV_RGB;          
#else//MIN_SCART_TV_2
              tv_out_id=INTERLACE;             
#endif//MIN_SCART_TV_2      
        setup_tv_out(tv_out_id);


#ifdef MIN_SCART_TV_2
        PrintOsdMsg(STR_OS_TV_RGB,REGION1,1,0);   
#elif defined(SUPPORT_IR_I2P_KEY)
        PrintOsdMsg(STR_OS_INTERLACE,REGION1,1,0);   
#else//#ifdef MIN_SCART_TV_2
        PrintOsdMsg(STR_OS_YCbCr,REGION1,1,0);   
#endif//#ifdef MIN_SCART_TV_2

        }else
        {

             tv_out_id=P_SCAN;             
             setup_tv_out(P_SCAN);       
#if defined(SUPPORT_IR_I2P_KEY)
        PrintOsdMsg(STR_OS_PROGRESSIVE,REGION1,1,0);   
#else //#if defined(SUPPORT_IR_I2P_KEY)
             PrintOsdMsg(STR_OS_P_SCAN_YUV,REGION1,1,0);      
#endif//#if defined(SUPPORT_IR_I2P_KEY)
        }
#if defined(SUPPORT_IR_I2P_KEY)        
        search_ap_tv_out_id();
        setup_SetPScan();
#endif        
       
//        printf("out, tv_out_id:%x ap_tv_out_id:%x p_scan:%x id:%x\n",tv_out_id,ap_tv_out_id,p_scan,video_setup_id[ap_tv_out_id]);
    }

//    PrintOsdMsg(video_setup_id[ap_tv_out_id],REGION1,1,0);
}

#endif//#if defined(TV_FORMAT_CHG2_VIDEO_MODE)||defined(ADD_TV_VIDEO_MODE)


static inline void ircmd_p_scan_all_mode(void)
{   
#ifndef ADJUSTING_ACTION_VALID_RIGHT_NOW    
    if(action_click)
#endif//ADJUSTING_ACTION_VALID_RIGHT_NOW
    {
        ap_tv_out_id++;

        if (ap_tv_out_id>=MODE_MAX_PSCAN) ap_tv_out_id=0;

        tv_out_id=tv_out_map[ap_tv_out_id];
        setup_tv_out(tv_out_id);
        setup_SetPScan();
        
    }

    OSD1000ISP_STATUS(ap_tv_out_id, OSDIR_SCAN_VGA);

    PrintOsdMsg(video_setup_id[ap_tv_out_id],REGION1,1,0);
}

#ifdef QSI_PLATFORM //qsi: merge by johnson 20040712
//qsi: add by sharon
extern void spi_cmd_tvout(void);
extern UINT8 uSpiRxData;
#define MAX_TVOUT_MODE  8
#define IR_TO_SPI_ADJ  0x40

void ircmd_tvout(void)
{
    ap_tv_out_id++;
       
    uSpiRxData = ap_tv_out_id + IR_TO_SPI_ADJ;
    spi_cmd_tvout();              

    if( ap_tv_out_id >= MAX_TVOUT_MODE )
    {
        ap_tv_out_id = 0;   
    }
    return;
}
#endif

#ifdef SUPPORT_VFD_SHOW_P_SCAN
void ircmd_p_scan_only(void)
{
      if(ap_tv_out_id==2)
      return;
      ap_tv_out_id=2;
      tv_out_id=tv_out_map[ap_tv_out_id];
        setup_tv_out(tv_out_id);
        //setup_SetPScan();
       OsdShowPscan(1);
}
void ircmd_yuv_only(void)
{
      if(ap_tv_out_id==0)
      return;
      ap_tv_out_id=0;
      tv_out_id=tv_out_map[ap_tv_out_id];
        setup_tv_out(tv_out_id);
        //setup_SetPScan();
       OsdShowPscan(0);
}
#endif

void ircmd_p_scan(void)
{
  #ifdef SUPPORT_MIDI
    #if !defined(IR44)
     if(midiState == MIDI_STATE_PAYLOAD) return;//axel2004.08.09
     
    #else//!defined(IR44)
        //if (bMidiPlayerBoolean) { //Jeff 20031029
        if(midiState == MIDI_STATE_PAYLOAD){ // dtb 20040109
            ircmd_key_down();
            return;
        }
        #ifdef SUPPORT_MIDI_MENU_SEL
        if (gIsMidiSelMenu)  return;
        #endif
    #endif//!defined(IR44)axel2004.08.09
   #endif//SUPPORT_MIDI

#if defined(MINTON_DVD)
    if (full_scrn&SETUP)
    {
        return;
    }   
#endif
#if defined(P_SCAN_ONLY_CHG_INT_MODE)||defined(SUPPORT_IR_I2P_KEY)
    ircmd_p_scan_mode();
#elif defined(QSI_PLATFORM) //qsi: merge by johnson 20040712
    ircmd_tvout();
//qsi: add by sharon    
#else 
    ircmd_p_scan_all_mode();
#endif
#ifdef CD_PLAYER        //liweihua 2003-9-3
    if((cd_type_loaded==CDDA)&&(play_state!=VCD_STATE_STOP))
    {
        show_cdplayer();
    }
#endif

#if defined(SUPPORT_TUNER_MV114) || defined(SUPPORT_TUNER_ALPS)  //xyy 2003-10-13 9:42
        if(play_state == VCD_STATE_POWER)
            disfreq();
#endif
}

#ifdef ONLY_INTERLACE_KEY
/*
 *video output mode :
 *      INTERLACE
 */        
void ircmd_interlace(void)
{
    tv_out_id = INTERLACE;
    setup_tv_out(tv_out_id);
//    setup_SetPScan();  //fengjl marked it  3-11-25 22:19
    
    //PrintOsdMsg(STR_OS_YCbCr, REGION1, 1, 0);
    PrintOsdMsg(STR_OS_YCbCr, REGION1, 3, 0);    
    WriteToI2c(0xa0, VIDEO_OUTPUT_ADDR, (BYTE *)&tv_out_id,sizeof(tv_out_id));
    //refresh VFD pannel
    tv_output_vfd_time = VIDEO_VFD_DELAY_TIME;

        
}
#endif

#ifdef ONLY_VGA_KEY
/*
 *video output mode :
 *      VGA
 */        
void ircmd_VGA(void)
{
    printf("---VGA---\n");
    
        tv_out_id = PC_VGA;
        setup_tv_out(tv_out_id);
//      setup_SetPScan();   //fengjl marked it  3-11-25 22:19
    
        //PrintOsdMsg(STR_OS_PC_VGA, REGION1, 1, 0);
        PrintOsdMsg(STR_OS_PC_VGA, REGION1, 3, 0);      
        
    
        //save tv_out_id_value
    WriteToI2c(0xa0, VIDEO_OUTPUT_ADDR, (BYTE *)&tv_out_id,sizeof(tv_out_id));
    //refresh VFD pannel
    tv_output_vfd_time = VIDEO_VFD_DELAY_TIME;
}
#endif//ONLY_VGA_KEY

#ifdef ONLY_P_SCAN_KEY

/*
 *video output mode :
 *      P_SCAN
 */        
#ifdef GBM_DVD
void ircmd_only_P_SCAN(void)
{
    printf("-----------P_SCAN---\n");
        tv_out_id = P_SCAN;
        setup_tv_out(tv_out_id);
        setup_SetPScan(); 

    PrintOsdMsg(STR_OS_P_SCAN_YUV, REGION1, 1, 0);     

    
}

#else//GBM_DVD
void ircmd_only_P_SCAN(void)
{
    printf("-----------P_SCAN---\n");
        tv_out_id = P_SCAN;
        setup_tv_out(tv_out_id);
//          setup_SetPScan();   //fengjl marked it  3-11-25 22:19
    
        //PrintOsdMsg(STR_OS_P_SCAN_YUV, REGION1, 1, 0);
    PrintOsdMsg(STR_OS_P_SCAN_YUV, REGION1, 3, 0);     
    WriteToI2c(0xa0, VIDEO_OUTPUT_ADDR, (BYTE *)&tv_out_id,sizeof(tv_out_id));
    //refresh VFD pannel
    tv_output_vfd_time = VIDEO_VFD_DELAY_TIME;
    
}
#endif//GBM_DVD
#endif//ONLY_P_SCAN_KEY

/*
#ifdef BBK_DVD    //fengjl marked it  3-11-25 22:19
/
 *  default TV output is "INTERLACE"
 * 
 * to avoid the bug when POWER ON, S video can not output normally.
 * zhaoyanhua add 2003-11-24 14:13
 /
void tv_init_output(void)
{
    tv_out_id = INTERLACE;
    setup_tv_out(tv_out_id);
//    setup_SetPScan();
    
}

#endif
*/


void ircmd_chg_dac(void)
{
#if 0    
    regs0->emu_cfg[1] = regs0->emu_cfg[1]^0x100;
#endif    
}


/*
** display format
*/
void    ircmd_display_format_toggle(void)
{

#ifdef INVALID_TV_FORMAT_KEY_IN_SETUP        //hq, 2004-3-13 15:24
    if(full_scrn&SETUP)
    {       
        return;
    }
#endif  

#ifdef TVFORMAT_USE_IR_CRT
#if defined(MINTON_DVD) 
    if (full_scrn&SETUP)
    {
        return;
    }   
#endif
#if defined(SDRAM_16Mb_Mode)    
    if( (full_scrn&SETUP)||(full_scrn&PROGRAM) )
    {
        return;
    }   
#endif

#if defined(TV_FORMAT_CHG2_VIDEO_MODE)&&!defined(ADD_TV_VIDEO_MODE) 
    ircmd_tv_sys_mode();
#else   
    ircmd_TV_format_toggle();
#endif
    #ifdef SUPPORT_MULTI_PARTITION//yangli mod 2005-7-5
        if(pFsJpeg->gifsState == FS_STATE_MODE)
            {        
                osd_show_pmp_hl(fsPmp.main_icon_will);
            }
        if(pFsJpeg->gifsState == FS_STATE_SETUP)
            {
                osd_show_setup_hl(fsPmp.setup_menu_will);
            }
    #endif
#endif//TVFORMAT_USE_IR_CRT
}


⌨️ 快捷键说明

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