Stutter after refresh rate change (1 Viewer)

Scythe42

Retired Team Member
  • Premium Supporter
  • June 20, 2009
    2,065
    2,703
    51
    Berlin
    Home Country
    Germany Germany
    So how do we continue here? I'm out of ideas...

    Is there a way to simulate the alt-tab effect after a refresh rate change? I mean repainting the whole window like it was moved (need to work for fullscreen as well)? That might be an acceptable solution. Any idea how to do it?

    Turning off Aero is a bad idea. But if this is the only possible solution we have to time the vsync by ourselves to avoid tearing if Aero is turned off. I only want to go this route if there is really no other option.
     

    Scythe42

    Retired Team Member
  • Premium Supporter
  • June 20, 2009
    2,065
    2,703
    51
    Berlin
    Home Country
    Germany Germany
    Out of desperation as I am not willing to give up yet:

    Let's see if sending a WM_PAINT message after the RR change to the handle of GetForegroundWindow() will do the same as Alt-Tab. Or better an InvalidateRect() followed by an UpdateWindow() as WM_PAINT shouldn't be sent by an application (I don't care if it works...).

    Maybe this does the trick, but I doubt it. Any other suggestions how to simulate what Alt-Tab does?
     

    tourettes

    Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    can you un focus an application? At least you can do it the other way around. If that is not possible we could create an invisible window that gets focused, then focus MP after that and delete the invisible window :D
     

    nyt

    Retired Team Member
  • Premium Supporter
  • October 15, 2009
    199
    48
    Home Country
    United States of America United States of America
    can you un focus an application? At least you can do it the other way around. If that is not possible we could create an invisible window that gets focused, then focus MP after that and delete the invisible window :D

    It's not just unfocus. If you hit alt-tab real quick before aero "hides" mediaportal, the stutter will not go away.

    If you move the window, or do windows-tab (fancy 3d alt-tab) it fixes it right away.

    Is the SVN source available anywhere? If so I'll play around in my spare time and see if I can get anything working if this hits a wall.

    What about toggling v-sync after playback starts?
     

    nyt

    Retired Team Member
  • Premium Supporter
  • October 15, 2009
    199
    48
    Home Country
    United States of America United States of America

    onyx666

    Portal Pro
    September 26, 2008
    159
    0
    So how do we continue here? I'm out of ideas...

    Is there a way to simulate the alt-tab effect after a refresh rate change? I mean repainting the whole window like it was moved (need to work for fullscreen as well)? That might be an acceptable solution. Any idea how to do it?

    Turning off Aero is a bad idea. But if this is the only possible solution we have to time the vsync by ourselves to avoid tearing if Aero is turned off. I only want to go this route if there is really no other option.

    did you already find time to check how xbmc solved this problem as posted a few pages back ?
     

    nyt

    Retired Team Member
  • Premium Supporter
  • October 15, 2009
    199
    48
    Home Country
    United States of America United States of America
    So how do we continue here? I'm out of ideas...

    Is there a way to simulate the alt-tab effect after a refresh rate change? I mean repainting the whole window like it was moved (need to work for fullscreen as well)? That might be an acceptable solution. Any idea how to do it?

    Turning off Aero is a bad idea. But if this is the only possible solution we have to time the vsync by ourselves to avoid tearing if Aero is turned off. I only want to go this route if there is really no other option.

    did you already find time to check how xbmc solved this problem as posted a few pages back ?

    xbmc doesnt use evr
     

    nyt

    Retired Team Member
  • Premium Supporter
  • October 15, 2009
    199
    48
    Home Country
    United States of America United States of America
    Doing some debugging, I've found this.

    Video starts with stutter:

    2010-01-16 00:16:53.313500 [Debug][MPMain]: CycleRefreshRate: successfully changed refresh rate to 23.97Hz (23Hz requested)
    2010-01-16 00:16:53.313500 [Debug][MPMain]: currentfps: 59


    (window is moved here, playback smooths out)

    Change back to 60fps for desktop:

    2010-01-16 00:17:14.220500 [Debug][MPMain]: CycleRefreshRate: successfully changed refresh rate to 60Hz (60Hz requested)
    2010-01-16 00:17:14.220500 [Debug][MPMain]: currentfps: 0

    Video starts without stutter:

    2010-01-16 00:17:23.301500 [Debug][MPMain]: CycleRefreshRate: successfully changed refresh rate to 23.97Hz (23Hz requested)
    2010-01-16 00:17:23.302500 [Debug][MPMain]: currentfps: 24


    I added Log.Debug("currentfps: {0}", GUIGraphicsContext.CurrentFPS); to CycleRefreshRate after the Log.debug on successful change.

    Also something else I see...
    W7RefreshRateHelper.SetDisplayConfig(...): SDC_VALIDATE of 24000/1000 failed
    W7RefreshRateHelper.SetDisplayConfig(...): SDC_VALIDATE of 24000/1001 failed

    depending on whether you set to 23.976 or 24, it always fails.

    I added a case for 23970 and it sets the display properly, but no change with stutter issues.

    2010-01-16 01:32:37.038200 [Debug][MPMain]: W7RefreshRateHelper.SetDisplayConfig(...): SDC_VALIDATE of 23970/1000 succesful
    2010-01-16 01:32:37.687200 [Debug][MPMain]: W7RefreshRateHelper.GetRefreshRate: QueryDisplayConfig returned 23970/1000
    2010-01-16 01:32:37.688200 [Debug][MPMain]: CycleRefreshRate: successfully changed refresh rate to 23.97Hz (23.97Hz requested)
    2010-01-16 01:32:37.688200 [Debug][MPMain]: currentfps: 60

    2010-01-16 01:37:11.569200 [Debug][MPMain]: W7RefreshRateHelper.SetDisplayConfig(...): SDC_VALIDATE of 23970/1000 succesful
    2010-01-16 01:37:12.216200 [Debug][MPMain]: W7RefreshRateHelper.GetRefreshRate: QueryDisplayConfig returned 23970/1000
    2010-01-16 01:37:12.216200 [Debug][MPMain]: CycleRefreshRate: successfully changed refresh rate to 23.97Hz (23.97Hz requested)
    2010-01-16 01:37:12.217200 [Debug][MPMain]: currentfps: 59
     

    Users who are viewing this thread

    Top Bottom