Matrox Millennium II Xv extension

This patch will enhance the X.org 7.1 Matrox Millennium II driver to support the X video (Xv) extension (extremely useful for playing DVDs and other MPEGs). The extension is implemented as a CPU to Frame Buffer YUV scaling ILOAD. A true overlay was not used because of a Millennium II hardware limitation that would reduce the maximum usable frame buffer to only 4Mb.

Supported Cards

  • Matrox Millennium II PCI (MGA2164W)
  • Matrox Millennium II AGP (MGA2164W_AGP)

  • Features:

    YUV->RGB 4:2:2 (UYUY/YUY2)fully hardware accelerated
    YUV->RGB 4:2:0 (YV12/I420)hardware accelerated with software swizzling
    Horizontal upscaling up to 8xfully hardware accelerated (HQ linear filter)
    Horizontal downscaling up to 4xhardware accelerated with software decimation (HQ linear filter)
    Vertical upscalingsoftware linear filtering
    Vertical downscalingsoftware decimation (no filtering)

    Download & Installation

  • download the driver patch
  • download the relased xorg 7.1 mga driver source
  • uncompress the driver and apply the patch to the file src/mga_video.c
  • compile the driver (./configure and then make)
  • replace the current mga_drv.so with the one from src/.lib/mga_drv.so


  • After restarting X, if the driver was successfully installed you should have the following lines in the XFree86 log file (/var/log/Xorg.0.log)
    (II) Loading extension XVideo
    . . .
    (II) MGA(0): Using MGA 2164W ILOAD video
    (II) MGA(0): This is an experimental driver and may not work on your machine.
    

    You will now be able to enjoy reasonable DVD playback speeds in Linux with your Millennium II.

    Screenshot

    click to view full size

    Bug reports and success/failure stories are greatly appreciated. Email me at gorlik_at_yahoo.com

    To Do

  • implement xv attributes
  • improve software filtering performance
  • improve PCI tranfers performance
  • enable 1:1 optimization
  • implement upscale only optimization
  • Known Bugs

  • horizontal downscaling beyond 8x will crash the X server
  • some users reported problems with dual head setups using other matrox cards. Currently I have no way to reproduce and/or fix these problems.
  • the driver has been reported not to work on Millennium I.

    Older downloads

    For older XFree releases there are three oprtions:
  • "Precompiled" stable driver (for RedHat 8.0/XFree 4.2.0/gcc3). Just replace the file /usr/X11R6/lib/modules/drivers/mga_drv.o with this one

  • "Stable" driver (source) in the form of a patch to apply against the file
    xc/programs/Xserver/hw/xfree86/drivers/mga/mga_video.c
    from the released XFree86 4.2.0.

  • "Experimental" driver (source) directly from my local cvs. Just replace the original mga_video.c with this file
    Compile and install XFree86 as usual.

    After restarting X, if the driver was successfully installed you should have the following lines in the XFree86 log file (/var/log/XFree86.0.log)
    (II) Loading extension XVideo
    . . .
    (II) MGA(0): Using MGA 2164W ILOAD video
    (II) MGA(0): This is an experimenteal driver and may not work on your machine.
    

    You will now be able to enjoy reasonable DVD playback speeds in Linux with your Millennium II. Playing a DVD using ogle 0.8.5 at 1024x768 resolution on my P3-733 with Millennium II PCI I get full fps with widescreen (16:9 or higher) movie (24fps) content. My machine does not seem to be fast enough for Full frame (4:3) TV (30fps) material where I get around 26-27fps.

    Screenshot

    click to view full size