Log in

View Full Version : H.264 decoding performance - benchmarked!


Pages : 1 [2]

benwaggoner
21st March 2009, 17:51
I guess I could do some tests in Media Player Classic, and record CPU utilization over a span of time (anyone know how to do this?) - say a 10 minute test clip that has most of the "magic" turned on - i.e. 4+ mixed references, 8x8dct, CABAC, no slices, high-ish bitrate, 1080p. I'd have to stay consistent with my renderer of course, but I'd vary the DirectShow decoder and core affinity.

I could then compare that to playing the same MP4 in Firefox or IE 7 with Silverlight 3 and Flash...
I'd definitely be interested in that!

We're continuing to tune SL3 playback performance, so I'm always happy to get more data from the field.

Do the Flash and Silverlight decoders support multithreading (I'd assume and sincerely hope so!)? Also, last I checked with Flash, a huge bottleneck was with full screen playback (i.e. scaling and rendering). I see this shouldn't be an issue with Silverlight, as it can easily offload this process to GPU. Very cool! I wonder how it compares to EVR or Haali Renderer? Gosh I'm getting a little excited now!
Yes, the Silverlight H.264 decoder is multithreaded, as is Silveright itself pretty pervasively. We're continuing to tune that, particularly for highly multicore systems.

To measure pure decoder performance, you're probably best off just not scaling anything. In Silverlight, this will activate our "Fast Path" behavior.

http://on10.net/blogs/benwagg/Building-high-performance-Silverlight-Media-Players/

I also wonder how Flash and Sliverlight handle PC / TV luma levels? This has been a cause for endless rage for me... I'm sure it has something to do with a combination of GPU manufacturer, OS, and driver version... :p
In Silverlight 3 final, we'll support the correct matricies for 601 and 709, with our conversion mapping Y'=16 to R'G'B'=0 and Y'=235 to R'G'B'=255. The latest beta release has a few...issues in that area, but they're already fixed in our current builds. However that'll have no impact on decode performance, just my own personal embarassement.

601/709 is determined by frame size, with width >1024 or height >576 as the trigger for 709.

Thoughts? I'll wait to formulate a decent plan instead of flailing about looking like an idiot as I did with this initial test :D
I'd also recommend using content with burned-in timecode and using something like FRAPS to capture frames getting played back. It's better to play 100% of frames at 80% CPU load than 85% of frames at 40% CPU load :).

Sagekilla
21st March 2009, 18:19
Good idea Ben, the only issue there is that fraps itself will eat up a bit more CPU time and you might get frame drops because of that, so it could create a false performance drop :(

benwaggoner
21st March 2009, 18:48
Good idea Ben, the only issue there is that fraps itself will eat up a bit more CPU time and you might get frame drops because of that, so it could create a false performance drop :(
It's not too bad if you shrink the screen size to the smallest that'll fit the player, and then have FRAPS record at quarter size.

I've been able to record 2560x1600p60 with FRAPS on my 8 core with reasonable foreground performance. It's some impressive tech.

Certainly, capturing the video out would be even better yet, but FRAPS has the advantage of being $37 :). Also, since its overhead would be pretty consistant, it shouldn't bias the results overmuch.

allouh
18th April 2009, 08:07
I have an old system and my result were very close to these posted here about being the fastest decoder.
did the test for some HD Samples.

CoreAVC User: 4s, kernel: 3s, total: 7s, real: 65s, fps: 250.3, dfps: 28.8
DivX User: 4s, kernel: 1s, total: 6s, real: 56s, fps: 303.2, dfps: 33.1

CoreAVC User: 3s, kernel: 5s, total: 9s, real: 40s, fps: 191.2, dfps: 45.7
DivX User: 4s, kernel: 4s, total: 9s, real: 35s, fps: 198.9, dfps: 51.4

CoreAVC User: 13s, kernel: 13s, total: 27s, real: 138s, fps: 221.5, dfps: 43.8
DivX User: 14s, kernel: 7s, total: 22s, real: 131s, fps: 271.9, dfps: 45.9

CoreAVC User: 5s, kernel: 7s, total: 12s, real: 53s, fps: 385.5, dfps: 88.9
divX User: 6s, kernel: 4s, total: 10s, real: 46s, fps: 464.7, dfps: 101.3

My system is Intel 3400MHz Single Core with HT, 2GB@667 memory, Nvidia 6200tc VGA.

benwaggoner
19th April 2009, 00:46
Back to my last question - does anyone know how to log CPU usage over a period of time? I'm getting interested in running round 2 of my benchmarks
We've been using Xperf for this.

http://msdn.microsoft.com/en-us/library/cc305221.aspx

I'm not enough of a software engineer to do much more than capture traces myself, but our test and dev folks seem to be able to quickly take those and turn them into "ah-ha!" pretty quickly.