[Mplayer-cvslog] CVS: main mplayer.c,1.243,1.244

Adam Tla/lka atlka at mplayer.dev.hu
Tue Aug 28 14:43:47 CEST 2001


Update of /cvsroot/mplayer/main
In directory mplayer:/var/tmp.root/cvs-serv3271

Modified Files:
	mplayer.c 
Log Message:

corrections to OSD progbar position calculations


Index: mplayer.c
===================================================================
RCS file: /cvsroot/mplayer/main/mplayer.c,v
retrieving revision 1.243
retrieving revision 1.244
diff -u -r1.243 -r1.244
--- mplayer.c	28 Aug 2001 08:06:26 -0000	1.243
+++ mplayer.c	28 Aug 2001 12:43:40 -0000	1.244
@@ -1612,8 +1612,8 @@
         if(osd_level){
           osd_visible=sh_video->fps; // 1 sec
           vo_osd_progbar_type=OSD_VOLUME;
-          vo_osd_progbar_value=(mixer_l+mixer_r)*255/200;
-          //printf("volume: %d\n",vo_osd_progbar_value);
+          vo_osd_progbar_value=((mixer_l+mixer_r)*256.0)/200.0;
+          // printf("volume: %d\n",vo_osd_progbar_value);
         }
 #endif
       }
@@ -1649,7 +1649,7 @@
     		if(osd_level){
             	    osd_visible=sh_video->fps; // 1 sec
 	    	    vo_osd_progbar_type=OSD_CONTRAST;
-            	    vo_osd_progbar_value=(v_cont)*255/100;
+            	    vo_osd_progbar_value=((v_cont)<<8)/100;
 		}
 #endif
 	}
@@ -1668,7 +1668,7 @@
     		if(osd_level){
             	    osd_visible=sh_video->fps; // 1 sec
 	    	    vo_osd_progbar_type=OSD_BRIGHTNESS;
-            	    vo_osd_progbar_value=(v_bright)*255/100;
+            	    vo_osd_progbar_value=((v_bright)<<8)/100;
 		}
 #endif
 	}
@@ -1687,7 +1687,7 @@
     		if(osd_level){
             	    osd_visible=sh_video->fps; // 1 sec
 	    	    vo_osd_progbar_type=OSD_HUE;
-            	    vo_osd_progbar_value=(v_hue)*255/100;
+            	    vo_osd_progbar_value=((v_hue)<<8)/100;
 		}
 #endif
 	}
@@ -1706,7 +1706,7 @@
     		if(osd_level){
             	    osd_visible=sh_video->fps; // 1 sec
 	    	    vo_osd_progbar_type=OSD_SATURATION;
-            	    vo_osd_progbar_value=(v_saturation)*255/100;
+            	    vo_osd_progbar_value=((v_saturation)<<8)/100;
 		}
 #endif
 	}
@@ -1763,10 +1763,6 @@
           osd_visible=sh_video->fps; // 1 sec
           vo_osd_progbar_type=0;
 	  vo_osd_progbar_value=(demuxer->filepos-demuxer->movi_start)/len;
-	  if (vo_osd_progbar_value<0)
-	     vo_osd_progbar_value=0;
-	  else if (vo_osd_progbar_value>255)
-	     vo_osd_progbar_value=255;
         }
       }
 #endif




More information about the MPlayer-cvslog mailing list