View Full Version : Is "Custom EVR" really needed for DXVA + Subs?
avivahl
28th December 2009, 08:00
Guys, after reading some of the MSDN docs, I'm not sure any longer. What if VSFilter renderered the ASS/SRT file as a MEDIASUBTYPE_AI44 stream (http://msdn.microsoft.com/en-us/library/dd375476%28VS.85%29.aspx)? Wouldn't the EVR mixer be able to accept it (without needing custom renderer)?
See http://msdn.microsoft.com/en-us/library/ms703795%28VS.85%29.aspx DXVA2_VideoProcess_SubStreams[Extended]
tetsuo55
28th December 2009, 08:26
Even if this is possible, what is the point?
avivahl
28th December 2009, 08:31
Technical discussion.
I'm checking for background information regarding this bug I filed: http://sourceforge.net/apps/trac/mpc-hc/ticket/45
I already know it's possible for the Microsoft DVD Navigator to output subs as AI44 streams, so I wondered if they can be somehow connected to the EVR (regular; not custom) renderer. Then I looked for a generic way to show all subtitles (DVD + regular).
tetsuo55
28th December 2009, 08:59
Oh right that one.
That one definately should be fixed if at all possible.
avivahl
28th December 2009, 09:02
It is "possible" for sure. I currently play my DVDs using WMP12 w/ the Microsoft MPEG-2 DXVA Decoder... And needless to say that the subtitles are showing wonderfully.
tetsuo55
28th December 2009, 09:14
It is "possible" for sure. I currently play my DVDs using WMP12 w/ the Microsoft MPEG-2 DXVA Decoder... And needless to say that the subtitles are showing wonderfully.that doesnt make it possible, that just means that wmp12 with its custom splitter, codec and renderer(who says their ever isnt custom?) makes it work.
The same is true for mpc-hc
Also WMP12 isnt using dshow but mediafoundation to achieve this.
avivahl
28th December 2009, 09:25
MediaFoundation does not have a DVD navigator yet. WMP uses both DirectShow and MediaFoundation.
For DVDs, it has to use DirectShow.
tetsuo55
28th December 2009, 09:43
MediaFoundation does not have a DVD navigator yet. WMP uses both DirectShow and MediaFoundation.
For DVDs, it has to use DirectShow.really, thats pretty stupid lol
edison
29th December 2009, 06:47
PotPlayer does support subtitle when using EVR .
roozhou
29th December 2009, 08:57
PotPlayer does support subtitle when using EVR .
PotPlayer even supports subtitle when using Overlay Mixer.
tetsuo55
29th December 2009, 16:20
And potplayer does all this while using DXVA?
roozhou
30th December 2009, 02:25
And potplayer does all this while using DXVA?
Of course.
PotPlayer also has internal idct/mc/vld level DXVA support for MPEG1/2, WMV2, WMV3 and VC1.
patch1
30th December 2009, 03:19
And potplayer does all this while using DXVA?
English language support appears to be limited though
http://forum.doom9.org/showthread.php?t=148745
http://au.babelfish.yahoo.com/translate_url?doit=done&tt=url&intl=1&fr=bf-home&trurl=http%3A%2F%2Ftvpot.daum.net%2Fvideo%2Flive%2FPotplayerSpec.do&lp=ko_en&btnTrUrl=Translate
tetsuo55
30th December 2009, 07:12
Interesting, it even supports partial acceleration.
I wonder where he got that code from....
roozhou
30th December 2009, 10:47
Interesting, it even supports partial acceleration.
I wonder where he got that code from....
Um... Why do you assume they "got" code from somewhere instead of writing this on their own? AFAIK no other decoder or player has WMV2 acceleration.
tetsuo55
30th December 2009, 13:06
Um... Why do you assume they "got" code from somewhere instead of writing this on their own? AFAIK no other decoder or player has WMV2 acceleration.He is known to "borrow" code.
Judging from some random google pages he appears to be using the windows decoders internally, and has seperate codepaths for <XP and Vista<.
Pretty cool if you ask me, but not usuable for other projects.
Partial acceleration is extremely timeconsuming to program for, and the benefits are minimal at best, i doubt a one-man hobby project would go through all that trouble to manually write a codec(from scratch) that supports all sub-levels of dxva.
If libavcodec could easily be adjusted for partial dxva we would have included this already.
Also, when enabling DXVA the correct renderer automatically gets selected based on the OS, where possible DXVA2 is used, in those cases the selected renderer still gets used.
roozhou
30th December 2009, 14:14
He is known to "borrow" code.
Judging from some random google pages he appears to be using the windows decoders internally, and has seperate codepaths for <XP and Vista<.
Can you provide these links?
Partial acceleration is extremely timeconsuming to program for, and the benefits are minimal at best
It's useful for me. I have a dual-core laptop with 6150 Go integrated chip and a single-core desktop with 6600LE. Even the dual-core cannot decode VC1 from BD using software decoders in real-time(thanks to M$'s crappy decoder), but with partial acceleration they play smoothly.
BTW is anybody working on multithreaded version of ffmpeg's VC1 decoder?
tetsuo55
30th December 2009, 17:14
Can you provide these links?
This one was most convincing: http://www.kmplayer.com/forums/showthread.php?t=4983
It's useful for me. I have a dual-core laptop with 6150 Go integrated chip and a single-core desktop with 6600LE. Even the dual-core cannot decode VC1 from BD using software decoders in real-time(thanks to M$'s crappy decoder), but with partial acceleration they play smoothly.Sure there will always be a scenario where it makes the difference, but on average, partial acceleration has less than 20% effect on cpu usage. Partial acceleration only takes over the easiest to decode part :(
BTW is anybody working on multithreaded version of ffmpeg's VC1 decoder?VC1 is avoided like the plague
roozhou
30th December 2009, 18:57
This one was most convincing: http://www.kmplayer.com/forums/showthread.php?t=4983
Thanks. But it seems they are talking about KMPlayer not PotPlayer. There are no internal DXVA support in KMPlayer and it has to use external decoders.
Sure there will always be a scenario where it makes the difference, but on average, partial acceleration has less than 20% effect on cpu usage. Partial acceleration only takes over the easiest to decode part :(
VC1 is avoided like the plague
Partial acceleration is only useful and available on older GPUs like NV 6/7 series and ATI 9xxx / X series. Usually PCs with those cards have less powerful CPUs and 20% offload will be very useful.
tetsuo55
30th December 2009, 20:15
Thanks. But it seems they are talking about KMPlayer not PotPlayer. There are no internal DXVA support in KMPlayer and it has to use external decoders.Yes but its the same guy who made potplayer, when you look at the options in potplayer its close to this explenation
Partial acceleration is only useful and available on older GPUs like NV 6/7 series and ATI 9xxx / X series. Usually PCs with those cards have less powerful CPUs and 20% offload will be very useful. 20% is very optimistic, most partial accelerations will only do 1-2%, not worth it if you count the 100's of hours of coding required for that.
roozhou
31st December 2009, 03:21
20% is very optimistic, most partial accelerations will only do 1-2%, not worth it if you count the 100's of hours of coding required for that.
It should be far more than 20%.
I did a quick test of playing a 30s 720p50 10mbps VC1 stream on an E6750 + 7300LE desktop under WinXP SP2 + WMP11 + Overlay Mixer. Measured CPU time (user + kernel):
WMV Decoder DMO w/ DXVA 7.3s
WMV Decoder DMO w/o DXVA 14.1s
MPC-HC internal libavcodec 11.6s
14.1 / 7.3 = 194%
11.6 / 7.3 = 160%
patch1
31st December 2009, 03:58
It should be far more than 20%.
roozhou,
I agree it would be good to have, and I suspect tetsuo55 does too.
The issue is resources / who will actually do the coding. Sure if Daum want to contribute to mpc-hc or ffdshow I think he would be most welcome but that probably is no going to happen.
Which leave the existing volunteers and the problem
If libavcodec could easily be adjusted for partial dxva we would have included this already.
tetsuo55
31st December 2009, 07:34
It should be far more than 20%.
I did a quick test of playing a 30s 720p50 10mbps VC1 stream on an E6750 + 7300LE desktop under WinXP SP2 + WMP11 + Overlay Mixer. Measured CPU time (user + kernel):
WMV Decoder DMO w/ DXVA 7.3s
WMV Decoder DMO w/o DXVA 14.1s
MPC-HC internal libavcodec 11.6s
14.1 / 7.3 = 194%
11.6 / 7.3 = 160% those results are very impressive.
DXVA can be devided into 4 parts:
50% for VLD, 40% for IDCT, 10% for Mocomp/Deblocking
If you look at the vista results here http://www.tomshardware.com/reviews/avivo-purevideo-hd,1622-10.html you will see a peak improvement of 20% over no dxva, and those cards have VP2, they decode IDCT,Mocomp and Deblocking (your card only does Mocomp and Deblocking)
Rule of the thumb:
50% for VLD, 40% for IDCT, 10% for Mocomp/Deblocking
It looks like WMP is using a different more optimised decoding path when using partial dxva than it its doing full software decoding
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.