PDA

View Full Version : How fast a CPU is required for postprocessing?


adoniscik
6th June 2004, 23:22
I was tearing my hair out trying to solve the jerkiness in my xvid 1.0 videos. I came across a thread about how the decoder gives up until the next b-frame if the computer can not keep up. I monitored the CPU usage with task manager, and sure enough, my 1.9GHz P4 was simply not fast enough. There was a CPU usage drop concomitant with the frame drops.

The test video is a 29.97fps, 1.5Mbps two pass encode with default B-frame options and 128Kbps Vorbis audio. I discovered that no processing consumes 40% CPU usage, whereas Y and UV deblocking require an additional 40% and 25% respectively. Either of these is enough to cause freezing.

Can I expect some optimization in the next build, or is my computer too slow?

*.mp4 guy
6th June 2004, 23:34
just use ffdshow as a post processor, its VERY optimized for speed.

jimmy basushi
7th June 2004, 08:30
adoniscik - the xvid devels have said a few times that thier decoder wont be optimised for speed if ever, or at least until more pressing matters are fixed (the crew have even more evil ideas to improve thier quality). but until then, check out ffdshow (http://athos.leffe.dnsalias.com/). it will decode qpel with full pp on my athlon 1200 system, so yours should be able to do it simply. just make sure under misc you select xvid as the idct.

Joe Fenton
8th June 2004, 10:31
Originally posted by *.mp4 guy
just use ffdshow as a post processor, its VERY optimized for speed.

People keep saying that, but my tests on a Pentium II 350MHz, a Pentium II 400MHz, an Athlon XP 1600+, and an Opteron 240 tell me something different. What I found is that ffdshow is the slowest decoder/post-processor out, and is particularly bad on slower machines. NEVER use ffdshow on P2's. My guess is that it's "VERY optimized for speed" on fast P4's. If you don't have a fast P4, don't bother.

*.mp4 guy
8th June 2004, 10:53
I Have an Athlon Xp 2800+ and it can decode xvid with qpel@ ntsc dvd frame size and rate, then have enough extra power to do all three post processing methods, some convolution 3d, 3 pass high quality awarpsharp and some other stuff. an this is with the overhead of vorbis audio. i have never managed to get it to decode slowly on my system unless i use L3 or higher spb deblocking on a dvd res video with qpel...:D

maybe you arent using the latest build?

or maybe ffdshow just really stinks on slow procs?

well anyway, maybe i dont know what im talking about, but ffdshow is definately faster than xvids decoder no matter what the case is.

jon.schaffer
8th June 2004, 11:30
We are not in the so-huge-FFDShow-thread, but - for adoniscik - I would like to advise him to use FFDShow.
It's the only filter/decoder that allow me to play back my MPEG4 stuff on my P3 (700MHz)... whereas the XviD decoder (nor the DivX decoder) cannot. It even allows me to use some PP (deblocking, deringing) on some movies and AddNoise on nearly all movies.

I test it on my P2 (450MHz)... and FFDShow definitively wins the contest: PP is not usable, but playback is still perfect!

So, I think FFDShow must be recommended.
Moreover, latest builds present a P3-optimized version...

http://athos.leffe.dnsalias.com/


Jon

Joe Fenton
9th June 2004, 01:02
If the movie is coded in a codec that only ffdshow handles, then yes, ffdshow is the way to go. However, with PP turned off while on a PII system, DivX, XviD, and 3ivX all play mpeg4 streams better than ffdshow. You really can't use PP unless you are on a P3 or better. On slower systems, ffdshow really stutters badly when it hits higher bitrate sections. DivX 5.x does the best on slower systems, followed by 3ivX, then XviD. I just use the free DivX codec for playback on my slower systems. I have ffdshow for other codecs, but don't use it for mpeg4 streams unless it's something DivX chokes on.

It seems to me that people claiming ffdshow works great on slower systems are probably playing low bitrate streams. Most of my streams are about 1100kbps and highly variable (up to 4000kbps). While DivX handles these just fine on slower systems, ffdshow can be almost unwatchable. If all your streams are low bitrate (<900kbps with no high bitrate sections), ffdshow may be suitable for you. It's not for me.

alchemy
9th June 2004, 01:58
It's not always about used codec, I ran in serious speed drop,while using different players on slow machines (like my old P3-450)
I remember having the right player was the key to good speed.
For example bsplayer (pre 1.x) with overlay Mode-1 worked like magic, when media player 6.4 coun't handle overlay by it self.

I Know that ffdshow is already uses it's own overlays, just make sure they are on (by default)

@adoniscik : What kind of material u r using? (Resolution)
and also try reclock - might be the trick for you

adoniscik
9th June 2004, 05:13
It is a DV capture, so DVD resolution. I think I will try ffdshow with the next update.

Poutnik
9th June 2004, 06:40
I have slow PC with Celeron 600 / Win98SE/ Nvidia TNT2/M64/DX9.0b.
I do capturing/playing 384*288*25fps video
with cbr mp3 56k stereo / 32k mono( not encoded in realtime...)

Using XviD 1.0.0final decoder ( xvid.ax )
with both deblocking on takes about 60% of CPU time.

Neo Neko
9th June 2004, 07:22
Originally posted by Joe Fenton
People keep saying that, but my tests on a Pentium II 350MHz, a Pentium II 400MHz, an Athlon XP 1600+, and an Opteron 240 tell me something different. What I found is that ffdshow is the slowest decoder/post-processor out, and is particularly bad on slower machines.

Not true. What version of ffdshow are you using? Who compiled it? It can make a difference as big as night and day. There have been a string of rather poorly optimised ffdshow compiles in the past. It started just as the first major non-milan releases started showing up. But that is to be expected from people who are novices when dealing with code designed for GCC in an MSVC environment. It has been over two years. Milan should take a short break from adding new features and release a new stable compile. ;)

