[Mplayer-cvslog] CVS: main/vidix/drivers mga_vid.c,1.6,1.7

Nick Kurshev nick at mplayer.dev.hu
Sat Jan 19 09:19:03 CET 2002


Update of /cvsroot/mplayer/main/vidix/drivers
In directory mplayer:/var/tmp.root/cvs-serv25321/main/vidix/drivers

Modified Files:
	mga_vid.c 
Log Message:
gamma correction (preliminary version).

Index: mga_vid.c
===================================================================
RCS file: /cvsroot/mplayer/main/vidix/drivers/mga_vid.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- mga_vid.c	18 Jan 2002 18:14:10 -0000	1.6
+++ mga_vid.c	19 Jan 2002 08:19:00 -0000	1.7
@@ -1457,3 +1457,30 @@
     memcpy(&mga_grkey, grkey, sizeof(vidix_grkey_t));
     return(0);
 }
+
+#ifdef TEST_ME_PLEASE
+vidix_video_eq_t equal = { 0, 0, 0, 0, 0, 0, 0, 0 };
+int 	vixPlaybackSetEq( const vidix_video_eq_t * eq)
+{
+   uint32_t beslumactl;
+   int brightness,contrast;
+	memcpy(&equal,eq,sizeof(vidix_video_eq_t));
+	//Enable contrast and brightness control
+	writel(readl(mga_mmio_base + BESGLOBCTL) & ~((1<<5) + (1<<7)),mga_mmio_base + BESGLOBCTL);
+	brightness = (equal.brightness * 128) / 1000;
+	if(brightness < -128) brightness = -128;
+	if(brightness > 127) brightness = 127;
+	contrast = ((equal.contrast + 1000) * 128) / 1000;
+	if(contrast < 0)   contrast = 0;
+	if(contrast > 255) contrast = 255;
+	beslumactl = ((brightness & 0xff) << 16) | (contrast & 0xff);
+	writel(beslumactl,mga_mmio_base + BESLUMACTL);
+    return 0;
+}
+
+int 	vixPlaybackGetEq( vidix_video_eq_t * eq)
+{
+  memcpy(eq,&equal,sizeof(vidix_video_eq_t));
+  return 0;
+}
+#endif




More information about the MPlayer-cvslog mailing list