MP1 EVR Presenter/dshowhelper community development (5 Viewers)

Owlsroost

Retired Team Member
  • Premium Supporter
  • October 28, 2008
    5,539
    5,038
    Cambridge
    Home Country
    United Kingdom United Kingdom
    Re: AW: MP1 EVR Presenter/dshowhelper community development

    compiled my own version with less stats. it's gettin better :)

    i now try to get rid of the "measured disp rate"... It reports 59.0958 Hz instead of the windows 60Hz... i am currently breaking my dshowhelper.

    @owlsroost:
    is it possible to get rid of the estimated Hz? I want the dshowhelper to catch the refresh rate told by windows...

    EDIT:
    ok... found it... i am testing around without estimation and my ION.

    If you want to live dangerously :) the bleeding edge sources are here (with a re-designed refresh rate estimator).

    Tony
     

    OnkelChris

    Retired Team Member
  • Premium Supporter
  • October 17, 2007
    764
    59
    Home Country
    Germany Germany
    AW: MP1 EVR Presenter/dshowhelper community development

    I already have the 26059 version ;)

    I edited "EstimateRefreshTimings()", that it will take the rate reported by windows and not the estimated one -> works better on my ION.

    I also edited the stats to show things i need -> very less :p

    You totally reworked the whole dshowhelper and I first have to get into it. the old one was a bit easier to read, because it was a bit less code ;)

    btw: great work :D

    EDIT:
    I now have 1% percent dropped frames in Live TV (150.000 frames drawn, 1480 dropped). I think this is a good result :)
    And I now don't get any dropped frames extra, when the stats are on.

    Owlsroost:
    I try to get a bit more out of my lowend ION. Could you give me some tips, which code parts are the most expensive?

    EDIT:
    If someone else with an ION is willing to try "my" version, please PM.
     

    tourettes

    Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    Re: AW: MP1 EVR Presenter/dshowhelper community development

    @owlsroost:
    I try to get a bit more out of my lowend ION. Could you give me some tips, which code parts are the most expensive?

    Deinterlace, frame scaling & drawing. Those are most likely the ones that are using 95% of the time and something that you cannot change. One possibility would be to try to profile the CPU & GPU load generated by the different parts of the code to see if there are some real bottlenecks.
     

    OnkelChris

    Retired Team Member
  • Premium Supporter
  • October 17, 2007
    764
    59
    Home Country
    Germany Germany
    AW: Re: AW: MP1 EVR Presenter/dshowhelper community development

    Deinterlace, frame scaling & drawing. Those are most likely the ones that are using 95% of the time and something that you cannot change. One possibility would be to try to profile the CPU & GPU load generated by the different parts of the code to see if there are some real bottlenecks.

    hello tourettes :)

    thx for answering. I will look at the dshowhelper whenever I have a bit time for it.

    my MP runs since several hours with liveTV (SD). result: 500.000 frames drawn and <1000 frames dropped.
     

    Owlsroost

    Retired Team Member
  • Premium Supporter
  • October 28, 2008
    5,539
    5,038
    Cambridge
    Home Country
    United Kingdom United Kingdom
    Re: AW: MP1 EVR Presenter/dshowhelper community development

    I already have the 26059 version ;)

    I edited "EstimateRefreshTimings()", that it will take the rate reported by windows and not the estimated one -> works better on my ION.

    I also edited the stats to show things i need -> very less :p

    You totally reworked the whole dshowhelper and I first have to get into it. the old one was a bit easier to read, because it was a bit less code ;)

    btw: great work :D

    I didn't intend to totally rework parts of the code - it just worked out that way :)

    It's good to get some feedback from an ION/Win7 user - especially someone willing to experiment with the code ;)

    EDIT:
    I now have 1% percent dropped frames in Live TV (150.000 frames drawn, 1480 dropped). I think this is a good result :)
    And I now don't get any dropped frames extra, when the stats are on.

    @owlsroost:
    I try to get a bit more out of my lowend ION. Could you give me some tips, which code parts are the most expensive?

    I usually get about 0.02% dropped frames on my system (Vista/E4400/9500GT) - normally due to time stolen by Windows from MP i.e. 10-20ms time lost = dropped frame.

    As Tourettes said, the dwshowhelper code itself should use very little CPU/CPU time - it's just deciding when things happen. not actually doing the processing itself.

    You could try playing around with the thread priorities - the base priorities are set in StartWorkers().

    In 'Scheduler.cpp' the Timer and Worker threads are under Multimedia Class Scheduler Service (MMCSS) control - the SchedulerThread isn't (because it seems to have side effects sometimes) but you could try enabling it - just un-comment the code blocks at the beginnng & end of the function.

    You could also try commenting out:

    p->pPresenter->NotifyTimer(hnsTargetTime); //Wake up Timer thread

    and modify 'timDel + 1' to 'timDel' on the next line, so that the TimerThread timer isn't used - it will save a little bit of CPU time.

    In 'EVRCustomPresenter.h' if you:

    // uncomment the //Log to enable extra logging
    #define LOG_DELAYS //Log

    you'll get info in the log file about high internal latencies and delays which might help to see why the frames are being dropped.

    Have fun....

    Tony
     

    robyf

    Retired Team Member
  • Premium Supporter
  • June 20, 2005
    1,076
    278
    55
    Bolzano
    Home Country
    Italy Italy
    Re: AW: MP1 EVR Presenter/dshowhelper community development

    I usually get about 0.02% dropped frames on my system (Vista/E4400/9500GT) - normally due to time stolen by Windows from MP i.e. 10-20ms time lost = dropped frame.

    Can confirm. I have 1 or 2 dropped frame in half an hour with WIN7/AMD BE2450/HD4670. I also think this is a windows problem. I noticed that the more windows is up without reboots, the more dropped frame you get, so I make an automated reboot each night. More or less priority to mediaportal process seems to have no effect on this.
     

    tourettes

    Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    Re: AW: MP1 EVR Presenter/dshowhelper community development

    I usually get about 0.02% dropped frames on my system (Vista/E4400/9500GT) - normally due to time stolen by Windows from MP i.e. 10-20ms time lost = dropped frame.

    Can confirm. I have 1 or 2 dropped frame in half an hour with WIN7/AMD BE2450/HD4670. I also think this is a windows problem. I noticed that the more windows is up without reboots, the more dropped frame you get, so I make an automated reboot each night. More or less priority to mediaportal process seems to have no effect on this.

    Such aren't always caused by the OS / drivers etc. stealing the time. One quite obvious issue that most (almost every single PC) has is the audio and video clock sync that will be drifting apart. Especially when dropped or duplicated frames are happening on quite long time span (once per 30 minutes for example).

    A/V clock sync is a separate issue that will be tried to be solved in the "near" future.
     

    OnkelChris

    Retired Team Member
  • Premium Supporter
  • October 17, 2007
    764
    59
    Home Country
    Germany Germany
    AW: MP1 EVR Presenter/dshowhelper community development

    ah ok... I see... we talked about different things :p

    Watching a "normal" movie, I have no dropped frames (PAL, NTSC, 720p, 1080p, 1080i)!
    Watching LiveTV yesterday evening, I had 500.000 frames drawn and 20 dropped! (I use DVB-T and sometimes the signal is distorted. It depends on the time of day.)

    Conclusion:
    For my ION, deleting the estimation of refresh rate make things a bit better. I will take a look at things mentioned by owlsroost. But this can take a while ;)
     

    Owlsroost

    Retired Team Member
  • Premium Supporter
  • October 28, 2008
    5,539
    5,038
    Cambridge
    Home Country
    United Kingdom United Kingdom
    I agree with Tourettes, but my 0.02% figure was with ReClock in use (which solves most of the A/V clock sync problem), and quite often on my system the frames are dropped in groups e.g. 2-3 frames dropped over a 10s period, then no drops for 10-20 minutes - which I think points to some high-priority process/driver causing the drops.

    And yes, signal corruption on live TV will produce dropped frames :)

    Win 7 is able to report accurate refresh rates - Vista can't, so I have to use the estimator for Vista i.e. my system - I'll loosen up the matching limit so it's more likely to get a correct refresh rate match - problem is, it doesn't go wrong for me so it's hard to test it.....

    Tony
     

    robyf

    Retired Team Member
  • Premium Supporter
  • June 20, 2005
    1,076
    278
    55
    Bolzano
    Home Country
    Italy Italy
    I agree with Tourettes, but my 0.02% figure was with ReClock in use (which solves most of the A/V clock sync problem), and quite often on my system the frames are dropped in groups e.g. 2-3 frames dropped over a 10s period, then no drops for 10-20 minutes - which I think points to some high-priority process/driver causing the drops.

    Same as you but I have this drops with reclock (on videos) and without reclock (on live tv). Same behaviour (two drops at same time).
     

    Users who are viewing this thread

    Top Bottom