Tearing is still there without exclusive mode checked (1 Viewer)

zeflash

Portal Pro
July 7, 2005
199
16
Home Country
France France
TV-Server Version:
MediaPortal Version: 2.3.0 RC2
MediaPortal Skin: Revision 1.1.6
Windows Version: XP SP2
CPU Type:
HDD:
Memory:
Motherboard:
Motherboard Chipset:
Motherboard Bios:
Video Card: 8800 GTS 320MB, or 7800GT
Video Card Driver: 163.44
Sound Card:
Sound Card AC3:
Sound Card Driver:
1. TV Card:
1. TV Card Type:
1. TV Card Driver:
2. TV Card:
2. TV Card Type:
2. TV Card Driver:
3. TV Card:
3. TV Card Type:
3. TV Card Driver:
4. TV Card:
4. TV Card Type:
4. TV Card Driver:
MPEG2 Video Codec:
MPEG2 Audio Codec:
Satelite/CableTV Provider:
HTPC Case:
Cooling:
Power Supply:
Remote:
TV:
TV - HTPC Connection:

Just installed a clean XP system with the latest drivers. I'm still getting tearing even though I saw it was supposed to be fixed in RC1.

No, I don't want to use the exclusive mode, given in that case I can't use reclock anymore, and I want to use reclock to prevent the jitter occuring when playing a 23.976fps source on a 50hz TV - or call powerstrip to change the refresh rate to 60hz for 29.97 or 30fps sources.

I've been trying out media player classic with the same file, with VMR9 renderless output, using texture surfaces in 3D. At first I also got tearing, until I checked "Lock back-buffer before presenting (may fix broken vertical syncronization". Then tearing was gone, even when unckecking this setting. Weird.
Easiest way to see tearing taking place is to use reclock as the audio renderer, and hit ctrl-shift-alt-F10 to show the tearing test line, (ctrl-shift-alt-F9 to hide it). Should show as an continuous line. If not, tearing is happening.

This issue has been there for so long, I doubt it's ever going to be fixed. Could someone explain what could be this "back buffer locking" so that I can try to do the same on the MP sources? see if it fixes something in my case or not.
I'm willing to spend some time figuring this out, given it prevents me using MP on my system.
Thanks



Edit:
Huh. That was fast.
I checked the source. In d3dapp.cs, BuildPresentParamsFromSettings function:
Code:
      if (windowed)
      {
        presentParams.MultiSample = graphicsSettings.WindowedMultisampleType;
        presentParams.MultiSampleQuality = graphicsSettings.WindowedMultisampleQuality;
        presentParams.AutoDepthStencilFormat = graphicsSettings.WindowedDepthStencilBufferFormat;
        presentParams.BackBufferWidth = ourRenderTarget.ClientRectangle.Right - ourRenderTarget.ClientRectangle.Left;
        presentParams.BackBufferHeight = ourRenderTarget.ClientRectangle.Bottom - ourRenderTarget.ClientRectangle.Top;
        presentParams.BackBufferFormat = graphicsSettings.BackBufferFormat;
        presentParams.PresentationInterval = PresentInterval.Immediate;
        presentParams.FullScreenRefreshRateInHz = 0;
        presentParams.SwapEffect = SwapEffect.Discard;
        presentParams.PresentFlag = PresentFlag.Video; //PresentFlag.LockableBackBuffer;
        presentParams.DeviceWindow = ourRenderTarget;
        presentParams.Windowed = true;
        //presentParams.PresentationInterval = PresentInterval.Immediate;
      }
      else
      {
        presentParams.MultiSample = graphicsSettings.FullscreenMultisampleType;
        presentParams.MultiSampleQuality = graphicsSettings.FullscreenMultisampleQuality;
        presentParams.AutoDepthStencilFormat = graphicsSettings.FullscreenDepthStencilBufferFormat;

        presentParams.BackBufferWidth = graphicsSettings.DisplayMode.Width;
        presentParams.BackBufferHeight = graphicsSettings.DisplayMode.Height;
        presentParams.BackBufferFormat = graphicsSettings.DeviceCombo.BackBufferFormat;
        presentParams.PresentationInterval = PresentInterval.Default;
        presentParams.FullScreenRefreshRateInHz = graphicsSettings.DisplayMode.RefreshRate;
        presentParams.SwapEffect = SwapEffect.Discard;
        presentParams.PresentFlag = PresentFlag.Video; //|PresentFlag.LockableBackBuffer;
        presentParams.DeviceWindow = this;
        presentParams.Windowed = false;
      }

