Log in

View Full Version : 8-way threading for WMV in Win 7


benwaggoner
10th January 2009, 19:12
I just found this out from the Windows team: Windows 7, including the beta, goes up to 8-way threading when the frame size is at least 480 lines tall. You'll need 8 cores or 4 hyperthreaded cores, of course.

I haven't had a chance to set up a good apples-to-apples dual boot yet; I'd be very curious to hear anyone's benchmarks!

More details at my blog:

http://on10.net/blogs/benwagg/8-way-multithreading-in-Windows-7/

Snowknight26
10th January 2009, 21:35
Is that same dll used to transcode videos in the shell?

benwaggoner
11th January 2009, 02:03
Is that same dll used to transcode videos in the shell?
Yep. This will be for pretty much any app that does WMV that doesn't use the VC-1 Encoder SDK.

benwaggoner
11th January 2009, 02:24
any chance using the dll's on XP ? I'd love to get MT WMV decoding :o
Absolutely! All you need to do is apply the Win 7 update, and it'll work great on your existing XP machine :).

If you can figure out a way to get the .dll to work downlevel, more power to you. But it certainly is untested and unsupported.

leeperry
11th January 2009, 02:33
well actually I first thought this was MT decoding....I could use some MT WMV decoding on XP :o

then I read your blog, and saw that it was exclusively for encoding apparently..

benwaggoner
11th January 2009, 02:38
well actually I first thought this was MT decoding....I could use some MT WMV decoding on XP :o
DXVA is about your only hope for faster WMV on XP. It's not as good as DXVA on Vista, but it's something if you have a good GPU.

leeperry
11th January 2009, 02:47
DXVA is about your only hope for faster WMV.
well DXVA only works with VC1 I think, not WMV3 and such ?
besides the G92 GPU is not too good at VC1 apparently.
I think CoreCodec is working on a CoreVC1/CoreWMV fast decoder.

Snowknight26
11th January 2009, 02:48
Is 8 a hardcoded limit (similar to x264's) or is it for the reasons which you outlined in the blog? No hope for anything above 8?

Also, I hate to ask here but whats the word on VC-1 in m2ts and TrueHD/DTS variants files not playing in WMP in Windows 7? ... or no seeking/length for H.264/MPEG-2 in m2ts files?

benwaggoner
11th January 2009, 03:18
well DXVA only works with VC1 I think, not WMV3 and such ?
I think any decoder that can do DXVA with WVC1 can also do it with WMV3. There are exceptions the other way around (the ATI 2600 comes to mind).

besides the G92 GPU is not too good at VC1 apparently.
I think CoreCodec is working on a CoreVC1/CoreWMV fast decoder.
That may be true.

JohnnyMalaria
11th January 2009, 16:18
I must admit that I never quite understand the upper limits that some software developers (MS in this case) impose on the number of parallel threads available to applications. Well-written multithreaded software should be able to make use of all available cores if the algorithm supports it when in a parallel part of the code. That Vista/XP out-of-the-box support >8 cores makes it rather odd that WMP11 only goes up to 4. DV, for example, can be decoded/encoded with 128 parallel threads. The MT code I have written scales appropriately to the number of available cores and uses the concepts taught by MS in their MSDN documentation (!)

benwaggoner
11th January 2009, 17:48
I must admit that I never quite understand the upper limits that some software developers (MS in this case) impose on the number of parallel threads available to applications. Well-written multithreaded software should be able to make use of all available cores if the algorithm supports it when in a parallel part of the code. That Vista/XP out-of-the-box support >8 cores makes it rather odd that WMP11 only goes up to 4. DV, for example, can be decoded/encoded with 128 parallel threads. The MT code I have written scales appropriately to the number of available cores and uses the concepts taught by MS in their MSDN documentation (!)
A spatial-only codec is a lot easier to multithread than an interframe codec, since you don't have dependencies from frame to frame. It's hard to do the final motion estimation for a given frame until the frame before it is complete. There's a balance in how much extra speed you can get out of mutlithreaded encoding and the risk of lower efficiency compared to a single-threaded encode.

As for why we don't release support for features for hardware that's not readily available, it's because we don't add features we can't test well for security reasons. Every feature in a part of Windows is going to have unit tests and a threat model defined.

IgorC
11th January 2009, 21:19
Is 8 a hardcoded limit (similar to x264's) or is it for the reasons which you outlined in the blog? No hope for anything above 8?

x264 is threaded up to 16 cores with quality/efficiency loss less than 1%.
It will be important to check if there won't considerable quality loss. Some codecs with threaded mode loss quality up to 5-15% for 2-4 cores.

benwaggoner
15th January 2009, 07:36
x264 is threaded up to 16 cores with quality/efficiency loss less than 1%.
It will be important to check if there won't considerable quality loss. Some codecs with threaded mode loss quality up to 5-15% for 2-4 cores.
For typical content, any quality loss should be a lot less than 5%.

If you find an interesting edge case where you see a significant difference, let us know!