• 1
  • 2
  • 3
  • 4(current)
  • 5
  • 6
  • 10
Patch for recent dxva stutter/skip problem
#46
I can confirm that there is no stuttering with this build Smile
Reply
#47
From the two reactions, it's clear that the threading changes are at the source of this problem.

Since this is a development forum, I guess we can talk about this in more detail:

Vista/7-only build: it seems that the Vista/7 threading uses SleepConditionVariableCS, which "Sleeps on the specified condition variable and releases the specified critical section as an atomic operation". This is built-in to OS.

Default build, XP compatible: XP doesn't have the Sleep on a condition variable, and therefore we need to fall back on a custom implementation. It appears we're using a FairMonitor object which uses some kind of FIFO treatment of waiting threads. This "fairness guarantee" uses a significant amount of user-mode code in the Wait(), Notify(), and NotifyAll() functions. See here for a detailed discussion of monitors and fairness under Win32.

Prior to July 20th, threading used the boost library. I did not have dxva performance issues prior to that time.

On July 20th, it got changed to a more pluggable platform-specific implementation, which turned out to only work on Vista/7. DXVA playback still worked OK.

On July 30th it was again changed because the platform-specific implementation did not work on XP (as not supported). That's when FairMonitor got introduced, and when the performance problem really started.
Reply
#48
It is very promising yes. However was it the placebo effect or did the other commits also have an effect? Stuttering can be sneaky, hiding one day and returning the next.

Regarding a fix I think the best way forward is a runtime selection of one or the other implementations, depending on the OS version. Or come up with an implementation that works fine with both XP and Vista+, but that one's over my head. We'll see what jcarroll has to say.
Always read the Kodi online-manual, the FAQ and search the forum before posting.
Do not e-mail Kodi Team members directly asking for support. Read/follow the forum rules (wiki).
For troubleshooting and bug reporting please make sure you read this first.
Reply
#49
I just wanted to add, as I know it can be a pain when testing these changes, and trying to remember which movies had problems and when, and then getting to that point. I use "The Shining" (Scatman Crothers version, not the one with the guy from the show "Wings"). Right after the Warner Bros. logo, the camera pans the countryside for the entire opening credits. If there's going to be problems, I can tell almost instantly.
Reply
#50
CrystalP Wrote:It is very promising yes. However was it the placebo effect or did the other commits also have an effect? Stuttering can be sneaky, hiding one day and returning the next.

Regarding a fix I think the best way forward is a runtime selection of one or the other implementations, depending on the OS version. Or come up with an implementation that works fine with both XP and Vista+, but that one's over my head. We'll see what jcarroll has to say.

Definitely no placebo effect. Most of these commits have been in my builds since many weeks, and I haven't been able to get such a good quality dxva rendering/deinterlacing since many weeks. I even discussed with isidrogar what it was he did to the dxva deinterlacer ... on July 30th! see my question at the bottom of the page here. Things were progressing fine until then, and now I understand why. My analysis was obviously wrong (trying to blame the time smoother).

Regarding the short-term fix, agree with the dynamic selection. Most people are on Vista/7 anyway and so XP would still work although XP users should perhaps choose pixel shaders instead (which doesn't seem to suffer that much from the threading mechanism).
Reply
#51
I 2nd that, XP is pretty much dead especially for a HTPC. How do I switch to the vista threading in my source?
Reply
#52
Hack_kid Wrote:I 2nd that, XP is pretty much dead especially for a HTPC. How do I switch to the vista threading in my source?

just define TARGET_VISTAPLUS (in the xbmc project file, C++ preprocessor definitions) and rebuild.
Reply
#53
Voyager-xbmc Wrote:just define TARGET_VISTAPLUS (in the xbmc project file, C++ preprocessor definitions) and rebuild.

Confirmation: I just tried current master with this option used during the build, it indeed works beautifully. No stuttering whatsoever!
Reply
#54
Sad 
... obviously you guys found the problem. I also oberserved the stuttering.

Can you guess when the fixes will make it into the Eden nightly builds?

Cheers,

Chris
unRAID Server, Pioneer VSX-LX52, Panasonic 65VT30, Marusys VU+ Duo, Zotac AD10
Reply
#55
I have a fix for this (I think) if someone wants to give it a shot:

https://github.com/jimfcarroll/xbmc/tree...onitor-fix
Reply
#56
Trying to test having issues building it but I think its me as I'm working on a new build machine core i7 processor Smile
Reply
#57
Also is this the same as using the vistaplus threading or different
Reply
#58
Jcarrol tryed your fork it wont build its still looking for the fairmonitor files
Reply
#59
Hack_kid Wrote:Jcarrol tryed your fork it wont build its still looking for the fairmonitor files

guess you just need to remove them from the xbmc project file (using VC++2010 interface - find them in the file navigation structure and hit delete).
Reply
#60
Ok got it to build by putting the faiemonitor.cop and. H files back although they aren't being used it still needs them to compile
Reply
  • 1
  • 2
  • 3
  • 4(current)
  • 5
  • 6
  • 10

Logout Mark Read Team Forum Stats Members Help
Patch for recent dxva stutter/skip problem0