Mercurial > mplayer.hg
changeset 4516:d604c3db9a76
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
author | nick |
---|---|
date | Sun, 03 Feb 2002 16:13:05 +0000 |
parents | 4064940f3f9b |
children | 7d24c9bd2ae5 |
files | dec_video.c |
diffstat | 1 files changed, 18 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/dec_video.c Sun Feb 03 15:16:46 2002 +0000 +++ b/dec_video.c Sun Feb 03 16:13:05 2002 +0000 @@ -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; }