View Full Version : puzzling CPU usage when playback xvid video
RainbowDu
23rd March 2006, 04:02
I got xvid1.1.0 final from xvid.org and compiled using .net2003. After some small changes on custom build commandlines to make sure complete building the libxvidcore and vfw soutions. Then I installed the new built xvidcore.dll in vfw\bin\. However, I find, when playback xvid video, it is very cpu consuming(about 40% cpu time is used by this playback proceeding). But when i playback the same xvid video using codec in XviD-1.1.0-30122005.exe (download from http://www.koepi.org/xvid.shtml), the cpu consumpt is only about 15%. What's wrong with my building setting? Are there some additional changesneeded to be done?
OS s winXP, Windows Media player, CPU P4
foxyshadis
23rd March 2006, 04:37
It sounds like it's either compiled in debug mode (though I'd expect it to be even slower than that), or that it was compiled without asm optimizations on. If the custom build changes weren't significant, it probably wouldn't be that either, unless you need to define something special to turn asm on.
celtic_druid
23rd March 2006, 04:38
You need to install and compile with ICL since that is what Koepi uses. He I believe still uses ICL 7 though which does not work with MSVC 7.1. You need 8 or maybe 8.1.
RainbowDu
23rd March 2006, 12:19
Thank you foxyshadis and celtic_druid.
Unfortunatly, I have built the soure code in "release" mode and opened asm optimizations by setting all "cpu_flags" with value "cpu_detect()" in xvidcore solution and vfw solution.
And I setup dx9 2006 Feb version, but I cannot compile dshow solution, I got an error "can not open file 'streams.h'". Does it effect cpu consumpt? In some posts I found it is not very important.
sysKin
23rd March 2006, 13:20
And I setup dx9 2006 Feb version, but I cannot compile dshow solution, I got an error "can not open file 'streams.h'". Does it effect cpu consumpt? In some posts I found it is not very important.
If you don't have directshow filter, then this is your problem. It's only playing via VfW and this is slow.
You need to set up DX SDK properly to compile, streams.h is part of that SDK and it needs to be in your default include path (check SDK's install instructions).
celtic_druid
23rd March 2006, 14:11
Actually MS moved most of it to the PSDK, so you need that to or an older DX SDK that includes baseclasses, etc.
RainbowDu
24th March 2006, 11:22
Thank you sysKin and celtic_druid again.
Following your advices, I built dshow solution successfully and got xvid.lib and xvid.ax etc. But, are they helpful? How can I employe them when playback xvid video? Is it auto-load when xvid decoder run? Since I have install dx9 before building dshow, how can I know it is directshow filter in dx9 or dshow is working?
Will it work just copying xvid.dll xvid.ax xvid.inf to a folder and install xvid.inf in its context menu? Does it need to rebuild these three solutions in some specified consquence?
foxyshadis
24th March 2006, 11:55
You need xvid.dll in the path somewhere, so it can get loaded, and you have to regsvr32 xvid.ax. The inf takes care of both of these for you.
RainbowDu
25th March 2006, 11:02
Thanks everyone.
They work!
Now, cpu usage is near to 15% when playback xvid movie using the decoder built in my net2003 .
Thank you again.
Good luck
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.