Flickering Tv-guide and other overlays with EVR enabled (4 Viewers)

tourettes

Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    Findings Part III:

    Now, I'm pretty sure that I had already tested the CPU affinity only set to one CPU core. Somehow my mind must be doing its tricks. After setting CPU affinity in Task Manager (for MP) to one CPu core only the flickering goes away on my dual core dev PC.

    In EVR renderer there is old GetTickCount() used wich is not working correctly on multi core CPUs (both cores could return different register values depending how the CPU itself has done its power saving as it can be done on ore basis nowadays). Unfortunately it didn't help when I replaced all the GetTickCount() calls with QueryPerformanceCounter().

    So, does anyone know if MP is using some other timekeeping methods than the QueryPerformanceCounter() in some other parts? If not then I guess I'll have to give up on debugging this issue and just use the ugly "hack" to set the process affinity as MP doesn't seem to like multi core CPUs.
     

    tourettes

    Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    Findings Part IV:

    Using Prime95 to max out the CPU usage to 100% flickering is also "cured". I would assume that same thing happens when you disable the Cool and Quiet feature (but I'm too lazy to test that). So in the end it definately shows that MP is using some wrong timer code (unfortunately fixing the EVR renderer to use QueryPerformanceCounter() is not enough to fix the issue).

    Anyone willing to go thru all MP code and check what timer and timestamp counter code is used? :)
     

    pnyberg

    Portal Pro
    August 21, 2006
    404
    36
    Stockholm
    Home Country
    Sweden Sweden
    :D tourettes, eabin for your efforts.

    Regarding your findings of processor affinity - I've made an application fix .sdb file that should work both for XP and VISTA that tells the OS to use "SingleProcAffinity" for MediaPortal.exe.

    I've created this from Windows Compatibility Toolkit. I haven't tested it yet, but it should work. Let me know otherwise. I've attached a screenshot of the tool and how it is configured for those interested, and also the created mediaportal_compat.sdb file,.

    You would download the mediaportal_compat.sdb(zip) and run in a command prompt: "sdbinst mediaportal_compat.sdb" and it should
    install. After that you should not need to set the processor affinity manually anymore.

    I've not have time to test it yet on my machine - so bear with me if it doesn't work.

    It's a workaround for the time being anyway...
     

    Attachments

    • mediaportal_compat.JPG
      mediaportal_compat.JPG
      101.2 KB

    mironicus

    Portal Pro
    March 9, 2008
    688
    44
    pnyberg

    This reduces the flicker issue greatly (if you scroll through the TV-guide, it still flickers sometimes) and Mediaportal seems to be more stable with this... but... Mediaportal can't use both cores of the CPU anymore. So if you playback some 1080P-MKVs within Mediaportal... it stutters now! I hope there could be another solution... to make Mediaportal more "Dualcore-friendly". :)

    Can the gui set to be "SingleProcAffinity" seperately? ^^
     

    pnyberg

    Portal Pro
    August 21, 2006
    404
    36
    Stockholm
    Home Country
    Sweden Sweden
    mironicus

    It is not possible to create an application fix (or set processor affinity) for other than an executable.
    And it is only considered as a workaround until tourettes or eabin finds a permanent fix for this...
     

    rtv

    Retired Team Member
  • Premium Supporter
  • April 7, 2005
    3,622
    301
    Osnabruck
    Home Country
    Germany Germany
    Can the gui set to be "SingleProcAffinity" seperately? ^^

    In d3dapp.cs -> public void BuildPresentParamsFromSettings(bool bwindowed)
    there is a property you might test:
    Code:
          presentParams.ForceNoMultiThreadedFlag = true;

    Although I guess tourettes already did test that.
     

    tourettes

    Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    but i hope you find a solution soon ;)

    No ideas yet... so any help is still welcome :)

    ...it must be some timer / timestamp code that uses the old methods, but there seems to be none in the code, at least I havent find out...
     

    Users who are viewing this thread

    Top Bottom