Originally posted by Joe Fenton
NEVER use ffdshow on P2's. My guess is that it's "VERY optimized for speed" on fast P4's. If you don't have a fast P4, don't bother.

Actually ffmpeg/ffdshow in generall is hardly optimised for pentium 4 at all IIRC. But it does have extensive MMX1/2 and SSE optimizations for the Pentium I/II/III machines. And if you are going to be playing videos on a system that slow might I suggest you try something like geexbox which uses full on ffmpeg in a nice gcc POSIX environment that devotes the most resources possible on your system to video playback. You will get better performance than would be possible under Windows although you would not be able to multitask on the system while it is playing.

unmei
9th June 2004, 19:00
besides the player for FFDShow it might also depend on the colorspace used. At least that is my observation on a pen^3 /600mhz with MPC and a Matrox graphics card. I have to disable the RGB32 colorspace from the "supported colorspaces". This way it uses YV12, if RGB32 were allowed it would use it despite the framerate drops from 25 to about 4-6 fps in RGB32. With YV12 i can play "normal" xvid encodes on this system just fine ..but i admit it can't play encodes where i played with B-frames, added Q-pel and encode in DVD resolution ..but then again Xvid and DivX don't even play the "normal" encodes at 25fps..
(i'm pretty convinced the behaviour stems from the matrox, but i don't care much since the 'workaround' solves it)

alchemy
10th June 2004, 05:07
@unmei : Just a random note, as ex-matrox owner - did you tryed DivXG400 soft ?
The thing with G400 and not only, is some videos with resolution dither than multiplies of 16 are kinda slow on those cards, therefore this soft corrects the problem.

@adoniscik
In my personal expirience the only thing that put my XP-2000+ to it's knees :( was alpha ver decoder of H.264 on full dvd resolution, but never on ANY XVid/Divx Material,including 1024x468 (some HD Screener)

I don't think that P4-1.9Ghz should be slow on any DVD/DV encoded stuff....

Good luck anyway...:)

plonk420
12th June 2004, 10:45
i ran anime just fine on a P2-333. had to turn post processing down to notch 1 or 2, but it played just fine.

lordadmira
12th June 2004, 22:05
Originally posted by unmei
I have to disable the RGB32 colorspace from the "supported colorspaces". This way it uses YV12, if RGB32 were allowed it would use it despite the framerate drops Use YUY2 or something, YV12 throws away a lot of color information.

Leak
12th June 2004, 23:18
Originally posted by lordadmira
Use YUY2 or something, YV12 throws away a lot of color information.

You do know that XviD uses YV12 at the encoding stage which means any color information YV12 throws away is already thrown away when encoding?

Converting from YV12 back to YUY2 after decoding can't bring it back, either - so if your graphics card supports a YV12 overlay, why not use it?

np: Autechre - Parhelic Triangle (Confield)

lordadmira
13th June 2004, 03:21
AFAIK it uses whatever colorspace is fed to it.

PS: YUY2 is only half again better than YV12. There doesn't seem to be a short name for 4:4:4 colorspace.

celtic_druid
13th June 2004, 07:24
XviD always uses YV12 no matter what the input colourspace.

Leak
13th June 2004, 10:49
Originally posted by celtic_druid
XviD always uses YV12 no matter what the input colourspace.

