[Mplayer-cvslog] CVS: main/libvo vesa_lvo.h,1.2,1.3 vo_directfb.c,1.24,1.25 vo_svga.c,1.57,1.58

Alex Beregszaszi alex at mplayerhq.hu
Sun Dec 22 17:31:08 CET 2002


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

Modified Files:
	vesa_lvo.h vo_directfb.c vo_svga.c 
Log Message:
dos2unix conversion

Index: vesa_lvo.h
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vesa_lvo.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- vesa_lvo.h	18 Nov 2001 15:06:32 -0000	1.2
+++ vesa_lvo.h	22 Dec 2002 16:31:05 -0000	1.3
@@ -1,27 +1,27 @@
-/*
- *  vesa_lvo.c
- *
- *	Copyright (C) Nick Kurshev <nickols_k at mail.ru> - Oct 2001
- *
- *  You can redistribute this file under terms and conditions
- *  of GNU General Public licence v2.
- *
- * This file contains vo_vesa interface to Linux Video Overlay.
- */
-
-#ifndef __VESA_LVO_INCLUDED
-#define __VESA_LVO_INCLUDED
+/*
+ *  vesa_lvo.c
+ *
+ *	Copyright (C) Nick Kurshev <nickols_k at mail.ru> - Oct 2001
+ *
+ *  You can redistribute this file under terms and conditions
+ *  of GNU General Public licence v2.
+ *
+ * This file contains vo_vesa interface to Linux Video Overlay.
+ */
+
+#ifndef __VESA_LVO_INCLUDED
+#define __VESA_LVO_INCLUDED
 
 int	 vlvo_preinit(
const char *drvname);
-int      vlvo_init(unsigned src_width,unsigned src_height,
-		   unsigned x_org,unsigned y_org,unsigned dst_width,
-		   unsigned dst_height,unsigned format,unsigned dest_bpp);
-void     vlvo_term( void );
-uint32_t vlvo_query_info(unsigned format);
-
-uint32_t vlvo_draw_slice(uint8_t *image[], int stride[], int w,int h,int x,int y);
-uint32_t vlvo_draw_frame(uint8_t *src[]);
-void     vlvo_flip_page(void);
-void     vlvo_draw_osd(void);
-
-#endif
+int      vlvo_init(unsigned src_width,unsigned src_height,
+		   unsigned x_org,unsigned y_org,unsigned dst_width,
+		   unsigned dst_height,unsigned format,unsigned dest_bpp);
+void     vlvo_term( void );
+uint32_t vlvo_query_info(unsigned format);
+
+uint32_t vlvo_draw_slice(uint8_t *image[], int stride[], int w,int h,int x,int y);
+uint32_t vlvo_draw_frame(uint8_t *src[]);
+void     vlvo_flip_page(void);
+void     vlvo_draw_osd(void);
+
+#endif

