ModeIndex = ModeIndex_720x576[Depth]; } 
ModeIndex = ModeIndex_720x576[Depth]; } 
SiS_GetModeID_TV(int VGAEngine, ULONG VBFlags, int HDisplay, int VDisplay, int Depth){   USHORT ModeIndex = 0;   if(VBFlags & VB_CHRONTEL) {      switch(HDisplay)      {      	case 512:	     if(VGAEngine == SIS_315_VGA) {		if(VDisplay == 384) ModeIndex = ModeIndex_512x384[Depth];	     }	     break;	case 640:	     if(VDisplay == 480)      ModeIndex = ModeIndex_640x480[Depth];	     else if(VDisplay == 400) ModeIndex = ModeIndex_640x400[Depth];	     break;	case 800:	     if(VDisplay == 600) ModeIndex = ModeIndex_800x600[Depth];	     break;	case 1024:	     if(VGAEngine == SIS_315_VGA) {	        if(VDisplay == 768) ModeIndex = ModeIndex_1024x768[Depth];	     }	     break;      }   } else if(VBFlags & VB_SISTVBRIDGE) {      switch(HDisplay)      {	case 320:     	     if(VDisplay == 200)      ModeIndex = ModeIndex_320x200[Depth];	     else if(VDisplay == 240) ModeIndex = ModeIndex_320x240[Depth];             break;        case 400:             if(VDisplay == 300) ModeIndex = ModeIndex_400x300[Depth];             break;      	case 512:	     if( ((VBFlags & TV_YPBPR) && (VBFlags & (TV_YPBPR750P | TV_YPBPR1080I))) ||	         (VBFlags & TV_HIVISION) 					      ||	         ((!(VBFlags & (TV_YPBPR | TV_PALM))) && (VBFlags & TV_PAL)) ) {	        if(VDisplay == 384) ModeIndex = ModeIndex_512x384[Depth];	     }	     break;	case 640:	     if(VDisplay == 480)      ModeIndex = ModeIndex_640x480[Depth];	     else if(VDisplay == 400) ModeIndex = ModeIndex_640x400[Depth];	     break;	case 720:	     if((!(VBFlags & TV_HIVISION)) && (!((VBFlags & TV_YPBPR) && (VBFlags & TV_YPBPR1080I)))) {                if(VDisplay == 480) {                   ModeIndex = ModeIndex_720x480[Depth];                } else if(VDisplay == 576) {		   if( ((VBFlags & TV_YPBPR) && (VBFlags & TV_YPBPR750P)) ||		       ((!(VBFlags & (TV_YPBPR | TV_PALM))) && (VBFlags & TV_PAL)) )                      ModeIndex = ModeIndex_720x576[Depth];                }	     }             break;	case 768:	     if((!(VBFlags & TV_HIVISION)) && (!((VBFlags & TV_YPBPR) && (VBFlags & TV_YPBPR1080I)))) {	        if( ((VBFlags & TV_YPBPR) && (VBFlags & TV_YPBPR750P)) ||		    ((!(VBFlags & (TV_YPBPR | TV_PALM))) && (VBFlags & TV_PAL)) ) {          	   if(VDisplay == 576) ModeIndex = ModeIndex_768x576[Depth];		}             }	     break;	case 800:	     if(VDisplay == 600) ModeIndex = ModeIndex_800x600[Depth];	     else if(VDisplay == 480) {	        if((VBFlags & TV_HIVISION) || ((VBFlags & TV_YPBPR) && (VBFlags & TV_YPBPR1080I))) {		   ModeIndex = ModeIndex_800x480[Depth];		}	     }	     break;	case 960:	     if(VGAEngine == SIS_315_VGA) {	        if(VDisplay == 600) {		   if((VBFlags & TV_HIVISION) || ((VBFlags & TV_YPBPR) && (VBFlags & TV_YPBPR1080I))) {		      ModeIndex = ModeIndex_960x600[Depth];		   }		}	     }	     break;	case 1024:	     if(VDisplay == 768) {		if(VBFlags & (VB_301B|VB_301C|VB_302B|VB_301LV|VB_302LV|VB_302ELV)) {		   ModeIndex = ModeIndex_1024x768[Depth];		}	     } else if(VDisplay == 576) {	        if((VBFlags & TV_HIVISION) || ((VBFlags & TV_YPBPR) && (VBFlags & TV_YPBPR1080I))) {		   ModeIndex = ModeIndex_1024x576[Depth];		}	     }	     break;	case 1280:	     if(VDisplay == 720) {	        if((VBFlags & TV_HIVISION) ||		   ((VBFlags & TV_YPBPR) && (VBFlags & (TV_YPBPR1080I | TV_YPBPR750P)))) {	           ModeIndex = ModeIndex_1280x720[Depth];		}	     } else if(VDisplay == 1024) {	        if((VBFlags & TV_HIVISION) ||		   ((VBFlags & TV_YPBPR) && (VBFlags & TV_YPBPR1080I))) {	           ModeIndex = ModeIndex_1280x1024[Depth];		}	     }	     break;      }   }   return ModeIndex;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/544393fe584d333480659a4bed30f5295355df11/init.c/clean/drivers/video/sis/init.c