[Mplayer-cvslog] CVS: main/libvo vo_aa.c,1.30,1.31

Alban Bedel CVS albeu at mplayerhq.hu
Fri Jul 26 04:04:14 CEST 2002


Update of /cvsroot/mplayer/main/libvo
In directory mail:/var/tmp.root/cvs-serv2847/libvo

Modified Files:
	vo_aa.c 
Log Message:
10L bugs founds by Jindrich Makovicka <makovick at MLinux dot fjfi dot cvut dotcz>
Fix the eq


Index: vo_aa.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_aa.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- vo_aa.c	20 Jul 2002 14:26:38 -0000	1.30
+++ vo_aa.c	26 Jul 2002 02:04:11 -0000	1.31
@@ -123,11 +123,11 @@
     sws = getSwsContextFromCmdLine(src_width,src_height,image_format,
 				   image_width,image_height,IMGFMT_Y8);
 
-    image[0] = aa_image(c) + image_y * image_width + image_x;
+    image[0] = aa_image(c) + image_y * aa_imgwidth(c) + image_x;
     image[1] = NULL;
     image[2] = NULL;
 
-    image_stride[0] = image_width;
+    image_stride[0] = aa_imgwidth(c);
     image_stride[1] = 0; 
     image_stride[2] = 0;
 
@@ -738,41 +738,40 @@
     return 0;
 }
 
-static int get_video_eq(vidix_video_eq_t *info) {
-
-  memset(info,0,sizeof(vidix_video_eq_t));
-  
-  info->cap = VEQ_CAP_BRIGHTNESS | VEQ_CAP_CONTRAST;
-  
-  info->contrast = (p->contrast - 64) * 1000 / 64;
-  info->brightness = (p->bright - 128) * 1000 / 128;
-
-  return 0;
-}
-
-static int set_video_eq(const vidix_video_eq_t *info) {
-
-  p->contrast = ( info->contrast + 1000 ) * 64 / 1000;
-  p->bright = ( info->brightness + 1000) * 128 / 1000;
-
-  return 0;
-}
-
-static void query_vaa(vo_vaa_t *vaa)
-{
-  memset(vaa,0,sizeof(vo_vaa_t));
-  vaa->get_video_eq = get_video_eq;
-  vaa->set_video_eq = set_video_eq;
-}
-
 static uint32_t control(uint32_t request, void *data, ...)
 {
   switch (request) {
   case VOCTRL_QUERY_FORMAT:
     return query_format(*((uint32_t*)data));
-  case VOCTRL_QUERY_VAA:
-    query_vaa((vo_vaa_t*)data);
+  case VOCTRL_SET_EQUALIZER: {
+    va_list ap;
+    int val;
+
+    va_start(ap, data);
+    val = va_arg(ap, int);
+    va_end(ap);
+
+    if(strcmp((char*)data,"contrast") == 0)
+      p->contrast = ( val + 100 ) * 64 / 100;
+    else if(strcmp((char*)data,"brightness") == 0)
+      p->bright = ( val + 100) * 128 / 100;
     return VO_TRUE;
+  }
+  case VOCTRL_GET_EQUALIZER: {
+    va_list ap;
+    int* val;
+
+    va_start(ap, data);
+    val = va_arg(ap, int*);
+    va_end(ap);
+
+    if(strcmp((char*)data,"contrast") == 0)
+      *val = (p->contrast - 64) * 100 / 64;
+    else if(strcmp((char*)data,"brightness") == 0)
+      *val = (p->bright - 128) * 100 / 128;
+
+    return VO_TRUE;
+  }
   }
   return VO_NOTIMPL;
 }




More information about the MPlayer-cvslog mailing list