Index: vo_directfb.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_directfb.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- vo_directfb.c	11 Nov 2002 15:20:25 -0000	1.24
+++ vo_directfb.c	22 Dec 2002 16:31:05 -0000	1.25
@@ -1660,13 +1660,13 @@
 
 if (videolayer) {	
 	
-#if DIRECTFBVERSION > 912
-        DFBDisplayLayerDescription  desc;
-        videolayer->GetDescription(videolayer,&desc);
-        caps = desc.caps;
-#else
-	videolayer->GetCapabilities(videolayer,&caps);
-#endif
+#if DIRECTFBVERSION > 912
+        DFBDisplayLayerDescription  desc;
+        videolayer->GetDescription(videolayer,&desc);
+        caps = desc.caps;
+#else
+	videolayer->GetCapabilities(videolayer,&caps);
+#endif
 	ca.flags=DCAF_NONE;
 	
 	if (! strcmp( data,"brightness" )) {
@@ -1719,13 +1719,13 @@
 	DFBDisplayLayerCapabilities  caps;
 	
 if (videolayer) {	
-#if DIRECTFBVERSION > 912
-        DFBDisplayLayerDescription  desc;
-        videolayer->GetDescription(videolayer,&desc);
-        caps = desc.caps;
-#else
-	videolayer->GetCapabilities(videolayer,&caps);
-#endif
+#if DIRECTFBVERSION > 912
+        DFBDisplayLayerDescription  desc;
+        videolayer->GetDescription(videolayer,&desc);
+        caps = desc.caps;
+#else
+	videolayer->GetCapabilities(videolayer,&caps);
+#endif
 
 	videolayer->GetColorAdjustment(videolayer,&ca);
 	

Index: vo_svga.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_svga.c,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -r1.57 -r1.58
--- vo_svga.c	22 Dec 2002 13:27:05 -0000	1.57
+++ vo_svga.c	22 Dec 2002 16:31:05 -0000	1.58
@@ -18,10 +18,10 @@
 #include "video_out.h"
 #include "video_out_internal.h"
 
-#ifdef CONFIG_VIDIX
-#include "vosub_vidix.h"
-#endif
-
+#ifdef CONFIG_VIDIX
+#include "vosub_vidix.h"
+#endif
+
 #include "sub.h"
 #include "../postproc/rgb2rgb.h"
 
@@ -45,10 +45,10 @@
 
 static int BYTESPERPIXEL, WIDTH, HEIGHT, LINEWIDTH;
 static int frame, maxframes, oldmethod=0;
-static int directrender;
-
-static int force_vm=0;
-static int squarepix=0;
+static int directrender;
+
+static int force_vm=0;
+static int squarepix=0;
 
 static uint32_t pformat;
 static uint32_t orig_w, orig_h, maxw, maxh; // Width, height
@@ -87,10 +87,10 @@
         ""
 };
 
-#ifdef CONFIG_VIDIX
-static char vidix_name[32] = "";
-#endif
-
+#ifdef CONFIG_VIDIX
+static char vidix_name[32] = "";
+#endif
+
 LIBVO_EXTERN(svga)
 
 static uint32_t preinit(const char *arg)
@@ -105,50 +105,50 @@
       maxframes=1;
   }
 
-  if(arg)while(*arg) {
-	  if(!strncmp(arg,"old",3)) {
-			oldmethod=1;
-			arg+=3;
-			if( *arg == ':' ) arg++;
-	  }
-
-#ifdef CONFIG_VIDIX  
-	  if(memcmp(arg,"vidix",5)==0) {
-		  int i;
-		  i=6;
-		  while(arg[i] && arg[i]!=':') i++;
-		  strncpy(vidix_name, arg+6, i-6);
-		  vidix_name[i-5]=0;
-		  if(arg[i]==':')i++;
-		  arg+=i;
-		  vidix_preinit(vidix_name, &video_out_svga);
-	  }
-#endif
-	  if(!strncmp(arg,"sq",2)) {
-	  	squarepix=1;
-		arg+=2;
-		if( *arg == ':' ) arg++;
-	  }
- 
-	  if(*arg) {
-		  int i;
-		  char s[64];
-printf("arg is %s\n",arg);
-		  i=0;
-		  while(arg[i] && arg[i]!=':')i++;
-		  strncpy(s, arg, i);
-		  s[i]=0;
-		  arg+=i;
-		  if(*arg==':')arg++;
-printf("i=%i new arg is %s\n",i, arg);
-		  i=vga_getmodenumber(s);
-		  if(i>0) {
-			  force_vm = i;
-			  if(verbose)printf("vo_svga: Forcing mode %i\n",force_vm);
-	  	  }
-	  }
-  }
-
+  if(arg)while(*arg) {
+	  if(!strncmp(arg,"old",3)) {
+			oldmethod=1;
+			arg+=3;
+			if( *arg == ':' ) arg++;
+	  }
+
+#ifdef CONFIG_VIDIX  
+	  if(memcmp(arg,"vidix",5)==0) {
+		  int i;
+		  i=6;
+		  while(arg[i] && arg[i]!=':') i++;
+		  strncpy(vidix_name, arg+6, i-6);
+		  vidix_name[i-5]=0;
+		  if(arg[i]==':')i++;
+		  arg+=i;
+		  vidix_preinit(vidix_name, &video_out_svga);
+	  }
+#endif
+	  if(!strncmp(arg,"sq",2)) {
+	  	squarepix=1;
+		arg+=2;
+		if( *arg == ':' ) arg++;
+	  }
+ 
+	  if(*arg) {
+		  int i;
+		  char s[64];
+printf("arg is %s\n",arg);
+		  i=0;
+		  while(arg[i] && arg[i]!=':')i++;
+		  strncpy(s, arg, i);
+		  s[i]=0;
+		  arg+=i;
+		  if(*arg==':')arg++;
+printf("i=%i new arg is %s\n",i, arg);
+		  i=vga_getmodenumber(s);
+		  if(i>0) {
+			  force_vm = i;
+			  if(verbose)printf("vo_svga: Forcing mode %i\n",force_vm);
+	  	  }
+	  }
+  }
+
   if (!checked) {
     if (checksupportedmodes()) // Looking for available video modes 
       return(1);
@@ -169,7 +169,7 @@
 }
 
 static uint32_t config(uint32_t width, uint32_t height, uint32_t d_width,
-                     uint32_t d_height, uint32_t flags, char *title, 
+                     uint32_t d_height, uint32_t flags, char *title, 
 		     uint32_t format) {
   uint32_t req_w = (d_width > 0 ? d_width : width);
   uint32_t req_h = (d_height > 0 ? d_height : height);
@@ -178,10 +178,10 @@
   uint16_t buf_w = USHRT_MAX, buf_h = USHRT_MAX;
   vga_modelist_t *list = modelist;
 
-  if(verbose)
-	  printf("vo_svga: config(%i, %i, %i, %i, %08x, %s, %08x)\n", width, height, 
-			  d_width, d_height, flags, title, format);
-  
+  if(verbose)
+	  printf("vo_svga: config(%i, %i, %i, %i, %08x, %s, %08x)\n", width, height, 
+			  d_width, d_height, flags, title, format);
+  
   bpp_avail = 0;
   while (list != NULL) {
     if ((list->modeinfo.width >= req_w) && (list->modeinfo.height >= req_h)) {
@@ -205,7 +205,7 @@
   // bpp check
   bpp_conv = 0;
   if (!vo_dbpp) {
-    if (!IMGFMT_IS_RGB(format) && !IMGFMT_IS_BGR(format)) bpp = 32;
+    if (!IMGFMT_IS_RGB(format) && !IMGFMT_IS_BGR(format)) bpp = 32;
     else bpp = format & 255;
     if (verbose)
       printf("vo_svga: vo_dbpp == 0, bpp: %d\n",bpp);
@@ -404,10 +404,10 @@
     list = list->next;
   }
 
-  if(force_vm) {
+  if(force_vm) {
       list=modelist;
       while(list) {
-          if(list->modenum == force_vm) {
+          if(list->modenum == force_vm) {
              buf_w = list->modeinfo.width;
              buf_h = list->modeinfo.height;
 	     res_widescr = (((buf_w*1.0)/buf_h) > (4.0/3)) ? 1 : 0;
@@ -442,13 +442,13 @@
                      }
                      break;
              }
-             vid_mode=force_vm;
+             vid_mode=force_vm;
              list=NULL;
       	  } else list=list->next;
       }
   }
 
- 
+ 
   if (verbose)
     printf("vo_svga: vid_mode: %d\n",vid_mode);
   if (vga_setmode(vid_mode) == -1) {
@@ -476,17 +476,17 @@
   if(bpp==1)
     LINEWIDTH=(WIDTH+7)/8;
   else
-    LINEWIDTH=vga_getmodeinfo(vid_mode)->linewidth;
+    LINEWIDTH=vga_getmodeinfo(vid_mode)->linewidth;
 
   vga_setlinearaddressing();
   if(oldmethod) {
      buffer=malloc(HEIGHT*LINEWIDTH);
      maxframes=0;
-  } else if ((vga_getmodeinfo(vid_mode)->flags&IS_LINEAR)) {
-  	directrender=1;
-	if(verbose) printf("vo_svga: Using direct rendering to linear video ram.\n");
+  } else if ((vga_getmodeinfo(vid_mode)->flags&IS_LINEAR)) {
+  	directrender=1;
+	if(verbose) printf("vo_svga: Using direct rendering to linear video ram.\n");
   }
-  
+  
   vga_claimvideomemory((maxframes+1)*HEIGHT*LINEWIDTH);
   GRAPH_MEM=vga_getgraphmem();
   frame=0;
@@ -494,8 +494,8 @@
   
   orig_w = width;
   orig_h = height;
-  maxw = req_w;
-  maxh = req_h;
+  maxw = req_w;
+  maxh = req_h;
 
   if (bpp_conv) {
     bppbuf = malloc(maxw * maxh * BYTESPERPIXEL);
@@ -507,29 +507,29 @@
   }
 
 #ifdef CONFIG_VIDIX
-  if(!vidix_name[0]){
+  if(!vidix_name[0]){
 #endif
-  	maxw = width; /* No scaling */
-  	maxh = height;
+  	maxw = width; /* No scaling */
+  	maxh = height;
 #ifdef CONFIG_VIDIX
-  }	
+  }	
 #endif
-  if (pformat == IMGFMT_YV12) {
-    yuv2rgb_init(bpp, MODE_RGB);
-  }
-
+  if (pformat == IMGFMT_YV12) {
+    yuv2rgb_init(bpp, MODE_RGB);
+  }
+
   x_pos = (WIDTH - maxw) / 2;
   y_pos = (HEIGHT - maxh) / 2;
   
-#ifdef CONFIG_VIDIX
-  if(vidix_name[0]){ 
-  	vidix_init(width, height, x_pos, y_pos, maxw, maxh, format, bpp, 
-		  WIDTH, HEIGHT);
-  	printf("vo_svga: Using VIDIX. w=%i h=%i  mw=%i mh=%i\n",width,height,maxw,maxh);
-  	vidix_start();
-  }
-#endif    
-
+#ifdef CONFIG_VIDIX
+  if(vidix_name[0]){ 
+  	vidix_init(width, height, x_pos, y_pos, maxw, maxh, format, bpp, 
+		  WIDTH, HEIGHT);
+  	printf("vo_svga: Using VIDIX. w=%i h=%i  mw=%i mh=%i\n",width,height,maxw,maxh);
+  	vidix_start();
+  }
+#endif    
+
     if(bpp==1)
       yuvbuf = malloc((maxw+7)/8 * maxh);
     else
@@ -570,19 +570,19 @@
                            int w, int h, int x, int y) {
   uint8_t *src = yuvbuf;
   uint32_t sw, sh;
-
-  if(directrender) {
-  	  yuv2rgb(GRAPH_MEM+(frame*HEIGHT+y+y_pos)*LINEWIDTH+(x+x_pos)*BYTESPERPIXEL,
-		  	  image[0], image[1], image[2], w, h, LINEWIDTH, stride[0], stride[1]);
-  } else {
+
+  if(directrender) {
+  	  yuv2rgb(GRAPH_MEM+(frame*HEIGHT+y+y_pos)*LINEWIDTH+(x+x_pos)*BYTESPERPIXEL,
+		  	  image[0], image[1], image[2], w, h, LINEWIDTH, stride[0], stride[1]);
+  } else {
   if(bpp==1)
     yuv2rgb(yuvbuf, image[0], image[1], image[2], w, h, (orig_w+7)/8, stride[0], stride[1]);
   else
-		yuv2rgb(yuvbuf, image[0], image[1], image[2], w, h, orig_w * BYTESPERPIXEL, 
-				stride[0], stride[1]);
+		yuv2rgb(yuvbuf, image[0], image[1], image[2], w, h, orig_w * BYTESPERPIXEL, 
+				stride[0], stride[1]);
 
   putbox(x + x_pos, y + y_pos, w, h, src, 1);
-  }
+  }
 
   return (0);
 }
@@ -631,18 +631,18 @@
 static void uninit(void) {
   vga_modelist_t *list = modelist;
 
-#ifdef CONFIG_VIDIX
-  if(vidix_name[0])vidix_term();
-#endif
-  
+#ifdef CONFIG_VIDIX
+  if(vidix_name[0])vidix_term();
+#endif
+  
   vga_setmode(TEXT);
 
   if (bppbuf != NULL)
     free(bppbuf);
-  bppbuf=NULL;
+  bppbuf=NULL;
   if (yuvbuf != NULL)
     free(yuvbuf);
-  
+  
   while (modelist != NULL) {
        list=modelist;
        modelist=modelist->next;
@@ -657,8 +657,8 @@
 static uint32_t add_mode(uint16_t mode, vga_modeinfo minfo) {
   vga_modelist_t *list;
 
-  if(squarepix && (minfo.height*4 != minfo.width*3)) return 0;
-  
+  if(squarepix && (minfo.height*4 != minfo.width*3)) return 0;
+  
   if (modelist == NULL) {
     modelist = (vga_modelist_t *) malloc(sizeof(vga_modelist_t));
     if (modelist == NULL) {




More information about the MPlayer-cvslog mailing list