[Mplayer-cvslog] CVS: main configure,1.192,1.193 dec_video.c,1.47,1.48

Adam Tla/lka atlka at mplayer.dev.hu
Fri Oct 19 15:23:18 CEST 2001


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

Modified Files:
	configure dec_video.c 
Log Message:
added gamma, contrast and brightness for DivX4 version >= 20011010


Index: configure
===================================================================
RCS file: /cvsroot/mplayer/main/configure,v
retrieving revision 1.192
retrieving revision 1.193
diff -u -r1.192 -r1.193
--- configure	17 Oct 2001 18:17:50 -0000	1.192
+++ configure	19 Oct 2001 13:23:15 -0000	1.193
@@ -419,7 +419,7 @@
 cc_version=`$_cc -v 2>&1 | sed -n 's/^.*version \([aegcygnustp-]*[0-9.]*\).*$/\1/p'`
 case $cc_version in
     '') cc_version="v. ?.??, bad"; cc_verc_fail=yes;;
-    2.95.[2-9]|2.95.[2-9].[0-9]|3.[0-9]|3.[0-9].[0-9])
+    2.95.[2-9]|2.95.[2-9].[0-9]|3.[0-9]|3.[0-9].[0-9] )
        cc_version="$cc_version, ok";;
     *) cc_version="$cc_version, bad"; cc_verc_fail=yes;;
 esac

Index: dec_video.c
===================================================================
RCS file: /cvsroot/mplayer/main/dec_video.c,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -r1.47 -r1.48
--- dec_video.c	16 Oct 2001 23:30:38 -0000	1.47
+++ dec_video.c	19 Oct 2001 13:23:15 -0000	1.48
@@ -174,12 +174,26 @@
 
 int set_video_colors(sh_video_t *sh_video,char *item,int value){
 #ifdef USE_DIRECTSHOW
-    if(!strcmp(sh_video->codec->name,"divxds")){
-	DS_SetValue_DivX(item,value);
-	return 1;
-    }
+  if(!strcmp(sh_video->codec->name,"divxds")){
+	  DS_SetValue_DivX(item,value);
+	  return 1;
+  }
 #endif
-    return 0;
+#ifdef NEW_DECORE
+#if DECORE_VERSION >= 20011010
+  if(!strcmp(sh_video->codec->name,"divx4")){
+	  int option;
+	  if(!strcmp(item,"Brightness")) option=DEC_GAMMA_BRIGHTNESS;
+	  else if(!strcmp(item, "Contrast")) option=DEC_GAMMA_CONTRAST;
+	  else if(!strcmp(item,"Saturation")) option=DEC_GAMMA_SATURATION;
+	  else return 0;
+	  value = (value * 256) / 100 - 128;
+	  decore(0x123, DEC_OPT_GAMMA, (void *)option, (void *) value);
+	  return 1;
+  }
+#endif
+#endif	
+  return 0;
 }
 
 void uninit_video(sh_video_t *sh_video){




More information about the MPlayer-cvslog mailing list