[Mplayer-cvslog] CVS: main dec_video.c,1.98,1.99

Nick Kurshev nick at mplayer.dev.hu
Sun Feb 3 17:13:08 CET 2002


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

Modified Files:
	dec_video.c 
Log Message:
Direct rendering expansion:
test with -vc divx4vfw:
-vaa_dr:
BENCHMARKs: V:   7.043s VO:   0.005s A:   0.528s Sys:  22.331s =   29.907s
BENCHMARK%: V: 23.5498% VO:  0.0156% A:  1.7670% Sys: 74.6676% = 100.0000%

-vaa_nodr:
BENCHMARKs: V:   5.454s VO:   2.433s A:   0.519s Sys:  21.513s =   29.920s
BENCHMARK%: V: 18.2296% VO:  8.1321% A:  1.7351% Sys: 71.9032% = 100.0000%

speed up on 7.043 vs 7.687 = 10% on K7


Index: dec_video.c
===================================================================
RCS file: /cvsroot/mplayer/main/dec_video.c,v
retrieving revision 1.98
retrieving revision 1.99
diff -u -r1.98 -r1.99
--- dec_video.c	3 Feb 2002 15:16:46 -0000	1.98
+++ dec_video.c	3 Feb 2002 16:13:05 -0000	1.99
@@ -471,6 +471,8 @@
       return 0;
    }  
    mp_msg(MSGT_DECVIDEO,MSGL_V,"INFO: Win32 video codec init OK!\n");
+   /* Warning: these pitches tested only with YUY2 fourcc */
+   pitches[0] = 16; pitches[1] = pitches[2] = 8;
    break;
  }
  case VFM_VFWEX: {
@@ -478,6 +480,8 @@
       return 0;
    }  
    mp_msg(MSGT_DECVIDEO,MSGL_V,"INFO: Win32Ex video codec init OK!\n");
+   /* Warning: these pitches tested only with YUY2 fourcc */
+   pitches[0] = 16; pitches[1] = pitches[2] = 8;
    break;
  }
  case VFM_DSHOW: { // Win32/DirectShow
@@ -1017,10 +1021,24 @@
   {
     int ret;
     if(!in_size) break;
+	/* FIXME: WILL WORK ONLY FOR PACKED FOURCC. BUT WHAT ABOUT PLANAR? */
+        vmem = 0;
+	if(use_dr && bda.dest.pitch.y == 16)
+	{
+	    vmem = bda.dga_addr + bda.offsets[0] + bda.offset.y;
+	    if(vo_doublebuffering && bda.num_frames>1)
+	    {
+		if(double_buff_num) vmem = bda.dga_addr + bda.offsets[1] + bda.offset.y;
+		else		    vmem = bda.dga_addr + bda.offsets[0] + bda.offset.y;
+		double_buff_num = double_buff_num ? 0 : 1;
+	    }
+	    sh_video->our_out_buffer = vmem;
+	}
     if((ret=vfw_decode_video(sh_video,start,in_size,drop_frame,(sh_video->codec->driver==VFM_VFWEX) ))){
       mp_msg(MSGT_DECVIDEO,MSGL_WARN,"Error decompressing frame, err=%d\n",ret);
       break;
     }
+    if(vmem) painted=1;
     if(!drop_frame) blit_frame=3;
     break;
   }




More information about the MPlayer-cvslog mailing list