Yeah, it wouldn't be MPEG-4 if it didn't use YV12 - that's what the standard demands, so all other colorspaces will be converted to YV12 internally by XviD...

np: Push Button Objects - Plays Takeshi's Gutta Percha (House Of Distraction comp.)

kassandro
13th June 2004, 18:15
I have installed xvid-1.0.1 after ffdshow. But now I can't disable the xvid decoder, which is too slow on my 1.3GHZ P3 to use it with deblocking. Do I have to reinstall ffdshow?
Sorry, I tried to configure ffdshow from virtualdub and that didn't work. Enabling ffdshow with its own configuration program worked.

Soulhunter
13th June 2004, 19:55
Originally posted by celtic_druid
XviD always uses YV12 no matter what the input colourspace.
XviD always uses YV12...

But YV12 uses chroma sub-sampling (4:2:0 IIRC) !!!

Think, a renderer that is capable of proper chroma up-sampling (like VMR9 does), will produce a picture without noticeable chroma-artifacts, but this works only if you use a non-sub-sampled (4:4:4) colorspace... ;)


Bye

Didée
13th June 2004, 20:43
Originally posted by Soulhunter
Think, a renderer that is capable of proper chroma up-sampling (like VMR9 does), will produce a picture without noticeable chroma-artifacts, but this works only if you use a non-sub-sampled (4:4:4) colorspace...
And this tells us - nothing.

Even when a something like a YV12 overlay is active, the information shown in this overlay is converted to RGB as very last step (at least for 'conventional' display devices).
Thus, you cannot conclude that VMR9 will principally give a better color representation. Each graphic driver has the same chance to perform correct chroma upsampling, also for hardware overlays, as VMR9 has. The driver just has to be coded to do so.

Alas, it is much more important to reach 237.1 fps instead of 236.9 fps in Quake or Unreal, than to treat subsampled chroma planes properly.

- Didée

Soulhunter
13th June 2004, 22:40
EDIT:

I meant that VMR9 is the "only" way to get correct chroma upsampling !!!

While the usually YUV->RGB (HW) processing will not upsample correctly... :(

Btw, I never understood why it should be advantageous to run a game @ higher fps than the monitor... :p


Bye

lordadmira
13th June 2004, 23:46
Originally posted by Soulhunter
Btw, I never understood why it should be advantageous to run a game @ higher fps than the monitor... :p Marketing... See, the average g4m3r n00b has no idea that the maximum framerate is limited by their monitor frequency. I don't know what the upper limit of VGA signaling is.

Soulhunter
14th June 2004, 18:31
IIRC, the "unrestricted" settings allows max. 200Hz !!!

But I haven't see a monitor that supports a refresh-rate like this... :rolleyes:


Bye

alchemy
15th June 2004, 00:43
btw: AMD K6-2 475Mhz with 192mb ram Windows 2000, latest ffdshow and ac3filter plays fine 1200kbps encoded movie from cdr with approx 70% cpu usage.

BloodyRipper
17th June 2004, 08:46
someone here said that ffdshow isn't good for P2 - i agree
ffdshow is optimized for speed only for modern processors, on my (very old) K6-II 200MHz movies run dramatically, even after completely disabling postprocessing
my recommendation is to use xvid for all decoding

lordadmira
17th June 2004, 10:08
On that kind of system I'ld recommend using the DivX decoder.

lighty
17th June 2004, 11:41
I am surprised that nobody mentioned Movix?
It is a small Linux kernel bootable from CD and USB sticks that can play almost every possible format.

Believe me, it can play some very demanding files even on the very slow computers that otherwise would go to garbage. The good thing is that you don't have to install it so you don't have to worry about removing your windoze.

I do recommend it and it is (of course) open sourced, GPL-ed...

You can find it on the http://movix.sourceforge.net/

crusty
17th June 2004, 13:04
IIRC, the "unrestricted" settings allows max. 200Hz !!!

But I haven't see a monitor that supports a refresh-rate like this...


I have....most modern good monitors can support that refresh rate at low resolutions, like 640x480 and sometimes 800x600.
Just look in your monitor manual at the supported resolutions & refresh rates...it's there.

unmei
17th June 2004, 13:50
but then again, i would not want my desktop to run at 640x480 only to have 200 refreshes instead of 75 at a 'normal' resolution =)

alchemy
18th June 2004, 14:26
@unmei and @crusty
Guys you both gone way off-topic here,:readrule:
Gaming speeds and monitor refresh rates? What this got to do with postprocessing video on slow cpu's ?