[Mplayer-cvslog] CVS: main/vidix/drivers mach64_vid.c,1.18,1.19

Michael Niedermayer michael at mplayer.dev.hu
Thu Feb 28 17:21:00 CET 2002


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

Modified Files:
	mach64_vid.c 
Log Message:
use 4 buffers, fallback to fewer buffers if the video ram isnt large enough


Index: mach64_vid.c
===================================================================
RCS file: /cvsroot/mplayer/main/vidix/drivers/mach64_vid.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- mach64_vid.c	27 Feb 2002 14:57:33 -0000	1.18
+++ mach64_vid.c	28 Feb 2002 16:20:58 -0000	1.19
@@ -843,12 +843,18 @@
 int vixConfigPlayback(vidix_playback_t *info)
 {
   if(!is_supported_fourcc(info->fourcc)) return ENOSYS;
-  if(info->num_frames>3) info->num_frames=3; //more than 3 make no sense at the moment but they do work
 
   mach64_compute_framesize(info);
-  mach64_overlay_offset = mach64_ram_size - info->frame_size*info->num_frames;
-  mach64_overlay_offset &= 0xffff0000;
-  if(mach64_overlay_offset < 0) return EINVAL;
+
+  if(info->num_frames>4) info->num_frames=4;
+  for(;info->num_frames>0; info->num_frames--)
+  {
+      mach64_overlay_offset = mach64_ram_size - info->frame_size*info->num_frames;
+      mach64_overlay_offset &= 0xffff0000;
+      if(mach64_overlay_offset>0) break;
+  }
+  if(info->num_frames <= 0) return EINVAL;
+
   info->dga_addr = (char *)mach64_mem_base + mach64_overlay_offset;
   mach64_vid_init_video(info);
   return 0;




More information about the MPlayer-cvslog mailing list