diff options
author | nick <nick@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-02-03 16:13:05 +0000 |
---|---|---|
committer | nick <nick@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-02-03 16:13:05 +0000 |
commit | 48ace4b1f750df75ae45b8cde0f6ec0eb376c1e9 (patch) | |
tree | ef91fd1de55cb1800a8102796447ac9197f89ddb | |
parent | 4e067f62d4f0311aa78276ae3b3474f900b9beba (diff) | |
download | mpv-48ace4b1f750df75ae45b8cde0f6ec0eb376c1e9.tar.bz2 mpv-48ace4b1f750df75ae45b8cde0f6ec0eb376c1e9.tar.xz |
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
-rw-r--r-- | dec_video.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/dec_video.c b/dec_video.c index 0b46f281b4..94b9d95b9c 100644 --- a/dec_video.c +++ b/dec_video.c @@ -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; } |