Re: [Mplayerxp-general] New audioplay thread, -xp <0-3>
Brought to you by:
olov
From: Nick K. <nic...@ma...> - 2002-11-01 16:28:58
|
Hello, Olov! On Thu, 31 Oct 2002 22:03:31 +0100 (CET) you wrote: > Hello. > > I have add a new thread for audioplaying which is used by default. > The option -xpaudio is removed and -xp is changed to take an int as extra > parameter. > 0 : XP mode off > 1 : Decode video in separate thread > 2 : Decode audio and video in the same separate thread > 3 : As 2 plus audio playing in separate thread [default] > Great work!!! THANKS!!! It seems that your patch works fine (as usually ;) and doesn't cause any A-V resync! I've done some benchmarks: mplayerxp -vo xv -ao sdl movie.avi VIDEO: [DIV3] 528x288 24bpp 23.98 fps 821.0 kbps (100.2 kbyte/s) AUDIO: srate=48000 chans=2 bps=2 sfmt=0x10 ratio: 16000->192000 -xp 0 AVE BENCHMARKs: VC: 0.576s VO: 0.697s A: 0.084s Sys: 7.012s = 8.370s AVE BENCHMARK%: VC: 6.8845% VO: 8.3251% A: 1.0092% Sys: 83.7812 % = 100.0000% VC+VO+A=16.20% -xp 1 AVE BENCHMARKs: VC: 0.603s VO: 0.253s A: 0.085s Sys: 7.558s = 8.499s AVE BENCHMARK%: VC: 7.0955% VO: 2.9709% A: 1.0052% Sys: 88.9285 % = 100.0000% VC+VO+A=11.03% -xp 2 AVE BENCHMARKs: VC: 0.598s VO: 0.250s A: 0.120s Sys: 7.503s = 8.470s AVE BENCHMARK%: VC: 7.0567% VO: 2.9472% A: 1.4173% Sys: 88.5788 % = 100.0000% VC+VO+A=11.42% -xp 3 AVE BENCHMARKs: VC: 0.609s VO: 0.252s A: 0.267s Sys: 7.323s = 8.450s AVE BENCHMARK%: VC: 7.2021% VO: 2.9874% A: 3.1557% Sys: 86.6548 % = 100.0000% VC+VO+A=13.35% mplayerxp -vo xv -ao sdl movie.avi VIDEO: [DIV3] 720x480 24bpp 29.97 fps 915.6 kbps (111.8 kbyte/s) AUDIO: srate=48000 chans=2 bps=2 sfmt=0x10 ratio: 14000->192000 -xp 0 AVE BENCHMARKs: VC: 0.313s VO: 1.329s A: 0.047s Sys: 5.020s = 6.709s AVE BENCHMARK%: VC: 4.6721% VO: 19.8047% A: 0.7003% Sys: 74.8229 % = 100.0000% VC+VO+A=25.17% -xp 1 AVE BENCHMARKs: VC: 0.330s VO: 0.502s A: 0.047s Sys: 5.839s = 6.717s AVE BENCHMARK%: VC: 4.9061% VO: 7.4697% A: 0.6970% Sys: 86.9272 % = 100.0000% VC+VO+A=13.08% -xp 2 AVE BENCHMARKs: VC: 0.336s VO: 0.508s A: 0.071s Sys: 5.834s = 6.750s AVE BENCHMARK%: VC: 4.9849% VO: 7.5330% A: 1.0554% Sys: 86.4267 % = 100.0000% VC+VO+A=13.58% -xp 3 AVE BENCHMARKs: VC: 0.343s VO: 0.537s A: 0.063s Sys: 5.662s = 6.605s AVE BENCHMARK%: VC: 5.1887% VO: 8.1344% A: 0.9578% Sys: 85.7192 % = 100.0000% VC+VO+A=14.28% mplayerxp -vo xvidix -ao sdl movie.avi VIDEO: [DIV3] 720x480 24bpp 29.97 fps 915.6 kbps (111.8 kbyte/s) AUDIO: srate=48000 chans=2 bps=2 sfmt=0x10 ratio: 14000->192000 -xp 0 AVE BENCHMARKs: VC: 0.319s VO: 0.688s A: 0.047s Sys: 5.653s = 6.707s AVE BENCHMARK%: VC: 4.7492% VO: 10.2525% A: 0.7049% Sys: 84.2934 % = 100.0000% VC+VO+A=15.75% -xp 1 AVE BENCHMARKs: VC: 0.335s VO: 0.962s A: 0.048s Sys: 5.374s = 6.719s AVE BENCHMARK%: VC: 4.9871% VO: 14.3143% A: 0.7165% Sys: 79.9820 % = 100.0000% VC+VO+A=20.02% -xp 2 AVE BENCHMARKs: VC: 0.333s VO: 0.962s A: 0.069s Sys: 5.354s = 6.719s AVE BENCHMARK%: VC: 4.9540% VO: 14.3255% A: 1.0264% Sys: 79.6942 % = 100.0000% VC+VO+A=20.31% -xp 3 AVE BENCHMARKs: VC: 0.332s VO: 0.956s A: 0.061s Sys: 5.350s = 6.699s AVE BENCHMARK%: VC: 4.9517% VO: 14.2711% A: 0.9041% Sys: 79.8731 % = 100.0000% VC+VO+A=20.12% Audio decoding requires on 0.5-2% more cpu usage with new thread than without it. (it's comparable with precision of measurements) Thus we have no reasons to disable new thread except the case of very slow cpus where the best solution is avoiding of video playback. Note for other readers: I dunno why old singlethreaded core shows me the slowest result by total benchmark when I use -vo XV as vo driver. I really repeated all tests several times. Probably there is something broken in benchmarks or something else. Maybe it caused by stalls during flushing cpu caches into video memory in single threaded models (due unoptimized writing (MOVNTQ) into video memory from side of Xfree86) when in multithreaded models we have filled part of these pauses - DUNNO and have no time to investigate this subj again. > -- > Olov Gustavsson Best regards! Nick |