[Mplayer-cvslog] CVS: main/libvo vesa_lvo.c,1.6,1.7

Nick Kurshev nick at mplayer.dev.hu
Tue Nov 20 09:38:18 CET 2001


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

Modified Files:
	vesa_lvo.c 
Log Message:
Verbosing and minor optimization

Index: vesa_lvo.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vesa_lvo.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- vesa_lvo.c	18 Nov 2001 18:04:29 -0000	1.6
+++ vesa_lvo.c	20 Nov 2001 08:38:15 -0000	1.7
@@ -45,6 +45,7 @@
 
 int vlvo_preinit(const char *drvname)
 {
+  if(verbose > 1) printf("vesa_lvo: vlvo_preinit(%s) was called\n",drvname);
 	lvo_handler = open(drvname,O_RDWR);
 	if(lvo_handler == -1)
 	{
@@ -59,6 +60,7 @@
 		   unsigned dst_height,unsigned format,unsigned dest_bpp)
 {
   size_t i,awidth;
+  if(verbose > 1) printf("vesa_lvo: vlvo_init() was called\n");
 	image_width = src_width;
 	image_height = src_height;
 	mga_vid_config.version=MGA_VID_VERSION;
@@ -136,6 +138,7 @@
 
 void vlvo_term( void )
 {
+  if(verbose > 1) printf("vesa_lvo: vlvo_term() was called\n");
 	ioctl( lvo_handler,MGA_VID_OFF,0 );
 	munmap(frames[0],mga_vid_config.frame_size*mga_vid_config.num_frames);
 	if(lvo_handler != -1) close(lvo_handler);
@@ -181,7 +184,6 @@
         dest += bespitch2;
     }
 #else
- uint8_t *src;
  uint8_t *dst;
  uint8_t bytpp;
  bytpp = (image_bpp+7)/8;
@@ -194,32 +196,23 @@
     }
     else
 #endif
-    {
-      src = image[0];
-      memcpy(dst,src,w*h*bytpp);
-    }  
+      memcpy(dst,image[0],mga_vid_config.frame_size);
 #endif
+ if(verbose > 1) printf("vesa_lvo: vlvo_draw_slice() was called\n");
  return 0;
 }
 
-uint32_t vlvo_draw_frame(uint8_t *src[])
+uint32_t vlvo_draw_frame(uint8_t *image[])
 {
-	size_t i, ssize;
-	uint8_t *dest;
-	const uint8_t *sptr;
-	ssize = IMAGE_LINE_SIZE((image_bpp+7)/8);
-	dest = lvo_mem;
-	sptr = src[0];
-	for(i=0;i<image_height;i++)
-	{
-	   memcpy(dest,sptr,ssize);
-	   sptr += ssize;
-	   dest += ssize;
-	}
+/* Note it's very strange but sometime for YUY2 draw_frame is called */
+  memcpy(lvo_mem,image[0],mga_vid_config.frame_size);
+  if(verbose > 1) printf("vesa_lvo: vlvo_draw_frame() was called\n");
+  return 0;
 }
 
 void     vlvo_flip_page(void)
 {
+  if(verbose > 1) printf("vesa_lvo: vlvo_flip_page() was called\n");
 	ioctl(lvo_handler,MGA_VID_FSEL,&next_frame);
 	next_frame=(next_frame+1)%mga_vid_config.num_frames;
 	lvo_mem=frames[next_frame];
@@ -227,11 +220,12 @@
 
 void     vlvo_draw_osd(void)
 {
+  if(verbose > 1) printf("vesa_lvo: vlvo_draw_osd() was called\n");
   /* TODO: hw support */
 }
 
 uint32_t vlvo_query_info(uint32_t format)
 {
-  if(verbose) printf("vesa_lvo: query_format was called: %x (%s)\n",format,vo_format_name(format));
+  if(verbose > 1) printf("vesa_lvo: query_format was called: %x (%s)\n",format,vo_format_name(format));
   return 1;
 }




More information about the MPlayer-cvslog mailing list