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


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4517 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
nick 2002-02-03 16:13:05 +00:00
parent 4e067f62d4
commit 48ace4b1f7
1 changed files with 18 additions and 0 deletions

View File

@ -471,6 +471,8 @@ switch(sh_video->codec->driver){
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 @@ switch(sh_video->codec->driver){
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 @@ if(verbose>1){
{
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;
}