MPlayer patches for VDPAU

Brief Overview:
        These patches add VDPAU support to MPlayer. ffmpeg already supports
        VDPAU, in recent SVN versions.

        * HW decode acceleration is provided for MPEG-1/2, H.264 and VC-1.

        * A VDPAU video output module is added to MPlayer.

Current support:
        The NVIDIA 180.06 beta driver for Linux, Solaris, and FreeBSD
        provides initial VDPAU support for most GeForce 8xxx and 9xxx
        series GPUs and later. Please see the README accompanying the driver
        for a complete list of supported GPUs and their capabilities.

Prerequisite:
        The following should be acquired using your distribution package
        management system, or from source if required:

        * Subversion (svn); See http://subversion.tigris.org
        * C development tools: make, gcc, binutils.
        * Various X11 libraries (and their development packages)
          that MPlayer relies upon.

        Some or all of the above requirements may be met by, e.g.:

        * Fedora:

        $ sudo yum groupinstall "Development Tools" "X Software Development"
        $ sudo yum install subversion

        * Ubuntu:

         $ sudo apt-get build-dep mplayer
         $ sudo apt-get install subversion

Installing the patch:
        Run the supplied shell script:

        $ sh checkout-patch-build.sh

Running MPlayer:
        $ cd mplayer-vdpau
        $ ./mplayer -vo vdpau -vc <VDPAU-codec-name> <filename>

        <VDPAU-codec-name> can be one of:

            ffmpeg12vdpau
            ffh264vdpau
            ffwmv3vdpau
            ffvc1vdpau

        ... based on the type of video bitstream (ffmpeg12vdpau for MPEG-1
        or MPEG-2, ffh264vdpau for H.264, ffwmv3vdpau for WMV3, and
        ffvc1vdpau for VC-1).

        If a VDPAU codec is used, the VDPAU output module must be used.

        Alternatively, you may use the VDPAU output module without specifying
        a VDPAU codec. In this case, the bitstream decoding is not accelerated
        using VDPAU, but the decoded video is still presented using VDPAU:

        $ ./mplayer -vo vdpau <filename>

        MPlayer can automatically choose the correct codec if you use the
        following command-line:

        $ ./mplayer -vo vdpau -vc ffh264vdpau,ffmpeg12vdpau,ffvc1vdpau,ffwmv3vdpau, <filename>

        In the above command, note the trailing comma at the end of the -vc
        list.

Known Limitations:
        1. Playing some video streams may display visual corruption, or
           cause temporary GPU errors and/or hang or crash the system.

Example Movie Clips:
        MPEG:   http://inventaaustralia.zftp.com.nyud.net/videos/MPEGIO3MBPS30sec.mpg
                ./mplayer -vo vdpau -vc ffmpeg12vdpau MPEGIO3MBPS30sec.mpg

        H.264:  http://samples.mplayerhq.hu.nyud.net/V-codecs/h264/PAFF/Grey.ts
                ./mplayer -vo vdpau -vc ffh264vdpau Grey.ts
                http://samples.mplayerhq.hu.nyud.net/V-codecs/h264/nature_704x576_25Hz_1500kbits.h264
                ./mplayer -vo vdpau -vc ffh264vdpau nature_704x576_25Hz_1500kbits.h264

        VC-1:   http://samples.mplayerhq.hu.nyud.net/V-codecs/WVC1/FlightSimX_720p60_51_15Mbps.wmv
                ./mplayer -vo vdpau -vc ffvc1vdpau FlightSimX_720p60_51_15Mbps.wmv

        WMV3:   http://download.microsoft.com.nyud.net/download/0/9/d/09d051c4-decc-4d39-9c57-f520187213a1/Amazing_Caves_720.exe
                    (use `unzip` to extract the .exe)
                ./mplayer -vo vdpau -vc ffwmv3vdpau Amazing_Caves_720.wmv

        Note: .nyud.net added to the above URLs to cache the content on
        CoralCDN (http://www.coralcdn.org/)

Changes:

        2009/02/09:

        * Modify vo_vdpau to automatically "calculate" the number of H.264
          reference frames required based on the information encoded into the
          stream, instead of randomly picking a level 4.1 limit. Manual
          changes to vo_vdpau's max_reference_frames calculations should no
          longer be required. This may reduce memory usage for some streams.
        * Add support for "ASS"/"SSA" subtitles (MPlayer -ass option).
          Patch contributed by Grigori Goronzy.
        * Fix vo_vdpau to set output surface size based on video height not
          width. This will slightly reduce video memory usage in some cases.
        * Fix a typo calculating display clipping sizes.
        * Fixed IMGFMT_BGRA support.
        * Updated ffmpeg to r16726, which simply includes our latest patch.

        2009/01/26:

        * Updated to MPlayer SVN r28348, ffmpeg SVN r16724.
          This ffmpeg version contains VDPAU support built-in.
        * Fix a typo in a debug statement.
        * Fix parsing of VC-1's postproc field.

        2008/12/22:

        * Fix issue with some H.264 streams where frames would be displayed
          out-of-order.
        * Fix vo_vdpau's window sizing/resizing behaviour to exactly match
          vo_xv. This will increase MPlayer's video RAM usage for cases where
          the resolution of the stream being played exceeds that of the
          desktop.

        2008/12/12:

        * Cater for modified vdp_decoder_create API.
        * For H.264, request enough references to handle level 4.1 streams.
        * Fix MPEG quantizer matrices passed to VDPAU. Should fix MPEG
          quality issues. Thanks to the MythTV community for the patch.
        * Implemented OSD compositing.
        * Correctly handle H.264 long-term reference IDs in the DPB.
        * Incorporated some libavcodec changes from the MythTV patches.
        * Various cleanups based on feedback on ffmpeg/MPlayer mailing lists.

        2008/11/26:

        * Modify build script to force VDPAU to be enabled, and disable x264,
          to work around various configure/build issues people were having.
        * Supply only H.264 slice data to VDPAU, not any unused headers.
          This prevents passing in more compressed data than the H.264
          specification allows.
        * Increase H.264 MAX_SLICES to cater for test streams with an
          extremely large number of slices.
        * Handle H.264 streams inside containers that strip the H.264 start
          codes (e.g. MOV/MKV)
        * Various cleanups based on feedback on ffmpeg/MPlayer mailing lists.

