A guide to stutter free playback with Reclock (1 Viewer)

Owlsroost

Development Group
  • Team MediaPortal
  • October 28, 2008
    5,540
    5,038
    Cambridge
    United Kingdom United Kingdom
    Country flag
    Not yet - the code's a bit messy at the moment, and I'd like a few people to try it first so I know if it's a real improvement.

    How do you create the patch files ? (currently there's four modified source files)

    Tony
     

    red5goahead

    MP Donator
  • Premium Supporter
  • November 24, 2007
    695
    144
    Italy, North West
    Italy Italy
    OK - time to put the tin hat on :)
    Attached is my version of the dshowhelper.dll - it works OK on my system (Vista32, nVidia 9500GT with 195.62 drivers) but has to be regarded as VERY EXPERIMENTAL so tread carefully !
    Please disable vsync correction in ReClock - the dshowhelper does it's own vsync correction internally.
    Tony
    Cool! :D

    I'll try this evening... :D
     

    tourettes

    Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    Not yet - the code's a bit messy at the moment, and I'd like a few people to try it first so I know if it's a real improvement.

    How do you create the patch files ? (currently there's four modified source files)
    Right click on a mediaportal folder and tortoise has "create patch".

    btw. If someone would be really strict the DLL should be removed (based on GPL) since there is no source code made public :D
     

    Seeco

    Portal Pro
    October 15, 2007
    241
    7
    Linköping
    Sweden Sweden
    I have a general question about Reclock, refresh rates etc.

    Before when playing 23.976fps material, I used Reclock with a 24Hz refresh rate to make the fps and Hz match. Now it is possible to set a 23.976Hz refresh rate in ATI's CCC. However, when I bring up the OSD in MP during playback the RR says 23.974Hz.

    At first I tried using Reclock with the 23.974Hz refresh rate. I figured that 23.974 at least was closer to 23.976 than 24. Only problem was that Reclock didn't seem to accept it, it didn't know what to do with the video material with a 23.976Hz refresh rate. I guess Reclock can only adjust the fps to 24?

    What do you think would work best for me - continue with the 23.974Hz without Reclock, or go back to 24Hz with Reclock? Are there other benefits to using Reclock?

    I use Win 7. Does anyone know if the Vsync discussion applies to this OS? I haven't had any VSync issues (that I know of) since i stopped using XP.
     

    Owlsroost

    Development Group
  • Team MediaPortal
  • October 28, 2008
    5,540
    5,038
    Cambridge
    United Kingdom United Kingdom
    Country flag
    Not yet - the code's a bit messy at the moment, and I'd like a few people to try it first so I know if it's a real improvement.

    How do you create the patch files ? (currently there's four modified source files)
    Right click on a mediaportal folder and tortoise has "create patch".

    btw. If someone would be really strict the DLL should be removed (based on GPL) since there is no source code made public :D
    OK, to keep the pedants happy, current source code attached ;)

    Note this is based on rev 25466 sources, so doesn't incorporate the two most recent SVN updates (and it's messy in places, with blocks of commented-out code etc)

    Tony
     

    tourettes

    Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    Just a quick note, since you are basic the v-sync adjustment on m_dDetectedScanlineTime, have you made sure that the results are always correct? I did disable that estimation code since it would give wrong results (it could vary quite much between the runs, where it should be always the same and match pretty closely yo the one that you can calculate based on the screen refresh rate).
     

    tourettes

    Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    2nd quick note. Targeting the v-sync seems to use Sleep(). Sleep shouldn't be used since it is good way to miss a v-sync. If thread context switch happens the sleep is not accurate (it could cause missed v-sync). Instead of sleep you should wither use busy polling (CPU usage rises).
     

    Owlsroost

    Development Group
  • Team MediaPortal
  • October 28, 2008
    5,540
    5,038
    Cambridge
    United Kingdom United Kingdom
    Country flag
    Just a quick note, since you are basic the v-sync adjustment on m_dDetectedScanlineTime, have you made sure that the results are always correct? I did disable that estimation code since it would give wrong results (it could vary quite much between the runs, where it should be always the same and match pretty closely yo the one that you can calculate based on the screen refresh rate).
    I've only seen it get it wrong once, immediately after an auto refresh rate change, but I've seen the windows reported refresh rate incorrect much more often (after refresh rate changes). Also the windows reported rate(on Vista at least) is only an integer value, e.g it reports '59' for nVidia actual 59.94Hz refresh rate, so it's inaccurate anyway.

    It does a tight (currently within 2%) comparison of video-to-display rates to decide if vsync correction is possible, so if it gets the rate measurement wrong it just means the vsync correction is disabled.

    I'd like to measure the display refresh rate continuously (with minimal overhead), but I haven't come up with a good method so far.....

    Tony
     

    tourettes

    Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    I've only seen it get it wrong once, immediately after an auto refresh rate change, but I've seen the windows reported refresh rate incorrect much more often (after refresh rate changes). Also the windows reported rate(on Vista at least) is only an integer value, e.g it reports '59' for nVidia actual 59.94Hz refresh rate, so it's inaccurate anyway.
    On my testing it had up to 5% deviance (not acceptable).

    On Windows 7 at least we get the real refresh rate (Win7RefrehsRateHelper.dll or something similar).


    I'd like to measure the display refresh rate continuously (with minimal overhead), but I haven't come up with a good method so far.....
    Not a good way, but you could query PowerStrip for such information (bad since requires 3rd party application and wont work with Nvidia > 7xxxx series). Reading from HW would be the best way, but I guess you wont want to develop another PowerStrip (and not to be able to read from newer Nvidia GPUs).
     

    Owlsroost

    Development Group
  • Team MediaPortal
  • October 28, 2008
    5,540
    5,038
    Cambridge
    United Kingdom United Kingdom
    Country flag
    2nd quick note. Targeting the v-sync seems to use Sleep(). Sleep shouldn't be used since it is good way to miss a v-sync. If thread context switch happens the sleep is not accurate (it could cause missed v-sync). Instead of sleep you should wither use busy polling (CPU usage rises).
    I was just following the technique that was already in use (but with calculated sleep times rather than looping with a 1ms sleep each iteration). I don't want to use anything that wastes CPU time e.g. polling for vsync, given that this is running at 'critical' thread priority.

    It's only trying to push the 'paint' start time to approx in the middle of the low/high limit period.

    Tony
     

    Users Who Are Viewing This Thread (Users: 0, Guests: 1)

    OP Similar threads Forum Replies Date
    D Display Day of week in TV Guide? Feature Requests 0
    S Shortcuts MP1 My Recorded & TV Guide General 10
    framug Nouveau plugin XmlTvFR pour récupérer le guide télé français Kazer / ZguideTv (WebEPGfr) 11
    G Movie release date in guide Electronic Program Guide 2
    M [Rejected] Always show full hours in TV Guide Feature Requests 2
    M [fixed] [MP2-831] 12h time format shown in TV Guide with Swedish language settings Submit: Bug Reports 27
    geotwticher TV Guide EPG Grabber for Australia 2020 RIP freepg.tv General 4
    B [solved] MP2.2.3 TV Guide not scrolling with mouse wheel General 2
    R [solved] All Channel 7 stations listed in guide as 1000 Newcomers Forum 4
    T Freeview EPG-Anyone know what channel sends the guide data? Electronic Program Guide 10
    M Guide mapping schedules direct, tvguide, epg buddy How to get correct entry to the correct channel? Electronic Program Guide 0
    G Newb trying MP2, trouble with guide data General 5
    C How do I see the broadcast channel decimal numbers in the guide? General 0
    M [Pending] Fix for Inconsistent date display in TV Guide Submit: code patches (MediaPortal/TV-Server/etc.) 1
    G [solved] Are genres in the guide working properly General 4
    drumrob Inconsistent date display in TV Guide 1.22 Pre Release 15
    HTPCSourcer [Evaluate] MP2-Updates do not remove the GUID of previous installs MediaPortal 2 13
    Rob Hexenmeister Radio Guide descriptions in myradio.xml (screen 30) MediaPortal 1 Skins 3
    N Include both TV and Radio channels together in the guide Feature Requests 2
    doskabouter No guide info added due to a MYSQL deadlock Electronic Program Guide 1
    Patrik-See [solved] MediaPortal 2.2 Fernseher bleibt schwarz nach TV Sender Stop Allgemeines Support- und Diskussionsforum 2
    W Need help getting my TV guide working again General Support 1
    R TV Guide No Episode Info Displayed Electronic Program Guide 5
    ltfearme Feature request: Parental Guide IMDb+ 17
    B [Finished] TV Guide Navigation Button Archive 0
    Similar threads

























    Top Bottom