Matrox Millennium II Xv extension

Submitted by GG on Fri, 04/07/2006 - 13:56

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 video formats). 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.

NOTE: This page is mostly for historical reasons. The patch has been included in the official xorg mga driver since version 1.4.7 (dated 5-sep-2007). If you are using xorg 7.3 or newer you already have xv support.

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 8x fully hardware accelerated (HQ linear filter)
  • Horizontal downscaling up to 4x hardware accelerated with software decimation (HQ linear filter)
  • Vertical upscaling software linear filtering
  • Vertical downscaling software decimation (no filtering)
  • Optimized code path for YUV->RGB conversion with 1:1 scaling

Screenshots

mpeg4 on DEC alpha
Playing a mpeg-4 (divx) file using mplayer on a DEC/Compaq XP1000 (EV67 667MHz)

DVD video on P3
Playing a DVD using Ogle on a P-3 733MHz.

Known Bugs/Limitations

  • 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.

To Do

  • implement xv attributes
  • improve software filtering performance
  • improve PCI tranfers performance
  • implement upscale only optimization (full screen)

Download & Installation

  1. download the driver patch
  2. download the relased xorg 7.1 mga driver source
  3. uncompress the driver and apply the patch to the file src/mga_video.c
  4. compile the driver (./configure and then make)
  5. 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.

Attachment Size
xorg71_mga_video-rc2.diff 23.61 KB
Filed under