even though I'm starting MP fullscreen, windowed is true. Therefore, the presentation used is PresentInterval.Immediate, which causes tearing as it's not waiting the vsync to present the backbuffers.
PresentInterval.Default should be used instead, to preserve vsync at all time.

Should I post that somewhere else? I can't see any reason to have an immediate presentation of the backbuffer instead of the proper vsync one, even in the MP user interface. I rebuilt MP with default instead of immediate, and tearing was gone.
 

diehard2

Retired Team Member
  • Premium Supporter
  • April 22, 2006
    518
    28
    Chicago
    Home Country
    United States of America United States of America
    Hi zeflash, with the free download of visual c# express, you can check if this works. I don't have a TV card, so I'm unable to test for you. Just to let you know, this problem has been intractable ever since the VMR has been used, so it might not be that easy.
     

    tourettes

    Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    The change is now in SVN. For me it fixed the MP GUI tearing (when there isn't video playing i.e. when the exclusive mode is not enabled).

    In some cases this might also help with tearing with video playback, but it's still recomended to use exclusive mode for all video playback.
     

    zeflash

    Portal Pro
    July 7, 2005
    199
    16
    Home Country
    France France
    In some cases this might also help with tearing with video playback, but it's still recomended to use exclusive mode for all video playback.

    Well to have a perfect playback one should really *not* use exclusive mode, and use reclock to adapt the playback rate of sources that aren't matching the refresh rate of the display.
    But hey if all your sources are 25fps and your display is 50hz, then you don't need it :)
     

    zeflash

    Portal Pro
    July 7, 2005
    199
    16
    Home Country
    France France
    Hum, apparently that fix doesn't concern DVD playback, I noticed tearing while playing a DVD.
    That's weird though, I thought d3dapp was the only place where the presentation settings were set.
     

    tourettes

    Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    Hum, apparently that fix doesn't concern DVD playback, I noticed tearing while playing a DVD.
    That's weird though, I thought d3dapp was the only place where the presentation settings were set.

    It's the only place, but as I said earlier the video playback is most likely still needing the exclusive mode (even when playing 25fps PAL material on 50/75/100/hz display).

    ReClock is known to cause a lot of trouble an many systems, so the best way to play different frame rate videos is to get a display device that support other than 50Hz.

    Btw. if I remember correctly the ReClock works with exclusive directx mode. Try to configure the ReClock to use 2D instead of the 3D (cannot remember the right name for the ReClock setting and I won't install it just to see it :)
     

    zeflash

    Portal Pro
    July 7, 2005
    199
    16
    Home Country
    France France
    Thanks so much on that tip about disabling 3D detection in reclock - jitter is almost completely gone now; in fact the only remaining frame drops seem to be because of a lack of CPU power.
    Reclock rules, I don't see how you could have your video driver output a multiple of 23.976hz - let alone having a screen supporting that.
     

    risu

    MP Donator
  • Premium Supporter
  • September 22, 2006
    279
    19
    Home Country
    Finland Finland
    For some odd reason, using exclusive mode works fine on SD material but when I play HD clips on MP, audio stutters a lot (can't see stuttering on picture). I tried different audio codecs with and without SPDIF but they all act the same. Then without exclusive mode HD-clips play just fine but SD -stuff have tearing, go figure. Also windows mp and zoomplayer plays those clips just fine. I have dual monitor setup on nvidia 7600GS so single monitor could help. Using clone-mode didn't work before at all, there was terrible amount of tearing.
     

    Users who are viewing this thread

    Top Bottom