New: Antialiasing for MP2 gui (1 Viewer)

morpheus_xx

Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    Hi all,

    I finally managed to find a working D3D setup to enable anti-aliasing for MP2 :)

    It gives us smoother edges, button corners, scrollbars a.s.o.

    The code changes I commited to a new branch: 20110410-Antialiasing

    See the differences in attached screenshots. Watch especially on rounded buttons, diagonal lines, scroll bar...

    Morpheus
     

    Attachments

    • 01_home_slimtv.png
      01_home_slimtv.png
      552.8 KB
    • 01_home_slimtv_antialiased.png
      01_home_slimtv_antialiased.png
      562.9 KB
    • 02_gui_test.png
      02_gui_test.png
      439 KB
    • 02_gui_test_antialiased.png
      02_gui_test_antialiased.png
      453.6 KB
    • 02_gui_test_antialiased_8samples.png
      02_gui_test_antialiased_8samples.png
      401.3 KB
    • 02_gui_test_antialiased_8samples_video_playing.jpg
      02_gui_test_antialiased_8samples_video_playing.jpg
      141.2 KB
    • 03_channel_list.png
      03_channel_list.png
      312.8 KB
    • 03_channel_list_antialiased.png
      03_channel_list_antialiased.png
      328 KB
    • 04_AA_Settings.png
      04_AA_Settings.png
      266.8 KB

    msj33

    MP Donator
  • Premium Supporter
  • November 30, 2005
    471
    76
    Home Country
    England England
    This is nice work - Look very smooth:)

    Will this anti-aliasing iimplementation increase graphics card demands or CPU usage in mepo2?

    /Morten
     

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    • Thread starter
    • Moderator
    • #4
    AW: New: Antialiasing for MP2 gui

    I have to make some more test, also about performance. And I think about a setting to enable / disable this feature.
     

    FreakyJ

    Retired Team Member
  • Premium Supporter
  • July 25, 2010
    4,024
    1,420
    Home Country
    Germany Germany
    AW: New: Antialiasing for MP2 gui

    10000 times better than before =) Especially the scrollbar is now nice :p^^
     

    offbyone

    Development Group
  • Team MediaPortal
  • April 26, 2008
    3,989
    3,712
    Stuttgart
    Home Country
    Germany Germany
    AW: New: Antialiasing for MP2 gui

    Yeah, I was gonna bring up that question sooner or later ;) Now MP2 looks more like WPF (and the borders in my OnlineVideos screens look finally nice). Antialiasing is not that big of a performance hit these days on a GFX card, so this should be in by default.
    Thx mate!
     

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    • Thread starter
    • Moderator
    • #7
    AW: New: Antialiasing for MP2 gui

    I tested the AA build yesterday on my ("slow") HTPC with integrated graphics (ATI 4200).

    The "pro" list:
    • Smooth graphics

    The "contra" list:
    • Video playback was at the limit, a bit stuttering in single video
    • PiP didn't start, MP2 hanged
    • Video qualitity was not good, because it was also smoothed.

    For me this means following:
    • the Antialiasing should be made optional for low-end/embedded graphics
    • we need a way to disable it when video plays, maybe complete or only for the video surfaces

    Morpheus
     

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    • Thread starter
    • Moderator
    • #8
    AW: New: Antialiasing for MP2 gui

    Some more news about this topic:

    first of all: the DirectX code in MP2 is very bad, as any MP1 leftover :p

    I introduced a setting to select the preferred MultiSampling type. The types are enumerated by the device, so other can get different values.

    The result of "Eight Samples" mode you can see in the screenshot in 1st post. It gives a better quality than "Two Samples".

    After Arion_p pointed to a RendererState setting, I left the multisampling enabled for PrimitiveBuffer, but turned it of for ImageContext (Image and Video frame rendering).

    Performance:
    - my DevPC plays 2 full HD BluRay clips in PiP without (new :D) issues :)
    - HTPC is not yet tested (will do tomorrow).
     

    tourettes

    Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    Re: AW: New: Antialiasing for MP2 gui

    first of all: the DirectX code in MP2 is very bad, as any MP1 leftover :p

    <offtopic>MP1 didn't have SlimDX so someone must have had some extra effort to port that MDX based code to bad SlimDX code :D</offtopic>

    After Arion_p pointed to a RendererState setting, I left the multisampling enabled for PrimitiveBuffer, but turned it of for ImageContext (Image and Video frame rendering).

    That sounds pretty good way to handle it. Only thing that it would probably have jagged edges is rotated video (some skins might want to have 3D perspective in the video overlay) or thumbnails. Or is that ImageContext only for fullscreen images?
     

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    • Thread starter
    • Moderator
    • #10
    AW: Re: AW: New: Antialiasing for MP2 gui

    That sounds pretty good way to handle it. Only thing that it would probably have jagged edges is rotated video (some skins might want to have 3D perspective in the video overlay) or thumbnails. Or is that ImageContext only for fullscreen images?

    In the screenshot of GUI test above with playing video you can see aliased video frames in the right boxes. When rotation is used, "steps" are visible at the 16:9 black borders.

    But I'm not sure if my current approach is already completly working, because this special aliasing I also have seen when the MultiSampling was enabled. It could be caused by the Transform filter, which is applied.
     

    Users who are viewing this thread

    Top Bottom