summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhang Le <r0bertz@gentoo.org>2007-08-04 08:33:15 +0800
committerZhang Le <r0bertz@gentoo.org>2007-08-04 08:33:15 +0800
commit528622594e8375e880795e6c77dff414a972cb1b (patch)
treed822369225e333168ba4a5c0e9c067a5c3daa5af /media-video
parentadd strace/files/strace-4.5.15-invalid-time.patch (diff)
downloadloongson-528622594e8375e880795e6c77dff414a972cb1b.tar.gz
loongson-528622594e8375e880795e6c77dff414a972cb1b.tar.bz2
loongson-528622594e8375e880795e6c77dff414a972cb1b.zip
add mplayer and modified strace sigcontext patch
Diffstat (limited to 'media-video')
-rw-r--r--media-video/mplayer/ChangeLog2367
-rw-r--r--media-video/mplayer/Manifest41
-rw-r--r--media-video/mplayer/files/digest-mplayer-1.0.20070622-r314
-rw-r--r--media-video/mplayer/files/mplayer-1.0_rc1-asmrules.patch51
-rw-r--r--media-video/mplayer/files/mplayer-loongson.patch6573
-rw-r--r--media-video/mplayer/files/mplayer-undefined-reference-fix.patch10
-rw-r--r--media-video/mplayer/files/mplayer-xshape.patch12
-rw-r--r--media-video/mplayer/files/mplayer.desktop13
-rw-r--r--media-video/mplayer/metadata.xml8
-rw-r--r--media-video/mplayer/mplayer-1.0.20070622-r3.ebuild556
10 files changed, 9645 insertions, 0 deletions
diff --git a/media-video/mplayer/ChangeLog b/media-video/mplayer/ChangeLog
new file mode 100644
index 0000000..c00fdc5
--- /dev/null
+++ b/media-video/mplayer/ChangeLog
@@ -0,0 +1,2367 @@
+# ChangeLog for media-video/mplayer
+# Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/media-video/mplayer/ChangeLog,v 1.504 2007/07/28 15:25:18 beandog Exp $
+
+*mplayer-1.0.20070622-r3 (28 Jul 2007)
+
+ 28 Jul 2007; Steve Dibb <beandog@gentoo.org>
+ mplayer-1.0.20070622-r2.ebuild, +mplayer-1.0.20070622-r3.ebuild:
+ Remove pulseaudio patch, being developed upstream, add warning on old version
+
+*mplayer-1.0.20070622-r2 (26 Jul 2007)
+
+ 26 Jul 2007; Steve Dibb <beandog@gentoo.org>
+ +mplayer-1.0.20070622-r2.ebuild:
+ Remove debug option, since it is broken in this release, add pulseaudio
+ support, bug 183230 (thanks to drizzt for patch)
+
+ 05 Jul 2007; Markus Rothe <corsair@gentoo.org>
+ mplayer-1.0.20070622-r1.ebuild:
+ Stable on ppc64; bug #181097
+
+ 05 Jul 2007; Raúl Porcel <armin76@gentoo.org>
+ mplayer-1.0.20070622-r1.ebuild:
+ alpha/ia64 stable
+
+ 04 Jul 2007; Gustavo Zacarias <gustavoz@gentoo.org>
+ mplayer-1.0.20070622-r1.ebuild:
+ Stable on sparc
+
+ 04 Jul 2007; René Nussbaumer <killerfox@gentoo.org>
+ mplayer-1.0.20070622-r1.ebuild:
+ Stable on hppa. See bug #181097.
+
+ 02 Jul 2007; Piotr Jaroszyński <peper@gentoo.org>
+ mplayer-1.0_rc1-r2.ebuild, mplayer-1.0.20070321.ebuild,
+ mplayer-1.0.20070321-r1.ebuild, mplayer-1.0.20070427.ebuild,
+ mplayer-1.0.20070622.ebuild, mplayer-1.0.20070622-r1.ebuild:
+ (QA) RESTRICT clean up.
+
+ 28 Jun 2007; Tobias Scherbaum <dertobi123@gentoo.org>
+ mplayer-1.0.20070622-r1.ebuild:
+ ppc stable, bug #181097
+
+ 25 Jun 2007; Gustavo Zacarias <gustavoz@gentoo.org>
+ mplayer-1.0.20070622.ebuild:
+ Stable on sparc wrt security #181097
+
+ 25 Jun 2007; Raúl Porcel <armin76@gentoo.org>
+ mplayer-1.0.20070622-r1.ebuild:
+ x86 stable wrt security #181097
+
+ 25 Jun 2007; Steve Dibb <beandog@gentoo.org>
+ mplayer-1.0.20070622-r1.ebuild:
+ Add support for SSSE3
+
+*mplayer-1.0.20070622-r1 (24 Jun 2007)
+
+ 24 Jun 2007; Steve Dibb <beandog@gentoo.org>
+ +mplayer-1.0.20070622-r1.ebuild:
+ Cleanup dvd use flags, bug 174721; don't disable a52 internal support unless
+ -dvd is used, bug 181082
+
+ 24 Jun 2007; Raúl Porcel <armin76@gentoo.org>
+ mplayer-1.0.20070622.ebuild:
+ alpha/ia64 stable wrt security #181097
+
+ 24 Jun 2007; Samuli Suominen <drac@gentoo.org>
+ mplayer-1.0.20070622.ebuild:
+ Makefile allready installs both pixmap and desktop file so stop doing that
+ inside ebuild.
+
+ 23 Jun 2007; Christoph Mende <angelos@gentoo.org>
+ mplayer-1.0.20070622.ebuild:
+ Stable on amd64 wrt security bug 181097
+
+ 23 Jun 2007; Jeroen Roovers <jer@gentoo.org> mplayer-1.0.20070622.ebuild:
+ Stable for HPPA (bug #181097).
+
+ 23 Jun 2007; Markus Rothe <corsair@gentoo.org>
+ mplayer-1.0.20070622.ebuild:
+ Stable on ppc64; bug #181097
+
+ 22 Jun 2007; Steve Dibb <beandog@gentoo.org> mplayer-1.0.20070622.ebuild:
+ Fix dts configuration, bug 182914
+
+*mplayer-1.0.20070622 (22 Jun 2007)
+
+ 22 Jun 2007; Steve Dibb <beandog@gentoo.org> +mplayer-1.0.20070622.ebuild:
+ Version bump, security bug 181097
+
+ 10 Jun 2007; Luca Barbato <lu_zero@gentoo.org>
+ mplayer-1.0.20070427.ebuild:
+ Altivec works on ppc...
+
+ 20 May 2007; Steve Dibb <beandog@gentoo.org> mplayer-1.0.20070321.ebuild,
+ mplayer-1.0.20070427.ebuild:
+ Fix install location of desktop xpm, bug 179257
+
+ 03 May 2007; Tobias Scherbaum <dertobi123@gentoo.org>
+ mplayer-1.0.20070321.ebuild:
+ ppc stable, bug #168917
+
+ 02 May 2007; Jeroen Roovers <jer@gentoo.org> mplayer-1.0.20070321.ebuild:
+ Stable for HPPA (bug #168917).
+
+ 02 May 2007; Bryan Østergaard <kloeri@gentoo.org>
+ mplayer-1.0.20070321.ebuild:
+ Stable on Alpha, bug 168917.
+
+*mplayer-1.0.20070321-r1 (01 May 2007)
+
+ 01 May 2007; Steve Dibb <beandog@gentoo.org>
+ +mplayer-1.0.20070321-r1.ebuild:
+ Remove .svn directories, bug 172198
+
+ 01 May 2007; Markus Rothe <corsair@gentoo.org>
+ mplayer-1.0.20070321.ebuild:
+ Stable on ppc64; bug #168917
+
+ 30 Apr 2007; Gustavo Zacarias <gustavoz@gentoo.org>
+ mplayer-1.0.20070321.ebuild:
+ Stable on sparc wrt security #168917
+
+ 30 Apr 2007; Raúl Porcel <armin76@gentoo.org>
+ mplayer-1.0.20070321.ebuild:
+ ia64 + x86 stable wrt security bug 168917
+
+*mplayer-1.0.20070427 (27 Apr 2007)
+
+ 27 Apr 2007; Steve Dibb <beandog@gentoo.org> +mplayer-1.0.20070427.ebuild:
+ Version bump, fix bug 172198
+
+ 26 Apr 2007; Steve Dibb <beandog@gentoo.org> mplayer-1.0.20070321.ebuild:
+ amd64 stable
+
+ 26 Apr 2007; Steve Dibb <beandog@gentoo.org> -mplayer-1.0_rc1.ebuild,
+ -mplayer-1.0_rc1-r1.ebuild:
+ Removing old version with security issue, bug 159727
+
+ 26 Apr 2007; Steve Dibb <beandog@gentoo.org> -mplayer-1.0_pre8-r1.ebuild:
+ Removing old version with security issue, bug 159727
+
+*mplayer-1.0.20070321 (26 Apr 2007)
+
+ 26 Apr 2007; Steve Dibb <beandog@gentoo.org> +mplayer-1.0.20070321.ebuild,
+ -mplayer-1.0_rc2_pre20070321-r4.ebuild:
+ Fix naming scheme
+
+ 09 Apr 2007; Luca Barbato <lu_zero@gentoo.org>
+ mplayer-1.0_rc2_pre20070321-r4.ebuild:
+ missing places...
+
+ 09 Apr 2007; Luca Barbato <lu_zero@gentoo.org>
+ mplayer-1.0_rc2_pre20070321-r4.ebuild:
+ MPlayer now installs the default config in /etc/mplayer/mplayer.conf
+
+ 02 Apr 2007; Luca Barbato <lu_zero@gentoo.org>
+ mplayer-1.0_rc2_pre20070321-r4.ebuild:
+ Remove wrong deps
+
+ 28 Mar 2007; Steve Dibb <beandog@gentoo.org>
+ -mplayer-1.0_rc2_pre20070321-r3.ebuild,
+ mplayer-1.0_rc2_pre20070321-r4.ebuild:
+ - Fix tga use flag, bug 172372
+ - Make mp2 use flag dependent on encode, make dv and x264 use flags
+ independent, bug 172232
+
+ 25 Mar 2007; Steve Dibb <beandog@gentoo.org>
+ mplayer-1.0_rc2_pre20070321-r3.ebuild:
+ Fix tdfx use flag (bug 172170)
+
+*mplayer-1.0_rc2_pre20070321-r4 (25 Mar 2007)
+
+ 25 Mar 2007; Steve Dibb <beandog@gentoo.org>
+ +mplayer-1.0_rc2_pre20070321-r4.ebuild:
+ - Remove dependency on media-libs/a52dec
+ - Fix tdfx use flag (bug 172170)
+ - Remove LINGUAS use flags, rely on variable from make.conf to set languages,
+ add notice of special ordering
+ - Fix CPU optimization use flags ( bug 155232 )
+ - Remove -j1 from MAKEOPTS ( bug 86245 )
+
+*mplayer-1.0_rc2_pre20070321-r3 (23 Mar 2007)
+
+ 23 Mar 2007; Steve Dibb <beandog@gentoo.org>
+ +mplayer-1.0_rc2_pre20070321-r3.ebuild:
+ - Add vidix use flag
+ - Fix lzo use flag dependency
+ - Fix speex use flag dependency
+ - Fix srt+truetype+iconv cascading dependencies
+ - Re-add fontconfig and subfont options to mplayer.conf for truetype
+ - Force win32codecs dep on real use flag for x86
+ - Fix HPPA compilation, disable cpudetection on certain arches ( bug 171879 )
+ - Force OSS audio dep on radio use flag ( bug 171850 )
+ - Fix mp2 dependency ( toolame -> twolame )
+ - Cleanup RDEPEND tree
+ - Drop libdvdread dependency
+ - Add libdvdnav dependency
+ - Optional mp3 dependency on lame
+ - Dont disable vidix on -svga
+ - Cleanup DVB/V4L/Radio checks
+ - dodoc Changelog
+
+*mplayer-1.0_rc2_pre20070321-r2 (22 Mar 2007)
+
+ 22 Mar 2007; Steve Dibb <beandog@gentoo.org> +files/mplayer-xshape.patch,
+ +mplayer-1.0_rc2_pre20070321-r2.ebuild:
+ Add XShape detection patch, thanks to anarchy
+
+*mplayer-1.0_rc2_pre20070321-r1 (22 Mar 2007)
+
+ 22 Mar 2007; Steve Dibb <beandog@gentoo.org>
+ +mplayer-1.0_rc2_pre20070321-r1.ebuild:
+ Remove some configuration changes, remove changing font options on mplayer.conf
+
+*mplayer-1.0_rc2_pre20070321 (22 Mar 2007)
+
+ 22 Mar 2007; Steve Dibb <beandog@gentoo.org>
+ +mplayer-1.0_rc2_pre20070321.ebuild:
+ Version bump
+
+ 17 Feb 2007; Simon Stelling <blubb@gentoo.org> mplayer-1.0_rc1-r2.ebuild:
+ only use amd64codecs if we're not distributing the build
+
+ 16 Feb 2007; Simon Stelling <blubb@gentoo.org> mplayer-1.0_rc1-r2.ebuild:
+ depend on >=portage-2.1.2 to make sure the assembler USE flags are unmasked
+ on amd64
+
+ 13 Feb 2007; Markus Rothe <corsair@gentoo.org> mplayer-1.0_rc1-r2.ebuild:
+ Stable on ppc64; bug #159727
+
+ 12 Feb 2007; Bryan Østergaard <kloeri@gentoo.org>
+ mplayer-1.0_rc1-r2.ebuild:
+ Stable on Alpha, bug 159727.
+
+ 12 Feb 2007; Bryan Østergaard <kloeri@gentoo.org>
+ mplayer-1.0_rc1-r2.ebuild:
+ Stable on IA64, bug 159727.
+
+ 12 Feb 2007; Gustavo Zacarias <gustavoz@gentoo.org>
+ mplayer-1.0_rc1-r2.ebuild:
+ Stable on sparc wrt security #159727
+
+ 11 Feb 2007; Simon Stelling <blubb@gentoo.org> mplayer-1.0_rc1-r2.ebuild:
+ stable on amd64; security bug 159727
+
+ 11 Feb 2007; René Nussbaumer <killerfox@gentoo.org>
+ mplayer-1.0_rc1-r2.ebuild:
+ Stable on hppa. See bug #159727.
+
+ 11 Feb 2007; Tobias Scherbaum <dertobi123@gentoo.org>
+ mplayer-1.0_rc1-r2.ebuild:
+ Stable on ppc wrt bug #159727.
+
+ 11 Feb 2007; Christian Faulhammer <opfer@gentoo.org>
+ mplayer-1.0_rc1-r2.ebuild:
+ stable x86; security bug #159727
+
+ 01 Feb 2007; Steve Dibb <beandog@gentoo.org> mplayer-1.0_rc1.ebuild,
+ mplayer-1.0_rc1-r1.ebuild, mplayer-1.0_rc1-r2.ebuild:
+ Disable ivtv video output support, bug 164748
+
+*mplayer-1.0_rc1-r2 (30 Jan 2007)
+
+ 30 Jan 2007; Steve Dibb <beandog@gentoo.org>
+ +files/mplayer-1.0_rc1-asmrules.patch, +mplayer-1.0_rc1-r2.ebuild:
+ Add asmrules security patch from upstream, bug 159727
+
+ 30 Jan 2007; Steve Dibb <beandog@gentoo.org> mplayer-1.0_rc1.ebuild,
+ mplayer-1.0_rc1-r1.ebuild:
+ Upgrade main Blue skin to 1.7
+
+ 17 Jan 2007; Christian Faulhammer <opfer@gentoo.org>
+ mplayer-1.0_rc1.ebuild:
+ filter -fomit-frame-pointer when USE=debug is set
+
+ 09 Jan 2007; Olivier Crête <tester@gentoo.org> mplayer-1.0_rc1.ebuild:
+ Stable on amd64 for bugs #157814 and #161053
+
+*mplayer-1.0_rc1-r1 (06 Jan 2007)
+
+ 06 Jan 2007; Steve Dibb <beandog@gentoo.org> +mplayer-1.0_rc1-r1.ebuild:
+ Add amd64codecs support for real libs on amd64
+
+ 04 Jan 2007; Christian Faulhammer <opfer@gentoo.org>
+ mplayer-1.0_rc1.ebuild:
+ stable x86, bug #157814
+
+ 03 Jan 2007; Luca Barbato <lu_zero@gentoo.org> mplayer-1.0_rc1.ebuild:
+ disable dvdnav for now
+
+ 31 Dec 2006; Luca Barbato <lu_zero@gentoo.org> mplayer-1.0_rc1.ebuild:
+ fix mplayer to build against the latest live555.com
+
+ 23 Dec 2006; Tobias Scherbaum <dertobi123@gentoo.org>
+ mplayer-1.0_rc1.ebuild:
+ Stable on ppc wrt bug #157814.
+
+ 21 Dec 2006; Gustavo Zacarias <gustavoz@gentoo.org>
+ mplayer-1.0_pre8.ebuild, mplayer-1.0_pre8-r1.ebuild,
+ mplayer-1.0_rc1.ebuild:
+ Stable on sparc wrt #157814
+
+ 21 Dec 2006; Markus Rothe <corsair@gentoo.org> mplayer-1.0_rc1.ebuild:
+ Stable on ppc64; bug #157814
+
+ 10 Dec 2006; Luca Barbato <lu_zero@gentoo.org> mplayer-1.0_rc1.ebuild:
+ Fix faac dep
+
+ 11 Dec 2006; Diego Pettenò <flameeyes@gentoo.org> mplayer-1.0_rc1.ebuild:
+ Tell the configure script to sue the correct CC/BUILD_CC compiler, close bug
+ #155515, thanks to Timothy Redaelli for reporting.
+
+ 01 Dec 2006; Steve Dibb <beandog@gentoo.org> mplayer-1.0_rc1.ebuild:
+ Disable pvr support
+
+ 21 Nov 2006; Luca Barbato <lu_zero@gentoo.org> mplayer-1.0_rc1.ebuild:
+ fix the iconv-truetype logic, thanks to hansmi for pointing the issue
+
+ 14 Nov 2006; Luca Barbato <lu_zero@gentoo.org> mplayer-1.0_rc1.ebuild:
+ Typo, fixed thanks to baru reddy <barureddy@yahoo.com> and zzam, see
+ bug #154504
+
+ 07 Nov 2006; Luca Barbato <lu_zero@gentoo.org> mplayer-1.0_rc1.ebuild:
+ Improve default config
+
+ 06 Nov 2006; Steve Dibb <beandog@gentoo.org>
+ files/digest-mplayer-1.0_pre8, files/digest-mplayer-1.0_pre8-r1,
+ files/digest-mplayer-1.0_rc1, Manifest:
+ Fix Blue skin digest, again, bug #152694
+
+ 03 Nov 2006; Patrick McLean <chutzpah@gentoo.org> mplayer-1.0_rc1.ebuild:
+ Clean up custom-cflags a bit, add -fomit-frame-pointer as it seems to be
+ required to compile some of the inline asm.
+
+ 31 Oct 2006; Luca Barbato <lu_zero@gentoo.org> mplayer-1.0_rc1.ebuild:
+ Fix some packaging issue part II
+
+ 31 Oct 2006; Luca Barbato <lu_zero@gentoo.org>
+ -mplayer-1.0_pre20060810.ebuild, -mplayer-1.0_pre20061019.ebuild:
+ Cleanup
+
+ 31 Oct 2006; Luca Barbato <lu_zero@gentoo.org> mplayer-1.0_pre8.ebuild,
+ mplayer-1.0_pre8-r1.ebuild, mplayer-1.0_pre20060810.ebuild,
+ mplayer-1.0_pre20061019.ebuild, mplayer-1.0_rc1.ebuild:
+ Fix packaging, do not install codecs.conf anymore
+
+ 30 Oct 2006; Diego Pettenò <flameeyes@gentoo.org>
+ mplayer-1.0_pre8.ebuild, mplayer-1.0_pre8-r1.ebuild,
+ mplayer-1.0_pre20060810.ebuild, mplayer-1.0_pre20061019.ebuild,
+ mplayer-1.0_rc1.ebuild:
+ Add ~x86-fbsd keyword.
+
+ 27 Oct 2006; Steve Dibb <beandog@gentoo.org> mplayer-1.0_rc1.ebuild:
+ Add subtitles USE flag, notes about freetype, iconv
+
+ 26 Oct 2006; Vlastimil Babka <caster@gentoo.org> mplayer-1.0_rc1.ebuild:
+ Apply the previous patch in $S. Fixes bug #152842.
+
+ 25 Oct 2006; Steve Dibb <beandog@gentoo.org> mplayer-1.0_pre8.ebuild,
+ mplayer-1.0_pre8-r1.ebuild, mplayer-1.0_pre20060810.ebuild,
+ mplayer-1.0_pre20061019.ebuild, mplayer-1.0_rc1.ebuild:
+ Remove XMMS support
+
+ 25 Oct 2006; Luca Barbato <lu_zero@gentoo.org>
+ +files/mplayer-undefined-reference-fix.patch, mplayer-1.0_rc1.ebuild:
+ fix ppc64
+
+ 25 Oct 2006; Steve Dibb <beandog@gentoo.org>
+ files/digest-mplayer-1.0_pre8, files/digest-mplayer-1.0_pre8-r1,
+ files/digest-mplayer-1.0_pre20060810,
+ files/digest-mplayer-1.0_pre20061019, files/digest-mplayer-1.0_rc1,
+ Manifest:
+ Fix digest for blue skin, bug #152694
+
+ 25 Oct 2006; Simon Stelling <blubb@gentoo.org> mplayer-1.0_pre8.ebuild,
+ mplayer-1.0_pre8-r1.ebuild, mplayer-1.0_rc1.ebuild:
+ backport the asm fixes and don't hard-enable mmxext either
+
+ 25 Oct 2006; Luca Barbato <lu_zero@gentoo.org>
+ files/digest-mplayer-1.0_pre8, files/digest-mplayer-1.0_pre8-r1,
+ files/digest-mplayer-1.0_pre20060810,
+ files/digest-mplayer-1.0_pre20061019, files/digest-mplayer-1.0_rc1,
+ Manifest:
+ Redigest
+
+ 24 Oct 2006; Simon Stelling <blubb@gentoo.org> mplayer-1.0_rc1.ebuild:
+ don't hard-enable 3dnow(ext) on amd64 as EM64T doesn't have it
+
+*mplayer-1.0_rc1 (23 Oct 2006)
+
+ 23 Oct 2006; Luca Barbato <lu_zero@gentoo.org> +mplayer-1.0_rc1.ebuild:
+ New version
+
+ 20 Oct 2006; Luca Barbato <lu_zero@gentoo.org>
+ mplayer-1.0_pre20061019.ebuild:
+ change the src_uri to something valid
+
+*mplayer-1.0_pre20061019 (19 Oct 2006)
+
+ 19 Oct 2006; Luca Barbato <lu_zero@gentoo.org>
+ +mplayer-1.0_pre20061019.ebuild:
+ New snapshot
+
+ 19 Oct 2006; Luca Barbato <lu_zero@gentoo.org>
+ files/digest-mplayer-1.0_pre8, files/digest-mplayer-1.0_pre8-r1,
+ files/digest-mplayer-1.0_pre20060810, Manifest:
+ Redigesting Blue-1.6 skin
+
+ 06 Oct 2006; Simon Stelling <blubb@gentoo.org>
+ +files/mplayer-1.0_pre8-amr-64bit.patch, mplayer-1.0_pre8-r1.ebuild:
+ fix AMR support on amd64; bug 140753; thanks to Maxxer for providing a patch
+
+ 22 Sep 2006; Luca Barbato <lu_zero@gentoo.org> mplayer-1.0_pre8.ebuild,
+ mplayer-1.0_pre8-r1.ebuild, mplayer-1.0_pre20060810.ebuild:
+ LINGUAS support updated, thanks to Damien THEBAULT
+ <damien.thebault@laposte.net> for providing the initial patch in bug #143782
+
+ 21 Sep 2006; Patrick McLean <chutzpah@gentoo.org> mplayer-1.0_pre8.ebuild,
+ mplayer-1.0_pre8-r1.ebuild, mplayer-1.0_pre20060810.ebuild:
+ Bump Blue skin to version 1.6.
+
+ 12 Aug 2006; Luca Barbato <lu_zero@gentoo.org> mplayer-1.0_pre8.ebuild,
+ mplayer-1.0_pre8-r1.ebuild:
+ Pin x264 version to avoid build issue with snapshots too new
+
+ 10 Aug 2006; Luca Barbato <lu_zero@gentoo.org>
+ mplayer-1.0_pre20060810.ebuild:
+ Everything ready for wider usage
+
+ 10 Aug 2006; Luca Barbato <lu_zero@gentoo.org>
+ mplayer-1.0_pre20060810.ebuild:
+ hickup during the snapshot, temp masked
+
+ 10 Aug 2006; Luca Barbato <lu_zero@gentoo.org>
+ mplayer-1.0_pre20060810.ebuild:
+ don't try to specify dvb include path
+
+ 10 Aug 2006; Luca Barbato <lu_zero@gentoo.org>
+ mplayer-1.0_pre20060810.ebuild:
+ x264 dep updated
+
+*mplayer-1.0_pre20060810 (10 Aug 2006)
+
+ 10 Aug 2006; Luca Barbato <lu_zero@gentoo.org>
+ +mplayer-1.0_pre20060810.ebuild:
+ Early snapshot
+
+ 10 Aug 2006; Luca Barbato <lu_zero@gentoo.org>
+ -files/mplayer-1.0_pre7-gcc4-amd64.patch,
+ -files/mplayer-1.0_pre7-gcc4.patch,
+ -files/mplayer-1.0_pre7-gcc_detection.patch,
+ -files/mplayer-1.0_pre7-ppc64.patch,
+ -files/gcc-3-register_allocation.patch, -files/mplayer-mythtv.patch,
+ -mplayer-1.0_pre7-r1.ebuild, -mplayer-1.0.20060102.ebuild,
+ -mplayer-1.0.20060217.ebuild, -mplayer-1.0.20060302.ebuild,
+ -mplayer-1.0.20060408.ebuild, -mplayer-1.0.20060415.ebuild:
+ Cleanup
+
+ 28 Jul 2006; Chris Bainbridge <chrb@gentoo.org> mplayer-1.0_pre8.ebuild,
+ mplayer-1.0_pre8-r1.ebuild:
+ Fix "line 338: !use: command not found"
+
+ 18 Jul 2006; Chris Gianelloni <wolf31o2@gentoo.org>
+ mplayer-1.0_pre8.ebuild, mplayer-1.0_pre8-r1.ebuild:
+ Made sure the win32codecs code is not used when USE has either livecd or
+ bindist in it. This allows us to redistribute mplayer for GRP, though it
+ does reduce its functionality.
+
+ 15 Jul 2006; Luca Barbato <lu_zero@gentoo.org> mplayer-1.0_pre8-r1.ebuild:
+ split unicode from iconv
+
+ 13 Jul 2006; Aron Griffis <agriffis@gentoo.org> mplayer-1.0_pre8.ebuild,
+ mplayer-1.0_pre8-r1.ebuild, mplayer-1.0.20060102.ebuild,
+ mplayer-1.0.20060217.ebuild, mplayer-1.0.20060302.ebuild,
+ mplayer-1.0.20060408.ebuild, mplayer-1.0.20060415.ebuild:
+ Mark 1.0_pre8 stable on ia64, mark 1.0_pre8-r1 ~ia64, arch-mask 1.0.20060415
+ 1.0.20060408 1.0.20060302 1.0.20060217 1.0.20060102 on ia64. #136520 #139955
+
+ 12 Jul 2006; Gustavo Zacarias <gustavoz@gentoo.org>
+ mplayer-1.0_pre8-r1.ebuild:
+ Keyworded ~sparc wrt #139955
+
+ 12 Jul 2006; Danny van Dyk <kugelfang@gentoo.org>
+ mplayer-1.0_pre8-r1.ebuild, mplayer-1.0.20060408.ebuild,
+ mplayer-1.0.20060415.ebuild:
+ QA: Added nls, enca to IUSE.
+
+ 11 Jul 2006; Luca Barbato <lu_zero@gentoo.org> mplayer-1.0_pre8-r1.ebuild:
+ Cleanup and modular X only now
+
+ 09 Jul 2006; Diego Pettenò <flameeyes@gentoo.org>
+ mplayer-1.0_pre7-r1.ebuild, mplayer-1.0_pre8.ebuild,
+ mplayer-1.0.20060102.ebuild, mplayer-1.0.20060217.ebuild,
+ mplayer-1.0.20060302.ebuild, mplayer-1.0.20060408.ebuild,
+ mplayer-1.0.20060415.ebuild:
+ Pinpoint virtual/x11 version to less than 7.
+
+*mplayer-1.0_pre8-r1 (11 Jul 2006)
+
+ 11 Jul 2006; Luca Barbato <lu_zero@gentoo.org>
+ +mplayer-1.0_pre8-r1.ebuild:
+ New ebuild, adds amr, enca and xvmc wrappers support
+
+ 03 Jul 2006; Thomas Cort <tcort@gentoo.org> mplayer-1.0.20060102.ebuild,
+ mplayer-1.0.20060217.ebuild, mplayer-1.0.20060302.ebuild,
+ mplayer-1.0.20060408.ebuild, mplayer-1.0.20060415.ebuild:
+ -alpha and -amd64 all snapshots wrt Bug #136520.
+
+ 28 Jun 2006; Thomas Cort <tcort@gentoo.org> mplayer-1.0_pre8.ebuild:
+ Stable on alpha wrt Bug #136520.
+
+ 27 Jun 2006; Guy Martin <gmsoft@gentoo.org> mplayer-1.0_pre8.ebuild,
+ mplayer-1.0.20060217.ebuild, mplayer-1.0.20060408.ebuild,
+ mplayer-1.0.20060415.ebuild:
+ Stable on hppa.
+
+ 25 Jun 2006; Luca Barbato <lu_zero@gentoo.org> mplayer-1.0_pre8.ebuild:
+ phase out nls, unicode triggers iconv dep
+
+ 25 Jun 2006; Luca Barbato <lu_zero@gentoo.org> mplayer-1.0_pre8.ebuild:
+ set charset to noconv if you disable unicode
+
+ 25 Jun 2006; Luca Barbato <lu_zero@gentoo.org> mplayer-1.0_pre8.ebuild:
+ make debug more useful
+
+ 22 Jun 2006; Fabian Groffen <grobian@gentoo.org> mplayer-1.0_pre8.ebuild:
+ Marked ~ppc-macos, I'm stunned (bug #107795)
+
+ 19 Jun 2006; Gustavo Zacarias <gustavoz@gentoo.org>
+ mplayer-1.0.20060102.ebuild, mplayer-1.0.20060217.ebuild,
+ mplayer-1.0.20060302.ebuild, mplayer-1.0.20060408.ebuild,
+ mplayer-1.0.20060415.ebuild:
+ -sparc snapshot versions to let pre8 win
+
+ 16 Jun 2006; Jason Wever <weeve@gentoo.org> mplayer-1.0_pre8.ebuild:
+ Stable on SPARC wrt bug #136520.
+
+ 16 Jun 2006; Patrick McLean <chutzpah@gentoo.org> mplayer-1.0_pre8.ebuild:
+ Stable on amd64 (bug #136520).
+
+ 14 Jun 2006; Luca Barbato <lu_zero@gentoo.org> mplayer-1.0_pre8.ebuild,
+ mplayer-1.0.20060102.ebuild, mplayer-1.0.20060217.ebuild,
+ mplayer-1.0.20060302.ebuild, mplayer-1.0.20060408.ebuild,
+ mplayer-1.0.20060415.ebuild:
+ pre8 stable for ppc and ppc64
+
+ 14 Jun 2006; Luca Barbato <lu_zero@gentoo.org>
+ mplayer-1.0.20060102.ebuild, mplayer-1.0.20060217.ebuild,
+ mplayer-1.0.20060302.ebuild, mplayer-1.0.20060408.ebuild,
+ mplayer-1.0.20060415.ebuild:
+ -x86 on the snapshots to leave the new release available for public
+ consumption, enjoy
+
+ 13 Jun 2006; Markus Rothe <corsair@gentoo.org> mplayer-1.0_pre8.ebuild:
+ Stable on ppc64; bug #136520
+
+ 12 Jun 2006; Chris Gianelloni <wolf31o2@gentoo.org>
+ mplayer-1.0_pre8.ebuild:
+ Stable on x86 wrt bug #136520.
+
+ 12 Jun 2006; Luca Barbato <lu_zero@gentoo.org> mplayer-1.0_pre8.ebuild:
+ x264 dep updated
+
+*mplayer-1.0_pre8 (11 Jun 2006)
+
+ 11 Jun 2006; Luca Barbato <lu_zero@gentoo.org> +mplayer-1.0_pre8.ebuild:
+ New release
+
+ 10 Jun 2006; Luca Barbato <lu_zero@gentoo.org>
+ mplayer-1.0.20060415.ebuild:
+ typo for the speex support fixed, see bug #136287, thanks to Adam Jones
+ <adam@yggdrasl.demon.co.uk> for spotting it
+
+ 10 May 2006; Luca Barbato <lu_zero@gentoo.org>
+ mplayer-1.0.20060415.ebuild:
+ Added speex useflag, thanks to Roman Polach <rpolach@atlas.cz> for spotting
+ it.
+
+ 03 May 2006; Diego Pettenò <flameeyes@gentoo.org> metadata.xml:
+ Update metadata to list media-video@gentoo.org as maintainer.
+
+ 30 Apr 2006; Luca Barbato <lu_zero@gentoo.org>
+ mplayer-1.0.20060415.ebuild:
+ Blue skin updated
+
+ 29 Apr 2006; Luis Medinas <metalgod@gentoo.org>
+ mplayer-1.0.20060415.ebuild:
+ Stable on amd64. For security bug #127969.
+
+ 27 Apr 2006; Marien Zwart <marienz@gentoo.org>
+ files/digest-mplayer-1.0_pre7-r1, files/digest-mplayer-1.0.20060102,
+ files/digest-mplayer-1.0.20060217, files/digest-mplayer-1.0.20060302,
+ Manifest:
+ Fixing SHA256 digest, pass four
+
+ 22 Apr 2006; Luca Barbato <lu_zero@gentoo.org>
+ mplayer-1.0.20060415.ebuild:
+ Overall fixes, spotted on NetBSD
+
+ 20 Apr 2006; Luca Barbato <lu_zero@gentoo.org>
+ mplayer-1.0.20060415.ebuild:
+ LINGUAS disabled
+
+ 17 Apr 2006; Markus Rothe <corsair@gentoo.org>
+ mplayer-1.0.20060415.ebuild:
+ Stable on ppc64; bug #127969
+
+ 17 Apr 2006; Rene Nussbaumer <killerfox@gentoo.org>
+ mplayer-1.0.20060415.ebuild:
+ Stable on hppa. See bug #127969.
+
+ 17 Apr 2006; Tobias Scherbaum <dertobi123@gentoo.org>
+ mplayer-1.0.20060415.ebuild:
+ ppc stable, bug #127969
+
+ 17 Apr 2006; Joshua Jackson <tsunam@gentoo.org>
+ mplayer-1.0.20060408.ebuild, mplayer-1.0.20060415.ebuild:
+ Stable on x86; security bug #127969
+
+ 16 Apr 2006; Luca Barbato <lu_zero@gentoo.org>
+ mplayer-1.0.20060415.ebuild:
+ Fixed SRC_URI, as pointed in bug #130071
+
+ 16 Apr 2006; Luca Barbato <lu_zero@gentoo.org>
+ files/gcc-3-register_allocation.patch:
+ Patch updated
+
+ 16 Apr 2006; Luca Barbato <lu_zero@gentoo.org>
+ +files/gcc-3-register_allocation.patch, mplayer-1.0.20060415.ebuild:
+ Fixed a typo in the gcc workarounds triggering an ICE on gcc-3.
+
+ 16 Apr 2006; Jason Wever <weeve@gentoo.org> mplayer-1.0.20060415.ebuild:
+ Stable on SPARC wrt security bug #127969.
+
+ 15 Apr 2006; Thomas Cort <tcort@gentoo.org> ChangeLog:
+ Stable on alpha wrt security Bug #127969.
+
+ 15 Apr 2006; Joshua Jackson <tsunam@gentoo.org>
+ mplayer-1.0.20060408.ebuild, mplayer-1.0.20060415.ebuild:
+ Stable on x86; bug #127969
+
+*mplayer-1.0.20060415 (14 Apr 2006)
+
+ 14 Apr 2006; Luca Barbato <lu_zero@gentoo.org>
+ +mplayer-1.0.20060415.ebuild:
+ New snapshot LANG related issue corrected
+
+ 11 Apr 2006; Joshua Jackson <tsunam@gentoo.org>
+ mplayer-1.0.20060408.ebuild:
+ Stable for security bug #127969
+
+ 09 Apr 2006; Rene Nussbaumer <killerfox@gentoo.org>
+ mplayer-1.0.20060408.ebuild:
+ Stable on hppa. See bug #127969.
+
+ 09 Apr 2006; Luca Barbato <lu_zero@gentoo.org>
+ mplayer-1.0.20060408.ebuild:
+ Deps update
+
+ 08 Apr 2006; Luca Barbato <lu_zero@gentoo.org>
+ mplayer-1.0.20060408.ebuild:
+ Lots of fixed related to the new unicode support and vidix support
+
+*mplayer-1.0.20060408 (08 Apr 2006)
+
+ 08 Apr 2006; Luca Barbato <lu_zero@gentoo.org>
+ +mplayer-1.0.20060408.ebuild:
+ New snapshot
+
+ 02 Apr 2006; Luca Barbato <lu_zero@gentoo.org>
+ mplayer-1.0.20060302.ebuild:
+ Proper fix for bug #127901, solves bug #128410
+
+ 31 Mar 2006; Luca Barbato <lu_zero@gentoo.org>
+ mplayer-1.0.20060302.ebuild:
+ Workaround for the new dvdnav, fixes bug #127901 thanks to Ed Catmur
+ <ed@catmur.co.uk> for pointing out
+
+ 24 Mar 2006; Aron Griffis <agriffis@gentoo.org>
+ mplayer-1.0.20060302.ebuild:
+ Mark 1.0.20060302 stable on ia64
+
+ 19 Mar 2006; Fernando J. Pereda <ferdy@gentoo.org>
+ mplayer-1.0.20060302.ebuild:
+ Stable on alpha wrt bug #126627. Thanks to both Mike Hlavac
+ <mike@flyingpenguins.org> and Thomas Cort <tcort@cs.ubishops.ca>
+
+ 18 Mar 2006; Luca Barbato <lu_zero@gentoo.org>
+ mplayer-1.0.20060302.ebuild:
+ bsd related changes
+
+ 03 Mar 2006; Rene Nussbaumer <killerfox@gentoo.org>
+ mplayer-1.0.20060217.ebuild:
+ Stable on hppa. See bug #115760.
+
+ 03 Mar 2006; Fernando J. Pereda <ferdy@gentoo.org>
+ mplayer-1.0.20060302.ebuild:
+ Re-add ~alpha keyword wrt bug #124776. Tested by Thomas Cort
+ <tcort@cs.ubishops.ca>
+
+ 26 Feb 2006; Bryan Østergaard <kloeri@gentoo.org
+ mplayer-1.0.20060217.ebuild:
+ Stable on alpha, bug 115760.
+
+*mplayer-1.0.20060302 (02 Mar 2006)
+
+ 02 Mar 2006; Luca Barbato <lu_zero@gentoo.org>
+ mplayer-1.0.20060217.ebuild, +mplayer-1.0.20060302.ebuild:
+ openal removed again from 20060217, since could not work for everybody, new
+ snapshot with fixes and x264 support
+
+ 22 Feb 2006; Aron Griffis <agriffis@gentoo.org>
+ mplayer-1.0.20060217.ebuild:
+ Mark 1.0.20060217 stable on ia64. #115760
+
+ 22 Feb 2006; Tobias Scherbaum <dertobi123@gentoo.org>
+ mplayer-1.0.20060217.ebuild:
+ ppc stable, bug #115760
+
+ 22 Feb 2006; Markus Rothe <corsair@gentoo.org>
+ mplayer-1.0.20060217.ebuild:
+ Stable on ppc64; bug #115760
+
+ 22 Feb 2006; Herbie Hopkins <herbs@gentoo.org>
+ mplayer-1.0.20060217.ebuild:
+ Stable on amd64 wrt bug #115760.
+
+ 22 Feb 2006; Joshua Jackson <tsunam@gentoo.org>
+ mplayer-1.0.20060217.ebuild:
+ Stable on x86; Security bug #115760
+
+ 20 Feb 2006; Gustavo Zacarias <gustavoz@gentoo.org>
+ mplayer-1.0.20060217.ebuild:
+ Stable on sparc wrt security #115760
+
+ 21 Feb 2006; Luca Barbato <lu_zero@gentoo.org>
+ mplayer-1.0.20060217.ebuild:
+ Fixed some of the logic, openal should work now, thanks to Reimar for
+ helping, as usual
+
+ 20 Feb 2006; Luca Barbato <lu_zero@gentoo.org>
+ -files/mmst_fix_20050415.diff, -files/rtsp_fix_20050415.diff,
+ mplayer-1.0.20060217.ebuild:
+ fixed faad autodetection
+
+ 17 Feb 2006; Luca Barbato <lu_zero@gentoo.org>
+ mplayer-1.0.20060217.ebuild:
+ openal disabled, pending update
+
+*mplayer-1.0.20060217 (17 Feb 2006)
+
+ 17 Feb 2006; Luca Barbato <lu_zero@gentoo.org>
+ +mplayer-1.0.20060217.ebuild:
+ New snapshot
+
+ 15 Feb 2006; Diego Pettenò <flameeyes@gentoo.org>
+ mplayer-1.0_pre7-r1.ebuild, mplayer-1.0.20060102.ebuild:
+ Put gettext as a build-time dependency, and use virtual/libintl as RDEPEND
+ instead.
+
+ 13 Feb 2006; Patrick McLean <chutzpah@gentoo.org>
+ mplayer-1.0.20060102.ebuild:
+ Add "musepack" USE flag to support the musepack audio codec (bug #122081).
+
+ 03 Feb 2006; Luca Barbato <lu_zero@gentoo.org>
+ mplayer-1.0.20060102.ebuild:
+ dvb changes
+
+ 26 Jan 2006; Luca Barbato <lu_zero@gentoo.org>
+ mplayer-1.0.20060102.ebuild:
+ gtk2 support as default
+
+ 06 Jan 2006; Luca Barbato <lu_zero@gentoo.org>
+ mplayer-1.0.20060102.ebuild:
+ mythtv useflag removed since the patch got incorporated as stated in bug
+ #117725
+
+ 03 Jan 2006; Daniel Black <dragonheart@gentoo.org>
+ mplayer-1.0_pre7-r1.ebuild, mplayer-1.0.20060102.ebuild:
+ dependency changed to =dev-libs/lzo-1* so that unmasking lzo-2 will not
+ break this package as per bug #112374
+
+*mplayer-1.0.20060102 (03 Jan 2006)
+
+ 03 Jan 2006; Luca Barbato <lu_zero@gentoo.org>
+ +mplayer-1.0.20060102.ebuild:
+ Snapshot version
+
+ 12 Dec 2005; Donnie Berkholz <spyderous@gentoo.org>;
+ mplayer-1.0_pre7-r1.ebuild:
+ (#110990) Add modular X dependencies.
+
+ 03 Dec 2005; Luca Barbato <lu_zero@gentoo.org> mplayer-1.0_pre7-r1.ebuild:
+ Typo fixed, thanks Oldrich Jedlicka <oldium.pro@seznam.cz> for reporting
+
+ 03 Dec 2005; Luca Barbato <lu_zero@gentoo.org> mplayer-1.0_pre7-r1.ebuild:
+ livecd and bindist support, minor changes overall
+
+ 01 Nov 2005; Luca Barbato <lu_zero@gentoo.org>
+ -files/mplayer-1.0_pre6-codecs.patch,
+ -files/mplayer-1.0_pre6-configure.patch,
+ -files/mplayer-1.0_pre6-pic.patch, -files/mplayer-1.0_pre6-ppc64.patch,
+ +files/mplayer-1.0_pre7-ppc64.patch, -files/mplayer-avi_crash.patch,
+ -files/mplayer-gcc_detection.patch, -files/mplayer-jack.patch,
+ -files/mplayer-nl.patch, -mplayer-1.0_pre6-r4.ebuild,
+ -mplayer-1.0_pre6-r5.ebuild, -mplayer-1.0_pre6-r6.ebuild,
+ -mplayer-1.0_pre7.ebuild, mplayer-1.0_pre7-r1.ebuild:
+ Complete cleanup
+
+ 01 Nov 2005; Luca Barbato <lu_zero@gentoo.org>
+ -mplayer-1.0_pre6-r4.ebuild, -mplayer-1.0_pre6-r5.ebuild,
+ -mplayer-1.0_pre6-r6.ebuild:
+ Pruning mplayer-1.0_pre6 ebuilds
+
+ 31 Oct 2005; Diego Pettenò <flameeyes@gentoo.org>
+ mplayer-1.0_pre6-r4.ebuild, mplayer-1.0_pre6-r5.ebuild,
+ mplayer-1.0_pre6-r6.ebuild, mplayer-1.0_pre7.ebuild:
+ Disable divx4linux in every version, not just the last one, to avoid
+ breakage now that the package is gone.
+
+ 30 Oct 2005; Luca Barbato <lu_zero@gentoo.org> mplayer-1.0_pre7-r1.ebuild:
+ Removed ancient divx4linux support, internal support if far better anyway.
+
+ 06 Nov 2005; Luca Barbato <lu_zero@gentoo.org> mplayer-1.0_pre7-r1.ebuild:
+ disable x264 for now
+
+ 10 Oct 2005; Luca Barbato <lu_zero@gentoo.org>
+ +files/mplayer-1.0_pre7-gcc4-amd64.patch, mplayer-1.0_pre7-r1.ebuild:
+ Fix for gcc-4.0.1 and amd64
+
+ 31 Aug 2005; Aron Griffis <agriffis@gentoo.org>
+ mplayer-1.0_pre7-r1.ebuild:
+ stable on alpha #103555
+
+ 31 Aug 2005; Luca Barbato <lu_zero@gentoo.org> mplayer-1.0_pre7-r1.ebuild:
+ Cleanup
+
+ 30 Aug 2005; Ian Leitch <port001@gentoo.org> mplayer-1.0_pre7-r1.ebuild:
+ Stable on x86, bug #103555
+
+ 30 Aug 2005; Gustavo Zacarias <gustavoz@gentoo.org>
+ mplayer-1.0_pre7-r1.ebuild:
+ Stable on sparc wrt #103555
+
+ 28 Aug 2005; Marcus D. Hanwell <cryos@gentoo.org>
+ mplayer-1.0_pre7-r1.ebuild:
+ Stable on amd64 wrt bug 103555.
+
+ 27 Aug 2005; Markus Rothe <corsair@gentoo.org> mplayer-1.0_pre7-r1.ebuild:
+ Stable on ppc64 (bug #103555)
+
+ 27 Aug 2005; Luca Barbato <lu_zero@gentoo.org> mplayer-1.0_pre7-r1.ebuild:
+ Marked ppc
+
+*mplayer-1.0_pre7-r1 (27 Aug 2005)
+
+ 27 Aug 2005; Luca Barbato <lu_zero@gentoo.org>
+ +mplayer-1.0_pre7-r1.ebuild:
+ Hotfix release for a recently discovered buffer overflow, bug #103555
+
+ 25 Aug 2005; Aron Griffis <agriffis@gentoo.org> mplayer-1.0_pre7.ebuild:
+ stable on ia64
+
+ 04 Aug 2005; Luca Barbato <lu_zero@gentoo.org> mplayer-1.0_pre7.ebuild:
+ Removed the libmatroska dep, fixes bug #99024, thanks to Giacomo Perale
+ <ghepeu@virgilio.it> for pointing out
+
+ 04 Aug 2005; Luca Barbato <lu_zero@gentoo.org> files/mplayer.desktop:
+ Fix for the .desktop file, bug #98268
+
+ 25 May 2005; Herbie Hopkins <herbs@gentoo.org> mplayer-1.0_pre7.ebuild:
+ Multilib fix, bad path to libxmms.
+
+ 16 May 2005; Luca Barbato <lu_zero@gentoo.org> mplayer-1.0_pre6-r6.ebuild,
+ mplayer-1.0_pre7.ebuild:
+ Fix bug #92751
+
+ 10 May 2005; Luca Barbato <lu_zero@gentoo.org> mplayer-1.0_pre7.ebuild:
+ aalib support fixed
+
+ 09 May 2005; Luca Barbato <lu_zero@gentoo.org> mplayer-1.0_pre6-r6.ebuild,
+ mplayer-1.0_pre7.ebuild:
+ 3dfx requires dga. Fix for bug #91351
+
+ 09 May 2005; Luca Barbato <lu_zero@gentoo.org> mplayer-1.0_pre6-r6.ebuild,
+ mplayer-1.0_pre7.ebuild:
+ Purge problematic cflag
+
+ 09 May 2005; Luca Barbato <lu_zero@gentoo.org>
+ files/mplayer-gcc_detection.patch:
+ Simpler gcc_detection patch, update from Diego Biurrun
+
+ 09 May 2005; Luca Barbato <lu_zero@gentoo.org> mplayer-1.0_pre6-r6.ebuild,
+ mplayer-1.0_pre7.ebuild:
+ Minor updates
+
+ 06 May 2005; Luca Barbato <lu_zero@gentoo.org> mplayer-1.0_pre6-r6.ebuild,
+ mplayer-1.0_pre7.ebuild:
+ Fix the ebuilds to enable cpudetection correctly, thanks to Emanuele
+ Giaquinta <emanuele.giaquinta@gmail.com>
+
+ 05 May 2005; Aron Griffis <agriffis@gentoo.org> mplayer-1.0_pre6-r5.ebuild,
+ mplayer-1.0_pre6-r6.ebuild, mplayer-1.0_pre7.ebuild:
+ add ~ia64
+
+ 05 May 2005; Jan Brinkmann <luckyduck@gentoo.org>
+ -files/mplayer-0.90-coreutils-fixup.patch, -files/mplayer-1.0-gtk2.patch,
+ -files/mplayer-1.0_pre5-alsa-gcc34.patch,
+ -files/mplayer-1.0_pre5-bio2jack.patch,
+ -files/mplayer-1.0_pre5-configure.patch,
+ -files/mplayer-1.0_pre5-gcc_detection.patch,
+ -files/mplayer-1.0_pre5-help_mp-ro.h.patch,
+ -files/mplayer-1.0_pre5-live.patch,
+ -files/mplayer-1.0_pre5-mga-kernel-2.6.patch,
+ -files/mplayer-1.0_pre5-mips64.patch,
+ -files/mplayer-1.0_pre5-r1-conf_locale.patch,
+ -files/mplayer-1.0_pre5-r4-ppc64.patch,
+ -files/mplayer-1.0_pre5-r5-configure.patch,
+ -files/mplayer-1.0_pre5-yuv2rgb_fix.patch, -files/cachefill.patch,
+ -files/gui_vuln_code.patch, -files/mplayer-gif.patch,
+ -files/mplayer-odml.patch, -files/mplayer-x11.patch,
+ -files/real_demux.patch, -files/str_undefined.patch, -files/strl.c,
+ -files/vuln02-fix.diff, -mplayer-1.0_pre5-r5.ebuild:
+ removed old vulnerable version and unneeded patches.
+
+ 25 Apr 2005; Martin Schlemmer <azarah@gentoo.org>
+ +files/mplayer-1.0_pre7-gcc4.patch,
+ +files/mplayer-1.0_pre7-gcc_detection.patch, mplayer-1.0_pre7.ebuild:
+ Fix building with gcc4. Patch from Genady Okrain (Mafteah) 's overlay (plus
+ some added fixes to libvo/aclib_template.c that whoever seemed to have
+ missed).
+
+ 21 Apr 2005; Herbie Hopkins <herbs@gentoo.org> mplayer-1.0_pre7.ebuild:
+ Same amd64 cleanup, new version.
+
+ 21 Apr 2005; Simon Stelling <blubb@gentoo.org> mplayer-1.0_pre6-r6.ebuild:
+ minor amd64-specific cleanup
+
+ 19 Apr 2005; Bryan Østergaard <kloeri@gentoo.org>
+ mplayer-1.0_pre6-r4.ebuild:
+ Stable on alpha, bug 89277.
+
+ 17 Apr 2005; Jason Wever <weeve@gentoo.org> mplayer-1.0_pre6-r4.ebuild:
+ Stable on SPARC wrt security bug #89277.
+
+ 18 Apr 2005; Luca Barbato <lu_zero@gentoo.org> mplayer-1.0_pre6-r6.ebuild,
+ mplayer-1.0_pre7.ebuild:
+ Minor polishing, thanks to Gurgh <gurgh@gurga.com> for the suggestions
+
+ 17 Apr 2005; Luca Barbato <lu_zero@gentoo.org>
+ +files/mplayer-1.0_pre5-alsa-gcc34.patch,
+ +files/mplayer-1.0_pre5-help_mp-ro.h.patch, mplayer-1.0_pre5-r5.ebuild,
+ mplayer-1.0_pre7.ebuild:
+ Fixed pre5 patchset
+
+ 17 Apr 2005; Markus Rothe <corsair@gentoo.org> mplayer-1.0_pre6-r4.ebuild:
+ Stable on ppc64; bug #89277
+
+*mplayer-1.0_pre7 (17 Apr 2005)
+
+ 17 Apr 2005; Luca Barbato <lu_zero@gentoo.org> mplayer-1.0_pre6-r6.ebuild,
+ +mplayer-1.0_pre7.ebuild:
+ New experimental ebuild and minor fix
+
+ 16 Apr 2005; Michael Hanselmann <hansmi@gentoo.org>
+ mplayer-1.0_pre6-r4.ebuild:
+ Stable on ppc.
+
+ 16 Apr 2005; Jan Brinkmann <luckyduck@gentoo.org>
+ mplayer-1.0_pre6-r4.ebuild:
+ stable on amd64 and x86 wrt #89277
+
+*mplayer-1.0_pre6-r4 (16 Apr 2005)
+
+ 16 Apr 2005; Jan Brinkmann <luckyduck@gentoo.org>
+ -mplayer-1.0_pre6-r1.ebuild, -mplayer-1.0_pre6-r2.ebuild,
+ -mplayer-1.0_pre6-r3.ebuild, +mplayer-1.0_pre6-r4.ebuild,
+ +mplayer-1.0_pre6-r5.ebuild, +mplayer-1.0_pre6-r6.ebuild:
+ updated revisions for security bug #89277
+
+ 16 Apr 2005; Jan Brinkmann <luckyduck@gentoo.org> metadata.xml,
+ +files/mmst_fix_20050415.diff, +files/rtsp_fix_20050415.diff,
+ mplayer-1.0_pre6-r1.ebuild, mplayer-1.0_pre6-r2.ebuild,
+ mplayer-1.0_pre6-r3.ebuild:
+ added 2 security related patches to the _pre6 ebuilds. see #89277. also
+ updated metadata.xml, chriswhite is retired.
+
+ 16 Apr 2005; Luca Barbato <lu_zero@gentoo.org>
+ -files/mplayer-1.0_pre4-alsa-gcc34.patch,
+ -files/mplayer-1.0_pre4-altivec-gcc34.patch,
+ -files/mplayer-1.0_pre4-help_mp-ro.h.patch,
+ -files/mplayer-1.0_pre4-mpst.patch, -mplayer-1.0_pre4-r7.ebuild,
+ -mplayer-1.0_pre5-r2.ebuild, -mplayer-1.0_pre5-r3.ebuild,
+ -mplayer-1.0_pre5-r4.ebuild, mplayer-1.0_pre5-r5.ebuild,
+ mplayer-1.0_pre6-r1.ebuild, mplayer-1.0_pre6-r2.ebuild,
+ mplayer-1.0_pre6-r3.ebuild:
+ useflag move 3dnowex -> 3dnowext, global cleanup
+
+*mplayer-1.0_pre6-r3 (12 Apr 2005)
+
+ 12 Apr 2005; Luca Barbato <lu_zero@gentoo.org>
+ +mplayer-1.0_pre6-r3.ebuild:
+ New p.masked ebuild, cpudetection and custom-cflags added.
+
+ 11 Apr 2005; Jan Brinkmann <luckyduck@gentoo.org>
+ mplayer-1.0_pre6-r1.ebuild, mplayer-1.0_pre6-r2.ebuild:
+ added support for blinkenlights, fixes #86776. we also dont install useless
+ menu entries any longer if use -gtk, fixes bug #86399
+
+ 07 Apr 2005; Jan Brinkmann <luckyduck@gentoo.org>
+ mplayer-1.0_pre6-r1.ebuild, mplayer-1.0_pre6-r2.ebuild:
+ MAKEOPTS -jN has to be -j1 for successful compilation. fixes #86245
+
+ 02 Apr 2005; Chris White <chriswhite@gentoo.org>
+ mplayer-1.0_pre6-r2.ebuild:
+ Removed april fools segment.
+
+ 01 Apr 2005; Chris White <chriswhite@gentoo.org>
+ files/mplayer-gcc_detection.patch, mplayer-1.0_pre5-r5.ebuild,
+ mplayer-1.0_pre6-r2.ebuild:
+ Fixed gcc detection patch. Converted avi USE flag to win32codecs USE flag to
+ get rid of ugly arch conditional nestings.
+
+ 22 Mar 2005; Chris White <chriswhite@gentoo.org>
+ mplayer-1.0_pre6-r2.ebuild:
+ Fixing bug #85861 as well as changing over to 3dnowext to match the cpu flag
+ in mplayer-1.0_pre6-r2.
+
+ 22 Mar 2005; Chris White <chriswhite@gentoo.org>
+ files/mplayer-1.0_pre6-pic.patch:
+ Fixing the pic patch for reals this time.
+
+ 21 Mar 2005; Chris White <chriswhite@gentoo.org>
+ files/mplayer-1.0_pre6-pic.patch:
+ Fix 3dnow conditional for idcmt 3dnow unresolved errors.
+
+*mplayer-1.0_pre6-r2 (21 Mar 2005)
+
+ 21 Mar 2005; Chris White <chriswhite@gentoo.org>
+ +files/mplayer-1.0_pre6-pic.patch, +mplayer-1.0_pre6-r2.ebuild:
+ The big closer. Bug #51853 goes bye bye. MPlayer will now compile with pic
+ and x86 without filtration.
+
+ 20 Mar 2005; Chris White <chriswhite@gentoo.org>
+ mplayer-1.0_pre6-r1.ebuild:
+ Fix bug #85945 (no longer need the alsa-gui patch for pre6).
+
+ 20 Mar 2005; Chris White <chriswhite@gentoo.org>
+ mplayer-1.0_pre5-r5.ebuild:
+ Fixed bad if logic (must be getting good at this :|) for real codecs.
+
+ 19 Mar 2005; Guy Martin <gmsoft@gentoo.org> mplayer-1.0_pre6-r1.ebuild:
+ Stable on hppa.
+
+ 19 Mar 2005; Chris White <chriswhite@gentoo.org>
+ mplayer-1.0_pre6-r1.ebuild:
+ Forgot the mmxext params in ecpu_check for pre6-r1.
+
+*mplayer-1.0_pre6-r1 (19 Mar 2005)
+
+ 19 Mar 2005; Chris White <chriswhite@gentoo.org>
+ +files/mplayer-1.0_pre6-codecs.patch, mplayer-1.0_pre4-r7.ebuild,
+ mplayer-1.0_pre5-r3.ebuild, mplayer-1.0_pre5-r4.ebuild,
+ mplayer-1.0_pre5-r5.ebuild, +mplayer-1.0_pre6-r1.ebuild,
+ -mplayer-1.0_pre6.ebuild:
+ Fixed bugs #85642 #85534 #83609 #83546. Pre6 gets a revbump because it uses
+ RealPlayer's codecs instead of win32codecs and because of new 3gp codec
+ support. Old pre6 goes bye bye. mmx2->mmxext.
+
+ 16 Mar 2005; Chris White <chriswhite@gentoo.org>
+ +files/mplayer-1.0_pre5-gcc_detection.patch, mplayer-1.0_pre5-r3.ebuild:
+ Fixed optimization logics for mips, hopefully solving bug #83633. Added gcc
+ detection patch to make mplayer actually compile.
+
+ 16 Mar 2005; Chris White <chriswhite@gentoo.org>
+ mplayer-1.0_pre5-r3.ebuild:
+ Fixed mplayer-1.0_pre5-r3's message about not using custom CFLAGS. Put in
+ the strip-flags which is supposed to be in there.
+
+ 24 Feb 2005; Chris White <chriswhite@gentoo.org> mplayer-1.0_pre6.ebuild:
+ Re-added x86 only USE flag logic for win32codecs. Fixes #82535.
+
+ 19 Feb 2005; Chris White <chriswhite@gentoo.org>
+ +files/mplayer-gcc_detection.patch, +files/mplayer-jack.patch,
+ mplayer-1.0_pre6.ebuild:
+ Fixed endianess issues with jack output. Fixed gcc being detected improperly.
+
+ 07 Feb 2005; Jan Brinkmann <luckyduck@gentoo.org>
+ mplayer-1.0_pre5-r5.ebuild:
+ use_enable avi should only be possible on x86. fixed #81149
+
+ 07 Feb 2005; Chris White <chriswhite@gentoo.org> mplayer-1.0_pre6.ebuild:
+ Repoman fix trailing white space.
+
+ 07 Feb 2005; Chris White <chriswhite@gentoo.org> files/mplayer.desktop,
+ mplayer-1.0_pre5-r5.ebuild, mplayer-1.0_pre6.ebuild:
+ Fixed bug #65914 (desktop file) bug #79207 (real libs logic) bug #78481 (avi
+ USE flag for win32codecs).
+
+ 07 Feb 2005; Chris White <chriswhite@gentoo.org> mplayer-1.0_pre5-r5.ebuild,
+ mplayer-1.0_pre6.ebuild:
+ Added dga logic to fix bug #80861.
+
+ 06 Feb 2005; Chris White <chriswhite@gentoo.org> files/mplayer-x11.patch:
+ Fixing the patch to work with 71478's issue as well.
+
+ 06 Feb 2005; Chris White <chriswhite@gentoo.org> +files/mplayer-x11.patch,
+ mplayer-1.0_pre5-r5.ebuild, mplayer-1.0_pre6.ebuild:
+ Fixed bug #80564 with a patch by nickc and removed uneeded deps on portage and
+ nasm.
+
+ 06 Feb 2005; Chris White <chriswhite@gentoo.org> mplayer-1.0_pre5-r5.ebuild,
+ mplayer-1.0_pre6.ebuild:
+ Apparently mmx2 shows up in /proc/cpuinfo as mmxext, so disabling mmx2 cpu
+ checking until I can rework ecpu_check to handle this properly.
+
+ 05 Feb 2005; Chris White <chriswhite@gentoo.org> +files/mplayer-gif.patch,
+ mplayer-1.0_pre5-r5.ebuild:
+ Fixed giflib support by backing mplayer pre6 giflib detection.
+
+ 04 Feb 2005; Chris White <chriswhite@gentoo.org> mplayer-1.0_pre5-r5.ebuild,
+ mplayer-1.0_pre6.ebuild:
+ Re-enabled sse2 as people with x86's say it works ok. Enabled new
+ ecpu_check-ing functionality.
+
+ 30 Jan 2005; Chris White <chriswhite@gentoo.org>
+ +files/mplayer-avi_crash.patch, mplayer-1.0_pre5-r5.ebuild,
+ mplayer-1.0_pre6.ebuild:
+ Fixed bugs #79243 and 78337.
+
+ 30 Jan 2005; Chris White <chriswhite@gentoo.org>
+ mplayer-1.0_pre5-r5.ebuild, mplayer-1.0_pre6.ebuild:
+ altivec fix for #76559.
+
+ 30 Jan 2005; Chris White <chriswhite@gentoo.org>
+ mplayer-1.0_pre5-r5.ebuild, mplayer-1.0_pre6.ebuild:
+ Fixed real being force enabled (instead of USE flag configured..) and
+ RESTRICT=nostrip to hopefully fix bug #71672.
+
+ 24 Jan 2005; Jan Brinkmann <luckyduck@gentoo.org> mplayer-1.0_pre6.ebuild:
+ added dv to IUSE, it was already used by the ebuild. fixes bug #79319
+
+ 23 Jan 2005; Jan Brinkmann <luckyduck@gentoo.org>
+ mplayer-1.0_pre5-r5.ebuild, mplayer-1.0_pre6.ebuild:
+ applied patch to make distcc compiling possible. fixes bug #77235
+
+ 23 Jan 2005; Chris White <chriswhite@gentoo.org>
+ mplayer-1.0_pre5-r5.ebuild, mplayer-1.0_pre6.ebuild:
+ Fixed bug #78209. Also removed the gif lib logic in pre6 as it's no longer
+ required (fixed upstream) and now gif is a true enable/disable style flag.
+
+ 23 Jan 2005; Chris White <chriswhite@gentoo.org> +files/mplayer-nl.patch,
+ mplayer-1.0_pre6.ebuild:
+ Fixed bug #76429. Added mplayer-nl.patch to solve.
+
+ 23 Jan 2005; Chris White <chriswhite@gentoo.org> mplayer-1.0_pre5-r4.ebuild,
+ mplayer-1.0_pre5-r5.ebuild, mplayer-1.0_pre6.ebuild:
+ Fixed dk from Swedish to Danish.
+
+ 14 Jan 2005; Sven Wegener <swegener@gentoo.org>
+ mplayer-1.0_pre5-r5.ebuild, mplayer-1.0_pre6.ebuild:
+ Added missing ? in *DEPEND.
+
+ 14 Jan 2005; Chris White <chriswhite@gentoo.org> mplayer-1.0_pre5-r5.ebuild,
+ mplayer-1.0_pre6.ebuild:
+ Re-fixing gif logic (someone messed with it :|) to fix #77463.
+
+ 11 Jan 2005; Danny van Dyk <kugelfang@gentoo.org> mplayer-1.0_pre6.ebuild:
+ mplayer now contains SIMD assembler code for AMD64. The AMD64 Team decided
+ to hard-enable SIMD assembler for all users.
+
+ 11 Jan 2005; Chris White <chriswhite@gentoo.org> mplayer-1.0_pre6.ebuild:
+ Adding anti-sse2 until someone tells me it doesn't create strange code.
+
+ 09 Jan 2005; Jan Brinkmann <luckyduck@gentoo.org>
+ mplayer-1.0_pre5-r4.ebuild, mplayer-1.0_pre5-r5.ebuild,
+ mplayer-1.0_pre6.ebuild:
+ made some trivial changes to the alsa related warning in pkg_postinst. fixes
+ bug #76469.
+
+ 07 Jan 2005; Chris White <chriswhite@gentoo.org> mplayer-1.0_pre5-r5.ebuild,
+ mplayer-1.0_pre6.ebuild:
+ Re-adding pic logic in (bad chris) and also getting strip-flags added to
+ pre5-r5.
+
+ 06 Jan 2005; Patrick Kursawe <phosphan@gentoo.org> mplayer-1.0_pre6.ebuild:
+ Fixed unpack problem (bug #76854)
+
+ 06 Jan 2005; Chris White <chriswhite@gentoo.org> mplayer-1.0_pre6.ebuild:
+ MPlayer pre6 was missing docs upstream, adding an 'a' prefix to get the latest
+ alpha version that contains the docs. Note that none of the actual code was
+ changed.
+
+ 29 Dec 2004; Ciaran McCreesh <ciaranm@gentoo.org> :
+ Change encoding to UTF-8 for GLEP 31 compliance
+
+ 27 Dec 2004; Chris White <chriswhite@gentoo.org> mplayer-1.0_pre6.ebuild:
+ Fixed dts -> libdts configure option as per bug #75762.
+
+ 27 Dec 2004; Chris White <chriswhite@gentoo.org> mplayer-1.0_pre6.ebuild:
+ Added dts support back per bug #75669. Also fixed libdv being forced
+ required as per bug #72146.
+
+ 27 Dec 2004; Chris White <chriswhite@gentoo.org> mplayer-1.0_pre6.ebuild:
+ Fixed bio2jack dep issues as per bug #75720. Also force enabled networking
+ support as it causes more issues then solves them.
+
+ 27 Dec 2004; Chris White <chriswhite@gentoo.org> mplayer-1.0_pre6.ebuild:
+ tossing in -frename-registers as per bug #75690. Tested it to make sure it
+ wouldn't make hardened gcc cry with BREG errors.
+
+*mplayer-1.0_pre6 (26 Dec 2004)
+
+ 26 Dec 2004; Chris White <chriswhite@gentoo.org>
+ +files/mplayer-1.0_pre6-configure.patch,
+ +files/mplayer-1.0_pre6-ppc64.patch, +mplayer-1.0_pre6.ebuild:
+ Infamous 1.0_pre6 bump.
+
+ 19 Dec 2004; Bryan Østergaard <kloeri@gentoo.org>
+ mplayer-1.0_pre5-r5.ebuild:
+ Stable on alpha, bug 74473.
+
+ 18 Dec 2004; Jason Wever <weeve@gentoo.org> mplayer-1.0_pre5-r5.ebuild:
+ Stable on sparc wrt security bug #74473.
+
+ 19 Dec 2004; Michael Hanselmann <hansmi@gentoo.org>
+ mplayer-1.0_pre5-r5.ebuild:
+ Stable on ppc.
+
+ 18 Dec 2004; Dylan Carlson <absinthe@gentoo.org>
+ mplayer-1.0_pre5-r5.ebuild:
+ Stable on amd64.
+
+ 18 Dec 2004; Markus Rothe <corsair@gentoo.org> mplayer-1.0_pre5-r5.ebuild:
+ Stable on ppc64; bug #74473
+
+ 19 Dec 2004; Chris White <chriswhite@gentoo.org> mplayer-1.0_pre5-r5.ebuild:
+ Arrg, forgot to bump down ppc64 keywords :|.
+
+*mplayer-1.0_pre5-r5 (19 Dec 2004)
+
+ 19 Dec 2004; Chris White <chriswhite@gentoo.org>
+ +files/mplayer-1.0_pre5-r5-configure.patch, mplayer-1.0_pre4-r7.ebuild,
+ mplayer-1.0_pre5-r2.ebuild, mplayer-1.0_pre5-r3.ebuild,
+ +mplayer-1.0_pre5-r5.ebuild:
+ Bumping to pre5-r5 as per bug #74473. Tested on 20 randomly encoded .avis,
+ mp3s, and even streaming video/audio. Marked x86 stable.
+
+ 17 Dec 2004; Markus Rothe <corsair@gentoo.org> mplayer-1.0_pre5-r4.ebuild:
+ Stable on ppc64
+
+ 02 Dec 2004; Chris White <chriswhite@gentoo.org> mplayer-1.0_pre5-r4.ebuild:
+ vo -> ao in alsa warning.
+
+ 14 Nov 2004; Markus Rothe <corsair@gentoo.org>
+ +files/mplayer-1.0_pre5-r4-ppc64.patch, mplayer-1.0_pre5-r4.ebuild:
+ Marked ~ppc64 (bug #68112) and added ppc64 patch.
+
+ 11 Nov 2004; Chris White <chriswhite@gentoo.org> mplayer-1.0_pre5-r4.ebuild:
+ Copied midentify to /usr/bin for emovix for bug #58580.
+
+ 11 Nov 2004; Chris White <chriswhite@gentoo.org> mplayer-1.0_pre4-r7.ebuild,
+ mplayer-1.0_pre5-r4.ebuild:
+ Removed mga buiding in MPlayer due to reasons in bug #28846.
+
+ 10 Nov 2004; Chris White <chriswhite@gentoo.org> mplayer-1.0_pre5-r4.ebuild:
+ Lots of fancy bash scripting to make MPlayer deal with the normal (and proper)
+ LINGUAS format. Closes bug #49710.
+
+ 10 Nov 2004; Chris White <chriswhite@gentoo.org> mplayer-1.0_pre5-r4.ebuild:
+ Added a message about the alsa -ao format to postinstall. Closes bug #57256.
+
+ 10 Nov 2004; Chris White <chriswhite@gentoo.org> mplayer-1.0_pre4-r7.ebuild,
+ mplayer-1.0_pre5-r2.ebuild, mplayer-1.0_pre5-r3.ebuild,
+ mplayer-1.0_pre5-r4.ebuild:
+ Fixed tdfxvid output logic as per bug #64218.
+
+ 06 Nov 2004; Chris White <chriswhite@gentoo.org> mplayer-1.0_pre5-r4.ebuild:
+ Added a real USE flag warning to -pre5-r4.
+
+ 06 Nov 2004; Chris White <chriswhite@gentoo.org> mplayer-1.0_pre4-r7.ebuild,
+ mplayer-1.0_pre5-r4.ebuild:
+ Fixed optimization filtering per bug #70175.
+
+ 31 Oct 2004; Chris White <chriswhite@gentoo.org> mplayer-1.0_pre4-r7.ebuild,
+ mplayer-1.0_pre5-r2.ebuild, mplayer-1.0_pre5-r4.ebuild:
+ Added filtering for -falign-functions. Thanks to jstubbs for pointing that
+ out.
+
+ 24 Oct 2004; Luca Barbato <lu_zero@gentoo.org> mplayer-1.0_pre5-r3.ebuild,
+ mplayer-1.0_pre5-r4.ebuild:
+ Minor cleanup
+
+ 24 Oct 2004; Chris White <chriswhite@gentoo.org> mplayer-1.0_pre4-r7.ebuild,
+ mplayer-1.0_pre5-r4.ebuild:
+ Converted to kernel-mod eclass. Thanks to Stefan Schweizer
+ <sschweizer@gmail.com> for helping out with that in bug #68444.
+
+ 24 Oct 2004; Chris White <chriswhite@gentoo.org> mplayer-1.0_pre4-r7.ebuild:
+ Bad bash logic... [ v. ).
+
+ 24 Oct 2004; Chris White <chriswhite@gentoo.org> mplayer-1.0_pre5-r4.ebuild:
+ Added some minor font functionality as per bug #48440.
+
+ 24 Oct 2004; Chris White <chriswhite@gentoo.org> mplayer-1.0_pre5-r4.ebuild:
+ Finished off Bug #61451 and closed bug #68552.
+
+ 24 Oct 2004; Chris White <chriswhite@gentoo.org> mplayer-1.0_pre4-r7.ebuild:
+ Alpha stable marked live, so changing the dep/patch logic for it. Only amd64
+ left and this ebuild will look ok again.
+
+ 24 Oct 2004; Chris White <chriswhite@gentoo.org> mplayer-1.0_pre4-r7.ebuild:
+ Fixed Live issues in Bug #68649 and half solved configure issues in Bug #61451
+ regarding real directories.
+
+ 23 Oct 2004; Chris White <chriswhite@gentoo.org> mplayer-1.0_pre5-r2.ebuild:
+ Fixed epatch issues.
+
+ 22 Oct 2004; Chris White <chriswhite@gentoo.org> mplayer-1.0_pre4-r7.ebuild:
+ Fixed some more filtering that needed to be done for pic stuff to work.
+
+ 20 Oct 2004; Chris White <chriswhite@gentoo.org> mplayer-1.0_pre4-r7.ebuild,
+ mplayer-1.0_pre5-r4.ebuild:
+ Fixed some xvidix logic as per bug #28865.
+
+ 19 Oct 2004; Chris White <chriswhite@gentoo.org> :
+ Did filter flags on a few problematic flags as per Bug #67903.
+
+ 17 Oct 2004; Bryan Østergaard <kloeri@gentoo.org>
+ mplayer-1.0_pre5-r3.ebuild:
+ alpha happiness, bug 66571.
+
+ 17 Oct 2004; Chris White <chriswhite@gentoo.org> :
+ Fixed digest issues :|. Removed ia64 keyword per Bug #67836.
+
+ 16 Oct 2004; Chris White <chriswhite@gentoo.org> mplayer-1.0_pre4-r7.ebuild,
+ mplayer-1.0_pre5-r2.ebuild, mplayer-1.0_pre5-r3.ebuild,
+ mplayer-1.0_pre5-r4.ebuild:
+ Removed sse2 as it's broken. Custom CFLAGS now holds. Ncurses as default
+ terminal lib as per bug #64212.
+
+ 15 Oct 2004; Seemant Kulleen <seemant@gentoo.org>
+ files/mplayer-1.0_pre5-yuv2rgb_fix.patch:
+ fix the yuv2rgb patch to work properly on altivec enabled ppc's
+
+ 06 Oct 2004; Jeremy Huddleston <eradicator@gentoo.org>
+ mplayer-1.0_pre5-r3.ebuild, mplayer-1.0_pre5-r4.ebuild:
+ get_libdir fixes.
+
+ 07 Oct 2004; Luca Barbato <lu_zero@gentoo.org> mplayer-1.0_pre5-r3.ebuild:
+ Backport yuv2rgb_fix
+
+ 05 Oct 2004; Luca Barbato <lu_zero@gentoo.org>
+ -files/mplayer-1.0_pre5-yuv2rbg_fix.patch,
+ -files/mplayer-1.0_pre5-yuv2rbg_kludge.patch,
+ +files/mplayer-1.0_pre5-yuv2rgb_fix.patch, mplayer-1.0_pre5-r4.ebuild:
+ Hopefully the latest fix to that part
+
+ 04 Oct 2004; Luca Barbato <lu_zero@gentoo.org>
+ +files/mplayer-1.0_pre5-yuv2rbg_fix.patch, mplayer-1.0_pre5-r4.ebuild:
+ Eventually I fixed the yuv2rgb_altivec for vo_x11, the other scalers could
+ have wrong colours
+
+ 05 Oct 2004; Luca Barbato <lu_zero@gentoo.org>
+ -files/mplayer-1.0_pre5-yuv2rbg_kludge.patch,
+ +files/mplayer-1.0_pre5-yuv2rgb_fix.patch, mplayer-1.0_pre5-r4.ebuild:
+ Hopefully the latest fix to that part
+
+ 03 Oct 2004; Luca Barbato <lu_zero@gentoo.org> mplayer-1.0_pre5-r4.ebuild:
+ Eventually I fixed the yuv2rgb_altivec for vo_x11, the other scalers could
+ have wrong colours
+
+ 27 Sep 2004; Jeremy Huddleston <eradicator@gentoo.org>
+ mplayer-1.0_pre5-r3.ebuild:
+ Moved jack support back to -r3 to fix compilation on systems with jack
+ installed.
+
+ 22 Sep 2004; Michael Sterrett <mr_bones_@gentoo.org>
+ mplayer-1.0_pre5-r4.ebuild:
+ dev-libs/bio2jack -> media-libs/bio2jack
+
+ 06 Sep 2004; Ciaran McCreesh <ciaranm@gentoo.org>
+ mplayer-1.0_pre4-r7.ebuild, mplayer-1.0_pre5-r2.ebuild,
+ mplayer-1.0_pre5-r3.ebuild:
+ Switch to use epause and ebeep, bug #62950
+
+ 29 Aug 2004; Luca Barbato <lu_zero@gentoo.org>
+ +files/mplayer-1.0_pre5-bio2jack.patch, mplayer-1.0_pre5-r4.ebuild:
+ Jack support
+
+ 25 Aug 2004; Hardave Riar <hardave@gentoo.org> mplayer-1.0_pre5-r3.ebuild:
+ Added ~mips keyword.
+
+ 25 Aug 2004; Chris White <chriswhite@gentoo.org>
+ +files/mplayer-1.0_pre5-mips64.patch, mplayer-1.0_pre5-r3.ebuild:
+ Added mips64 patch. Closes bug #61466.
+
+*mplayer-1.0_pre5-r4 (22 Aug 2004)
+
+ 22 Aug 2004; Chris White <chriswhite@gentoo.org>
+ +files/mplayer-1.0_pre5-configure.patch, +mplayer-1.0_pre5-r4.ebuild:
+ Added MPlayer ebuild with custom CFLAGS.
+
+*mplayer-1.0_pre5-r3 (20 Aug 2004)
+
+ 20 Aug 2004; Chris White <chriswhite@gentoo.org> mplayer-1.0_pre5-r2.ebuild,
+ mplayer-1.0_pre5-r3.ebuild:
+ Fixed 3dnowex logic in -r3. Fixed some bad patch logic as well.
+
+ 18 Aug 2004; Chris White <chriswhite@gentoo.org> :
+ I added some xvmc related USE flags. Fixed matroska and live versions. Added a
+ doc USE flag in -r3. Fixed an mspt issue in pre4-r7. Anything else I can't
+ remember too.
+
+ 14 Aug 2004; Chris White <chriswhite@gentoo.org> mplayer-1.0_pre4-r7.ebuild,
+ mplayer-1.0_pre5-r2.ebuild:
+ Fixed some live version issues. Thanks to Merlin for reporting.
+
+ 13 Aug 2004; Chris White <chriswhite@gentoo.org>
+ -files/amd64_fix_the_blue_love.patch, -files/default-skin.diff,
+ -files/mencoder-segfault.patch, -files/mplayer-0.90-divx.patch,
+ -files/mplayer-0.90-ppc-benh-2.patch, -files/mplayer-0.90_rc4-gtk2.patch,
+ -files/mplayer-1.0_pre3-alsa-gcc34.patch,
+ -files/mplayer-1.0_pre3-libavcodec-gcc34.patch,
+ -files/mplayer-1.0_pre3-libmatroska063.diff,
+ -files/mplayer-1.0_pre3-xmms.patch,
+ -files/mplayer-1.0_pre4-gcc34-mtune.patch, -files/noenca.patch,
+ -files/ppc750FX-fix.patch, -files/vuln01-fix.diff, -mplayer-0.92-r1.ebuild,
+ -mplayer-1.0_pre2-r1.ebuild, -mplayer-1.0_pre3-r3.ebuild,
+ -mplayer-1.0_pre3-r4.ebuild, -mplayer-1.0_pre3-r5.ebuild,
+ -mplayer-1.0_pre4-r1.ebuild, -mplayer-1.0_pre4-r2.ebuild,
+ -mplayer-1.0_pre4-r3.ebuild, -mplayer-1.0_pre4-r4.ebuild,
+ -mplayer-1.0_pre4.ebuild:
+ Cleaned out old unsupported mplayers and old patches.
+
+ 12 Aug 2004; Brian Harring <ferringb@gentoo.org> mplayer-1.0_pre4-r7.ebuild:
+ Corrected an issue with USE="gtk -png". bug #60136.
+
+ 13 Aug 2004; Chris White <chriswhite@gentoo.org> mplayer-1.0_pre5-r2.ebuild:
+ Added tdfxfb support.
+
+ 11 Aug 2004; Anders Rune Jensen <arj@gentoo.org> mplayer-1.0_pre5-r2.ebuild,
+ files/mplayer-1.0_pre5-alsa-gui.patch:
+ Make the alsa patch work with dxr3. Fixes #59200. Caused by #58619.
+
+ 03 Aug 2004; Chris White <chriswhite@gentoo.org> :
+ Fixed digest issues.
+
+ 01 Aug 2004; Chris White <chriswhite@gentoo.org> mplayer-1.0_pre4-r7.ebuild,
+ mplayer-1.0_pre5-r2.ebuild:
+ Should have been marked stable.
+
+ 31 Jul 2004; Chris White <chriswhite@gentoo.org> mplayer-1.0_pre5-r2.ebuild:
+ Ensure proper LIVE version for live fix patch.
+
+ 31 Jul 2004; Chris White <chriswhite@gentoo.org> mplayer-1.0_pre4-r7.ebuild,
+ mplayer-1.0_pre5-r2.ebuild:
+ Fixed some use logic with live and network.
+
+ 31 Jul 2004; Chris White <chriswhite@gentoo.org> mplayer-1.0_pre5-r2.ebuild:
+ Took pre5-r2 down to unstable. See Bug #55456 for more information.
+
+ 30 Jul 2004; Bryan Østergaard <kloeri@gentoo.org>
+ mplayer-1.0_pre4-r7.ebuild:
+ Stable on alpha, see bug #55456.
+
+ 30 Jul 2004; Gustavo Zacarias <gustavoz@gentoo.org>
+ mplayer-1.0_pre5-r2.ebuild:
+ Stable on sparc wrt #55456
+
+ 31 Jul 2004; Chris White <chriswhite@gentoo.org> mplayer-1.0_pre5-r2.ebuild:
+ Took pre5-r2 down to unstable. See Bug #55456 for more information.
+
+ 30 Jul 2004; Chris White <chriswhite@gentoo.org> mplayer-1.0_pre5-r2.ebuild:
+ Added einfo about the network USE flag. This enables/disables streaming and is
+ not set by default in most users' make.conf/package.use. After recieving
+ duplicate issues on this, I've decided to add the einfo in.
+
+ 30 Jul 2004; Chris White <chriswhite@gentoo.org>
+ +files/mplayer-1.0_pre5-live.patch, mplayer-1.0_pre5-r2.ebuild:
+ Added fix for latest live-2004-07* for live USE flag. Fixes Bug #58807.
+
+ 29 Jul 2004; Chris White <chriswhite@gentoo.org> mplayer-1.0_pre4-r7.ebuild,
+ mplayer-1.0_pre5-r2.ebuild:
+ Fixed live dependancy issue that was causing world update downgrades.
+
+ 29 Jul 2004; Chris White <chriswhite@gentoo.org> :
+ Re-added(?) myself as maintainer. Fixed alsa gui bug in #58619.
+
+ 27 Jul 2004; Chris White <chriswhite@gentoo.org> mplayer-1.0_pre4-r7.ebuild,
+ mplayer-1.0_pre5-r2.ebuild:
+ Added -fPIC to kill register clobbering.
+
+ 27 Jul 2004; Daniel Ostrow <dostrow@gentoo.org> mplayer-1.0_pre4-r7.ebuild:
+ Stable on ppc.
+
+ 27 Jul 2004; Brian Harring <ferringb@gentoo.org> mplayer-1.0_pre4-r7.ebuild,
+ mplayer-1.0_pre5-r2.ebuild:
+ Corrected USE="v4l2" configuring.
+
+ 25 Jul 2004; Jeremy Huddleston <eradicator@gentoo.org>
+ mplayer-1.0_pre4-r7.ebuild, mplayer-1.0_pre5-r2.ebuild:
+ Changed amd64 stable to pre4 because of some problems in gmplayer. A patch to
+ pre5 will be put in soon.
+
+ 24 Jul 2004; Jeremy Huddleston <eradicator@gentoo.org>
+ mplayer-1.0_pre5-r2.ebuild:
+ Tested and marked stable for amd64 and x86.
+
+*mplayer-1.0_pre5-r2 mplayer-1.0_pre4-r7 (24 Jul 2004)
+
+ 24 Jul 2004; Brian Harring <ferringb@gentoo.org> mplayer-1.0_pre4-r6.ebuild,
+ mplayer-1.0_pre4-r7.ebuild, mplayer-1.0_pre5-r2.ebuild:
+ As it stands, these ebuilds should now be the targets for stabling. Mplayer
+ 1.0_pre4-r7 and 1.0_pre5-r2 are *not* to be fooled with, compilation fixes
+ are the only thing that should be added to these ebuilds- anything else
+ belongs in another unstable revbump. This fixes compilation issues w/
+ USE="-gtk png", USE="-gtk" and any of xv X xinerama,
+ USE="gif" (compilation failure), USE="-gif" (unconditionally linking in
+ libgif broken in previous fix for #58086), DOCS/TOOLS not being installed,
+ removed dep on X for gif (it was caused by said fix), USE="dvdread -dvd"
+ bring in dvdread and not using it, etc. Pretty large amount of fixes.
+ Versions 1.0_pre4-r6 and 1.0_pre5-r1 are removed from the tree, no user
+ should be using them (borked badly).
+ These ebuilds ought to end up as the targets for stabling for the gui
+ vulnerablity issues, thus they shouldn't be fooled w/ for anything but
+ needed fixes.
+
+ 24 Jul 2004; Jeremy Huddleston <eradicator@gentoo.org>
+ files/cachefill.patch:
+ Typo in the patch was in the conf file, not the source... fixing.
+
+ 24 Jul 2004; Chris White <chriswhite@gentoo.org> files/cachefill.patch,
+ +files/mplayer-1.0_pre5-r1-conf_locale.patch, mplayer-1.0_pre4-r6.ebuild,
+ mplayer-1.0_pre5-r1.ebuild:
+ Moved x11 support/xv driver to X USE flag. Fixed gif needing deps on X11.
+ Fixed small typo in the cachefill patch. Address issues mentioned in Bug
+ #58086. Also adds locale fix patch for Bug #58082.
+
+ 23 Jul 2004; Jeremy Huddleston <eradicator@gentoo.org>
+ mplayer-1.0_pre5-r1.ebuild:
+ Added kernel-2.6 fix on sparc (removes old workaround).
+
+ 23 Jul 2004; Chris White <chriswhite@gentoo.org> mplayer-1.0_pre4-r6.ebuild,
+ mplayer-1.0_pre5-r1.ebuild:
+ Fixes some strange issue with the .20 live plugins being pulled in, despite
+ .27 being coded in. Re-Removed dvdread stuff.
+
+ 23 Jul 2004; Jeremy Huddleston <eradicator@gentoo.org>
+ mplayer-1.0_pre5-r1.ebuild:
+ Making USE=xvid work on all archs.
+
+ 23 Jul 2004; Brian Harring <ferringb@gentoo.org> mplayer-1.0_pre4-r6.ebuild,
+ mplayer-1.0_pre5-r1.ebuild:
+ Fixed broken deps for media-plugins/live and media-libs/libtheora for ia64
+
+ 23 Jul 2004; Brian Harring <ferringb@gentoo.org> mplayer-1.0_pre4-r6.ebuild,
+ mplayer-1.0_pre5-r1.ebuild, files/cachefill.patch:
+ Slipping eradicators cachefill patch in, bug #55936
+
+ 23 Jul 2004; Chris White <chriswhite@gentoo.org> mplayer-1.0_pre4-r6.ebuild,
+ mplayer-1.0_pre5-r1.ebuild:
+ Fixed an ia64 dependancy error.
+
+*mplayer-1.0_pre5-r1 (23 Jul 2004)
+
+ 23 Jul 2004; Chris White <chriswhite@gentoo.org>
+ +files/mplayer-mythtv.patch, +files/mplayer-odml.patch,
+ -mplayer-1.0_pre4-r5.ebuild, +mplayer-1.0_pre4-r6.ebuild,
+ +mplayer-1.0_pre5-r1.ebuild, -mplayer-1.0_pre5.ebuild:
+ Cleaned up with the help of Mr_Bones_, solar, and ferringb. Added in mythtv
+ patch to fix bug #23544. Stable version for Bug #55456.
+
+ 23 Jul 2004; Chris White <chriswhite@gentoo.org> mplayer-1.0_pre4-r5.ebuild:
+ Helps if you commit the gui vulnerability patch when you're fixing a
+ vulnerability bug.
+
+ 23 Jul 2004; Chris White <chriswhite@gentoo.org> mplayer-1.0_pre5.ebuild:
+ Fixed live dependancies. Fixes Bug #57963.
+
+ 23 Jul 2004; Chris White <chriswhite@gentoo.org>
+ -files/mga-kernel-2.6.patch, +files/mplayer-1.0_pre4-mga-kernel2.6.patch,
+ mplayer-1.0_pre4-r5.ebuild, mplayer-1.0_pre5.ebuild:
+ Cleaned up the ebuilds for pre4-r5 and pre5.
+
+ 19 Jul 2004; Travis Tilley <lv@gentoo.org> mplayer-1.0_pre4-r5.ebuild:
+ stable on amd64
+
+ 19 Jul 2004; Chris White <chriswhite@gentoo.org> +files/gui_vuln_code.patch,
+ +files/str_undefined.patch, +files/strl.c, mplayer-1.0_pre4-r5.ebuild:
+ Fixed mplayer pre4-r5 compiling issues with undefined str* references and
+ re-stabilized for gui vuln bug for amd64. Added fullscreen patch as well.
+
+ 16 Jul 2004; Bryan Østergaard <kloeri@gentoo.org> mplayer-1.0_pre5.ebuild:
+ Stable on alpha, see bug #55456.
+
+*mplayer-1.0_pre4-r5 (18 Jul 2004)
+
+ 18 Jul 2004; Chris White <chriswhite@gentoo.org>
+ +files/amd64_fix_the_blue_love.patch, +files/real_demux.patch,
+ mplayer-1.0_pre4-r4.ebuild, +mplayer-1.0_pre4-r5.ebuild:
+ Fixes Bug #53634 and Bug #55456 for amd64.
+
+ 15 Jul 2004; Jason Wever <weeve@gentoo.org> mplayer-1.0_pre5.ebuild:
+ Stable on sparc wrt bug #55456.
+
+ 16 Jul 2004; Chris White <chriswhite@gentoo.org> mplayer-1.0_pre5.ebuild:
+ Weeve gave the heads up to mark this stable on sparc. Doing so.
+
+ 16 Jul 2004; Daniel Ostrow <dostrow@gentoo.org> mplayer-1.0_pre5.ebuild:
+ Stable on ppc.
+
+ 15 Jul 2004; Luca Barbato <lu_zero@gentoo.org>
+ +files/mplayer-1.0_pre5-yuv2rbg_kludge.patch, mplayer-1.0_pre5.ebuild:
+ Fixed the altivec scaler
+
+ 15 Jul 2004; Chris White <chriswhite@gentoo.org>
+ +files/mplayer-1.0_pre5-mga-kernel-2.6.patch, mplayer-1.0_pre5.ebuild:
+ Re-added the mga_vid.c patch to pre5. Thanks to Norman Yarvin for the heads
+ up. This fixes Bug #57138
+
+ 15 Jul 2004; Chris White <chriswhite@gentoo.org> mplayer-1.0_pre5.ebuild:
+ Yay, more fun, they replaced the test ebuild which needed the noenca patch
+ with the final release.. (finally) so now I have to remove the patch :|
+
+ 15 Jul 2004; Chris White <chriswhite@gentoo.org> mplayer-1.0_pre5.ebuild:
+ Fixed the weird md5-ness with the tarballs
+
+*mplayer-1.0_pre5 (15 Jul 2004)
+
+ 15 Jul 2004; Chris White <chriswhite@gentoo.org> +files/noenca.patch,
+ +mplayer-1.0_pre5.ebuild:
+ Adding to the tree for stable marking on Bug #55456
+
+ 10 Jul 2004; Jason Wever <weeve@gentoo.org> mplayer-1.0_pre4.ebuild:
+ Stable on sparc.
+
+ 29 Jun 2004; Brian Harring <ferringb@gentoo.org> mplayer-1.0_pre4-r1.ebuild,
+ mplayer-1.0_pre4-r2.ebuild, mplayer-1.0_pre4-r3.ebuild,
+ mplayer-1.0_pre4-r4.ebuild, files/mplayer-1.0_pre4-gcc34-mtune.patch,
+ files/mplayer-1.0_pre4-help_mp-ro.h:
+ Closing out bugs #49669 (help/help_mp-ro.h having completely broken syntax),
+ gcc3.4 s:-mcpu:-mtune: (bug #49488).
+
+ 17 Jun 2004; Seemant Kulleen <seemant@gentoo.org>
+ mplayer-1.0_pre4-r4.ebuild:
+ added two variables: BLUV and SVGV to hold the version numbers of the tarballs
+ for BLUE and svga_helper, respectively. Now, version bumping those two things
+ shouldn't break mplayer's emerge processes.
+
+ 17 Jun 2004; Seemant Kulleen <seemant@gentoo.org>
+ mplayer-1.0_pre4-r4.ebuild:
+ change the occurrence of Blue-1.0 to Blue-1.4 to correspond to the recent
+ version bump
+
+ 17 Jun 2004; Luca Barbato <lu_zero@gentoo.org>
+ +files/mplayer-1.0_pre4-altivec-gcc34.patch, mplayer-1.0_pre4-r4.ebuild:
+ gcc-3.4 altivec fix
+
+ 16 Jun 2004; Martin Schlemmer <azarah@gentoo.org>
+ mplayer-1.0_pre4-r4.ebuild:
+ Update Blue skin to version 1.4
+
+ 09 Jun 2004; Aron Griffis <agriffis@gentoo.org> mplayer-0.92-r1.ebuild,
+ mplayer-1.0_pre2-r1.ebuild, mplayer-1.0_pre3-r3.ebuild,
+ mplayer-1.0_pre3-r4.ebuild, mplayer-1.0_pre3-r5.ebuild,
+ mplayer-1.0_pre4-r1.ebuild, mplayer-1.0_pre4-r2.ebuild,
+ mplayer-1.0_pre4-r3.ebuild, mplayer-1.0_pre4-r4.ebuild,
+ mplayer-1.0_pre4.ebuild:
+ Fix use invocation
+
+ 08 Jun 2004; Patrick Kursawe <phosphan@gentoo.org>
+ mplayer-1.0_pre4-r3.ebuild, mplayer-1.0_pre4-r4.ebuild:
+ Doing matrox related stuff only when matrox is in USE, see bug #53222
+
+ 02 Jun 2004; Brian Harring <ferringb@gentoo.org> mplayer-1.0_pre4-r1.ebuild,
+ mplayer-1.0_pre4-r2.ebuild, mplayer-1.0_pre4-r3.ebuild,
+ mplayer-1.0_pre4-r4.ebuild, mplayer-1.0_pre4.ebuild:
+ Missing IUSE for nas, nls. Added live use flag to pre4, removed the inline
+ autodetect of live, making it a use flag controlled dep. moved all IUSE
+ statements below inherit, where they should stay. Closed bugs #49481 and
+ #36815.
+
+ 01 Jun 2004; Travis Tilley <lv@gentoo.org> mplayer-1.0_pre4-r4.ebuild:
+ stable on amd64
+
+ 01 Jun 2004; Brian Harring <ferringb@gentoo.org> mplayer-1.0_pre4-r1.ebuild,
+ mplayer-1.0_pre4-r2.ebuild, mplayer-1.0_pre4-r3.ebuild,
+ mplayer-1.0_pre4-r4.ebuild, mplayer-1.0_pre4.ebuild:
+ Added necessary --internal-(matroska|faad) for matroska (bug #50533) and mpeg.
+ MPlayer uses external libs when those flags are specified, otherwise,
+ internal. Also fixed missing IUSE flags. Fixed use dvb syntax error in pre4-r2.
+
+ 01 Jun 2004; Brian Harring <ferringb@gentoo.org> mplayer-1.0_pre4-r4.ebuild,
+ mplayer-1.0_pre4.ebuild:
+ Added use flags for libcaca since mplayer autodetects it already (bug #49369),
+ and missing xinerama IUSE (bug #51509)
+
+ 28 May 2004; Guy Martin <gmsoft@gentoo.org> mplayer-1.0_pre4-r4.ebuild:
+ Added ~hppa to KEYWORDS. Little build fix.
+
+*mplayer-1.0_pre4-r4 (28 May 2004)
+
+ 28 May 2004; Luca Barbato <lu_zero@gentoo.org> +mplayer-1.0_pre4-r4.ebuild:
+ Upstream requested change to the ebuild
+
+ 28 May 2004; Patrick Kursawe <phosphan@gentoo.org>
+ mplayer-1.0_pre4-r3.ebuild:
+ The sandbox fixes were fine for 2.6.6, but failed with 2.6.5. Fixed that, see
+ bug #40616 again.
+
+ 27 May 2004; Daniel Ostrow <dostrow@gentoo.org> mplayer-1.0_pre4-r3.ebuild:
+ Stable on ppc.
+
+ 27 May 2004; Jon Portnoy <avenj@gentoo.org> mplayer-1.0_pre4-r3.ebuild :
+ Stable on AMD64
+
+ 27 May 2004; Brian Harring <ferringb@gentoo.org> mplayer-1.0_pre4-r1.ebuild,
+ mplayer-1.0_pre4-r2.ebuild, mplayer-1.0_pre4-r3.ebuild,
+ mplayer-1.0_pre4.ebuild:
+ Adding xvid, divx4linux use flags (bug #30242), bidi (bug #41482), and mad
+ (bug #32606). Bit of cleanup of myconf, moved IUSE after inherit for
+ 1.0_pre4-r3 (portage 2.0.51_pre9 doesn't play nice w/ IUSE above inherit, see
+ bug #52160).
+
+*mplayer-1.0_pre4-r3 (26 May 2004)
+
+ 26 May 2004; Patrick Kursawe <phosphan@gentoo.org>
+ mplayer-1.0_pre4-r3.ebuild:
+ Sandbox problems (like bug #52058) should be history now.
+ Using kmod.eclass instead of check-kernel now (bug #51903)
+
+*mplayer-1.0_pre4-r2 (19 May 2004)
+
+ 19 May 2004; Patrick Kursawe <phosphan@gentoo.org>
+ mplayer-1.0_pre4-r2.ebuild, files/mga-kernel-2.6.patch:
+ Fixing bug #40616 (mga driver), little cleanups for the patch section.
+
+ 12 May 2004; Alexander Gabert <pappy@gentoo.org> mplayer-1.0_pre3-r5.ebuild,
+ mplayer-1.0_pre4-r1.ebuild, mplayer-1.0_pre4.ebuild:
+ added new hardened PIE SSP switches
+
+ 12 May 2004; Alexander Gabert <pappy@gentoo.org> mplayer-0.92-r1.ebuild,
+ mplayer-1.0_pre2-r1.ebuild, mplayer-1.0_pre3-r3.ebuild,
+ mplayer-1.0_pre3-r4.ebuild:
+ removed hardened-gcc logic, added filter-flags fPIC logic
+
+ 02 May 2004; Jason Wever <weeve@gentoo.org> mplayer-1.0_pre4-r1.ebuild:
+ Changed -sparc keyword back to ~sparc.
+
+ 30 Apr 2004; Bryan Østergaard <kloeri@gentoo.org>
+ mplayer-1.0_pre4-r1.ebuild:
+ Stable on alpha.
+
+*mplayer-1.0_pre4-r1 (30 Apr 2004)
+
+ 30 Apr 2004; Martin Holzer <mholzer@gentoo.org> mplayer-1.0_pre4-r1.ebuild:
+ live is now a local use flag.
+
+ 30 Apr 2004; Martin Holzer <mholzer@gentoo.org> mplayer-1.0_pre4.ebuild:
+ fixing live depend. closes 49481
+
+ 29 Apr 2004; Brandon Hale <tseng@gentoo.org> mplayer-1.0_pre4.ebuild:
+ Stable on x86 for multiple vulnerabilities, bug #49387.
+
+*mplayer-1.0_pre4 (28 Apr 2004)
+
+ 28 Apr 2004; Martin Holzer <mholzer@gentoo.org> mplayer-1.0_pre4.ebuild:
+ Version bumped.
+
+ 28 Apr 2004; Travis Tilley <lv@gentoo.org>
+ +files/mplayer-1.0_pre3-alsa-gcc34.patch,
+ +files/mplayer-1.0_pre3-libavcodec-gcc34.patch, mplayer-1.0_pre3-r5.ebuild:
+ added a fix for compiling with gcc 3.4. yaaay! =)
+
+ 19 Apr 2004; Chris Gianelloni <wolf31o2@gentoo.org> mplayer-0.92-r1.ebuild,
+ mplayer-1.0_pre2-r1.ebuild, mplayer-1.0_pre3-r3.ebuild,
+ mplayer-1.0_pre3-r4.ebuild, mplayer-1.0_pre3-r5.ebuild:
+ Removed broken gtk2 patch from all versions still in portage and closing bug
+ #15786.
+
+ 13 Apr 2004; Scott W Taylor <swtaylor@gentoo.org>
+ mplayer-1.0_pre3-r5.ebuild:
+ update -fPIC handling for post-hardened-gcc
+
+ 08 Apr 2004; Luca Barbato <lu_zero@gentoo.org> mplayer-1.0_pre3-r5.ebuild:
+ Added useflags for v4l and v4l2
+
+ 06 Apr 2004; Brandon Hale <tseng@gentoo.org> mplayer-1.0_pre3-r5.ebuild:
+ Update -fPIC filtering magic for post hardened-gcc.
+
+ 04 Apr 2004; Luca Barbato <lu_zero@gentoo.org> mplayer-1.0_pre3-r5.ebuild,
+ files/ppc750FX-fix.patch:
+ Minor fix to extend the G3 cpu supported, thanks to Simon Strandman
+ <simon.strandman@telia.com>, bug #44276
+
+ 31 Mar 2004; Martin Holzer <mholzer@gentoo.org> mplayer-1.0_pre3-r5.ebuild:
+ adding ipv6 configure. closes 42940
+
+*mplayer-1.0_pre3-r3 (31 Mar 2004)
+*mplayer-1.0_pre3-r5 (31 Mar 2004)
+*mplayer-1.0_pre3-r4 (31 Mar 2004)
+*mplayer-1.0_pre2-r1 (31 Mar 2004)
+*mplayer-0.92-r1 (31 Mar 2004)
+
+ 31 Mar 2004; Patrick Kursawe <phosphan@gentoo.org> mplayer-0.92-r1.ebuild,
+ mplayer-0.92.ebuild, mplayer-1.0_pre2-r1.ebuild, mplayer-1.0_pre2.ebuild,
+ mplayer-1.0_pre3-r1.ebuild, mplayer-1.0_pre3-r2.ebuild,
+ mplayer-1.0_pre3-r3.ebuild, mplayer-1.0_pre3-r4.ebuild,
+ mplayer-1.0_pre3-r5.ebuild, mplayer-1.0_pre3.ebuild, files/vuln02-fix.diff:
+ Revision bumped all currently available ebuilds and added a patch for a
+ security problem, see bug #46246.
+ Because of different keywordings for 1.0_pre3 they were bumped like follows:
+ 1.0_pre3 -> 1.0_pre3-r3
+ 1.0_pre3-r1 -> 1.0_pre3-r4
+ 1.0_pre3-r2 -> 1.0_pre3-r5
+
+ 29 Mar 2004; Donnie Berkholz <spyderous@gentoo.org>; mplayer-0.92.ebuild,
+ mplayer-1.0_pre2.ebuild, mplayer-1.0_pre3-r1.ebuild,
+ mplayer-1.0_pre3-r2.ebuild, mplayer-1.0_pre3.ebuild:
+ Change x11-base/xfree dependency to virtual/x11.
+
+ 23 Mar 2004; Martin Holzer <mholzer@gentoo.org> mplayer-1.0_pre3-r2.ebuild,
+ files/mplayer-1.0_pre3-xmms.patch:
+ added patch to disable xmms. closes 45356
+
+ 21 Mar 2004; Jason Wever <weeve@gentoo.org> mplayer-1.0_pre3-r2.ebuild:
+ Added ~sparc keyword.
+
+ 21 Mar 2004; Jason Wever <weeve@gentoo.org> mplayer-1.0_pre3-r2.ebuild:
+ Marked -sparc until libtheora builds on sparc.
+
+*mplayer-1.0_pre3-r2 (21 Mar 2004)
+
+ 21 Mar 2004; Martin Holzer <mholzer@gentoo.org> mplayer-1.0_pre3-r2.ebuild:
+ adding libtheora support.
+
+ 18 Mar 2004; Martin Holzer <mholzer@gentoo.org> mplayer-1.0_pre3-r1.ebuild,
+ files/mplayer-1.0_pre3-libmatroska063.diff:
+ adding patch to compile with latest libmatroska
+
+ 16 Mar 2004; Stephen P. Becker <geoman@gentoo.org> mplayer-1.0_pre3.ebuild:
+ Added ~mips keyword.
+
+ 15 Mar 2004; Jason Wever <weeve@gentoo.org> mplayer-0.92.ebuild:
+ Marked stable on sparc.
+
+*mplayer-1.0_pre3-r1 (11 Mar 2004)
+
+ 11 Mar 2004; <kanaka@gentoo.org> mplayer-1.0_pre3-r1.ebuild:
+ Updated to NOT install libpostproc libraries (bug 43640). Now provided by
+ >=ffmpeg-0.4.8.20040222.
+
+ 27 Feb 2004; Jason Wever <weeve@gentoo.org> mplayer-1.0_pre3.ebuild:
+ Nothing but ~sparc.
+
+ 26 Feb 2004; Guy Martin <gmsoft@gentoo.org> :
+ Keyworded ~hppa.
+
+ 16 Jan 2004; Bartosch Pixa <darkspecter@gentoo.org> mplayer-1.0_pre3.ebuild:
+ set ppc in keywords
+
+ 25 Dec 2003; Seemant Kulleen <seemant@gentoo.org> mplayer-0.92.ebuild,
+ mplayer-1.0_pre1-r1.ebuild, mplayer-1.0_pre2.ebuild,
+ mplayer-1.0_pre3.ebuild:
+ changed SRC_URI to use mirror://mplayer instead
+
+ 14 Dec 2003; Martin Holzer <mholzer@gentoo.org> mplayer-1.0_pre3.ebuild:
+ Changing matroska version. Closes #35787
+
+ 12 Dec 2003; Seemant Kulleen <seemant@gentoo.org> mplayer-1.0_pre3.ebuild:
+ --disable-css is a deprecated configure option now. Closes bug #35644 by
+ butters@opengames.net and its duplicates
+
+*mplayer-1.0_pre3 (11 Dec 2003)
+
+ 20 Dec 2003; Guy Martin <gmsoft@gentoo.org> mplayer-1.0_pre3.ebuild :
+ Fixed detection of hppa boxes.
+
+ 11 Dec 2003; Seemant Kulleen <seemant@gentoo.org> mplayer-1.0_pre3.ebuild,
+ files/mplayer-1.0-gtk2.patch:
+ version bump to newest release -- includes updated gtk2 patch
+
+ 04 Dec 2003; Seemant Kulleen <seemant@gentoo.org> mplayer-0.92.ebuild,
+ mplayer-1.0_pre1-r1.ebuild, mplayer-1.0_pre2.ebuild:
+ fix the gtk/gtk2 USE flag syntax, closing bug #34567 by Spider
+ <spider@gentoo.org>
+
+ 16 Nov 2003; Brad House <brad_mssw@gentoo.org> mplayer-1.0_pre2.ebuild:
+ mark stable on amd64
+
+ 30 Oct 2003; Martin Holzer <mholzer@gentoo.org> mplayer-1.0_pre2.ebuild:
+ Adding joystick support. Closes #31470.
+
+ 26 Oct 2003; Luca Barbato <lu_zero@gentoo.org> mplayer-1.0_pre2.ebuild:
+ Added debug useflag, minor fixes. Closes #31978 and #31996.
+ thanks to Andrew Kirilenko <icedank@gmx.net> and Juri Haberland
+ <juri@koschikode.com>.
+
+ 20 Oct 2003; Martin Holzer <mholzer@gentoo.org> mplayer-1.0_pre1-r1.ebuild,
+ mplayer-1.0_pre2.ebuild:
+ added matroska support. Closes #28636.
+
+ 14 Oct 2003; Martin Holzer <mholzer@gentoo.org> mplayer-0.92.ebuild,
+ mplayer-1.0_pre1-r1.ebuild, mplayer-1.0_pre2.ebuild:
+ RDEPEND error fixed. Closes #30624.
+
+ 14 Oct 2003; Martin Holzer <mholzer@gentoo.org> mplayer-0.92.ebuild,
+ mplayer-1.0_pre1-r1.ebuild, mplayer-1.0_pre2.ebuild:
+ adding lirc IUSE flag. Closes #31031.
+
+ 11 Oct 2003; Martin Holzer <mholzer@gentoo.org> mplayer-0.92.ebuild,
+ mplayer-1.0_pre1-r1.ebuild, mplayer-1.0_pre2.ebuild:
+ fixed Doc permissions. Closes #30724.
+
+ 09 Oct 2003; Martin Schlemmer <azarah@gentoo.org> mplayer-0.92.ebuild,
+ mplayer-1.0_pre1-r1.ebuild, mplayer-1.0_pre2.ebuild:
+ Add a note about us using MPlayer set C[XX]FLAGS to avoid confusion.
+
+ 09 Oct 2003; Martin Schlemmer <azarah@gentoo.org> mplayer-0.92.ebuild,
+ mplayer-1.0_pre1-r1.ebuild, mplayer-1.0_pre2.ebuild:
+ Get fonts to install properly again, fixing bug #30213.
+
+ 08 Oct 2003; Luca Barbato<lu_zero@gentoo.org> mplayer-1.0_pre2.ebuild:
+ ppc related fix.
+
+*mplayer-1.0_pre2 (07 Oct 2003)
+
+ 07 Oct 2003; Martin Holzer <mholzer@gentoo.org> mplayer-1.0_pre2.ebuild:
+ Version bumped. Closes #30415.
+
+ 06 Oct 2003; Martin Holzer <mholzer@gentoo.org> mplayer-0.92.ebuild,
+ mplayer-1.0_pre1-r1.ebuild:
+ Adding aalib configure strings. Closes #21984.
+
+ 29 Sep 2003; Martin Holzer <mholzer@gentoo.org> :
+ Fixing digest.
+
+*mplayer-1.0_pre1-r1 (27 Sep 2003)
+
+ 27 Sep 2003; <solar@gentoo.org> mplayer-1.0_pre1-r1.ebuild,
+ files/vuln01-fix.diff:
+ security fix for devel branch
+
+*mplayer-0.92 (28 Sep 2003)
+
+ 28 Sep 2003; Martin Holzer <mholzer@gentoo.org> mplayer-0.92.ebuild:
+ Version bumped. Closes a security Problem.
+
+ 23 Sep 2003; Martin Holzer <mholzer@gentoo.org> :
+ digest update. closes #29363
+
+ 12 Sep 2003; heinrich Wendel <lanius@gentoo.org> mplayer-1.0_pre1.ebuild,
+ mplayer-0.91.ebuild:
+ fixed samba dep to version 2.2.8a
+
+ 07 Sep 2003; Alexander Gabert <pappy@gentoo.org> mplayer-0.91.ebuild:
+ added hardened-gcc excludes
+
+ 06 Sep 2003; Martin Schlemmer <azarah@gentoo.org> mplayer-1.0_pre1.ebuild:
+ Cleanup libpostproc stuff a bit. Last time I checked, we should not need to
+ install the static version of the library.
+
+ 04 Sep 2003; Heinrich Wendel <lanius@gentoo.org> mplayer-0.90-r2.ebuild,
+ mplayer-0.90-r5.ebuild, mplayer-0.90_rc4.ebuild, mplayer-0.91.ebuild,
+ mplayer-1.0_pre1.ebuild, files/mplayer-0.90-fix-version.patch:
+ - removed old ebuilds
+ - fixed samba bug #25912
+ - fixed fs bug #12751
+ - marked 0.91 stable on x86 and ppc
+
+*mplayer-1.0_pre1 (04 Sep 2003)
+
+ 04 Sep 2003; Martin Holzer <mholzer@gentoo.org> mplayer-1.0_pre1.ebuild:
+ Version bumped.
+
+ 24 Aug 2003; Martin Schlemmer <azarah@gentoo.org> mplayer-0.90-r2.ebuild,
+ mplayer-0.90-r5.ebuild, mplayer-0.90_rc4.ebuild, mplayer-0.91.ebuild,
+ files/mencoder-segfault.patch:
+ Fix mencoder segfault when used improperly, bug #23611
+
+*mplayer-0.91 (20 Aug 2003)
+
+ 20 Aug 2003; Martin Schlemmer <azarah@gentoo.org> mplayer-0.91.ebuild:
+ New version.
+
+*mplayer-0.90-r5 (10 Aug 2003)
+
+ 10 Aug 2003; Martin Schlemmer <azarah@gentoo.org> mplayer-0.90-r5.ebuild:
+ Some cleanups - do not try to autodetect video/audio settings, as MPlayer does
+ it by itself these days. Change a few things as suggested by Gabucino
+ (--enable-3dfx is broken, and --enable-dynamic-plugins could have issues).
+ Eventually add the new default Skin of MPlayer (Blue).
+
+ 04 Aug 2003; Martin Schlemmer <azarah@gentoo.org> mplayer-0.90-r4.ebuild,
+ files/mplayer-0.90-ppc-benh-2.patch:
+ Fix ppc-benh.patch to play nicely with coreutils-fixup.patch, bug #25833
+
+*mplayer-0.90-r4 (03 Aug 2003)
+
+ 03 Aug 2003; Martin Schlemmer <azarah@gentoo.org> mplayer-0.90-r4.ebuild,
+ files/mplayer-0.90-coreutils-fixup.patch:
+ Remove building of svgalib kernel module. Should fix bug #25062.
+
+ 18 Jul 2003; Martin Holzer <mholzer@gentoo.org> mplayer-0.90-r3.ebuild:
+ Final fix.
+
+ 16 Jul 2003; Luca Barbato<lu_zero@gentoo.org> mplayer-0.90-r2.ebuild,
+ mplayer-0.90-r3.ebuild:
+ Make it install every documentation file. Closes #20662.
+
+ 16 Jul 2003; Martin Holzer <mholzer@gentoo.org> mplayer-0.90-r2.ebuild,
+ mplayer-0.90-r3.ebuild, mplayer-0.90_rc4.ebuild, mplayer-0.90_rc5.ebuild:
+ Added IUSE flag for xmms. Closes #20090.
+
+ 16 Jul 2003; Martin Holzer <mholzer@gentoo.org> mplayer-0.90-r2.ebuild:
+ Marked x86 stable.
+
+*mplayer-0.90-r3 (16 Jul 2003)
+
+ 16 Jul 2003; Martin Holzer <mholzer@gentoo.org> mplayer-0.90-r3.ebuild:
+ Added vidix support. Submitted by phoen][x <fisi.tilman.klar@gmx.de> in #20114.
+
+*mplayer-0.90-r2 (01 Jul 2003)
+
+ 01 Jul 2003; Martin Holzer <mholzer@gentoo.org> mplayer-0.90-r2.ebuild,
+ files/mplayer-0.90-divx.patch:
+ Adding logic to detect newer DivX Api and patching. Closes #23795.
+
+ 11 Jun 2003; Jason Wever <weeve@gentoo.org> mplayer-0.90-r1.ebuild:
+ Added ~sparc to keywords.
+
+*mplayer-0.90-r1 (27 Apr 2003)
+
+ 27 Apr 2003; Martin Schlemmer <azarah@gentoo.org> mplayer-0.90-r1.ebulid,
+ mplayer-0.90-fix-version.patch :
+ - Fix version (still displayed as rc5), bug #19691.
+ - Change DEPEND to only depend and enable faad2 support if 'mpeg' in USE,
+ closing bug #19119.
+ - Add SMB (Samba) support, closing bug #16395.
+
+*mplayer-0.90 (09 Apr 2003)
+
+ 20 Apr 2003; Seemant Kulleen <seemant@gentoo.org> mplayer-0.90.ebuild :
+ Added faad2 and enabling faad in econf -- satisies many requests to be able to
+ play the Matrix trailers.
+
+ 16 Apr 2003; Lars Weiler <pylon@gentoo.org> mplayer-0.90.ebuild,
+ files/mplayer-0.90-ppc-benh.patch:
+ No big change.
+ Added the mentioned patch in bug #18511 for the right order of the
+ ppc-processor-switch and some more ppc-related einfo-lines about the altivec
+ issue with DivX.
+
+ 09 Mar 2003; Martin Schlemmer <azarah@gentoo.org> mplayer-0.90.ebuild :
+ New version:
+ - Add 'dvb' use flag (bug #13809), thanks to Juri Haberland <juri@koschikode.com>
+ - Fix MPlayer to detect/use altivec on benh kernels (bug #18511), thanks to
+ Stephan van Maris <svmaris@e-village.nl> and Lars Weiler <pylon@gentoo.org>.
+ - Remove dvdnav support as its broken anyhow. According to lists, no effort
+ will be made soon to get it fixed.
+ This should also close bug #18879.
+
+ 30 Mar 2003; Martin Schlemmer <azarah@gentoo.org> mplayer-0.90_rc5.ebuild :
+ Mark stable for x86. Fix bug #18211, thanks to Philippe Lafoucri?re
+ <lafou@wanadoo.fr>.
+
+*mplayer-0.90_rc5 (18 Mar 2003)
+
+ 16 Apr 2003; Martin Holzer <mholzer@gentoo.org> mplayer-0.90_rc5.ebuild:
+ Forcing to use old libdvdnav.
+
+ 18 Mar 2003; Martin Schlemmer <azarah@gentoo.org> mplayer-0.90_rc5.ebuild :
+ New version.
+
+ 13 mar 2003; Olivier Reisch <doctomoe@gentoo.org> mplayer-0.90_rc4.ebuild :
+ Marked ppc stable
+
+*mplayer-0.90_rc4 (16 Feb 2003)
+
+ 16 Apr 2003; Martin Holzer <mholzer@gentoo.org> mplayer-0.90_rc4.ebuild:
+ Forcing to use old libdvdnav.
+
+ 06 March 2003; Martin Schlemmer <azarah@gentoo.org> mplayer-0.90_rc4.ebuild :
+
+ - Fix esound not disabled if 'esd' not in USE, bug #16758.
+ - Remove --enable-shared-pp from ./configure, as it breaks mplayer with
+ gcc-2.95.3,bug #14479.
+ - Mark stable for x86.
+
+ 16 Feb 2003; Martin Schlemmer <azarah@gentoo.org> mplayer-0.90_rc4.ebuild :
+
+ Update version.
+ Add LIVE.COM support, thanks to J Robert Ray <jrray@gentoo.org>, bug #14766.
+
+ 02 Feb 2003; Martin Schlemmer <azarah@gentoo.org> mplayer-0.90_*.ebuild :
+
+ Fix SRC_URI for fonts, closing bug #14770.
+
+ 21 Jan 2003; Martin Schlemmer <azarah@gentoo.org> mplayer-0.90_rc3.ebuild :
+
+ Add --with-x11incdir=/usr/X11R6/include as a temporary fix for bug #14311.
+
+*mplayer-0.90_rc3 (20 Jan 2003)
+
+ 20 Jan 2003; Martin Schlemmer <azarah@gentoo.org> mplayer-0.90_rc3.ebuild :
+
+ New version.
+
+ 19 Jan 2003; Martin Schlemmer <azarah@gentoo.org> mplayer-0.90_rc2.ebuild :
+
+ Only enable devfs support if /dev/.devfsd exists, bug #13613.
+
+ 07 Dec 2002; Martin Schlemmer <azarah@gentoo.org> mplayer-0.90_rc2.ebuild :
+
+ Add lirc support, thanks to Jarkko Haapalainen <johaapa@student.oulu.fi>,
+ bug #12244. Mark stable for x86, and fix to depend on xfree-4.2.1-r2, fixing
+ problems with gtk2 support and freetype.
+
+*mplayer-0.90_rc2 (26 Dec 2002)
+
+ 26 Dec 2002; Martin Schlemmer <azarah@gentoo.org> mplayer-0.90_rc2.ebuild :
+
+ New version.
+
+*mplayer-0.90_rc1-r1 (13 Dec 2002)
+
+ 13 Dec 2002; Martin Schlemmer <azarah@gentoo.org> mplayer-0.90_rc1-r1.ebuild :
+
+ Fix the xvid bork. Add gtk2 support :D
+
+*mplayer-0.90_rc1 (8 Dec 2002)
+
+ 08 Dec 2002; Martin Schlemmer <azarah@gentoo.org> mplayer-0.90_rc1.ebuild :
+
+ New version, closing bug #11775.
+
+ 01 Dec 2002; Martin Schlemmer <azarah@gentoo.org> mplayer-0.90_pre10.ebuild :
+
+ Mark as stable.
+
+ 24 Nov 2002; Martin Schlemmer <azarah@gentoo.org> mplayer-0.90_pre10.ebuild :
+
+ Add arts support, closing bug #11122.
+
+*mplayer-0.90_pre10 (11 Nov 2002)
+
+ 11 Nov 2002; Martin Schlemmer <azarah@gentoo.org> :
+
+ Nev version.
+
+ 5 Nov 2002; Martin Schlemmer <azarah@gentoo.org> mplayer-0.90_pre9.ebuild :
+
+ Add realplayer support, closing bug #6286.
+
+*mplayer-0.90_pre9 (27 Oct 2002)
+
+ 27 Oct 2002; Martin Schlemmer <azarah@gentoo.org> :
+
+ New version.
+
+*mplayer-0.90_pre8-r1 (12 Oct 2002)
+
+ 12 Oct 2002; Martin Schlemmer <azarah@gentoo.org> :
+
+ Add patch for build failure without oss if "TV" is enabled by
+ configure. Thanks goes to Chad Netzer <chad.netzer@stanfordalumni.org>.
+ This closes bug #8604.
+
+*mplayer-0.90_pre8 (26 Sep 2002)
+
+ 26 Sep 2002; Kevyn Shortell<trance@gentoo.org> mplayer-0.90_pre8.ebuild :
+ PPC keyword added, tested on ibook 300mhz, worked well.
+
+*mplayer-0.90_pre8 (19 Sep 2002)
+
+ 19 Sep 2002; Martin Schlemmer <azarah@gentoo.org> mplayer-0.90_pre8.ebuild :
+ New bugfix release.
+
+*mplayer-0.90_pre7 (16 Sep 2002)
+
+ 16 Sep 2002; Olivier Reisch <doctomoe@gentoo.org> mplayer-0.90_pre7.ebuild :
+ Removed ppc keyword. Audio does not work at all on PPC.
+
+ 15 Sep 2002; Martin Schlemmer <azarah@gentoo.org> mplayer-0.90_pre7.ebuild :
+ Update version.
+
+*mplayer-0.90_pre6-r3 (12 Aug 2002)
+
+ 16 Sep 2002; Olivier Reisch <doctomoe@gentoo.org> mplayer-0.90_pre6-r3.ebuild :
+ Removed ppc keyword. Audio does not work at all on PPC.
+
+ Sep 11 2002; Mark Guertin <gerk@gentoo.org> mplayer-0.90_pre6-63.ebuild :
+ Adjusted divx4linux as x86 only dep (it supplies x86 binary libs), goes along
+ with bug #7796
+
+ Sep 10 2002, Mark Guertin <gerk@gentoo.org> :
+ adjusted nasm and win32codes to use x86 USE flags (they don't work on
+ anything except x86)
+
+ 12 Aug 2002; Martin Schlemmer <azarah@gentoo.org> mplayer-0.90_pre6-r3.ebuild :
+
+ Add patch to support libdvdnav-0.1.3.
+
+ Fix screwup with new patch.
+
+*mplayer-0.90_pre6-r2 (07 Aug 2002)
+
+ 07 Aug 2002; Martin Schlemmer <azarah@gentoo.org> mplayer-0.90_pre6-r2.ebuild :
+
+ Update DEPEND to block libdvdnav-0.1.3. Change "emake" to "make", as
+ 'make -j' fails in some cases.
+
+*mplayer-0.90_pre6-r1 (07 Aug 2002)
+
+ 07 Aug 2002; Martin Schlemmer <azarah@gentoo.org> mplayer-0.90_pre6-r1.ebuild :
+
+ Fix compile problems if "dvd" not in USE. Added two patches for this:
+
+ mplayer-0.90_pre6-no-dvd.patch
+ mplayer-0.90_pre6-stream-include.patch
+
+*mplayer-0.90_pre6 (06 Aug 2002)
+
+ 06 Aug 2002; Martin Schlemmer <azarah@gentoo.org> mplayer-0.90_pre6.ebuild :
+
+ New version. Patch vidix's Makefile not to fail if it cannot install
+ any drivers. This should resolve bug #5246.
+
+*mplayer-0.90_pre5-r1 (13 Jun 2002)
+
+ 13 Jun 2002; Martin Schlemmer <azarah@gentoo.org> mplayer-0.90_pre5-r1.ebuild :
+
+ Fix missing subtitles for region 4 DVD's, bug #3679, thanks to report
+ from Bernardo S. A. Silva.
+
+*mplayer-0.90_pre5 (10 Jun 2002)
+
+ 10 Jun 2002; Martin Schlemmer <azarah@gentoo.org> mplayer-0.90_pre5.ebuild :
+
+ Version update with a few fixes (vidix install location, #include errors,
+ etc).
+
+*mplayer-0.90_pre4 (21 May 2002)
+
+ 21 May 2002; Martin Schlemmer <azarah@gentoo.org> mplayer-0.90_pre4.ebuild :
+
+ Add new version. Resolves bug #2891. This version seems to fix many
+ of the bugs with previous 0.90_pre versions.
+
+*mplayer-0.90_pre3-r1 (5 May 2002)
+
+ 8 May 2002; Jon Nelson <jnelson@gentoo.org> mplayer-0.90_pre3-r1.ebuild :
+
+ Use new check_KV from portage 1.9.10
+
+ 5 May 2002; Martin Schlemmer <azarah@gentoo.org> mplayer-0.90_pre3-r1.ebuild :
+
+ Fix some compile problems for Gui, thanks to Gwenn Gueguen.
+
+*mplayer-0.90_pre3 (5 May 2002)
+
+*mplayer-0.90_pre2-r2 (5 May 2002)
+
+ 5 May 2002; Martin Schlemmer <azarah@gentoo.org> mplayer-0.90_pre2-r2.ebuild :
+
+ Resolve bug #2386 (hopefully); also fix a vidix problem I and other users
+ on gentoo-user experienced.
+
+*mplayer-0.90_pre2-r1 (1 May 2002)
+
+ 1 May 2002; Martin Schlemmer <azarah@gentoo.org> mplayer-0.90_pre2-r1.ebuild :
+
+ Resolve bug #2284.
+
+*mplayer-0.90_pre2 (30 Apr 2002)
+
+ 26 Apr 2002; William McArthur <sandymac@gentoo.org> mplayer-0.90_pre1.ebuild :
+
+ Commented out a matrox specific patch that seems to be aready in the upstream
+ package.
+
+*mplayer-0.90_pre1 (23 Apr 2002)
+
+*mplayer-0.60-r6 (22 Apr 2002)
+
+ 22 Apr 2002; Seemant Kulleen <seemant@gentoo.org> mplayer-0.60-r6.ebuild :
+
+ Removed directfb flag for now, until next mplayer release. Also, added
+ --disable-runtime-cpudetection for increased performance. First one thanks
+ to naz in #gentoo, second one thanks to
+ dwright@beached.dyndns.org (Darrell Wright) in bug #1967
+
+
+ 18 Apr 2002; Seemant Kulleen <seemant@gentoo.org>
+ fixed a small typo I made in the matrox section
+
+ 17 Apr 2002; Seemant Kulleen <seemant@gentoo.org> mplayer-0.60-r6.ebuild
+ files/digest-mplayer-0.60-r6 :
+
+ Removed -- the old source tarball will be mirrored on ibilio instead.
+
+*mplayer-0.60-r6 (17 Apr 2002)
+
+ 17 Apr 2002; Seemant Kulleen <seemant@gentoo.org> mplayer-0.60-r6.ebuild
+ files/digest-mplayer-0.60-r6 :
+
+ This is an upgrade in a way, because it is now fetching the cvs snapshot
+ from the site. The actual 0.60 sources have been removed from the
+ SRC_URI, and they are replaced with a weekly snapshot. This is fine
+ because it offers much better performance than the old "stable" version.
+
+*mplayer-0.60-r5 (14 Apr 2002)
+
+ 14 Apr 2002; Seemant Kulleen <seemant@gentoo.org> mplayer-0.60-r5.ebuild :
+
+ Cleaned up some of the USE flag checking, and made it more consistent, so
+ that there are no if then fi constructs for USE flags.
+
+*mplayer-0.60-r5 (12 Apr 2002)
+
+ 14 Apr 2002; M.Schlemmer <azarah@gentoo.org> mplayer-0.60-r5 :
+
+ Remove the png USE flag, as the gui depends on libpng. Take --enable-dvdread
+ out of the main ./configure part, as its now done with the dvd use flag.
+ Clean the mmx and X USE flag selection parts up.
+
+*mplayer-0.60-r4 (12 Apr 2002)
+
+ 12 Apr 2002; Seemant Kulleen <seemant@gentoo.org> mplayer-0.60-r4.ebuild :
+
+ Added png USE flag and removed css USE flag for dvd flag instead. And,
+ compile against newest libpng
+
+*mplayer-0.60-r3 (28 Mar 2002)
+
+ 28 Mar 2002; Seemant Kulleen <seemant@gentoo.org> mplayer-0.60-r3.ebuild :
+
+ ogg and vorbis USE flags combined to have oggvorbis USE flag instead.
+
+*mplayer-0.60-r3 (3 March 2002)
+
+ 3 March 2002; M.Schlemmer <azarah@gentoo.org> mplayer-0.60-r3.ebuild :
+
+ Add the DXR3 patch. Update the DEPEND to include libpng if gtk is in USE.
+
+ 25 Feb 2002; M.Schlemmer <azarah@gentoo.org> mplayer-0.60-r2.ebuild :
+
+ Fix the 'fbcon' USE to actually enable fbdev support.
+
+ 17 Feb 2002; M.Schlemmer <azarah@gentoo.org> mplayer-0.60-r2.ebuild :
+
+ Make DVD support default. Changed the USE flag for DVD decription from
+ 'decss' to 'css'. Added 3DFX support with the '3dfx' use variable. Fixed
+ a problem where if 'sse' or '3dnow' was in USE, but now MMX, sound would be
+ distorted .. this should resolve bug #536.
+
+*mplayer-0.60-r1 (1 Feb 2002)
+
+ 1 Feb 2002; G.Bevin <gbevin@gentoo.org> ChangeLog :
+
+ Added initial ChangeLog which should be updated whenever the package is
+ updated in any way. This changelog is targetted to users. This means that the
+ comments should well explained and written in clean English. The details about
+ writing correct changelogs are explained in the skel.ChangeLog file which you
+ can find in the root directory of the portage repository.
diff --git a/media-video/mplayer/Manifest b/media-video/mplayer/Manifest
new file mode 100644
index 0000000..031f00d
--- /dev/null
+++ b/media-video/mplayer/Manifest
@@ -0,0 +1,41 @@
+AUX mplayer-1.0_rc1-asmrules.patch 1450 RMD160 370877b45b314c9deb2d89739f8067a4a77c0844 SHA1 84412f4bd85d64a92586ca4db7e8585d16cd1acd SHA256 3f71e6f4e07940d4d55084d0df12404371bc4e534a3a6b0756ca73e44ddbc3c4
+MD5 f0b71c38b1207c1d604be091876ac051 files/mplayer-1.0_rc1-asmrules.patch 1450
+RMD160 370877b45b314c9deb2d89739f8067a4a77c0844 files/mplayer-1.0_rc1-asmrules.patch 1450
+SHA256 3f71e6f4e07940d4d55084d0df12404371bc4e534a3a6b0756ca73e44ddbc3c4 files/mplayer-1.0_rc1-asmrules.patch 1450
+AUX mplayer-loongson.patch 189025 RMD160 b2d4a8c1c57e1f4389faacb9da92fc2c0dd4b68d SHA1 8a18e5ccd1fa75dc04f70ae0c69a4f0ded8ea538 SHA256 294cf38dcc15e65deb7d7a873967a938ac383638fc4e062dee28a0fd1c4dc9fe
+MD5 bec03003ba53cfc42485d31e6dba86f2 files/mplayer-loongson.patch 189025
+RMD160 b2d4a8c1c57e1f4389faacb9da92fc2c0dd4b68d files/mplayer-loongson.patch 189025
+SHA256 294cf38dcc15e65deb7d7a873967a938ac383638fc4e062dee28a0fd1c4dc9fe files/mplayer-loongson.patch 189025
+AUX mplayer-undefined-reference-fix.patch 316 RMD160 cbbcc1df4e0011f12baffdbae3ec6037123e628e SHA1 63a8b250a9e3e929549f10786000daf5fab9bc3a SHA256 1b7004af914727c1710602dfef3dd2828896f5d4f309c1742ee0dcbd1989b346
+MD5 04bb7e15784fc0b9898526d873bc1ba9 files/mplayer-undefined-reference-fix.patch 316
+RMD160 cbbcc1df4e0011f12baffdbae3ec6037123e628e files/mplayer-undefined-reference-fix.patch 316
+SHA256 1b7004af914727c1710602dfef3dd2828896f5d4f309c1742ee0dcbd1989b346 files/mplayer-undefined-reference-fix.patch 316
+AUX mplayer-xshape.patch 311 RMD160 376c74fd6fc67668dd5b81af68b1c8f429c88b82 SHA1 a2ab09df589243863646c7215fa80b952b5fa0f1 SHA256 b86f955346d7845985dee43a86b4636770260036db600704c9bc236da01e8968
+MD5 d32be26cf3894ce8abaa255071d6daf2 files/mplayer-xshape.patch 311
+RMD160 376c74fd6fc67668dd5b81af68b1c8f429c88b82 files/mplayer-xshape.patch 311
+SHA256 b86f955346d7845985dee43a86b4636770260036db600704c9bc236da01e8968 files/mplayer-xshape.patch 311
+AUX mplayer.desktop 794 RMD160 f7df35bfad6cb8d1eba2f5b2df9ace117c9f2651 SHA1 24f4082fabb0637be4044b467a7f2e6a7b5c821a SHA256 a3763e82f93b008e202bcb38bd48a65de8f4fd954a8e44b847f0a0f3a83b563d
+MD5 995f560631c6874f08bf6cc9ae01fb08 files/mplayer.desktop 794
+RMD160 f7df35bfad6cb8d1eba2f5b2df9ace117c9f2651 files/mplayer.desktop 794
+SHA256 a3763e82f93b008e202bcb38bd48a65de8f4fd954a8e44b847f0a0f3a83b563d files/mplayer.desktop 794
+DIST Blue-1.7.tar.bz2 222567 RMD160 1f8c539ccadc54eea5e6678839bcc8ae1e16e6eb SHA1 45e5ee7a5541a5f1cfd2678a6c9b5911ca473cb9 SHA256 8bcd39a5755c44df778ebca3119c922347abfdadb101dcef011ce2566c1fb1d8
+DIST font-arial-cp1250.tar.bz2 249705 RMD160 a2fc7ae07b0d80936ea58e168e1047efccb9eb91 SHA1 ccf11dce5d0fb72fd3af97f788b7471cd0cd0b68 SHA256 423a07e780bb130cd8e4730715545c5d919c248dda595aab7a0a01de3c83fd12
+DIST font-arial-iso-8859-1.tar.bz2 234242 RMD160 666697cd5efd9387057a898c714175e7c2aacbcd SHA1 152c40bf20de34aa8802d7f80d34d673b0b67212 SHA256 9730f481764f367c9089d0166fb6ccf9148808ffbbfeca635cf0e6db75765d29
+DIST font-arial-iso-8859-2.tar.bz2 222208 RMD160 562d4d92c4f5f3d537340fde3ad8d1495ac41acb SHA1 7b99bbe0e9ba89a57eccbea8f93c453c4f268181 SHA256 71debfc960007c2f6242dfc91e8b1c005b30a99e129aeb00ab8c03f4371b41c1
+DIST mplayer-20070622.tar.bz2 7623148 RMD160 637abb1d9bbe1791b29c2abf3b11f10e0729f912 SHA1 88eb9d20796159cb56ae7fc09739c3ec4a745bdb SHA256 982da74bfb397f77f093650efc254c0bc340dd58f34f7f9d8b8c9f9c8ce11e8e
+DIST svgalib_helper-1.9.17-mplayer.tar.bz2 7234 RMD160 e0c4ae039478732404dd743e250e1061cc9cf0a4 SHA1 d2d596f1ddd283188b2990417d22903c0b466d25 SHA256 016edd27d74b5c66481ddb4563c961fbb579e3a95dd846cc857a639df09999e5
+EBUILD mplayer-1.0.20070622-r3.ebuild 16942 RMD160 272e51cc79d3994e88be4c67f5c9676fb92ca645 SHA1 f55b2eac7fa91e92c5ec39b8892938571ca38812 SHA256 f0b07856ef19e1ec9bb0556b4b8ba4a5910af91ee5ae0b1b433a5747d00f0080
+MD5 c7b0fa6ac40ab1228da6e130e3834af1 mplayer-1.0.20070622-r3.ebuild 16942
+RMD160 272e51cc79d3994e88be4c67f5c9676fb92ca645 mplayer-1.0.20070622-r3.ebuild 16942
+SHA256 f0b07856ef19e1ec9bb0556b4b8ba4a5910af91ee5ae0b1b433a5747d00f0080 mplayer-1.0.20070622-r3.ebuild 16942
+MISC ChangeLog 89219 RMD160 c98e6f441d5170ddebcb76912597d9f622034565 SHA1 e43e869f15e25de7de3df26d38fb281ab41cd1db SHA256 01f1240ffaf68e339ecf57e0a69af8cb81199aa95667923b535fe9694478b986
+MD5 bced02ecbd86991078a7fa7b785cce3c ChangeLog 89219
+RMD160 c98e6f441d5170ddebcb76912597d9f622034565 ChangeLog 89219
+SHA256 01f1240ffaf68e339ecf57e0a69af8cb81199aa95667923b535fe9694478b986 ChangeLog 89219
+MISC metadata.xml 223 RMD160 86b42c49b694db39ddb3fdc60b98a3ad1a0c3392 SHA1 ea8c387229caaf4b0d3c9fbef9143b70dcae0b0d SHA256 dd48e823ec9a151bc3611121402ed26ee24eb3304aa62870b1e875a8fa0ac812
+MD5 0338bfb24d7bfb6450aac4dd025c0096 metadata.xml 223
+RMD160 86b42c49b694db39ddb3fdc60b98a3ad1a0c3392 metadata.xml 223
+SHA256 dd48e823ec9a151bc3611121402ed26ee24eb3304aa62870b1e875a8fa0ac812 metadata.xml 223
+MD5 71513e53545687ad220b9b97aaea402a files/digest-mplayer-1.0.20070622-r3 1265
+RMD160 6e9b1c7a4a8a87c27a2f4bf2352e3b8a497d07f8 files/digest-mplayer-1.0.20070622-r3 1265
+SHA256 ba68c4497c576a22f5fe3fe02460fa6eb5eb04f8a6581e80e8c628b5c3273bd7 files/digest-mplayer-1.0.20070622-r3 1265
diff --git a/media-video/mplayer/files/digest-mplayer-1.0.20070622-r3 b/media-video/mplayer/files/digest-mplayer-1.0.20070622-r3
new file mode 100644
index 0000000..88d8918
--- /dev/null
+++ b/media-video/mplayer/files/digest-mplayer-1.0.20070622-r3
@@ -0,0 +1,14 @@
+MD5 e4e2020d11b681aac898103b3ba723c4 Blue-1.7.tar.bz2 222567
+RMD160 1f8c539ccadc54eea5e6678839bcc8ae1e16e6eb Blue-1.7.tar.bz2 222567
+SHA256 8bcd39a5755c44df778ebca3119c922347abfdadb101dcef011ce2566c1fb1d8 Blue-1.7.tar.bz2 222567
+RMD160 a2fc7ae07b0d80936ea58e168e1047efccb9eb91 font-arial-cp1250.tar.bz2 249705
+SHA256 423a07e780bb130cd8e4730715545c5d919c248dda595aab7a0a01de3c83fd12 font-arial-cp1250.tar.bz2 249705
+RMD160 666697cd5efd9387057a898c714175e7c2aacbcd font-arial-iso-8859-1.tar.bz2 234242
+SHA256 9730f481764f367c9089d0166fb6ccf9148808ffbbfeca635cf0e6db75765d29 font-arial-iso-8859-1.tar.bz2 234242
+RMD160 562d4d92c4f5f3d537340fde3ad8d1495ac41acb font-arial-iso-8859-2.tar.bz2 222208
+SHA256 71debfc960007c2f6242dfc91e8b1c005b30a99e129aeb00ab8c03f4371b41c1 font-arial-iso-8859-2.tar.bz2 222208
+MD5 a43c125563b07210e65c244af6c16604 mplayer-20070622.tar.bz2 7623148
+RMD160 637abb1d9bbe1791b29c2abf3b11f10e0729f912 mplayer-20070622.tar.bz2 7623148
+SHA256 982da74bfb397f77f093650efc254c0bc340dd58f34f7f9d8b8c9f9c8ce11e8e mplayer-20070622.tar.bz2 7623148
+RMD160 e0c4ae039478732404dd743e250e1061cc9cf0a4 svgalib_helper-1.9.17-mplayer.tar.bz2 7234
+SHA256 016edd27d74b5c66481ddb4563c961fbb579e3a95dd846cc857a639df09999e5 svgalib_helper-1.9.17-mplayer.tar.bz2 7234
diff --git a/media-video/mplayer/files/mplayer-1.0_rc1-asmrules.patch b/media-video/mplayer/files/mplayer-1.0_rc1-asmrules.patch
new file mode 100644
index 0000000..87bab25
--- /dev/null
+++ b/media-video/mplayer/files/mplayer-1.0_rc1-asmrules.patch
@@ -0,0 +1,51 @@
+Index: stream/realrtsp/asmrp.c
+===================================================================
+--- stream/realrtsp/asmrp.c (revision 20381)
++++ stream/realrtsp/asmrp.c (working copy)
+@@ -40,6 +40,7 @@
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include <string.h>
++#include "asmrp.h"
+
+ /*
+ #define LOG
+@@ -645,8 +646,10 @@
+ #ifdef LOG
+ printf ("rule #%d is true\n", rule_num);
+ #endif
+- matches[num_matches] = rule_num;
+- num_matches++;
++ if(num_matches < MAX_RULEMATCHES - 1)
++ matches[num_matches++] = rule_num;
++ else
++ printf("Ignoring matched asm rule %d, too many matched rules.\n", rule_num);
+ }
+
+ rule_num++;
+Index: stream/realrtsp/real.c
+===================================================================
+--- stream/realrtsp/real.c (revision 20381)
++++ stream/realrtsp/real.c (working copy)
+@@ -271,7 +271,7 @@
+ int j=0;
+ int n;
+ char b[64];
+- int rulematches[16];
++ int rulematches[MAX_RULEMATCHES];
+
+ #ifdef LOG
+ printf("calling asmrp_match with:\n%s\n%u\n", desc->stream[i]->asm_rule_book, bandwidth);
+Index: stream/realrtsp/asmrp.h
+===================================================================
+--- stream/realrtsp/asmrp.h (revision 20381)
++++ stream/realrtsp/asmrp.h (working copy)
+@@ -40,6 +40,8 @@
+ #ifndef HAVE_ASMRP_H
+ #define HAVE_ASMRP_H
+
++#define MAX_RULEMATCHES 16
++
+ int asmrp_match (const char *rules, int bandwidth, int *matches) ;
+
+ #endif
diff --git a/media-video/mplayer/files/mplayer-loongson.patch b/media-video/mplayer/files/mplayer-loongson.patch
new file mode 100644
index 0000000..984f10d
--- /dev/null
+++ b/media-video/mplayer/files/mplayer-loongson.patch
@@ -0,0 +1,6573 @@
+diff -urN mplayer-20070622.orig/libavcodec/dsputil.c mplayer-20070622/libavcodec/dsputil.c
+--- mplayer-20070622.orig/libavcodec/dsputil.c 2007-06-16 19:44:57.000000000 +0800
++++ mplayer-20070622/libavcodec/dsputil.c 2007-08-04 07:18:20.000000000 +0800
+@@ -33,7 +33,7 @@
+ #include "simple_idct.h"
+ #include "faandct.h"
+ #include "snow.h"
+-
++#include "idct.h"
+ /* snow.c */
+ void ff_spatial_dwt(int *buffer, int width, int height, int stride, int type, int decomposition_count);
+
+@@ -3753,12 +3753,14 @@
+ converted */
+ static void ff_jref_idct_put(uint8_t *dest, int line_size, DCTELEM *block)
+ {
+- j_rev_dct (block);
+- put_pixels_clamped_c(block, dest, line_size);
++// j_rev_dct (block);
++ ff_godson2c_idct(block);
++ put_pixels_clamped_c(block, dest, line_size);
+ }
+ static void ff_jref_idct_add(uint8_t *dest, int line_size, DCTELEM *block)
+ {
+- j_rev_dct (block);
++// j_rev_dct (block);
++ ff_godson2c_idct(block);
+ add_pixels_clamped_c(block, dest, line_size);
+ }
+
+@@ -3865,7 +3867,8 @@
+ c->idct_put= ff_h264_lowres_idct_put_c;
+ c->idct_add= ff_h264_lowres_idct_add_c;
+ }
+- c->idct = j_rev_dct4;
++ // c->idct = j_rev_dct4;
++ c->idct = ff_godson2c_idct;
+ c->idct_permutation_type= FF_NO_IDCT_PERM;
+ }else if(avctx->lowres==2){
+ c->idct_put= ff_jref_idct2_put;
+diff -urN mplayer-20070622.orig/libavcodec/faaccfg.h mplayer-20070622/libavcodec/faaccfg.h
+--- mplayer-20070622.orig/libavcodec/faaccfg.h 1970-01-01 08:00:00.000000000 +0800
++++ mplayer-20070622/libavcodec/faaccfg.h 2007-08-04 07:23:17.000000000 +0800
+@@ -0,0 +1,122 @@
++/*
++ * FAAC - Freeware Advanced Audio Coder
++ * Copyright (C) 2001 Menno Bakker
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ *
++ * $Id: faaccfg.h,v 1.2 2003/10/29 10:31:24 stux Exp $
++ */
++
++#ifndef _FAACCFG_H_
++#define _FAACCFG_H_
++
++#define FAAC_CFG_VERSION 104
++
++/* MPEG ID's */
++#define MPEG2 1
++#define MPEG4 0
++
++/* AAC object types */
++#define MAIN 0
++#define LOW 1
++#define SSR 2
++#define LTP 3
++
++/* Input Formats */
++#define FAAC_INPUT_NULL 0
++#define FAAC_INPUT_16BIT 1
++#define FAAC_INPUT_24BIT 2
++#define FAAC_INPUT_32BIT 3
++#define FAAC_INPUT_FLOAT 4
++
++#define SHORTCTL_NORMAL 0
++#define SHORTCTL_NOSHORT 1
++#define SHORTCTL_NOLONG 2
++
++#pragma pack(push, 1)
++typedef struct faacEncConfiguration
++{
++ /* config version */
++ int version;
++
++ /* library version */
++ char *name;
++
++ /* copyright string */
++ char *copyright;
++
++ /* MPEG version, 2 or 4 */
++ unsigned int mpegVersion;
++
++ /* AAC object type */
++ unsigned int aacObjectType;
++
++ /* Allow mid/side coding */
++ unsigned int allowMidside;
++
++ /* Use one of the channels as LFE channel */
++ unsigned int useLfe;
++
++ /* Use Temporal Noise Shaping */
++ unsigned int useTns;
++
++ /* bitrate / channel of AAC file */
++ unsigned long bitRate;
++
++ /* AAC file frequency bandwidth */
++ unsigned int bandWidth;
++
++ /* Quantizer quality */
++ unsigned long quantqual;
++
++ /* Bitstream output format (0 = Raw; 1 = ADTS) */
++ unsigned int outputFormat;
++
++ /* psychoacoustic model list */
++ psymodellist_t *psymodellist;
++
++ /* selected index in psymodellist */
++ unsigned int psymodelidx;
++
++ /*
++ PCM Sample Input Format
++ 0 FAAC_INPUT_NULL invalid, signifies a misconfigured config
++ 1 FAAC_INPUT_16BIT native endian 16bit
++ 2 FAAC_INPUT_24BIT native endian 24bit in 24 bits (not implemented)
++ 3 FAAC_INPUT_32BIT native endian 24bit in 32 bits (DEFAULT)
++ 4 FAAC_INPUT_FLOAT 32bit floating point
++ */
++ unsigned int inputFormat;
++
++ /* block type enforcing (SHORTCTL_NORMAL/SHORTCTL_NOSHORT/SHORTCTL_NOLONG) */
++ int shortctl;
++
++ /*
++ Channel Remapping
++
++ Default 0, 1, 2, 3 ... 63 (64 is MAX_CHANNELS in coder.h)
++
++ WAVE 4.0 2, 0, 1, 3
++ WAVE 5.0 2, 0, 1, 3, 4
++ WAVE 5.1 2, 0, 1, 4, 5, 3
++ AIFF 5.1 2, 0, 3, 1, 4, 5
++ */
++ int channel_map[64];
++
++} faacEncConfiguration, *faacEncConfigurationPtr;
++
++#pragma pack(pop)
++
++#endif /* _FAACCFG_H_ */
+diff -urN mplayer-20070622.orig/libavcodec/faac.h mplayer-20070622/libavcodec/faac.h
+--- mplayer-20070622.orig/libavcodec/faac.h 1970-01-01 08:00:00.000000000 +0800
++++ mplayer-20070622/libavcodec/faac.h 2007-08-04 07:23:17.000000000 +0800
+@@ -0,0 +1,95 @@
++/*
++ * FAAC - Freeware Advanced Audio Coder
++ * Copyright (C) 2001 Menno Bakker
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ *
++ * $Id: faac.h,v 1.32 2003/11/24 18:10:32 knik Exp $
++ */
++
++#ifndef _FAAC_H_
++#define _FAAC_H_
++
++#ifdef __cplusplus
++extern "C" {
++#endif /* __cplusplus */
++
++#ifdef WIN32
++# ifndef FAACAPI
++# define FAACAPI __stdcall
++# endif
++#else
++# ifndef FAACAPI
++# define FAACAPI
++# endif
++#endif
++
++#pragma pack(push, 1)
++
++typedef struct {
++ void *ptr;
++ char *name;
++}
++psymodellist_t;
++
++#include "faaccfg.h"
++
++
++typedef void *faacEncHandle;
++
++/*
++ Allows an application to get FAAC version info. This is intended
++ purely for informative purposes.
++
++ Returns FAAC_CFG_VERSION.
++*/
++int FAACAPI faacEncGetVersion(char **faac_id_string,
++ char **faac_copyright_string);
++
++
++faacEncConfigurationPtr FAACAPI
++ faacEncGetCurrentConfiguration(faacEncHandle hEncoder);
++
++
++int FAACAPI faacEncSetConfiguration(faacEncHandle hEncoder,
++ faacEncConfigurationPtr config);
++
++
++faacEncHandle FAACAPI faacEncOpen(unsigned long sampleRate,
++ unsigned int numChannels,
++ unsigned long *inputSamples,
++ unsigned long *maxOutputBytes);
++
++
++int FAACAPI faacEncGetDecoderSpecificInfo(faacEncHandle hEncoder, unsigned char **ppBuffer,
++ unsigned long *pSizeOfDecoderSpecificInfo);
++
++
++int FAACAPI faacEncEncode(faacEncHandle hEncoder, int32_t * inputBuffer, unsigned int samplesInput,
++ unsigned char *outputBuffer,
++ unsigned int bufferSize);
++
++
++int FAACAPI faacEncClose(faacEncHandle hEncoder);
++
++
++
++#pragma pack(pop)
++
++#ifdef __cplusplus
++}
++#endif /* __cplusplus */
++
++#endif /* _FAAC_H_ */
+diff -urN mplayer-20070622.orig/libavcodec/idct.c mplayer-20070622/libavcodec/idct.c
+--- mplayer-20070622.orig/libavcodec/idct.c 1970-01-01 08:00:00.000000000 +0800
++++ mplayer-20070622/libavcodec/idct.c 2007-08-04 07:23:17.000000000 +0800
+@@ -0,0 +1,798 @@
++/*
++ * idct_mmx.c
++ * Copyright (C) 2000-2003 Michel Lespinasse <walken@zoy.org>
++ * Copyright (C) 1999-2000 Aaron Holtzman <aholtzma@ess.engr.uvic.ca>
++ *
++ * This file is part of mpeg2dec, a free MPEG-2 video stream decoder.
++ * See http://libmpeg2.sourceforge.net/ for updates.
++ *
++ * mpeg2dec is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2 of the License, or
++ * (at your option) any later version.
++ *
++ * mpeg2dec is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ */
++/*
++#include "config.h"
++
++
++#include <inttypes.h>
++
++#include "mpeg2.h"
++#include "attributes.h"
++#include "mpeg2_internal.h"*/
++#include "common.h"
++#include "dsputil.h"
++#include "idct.h"
++//#include "mmx.h"
++
++
++#define ATTR_ALIGN(align) __attribute__ ((__aligned__ (align)))
++
++
++#define ROW_SHIFT 11
++#define COL_SHIFT 6
++
++#define round(bias) ((int)(((bias)+0.5) * (1<<ROW_SHIFT)))
++#define rounder(bias) {round (bias), round (bias)}
++
++/* idct main entry point */
++//void (* mpeg2_idct_copy) (int16_t * block, uint8_t * dest, int stride);
++//void (* mpeg2_idct_add) (int last, int16_t * block,
++// uint8_t * dest, int stride);
++
++//int flag=0;
++//int flag_block_copy=8;
++//int flag_block_add_DC=8;
++#if 0
++/* C row IDCT - its just here to document the MMXEXT and MMX versions */
++static inline void idct_row (int16_t * row, int offset,
++ int16_t * table, int32_t * rounder)
++{
++ int C1, C2, C3, C4, C5, C6, C7;
++ int a0, a1, a2, a3, b0, b1, b2, b3;
++
++ row += offset;
++
++ C1 = table[1];
++ C2 = table[2];
++ C3 = table[3];
++ C4 = table[4];
++ C5 = table[5];
++ C6 = table[6];
++ C7 = table[7];
++
++ a0 = C4*row[0] + C2*row[2] + C4*row[4] + C6*row[6] + *rounder;
++ a1 = C4*row[0] + C6*row[2] - C4*row[4] - C2*row[6] + *rounder;
++ a2 = C4*row[0] - C6*row[2] - C4*row[4] + C2*row[6] + *rounder;
++ a3 = C4*row[0] - C2*row[2] + C4*row[4] - C6*row[6] + *rounder;
++
++ b0 = C1*row[1] + C3*row[3] + C5*row[5] + C7*row[7];
++ b1 = C3*row[1] - C7*row[3] - C1*row[5] - C5*row[7];
++ b2 = C5*row[1] - C1*row[3] + C7*row[5] + C3*row[7];
++ b3 = C7*row[1] - C5*row[3] + C3*row[5] - C1*row[7];
++
++ row[0] = (a0 + b0) >> ROW_SHIFT;
++ row[1] = (a1 + b1) >> ROW_SHIFT;
++ row[2] = (a2 + b2) >> ROW_SHIFT;
++ row[3] = (a3 + b3) >> ROW_SHIFT;
++ row[4] = (a3 - b3) >> ROW_SHIFT;
++ row[5] = (a2 - b2) >> ROW_SHIFT;
++ row[6] = (a1 - b1) >> ROW_SHIFT;
++ row[7] = (a0 - b0) >> ROW_SHIFT;
++}
++#endif
++
++
++#define godson2c_table(c1,c2,c3,c4,c5,c6,c7) { c4,c2,-c4,-c2, \
++ c4,c6,c4,c6, \
++ c1,c3,-c1,-c5,\
++ c5,c7,c3,-c7, \
++ c4,-c6,c4,-c6, \
++ -c4,c2,c4,-c2, \
++ c5,-c1,c3,-c1, \
++ c7,c3,c7,-c5 }
++
++
++
++/*static inline void godson2c_row_head(int16_t * const row, const int offset,
++ const int16_t * const table)
++{
++ asm(".set\tmips3"::);
++ asm("ldc1 $f6,%0;"::"m"(*(row+offset)));
++ asm("ldc1 $f14,%0;"::"m"(*(row+offset+4)));
++ asm("mov.d $f4,$f6;");
++ asm("ldc1 $f2,%0;"::"m"(*table));
++ asm("mov.d $f10,$f14;");
++ asm("ldc1 $f8,%0;"::"m"(*(table+4)));
++ asm("pmaddhw $f2,$f2,$f4;");
++ asm("dli $12,%0;"::"i"(0x4e));
++ asm("dmtc1 $12,$f16;");
++ asm("pshufh $f6,$f6,$f16;");
++ asm(".set\tmips2"::);
++}*/
++
++static inline void godson2c_row_head(int16_t * const row, const int offset,
++ const int16_t * const table)
++{
++ __asm__ volatile(
++ ".set\tmips3\n"
++ ".set noreorder\n"
++ "ldc1 $f6,%0\n"
++ "ldc1 $f14,%1\n"
++ "ldc1 $f2,%2\n"
++ "ldc1 $f8,%3\n"
++ "dli $12,%4\n"
++ "dmtc1 $12,$f16\n"
++ "mov.d $f4,$f6\n"
++ "mov.d $f10,$f14\n"
++ "pmaddhw $f2,$f2,$f4\n"
++ "pshufh $f6,$f6,$f16\n"
++ ".set reorder\n"
++ ".set\tmips0\n"
++ :
++ :"m"(*(row+offset)),"m"(*(row+offset+4)),"m"(*table),"m"(*(table+4)),"i"(0x4e)
++ :"$f2","$f4","$f6","$f8","$f10","$f14","$f16","$12"
++ );
++ #if 0
++ asm(".set\tmips3"::);
++ asm("ldc1 $f6,%0;"::"m"(*(row+offset)));
++ asm("ldc1 $f14,%0;"::"m"(*(row+offset+4)));
++ asm("ldc1 $f2,%0;"::"m"(*table));
++ asm("ldc1 $f8,%0;"::"m"(*(table+4)));
++ asm("dli $12,%0;"::"i"(0x4e));
++ asm("dmtc1 $12,$f16;");
++ asm("mov.d $f4,$f6;");
++ asm("mov.d $f10,$f14;");
++ asm("pmaddhw $f2,$f2,$f4;");
++ asm("pshufh $f6,$f6,$f16;");
++ asm(".set\tmips2"::);
++ #endif
++}
++
++/*static inline void godson2c_row(const int16_t * const table,
++ const int32_t * const rounder)
++{
++ asm(".set\tmips3"::);
++ asm("ldc1 $f0,%0;"::"m"(*(table+8)));
++ asm("pmaddhw $f8,$f8,$f6;");
++ asm("ldc1 $f16,%0;"::"m"(*(table+16)));
++ asm("pmaddhw $f4,$f4,$f16;");
++ asm("dli $13,%0;"::"i"(0x4e));
++ asm("dmtc1 $13,$f16;");
++ asm("pshufh $f10,$f10,$f16;");
++ asm("ldc1 $f20,%0;"::"m"(*(table+12)));
++ asm("pmaddhw $f0,$f0,$f14;");
++ asm("ldc1 $f22,%0;"::"m"(*rounder));
++ asm("paddw $f2,$f2,$f22;");
++ asm("pmaddhw $f20,$f20,$f10;");
++ asm("ldc1 $f16,%0;"::"m"(*(table+20)));
++ asm("pmaddhw $f6,$f6,$f16;");
++ asm("paddw $f2,$f2,$f8;");
++ asm("ldc1 $f22,%0;"::"m"(*(table+24)));
++ asm("pmaddhw $f14,$f14,$f22;");
++ asm("mov.d $f8,$f2;");
++ asm("ldc1 $f16,%0;"::"m"(*(table+28)));
++ asm("pmaddhw $f10,$f10,$f16;");
++ asm("paddw $f0,$f0,$f20;");
++ asm("ldc1 $f22,%0;"::"m"(*rounder));
++ asm("paddw $f4,$f4,$f22;");
++ asm("psubw $f2,$f2,$f0;");
++ asm("dli $12,%0;"::"i"(ROW_SHIFT));
++ asm("dmtc1 $12,$f16;");
++ asm("psraw $f2,$f2,$f16;");
++ asm("paddw $f0,$f0,$f8;");
++ asm("paddw $f4,$f4,$f6;");
++
++ asm("psraw $f0,$f0,$f16;");
++ asm("paddw $f14,$f14,$f10;");
++
++ asm("mov.d $f8,$f4;");
++ asm("paddw $f4,$f4,$f14;");
++ asm("psubw $f8,$f8,$f14;");
++ asm(".set\tmips2"::);
++}*/
++
++
++static inline void godson2c_row(const int16_t * const table,
++ const int32_t * const rounder)
++{
++ __asm__ volatile (
++ ".set\tmips3\n"
++ ".set\tnoreorder\n"
++ "ldc1 $f0,%0\n"
++ "pmaddhw $f8,$f8,$f6\n"
++ "ldc1 $f16,%1\n"
++ "dli $13,%8\n"
++ "ldc1 $f20,%2\n"
++ "pmaddhw $f0,$f0,$f14\n"
++ "ldc1 $f22,%3\n"
++ "pmaddhw $f4,$f4,$f16\n"
++ "paddw $f2,$f2,$f22\n"
++ "ldc1 $f22,%4\n"
++ "dmtc1 $13,$f16\n"
++ "paddw $f2,$f2,$f8\n"
++ "pmaddhw $f14,$f14,$f22\n"
++ "mov.d $f8,$f2\n"
++ "pshufh $f10,$f10,$f16\n"
++ "ldc1 $f22,%3\n"
++ "pmaddhw $f20,$f20,$f10\n"
++ "ldc1 $f16,%5\n"
++ "paddw $f4,$f4,$f22\n"
++ "paddw $f0,$f0,$f20\n"
++ "dli $12,%6\n"
++ "pmaddhw $f6,$f6,$f16\n"
++ "psubw $f2,$f2,$f0\n"
++ "ldc1 $f16,%7\n"
++ "paddw $f0,$f0,$f8\n"
++ "paddw $f4,$f4,$f6\n"
++ "pmaddhw $f10,$f10,$f16\n"
++ "mov.d $f8,$f4\n"
++ "dmtc1 $12,$f16\n"
++ "paddw $f14,$f14,$f10\n"
++ "psraw $f2,$f2,$f16\n"
++ "psraw $f0,$f0,$f16\n"
++ "paddw $f4,$f4,$f14\n"
++ "psubw $f8,$f8,$f14\n"
++ ".set\treorder\n"
++ ".set\tmips0\n"
++ :
++ :"m"(*(table+8)),"m"(*(table+16)),"m"(*(table+12)),"m"(*rounder),"m"(*(table+24)),"m"(*(table+20)),"i"(ROW_SHIFT),"m"(*(table+28)),"i"(0x4e)
++ :"$f0","$f2","$f4","$f6","$f8","$f10","$f14","$f16","$f20","$f22","$12","$13","memory"
++ );
++}
++
++static inline void godson2c_row_tail(int16_t * const row, const int store)
++{
++ __asm__ volatile (
++ ".set\tmips3\n"
++ ".set\tnoreorder\n"
++ "dli $12,%2\n"
++ "dmtc1 $12,$f16\n"
++ "psraw $f4,$f4,$f16\n"
++ "psraw $f8,$f8,$f16\n"
++ "packsswh $f0,$f0,$f4\n"
++ "packsswh $f8,$f8,$f2\n"
++ "sdc1 $f0,%0\n"
++ "dli $13,%3\n"
++ "dmtc1 $13,$f22\n"
++ "pshufh $f8,$f8,$f22\n"
++ "sdc1 $f8,%1\n"
++ ".set\treorder\n"
++ ".set\tmips0\n"
++ :"=m"(*(row+store)),"=m"(*(row+store+4))
++ :"i"(ROW_SHIFT),"i"(0xb1)
++ :"$f0","$f2","$f4","$f6","$f8","$f16","$f22","$12","$13","memory"
++ );
++}
++
++static inline void godson2c_row_mid(int16_t * const row, const int store,
++ const int offset,
++ const int16_t * const table)
++{
++ __asm__ volatile (
++ ".set\tmips3\n"
++ ".set\tnoreorder\n"
++ "ldc1 $f6,%2\n"
++ "dli $12,%3\n"
++ "dmtc1 $12,$f16\n"
++ "psraw $f4,$f4,$f16\n"
++ "ldc1 $f14,%4\n"
++ "psraw $f8,$f8,$f16\n"
++ "packsswh $f0,$f0,$f4\n"
++ "mov.d $f10,$f14\n"
++ "packsswh $f8,$f8,$f2\n"
++ "mov.d $f4,$f6\n"
++ "sdc1 $f0,%0\n"
++ "dli $13,%5\n"
++ "dmtc1 $13,$f22\n"
++ "pshufh $f8,$f8,$f22\n"
++ "ldc1 $f2,%6\n"
++ "sdc1 $f8,%1\n"
++ "pmaddhw $f2,$f2,$f4\n"
++ "ldc1 $f8,%7\n"
++ "dli $12,%8\n"
++ "dmtc1 $12,$f16\n"
++ "pshufh $f6,$f6,$f16\n"
++ ".set\treorder\n"
++ ".set\tmips0\n"
++ :"=m"(*(row+store)),"=m"(*(row+store+4))
++ : "m"(*(row+offset)),"i"(ROW_SHIFT),"m"(*(row+offset+4)),"i"(0xb1),"m"(*table),"m"(*(table+4)),"i"(0x4e)
++ :"$f0","$f2","$f4","$f6","$f8","$f10","$14","$f16","$f22","$12","$13","memory"
++ );
++}
++
++static inline void idct_col(int16_t * const col, const int offset)
++{
++#define T1 13036
++#define T2 27146
++#define T3 43790
++#define C4 23170
++ static const short _T1[] ATTR_ALIGN(8) = {T1,T1,T1,T1};
++ static const short _T2[] ATTR_ALIGN(8) = {T2,T2,T2,T2};
++ static const short _T3[] ATTR_ALIGN(8) = {T3,T3,T3,T3};
++ static const short _C4[] ATTR_ALIGN(8) = {C4,C4,C4,C4};
++
++ __asm__ volatile (
++ ".set\tmips3\n"
++ ".set\tnoreorder\n"
++ "ldc1 $f4,%8\n"
++ "ldc1 $f0,%9\n"
++ "mov.d $f6,$f4\n"
++ "ldc1 $f8,%10\n"
++ "pmulhh $f4,$f4,$f0\n"
++ "ldc1 $f14,%11\n"
++ "pmulhh $f6,$f6,$f8\n"
++ "ldc1 $f10,%12\n"
++ "mov.d $f20,$f14\n"
++ "ldc1 $f2,%13\n"
++ "psubsh $f4,$f4,$f8\n"
++ "ldc1 $f8,%14\n"
++ "pmulhh $f14,$f14,$f2\n"
++ "paddsh $f0,$f0,$f6\n"
++ "pmulhh $f20,$f20,$f10\n"
++ "mov.d $f6,$f8\n"
++ "paddsh $f14,$f14,$f2\n"
++ "ldc1 $f16,%15\n"
++ "pmulhh $f8,$f8,$f16\n"
++ "paddsh $f20,$f20,$f10\n"
++ "psubsh $f14,$f14,$f10\n"
++ "paddsh $f20,$f20,$f2\n"
++ "ldc1 $f2,%16\n"
++ "mov.d $f10,$f4\n"
++ "pmulhh $f6,$f6,$f2\n"
++ "psubsh $f4,$f4,$f14\n"
++ "psubsh $f8,$f8,$f2\n"
++ "paddsh $f14,$f14,$f10\n"
++ "sdc1 $f4,%0\n"
++ "mov.d $f10,$f0\n"
++ "ldc1 $f22,%15\n"
++ "paddsh $f6,$f6,$f22\n"
++ "paddsh $f10,$f10,$f20\n"
++ "psubsh $f0,$f0,$f20\n"
++ "mov.d $f20,$f0\n"
++ "ldc1 $f2,%17\n"
++ "paddsh $f0,$f0,$f14\n"
++ "ldc1 $f4,%18\n"
++ "psubsh $f20,$f20,$f14\n"
++ "sdc1 $f10,%1\n"
++ "pmulhh $f0,$f0,$f4\n"
++ "mov.d $f10,$f8\n"
++ "pmulhh $f20,$f20,$f4\n"
++ "ldc1 $f14,%19\n"
++ "mov.d $f4,$f2\n"
++ "psubsh $f2,$f2,$f14\n"
++ "paddsh $f4,$f4,$f14\n"
++ "paddsh $f8,$f8,$f2\n"
++ "mov.d $f14,$f4\n"
++ "psubsh $f2,$f2,$f10\n"
++ "paddsh $f14,$f14,$f6\n"
++ "paddsh $f0,$f0,$f0\n"
++ "psubsh $f4,$f4,$f6\n"
++ "paddsh $f20,$f20,$f20\n"
++ "mov.d $f6,$f2\n"
++ "mov.d $f10,$f8\n"
++ "paddsh $f2,$f2,$f20\n"
++ "dli $12,%20\n"
++ "dmtc1 $12,$f16\n"
++ "psrah $f2,$f2,$f16\n"
++ "paddsh $f8,$f8,$f0\n"
++ "psrah $f8,$f8,$f16\n"
++ "psubsh $f10,$f10,$f0\n"
++ "ldc1 $f0,%12\n"
++ "psubsh $f6,$f6,$f20\n"
++ "psrah $f10,$f10,$f16\n"
++ "mov.d $f20,$f14\n"
++ "sdc1 $f8,%2\n"
++ "psrah $f6,$f6,$f16\n"
++ "sdc1 $f2,%3\n"
++ "paddsh $f14,$f14,$f0\n"
++ "ldc1 $f8,%13\n"
++ "psubsh $f20,$f20,$f0\n"
++ "psrah $f14,$f14,$f16\n"
++ "mov.d $f2,$f4\n"
++ "sdc1 $f6,%1\n"
++ "psubsh $f2,$f2,$f8\n"
++ "psrah $f20,$f20,$f16\n"
++ "paddsh $f8,$f8,$f4\n"
++ "sdc1 $f14,%4\n"
++ "psrah $f2,$f2,$f16\n"
++ "sdc1 $f10,%5\n"
++ "psrah $f8,$f8,$f16\n"
++ "sdc1 $f20,%6\n"
++ "sdc1 $f2,%7\n"
++ "sdc1 $f8,%0\n"
++ ".set\treorder\n"
++ ".set\tmips0\n"
++ :"=m"(*(col+offset+3*8)),"=m"(*(col+offset+5*8)),"=m"(*(col+offset+1*8)),"=m"(*(col+offset+2*8)),"=m"(*(col+offset+0*8)),"=m"(*(col+offset+6*8)),"=m"(*(col+offset+7*8)),"=m"(*(col+offset+4*8))
++ :"m"(*_T1),"m"(*(col+offset+1*8)),"m"(*(col+offset+7*8)),"m"(*_T3),"m"(*(col+offset+5*8)),"m"(*(col+offset+3*8)),"m"(*_T2),"m"(*(col+offset+2*8)),"m"(*(col+offset+6*8)),"m"(*(col+offset+0*8)),"m"(*_C4),"m"(*(col+offset+4*8)),"i"(COL_SHIFT)
++ :"$f0","$f2","$f4","$f6","$f8","$f10","$14","$f16","$20","$f22","$12","memory"
++ );
++}
++
++#if 0
++/* C column IDCT - its just here to document the MMXEXT and MMX versions */
++static inline void idct_col (int16_t * col, int offset)
++{
++/* multiplication - as implemented on mmx */
++#define F(c,x) (((c) * (x)) >> 16)
++
++/* saturation - it helps us handle torture test cases */
++#define S(x) (((x)>32767) ? 32767 : ((x)<-32768) ? -32768 : (x))
++
++ int16_t x0, x1, x2, x3, x4, x5, x6, x7;
++ int16_t y0, y1, y2, y3, y4, y5, y6, y7;
++ int16_t a0, a1, a2, a3, b0, b1, b2, b3;
++ int16_t u04, v04, u26, v26, u17, v17, u35, v35, u12, v12;
++
++ col += offset;
++
++ x0 = col[0*8];
++ x1 = col[1*8];
++ x2 = col[2*8];
++ x3 = col[3*8];
++ x4 = col[4*8];
++ x5 = col[5*8];
++ x6 = col[6*8];
++ x7 = col[7*8];
++
++ u04 = S (x0 + x4);
++ v04 = S (x0 - x4);
++ u26 = S (F (T2, x6) + x2);
++ v26 = S (F (T2, x2) - x6);
++
++ a0 = S (u04 + u26);
++ a1 = S (v04 + v26);
++ a2 = S (v04 - v26);
++ a3 = S (u04 - u26);
++
++ u17 = S (F (T1, x7) + x1);
++ v17 = S (F (T1, x1) - x7);
++ u35 = S (F (T3, x5) + x3);
++ v35 = S (F (T3, x3) - x5);
++
++ b0 = S (u17 + u35);
++ b3 = S (v17 - v35);
++ u12 = S (u17 - u35);
++ v12 = S (v17 + v35);
++ u12 = S (2 * F (C4, u12));
++ v12 = S (2 * F (C4, v12));
++ b1 = S (u12 + v12);
++ b2 = S (u12 - v12);
++
++ y0 = S (a0 + b0) >> COL_SHIFT;
++ y1 = S (a1 + b1) >> COL_SHIFT;
++ y2 = S (a2 + b2) >> COL_SHIFT;
++ y3 = S (a3 + b3) >> COL_SHIFT;
++
++ y4 = S (a3 - b3) >> COL_SHIFT;
++ y5 = S (a2 - b2) >> COL_SHIFT;
++ y6 = S (a1 - b1) >> COL_SHIFT;
++ y7 = S (a0 - b0) >> COL_SHIFT;
++
++ col[0*8] = y0;
++ col[1*8] = y1;
++ col[2*8] = y2;
++ col[3*8] = y3;
++ col[4*8] = y4;
++ col[5*8] = y5;
++ col[6*8] = y6;
++ col[7*8] = y7;
++}
++#endif
++
++
++
++
++static const int32_t rounder0[] ATTR_ALIGN(8) =
++ rounder ((1 << (COL_SHIFT - 1)) - 0.5);
++static const int32_t rounder4[] ATTR_ALIGN(8) = rounder (0);
++static const int32_t rounder1[] ATTR_ALIGN(8) =
++ rounder (1.25683487303); /* C1*(C1/C4+C1+C7)/2 */
++static const int32_t rounder7[] ATTR_ALIGN(8) =
++ rounder (-0.25); /* C1*(C7/C4+C7-C1)/2 */
++static const int32_t rounder2[] ATTR_ALIGN(8) =
++ rounder (0.60355339059); /* C2 * (C6+C2)/2 */
++static const int32_t rounder6[] ATTR_ALIGN(8) =
++ rounder (-0.25); /* C2 * (C6-C2)/2 */
++static const int32_t rounder3[] ATTR_ALIGN(8) =
++ rounder (0.087788325588); /* C3*(-C3/C4+C3+C5)/2 */
++static const int32_t rounder5[] ATTR_ALIGN(8) =
++ rounder (-0.441341716183); /* C3*(-C5/C4+C5-C3)/2 */
++
++
++#undef COL_SHIFT
++#undef ROW_SHIFT
++
++
++#define declare_idct(idct,table,idct_row_head,idct_row,idct_row_tail,idct_row_mid) \
++inline void idct (int16_t * const block) \
++{ \
++ static const int16_t table04[] ATTR_ALIGN(16) = \
++ table (22725, 21407, 19266, 16384, 12873, 8867, 4520); \
++ static const int16_t table17[] ATTR_ALIGN(16) = \
++ table (31521, 29692, 26722, 22725, 17855, 12299, 6270); \
++ static const int16_t table26[] ATTR_ALIGN(16) = \
++ table (29692, 27969, 25172, 21407, 16819, 11585, 5906); \
++ static const int16_t table35[] ATTR_ALIGN(16) = \
++ table (26722, 25172, 22654, 19266, 15137, 10426, 5315); \
++ \
++ idct_row_head (block, 0*8, table04); \
++ idct_row (table04, rounder0); \
++ idct_row_mid (block, 0*8, 4*8, table04); \
++ idct_row (table04, rounder4); \
++ idct_row_mid (block, 4*8, 1*8, table17); \
++ idct_row (table17, rounder1); \
++ idct_row_mid (block, 1*8, 7*8, table17); \
++ idct_row (table17, rounder7); \
++ idct_row_mid (block, 7*8, 2*8, table26); \
++ idct_row (table26, rounder2); \
++ idct_row_mid (block, 2*8, 6*8, table26); \
++ idct_row (table26, rounder6); \
++ idct_row_mid (block, 6*8, 3*8, table35); \
++ idct_row (table35, rounder3); \
++ idct_row_mid (block, 3*8, 5*8, table35); \
++ idct_row (table35, rounder5); \
++ idct_row_tail (block, 5*8); \
++ \
++ idct_col (block, 0); \
++ idct_col (block, 4); \
++}
++
++/*#define COPY_GODSON2C(offset,r0,r1,r2) \
++do { \
++ asm("ldc1 " #r0 ",%0;"::"m"(*(block+offset))); \
++ dest+=stride; \
++ asm("ldc1 " #r1 ",%0;"::"m"(*(block+offset+4))); \
++ asm("sdc1 " #r2 ",%0;":"=m"(*dest)); \
++\
++ asm("packushb " #r0 "," #r0 "," #r1 ";"); \
++} while (0)*/
++
++/*static inline void block_copy(int16_t * const block, uint8_t * dest,
++ const int stride)
++{
++ int i;
++
++ asm("ldc1 $f4,%0;"::"m"(*(block+0*8)));
++ asm("ldc1 $f0,%0;"::"m"(*(block+0*8+4)));
++ asm("ldc1 $f6,%0;"::"m"(*(block+1*8)));
++ asm("packushb $f4,$f4,$f0;");
++ asm("ldc1 $f2,%0;"::"m"(*(block+1*8+4)));
++ asm("sdc1 $f4,%0;":"=m"(*dest));
++
++
++ asm("packushb $f6,$f6,$f2;");
++ COPY_GODSON2C (2*8, $f4, $f0, $f6);
++ COPY_GODSON2C (3*8, $f6, $f2, $f4);
++ COPY_GODSON2C (4*8, $f4, $f0, $f6);
++ COPY_GODSON2C (5*8, $f6, $f2, $f4);
++ COPY_GODSON2C (6*8, $f4, $f0, $f6);
++ COPY_GODSON2C (7*8, $f6, $f2, $f4);
++ asm("sdc1 $f6,%0;":"=m"(*(dest+stride)));
++}*/
++/*#define ADD_GODSON2C(offset,r1,r2,r3,r4) \
++do { \
++ asm("ldc1 " #r1 ",%0;"::"m"(*(dest+2*stride))); \
++ asm("packushb " #r3 "," #r3 "," #r4 ";"); \
++ asm("mov.d " #r2 "," #r1 ";"); \
++ dest+=stride; \
++ asm("sdc1 " #r3 ",%0;":"=m"(*dest)); \
++ asm("punpcklbh " #r1 "," #r1 ",$f4;"); \
++ asm("ldc1 $f16,%0;"::"m"(*(block+offset)));\
++ asm("paddsh " #r1 "," #r1 ",$f16;"); \
++ asm("punpckhbh " #r2 "," #r2 ",$f4;"); \
++ asm("ldc1 $f22,%0;"::"m"(*(block+offset+4))); \
++ asm("paddsh " #r2 "," #r2 ",$f22;"); \
++} while (0)*/
++
++/*static inline void block_add(int16_t * const block, uint8_t * dest,
++ const int stride)
++{
++ asm("ldc1 $f0,%0;"::"m"(*dest));
++ asm("fxor $f4,$f4,$f4;");
++ asm("ldc1 $f2,%0;"::"m"(*(dest+stride)));
++ asm("mov.d $f6,$f0;");
++ asm("punpcklbh $f0,$f0,$f4;");
++ asm("mov.d $f8,$f2;");
++ asm("ldc1 $f16,%0;"::"m"(*(block+0*8)));
++ asm("paddsh $f0,$f0,$f16;");
++ asm("punpckhbh $f6,$f6,$f4;");
++ asm("ldc1 $f22,%0;"::"m"(*(block+0*8+4)));
++ asm("paddsh $f6,$f6,$f22;");
++ asm("punpcklbh $f2,$f2,$f4;");
++ asm("ldc1 $f16,%0;"::"m"(*(block+1*8)));
++ asm("paddsh $f2,$f2,$f16;");
++ asm("packushb $f0,$f0,$f6;");
++ asm("punpckhbh $f8,$f8,$f4;");
++ asm("sdc1 $f0,%0;":"=m"(*dest));
++ asm("ldc1 $f22,%0;"::"m"(*(block+1*8+4)));
++ asm("paddsh $f8,$f8,$f22;");
++ ADD_GODSON2C (2*8, $f0, $f6, $f2, $f8);
++ ADD_GODSON2C (3*8, $f2, $f8, $f0, $f6);
++ ADD_GODSON2C (4*8, $f0, $f6, $f2, $f8);
++ ADD_GODSON2C (5*8, $f2, $f8, $f0, $f6);
++ ADD_GODSON2C (6*8, $f0, $f6, $f2, $f8);
++ ADD_GODSON2C (7*8, $f2, $f8, $f0, $f6);
++ asm("packushb $f2,$f2,$f8;");
++ asm("sdc1 $f2,%0;":"=m"(*(dest+stride)));
++}*/
++
++/*static inline void block_zero(int16_t * const block)
++{
++ asm("fxor $f4,$f4,$f4;");
++ asm("sdc1 $f4,%0;":"=m"(*(block+0*4)));
++ asm("sdc1 $f4,%0;":"=m"(*(block+1*4)));
++ asm("sdc1 $f4,%0;":"=m"(*(block+2*4)));
++ asm("sdc1 $f4,%0;":"=m"(*(block+3*4)));
++ asm("sdc1 $f4,%0;":"=m"(*(block+4*4)));
++ asm("sdc1 $f4,%0;":"=m"(*(block+5*4)));
++ asm("sdc1 $f4,%0;":"=m"(*(block+6*4)));
++ asm("sdc1 $f4,%0;":"=m"(*(block+7*4)));
++ asm("sdc1 $f4,%0;":"=m"(*(block+8*4)));
++ asm("sdc1 $f4,%0;":"=m"(*(block+9*4)));
++ asm("sdc1 $f4,%0;":"=m"(*(block+10*4)));
++ asm("sdc1 $f4,%0;":"=m"(*(block+11*4)));
++ asm("sdc1 $f4,%0;":"=m"(*(block+12*4)));
++ asm("sdc1 $f4,%0;":"=m"(*(block+13*4)));
++ asm("sdc1 $f4,%0;":"=m"(*(block+14*4)));
++ asm("sdc1 $f4,%0;":"=m"(*(block+15*4)));
++}*/
++
++/*#define dup4(reg) \
++do { \
++ asm(".set\tmips3"::); \
++ asm("dmtc1 $0,$f16;");\
++ asm(".set\tmips2"::); \
++ asm("pshufh " #reg "," #reg ",$f16;"); \
++} while (0)*/
++
++/*static inline void block_add_DC (int16_t * const block, uint8_t * dest,
++ const int stride, const int cpu)
++{
++ int32_t temp;
++ int i;
++
++ //asm("lwc1 $f4,%0;"::"m"((block[0]+64)>>7));
++ asm("lwc1 $f4,%0;"::"m"((block[0]+4)>>3));
++ asm("mtc1 $0, $f5;");
++ asm("fxor $f0,$f0,$f0;");
++ asm("ldc1 $f6,%0;"::"m"(*dest));
++
++
++ dup4($f4);
++ asm("psubsh $f0,$f0,$f4;");
++ asm("packushb $f4,$f4,$f4;");
++ asm("paddusb $f6,$f6,$f4;");
++ asm("packushb $f0,$f0,$f0;");
++ asm("ldc1 $f2,%0;"::"m"(*(dest+stride)));
++ asm("psubusb $f6,$f6,$f0;");
++ block[0]=0;
++ asm("paddusb $f2,$f2,$f4;");
++ asm("sdc1 $f6,%0;":"=m"(*dest));
++
++ asm("psubusb $f2,$f2,$f0;");
++ asm("ldc1 $f6,%0;"::"m"(*(dest+2*stride)));
++ dest+=stride;
++ asm("sdc1 $f2,%0;":"=m"(*dest));
++
++ asm("paddusb $f6,$f6,$f4;");
++ asm("ldc1 $f2,%0;"::"m"(*(dest+2*stride)));
++ asm("psubusb $f6,$f6,$f0;");
++ dest+=stride;
++ asm("paddusb $f2,$f2,$f4;");
++ asm("sdc1 $f6,%0;":"=m"(*dest));
++
++ asm("psubusb $f2,$f2,$f0;");
++ asm("ldc1 $f6,%0;"::"m"(*(dest+2*stride)));
++ dest+=stride;
++ asm("sdc1 $f2,%0;":"=m"(*dest));
++ asm("paddusb $f6,$f6,$f4;");
++ asm("ldc1 $f2,%0;"::"m"(*(dest+2*stride)));
++ asm("psubusb $f6,$f6,$f0;");
++ dest+=stride;
++ asm("paddusb $f2,$f2,$f4;");
++ asm("sdc1 $f6,%0;":"=m"(*dest));
++
++ asm("psubusb $f2,$f2,$f0;");
++ asm("ldc1 $f6,%0;"::"m"(*(dest+2*stride)));
++ dest+=stride;
++ asm("sdc1 $f2,%0;":"=m"(*dest));
++
++ asm("paddusb $f6,$f6,$f4;");
++ asm("ldc1 $f2,%0;"::"m"(*(dest+2*stride)));
++ asm("psubusb $f6,$f6,$f0;");
++ block[63]=0;
++ asm("paddusb $f2,$f2,$f4;");
++ asm("sdc1 $f6,%0;":"=m"(*(dest+stride)));
++
++ asm("psubusb $f2,$f2,$f0;");
++ asm("sdc1 $f2,%0;":"=m"(*(dest+2*stride)));
++
++}*/
++
++void ff_godson2c_idct(DCTELEM *block);
++
++declare_idct (ff_godson2c_idct, godson2c_table,
++ godson2c_row_head, godson2c_row, godson2c_row_tail, godson2c_row_mid)
++/*
++void mpeg2_idct_copy_c (int16_t * const block, uint8_t * const dest,
++ const int stride)
++{
++
++ godson2c_idct (block);
++
++ block_copy (block, dest, stride);
++ block_zero (block);
++}
++
++void mpeg2_idct_add_c (const int last, int16_t * const block,
++ uint8_t * const dest, const int stride)
++{
++#define CPU_GODSON2C 1
++ if (last != 129 || (block[0] & 7) == 4) {
++ godson2c_idct (block);
++ block_add (block, dest, stride);
++ block_zero (block);
++ } else
++ block_add_DC (block, dest, stride, CPU_GODSON2C);
++}
++
++void mpeg2_idct_init (uint32_t accel)
++{
++#ifdef ARCH_X86
++ if (accel & MPEG2_ACCEL_X86_MMXEXT) {
++ mpeg2_idct_copy = mpeg2_idct_copy_mmxext;
++ mpeg2_idct_add = mpeg2_idct_add_mmxext;
++ mpeg2_idct_mmx_init ();
++ } else if (accel & MPEG2_ACCEL_X86_MMX) {
++ mpeg2_idct_copy = mpeg2_idct_copy_mmx;
++ mpeg2_idct_add = mpeg2_idct_add_mmx;
++ mpeg2_idct_mmx_init ();
++ } else
++#endif
++#ifdef ARCH_PPC
++ if (accel & MPEG2_ACCEL_PPC_ALTIVEC) {
++ mpeg2_idct_copy = mpeg2_idct_copy_altivec;
++ mpeg2_idct_add = mpeg2_idct_add_altivec;
++ mpeg2_idct_altivec_init ();
++ } else
++#endif
++#ifdef ARCH_ALPHA
++ if (accel & MPEG2_ACCEL_ALPHA_MVI) {
++ mpeg2_idct_copy = mpeg2_idct_copy_mvi;
++ mpeg2_idct_add = mpeg2_idct_add_mvi;
++ mpeg2_idct_alpha_init ();
++ } else if (accel & MPEG2_ACCEL_ALPHA) {
++ int i;
++
++ mpeg2_idct_copy = mpeg2_idct_copy_alpha;
++ mpeg2_idct_add = mpeg2_idct_add_alpha;
++ mpeg2_idct_alpha_init ();
++ for (i = -3840; i < 3840 + 256; i++)
++ CLIP(i) = (i < 0) ? 0 : ((i > 255) ? 255 : i);
++ } else
++#endif
++ {
++ extern uint8_t mpeg2_scan_norm[64];
++ extern uint8_t mpeg2_scan_alt[64];
++ int i, j;
++
++ mpeg2_idct_copy = mpeg2_idct_copy_c;
++ mpeg2_idct_add = mpeg2_idct_add_c;
++ for (i = 0; i < 64; i++) {
++ j = mpeg2_scan_norm[i];
++ mpeg2_scan_norm[i] = (j & 0x38) | ((j & 6) >> 1) | ((j & 1) << 2);
++ j = mpeg2_scan_alt[i];
++ mpeg2_scan_alt[i] = (j & 0x38) | ((j & 6) >> 1) | ((j & 1) << 2);
++ }
++ }
++}*/
+diff -urN mplayer-20070622.orig/libavcodec/idct.h mplayer-20070622/libavcodec/idct.h
+--- mplayer-20070622.orig/libavcodec/idct.h 1970-01-01 08:00:00.000000000 +0800
++++ mplayer-20070622/libavcodec/idct.h 2007-08-04 07:23:17.000000000 +0800
+@@ -0,0 +1 @@
++void ff_godson2c_idct(DCTELEM *block);
+diff -urN mplayer-20070622.orig/libavcodec/libfaac.c mplayer-20070622/libavcodec/libfaac.c
+--- mplayer-20070622.orig/libavcodec/libfaac.c 2007-06-06 08:14:18.000000000 +0800
++++ mplayer-20070622/libavcodec/libfaac.c 2007-08-04 07:23:17.000000000 +0800
+@@ -25,7 +25,7 @@
+ */
+
+ #include "avcodec.h"
+-#include <faac.h>
++#include "faac.h"
+
+ typedef struct FaacAudioContext {
+ faacEncHandle faac_handle;
+diff -urN mplayer-20070622.orig/libavcodec/Makefile mplayer-20070622/libavcodec/Makefile
+--- mplayer-20070622.orig/libavcodec/Makefile 2007-06-16 04:35:44.000000000 +0800
++++ mplayer-20070622/libavcodec/Makefile 2007-08-04 07:23:17.000000000 +0800
+@@ -9,6 +9,7 @@
+ OBJS= bitstream.o \
+ utils.o \
+ allcodecs.o \
++ idct.o \
+ mpegvideo.o \
+ jrevdct.o \
+ jfdctfst.o \
+diff -urN mplayer-20070622.orig/libavutil/common.h mplayer-20070622/libavutil/common.h
+--- mplayer-20070622.orig/libavutil/common.h 2007-06-13 19:09:07.000000000 +0800
++++ mplayer-20070622/libavutil/common.h 2007-08-04 07:26:40.000000000 +0800
+@@ -344,4 +344,225 @@
+ #define STOP_TIMER(id) {}
+ #endif
+
++#ifdef MIPSEL
++#define memset godson_memset
++static void *memset(void *s, int c, int n)
++{
++ register int i;
++ unsigned char c0 = (unsigned char)c;
++ unsigned short c1;
++ unsigned int c2;
++ unsigned long long c3;
++ if ( ((unsigned int)(s+n) & ~0x7) >= (((unsigned int)s & ~0x7) + 8)) {
++ c1 = ((unsigned short)c0 << 8) | c0;
++ c2 = ((unsigned int)c1 << 16) | c1;
++ c3 = ((unsigned long long)c2 << 32) | c2;
++ switch ((unsigned int)s & 0x7) {
++ case 1:
++ *(unsigned char *)(s) = c0;
++ *(unsigned short *)(s+1) = c1;
++ *(unsigned int *)(s+3) = c2;
++ break;
++ case 2:
++ *(unsigned short *)(s) = c1;
++ *(unsigned int *)(s+2) = c2;
++ break;
++ case 3:
++ *(unsigned char *)(s) = c0;
++ *(unsigned int *)(s+1) = c2;
++ break;
++ case 4:
++ *(unsigned int *)(s) = c2;
++ break;
++ case 5:
++ *(unsigned char *)(s) = c0;
++ *(unsigned short *)(s+1) = c1;
++ break;
++ case 6:
++ *(unsigned short *)(s) = c1;
++ break;
++ case 7:
++ *(unsigned char *)(s) = c0;
++ break;
++ }
++ switch ((unsigned int)(s+n) & 0x7) {
++ case 1:
++ *(unsigned char *)(s+n-1) = c0;
++ break;
++ case 2:
++ *(unsigned short *)(s+n-2) = c1;
++ break;
++ case 3:
++ *(unsigned char *)(s+n-1) = c0;
++ *(unsigned short *)(s+n-3) = c1;
++ break;
++ case 4:
++ *(unsigned int *)(s+n-4) = c2;
++ break;
++ case 5:
++ *(unsigned char *)(s+n-1) = c0;
++ *(unsigned int *)(s+n-5) = c2;
++ break;
++ case 6:
++ *(unsigned short *)(s+n-2) = c1;
++ *(unsigned int *)(s+n-6) = c2;
++ break;
++ case 7:
++ *(unsigned char *)(s+n-1) = c0;
++ *(unsigned short *)(s+n-3) = c1;
++ *(unsigned int *)(s+n-7) = c2;
++ break;
++ }
++
++ void *tmp = (void *)((unsigned int)(s+7)&~0x7);
++ asm (
++ ".set mips3\n\t"
++ "ldc1 $f16,%0\n\t"
++ ".set mips1\n\t"
++ :
++ :"m"(c3)
++ );
++
++
++ for (n = (((unsigned int)(s+n)&~0x7) - (((unsigned int)(s+7)&~0x7))); n > 0;) {
++ if (n >= 128) {
++ asm (
++ ".set mips3\n\t"
++ "sdc1 $f16,0(%0)\n\t"
++ "sdc1 $f16,0x8(%0)\n\t"
++ "sdc1 $f16,0x10(%0)\n\t"
++ "sdc1 $f16,0x18(%0)\n\t"
++ "sdc1 $f16,0x20(%0)\n\t"
++ "sdc1 $f16,0x28(%0)\n\t"
++ "sdc1 $f16,0x30(%0)\n\t"
++ "sdc1 $f16,0x38(%0)\n\t"
++ "sdc1 $f16,0x40(%0)\n\t"
++ "sdc1 $f16,0x48(%0)\n\t"
++ "sdc1 $f16,0x50(%0)\n\t"
++ "sdc1 $f16,0x58(%0)\n\t"
++ "sdc1 $f16,0x60(%0)\n\t"
++ "sdc1 $f16,0x68(%0)\n\t"
++ "sdc1 $f16,0x70(%0)\n\t"
++ "sdc1 $f16,0x78(%0)\n\t"
++ ".set mips1\n\t"
++ :
++ :"r"(tmp)
++ );
++ tmp += 128;
++ n -= 128;
++ continue;
++ }
++ if (n >= 64) {
++ asm (
++ ".set mips3\n\t"
++ "sdc1 $f16,0(%0)\n\t"
++ "sdc1 $f16,0x8(%0)\n\t"
++ "sdc1 $f16,0x10(%0)\n\t"
++ "sdc1 $f16,0x18(%0)\n\t"
++ "sdc1 $f16,0x20(%0)\n\t"
++ "sdc1 $f16,0x28(%0)\n\t"
++ "sdc1 $f16,0x30(%0)\n\t"
++ "sdc1 $f16,0x38(%0)\n\t"
++ ".set mips1\n\t"
++ :
++ :"r"(tmp)
++ );
++
++ tmp += 64;
++ n -= 64;
++ continue;
++ }
++ if (n >= 32) {
++ asm (
++ ".set mips3\n\t"
++ "sdc1 $f16,0(%0)\n\t"
++ "sdc1 $f16,0x8(%0)\n\t"
++ "sdc1 $f16,0x10(%0)\n\t"
++ "sdc1 $f16,0x18(%0)\n\t"
++ ".set mips1\n\t"
++ :
++ :"r"(tmp)
++ );
++ tmp += 32;
++ n -= 32;
++ continue;
++ }
++ if (n >= 16) {
++ asm (
++ ".set mips3\n\t"
++ "sdc1 $f16,0(%0)\n\t"
++ "sdc1 $f16,0x8(%0)\n\t"
++ ".set mips1\n\t"
++ :
++ :"r"(tmp)
++ );
++ tmp += 16;
++ n -= 16;
++ continue;
++ }
++ asm (
++ ".set mips3\n\t"
++ "sdc1 $f16,0(%0)\n\t"
++ ".set mips1\n\t"
++ :
++ :"r"(tmp)
++ );
++ n -= 8;
++ }
++ } else {
++ for (;n>0;n--)
++ *(unsigned char *)(s+n-1) = c0;
++ }
++ return s;
++}
++#endif
++
++#ifndef HAVE_LRINTF
++/* XXX: add ISOC specific test to avoid specific BSD testing. */
++/* better than nothing implementation. */
++/* btw, rintf() is existing on fbsd too -- alex */
++#ifdef MIPSEL
++#define lrintf godson_lrintf
++#endif
++static always_inline long int lrintf(float x)
++{
++#ifdef MIPSEL
++ int32_t i;
++ asm volatile(
++ ".set mips3\n\t"
++ "lwc1 $f12,%1\n\t"
++ "round.w.s $f2,$f12\n\t"
++ "mfc1 $2,$f2\n\t"
++ "sw $2,%0\n\t"
++ ".set mips1\n\t"
++ :"=m"(i)
++ :"m"(x)
++ :"$f12","$2"
++ );
++ return i;
++
++#endif
++#ifdef CONFIG_WIN32
++# ifdef ARCH_X86
++ int32_t i;
++ asm volatile(
++ "fistpl %0\n\t"
++ : "=m" (i) : "t" (x) : "st"
++ );
++ return i;
++# else
++ /* XXX: incorrect, but make it compile */
++ return (int)(x + (x < 0 ? -0.5 : 0.5));
++# endif /* ARCH_X86 */
++#else
++ return (int)(rint(x));
++#endif /* CONFIG_WIN32 */
++}
++#else
++#ifndef _ISOC9X_SOURCE
++#define _ISOC9X_SOURCE
++#endif
++#include <math.h>
++#endif /* HAVE_LRINTF */
++
+ #endif /* COMMON_H */
+diff -urN mplayer-20070622.orig/libavutil/common.h-loongson mplayer-20070622/libavutil/common.h-loongson
+--- mplayer-20070622.orig/libavutil/common.h-loongson 1970-01-01 08:00:00.000000000 +0800
++++ mplayer-20070622/libavutil/common.h-loongson 2007-08-04 07:23:17.000000000 +0800
+@@ -0,0 +1,840 @@
++/**
++ * @file common.h
++ * common internal api header.
++ */
++
++#ifndef COMMON_H
++#define COMMON_H
++
++#if defined(WIN32) && !defined(__MINGW32__) && !defined(__CYGWIN__)
++# define CONFIG_WIN32
++#endif
++
++#if defined(WIN32) && !defined(__MINGW32__) && !defined(__CYGWIN__) && !defined(EMULATE_INTTYPES)
++# define EMULATE_INTTYPES
++#endif
++
++#ifndef M_PI
++#define M_PI 3.14159265358979323846
++#endif
++
++#ifdef HAVE_AV_CONFIG_H
++/* only include the following when compiling package */
++# include "config.h"
++
++# include <stdlib.h>
++# include <stdio.h>
++# include <string.h>
++# include <ctype.h>
++# include <limits.h>
++# ifndef __BEOS__
++# include <errno.h>
++# else
++# include "berrno.h"
++# endif
++# include <math.h>
++
++# ifndef ENODATA
++# define ENODATA 61
++# endif
++
++#include <stddef.h>
++#ifndef offsetof
++# define offsetof(T,F) ((unsigned int)((char *)&((T *)0)->F))
++#endif
++
++#define AVOPTION_CODEC_BOOL(name, help, field) \
++ { name, help, offsetof(AVCodecContext, field), FF_OPT_TYPE_BOOL }
++#define AVOPTION_CODEC_DOUBLE(name, help, field, minv, maxv, defval) \
++ { name, help, offsetof(AVCodecContext, field), FF_OPT_TYPE_DOUBLE, minv, maxv, defval }
++#define AVOPTION_CODEC_FLAG(name, help, field, flag, defval) \
++ { name, help, offsetof(AVCodecContext, field), FF_OPT_TYPE_FLAG, flag, 0, defval }
++#define AVOPTION_CODEC_INT(name, help, field, minv, maxv, defval) \
++ { name, help, offsetof(AVCodecContext, field), FF_OPT_TYPE_INT, minv, maxv, defval }
++#define AVOPTION_CODEC_STRING(name, help, field, str, val) \
++ { name, help, offsetof(AVCodecContext, field), FF_OPT_TYPE_STRING, .defval = val, .defstr = str }
++#define AVOPTION_CODEC_RCOVERRIDE(name, help, field) \
++ { name, help, offsetof(AVCodecContext, field), FF_OPT_TYPE_RCOVERRIDE, .defval = 0, .defstr = NULL }
++#define AVOPTION_SUB(ptr) { .name = NULL, .help = (const char*)ptr }
++#define AVOPTION_END() AVOPTION_SUB(NULL)
++
++#endif /* HAVE_AV_CONFIG_H */
++
++/* Suppress restrict if it was not defined in config.h. */
++#ifndef restrict
++# define restrict
++#endif
++
++#ifndef always_inline
++#if defined(__GNUC__) && (__GNUC__ > 3 || __GNUC__ == 3 && __GNUC_MINOR__ > 0)
++# define always_inline __attribute__((always_inline)) inline
++#else
++# define always_inline inline
++#endif
++#endif
++
++#ifndef attribute_used
++#if defined(__GNUC__) && (__GNUC__ > 3 || __GNUC__ == 3 && __GNUC_MINOR__ > 0) define attribute_used __attribute__((used))
++#else
++# define attribute_used
++#endif
++#endif
++
++#ifndef attribute_unused
++#if defined(__GNUC__) && (__GNUC__ > 3 || __GNUC__ == 3 && __GNUC_MINOR__ > 0)
++# define attribute_unused __attribute__((unused))
++#else
++# define attribute_unused
++#endif
++#endif
++
++#ifndef EMULATE_INTTYPES
++# include <inttypes.h>
++#else
++ typedef signed char int8_t;
++ typedef signed short int16_t;
++ typedef signed int int32_t;
++ typedef unsigned char uint8_t;
++ typedef unsigned short uint16_t;
++ typedef unsigned int uint32_t;
++/*
++
++ # ifdef CONFIG_WIN32
++ typedef signed __int64 int64_t;
++ typedef unsigned __int64 uint64_t;
++# else /* other OS */
++ /* typedef signed long long int64_t;
++ typedef unsigned long long uint64_t;
++# endif /* other OS */
++*/
++
++#endif /* EMULATE_INTTYPES */
++
++#ifndef PRId64
++#define PRId64 "lld"
++#endif
++
++#ifndef PRIu64
++#define PRIu64 "llu"
++#endif
++
++#ifndef PRIx64
++#define PRIx64 "llx"
++#endif
++
++#ifndef PRId32
++#define PRId32 "d"
++#endif
++
++#ifndef PRIdFAST16
++#define PRIdFAST16 PRId32
++#endif
++
++#ifndef PRIdFAST32
++#define PRIdFAST32 PRId32
++#endif
++
++#ifndef INT16_MIN
++#define INT16_MIN (-0x7fff-1)
++#endif
++
++#ifndef INT16_MAX
++#define INT16_MAX 0x7fff
++#endif
++
++#ifndef INT32_MIN
++#define INT32_MIN (-0x7fffffff-1)
++#endif
++
++#ifndef INT32_MAX
++#define INT32_MAX 0x7fffffff
++#endif
++
++#ifndef UINT32_MAX
++#define UINT32_MAX 0xffffffff
++#endif
++
++#ifndef INT64_MIN
++#define INT64_MIN (-0x7fffffffffffffffLL-1)
++#endif
++
++#ifndef INT64_MAX
++#define INT64_MAX int64_t_C(9223372036854775807)
++#endif
++
++#ifndef UINT64_MAX
++#define UINT64_MAX uint64_t_C(0xFFFFFFFFFFFFFFFF)
++#endif
++
++#ifdef EMULATE_FAST_INT
++typedef signed char int_fast8_t;
++typedef signed int int_fast16_t;
++typedef signed int int_fast32_t;
++typedef unsigned char uint_fast8_t;
++typedef unsigned int uint_fast16_t;
++typedef unsigned int uint_fast32_t;
++typedef uint64_t uint_fast64_t;
++#endif
++
++#ifndef INT_BIT
++# if INT_MAX != 2147483647
++# define INT_BIT 64
++# else
++# define INT_BIT 32
++# endif
++#endif
++
++#if defined(CONFIG_OS2) || defined(CONFIG_SUNOS)
++static inline float floorf(float f) {
++ return floor(f);
++}
++#endif
++
++#ifdef CONFIG_WIN32
++
++/* windows */
++
++# if !defined(__MINGW32__) && !defined(__CYGWIN__)
++# define int64_t_C(c) (c ## i64)
++# define uint64_t_C(c) (c ## i64)
++
++# ifdef HAVE_AV_CONFIG_H
++# define inline __inline
++# endif
++
++# else
++# define int64_t_C(c) (c ## LL)
++# define uint64_t_C(c) (c ## ULL)
++# endif /* __MINGW32__ */
++
++# ifdef HAVE_AV_CONFIG_H
++# ifdef _DEBUG
++# define DEBUG
++# endif
++
++# define snprintf _snprintf
++# define vsnprintf _vsnprintf
++
++# ifdef CONFIG_WINCE
++# define perror(a)
++# endif
++
++# endif
++
++/* CONFIG_WIN32 end */
++#elif defined (CONFIG_OS2)
++/* OS/2 EMX */
++
++#ifndef int64_t_C
++#define int64_t_C(c) (c ## LL)
++#define uint64_t_C(c) (c ## ULL)
++#endif
++
++#ifdef HAVE_AV_CONFIG_H
++
++//#ifdef USE_FASTMEMCPY
++//#include "fastmemcpy.h"
++//#endif
++
++#include <float.h>
++
++#endif /* HAVE_AV_CONFIG_H */
++
++/* CONFIG_OS2 end */
++#else
++
++/* unix */
++
++#ifndef int64_t_C
++#define int64_t_C(c) (c ## LL)
++#define uint64_t_C(c) (c ## ULL)
++#endif
++
++#ifdef HAVE_AV_CONFIG_H
++
++//# ifdef USE_FASTMEMCPY
++//# include "fastmemcpy.h"
++//# endif
++# endif /* HAVE_AV_CONFIG_H */
++
++#endif /* !CONFIG_WIN32 && !CONFIG_OS2 */
++
++#ifdef HAVE_AV_CONFIG_H
++
++#if defined(__MINGW32__) && !defined(BUILD_AVUTIL) && defined(BUILD_SHARED_AV)
++# define FF_IMPORT_ATTR __declspec(dllimport)
++#else
++# define FF_IMPORT_ATTR
++#endif
++
++
++# include "bswap.h"
++
++// Use rip-relative addressing if compiling PIC code on x86-64.
++# if defined(__MINGW32__) || defined(__CYGWIN__) || \
++ defined(__OS2__) || (defined (__OpenBSD__) && !defined(__ELF__))
++# if defined(ARCH_X86_64) && defined(PIC)
++# define MANGLE(a) "_" #a"(%%rip)"
++# else
++# define MANGLE(a) "_" #a
++# endif
++# else
++# if defined(ARCH_X86_64) && defined(PIC)
++# define MANGLE(a) #a"(%%rip)"
++# elif defined(CONFIG_DARWIN)
++# define MANGLE(a) "_" #a
++# else
++# define MANGLE(a) #a
++# endif
++# endif
++
++/* debug stuff */
++
++# ifndef DEBUG
++# define NDEBUG
++# endif
++# include <assert.h>
++
++/* dprintf macros */
++# if defined(CONFIG_WIN32) && !defined(__MINGW32__) && !defined(__CYGWIN__)
++
++inline void dprintf(const char* fmt,...) {}
++
++# else
++
++# ifdef DEBUG
++# define dprintf(fmt,...) av_log(NULL, AV_LOG_DEBUG, fmt, __VA_ARGS__)
++# else
++# define dprintf(fmt,...)
++# endif
++
++# endif /* !CONFIG_WIN32 */
++# ifdef CONFIG_WINCE
++# define abort()
++# endif
++
++# define av_abort() do { av_log(NULL, AV_LOG_ERROR, "Abort at %s:%d\n", __FILE__, __LINE__); abort(); } while (0)
++
++//rounded divison & shift
++#define RSHIFT(a,b) ((a) > 0 ? ((a) + ((1<<(b))>>1))>>(b) : ((a) + ((1<<(b))>>1)-1)>>(b))
++/* assume b>0 */
++#define ROUNDED_DIV(a,b) (((a)>0 ? (a) + ((b)>>1) : (a) - ((b)>>1))/(b))
++//#define ABS(a) ((a) >= 0 ? (a) : (-(a)))
++#define FFABS(a) ((a) >= 0 ? (a) : (-(a)))
++
++#define FFMAX(a,b) ((a) > (b) ? (a) : (b))
++#define FFMIN(a,b) ((a) > (b) ? (b) : (a))
++
++extern const uint32_t inverse[256];
++
++#if defined(ARCH_X86) || defined(ARCH_X86_64)
++# define FASTDIV(a,b) \
++ ({\
++ int ret,dmy;\
++ asm volatile(\
++ "mull %3"\
++ :"=d"(ret),"=a"(dmy)\
++ :"1"(a),"g"(inverse[b])\
++ );\
++ ret;\
++ })
++#elif defined(CONFIG_FASTDIV)
++# define FASTDIV(a,b) ((uint32_t)((((uint64_t)a)*inverse[b])>>32))
++#else
++# define FASTDIV(a,b) ((a)/(b))
++#endif
++
++/* define it to include statistics code (useful only for optimizing
++ codec efficiency */
++//#define STATS
++
++#ifdef STATS
++
++enum {
++ ST_UNKNOWN,
++ ST_DC,
++ ST_INTRA_AC,
++ ST_INTER_AC,
++ ST_INTRA_MB,
++ ST_INTER_MB,
++ ST_MV,
++ ST_NB,
++};
++
++extern int st_current_index;
++extern unsigned int st_bit_counts[ST_NB];
++extern unsigned int st_out_bit_counts[ST_NB];
++
++void print_stats(void);
++#endif
++
++/* misc math functions */
++extern FF_IMPORT_ATTR const uint8_t ff_log2_tab[256];
++
++static inline int av_log2(unsigned int v)
++{
++ int n;
++
++ n = 0;
++ if (v & 0xffff0000) {
++ v >>= 16;
++ n += 16;
++ }
++ if (v & 0xff00) {
++ v >>= 8;
++ n += 8;
++ }
++ n += ff_log2_tab[v];
++
++ return n;
++}
++
++static inline int av_log2_16bit(unsigned int v)
++{
++ int n;
++
++ n = 0;
++ if (v & 0xff00) {
++ v >>= 8;
++ n += 8;
++ }
++ n += ff_log2_tab[v];
++
++ return n;
++}
++
++/* median of 3 */
++static inline int mid_pred(int a, int b, int c)
++{
++#if 0
++ int t= (a-b)&((a-b)>>31);
++ a-=t;
++ b+=t;
++ b-= (b-c)&((b-c)>>31);
++ b+= (a-b)&((a-b)>>31);
++
++ return b;
++#else
++ if(a>b){
++ if(c>b){
++ if(c>a) b=a;
++ else b=c;
++ }
++ }else{
++ if(b>c){
++ if(c>a) b=c;
++ else b=a;
++ }
++ }
++ return b;
++#endif
++}
++
++/**
++ * clip a signed integer value into the amin-amax range
++ * @param a value to clip
++ * @param amin minimum value of the clip range
++ * @param amax maximum value of the clip range
++ * @return cliped value
++ */
++static inline int clip(int a, int amin, int amax)
++{
++ if (a < amin)
++ return amin;
++ else if (a > amax)
++ return amax;
++ else
++ return a;
++}
++
++/**
++ * clip a signed integer value into the 0-255 range
++ * @param a value to clip
++ * @return cliped value
++ */
++static inline uint8_t clip_uint8(int a)
++{
++ if (a&(~255)) return (-a)>>31;
++ else return a;
++}
++
++/* math */
++extern FF_IMPORT_ATTR const uint8_t ff_sqrt_tab[128];
++
++int64_t ff_gcd(int64_t a, int64_t b);
++
++static inline int ff_sqrt(int a)
++{
++ int ret=0;
++ int s;
++ int ret_sq=0;
++
++ if(a<128) return ff_sqrt_tab[a];
++
++ for(s=15; s>=0; s--){
++ int b= ret_sq + (1<<(s*2)) + (ret<<s)*2;
++ if(b<=a){
++ ret_sq=b;
++ ret+= 1<<s;
++ }
++ }
++ return ret;
++}
++
++/**
++ * converts fourcc string to int
++ */
++static inline int ff_get_fourcc(const char *s){
++ assert( strlen(s)==4 );
++
++ return (s[0]) + (s[1]<<8) + (s[2]<<16) + (s[3]<<24);
++}
++
++#define MKTAG(a,b,c,d) (a | (b << 8) | (c << 16) | (d << 24))
++#define MKBETAG(a,b,c,d) (d | (c << 8) | (b << 16) | (a << 24))
++
++
++#if defined(ARCH_X86) || defined(ARCH_X86_64)
++#define MASK_ABS(mask, level)\
++ asm volatile(\
++ "cdq \n\t"\
++ "xorl %1, %0 \n\t"\
++ "subl %1, %0 \n\t"\
++ : "+a" (level), "=&d" (mask)\
++ );
++#else
++#define MASK_ABS(mask, level)\
++ mask= level>>31;\
++ level= (level^mask)-mask;
++#endif
++
++
++#if __CPU__ >= 686 && !defined(RUNTIME_CPUDETECT)
++#define COPY3_IF_LT(x,y,a,b,c,d)\
++asm volatile (\
++ "cmpl %0, %3 \n\t"\
++ "cmovl %3, %0 \n\t"\
++ "cmovl %4, %1 \n\t"\
++ "cmovl %5, %2 \n\t"\
++ : "+r" (x), "+r" (a), "+r" (c)\
++ : "r" (y), "r" (b), "r" (d)\
++);
++#else
++#define COPY3_IF_LT(x,y,a,b,c,d)\
++if((y)<(x)){\
++ (x)=(y);\
++ (a)=(b);\
++ (c)=(d);\
++}
++#endif
++
++#if defined(ARCH_X86) || defined(ARCH_X86_64) || defined(ARCH_POWERPC)
++#if defined(ARCH_X86_64)
++static inline uint64_t read_time(void)
++{
++ uint64_t a, d;
++ asm volatile( "rdtsc\n\t"
++ : "=a" (a), "=d" (d)
++ );
++ return (d << 32) | (a & 0xffffffff);
++}
++#elif defined(ARCH_X86)
++static inline long long read_time(void)
++{
++ long long l;
++ asm volatile( "rdtsc\n\t"
++ : "=A" (l)
++ );
++ return l;
++}
++#else //FIXME check ppc64
++static inline uint64_t read_time(void)
++{
++ uint32_t tbu, tbl, temp;
++
++ /* from section 2.2.1 of the 32-bit PowerPC PEM */
++ __asm__ __volatile__(
++ "1:\n"
++ "mftbu %2\n"
++ "mftb %0\n"
++ "mftbu %1\n"
++ "cmpw %2,%1\n"
++ "bne 1b\n"
++ : "=r"(tbl), "=r"(tbu), "=r"(temp)
++ :
++ : "cc");
++
++ return (((uint64_t)tbu)<<32) | (uint64_t)tbl;
++}
++#endif
++
++#define START_TIMER \
++uint64_t tend;\
++uint64_t tstart= read_time();\
++
++#define STOP_TIMER(id) \
++tend= read_time();\
++{\
++ static uint64_t tsum=0;\
++ static int tcount=0;\
++ static int tskip_count=0;\
++ if(tcount<2 || tend - tstart < 8*tsum/tcount){\
++ tsum+= tend - tstart;\
++ tcount++;\
++ }else\
++ tskip_count++;\
++ if(256*256*256*64%(tcount+tskip_count)==0){\
++ av_log(NULL, AV_LOG_DEBUG, "%"PRIu64" dezicycles in %s, %d runs, %d skips\n", tsum*10/tcount, id, tcount, tskip_count);\
++ }\
++}
++#else
++#define START_TIMER
++#define STOP_TIMER(id) {}
++#endif
++
++/* avoid usage of various functions */
++#define malloc please_use_av_malloc
++#define free please_use_av_free
++#define realloc please_use_av_realloc
++#define time time_is_forbidden_due_to_security_issues
++#define rand rand_is_forbidden_due_to_state_trashing
++#define srand srand_is_forbidden_due_to_state_trashing
++#define sprintf sprintf_is_forbidden_due_to_security_issues_use_snprintf
++#define strcat strcat_is_forbidden_due_to_security_issues_use_pstrcat
++#if !(defined(LIBAVFORMAT_BUILD) || defined(_FRAMEHOOK_H))
++#define printf please_use_av_log
++#define fprintf please_use_av_log
++#endif
++
++#define CHECKED_ALLOCZ(p, size)\
++{\
++ p= av_mallocz(size);\
++ if(p==NULL && (size)!=0){\
++ perror("malloc");\
++ goto fail;\
++ }\
++}
++
++#ifdef MIPSEL
++#define memset godson_memset
++static void *memset(void *s, int c, int n)
++{
++ register int i;
++ unsigned char c0 = (unsigned char)c;
++ unsigned short c1;
++ unsigned int c2;
++ unsigned long long c3;
++ if ( ((unsigned int)(s+n) & ~0x7) >= (((unsigned int)s & ~0x7) + 8)) {
++ c1 = ((unsigned short)c0 << 8) | c0;
++ c2 = ((unsigned int)c1 << 16) | c1;
++ c3 = ((unsigned long long)c2 << 32) | c2;
++ switch ((unsigned int)s & 0x7) {
++ case 1:
++ *(unsigned char *)(s) = c0;
++ *(unsigned short *)(s+1) = c1;
++ *(unsigned int *)(s+3) = c2;
++ break;
++ case 2:
++ *(unsigned short *)(s) = c1;
++ *(unsigned int *)(s+2) = c2;
++ break;
++ case 3:
++ *(unsigned char *)(s) = c0;
++ *(unsigned int *)(s+1) = c2;
++ break;
++ case 4:
++ *(unsigned int *)(s) = c2;
++ break;
++ case 5:
++ *(unsigned char *)(s) = c0;
++ *(unsigned short *)(s+1) = c1;
++ break;
++ case 6:
++ *(unsigned short *)(s) = c1;
++ break;
++ case 7:
++ *(unsigned char *)(s) = c0;
++ break;
++ }
++ switch ((unsigned int)(s+n) & 0x7) {
++ case 1:
++ *(unsigned char *)(s+n-1) = c0;
++ break;
++ case 2:
++ *(unsigned short *)(s+n-2) = c1;
++ break;
++ case 3:
++ *(unsigned char *)(s+n-1) = c0;
++ *(unsigned short *)(s+n-3) = c1;
++ break;
++ case 4:
++ *(unsigned int *)(s+n-4) = c2;
++ break;
++ case 5:
++ *(unsigned char *)(s+n-1) = c0;
++ *(unsigned int *)(s+n-5) = c2;
++ break;
++ case 6:
++ *(unsigned short *)(s+n-2) = c1;
++ *(unsigned int *)(s+n-6) = c2;
++ break;
++ case 7:
++ *(unsigned char *)(s+n-1) = c0;
++ *(unsigned short *)(s+n-3) = c1;
++ *(unsigned int *)(s+n-7) = c2;
++ break;
++ }
++
++ void *tmp = (void *)((unsigned int)(s+7)&~0x7);
++ asm (
++ ".set mips3\n\t"
++ "ldc1 $f16,%0\n\t"
++ ".set mips1\n\t"
++ :
++ :"m"(c3)
++ );
++
++
++ for (n = (((unsigned int)(s+n)&~0x7) - (((unsigned int)(s+7)&~0x7))); n > 0;) {
++ if (n >= 128) {
++ asm (
++ ".set mips3\n\t"
++ "sdc1 $f16,0(%0)\n\t"
++ "sdc1 $f16,0x8(%0)\n\t"
++ "sdc1 $f16,0x10(%0)\n\t"
++ "sdc1 $f16,0x18(%0)\n\t"
++ "sdc1 $f16,0x20(%0)\n\t"
++ "sdc1 $f16,0x28(%0)\n\t"
++ "sdc1 $f16,0x30(%0)\n\t"
++ "sdc1 $f16,0x38(%0)\n\t"
++ "sdc1 $f16,0x40(%0)\n\t"
++ "sdc1 $f16,0x48(%0)\n\t"
++ "sdc1 $f16,0x50(%0)\n\t"
++ "sdc1 $f16,0x58(%0)\n\t"
++ "sdc1 $f16,0x60(%0)\n\t"
++ "sdc1 $f16,0x68(%0)\n\t"
++ "sdc1 $f16,0x70(%0)\n\t"
++ "sdc1 $f16,0x78(%0)\n\t"
++ ".set mips1\n\t"
++ :
++ :"r"(tmp)
++ );
++ tmp += 128;
++ n -= 128;
++ continue;
++ }
++ if (n >= 64) {
++ asm (
++ ".set mips3\n\t"
++ "sdc1 $f16,0(%0)\n\t"
++ "sdc1 $f16,0x8(%0)\n\t"
++ "sdc1 $f16,0x10(%0)\n\t"
++ "sdc1 $f16,0x18(%0)\n\t"
++ "sdc1 $f16,0x20(%0)\n\t"
++ "sdc1 $f16,0x28(%0)\n\t"
++ "sdc1 $f16,0x30(%0)\n\t"
++ "sdc1 $f16,0x38(%0)\n\t"
++ ".set mips1\n\t"
++ :
++ :"r"(tmp)
++ );
++
++ tmp += 64;
++ n -= 64;
++ continue;
++ }
++ if (n >= 32) {
++ asm (
++ ".set mips3\n\t"
++ "sdc1 $f16,0(%0)\n\t"
++ "sdc1 $f16,0x8(%0)\n\t"
++ "sdc1 $f16,0x10(%0)\n\t"
++ "sdc1 $f16,0x18(%0)\n\t"
++ ".set mips1\n\t"
++ :
++ :"r"(tmp)
++ );
++ tmp += 32;
++ n -= 32;
++ continue;
++ }
++ if (n >= 16) {
++ asm (
++ ".set mips3\n\t"
++ "sdc1 $f16,0(%0)\n\t"
++ "sdc1 $f16,0x8(%0)\n\t"
++ ".set mips1\n\t"
++ :
++ :"r"(tmp)
++ );
++ tmp += 16;
++ n -= 16;
++ continue;
++ }
++ asm (
++ ".set mips3\n\t"
++ "sdc1 $f16,0(%0)\n\t"
++ ".set mips1\n\t"
++ :
++ :"r"(tmp)
++ );
++ n -= 8;
++ }
++ } else {
++ for (;n>0;n--)
++ *(unsigned char *)(s+n-1) = c0;
++ }
++ return s;
++}
++#endif
++#ifndef HAVE_LRINTF
++/* XXX: add ISOC specific test to avoid specific BSD testing. */
++/* better than nothing implementation. */
++/* btw, rintf() is existing on fbsd too -- alex */
++#ifdef MIPSEL
++#define lrintf godson_lrintf
++#endif
++static always_inline long int lrintf(float x)
++{
++#ifdef MIPSEL
++ int32_t i;
++ asm volatile(
++ ".set mips3\n\t"
++ "lwc1 $f12,%1\n\t"
++ "round.w.s $f2,$f12\n\t"
++ "mfc1 $2,$f2\n\t"
++ "sw $2,%0\n\t"
++ ".set mips1\n\t"
++ :"=m"(i)
++ :"m"(x)
++ :"$f12","$2"
++ );
++ return i;
++
++#endif
++#ifdef CONFIG_WIN32
++# ifdef ARCH_X86
++ int32_t i;
++ asm volatile(
++ "fistpl %0\n\t"
++ : "=m" (i) : "t" (x) : "st"
++ );
++ return i;
++# else
++ /* XXX: incorrect, but make it compile */
++ return (int)(x + (x < 0 ? -0.5 : 0.5));
++# endif /* ARCH_X86 */
++#else
++ return (int)(rint(x));
++#endif /* CONFIG_WIN32 */
++}
++#else
++#ifndef _ISOC9X_SOURCE
++#define _ISOC9X_SOURCE
++#endif
++#include <math.h>
++#endif /* HAVE_LRINTF */
++
++#endif /* HAVE_AV_CONFIG_H */
++
++#endif /* COMMON_H */
+diff -urN mplayer-20070622.orig/libmpdemux/demux_audio.c mplayer-20070622/libmpdemux/demux_audio.c
+--- mplayer-20070622.orig/libmpdemux/demux_audio.c 2007-03-16 02:36:36.000000000 +0800
++++ mplayer-20070622/libmpdemux/demux_audio.c 2007-08-04 07:39:59.000000000 +0800
+@@ -11,7 +11,7 @@
+ #include "genres.h"
+ #include "mp3_hdr.h"
+
+-#include <string.h>
++//#include <string.h>
+ #ifdef MP_DEBUG
+ #include <assert.h>
+ #endif
+diff -urN mplayer-20070622.orig/libmpdemux/demux_real.c mplayer-20070622/libmpdemux/demux_real.c
+--- mplayer-20070622.orig/libmpdemux/demux_real.c 2007-04-25 08:03:27.000000000 +0800
++++ mplayer-20070622/libmpdemux/demux_real.c 2007-08-04 07:39:59.000000000 +0800
+@@ -1618,9 +1618,9 @@
+ } else
+ mp_msg(MSGT_DEMUX,MSGL_V,"Unknown logical stream\n");
+ }
+- else {
+- mp_msg(MSGT_DEMUX, MSGL_ERR, "Not audio/video stream or unsupported!\n");
+- }
++// else {
++// mp_msg(MSGT_DEMUX, MSGL_ERR, "Not audio/video stream or unsupported!\n");
++// }
+ // break;
+ // default:
+ skip_this_chunk:
+diff -urN mplayer-20070622.orig/libmpeg2/idct.c mplayer-20070622/libmpeg2/idct.c
+--- mplayer-20070622.orig/libmpeg2/idct.c 2006-12-10 02:09:41.000000000 +0800
++++ mplayer-20070622/libmpeg2/idct.c 2007-08-04 08:18:48.000000000 +0800
+@@ -1,5 +1,5 @@
+ /*
+- * idct.c
++ * idct_mmx.c
+ * Copyright (C) 2000-2003 Michel Lespinasse <walken@zoy.org>
+ * Copyright (C) 1999-2000 Aaron Holtzman <aholtzma@ess.engr.uvic.ca>
+ *
+@@ -27,233 +27,591 @@
+
+ #include "config.h"
+
+-#include <stdlib.h>
+ #include <inttypes.h>
+
+ #include "mpeg2.h"
+ #include "attributes.h"
+ #include "mpeg2_internal.h"
++#include "mmx.h"
+
+-#define W1 2841 /* 2048 * sqrt (2) * cos (1 * pi / 16) */
+-#define W2 2676 /* 2048 * sqrt (2) * cos (2 * pi / 16) */
+-#define W3 2408 /* 2048 * sqrt (2) * cos (3 * pi / 16) */
+-#define W5 1609 /* 2048 * sqrt (2) * cos (5 * pi / 16) */
+-#define W6 1108 /* 2048 * sqrt (2) * cos (6 * pi / 16) */
+-#define W7 565 /* 2048 * sqrt (2) * cos (7 * pi / 16) */
++#define ROW_SHIFT 15
++#define COL_SHIFT 6
++
++#define round(bias) ((int)(((bias)+0.5) * (1<<ROW_SHIFT)))
++#define rounder(bias) {round (bias), round (bias)}
+
+ /* idct main entry point */
+ void (* mpeg2_idct_copy) (int16_t * block, uint8_t * dest, int stride);
+ void (* mpeg2_idct_add) (int last, int16_t * block,
+ uint8_t * dest, int stride);
+
+-/*
+- * In legal streams, the IDCT output should be between -384 and +384.
+- * In corrupted streams, it is possible to force the IDCT output to go
+- * to +-3826 - this is the worst case for a column IDCT where the
+- * column inputs are 16-bit values.
+- */
+-uint8_t mpeg2_clip[3840 * 2 + 256];
+-#define CLIP(i) ((mpeg2_clip + 3840)[i])
++int flag=0;
++int flag_block_copy=8;
++int flag_block_add_DC=8;
++
++#define godson2c_table(c1,c2,c3,c4,c5,c6,c7) { c4,c2,-c4,-c2, \
++ c4,c6,c4,c6, \
++ c1,c3,-c1,-c5,\
++ c5,c7,c3,-c7, \
++ c4,-c6,c4,-c6, \
++ -c4,c2,c4,-c2, \
++ c5,-c1,c3,-c1, \
++ c7,c3,c7,-c5 }
++
++
++static inline void godson2c_row_head(int16_t * const row, const int offset,
++ const int16_t * const table)
++{
++ __asm__ volatile(
++ ".set\tmips3\n"
++ ".set noreorder\n"
++ "ldc1 $f6,%0\n"
++ "ldc1 $f14,%1\n"
++ "ldc1 $f2,%2\n"
++ "ldc1 $f8,%3\n"
++ "dli $12,%4\n"
++ "dmtc1 $12,$f16\n"
++ "mov.d $f4,$f6\n"
++ "mov.d $f10,$f14\n"
++ "pmaddhw $f2,$f2,$f4\n"
++ "pshufh $f6,$f6,$f16\n"
++ ".set reorder\n"
++ ".set\tmips0\n"
++ :
++ :"m"(*(row+offset)),"m"(*(row+offset+4)),"m"(*table),"m"(*(table+4)),"i"(0x4e)
++ :"$f2","$f4","$f6","$f8","$f10","$f14","$f16","$12"
++ );
++}
++
++static inline void godson2c_row(const int16_t * const table,
++ const int32_t * const rounder)
++{
++ __asm__ volatile (
++ ".set\tmips3\n"
++ ".set\tnoreorder\n"
++ "ldc1 $f0,%0\n"
++ "pmaddhw $f8,$f8,$f6\n"
++ "ldc1 $f16,%1\n"
++ "dli $13,%8\n"
++ "ldc1 $f20,%2\n"
++ "pmaddhw $f0,$f0,$f14\n"
++ "ldc1 $f22,%3\n"
++ "pmaddhw $f4,$f4,$f16\n"
++ "paddw $f2,$f2,$f22\n"
++ "ldc1 $f22,%4\n"
++ "dmtc1 $13,$f16\n"
++ "paddw $f2,$f2,$f8\n"
++ "pmaddhw $f14,$f14,$f22\n"
++ "mov.d $f8,$f2\n"
++ "pshufh $f10,$f10,$f16\n"
++ "ldc1 $f22,%3\n"
++ "pmaddhw $f20,$f20,$f10\n"
++ "ldc1 $f16,%5\n"
++ "paddw $f4,$f4,$f22\n"
++ "paddw $f0,$f0,$f20\n"
++ "dli $12,%6\n"
++ "pmaddhw $f6,$f6,$f16\n"
++ "psubw $f2,$f2,$f0\n"
++ "ldc1 $f16,%7\n"
++ "paddw $f0,$f0,$f8\n"
++ "paddw $f4,$f4,$f6\n"
++ "pmaddhw $f10,$f10,$f16\n"
++ "mov.d $f8,$f4\n"
++ "dmtc1 $12,$f16\n"
++ "paddw $f14,$f14,$f10\n"
++ "psraw $f2,$f2,$f16\n"
++ "psraw $f0,$f0,$f16\n"
++ "paddw $f4,$f4,$f14\n"
++ "psubw $f8,$f8,$f14\n"
++ ".set\treorder\n"
++ ".set\tmips0\n"
++ :
++ :"m"(*(table+8)),"m"(*(table+16)),"m"(*(table+12)),"m"(*rounder),"m"(*(table+24)),"m"(*(table+20)),"i"(ROW_SHIFT),"m"(*(table+28)),"i"(0x4e)
++ :"$f0","$f2","$f4","$f6","$f8","$f10","$f14","$f16","$f20","$f22","$12","$13","memory"
++ );
++}
++
++static inline void godson2c_row_tail(int16_t * const row, const int store)
++{
++ __asm__ volatile (
++ ".set\tmips3\n"
++ ".set\tnoreorder\n"
++ "dli $12,%2\n"
++ "dmtc1 $12,$f16\n"
++ "psraw $f4,$f4,$f16\n"
++ "psraw $f8,$f8,$f16\n"
++ "packsswh $f0,$f0,$f4\n"
++ "packsswh $f8,$f8,$f2\n"
++ "sdc1 $f0,%0\n"
++ "dli $13,%3\n"
++ "dmtc1 $13,$f22\n"
++ "pshufh $f8,$f8,$f22\n"
++ "sdc1 $f8,%1\n"
++ ".set\treorder\n"
++ ".set\tmips0\n"
++ :"=m"(*(row+store)),"=m"(*(row+store+4))
++ :"i"(ROW_SHIFT),"i"(0xb1)
++ :"$f0","$f2","$f4","$f6","$f8","$f16","$f22","$12","$13","memory"
++ );
++}
++
++static inline void godson2c_row_mid(int16_t * const row, const int store,
++ const int offset,
++ const int16_t * const table)
++{
++ __asm__ volatile (
++ ".set\tmips3\n"
++ ".set\tnoreorder\n"
++ "ldc1 $f6,%2\n"
++ "dli $12,%3\n"
++ "dmtc1 $12,$f16\n"
++ "psraw $f4,$f4,$f16\n"
++ "ldc1 $f14,%4\n"
++ "psraw $f8,$f8,$f16\n"
++ "packsswh $f0,$f0,$f4\n"
++ "mov.d $f10,$f14\n"
++ "packsswh $f8,$f8,$f2\n"
++ "mov.d $f4,$f6\n"
++ "sdc1 $f0,%0\n"
++ "dli $13,%5\n"
++ "dmtc1 $13,$f22\n"
++ "pshufh $f8,$f8,$f22\n"
++ "ldc1 $f2,%6\n"
++ "sdc1 $f8,%1\n"
++ "pmaddhw $f2,$f2,$f4\n"
++ "ldc1 $f8,%7\n"
++ "dli $12,%8\n"
++ "dmtc1 $12,$f16\n"
++ "pshufh $f6,$f6,$f16\n"
++ ".set\treorder\n"
++ ".set\tmips0\n"
++ :"=m"(*(row+store)),"=m"(*(row+store+4))
++ : "m"(*(row+offset)),"i"(ROW_SHIFT),"m"(*(row+offset+4)),"i"(0xb1),"m"(*table),"m"(*(table+4)),"i"(0x4e)
++ :"$f0","$f2","$f4","$f6","$f8","$f10","$14","$f16","$f22","$12","$13","memory"
++ );
++}
++
++static inline void idct_col(int16_t * const col, const int offset)
++{
++#define T1 13036
++#define T2 27146
++#define T3 43790
++#define C4 23170
++ static const short _T1[] ATTR_ALIGN(8) = {T1,T1,T1,T1};
++ static const short _T2[] ATTR_ALIGN(8) = {T2,T2,T2,T2};
++ static const short _T3[] ATTR_ALIGN(8) = {T3,T3,T3,T3};
++ static const short _C4[] ATTR_ALIGN(8) = {C4,C4,C4,C4};
++
++ __asm__ volatile (
++ ".set\tmips3\n"
++ ".set\tnoreorder\n"
++ "ldc1 $f4,%8\n"
++ "ldc1 $f0,%9\n"
++ "mov.d $f6,$f4\n"
++ "ldc1 $f8,%10\n"
++ "pmulhh $f4,$f4,$f0\n"
++ "ldc1 $f14,%11\n"
++ "pmulhh $f6,$f6,$f8\n"
++ "ldc1 $f10,%12\n"
++ "mov.d $f20,$f14\n"
++ "ldc1 $f2,%13\n"
++ "psubsh $f4,$f4,$f8\n"
++ "ldc1 $f8,%14\n"
++ "pmulhh $f14,$f14,$f2\n"
++ "paddsh $f0,$f0,$f6\n"
++ "pmulhh $f20,$f20,$f10\n"
++ "mov.d $f6,$f8\n"
++ "paddsh $f14,$f14,$f2\n"
++ "ldc1 $f16,%15\n"
++ "pmulhh $f8,$f8,$f16\n"
++ "paddsh $f20,$f20,$f10\n"
++ "psubsh $f14,$f14,$f10\n"
++ "paddsh $f20,$f20,$f2\n"
++ "ldc1 $f2,%16\n"
++ "mov.d $f10,$f4\n"
++ "pmulhh $f6,$f6,$f2\n"
++ "psubsh $f4,$f4,$f14\n"
++ "psubsh $f8,$f8,$f2\n"
++ "paddsh $f14,$f14,$f10\n"
++ "sdc1 $f4,%0\n"
++ "mov.d $f10,$f0\n"
++ "ldc1 $f22,%15\n"
++ "paddsh $f6,$f6,$f22\n"
++ "paddsh $f10,$f10,$f20\n"
++ "psubsh $f0,$f0,$f20\n"
++ "mov.d $f20,$f0\n"
++ "ldc1 $f2,%17\n"
++ "paddsh $f0,$f0,$f14\n"
++ "ldc1 $f4,%18\n"
++ "psubsh $f20,$f20,$f14\n"
++ "sdc1 $f10,%1\n"
++ "pmulhh $f0,$f0,$f4\n"
++ "mov.d $f10,$f8\n"
++ "pmulhh $f20,$f20,$f4\n"
++ "ldc1 $f14,%19\n"
++ "mov.d $f4,$f2\n"
++ "psubsh $f2,$f2,$f14\n"
++ "paddsh $f4,$f4,$f14\n"
++ "paddsh $f8,$f8,$f2\n"
++ "mov.d $f14,$f4\n"
++ "psubsh $f2,$f2,$f10\n"
++ "paddsh $f14,$f14,$f6\n"
++ "paddsh $f0,$f0,$f0\n"
++ "psubsh $f4,$f4,$f6\n"
++ "paddsh $f20,$f20,$f20\n"
++ "mov.d $f6,$f2\n"
++ "mov.d $f10,$f8\n"
++ "paddsh $f2,$f2,$f20\n"
++ "dli $12,%20\n"
++ "dmtc1 $12,$f16\n"
++ "psrah $f2,$f2,$f16\n"
++ "paddsh $f8,$f8,$f0\n"
++ "psrah $f8,$f8,$f16\n"
++ "psubsh $f10,$f10,$f0\n"
++ "ldc1 $f0,%12\n"
++ "psubsh $f6,$f6,$f20\n"
++ "psrah $f10,$f10,$f16\n"
++ "mov.d $f20,$f14\n"
++ "sdc1 $f8,%2\n"
++ "psrah $f6,$f6,$f16\n"
++ "sdc1 $f2,%3\n"
++ "paddsh $f14,$f14,$f0\n"
++ "ldc1 $f8,%13\n"
++ "psubsh $f20,$f20,$f0\n"
++ "psrah $f14,$f14,$f16\n"
++ "mov.d $f2,$f4\n"
++ "sdc1 $f6,%1\n"
++ "psubsh $f2,$f2,$f8\n"
++ "psrah $f20,$f20,$f16\n"
++ "paddsh $f8,$f8,$f4\n"
++ "sdc1 $f14,%4\n"
++ "psrah $f2,$f2,$f16\n"
++ "sdc1 $f10,%5\n"
++ "psrah $f8,$f8,$f16\n"
++ "sdc1 $f20,%6\n"
++ "sdc1 $f2,%7\n"
++ "sdc1 $f8,%0\n"
++ ".set\treorder\n"
++ ".set\tmips0\n"
++ :"=m"(*(col+offset+3*8)),"=m"(*(col+offset+5*8)),"=m"(*(col+offset+1*8)),"=m"(*(col+offset+2*8)),"=m"(*(col+offset+0*8)),"=m"(*(col+offset+6*8)),"=m"(*(col+offset+7*8)),"=m"(*(col+offset+4*8))
++ :"m"(*_T1),"m"(*(col+offset+1*8)),"m"(*(col+offset+7*8)),"m"(*_T3),"m"(*(col+offset+5*8)),"m"(*(col+offset+3*8)),"m"(*_T2),"m"(*(col+offset+2*8)),"m"(*(col+offset+6*8)),"m"(*(col+offset+0*8)),"m"(*_C4),"m"(*(col+offset+4*8)),"i"(COL_SHIFT)
++ :"$f0","$f2","$f4","$f6","$f8","$f10","$14","$f16","$20","$f22","$12","memory"
++ );
++}
++
++static const int32_t rounder0[] ATTR_ALIGN(8) =
++ rounder ((1 << (COL_SHIFT - 1)) - 0.5);
++static const int32_t rounder4[] ATTR_ALIGN(8) = rounder (0);
++static const int32_t rounder1[] ATTR_ALIGN(8) =
++ rounder (1.25683487303); /* C1*(C1/C4+C1+C7)/2 */
++static const int32_t rounder7[] ATTR_ALIGN(8) =
++ rounder (-0.25); /* C1*(C7/C4+C7-C1)/2 */
++static const int32_t rounder2[] ATTR_ALIGN(8) =
++ rounder (0.60355339059); /* C2 * (C6+C2)/2 */
++static const int32_t rounder6[] ATTR_ALIGN(8) =
++ rounder (-0.25); /* C2 * (C6-C2)/2 */
++static const int32_t rounder3[] ATTR_ALIGN(8) =
++ rounder (0.087788325588); /* C3*(-C3/C4+C3+C5)/2 */
++static const int32_t rounder5[] ATTR_ALIGN(8) =
++ rounder (-0.441341716183); /* C3*(-C5/C4+C5-C3)/2 */
++
++
++#define declare_idct(idct,table,idct_row_head,idct_row,idct_row_tail,idct_row_mid) \
++static inline void idct (int16_t * const block) \
++{ \
++ static const int16_t table04[] ATTR_ALIGN(16) = \
++ table (22725, 21407, 19266, 16384, 12873, 8867, 4520); \
++ static const int16_t table17[] ATTR_ALIGN(16) = \
++ table (31521, 29692, 26722, 22725, 17855, 12299, 6270); \
++ static const int16_t table26[] ATTR_ALIGN(16) = \
++ table (29692, 27969, 25172, 21407, 16819, 11585, 5906); \
++ static const int16_t table35[] ATTR_ALIGN(16) = \
++ table (26722, 25172, 22654, 19266, 15137, 10426, 5315); \
++ \
++ idct_row_head (block, 0*8, table04); \
++ idct_row (table04, rounder0); \
++ idct_row_mid (block, 0*8, 4*8, table04); \
++ idct_row (table04, rounder4); \
++ idct_row_mid (block, 4*8, 1*8, table17); \
++ idct_row (table17, rounder1); \
++ idct_row_mid (block, 1*8, 7*8, table17); \
++ idct_row (table17, rounder7); \
++ idct_row_mid (block, 7*8, 2*8, table26); \
++ idct_row (table26, rounder2); \
++ idct_row_mid (block, 2*8, 6*8, table26); \
++ idct_row (table26, rounder6); \
++ idct_row_mid (block, 6*8, 3*8, table35); \
++ idct_row (table35, rounder3); \
++ idct_row_mid (block, 3*8, 5*8, table35); \
++ idct_row (table35, rounder5); \
++ idct_row_tail (block, 5*8); \
++ \
++ idct_col (block, 0); \
++ idct_col (block, 4); \
++}
+
+-#if 0
+-#define BUTTERFLY(t0,t1,W0,W1,d0,d1) \
+-do { \
+- t0 = W0 * d0 + W1 * d1; \
+- t1 = W0 * d1 - W1 * d0; \
++#define COPY_GODSON2C(offset,r0,r1,r2) \
++do { \
++ __asm__ volatile ( \
++ ".set mips3\n" \
++ ".set noreorder\n" \
++ "ldc1 " #r0 ",%1\n" \
++ "ldc1 " #r1 ",%2\n" \
++ "sdc1 " #r2 ",%0\n" \
++ "packushb " #r0 "," #r0 "," #r1 "\n" \
++ ".set reorder\n" \
++ ".set mips0\n" \
++ :"=m"(*(dest+stride)) \
++ :"m"(*(block+offset)),"m"(*(block+offset+4)) \
++ :#r0,#r1,#r2,"memory" \
++ ); \
++ dest += stride; \
+ } while (0)
+-#else
+-#define BUTTERFLY(t0,t1,W0,W1,d0,d1) \
+-do { \
+- int tmp = W0 * (d0 + d1); \
+- t0 = tmp + (W1 - W0) * d1; \
+- t1 = tmp - (W1 + W0) * d0; \
++
++static inline void block_copy(int16_t * const block, uint8_t * dest,
++ const int stride)
++{
++ int i;
++
++ __asm__ volatile (
++ ".set mips3\n"
++ ".set noreorder\n"
++ "ldc1 $f4,%1\n"
++ "ldc1 $f0,%2\n"
++ "ldc1 $f6,%3\n"
++ "packushb $f4,$f4,$f0\n"
++ "ldc1 $f2,%4\n"
++ "sdc1 $f4,%0\n"
++ "packushb $f6,$f6,$f2\n"
++ ".set reorder\n"
++ ".set mips0\n"
++ :"=m"(*dest)
++ :"m"(*(block+0*8)),"m"(*(block+0*8+4)),"m"(*(block+1*8)),"m"(*(block+1*8+4))
++ :"$f0","$f2","$f4","$f6","memory"
++ );
++ COPY_GODSON2C (2*8, $f4, $f0, $f6);
++ COPY_GODSON2C (3*8, $f6, $f2, $f4);
++ COPY_GODSON2C (4*8, $f4, $f0, $f6);
++ COPY_GODSON2C (5*8, $f6, $f2, $f4);
++ COPY_GODSON2C (6*8, $f4, $f0, $f6);
++ COPY_GODSON2C (7*8, $f6, $f2, $f4);
++ asm(".set mips3");
++ asm(".set noreorder");
++ asm("sdc1 $f6,%0;":"=m"(*(dest+stride))::"$f6","memory");
++ asm(".set reorder");
++ asm(".set mips0");
++}
++#define ADD_GODSON2C(offset,r1,r2,r3,r4) \
++do { \
++ __asm__ volatile ( \
++ ".set mips3\n" \
++ ".set noreorder\n" \
++ "ldc1 " #r1 ",%1\n" \
++ "packushb " #r3 "," #r3 "," #r4 "\n" \
++ "mov.d " #r2 "," #r1 "\n" \
++ "sdc1 " #r3 ",%0\n" \
++ "punpcklbh " #r1 "," #r1 ",$f4\n" \
++ "ldc1 $f16,%2\n" \
++ "paddsh " #r1 "," #r1 ",$f16\n" \
++ "punpckhbh " #r2 "," #r2 ",$f4\n" \
++ "ldc1 $f22,%3\n" \
++ "paddsh " #r2 "," #r2 ",$f22\n" \
++ ".set noreorder\n" \
++ ".set mips0\n" \
++ :"=m"(*(dest+stride)) \
++ :"m"(*(dest+2*stride)),"m"(*(block+offset)),"m"(*(block+offset+4)) \
++ :#r1,#r2,#r3,#r4,"$f4","$f16","$f22","memory" \
++ ); \
++ dest += stride; \
+ } while (0)
+-#endif
+
+-static inline void idct_row (int16_t * const block)
++static inline void block_add(int16_t * const block, uint8_t * dest,
++ const int stride)
+ {
+- int d0, d1, d2, d3;
+- int a0, a1, a2, a3, b0, b1, b2, b3;
+- int t0, t1, t2, t3;
+-
+- /* shortcut */
+- if (likely (!(block[1] | ((int32_t *)block)[1] | ((int32_t *)block)[2] |
+- ((int32_t *)block)[3]))) {
+- uint32_t tmp = (uint16_t) (block[0] >> 1);
+- tmp |= tmp << 16;
+- ((int32_t *)block)[0] = tmp;
+- ((int32_t *)block)[1] = tmp;
+- ((int32_t *)block)[2] = tmp;
+- ((int32_t *)block)[3] = tmp;
+- return;
+- }
++ __asm__ volatile (
++ ".set mips3\n"
++ ".set noreorder\n"
++ "ldc1 $f0,%1\n"
++ "fxor $f4,$f4,$f4\n"
++ "ldc1 $f2,%2\n"
++ "mov.d $f6,$f0\n"
++ "punpcklbh $f0,$f0,$f4\n"
++ "mov.d $f8,$f2\n"
++ "ldc1 $f16,%3\n"
++ "paddsh $f0,$f0,$f16\n"
++ "punpckhbh $f6,$f6,$f4\n"
++ "ldc1 $f22,%4\n"
++ "paddsh $f6,$f6,$f22\n"
++ "punpcklbh $f2,$f2,$f4\n"
++ "ldc1 $f16,%5\n"
++ "paddsh $f2,$f2,$f16\n"
++ "packushb $f0,$f0,$f6\n"
++ "punpckhbh $f8,$f8,$f4\n"
++ "sdc1 $f0,%0\n"
++ "ldc1 $f22,%6\n"
++ "paddsh $f8,$f8,$f22\n"
++ ".set reorder\n"
++ ".set mips0\n"
++ :"=m"(*dest)
++ :"m"(*dest),"m"(*(dest+stride)),"m"(*(block+0*8)),"m"(*(block+0*8+4)),"m"(*(block+1*8)),"m"(*(block+1*8+4))
++ :"$f0","$f2","$f4","$f6","$f8","$f16","$f22","memory"
++ );
++
++ ADD_GODSON2C (2*8, $f0, $f6, $f2, $f8);
++ ADD_GODSON2C (3*8, $f2, $f8, $f0, $f6);
++ ADD_GODSON2C (4*8, $f0, $f6, $f2, $f8);
++ ADD_GODSON2C (5*8, $f2, $f8, $f0, $f6);
++ ADD_GODSON2C (6*8, $f0, $f6, $f2, $f8);
++ ADD_GODSON2C (7*8, $f2, $f8, $f0, $f6);
++ __asm__ volatile (
++ ".set mips3\n"
++ ".set noreorder\n"
++ "packushb $f2,$f2,$f8\n"
++ "sdc1 $f2,%0\n"
++ ".set reorder\n"
++ ".set mips0\n"
++ :"=m"(*(dest+stride))
++ :
++ :"$f2","$f8","memory"
++ );
++}
+
+- d0 = (block[0] << 11) + 2048;
+- d1 = block[1];
+- d2 = block[2] << 11;
+- d3 = block[3];
+- t0 = d0 + d2;
+- t1 = d0 - d2;
+- BUTTERFLY (t2, t3, W6, W2, d3, d1);
+- a0 = t0 + t2;
+- a1 = t1 + t3;
+- a2 = t1 - t3;
+- a3 = t0 - t2;
+-
+- d0 = block[4];
+- d1 = block[5];
+- d2 = block[6];
+- d3 = block[7];
+- BUTTERFLY (t0, t1, W7, W1, d3, d0);
+- BUTTERFLY (t2, t3, W3, W5, d1, d2);
+- b0 = t0 + t2;
+- b3 = t1 + t3;
+- t0 -= t2;
+- t1 -= t3;
+- b1 = ((t0 + t1) >> 8) * 181;
+- b2 = ((t0 - t1) >> 8) * 181;
+-
+- block[0] = (a0 + b0) >> 12;
+- block[1] = (a1 + b1) >> 12;
+- block[2] = (a2 + b2) >> 12;
+- block[3] = (a3 + b3) >> 12;
+- block[4] = (a3 - b3) >> 12;
+- block[5] = (a2 - b2) >> 12;
+- block[6] = (a1 - b1) >> 12;
+- block[7] = (a0 - b0) >> 12;
+-}
+-
+-static inline void idct_col (int16_t * const block)
+-{
+- int d0, d1, d2, d3;
+- int a0, a1, a2, a3, b0, b1, b2, b3;
+- int t0, t1, t2, t3;
+-
+- d0 = (block[8*0] << 11) + 65536;
+- d1 = block[8*1];
+- d2 = block[8*2] << 11;
+- d3 = block[8*3];
+- t0 = d0 + d2;
+- t1 = d0 - d2;
+- BUTTERFLY (t2, t3, W6, W2, d3, d1);
+- a0 = t0 + t2;
+- a1 = t1 + t3;
+- a2 = t1 - t3;
+- a3 = t0 - t2;
+-
+- d0 = block[8*4];
+- d1 = block[8*5];
+- d2 = block[8*6];
+- d3 = block[8*7];
+- BUTTERFLY (t0, t1, W7, W1, d3, d0);
+- BUTTERFLY (t2, t3, W3, W5, d1, d2);
+- b0 = t0 + t2;
+- b3 = t1 + t3;
+- t0 -= t2;
+- t1 -= t3;
+- b1 = ((t0 + t1) >> 8) * 181;
+- b2 = ((t0 - t1) >> 8) * 181;
+-
+- block[8*0] = (a0 + b0) >> 17;
+- block[8*1] = (a1 + b1) >> 17;
+- block[8*2] = (a2 + b2) >> 17;
+- block[8*3] = (a3 + b3) >> 17;
+- block[8*4] = (a3 - b3) >> 17;
+- block[8*5] = (a2 - b2) >> 17;
+- block[8*6] = (a1 - b1) >> 17;
+- block[8*7] = (a0 - b0) >> 17;
+-}
+-
+-static void mpeg2_idct_copy_c (int16_t * block, uint8_t * dest,
+- const int stride)
+-{
+- int i;
+-
+- for (i = 0; i < 8; i++)
+- idct_row (block + 8 * i);
+- for (i = 0; i < 8; i++)
+- idct_col (block + i);
+- do {
+- dest[0] = CLIP (block[0]);
+- dest[1] = CLIP (block[1]);
+- dest[2] = CLIP (block[2]);
+- dest[3] = CLIP (block[3]);
+- dest[4] = CLIP (block[4]);
+- dest[5] = CLIP (block[5]);
+- dest[6] = CLIP (block[6]);
+- dest[7] = CLIP (block[7]);
+-
+- ((int32_t *)block)[0] = 0; ((int32_t *)block)[1] = 0;
+- ((int32_t *)block)[2] = 0; ((int32_t *)block)[3] = 0;
+-
+- dest += stride;
+- block += 8;
+- } while (--i);
+-}
+-
+-static void mpeg2_idct_add_c (const int last, int16_t * block,
+- uint8_t * dest, const int stride)
+-{
+- int i;
+-
+- if (last != 129 || (block[0] & (7 << 4)) == (4 << 4)) {
+- for (i = 0; i < 8; i++)
+- idct_row (block + 8 * i);
+- for (i = 0; i < 8; i++)
+- idct_col (block + i);
+- do {
+- dest[0] = CLIP (block[0] + dest[0]);
+- dest[1] = CLIP (block[1] + dest[1]);
+- dest[2] = CLIP (block[2] + dest[2]);
+- dest[3] = CLIP (block[3] + dest[3]);
+- dest[4] = CLIP (block[4] + dest[4]);
+- dest[5] = CLIP (block[5] + dest[5]);
+- dest[6] = CLIP (block[6] + dest[6]);
+- dest[7] = CLIP (block[7] + dest[7]);
+-
+- ((int32_t *)block)[0] = 0; ((int32_t *)block)[1] = 0;
+- ((int32_t *)block)[2] = 0; ((int32_t *)block)[3] = 0;
+-
+- dest += stride;
+- block += 8;
+- } while (--i);
+- } else {
+- int DC;
+-
+- DC = (block[0] + 64) >> 7;
+- block[0] = block[63] = 0;
+- i = 8;
+- do {
+- dest[0] = CLIP (DC + dest[0]);
+- dest[1] = CLIP (DC + dest[1]);
+- dest[2] = CLIP (DC + dest[2]);
+- dest[3] = CLIP (DC + dest[3]);
+- dest[4] = CLIP (DC + dest[4]);
+- dest[5] = CLIP (DC + dest[5]);
+- dest[6] = CLIP (DC + dest[6]);
+- dest[7] = CLIP (DC + dest[7]);
+- dest += stride;
+- } while (--i);
+- }
++static inline void block_zero(int16_t * const block)
++{
++ __asm__ volatile (
++ ".set mips3\n"
++ ".set noreorder\n"
++ "fxor $f4,$f4,$f4\n"
++ "sdc1 $f4,%0\n"
++ "sdc1 $f4,%1\n"
++ "sdc1 $f4,%2\n"
++ "sdc1 $f4,%3\n"
++ "sdc1 $f4,%4\n"
++ "sdc1 $f4,%5\n"
++ "sdc1 $f4,%6\n"
++ "sdc1 $f4,%7\n"
++ "sdc1 $f4,%8\n"
++ "sdc1 $f4,%9\n"
++ "sdc1 $f4,%10\n"
++ "sdc1 $f4,%11\n"
++ "sdc1 $f4,%12\n"
++ "sdc1 $f4,%13\n"
++ "sdc1 $f4,%14\n"
++ "sdc1 $f4,%15\n"
++ ".set reorder\n"
++ ".set mips0\n"
++ :"=m"(*(block+0*4)),"=m"(*(block+1*4)),"=m"(*(block+2*4)),"=m"(*(block+3*4)),"=m"(*(block+4*4)),"=m"(*(block+5*4)),"=m"(*(block+6*4)),"=m"(*(block+7*4)),"=m"(*(block+8*4)),"=m"(*(block+9*4)),"=m"(*(block+10*4)),"=m"(*(block+11*4)),"=m"(*(block+12*4)),"=m"(*(block+13*4)),"=m"(*(block+14*4)),"=m"(*(block+15*4))
++ :
++ :"$f4","memory"
++ );
++}
++
++#define dup4(reg) \
++do { \
++ asm(".set\tmips3"::); \
++ asm("dmtc1 $0,$f16;");\
++ asm(".set\tmips2"::); \
++ asm("pshufh " #reg "," #reg ",$f16;"); \
++} while (0)
++
++static inline void block_add_DC (int16_t * const block, uint8_t * dest,
++ const int stride, const int cpu)
++{
++ int32_t temp;
++ int i;
++ int64_t tmp = (block[0]+64)>>7;
++
++ __asm__ volatile (
++ ".set mips3\n"
++ ".set noreorder\n"
++ "lwc1 $f4,%8\n"
++ "mtc1 $0, $f5\n"
++ "fxor $f0,$f0,$f0\n"
++ "ldc1 $f6,%9\n"
++ "dmtc1 $0,$f16\n"
++ "pshufh $f4,$f4,$f16\n"
++ "psubsh $f0,$f0,$f4\n"
++ "packushb $f4,$f4,$f4\n"
++ "paddusb $f6,$f6,$f4\n"
++ "packushb $f0,$f0,$f0\n"
++ "ldc1 $f2,%10\n"
++ "psubusb $f6,$f6,$f0\n"
++ "paddusb $f2,$f2,$f4\n"
++ "sdc1 $f6,%0\n"
++ "psubusb $f2,$f2,$f0\n"
++ "ldc1 $f6,%11\n"
++ "sdc1 $f2,%1\n"
++ "paddusb $f6,$f6,$f4\n"
++ "ldc1 $f2,%12\n"
++ "psubusb $f6,$f6,$f0\n"
++ "paddusb $f2,$f2,$f4\n"
++ "sdc1 $f6,%2\n"
++ "psubusb $f2,$f2,$f0\n"
++ "ldc1 $f6,%13\n"
++ "sdc1 $f2,%3\n"
++ "paddusb $f6,$f6,$f4\n"
++ "ldc1 $f2,%14\n"
++ "psubusb $f6,$f6,$f0\n"
++ "paddusb $f2,$f2,$f4\n"
++ "sdc1 $f6,%4\n"
++ "psubusb $f2,$f2,$f0\n"
++ "ldc1 $f6,%15\n"
++ "sdc1 $f2,%5\n"
++ "paddusb $f6,$f6,$f4\n"
++ "ldc1 $f2,%16\n"
++ "psubusb $f6,$f6,$f0\n"
++ "paddusb $f2,$f2,$f4\n"
++ "sdc1 $f6,%6\n"
++ "psubusb $f2,$f2,$f0\n"
++ "sdc1 $f2,%7\n"
++ ".set reorder\n"
++ ".set mips0\n"
++ :"=m"(*dest),"=m"(*(dest+stride)),"=m"(*(dest+2*stride)),"=m"(*(dest+3*stride)),"=m"(*(dest+4*stride)),"=m"(*(dest+5*stride)),"=m"(*(dest+6*stride)),"=m"(*(dest+7*stride))
++ :"m"(tmp),"m"(*dest),"m"(*(dest+stride)),"m"(*(dest+2*stride)),"m"(*(dest+3*stride)),"m"(*(dest+4*stride)),"m"(*(dest+5*stride)),"m"(*(dest+6*stride)),"m"(*(dest+7*stride))
++ :"$f0","$f2","$f4","$f5","$f6","$f16","$0","memory"
++ );
++ block[0]=0;
++ block[63]=0;
++ dest+=5*stride;
++}
++
++declare_idct (godson2c_idct, godson2c_table,
++ godson2c_row_head, godson2c_row, godson2c_row_tail, godson2c_row_mid)
++
++void mpeg2_idct_copy_c (int16_t * const block, uint8_t * const dest,
++ const int stride)
++{
++ godson2c_idct (block);
++ block_copy (block, dest, stride);
++ block_zero (block);
++}
++
++void mpeg2_idct_add_c (const int last, int16_t * const block,
++ uint8_t * const dest, const int stride)
++{
++#define CPU_GODSON2C 1
++ if (last != 129 || (block[0] & (7 << 4)) == (4<<4)) {
++ godson2c_idct (block);
++ block_add (block, dest, stride);
++ block_zero (block);
++ } else
++ block_add_DC (block, dest, stride, CPU_GODSON2C);
+ }
+
+ void mpeg2_idct_init (uint32_t accel)
+ {
+-#ifdef HAVE_MMX2
++#ifdef ARCH_X86
+ if (accel & MPEG2_ACCEL_X86_MMXEXT) {
+ mpeg2_idct_copy = mpeg2_idct_copy_mmxext;
+ mpeg2_idct_add = mpeg2_idct_add_mmxext;
+ mpeg2_idct_mmx_init ();
+- } else
+-#endif
+-#ifdef HAVE_MMX
+- if (accel & MPEG2_ACCEL_X86_MMX) {
++ } else if (accel & MPEG2_ACCEL_X86_MMX) {
+ mpeg2_idct_copy = mpeg2_idct_copy_mmx;
+ mpeg2_idct_add = mpeg2_idct_add_mmx;
+ mpeg2_idct_mmx_init ();
+ } else
+ #endif
+-#if defined(ARCH_PPC) && defined(HAVE_ALTIVEC)
++#ifdef ARCH_PPC
+ if (accel & MPEG2_ACCEL_PPC_ALTIVEC) {
+ mpeg2_idct_copy = mpeg2_idct_copy_altivec;
+ mpeg2_idct_add = mpeg2_idct_add_altivec;
+@@ -261,14 +619,11 @@
+ } else
+ #endif
+ #ifdef ARCH_ALPHA
+-#ifdef CAN_COMPILE_ALPHA_MVI
+ if (accel & MPEG2_ACCEL_ALPHA_MVI) {
+ mpeg2_idct_copy = mpeg2_idct_copy_mvi;
+ mpeg2_idct_add = mpeg2_idct_add_mvi;
+ mpeg2_idct_alpha_init ();
+- } else
+-#endif
+- if (accel & MPEG2_ACCEL_ALPHA) {
++ } else if (accel & MPEG2_ACCEL_ALPHA) {
+ int i;
+
+ mpeg2_idct_copy = mpeg2_idct_copy_alpha;
+@@ -285,13 +640,11 @@
+
+ mpeg2_idct_copy = mpeg2_idct_copy_c;
+ mpeg2_idct_add = mpeg2_idct_add_c;
+- for (i = -3840; i < 3840 + 256; i++)
+- CLIP(i) = (i < 0) ? 0 : ((i > 255) ? 255 : i);
+ for (i = 0; i < 64; i++) {
+ j = mpeg2_scan_norm[i];
+- mpeg2_scan_norm[i] = ((j & 0x36) >> 1) | ((j & 0x09) << 2);
++ mpeg2_scan_norm[i] = (j & 0x38) | ((j & 6) >> 1) | ((j & 1) << 2);
+ j = mpeg2_scan_alt[i];
+- mpeg2_scan_alt[i] = ((j & 0x36) >> 1) | ((j & 0x09) << 2);
++ mpeg2_scan_alt[i] = (j & 0x38) | ((j & 6) >> 1) | ((j & 1) << 2);
+ }
+ }
+ }
+diff -urN mplayer-20070622.orig/libmpeg2/idct_loongson.c mplayer-20070622/libmpeg2/idct_loongson.c
+--- mplayer-20070622.orig/libmpeg2/idct_loongson.c 1970-01-01 08:00:00.000000000 +0800
++++ mplayer-20070622/libmpeg2/idct_loongson.c 2007-08-04 07:39:59.000000000 +0800
+@@ -0,0 +1,553 @@
++/*
++ * idct_mmx.c
++ * Copyright (C) 2000-2003 Michel Lespinasse <walken@zoy.org>
++ * Copyright (C) 1999-2000 Aaron Holtzman <aholtzma@ess.engr.uvic.ca>
++ *
++ * This file is part of mpeg2dec, a free MPEG-2 video stream decoder.
++ * See http://libmpeg2.sourceforge.net/ for updates.
++ *
++ * mpeg2dec is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2 of the License, or
++ * (at your option) any later version.
++ *
++ * mpeg2dec is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ *
++ * Modified for use with MPlayer, see libmpeg-0.4.0.diff for the exact changes.
++ * detailed changelog at http://svn.mplayerhq.hu/mplayer/trunk/
++ * $Id: idct_mmx.c 18786 2006-06-22 13:34:00Z diego $
++ */
++
++#include "config.h"
++
++#include <inttypes.h>
++
++#include "mpeg2.h"
++#include "attributes.h"
++#include "mpeg2_internal.h"
++#include "loongson_mmx.h"
++
++#define ROW_SHIFT 15
++#define COL_SHIFT 6
++
++#define round(bias) ((int)(((bias)+0.5) * (1<<ROW_SHIFT)))
++#define rounder(bias) {round (bias), round (bias)}
++
++
++/* MMXEXT row IDCT */
++
++#define mmxext_table(c1,c2,c3,c4,c5,c6,c7) { c4, c2, -c4, -c2, \
++ c4, c6, c4, c6, \
++ c1, c3, -c1, -c5, \
++ c5, c7, c3, -c7, \
++ c4, -c6, c4, -c6, \
++ -c4, c2, c4, -c2, \
++ c5, -c1, c3, -c1, \
++ c7, c3, c7, -c5 }
++
++static inline void mmxext_row_head (int16_t * const row, const int offset,
++ const int16_t * const table)
++{
++ movq_m2r (*(row+offset), f4); /* f4 = x6 x4 x2 x0 */
++
++ movq_m2r (*(row+offset+4), f10); /* f10 = x7 x5 x3 x1 */
++ movq_r2r (f4, f0); /* f0 = x6 x4 x2 x0 */
++
++ movq_m2r (*table, f6); /* f6 = -C2 -C4 C2 C4 */
++ movq_r2r (f10, f12); /* f12 = x7 x5 x3 x1 */
++
++ movq_m2r (*(table+4), f8); /* f8 = C6 C4 C6 C4 */
++ pmaddwd_r2r (f0, f6); /* f6 = -C4*x4-C2*x6 C4*x0+C2*x2 */
++
++ pshufw_r2r (f4, f4, 0x4e); /* f4 = x2 x0 x6 x4 */
++}
++
++static inline void mmxext_row (const int16_t * const table,
++ const int32_t * const rounder)
++{
++ movq_m2r (*(table+8), f2); /* f2 = -C5 -C1 C3 C1 */
++ pmaddwd_r2r (f4, f8); /* f8 = C4*x0+C6*x2 C4*x4+C6*x6 */
++
++ pmaddwd_m2r (*(table+16), f0); /* f0 = C4*x4-C6*x6 C4*x0-C6*x2 */
++ pshufw_r2r (f12, f12, 0x4e); /* f12 = x3 x1 x7 x5 */
++
++ movq_m2r (*(table+12), f14); /* f14 = -C7 C3 C7 C5 */
++ pmaddwd_r2r (f10, f2); /* f2 = -C1*x5-C5*x7 C1*x1+C3*x3 */
++
++ paddd_m2r (*rounder, f6); /* f6 += rounder */
++ pmaddwd_r2r (f12, f14); /* f14 = C3*x1-C7*x3 C5*x5+C7*x7 */
++
++ pmaddwd_m2r (*(table+20), f4); /* f4 = C4*x0-C2*x2 -C4*x4+C2*x6 */
++ paddd_r2r (f8, f6); /* f6 = a1 a0 + rounder */
++
++ pmaddwd_m2r (*(table+24), f10); /* f10 = C3*x5-C1*x7 C5*x1-C1*x3 */
++ movq_r2r (f6, f8); /* f8 = a1 a0 + rounder */
++
++ pmaddwd_m2r (*(table+28), f12); /* f12 = C7*x1-C5*x3 C7*x5+C3*x7 */
++ paddd_r2r (f14, f2); /* f2 = b1 b0 */
++
++ paddd_m2r (*rounder, f0); /* f0 += rounder */
++ psubd_r2r (f2, f6); /* f6 = a1-b1 a0-b0 + rounder */
++
++ psrad_i2r (ROW_SHIFT, f6); /* f6 = y6 y7 */
++ paddd_r2r (f8, f2); /* f2 = a1+b1 a0+b0 + rounder */
++
++ paddd_r2r (f4, f0); /* f0 = a3 a2 + rounder */
++ psrad_i2r (ROW_SHIFT, f2); /* f2 = y1 y0 */
++
++ paddd_r2r (f12, f10); /* f10 = b3 b2 */
++ movq_r2r (f0, f8); /* f8 = a3 a2 + rounder */
++
++ paddd_r2r (f10, f0); /* f0 = a3+b3 a2+b2 + rounder */
++ psubd_r2r (f10, f8); /* f8 = a3-b3 a2-b2 + rounder */
++}
++
++static inline void mmxext_row_tail (int16_t * const row, const int store)
++{
++ psrad_i2r (ROW_SHIFT, f0); /* f0 = y3 y2 */
++
++ psrad_i2r (ROW_SHIFT, f8); /* f8 = y4 y5 */
++
++ packssdw_r2r (f0, f2); /* f2 = y3 y2 y1 y0 */
++
++ packssdw_r2r (f6, f8); /* f8 = y6 y7 y4 y5 */
++
++ movq_r2m (f2, *(row+store)); /* save y3 y2 y1 y0 */
++ pshufw_r2r (f8, f8, 0xb1); /* f8 = y7 y6 y5 y4 */
++
++ /* slot */
++
++ movq_r2m (f8, *(row+store+4)); /* save y7 y6 y5 y4 */
++}
++
++static inline void mmxext_row_mid (int16_t * const row, const int store,
++ const int offset,
++ const int16_t * const table)
++{
++ movq_m2r (*(row+offset), f4); /* f4 = x6 x4 x2 x0 */
++ psrad_i2r (ROW_SHIFT, f0); /* f0 = y3 y2 */
++
++ movq_m2r (*(row+offset+4), f10); /* f10 = x7 x5 x3 x1 */
++ psrad_i2r (ROW_SHIFT, f8); /* f8 = y4 y5 */
++
++ packssdw_r2r (f0, f2); /* f2 = y3 y2 y1 y0 */
++ movq_r2r (f10, f12); /* f12 = x7 x5 x3 x1 */
++
++ packssdw_r2r (f6, f8); /* f8 = y6 y7 y4 y5 */
++ movq_r2r (f4, f0); /* f0 = x6 x4 x2 x0 */
++
++ movq_r2m (f2, *(row+store)); /* save y3 y2 y1 y0 */
++ pshufw_r2r (f8, f8, 0xb1); /* f8 = y7 y6 y5 y4 */
++
++ movq_m2r (*table, f6); /* f6 = -C2 -C4 C2 C4 */
++ movq_r2m (f8, *(row+store+4)); /* save y7 y6 y5 y4 */
++
++ pmaddwd_r2r (f0, f6); /* f6 = -C4*x4-C2*x6 C4*x0+C2*x2 */
++
++ movq_m2r (*(table+4), f8); /* f8 = C6 C4 C6 C4 */
++ pshufw_r2r (f4, f4, 0x4e); /* f4 = x2 x0 x6 x4 */
++}
++
++
++/* MMX row IDCT */
++
++/* MMX column IDCT */
++static inline void idct_col (int16_t * const col, const int offset)
++{
++#define T1 13036
++#define T2 27146
++#define T3 43790
++#define C4 23170
++
++ static const short _T1[] ATTR_ALIGN(8) = {T1,T1,T1,T1};
++ static const short _T2[] ATTR_ALIGN(8) = {T2,T2,T2,T2};
++ static const short _T3[] ATTR_ALIGN(8) = {T3,T3,T3,T3};
++ static const short _C4[] ATTR_ALIGN(8) = {C4,C4,C4,C4};
++
++ /* column code adapted from peter gubanov */
++ /* http://www.elecard.com/peter/idct.shtml */
++
++ movq_m2r (*_T1, f0); /* f0 = T1 */
++
++ movq_m2r (*(col+offset+1*8), f2); /* f2 = x1 */
++ movq_r2r (f0, f4); /* f4 = T1 */
++
++ movq_m2r (*(col+offset+7*8), f8); /* f8 = x7 */
++ pmulhw_r2r (f2, f0); /* f0 = T1*x1 */
++
++ movq_m2r (*_T3, f10); /* f10 = T3 */
++ pmulhw_r2r (f8, f4); /* f4 = T1*x7 */
++
++ movq_m2r (*(col+offset+5*8), f12); /* f12 = x5 */
++ movq_r2r (f10, f14); /* f14 = T3-1 */
++
++ movq_m2r (*(col+offset+3*8), f6); /* f6 = x3 */
++ psubsw_r2r (f8, f0); /* f0 = v17 */
++
++ movq_m2r (*_T2, f8); /* f8 = T2 */
++ pmulhw_r2r (f6, f10); /* f10 = (T3-1)*x3 */
++
++ paddsw_r2r (f4, f2); /* f2 = u17 */
++ pmulhw_r2r (f12, f14); /* f14 = (T3-1)*x5 */
++
++ /* slot */
++
++ movq_r2r (f8, f4); /* f4 = T2 */
++ paddsw_r2r (f6, f10); /* f10 = T3*x3 */
++
++ pmulhw_m2r (*(col+offset+2*8), f8);/* f8 = T2*x2 */
++ paddsw_r2r (f12, f14); /* f14 = T3*x5 */
++
++ psubsw_r2r (f12, f10); /* f10 = v35 */
++ paddsw_r2r (f6, f14); /* f14 = u35 */
++
++ movq_m2r (*(col+offset+6*8), f6); /* f6 = x6 */
++ movq_r2r (f0, f12); /* f12 = v17 */
++
++ pmulhw_r2r (f6, f4); /* f4 = T2*x6 */
++ psubsw_r2r (f10, f0); /* f0 = b3 */
++
++ psubsw_r2r (f6, f8); /* f8 = v26 */
++ paddsw_r2r (f12, f10); /* f10 = v12 */
++
++ movq_r2m (f0, *(col+offset+3*8)); /* save b3 in scratch0 */
++ movq_r2r (f2, f12); /* f12 = u17 */
++
++ paddsw_m2r (*(col+offset+2*8), f4);/* f4 = u26 */
++ paddsw_r2r (f14, f12); /* f12 = b0 */
++
++ psubsw_r2r (f14, f2); /* f2 = u12 */
++ movq_r2r (f2, f14); /* f14 = u12 */
++
++ movq_m2r (*(col+offset+0*8), f6); /* f6 = x0 */
++ paddsw_r2r (f10, f2); /* f2 = u12+v12 */
++
++ movq_m2r (*_C4, f0); /* f0 = C4/2 */
++ psubsw_r2r (f10, f14); /* f14 = u12-v12 */
++
++ movq_r2m (f12, *(col+offset+5*8)); /* save b0 in scratch1 */
++ pmulhw_r2r (f0, f2); /* f2 = b1/2 */
++
++ movq_r2r (f8, f12); /* f12 = v26 */
++ pmulhw_r2r (f0, f14); /* f14 = b2/2 */
++
++ movq_m2r (*(col+offset+4*8), f10); /* f10 = x4 */
++ movq_r2r (f6, f0); /* f0 = x0 */
++
++ psubsw_r2r (f10, f6); /* f6 = v04 */
++ paddsw_r2r (f10, f0); /* f0 = u04 */
++
++ paddsw_r2r (f6, f8); /* f8 = a1 */
++ movq_r2r (f0, f10); /* f10 = u04 */
++
++ psubsw_r2r (f12, f6); /* f6 = a2 */
++ paddsw_r2r (f4, f10); /* f10 = a0 */
++
++ paddsw_r2r (f2, f2); /* f2 = b1 */
++ psubsw_r2r (f4, f0); /* f0 = a3 */
++
++ paddsw_r2r (f14, f14); /* f14 = b2 */
++ movq_r2r (f6, f4); /* f4 = a2 */
++
++ movq_r2r (f8, f12); /* f12 = a1 */
++ paddsw_r2r (f14, f6); /* f6 = a2+b2 */
++
++ psraw_i2r (COL_SHIFT, f6); /* f6 = y2 */
++ paddsw_r2r (f2, f8); /* f8 = a1+b1 */
++
++ psraw_i2r (COL_SHIFT, f8); /* f8 = y1 */
++ psubsw_r2r (f2, f12); /* f12 = a1-b1 */
++
++ movq_m2r (*(col+offset+5*8), f2); /* f2 = b0 */
++ psubsw_r2r (f14, f4); /* f4 = a2-b2 */
++
++ psraw_i2r (COL_SHIFT, f12); /* f12 = y6 */
++ movq_r2r (f10, f14); /* f14 = a0 */
++
++ movq_r2m (f8, *(col+offset+1*8)); /* save y1 */
++ psraw_i2r (COL_SHIFT, f4); /* f4 = y5 */
++
++ movq_r2m (f6, *(col+offset+2*8)); /* save y2 */
++ paddsw_r2r (f2, f10); /* f10 = a0+b0 */
++
++ movq_m2r (*(col+offset+3*8), f8); /* f8 = b3 */
++ psubsw_r2r (f2, f14); /* f14 = a0-b0 */
++
++ psraw_i2r (COL_SHIFT, f10); /* f10 = y0 */
++ movq_r2r (f0, f6); /* f6 = a3 */
++
++ movq_r2m (f4, *(col+offset+5*8)); /* save y5 */
++ psubsw_r2r (f8, f6); /* f6 = a3-b3 */
++
++ psraw_i2r (COL_SHIFT, f14); /* f14 = y7 */
++ paddsw_r2r (f0, f8); /* f8 = a3+b3 */
++
++ movq_r2m (f10, *(col+offset+0*8)); /* save y0 */
++ psraw_i2r (COL_SHIFT, f6); /* f6 = y4 */
++
++ movq_r2m (f12, *(col+offset+6*8)); /* save y6 */
++ psraw_i2r (COL_SHIFT, f8); /* f8 = y3 */
++
++ movq_r2m (f14, *(col+offset+7*8)); /* save y7 */
++
++ movq_r2m (f6, *(col+offset+4*8)); /* save y4 */
++
++ movq_r2m (f8, *(col+offset+3*8)); /* save y3 */
++}
++
++
++static const int32_t rounder0[] ATTR_ALIGN(8) =
++ rounder ((1 << (COL_SHIFT - 1)) - 0.5);
++static const int32_t rounder4[] ATTR_ALIGN(8) = rounder (0);
++static const int32_t rounder1[] ATTR_ALIGN(8) =
++ rounder (1.25683487303); /* C1*(C1/C4+C1+C7)/2 */
++static const int32_t rounder7[] ATTR_ALIGN(8) =
++ rounder (-0.25); /* C1*(C7/C4+C7-C1)/2 */
++static const int32_t rounder2[] ATTR_ALIGN(8) =
++ rounder (0.60355339059); /* C2 * (C6+C2)/2 */
++static const int32_t rounder6[] ATTR_ALIGN(8) =
++ rounder (-0.25); /* C2 * (C6-C2)/2 */
++static const int32_t rounder3[] ATTR_ALIGN(8) =
++ rounder (0.087788325588); /* C3*(-C3/C4+C3+C5)/2 */
++static const int32_t rounder5[] ATTR_ALIGN(8) =
++ rounder (-0.441341716183); /* C3*(-C5/C4+C5-C3)/2 */
++
++
++#define declare_idct(idct,table,idct_row_head,idct_row,idct_row_tail,idct_row_mid) \
++static inline void idct (int16_t * const block) \
++{ \
++ static const int16_t table04[] ATTR_ALIGN(16) = \
++ table (22725, 21407, 19266, 16384, 12873, 8867, 4520); \
++ static const int16_t table17[] ATTR_ALIGN(16) = \
++ table (31521, 29692, 26722, 22725, 17855, 12299, 6270); \
++ static const int16_t table26[] ATTR_ALIGN(16) = \
++ table (29692, 27969, 25172, 21407, 16819, 11585, 5906); \
++ static const int16_t table35[] ATTR_ALIGN(16) = \
++ table (26722, 25172, 22654, 19266, 15137, 10426, 5315); \
++ \
++ idct_row_head (block, 0*8, table04); \
++ idct_row (table04, rounder0); \
++ idct_row_mid (block, 0*8, 4*8, table04); \
++ idct_row (table04, rounder4); \
++ idct_row_mid (block, 4*8, 1*8, table17); \
++ idct_row (table17, rounder1); \
++ idct_row_mid (block, 1*8, 7*8, table17); \
++ idct_row (table17, rounder7); \
++ idct_row_mid (block, 7*8, 2*8, table26); \
++ idct_row (table26, rounder2); \
++ idct_row_mid (block, 2*8, 6*8, table26); \
++ idct_row (table26, rounder6); \
++ idct_row_mid (block, 6*8, 3*8, table35); \
++ idct_row (table35, rounder3); \
++ idct_row_mid (block, 3*8, 5*8, table35); \
++ idct_row (table35, rounder5); \
++ idct_row_tail (block, 5*8); \
++ \
++ idct_col (block, 0); \
++ idct_col (block, 4); \
++}
++
++
++#define COPY_MMX(offset,r0,r1,r2) \
++do { \
++ movq_m2r (*(block+offset), r0); \
++ dest += stride; \
++ movq_m2r (*(block+offset+4), r1); \
++ movq_r2m (r2, *dest); \
++ packuswb_r2r (r1, r0); \
++} while (0)
++
++static inline void block_copy (int16_t * const block, uint8_t * dest,
++ const int stride)
++{
++ movq_m2r (*(block+0*8), f0);
++ movq_m2r (*(block+0*8+4), f2);
++ movq_m2r (*(block+1*8), f4);
++ packuswb_r2r (f2, f0);
++ movq_m2r (*(block+1*8+4), f6);
++ movq_r2m (f0, *dest);
++ packuswb_r2r (f6, f4);
++ COPY_MMX (2*8, f0, f2, f4);
++ COPY_MMX (3*8, f4, f6, f0);
++ COPY_MMX (4*8, f0, f2, f4);
++ COPY_MMX (5*8, f4, f6, f0);
++ COPY_MMX (6*8, f0, f2, f4);
++ COPY_MMX (7*8, f4, f6, f0);
++ movq_r2m (f4, *(dest+stride));
++}
++
++
++#define ADD_MMX(offset,r1,r2,r3,r4) \
++do { \
++ movq_m2r (*(dest+2*stride), r1); \
++ packuswb_r2r (r4, r3); \
++ movq_r2r (r1, r2); \
++ dest += stride; \
++ movq_r2m (r3, *dest); \
++ punpcklbw_r2r (f0, r1); \
++ paddsw_m2r (*(block+offset), r1); \
++ punpckhbw_r2r (f0, r2); \
++ paddsw_m2r (*(block+offset+4), r2); \
++} while (0)
++
++static inline void block_add (int16_t * const block, uint8_t * dest,
++ const int stride)
++{
++ movq_m2r (*dest, f2);
++ pxor_r2r (f0, f0);
++ movq_m2r (*(dest+stride), f6);
++ movq_r2r (f2, f4);
++ punpcklbw_r2r (f0, f2);
++ movq_r2r (f6, f8);
++ paddsw_m2r (*(block+0*8), f2);
++ punpckhbw_r2r (f0, f4);
++ paddsw_m2r (*(block+0*8+4), f4);
++ punpcklbw_r2r (f0, f6);
++ paddsw_m2r (*(block+1*8), f6);
++ packuswb_r2r (f4, f2);
++ punpckhbw_r2r (f0, f8);
++ movq_r2m (f2, *dest);
++ paddsw_m2r (*(block+1*8+4), f8);
++ ADD_MMX (2*8, f2, f4, f6, f8);
++ ADD_MMX (3*8, f6, f8, f2, f4);
++ ADD_MMX (4*8, f2, f4, f6, f8);
++ ADD_MMX (5*8, f6, f8, f2, f4);
++ ADD_MMX (6*8, f2, f4, f6, f8);
++ ADD_MMX (7*8, f6, f8, f2, f4);
++ packuswb_r2r (f8, f6);
++ movq_r2m (f6, *(dest+stride));
++}
++
++
++static inline void block_zero (int16_t * const block)
++{
++ pxor_r2r (f0, f0);
++ movq_r2m (f0, *(block+0*4));
++ movq_r2m (f0, *(block+1*4));
++ movq_r2m (f0, *(block+2*4));
++ movq_r2m (f0, *(block+3*4));
++ movq_r2m (f0, *(block+4*4));
++ movq_r2m (f0, *(block+5*4));
++ movq_r2m (f0, *(block+6*4));
++ movq_r2m (f0, *(block+7*4));
++ movq_r2m (f0, *(block+8*4));
++ movq_r2m (f0, *(block+9*4));
++ movq_r2m (f0, *(block+10*4));
++ movq_r2m (f0, *(block+11*4));
++ movq_r2m (f0, *(block+12*4));
++ movq_r2m (f0, *(block+13*4));
++ movq_r2m (f0, *(block+14*4));
++ movq_r2m (f0, *(block+15*4));
++}
++
++
++#define CPU_MMXEXT 0
++#define CPU_MMX 1
++
++#define dup4(reg) \
++do { \
++ if (cpu != CPU_MMXEXT) { \
++ punpcklwd_r2r (reg, reg); \
++ punpckldq_r2r (reg, reg); \
++ } else \
++ pshufw_r2r (reg, reg, 0x00); \
++} while (0)
++
++static inline void block_add_DC (int16_t * const block, uint8_t * dest,
++ const int stride, const int cpu)
++{
++ int16_t tmp = (block[0] + 64) >> 7;
++/* movd_v2r ((block[0] + 64) >> 7, f0); */
++ movd_m2r (tmp, f0);
++ pxor_r2r (f2, f2);
++ movq_m2r (*dest, f4);
++ dup4 (f0);
++ psubsw_r2r (f0, f2);
++ packuswb_r2r (f0, f0);
++ paddusb_r2r (f0, f4);
++ packuswb_r2r (f2, f2);
++ movq_m2r (*(dest + stride), f6);
++ psubusb_r2r (f2, f4);
++ block[0] = 0;
++ paddusb_r2r (f0, f6);
++ movq_r2m (f4, *dest);
++ psubusb_r2r (f2, f6);
++ movq_m2r (*(dest + 2*stride), f4);
++ dest += stride;
++ movq_r2m (f6, *dest);
++ paddusb_r2r (f0, f4);
++ movq_m2r (*(dest + 2*stride), f6);
++ psubusb_r2r (f2, f4);
++ dest += stride;
++ paddusb_r2r (f0, f6);
++ movq_r2m (f4, *dest);
++ psubusb_r2r (f2, f6);
++ movq_m2r (*(dest + 2*stride), f4);
++ dest += stride;
++ movq_r2m (f6, *dest);
++ paddusb_r2r (f0, f4);
++ movq_m2r (*(dest + 2*stride), f6);
++ psubusb_r2r (f2, f4);
++ dest += stride;
++ paddusb_r2r (f0, f6);
++ movq_r2m (f4, *dest);
++ psubusb_r2r (f2, f6);
++ movq_m2r (*(dest + 2*stride), f4);
++ dest += stride;
++ movq_r2m (f6, *dest);
++ paddusb_r2r (f0, f4);
++ movq_m2r (*(dest + 2*stride), f6);
++ psubusb_r2r (f2, f4);
++ block[63] = 0;
++ paddusb_r2r (f0, f6);
++ movq_r2m (f4, *(dest + stride));
++ psubusb_r2r (f2, f6);
++ movq_r2m (f6, *(dest + 2*stride));
++}
++
++
++declare_idct (mmxext_idct, mmxext_table,
++ mmxext_row_head, mmxext_row, mmxext_row_tail, mmxext_row_mid)
++
++void mpeg2_idct_copy_mmxext (int16_t * const block, uint8_t * const dest,
++ const int stride)
++{
++ mmxext_idct (block);
++ block_copy (block, dest, stride);
++ block_zero (block);
++}
++
++void mpeg2_idct_add_mmxext (const int last, int16_t * const block,
++ uint8_t * const dest, const int stride)
++{
++ if (last != 129 || (block[0] & (7 << 4)) == (4 << 4)) {
++ mmxext_idct (block);
++ block_add (block, dest, stride);
++ block_zero (block);
++ } else
++ block_add_DC (block, dest, stride, CPU_MMXEXT);
++}
++
++
++void mpeg2_idct_mmx_init (void)
++{
++ extern uint8_t mpeg2_scan_norm[64];
++ extern uint8_t mpeg2_scan_alt[64];
++ int i, j;
++
++ /* the mmx/mmxext idct uses a reordered input, so we patch scan tables */
++
++ for (i = 0; i < 64; i++) {
++ j = mpeg2_scan_norm[i];
++ mpeg2_scan_norm[i] = (j & 0x38) | ((j & 6) >> 1) | ((j & 1) << 2);
++ j = mpeg2_scan_alt[i];
++ mpeg2_scan_alt[i] = (j & 0x38) | ((j & 6) >> 1) | ((j & 1) << 2);
++ }
++}
+diff -urN mplayer-20070622.orig/libmpeg2/loongson_mmx.h mplayer-20070622/libmpeg2/loongson_mmx.h
+--- mplayer-20070622.orig/libmpeg2/loongson_mmx.h 1970-01-01 08:00:00.000000000 +0800
++++ mplayer-20070622/libmpeg2/loongson_mmx.h 2007-08-04 07:39:59.000000000 +0800
+@@ -0,0 +1,327 @@
++/*
++ * mmx.h
++ * Copyright (C) 1997-2001 H. Dietz and R. Fisher
++ *
++ * This file is part of FFmpeg.
++ *
++ * FFmpeg is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * FFmpeg is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with FFmpeg; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
++ */
++#ifndef AVCODEC_LOONGSONMMX_H
++#define AVCODEC_LOOGNSONMMX_H
++
++/*
++ * The type of an value that fits in an MMX register (note that long
++ * long constant values MUST be suffixed by LL and unsigned long long
++ * values by ULL, lest they be truncated by the compiler)
++ */
++
++typedef union {
++ long long q; /* Quadword (64-bit) value */
++ unsigned long long uq; /* Unsigned Quadword */
++ int d[2]; /* 2 Doubleword (32-bit) values */
++ unsigned int ud[2]; /* 2 Unsigned Doubleword */
++ short w[4]; /* 4 Word (16-bit) values */
++ unsigned short uw[4]; /* 4 Unsigned Word */
++ char b[8]; /* 8 Byte (8-bit) values */
++ unsigned char ub[8]; /* 8 Unsigned Byte */
++ float s[2]; /* Single-precision (32-bit) value */
++} mmx_t; /* On an 8-byte (64-bit) boundary */
++
++
++#define mmx_i2r(op,imm,reg) \
++ __asm__ __volatile__ ( \
++ ".set mips3\n\t"\
++ ".set noreorder\n\t"\
++ "dli $8,%0 \n\t" \
++ "dmtc1 $8,$f16 \n\t" \
++ #op " $"#reg ",$f16\n\t" \
++ ".set mips1\n\t"\
++ ".set reorder\n\t"\
++ : /* nothing */ \
++ : "i" (imm):"$8" )
++
++#define mmx_m2r(op,mem,reg) \
++ __asm__ __volatile__ ( \
++ ".set mips3\n\t"\
++ ".set noreorder\n\t"\
++ "ldr $8,(%0) \n\t" \
++ "ldl $8,7(%0) \n\t" \
++ "dmtc1 $8,$f16 \n\t" \
++ #op " $"#reg",$f16 \n\t" \
++ ".set mips1\n\t"\
++ ".set reorder\n\t"\
++ : /* nothing */ \
++ : "r" (&mem): "$8")
++
++#define mmx_r2m(op,reg,mem) \
++ __asm__ __volatile__ ( \
++ ".set mips3\n\t"\
++ ".set noreorder\n\t"\
++ "ldr $8,%0 \n\t" \
++ "ldl $8,7+%0 \n\t" \
++ "dmtc1 $8,$f16 \n\t" \
++ #op " $f16, $"#reg "\n\t" \
++ "sdc1 $f16,%0 \n\t"\
++ ".set mips1\n\t"\
++ ".set reorder\n\t"\
++ : "=m" (mem) \
++ : /* nothing */:"$8")
++
++#define mmx_r2r(op,regs,regd) \
++ __asm__ __volatile__ (\
++ ".set mips3\n\t"\
++ ".set noreorder\n\t"\
++ #op " $"#regd ", $"#regs "\n\t"\
++ ".set mips1\n\t"\
++ ".set reorder\n\t")
++
++
++#define movd_r2m(reg,var) mmx_r2m (movd, reg, var)
++#define movd_r2r(regs,regd) mmx_r2r (movd, regs, regd)
++
++#define movd_m2r(var,reg) \
++ __asm__ __volatile (\
++ ".set mips3\n\t"\
++ ".set noreorder\n\t"\
++ "lwr $8,%0 \n\t" \
++ "lwl $8,3+%0 \n\t" \
++ "dmtc1 $8, $" #reg " \n\t" \
++ ".set mips1\n\t"\
++ ".set reorder\n\t"\
++ ::"m"(var):"$8")
++
++#define movq_m2r(var,reg) \
++ __asm__ __volatile (\
++ ".set mips3\n\t"\
++ ".set noreorder\n\t"\
++ "ldr $8,(%0) \n\t" \
++ "ldl $8,7(%0) \n\t" \
++ "dmtc1 $8, $" #reg " \n\t" \
++ ".set mips1\n\t"\
++ ".set reorder\n\t"\
++ ::"r"(&var):"$8")
++
++#define movq_r2m(reg,var) \
++ __asm__ __volatile (\
++ ".set mips3\n\t"\
++ ".set noreorder\n\t"\
++ "sdc1 $"#reg", %0\n\t"\
++ ".set mips1\n\t"\
++ ".set reorder\n\t"\
++ :"=m"(var):)
++
++
++#define movq_r2r(regs,regd) \
++ __asm__ __volatile (\
++ ".set mips3\n\t"\
++ ".set noreorder\n\t"\
++ "mov.d $"#regd", $" #regs" \n\t"\
++ ".set mips1\n\t"\
++ ".set reorder\n\t")
++
++#define packssdw_m2r(var,reg) mmx_m2r (packsswh, var, reg)
++#define packssdw_r2r(regs,regd) mmx_r2r (packsswh, regs, regd)
++#define packsswb_m2r(var,reg) mmx_m2r (packsshb, var, reg)
++#define packsswb_r2r(regs,regd) mmx_r2r (packsshb, regs, regd)
++
++#define packuswb_m2r(var,reg) mmx_m2r (packushb, var, reg)
++#define packuswb_r2r(regs,regd) mmx_r2r (packushb, regs, regd)
++
++#define paddb_m2r(var,reg) mmx_m2r (paddb, var, reg)
++#define paddb_r2r(regs,regd) mmx_r2r (paddb, regs, regd)
++#define paddd_m2r(var,reg) mmx_m2r (paddw, var, reg)
++#define paddd_r2r(regs,regd) mmx_r2r (paddw, regs, regd)
++#define paddw_m2r(var,reg) mmx_m2r (paddh, var, reg)
++#define paddw_r2r(regs,regd) mmx_r2r (paddh, regs, regd)
++
++#define paddsb_m2r(var,reg) mmx_m2r (paddsb, var, reg)
++#define paddsb_r2r(regs,regd) mmx_r2r (paddsb, regs, regd)
++#define paddsw_m2r(var,reg) mmx_m2r (paddsh, var, reg)
++#define paddsw_r2r(regs,regd) mmx_r2r (paddsh, regs, regd)
++
++#define paddusb_m2r(var,reg) mmx_m2r (paddusb, var, reg)
++#define paddusb_r2r(regs,regd) mmx_r2r (paddusb, regs, regd)
++#define paddusw_m2r(var,reg) mmx_m2r (paddush, var, reg)
++#define paddusw_r2r(regs,regd) mmx_r2r (paddush, regs, regd)
++
++#define pand_m2r(var,reg) mmx_m2r (fand, var, reg)
++#define pand_r2r(regs,regd) mmx_r2r (fand, regs, regd)
++
++#define pandn_m2r(var,reg) mmx_m2r (pandn, var, reg)
++#define pandn_r2r(regs,regd) mmx_r2r (pandn, regs, regd)
++
++#define pcmpeqb_m2r(var,reg) mmx_m2r (pcmpeqb, var, reg)
++#define pcmpeqb_r2r(regs,regd) mmx_r2r (pcmpeqb, regs, regd)
++#define pcmpeqd_m2r(var,reg) mmx_m2r (pcmpeqw, var, reg)
++#define pcmpeqd_r2r(regs,regd) mmx_r2r (pcmpeqw, regs, regd)
++#define pcmpeqw_m2r(var,reg) mmx_m2r (pcmpeqh, var, reg)
++#define pcmpeqw_r2r(regs,regd) mmx_r2r (pcmpeqh, regs, regd)
++
++#define pcmpgtb_m2r(var,reg) mmx_m2r (pcmpgtb, var, reg)
++#define pcmpgtb_r2r(regs,regd) mmx_r2r (pcmpgtb, regs, regd)
++#define pcmpgtd_m2r(var,reg) mmx_m2r (pcmpgtw, var, reg)
++#define pcmpgtd_r2r(regs,regd) mmx_r2r (pcmpgtw, regs, regd)
++#define pcmpgtw_m2r(var,reg) mmx_m2r (pcmpgth, var, reg)
++#define pcmpgtw_r2r(regs,regd) mmx_r2r (pcmpgth, regs, regd)
++
++#define pmaddwd_m2r(var,reg) mmx_m2r (pmaddhw, var, reg)
++#define pmaddwd_r2r(regs,regd) mmx_r2r (pmaddhw, regs, regd)
++
++#define pmulhw_m2r(var,reg) mmx_m2r (pmulhh, var, reg)
++#define pmulhw_r2r(regs,regd) mmx_r2r (pmulhh, regs, regd)
++
++#define pmullw_m2r(var,reg) mmx_m2r (pmullh, var, reg)
++#define pmullw_r2r(regs,regd) mmx_r2r (pmullh, regs, regd)
++
++#define por_m2r(var,reg) mmx_m2r (for, var, reg)
++#define por_r2r(regs,regd) mmx_r2r (for, regs, regd)
++
++#define pslld_i2r(imm,reg) mmx_i2r (psllw, imm, reg)
++#define pslld_m2r(var,reg) mmx_m2r (psllw, var, reg)
++#define pslld_r2r(regs,regd) mmx_r2r (psllw, regs, regd)
++#define psllq_i2r(imm,reg) mmx_i2r (fdsll, imm, reg)
++#define psllq_m2r(var,reg) mmx_m2r (fdsll, var, reg)
++#define psllq_r2r(regs,regd) mmx_r2r (fdsll, regs, regd)
++#define psllw_i2r(imm,reg) mmx_i2r (psllh, imm, reg)
++#define psllw_m2r(var,reg) mmx_m2r (psllh, var, reg)
++#define psllw_r2r(regs,regd) mmx_r2r (psllh, regs, regd)
++
++#define psrad_i2r(imm,reg) mmx_i2r (psraw, imm, reg)
++#define psrad_m2r(var,reg) mmx_m2r (psraw, var, reg)
++#define psrad_r2r(regs,regd) mmx_r2r (psraw, regs, regd)
++#define psraw_i2r(imm,reg) mmx_i2r (psrah, imm, reg)
++#define psraw_m2r(var,reg) mmx_m2r (psrah, var, reg)
++#define psraw_r2r(regs,regd) mmx_r2r (psrah, regs, regd)
++
++#define psrld_i2r(imm,reg) mmx_i2r (psrlw, imm, reg)
++#define psrld_m2r(var,reg) mmx_m2r (psrlw, var, reg)
++#define psrld_r2r(regs,regd) mmx_r2r (psrlw, regs, regd)
++#define psrlq_i2r(imm,reg) mmx_i2r (fdsrl, imm, reg)
++#define psrlq_m2r(var,reg) mmx_m2r (fdsrl, var, reg)
++#define psrlq_r2r(regs,regd) mmx_r2r (fdsrl, regs, regd)
++#define psrlw_i2r(imm,reg) mmx_i2r (psrlh, imm, reg)
++#define psrlw_m2r(var,reg) mmx_m2r (psrlh, var, reg)
++#define psrlw_r2r(regs,regd) mmx_r2r (psrlh, regs, regd)
++
++#define psubb_m2r(var,reg) mmx_m2r (psubb, var, reg)
++#define psubb_r2r(regs,regd) mmx_r2r (psubb, regs, regd)
++#define psubd_m2r(var,reg) mmx_m2r (psubw, var, reg)
++#define psubd_r2r(regs,regd) mmx_r2r (psubw, regs, regd)
++#define psubw_m2r(var,reg) mmx_m2r (psubh, var, reg)
++#define psubw_r2r(regs,regd) mmx_r2r (psubh, regs, regd)
++
++#define psubsb_m2r(var,reg) mmx_m2r (psubsb, var, reg)
++#define psubsb_r2r(regs,regd) mmx_r2r (psubsb, regs, regd)
++#define psubsw_m2r(var,reg) mmx_m2r (psubsh, var, reg)
++#define psubsw_r2r(regs,regd) mmx_r2r (psubsh, regs, regd)
++
++#define psubusb_m2r(var,reg) mmx_m2r (psubusb, var, reg)
++#define psubusb_r2r(regs,regd) mmx_r2r (psubusb, regs, regd)
++#define psubusw_m2r(var,reg) mmx_m2r (psubush, var, reg)
++#define psubusw_r2r(regs,regd) mmx_r2r (psubush, regs, regd)
++
++#define punpckhbw_m2r(var,reg) mmx_m2r (punpckhbh, var, reg)
++#define punpckhbw_r2r(regs,regd) mmx_r2r (punpckhbh, regs, regd)
++#define punpckhdq_m2r(var,reg) mmx_m2r (punpckhwd, var, reg)
++#define punpckhdq_r2r(regs,regd) mmx_r2r (punpckhwd, regs, regd)
++#define punpckhwd_m2r(var,reg) mmx_m2r (punpckhhw, var, reg)
++#define punpckhwd_r2r(regs,regd) mmx_r2r (punpckhhw, regs, regd)
++
++#define punpcklbw_m2r(var,reg) mmx_m2r (punpcklbh, var, reg)
++#define punpcklbw_r2r(regs,regd) mmx_r2r (punpcklbh, regs, regd)
++#define punpckldq_m2r(var,reg) mmx_m2r (punpcklwd, var, reg)
++#define punpckldq_r2r(regs,regd) mmx_r2r (punpcklwd, regs, regd)
++#define punpcklwd_m2r(var,reg) mmx_m2r (punpcklhw, var, reg)
++#define punpcklwd_r2r(regs,regd) mmx_r2r (punpcklhw, regs, regd)
++
++#define pxor_m2r(var,reg) mmx_m2r (fxor, var, reg)
++#define pxor_r2r(regs,regd) mmx_r2r (fxor, regs, regd)
++
++
++/* 3DNOW extensions */
++
++#define pavgusb_m2r(var,reg) mmx_m2r (pavgusb, var, reg)
++#define pavgusb_r2r(regs,regd) mmx_r2r (pavgusb, regs, regd)
++
++
++/* AMD MMX extensions - also available in intel SSE */
++
++
++#define mmx_m2ri(op,mem,reg,imm) \
++ __asm__ __volatile__ ( \
++ ".set mips3\n\t" \
++ ".set noreorder\n\t" \
++ "ldc1 $f16,%0\n\t" \
++ "ldc1 $f16,%0\n\t" \
++ "dli $8,%1\n\t" \
++ "dmtc1 $8,$f18\n\t" \
++ #op " $"#reg", $f18,$f16\n\t" \
++ ".set mips1\n\t" \
++ ".set reorder\n\t" \
++ : /* nothing */ \
++ : "m" (mem), "i" (imm))
++#define mmx_r2ri(op,regs,regd,imm) \
++ __asm__ __volatile__ ( \
++ ".set mips3\n\t" \
++ ".set noreorder\n\t" \
++ "dli $8,%0\n\t" \
++ "dmtc1 $8,$f16\n\t" \
++ #op " $"#regd",$f16, $" #regs "\n\t" \
++ ".set mips1\n\t" \
++ ".set reorder\n\t" \
++ : /* nothing */ \
++ : "i" (imm) )
++
++#define pavgb_m2r(var,reg) mmx_m2r (pavgb, var, reg)
++#define pavgb_r2r(regs,regd) mmx_r2r (pavgb, regs, regd)
++#define pavgw_m2r(var,reg) mmx_m2r (pavgh, var, reg)
++#define pavgw_r2r(regs,regd) mmx_r2r (pavgh, regs, regd)
++
++#define pextrw_r2r(mmreg,reg,imm) mmx_r2ri (pextrh, mmreg, reg, imm)
++
++#define pinsrw_r2r(reg,mmreg,imm) mmx_r2ri (pinsrh, reg, mmreg, imm)
++
++#define pmaxsw_m2r(var,reg) mmx_m2r (pmaxsh, var, reg)
++#define pmaxsw_r2r(regs,regd) mmx_r2r (pmaxsh, regs, regd)
++
++#define pmaxub_m2r(var,reg) mmx_m2r (pmaxub, var, reg)
++#define pmaxub_r2r(regs,regd) mmx_r2r (pmaxub, regs, regd)
++
++#define pminsw_m2r(var,reg) mmx_m2r (pminsh, var, reg)
++#define pminsw_r2r(regs,regd) mmx_r2r (pminsh, regs, regd)
++
++#define pminub_m2r(var,reg) mmx_m2r (pminub, var, reg)
++#define pminub_r2r(regs,regd) mmx_r2r (pminub, regs, regd)
++
++#define pmulhuw_m2r(var,reg) mmx_m2r (pmulhuh, var, reg)
++#define pmulhuw_r2r(regs,regd) mmx_r2r (pmulhuh, regs, regd)
++
++
++#define psadbw_m2r(var,reg) mmx_m2r (psadbh, var, reg)
++#define psadbw_r2r(regs,regd) mmx_r2r (psadbh, regs, regd)
++
++#define pshufw_m2r(var,reg,imm) mmx_m2ri(pshufh, var, reg, imm)
++#define pshufw_r2r(regs,regd,imm) mmx_r2ri(pshufh, regs, regd, imm)
++
++#define pshufhw_m2r(var,reg,imm) mmx_m2ri(pshufhh, var, reg, imm)
++#define pshufhw_r2r(regs,regd,imm) mmx_r2ri(pshufhh, regs, regd, imm)
++#define pshuflw_m2r(var,reg,imm) mmx_m2ri(pshuflh, var, reg, imm)
++#define pshuflw_r2r(regs,regd,imm) mmx_r2ri(pshuflh, regs, regd, imm)
++
++#define pshufd_r2r(regs,regd,imm) mmx_r2ri(pshufw, regs, regd, imm)
++
++#define pmullw_r2m(reg,var) mmx_r2m (pmullh, reg, var)
++
++#endif /* AVCODEC_LOOGSONMMX_H */
+diff -urN mplayer-20070622.orig/libmpeg2/Makefile mplayer-20070622/libmpeg2/Makefile
+--- mplayer-20070622.orig/libmpeg2/Makefile 2007-06-16 23:24:39.000000000 +0800
++++ mplayer-20070622/libmpeg2/Makefile 2007-08-04 07:53:57.000000000 +0800
+@@ -8,7 +8,9 @@
+ decode.c \
+ header.c \
+ idct.c \
++ idct_loongson.c \
+ motion_comp.c \
++ motion_comp_loongson.c \
+ slice.c \
+
+ SRCS_COMMON-$(TARGET_MMX) += idct_mmx.c motion_comp_mmx.c
+diff -urN mplayer-20070622.orig/libmpeg2/motion_comp.c mplayer-20070622/libmpeg2/motion_comp.c
+--- mplayer-20070622.orig/libmpeg2/motion_comp.c 2007-05-08 06:22:27.000000000 +0800
++++ mplayer-20070622/libmpeg2/motion_comp.c 2007-08-04 07:39:59.000000000 +0800
+@@ -37,18 +37,12 @@
+
+ void mpeg2_mc_init (uint32_t accel)
+ {
+-#ifdef HAVE_MMX2
++#if defined(ARCH_X86) || defined(ARCH_X86_64)
+ if (accel & MPEG2_ACCEL_X86_MMXEXT)
+ mpeg2_mc = mpeg2_mc_mmxext;
+- else
+-#endif
+-#ifdef HAVE_3DNOW
+- if (accel & MPEG2_ACCEL_X86_3DNOW)
++ else if (accel & MPEG2_ACCEL_X86_3DNOW)
+ mpeg2_mc = mpeg2_mc_3dnow;
+- else
+-#endif
+-#ifdef HAVE_MMX
+- if (accel & MPEG2_ACCEL_X86_MMX)
++ else if (accel & MPEG2_ACCEL_X86_MMX)
+ mpeg2_mc = mpeg2_mc_mmx;
+ else
+ #endif
+@@ -77,9 +71,797 @@
+ mpeg2_mc = mpeg2_mc_arm;
+ } else
+ #endif
+- mpeg2_mc = mpeg2_mc_c;
++ mpeg2_mc = mpeg2_mc_mmx;
++/* mpeg2_mc = mpeg2_mc_c; */
++}
++
++int flag;
++static inline void MC_put1_8(int height, uint8_t * dest, const uint8_t * ref,
++ const int stride)
++{
++ do{
++ __asm__ volatile (
++ ".set\tmips3\n"
++ ".set\tnoreorder\n"
++ "ldr $12,(%1)\n"
++ "ldl $12,7(%1)\n"
++ "sd $12,%0\n"
++ ".set\treorder\n"
++ ".set\tmips0\n"
++ :"=m"(*dest)
++ :"r"(ref)
++ :"$12","memory"
++ );
++ ref+=stride;
++ dest+=stride;
++ }while(--height);
++}
++
++static inline void MC_put1_16(int height, uint8_t * dest, const uint8_t * ref,
++ const int stride)
++{
++ do {
++
++ __asm__ volatile (
++ ".set\tmips3\n"
++ ".set\tnoreorder\n"
++ "ldr $12,(%1)\n"
++ "ldl $12,7(%1)\n"
++ "ldr $13,8(%1)\n"
++ "ldl $13,0xf(%1)\n"
++ "sd $12,(%0)\n"
++ "sd $13,8(%0)\n"
++ ".set\treorder\n"
++ ".set\tmips0\n"
++ :
++ :"r"(dest),"r"(ref)
++ :"$12","$13"
++ );
++ ref+=stride;
++ dest+=stride;
++ }while(--height);
++}
++
++static inline void MC_avg1_8(int height,uint8_t * dest, const uint8_t * ref,
++ const int stride)
++{
++ do {
++ __asm__ volatile (
++ ".set\tmips3\n"
++ ".set\tnoreorder\n"
++ "ldr $12,(%1)\n"
++ "ldl $12,7(%1)\n"
++ "dmtc1 $12,$f4\n"
++ "ldc1 $f16,(%0)\n"
++ "pavgb $f4,$f16\n"
++ "sdc1 $f4,(%0)\n"
++ ".set\treorder\n"
++ ".set\tmips1\n"
++ :
++ :"r"(dest),"r"(ref)
++ :"$f4","$f16","$12"
++ );
++ ref+=stride;
++ dest+=stride;
++ }while(--height);
++}
++
++int flag_MC_avg1_16=1;
++static inline void MC_avg1_16(int height, uint8_t * dest, const uint8_t * ref,
++ const int stride)
++{
++ int i;
++ do{
++ __asm__ volatile (
++ ".set\tmips3\n"
++ ".set\tnoreorder\n"
++ "ldr $12,%2\n"
++ "ldl $12,%3\n"
++ "dmtc1 $12,$f4\n"
++ "ldr $13,%4\n"
++ "ldl $13,%5\n"
++ "dmtc1 $13,$f0\n"
++ "ldc1 $f16,%6\n"
++ "pavgb $f4,$f4,$f16\n"
++ "ldc1 $f22,%7\n"
++ "pavgb $f0,$f0,$f22\n"
++ "sdc1 $f4,%0\n"
++ "sdc1 $f0,%1\n"
++ ".set\treorder\n"
++ ".set\tmips0\n"
++ :"=m"(*dest),"=m"(*(dest+8))
++ :"m"(*ref),"m"(*(ref+7)),"m"(*(ref+8)),"m"(*(ref+15)),"m"(*dest),"m"(*(dest+8))
++ :"$f0","$f4","$f16","$f22","$12","$13","memory"
++ );
++ ref+=stride;
++ dest+=stride;
++ /* if(flag_MC_avg1_16>0)
++ {
++ printf("\nheight=%d",height);
++ for(i=0;i<16;i++)
++ {
++ if(i%8==0)
++ printf("\n");
++ printf("dest[%d]=%d\t",i,dest[i]);
++ }
++ }*/
++ }while(--height);
++ //flag_MC_avg1_16--;
++}
++
++static inline void MC_put2_8(int height, uint8_t * dest, const uint8_t * ref,
++ const int stride, const int offset)
++{
++ int i;
++ do{
++
++ __asm__ volatile (
++ ".set\tmips3\n"
++ ".set\tnoreorder\n"
++ "ldr $12,%1\n"
++ "ldl $12,%2\n"
++ "dmtc1 $12,$f4\n"
++ "ldr $13,%3\n"
++ "ldl $13,%4\n"
++ "dmtc1 $13,$f16\n"
++ "pavgb $f4,$f4,$f16\n"
++ "sdc1 $f4,%0\n"
++ ".set\treorder\n"
++ ".set\tmips0\n"
++ :"=m"(*dest)
++ :"m"(*ref),"m"(*(ref+7)),"m"(*(ref+offset)),"m"(*(ref+offset+7))
++ :"$f4","$f16","$12","$13","memory"
++ );
++ ref+=stride;
++ dest+=stride;
++ }while (--height);
++}
++
++static inline void MC_put2_16 (int height, uint8_t * dest, const uint8_t * ref,
++ const int stride, const int offset)
++{
++ do {
++
++ __asm__ volatile (
++ ".set\tmips3\n"
++ ".set\tnoreorder\n"
++ "ldr $12,%2\n"
++ "ldl $12,%3\n"
++ "dmtc1 $12,$f4\n"
++ "ldr $13,%4\n"
++ "ldl $13,%5\n"
++ "dmtc1 $13,$f0\n"
++ "ldr $14,%6\n"
++ "ldl $14,%7\n"
++ "dmtc1 $14,$f16\n"
++ "ldr $15,%8\n"
++ "ldl $15,%9\n"
++ "dmtc1 $15,$f22\n"
++ "pavgb $f4,$f4,$f16\n"
++ "pavgb $f0,$f0,$f22\n"
++ "sdc1 $f4,%0\n"
++ "sdc1 $f0,%1\n"
++ ".set\treorder\n"
++ ".set\tmips0\n"
++ :"=m"(*dest),"=m"(*(dest+8))
++ :"m"(*ref),"m"(*(ref+7)),"m"(*(ref+8)),"m"(*(ref+15)),"m"(*(ref+offset)),"m"(*(ref+offset+7)),"m"(*(ref+offset+8)),"m"(*(ref+offset+15))
++ :"$f0","$f4","$f16","$f22","$12","$13","$14","$15","memory"
++ );
++ ref+=stride;
++ dest+=stride;
++ } while (--height);
++}
++
++static inline void MC_avg2_8(int height, uint8_t * dest, const uint8_t * ref,
++ const int stride, const int offset)
++{
++ do{
++
++ __asm__ volatile (
++ ".set\tmips3\n"
++ ".set\tnoreorder\n"
++ "ldr $12,%1\n"
++ "ldl $12,%2\n"
++ "dmtc1 $12,$f4\n"
++ "ldr $13,%3\n"
++ "ldl $13,%4\n"
++ "dmtc1 $13,$f16\n"
++ "ldc1 $f22,%5\n"
++ "pavgb $f4,$f4,$f16\n"
++ "pavgb $f4,$f4,$f22\n"
++ "sdc1 $f4,%0\n"
++ ".set\treorder\n"
++ ".set\tmips0\n"
++ :"=m"(*dest)
++ :"m"(*ref),"m"(*(ref+7)),"m"(*(ref+offset)),"m"(*(ref+offset+7)),"m"(*dest)
++ :"$f4","$f16","$f22","$12","$13","memory"
++ );
++ ref+=stride;
++ dest+=stride;
++ }while(--height);
++}
++
++static inline void MC_avg2_16(int height, uint8_t * dest, const uint8_t * ref,
++ const int stride, const int offset)
++{
++ do{
++
++ __asm__ volatile (
++ ".set\tmips3\n"
++ ".set\tnoreorder\n"
++ "ldr $12,%2\n"
++ "ldl $12,%3\n"
++ "dmtc1 $12,$f4\n"
++ "ldr $13,%4\n"
++ "ldl $13,%5\n"
++ "dmtc1 $13,$f0\n"
++ "ldr $14,%6\n"
++ "ldl $14,%7\n"
++ "dmtc1 $14,$f16\n"
++ "ldr $15,%8\n"
++ "ldl $15,%9\n"
++ "dmtc1 $15,$f22\n"
++ "pavgb $f4,$f4,$f16\n"
++ "pavgb $f0,$f0,$f22\n"
++ "ldc1 $f18,%10\n"
++ "pavgb $f4,$f4,$f18\n"
++ "ldc1 $f24,%11\n"
++ "pavgb $f0,$f0,$f24\n"
++ "sdc1 $f4,%0\n"
++ "sdc1 $f0,%1\n"
++ ".set\treorder\n"
++ ".set\tmips0\n"
++ :"=m"(*dest),"=m"(*(dest+8))
++ :"m"(*ref),"m"(*(ref+7)),"m"(*(ref+8)),"m"(*(ref+15)),"m"(*(ref+offset)),"m"(*(ref+offset+7)),"m"(*(ref+offset+8)),"m"(*(ref+offset+15)),"m"(*dest),"m"(*(dest+8))
++ :"$f0","$f4","$f16","$f18","$f22","$f24","$12","$13","$14","$15","memory"
++ );
++ ref+=stride;
++ dest+=stride;
++ }while(--height);
++}
++
++static long long mask_one=0x0101010101010101LL;
++
++static inline void MC_put4_8(int height, uint8_t * dest, const uint8_t * ref,
++ const int stride)
++{
++
++ __asm__ volatile (
++ ".set\tmips3\n"
++ ".set\tnoreorder\n"
++ "ldr $12,%0\n"
++ "ldl $12,%1\n"
++ "dmtc1 $12,$f4\n"
++ "ldr $13,%2\n"
++ "ldl $13,%3\n"
++ "dmtc1 $13,$f0\n"
++ "mov.d $f20,$f4\n"
++ "fxor $f20,$f20,$f0\n"
++ "pavgb $f4,$f4,$f0\n"
++ ".set\treorder\n"
++ ".set\tmips0\n"
++ :
++ :"m"(*ref),"m"(*(ref+7)),"m"(*(ref+1)),"m"(*(ref+8))
++ :"$f0","$f4","$f20","$12","$13","memory"
++ );
++ ref+=stride;
++
++ do{
++
++ __asm__ volatile (
++ ".set\tmips3\n"
++ ".set\tnoreorder\n"
++ "ldr $12,%1\n"
++ "ldl $12,%2\n"
++ "dmtc1 $12,$f6\n"
++ "mov.d $f14,$f4\n"
++ "ldr $13,%3\n"
++ "ldl $13,%4\n"
++ "dmtc1 $13,$f2\n"
++ "mov.d $f10,$f6\n"
++ "fxor $f10,$f10,$f2\n"
++ "pavgb $f6,$f6,$f2\n"
++ "for $f20,$f20,$f10\n"
++ "fxor $f14,$f14,$f6\n"
++ "fand $f20,$f20,$f14\n"
++ "pavgb $f4,$f4,$f6\n"
++ "ldc1 $f16,%5\n"
++ "fand $f20,$f20,$f16\n"
++ "psubusb $f4,$f4,$f20\n"
++ "sdc1 $f4,%0\n"
++ "mov.d $f20,$f10\n"
++ "mov.d $f4,$f6\n"
++ ".set\treorder\n"
++ ".set\tmips0\n"
++ :"=m"(*dest)
++ :"m"(*ref),"m"(*(ref+7)),"m"(*(ref+1)),"m"(*(ref+8)),"m"(mask_one)
++ :"$f2","$f4","$f6","$f10","$f14","$f16","$f20","$12","$13","memory"
++ );
++ ref+=stride;
++ dest+=stride;
++ }while(--height);
++}
++
++int flag_MC_put4_16=1;
++
++/*static inline void MC_put4_16(int height, uint8_t * dest, const uint8_t * ref,
++ const int stride)
++{
++ do{
++
++ asm(".set\tmips3"::);
++ asm("ldr $12,%0;"::"m"(*ref));
++ asm("ldl $12,%0;"::"m"(*(ref+7)));
++ asm("dmtc1 $12,$f4;");
++
++ asm("ldr $14,%0;"::"m"(*(ref+stride+1)));
++ asm("ldl $14,%0;"::"m"(*(ref+stride+8)));
++ asm("dmtc1 $14,$f0;");
++ asm("mov.d $f20,$f4;");
++
++ asm("ldr $14,%0;"::"m"(*(ref+1)));
++ asm("ldl $14,%0;"::"m"(*(ref+8)));
++ asm("dmtc1 $14,$f6;");
++ asm("fxor $f20,$f20,$f0;");
++
++ asm("ldr $14,%0;"::"m"(*(ref+stride)));
++ asm("ldl $14,%0;"::"m"(*(ref+stride+7)));
++ asm("dmtc1 $14,$f2;");
++ asm("mov.d $f10,$f6;");
++ asm("fxor $f10,$f10,$f2;");
++ asm("pavgb $f4,$f4,$f0;");
++ asm("pavgb $f6,$f6,$f2;");
++ asm("for $f20,$f20,$f10;");
++ asm("mov.d $f10,$f4;");
++ asm("fxor $f10,$f10,$f6;");
++ asm("fand $f20,$f20,$f10;");
++ asm("ldc1 $f16,%0;"::"m"(mask_one));
++ asm("fand $f20,$f20,$f16;");
++ asm("pavgb $f4,$f4,$f6;");
++ asm("psubusb $f4,$f4,$f20;");
++ asm("sdc1 $f4,%0;":"=m"(*dest));
++
++ asm("ldr $13,%0;"::"m"(*(ref+8)));
++ asm("ldl $13,%0;"::"m"(*(ref+15)));
++ asm("dmtc1 $13,$f4;");
++
++ asm("ldr $15,%0;"::"m"(*(ref+stride+9)));
++ asm("ldl $15,%0;"::"m"(*(ref+stride+16)));
++ asm("dmtc1 $15,$f0;");
++ asm("mov.d $f20,$f4;");
++
++ asm("ldr $14,%0;"::"m"(*(ref+9)));
++ asm("ldl $14,%0;"::"m"(*(ref+16)));
++ asm("dmtc1 $14,$f6;");
++ asm("fxor $f20,$f20,$f0;");
++
++ asm("ldr $12,%0;"::"m"(*(ref+stride+8)));
++ asm("ldl $12,%0;"::"m"(*(ref+stride+15)));
++ asm("dmtc1 $12,$f2;");
++ asm("mov.d $f10,$f6;");
++ asm("fxor $f10,$f10,$f2;");
++ asm("pavgb $f4,$f4,$f0;");
++ asm("pavgb $f6,$f6,$f2;");
++ asm("for $f20,$f20,$f10;");
++ asm("mov.d $f10,$f4;");
++ asm("fxor $f10,$f10,$f6;");
++ asm("fand $f20,$f20,$f10;");
++ asm("ldc1 $f20,%0;"::"m"(mask_one));
++ asm("pavgb $f4,$f4,$f6;");
++ asm("psubusb $f4,$f4,$f20;");
++ asm(".set\tmips2"::);
++ ref+=stride;
++ asm("sdc1 $f4,%0;":"=m"(*(dest+8)));
++ dest+=stride;
++ }while(--height);
++}*/
++
++
++static inline void MC_put4_16(int height, uint8_t * dest, const uint8_t * ref,
++ const int stride)
++{
++ do{
++
++ __asm__ volatile (
++ ".set\tmips3\n"
++ ".set\tnoreorder\n"
++ "ldr $8,%2\n"
++ "ldr $10,%3\n"
++ "ldr $12,%4\n"
++ "ldr $14,%5\n"
++ "mov.d $f20,$f4\n"
++ "ldl $8,%6\n"
++ "ldl $10,%7\n"
++ "ldl $12,%8\n"
++ "ldl $14,%9\n"
++ "fxor $f20,$f20,$f0\n"
++ "dmtc1 $8,$f4\n"
++ "dmtc1 $10,$f0\n"
++ "dmtc1 $12,$f6\n"
++ "dmtc1 $14,$f2\n"
++ "pavgb $f4,$f4,$f0\n"
++ "mov.d $f10,$f6\n"
++ "pavgb $f6,$f6,$f2\n"
++ "fxor $f10,$f10,$f2\n"
++ "ldc1 $f16,%10\n"
++ "for $f20,$f20,$f10\n"
++ "mov.d $f10,$f4\n"
++ "fxor $f10,$f10,$f6\n"
++ "pavgb $f4,$f4,$f6\n"
++ "fand $f20,$f20,$f10\n"
++ "fand $f20,$f20,$f16\n"
++ "psubusb $f4,$f4,$f20\n"
++ "sdc1 $f4,%0\n"
++ "ldr $8,%11\n"
++ "ldr $10,%12\n"
++ "ldr $12,%13\n"
++ "ldr $14,%14\n"
++ "mov.d $f20,$f4\n"
++ "ldl $8,%15\n"
++ "ldl $10,%16\n"
++ "ldl $12,%17\n"
++ "ldl $14,%18\n"
++ "fxor $f20,$f20,$f0\n"
++ "dmtc1 $8,$f4\n"
++ "dmtc1 $10,$f0\n"
++ "dmtc1 $12,$f6\n"
++ "dmtc1 $14,$f2\n"
++ "pavgb $f6,$f6,$f2\n"
++ "mov.d $f10,$f6\n"
++ "pavgb $f4,$f4,$f0\n"
++ "fxor $f10,$f10,$f2\n"
++ "for $f20,$f20,$f10\n"
++ "mov.d $f10,$f4\n"
++ "fxor $f10,$f10,$f6\n"
++ "pavgb $f4,$f4,$f6\n"
++ "fand $f20,$f20,$f10\n"
++ "ldc1 $f20,%10\n"
++ "psubusb $f4,$f4,$f20\n"
++ "sdc1 $f4,%1\n"
++ ".set\treorder\n"
++ ".set\tmips0\n"
++ :"=m"(*dest),"=m"(*(dest+8))
++ :"m"(*ref),"m"(*(ref+stride+1)),"m"(*(ref+1)),"m"(*(ref+stride)),"m"(*(ref+7)),"m"(*(ref+stride+8)),"m"(*(ref+8)),"m"(*(ref+stride+7)),"m"(mask_one),"m"(*(ref+8)),"m"(*(ref+stride+9)),"m"(*(ref+9)),"m"(*(ref+stride+8)),"m"(*(ref+15)),"m"(*(ref+stride+16)),"m"(*(ref+16)),"m"(*(ref+stride+15))
++ :"$f2","$f4","$f6","$f10","$f14","$f16","$f20","$8","$10","$12","$14","memory"
++ );
++ ref+=stride;
++ dest+=stride;
++ }while(--height);
++}
++
++
++/*static inline void MC_avg4_8(int height, uint8_t * dest, const uint8_t * ref,
++ const int stride)
++{
++ do{
++
++ asm(".set\tmips3"::);
++ asm("ldr $12,%0;"::"m"(*ref));
++ asm("ldl $12,%0;"::"m"(*(ref+7)));
++ asm("dmtc1 $12,$f4;");
++
++ asm("ldr $14,%0;"::"m"(*(ref+stride+1)));
++ asm("ldl $14,%0;"::"m"(*(ref+stride+8)));
++ asm("dmtc1 $14,$f0;");
++ asm("mov.d $f20,$f4;");
++
++ asm("ldr $15,%0;"::"m"(*(ref+1)));
++ asm("ldl $15,%0;"::"m"(*(ref+8)));
++ asm("dmtc1 $15,$f6;");
++ asm("fxor $f20,$f20,$f0;");
++
++ asm("ldr $13,%0;"::"m"(*(ref+stride)));
++ asm("ldl $13,%0;"::"m"(*(ref+stride+7)));
++ asm("dmtc1 $13,$f2;");
++ asm("mov.d $f10,$f6;");
++ asm("fxor $f10,$f10,$f2;");
++ asm("pavgb $f4,$f4,$f0;");
++ asm("pavgb $f6,$f6,$f2;");
++ asm("for $f20,$f20,$f10;");
++ asm("mov.d $f10,$f4;");
++ asm("fxor $f10,$f10,$f6;");
++ asm("fand $f20,$f20,$f10;");
++ asm("ldc1 $f16,%0;"::"m"(mask_one));
++ asm("fand $f20,$f20,$f16;");
++ asm("pavgb $f4,$f4,$f6;");
++ asm("psubusb $f4,$f4,$f20;");
++ asm("ldc1 $f0,%0;"::"m"(*dest));
++ asm("pavgb $f4,$f4,$f0;");
++ asm(".set\tmips2"::);
++ ref+=stride;
++ asm("sdc1 $f4,%0;":"=m"(*dest));
++ dest+=stride;
++ }while(--height);
++}*/
++
++
++static inline void MC_avg4_8(int height, uint8_t * dest, const uint8_t * ref,
++ const int stride)
++{
++ do{
++
++ __asm__ volatile (
++ ".set\tmips3\n"
++ ".set\tnoreorder\n"
++ "ldr $8,%1\n"
++ "ldr $10,%2\n"
++ "ldr $12,%3\n"
++ "ldr $14,%4\n"
++ "mov.d $f20,$f4\n"
++ "ldl $8,%5\n"
++ "ldl $10,%6\n"
++ "ldl $12,%7\n"
++ "ldl $14,%8\n"
++ "fxor $f20,$f20,$f0\n"
++ "dmtc1 $8,$f4\n"
++ "dmtc1 $10,$f0\n"
++ "dmtc1 $12,$f6\n"
++ "dmtc1 $14,$f2\n"
++ "pavgb $f4,$f4,$f0\n"
++ "mov.d $f10,$f6\n"
++ "ldc1 $f16,%9\n"
++ "fxor $f10,$f10,$f2\n"
++ "pavgb $f6,$f6,$f2\n"
++ "for $f20,$f20,$f10\n"
++ "ldc1 $f0,%10\n"
++ "mov.d $f10,$f4\n"
++ "fxor $f10,$f10,$f6\n"
++ "pavgb $f4,$f4,$f6\n"
++ "fand $f20,$f20,$f10\n"
++ "fand $f20,$f20,$f16\n"
++ "psubusb $f4,$f4,$f20\n"
++ "pavgb $f4,$f4,$f0\n"
++ "sdc1 $f4,%0\n"
++ ".set\treorder\n"
++ ".set\tmips0\n"
++ :"=m"(*dest)
++ :"m"(*ref),"m"(*(ref+stride+1)),"m"(*(ref+1)),"m"(*(ref+stride)),"m"(*(ref+7)),"m"(*(ref+stride+8)),"m"(*(ref+8)),"m"(*(ref+stride+7)),"m"(mask_one),"m"(*dest)
++ :"$f2","$f4","$f6","$f10","$f14","$f16","$f20","$8","$10","$12","$14","memory"
++ );
++ ref+=stride;
++ dest+=stride;
++ }while(--height);
++}
++
++static inline void MC_avg4_16 (int height, uint8_t * dest, const uint8_t * ref,
++ const int stride)
++{
++ do {
++
++ __asm__ volatile (
++ ".set\tmips3\n"
++ ".set\tnoreorder\n"
++ "ldr $12,%2\n"
++ "ldl $12,%3\n"
++ "dmtc1 $12,$f4\n"
++ "ldr $14,%4\n"
++ "ldl $14,%5\n"
++ "dmtc1 $14,$f0\n"
++ "mov.d $f20,$f4\n"
++ "ldr $13,%6\n"
++ "ldl $13,%7\n"
++ "dmtc1 $13,$f6\n"
++ "fxor $f20,$f20,$f0\n"
++ "ldr $15,%8\n"
++ "ldl $15,%9\n"
++ "dmtc1 $15,$f2\n"
++ "mov.d $f10,$f6\n"
++ "fxor $f10,$f10,$f2\n"
++ "pavgb $f4,$f4,$f0\n"
++ "pavgb $f6,$f6,$f2\n"
++ "for $f20,$f20,$f10\n"
++ "mov.d $f10,$f4\n"
++ "fxor $f10,$f10,$f6\n"
++ "fand $f20,$f20,$f10\n"
++ "ldc1 $f16,%10\n"
++ "fand $f20,$f20,$f16\n"
++ "pavgb $f4,$f4,$f6\n"
++ "psubusb $f4,$f4,$f20\n"
++ "ldc1 $f0,%11\n"
++ "pavgb $f4,$f4,$f0\n"
++ "sdc1 $f4,%0\n"
++ "ldr $14,%12\n"
++ "ldl $14,%13\n"
++ "dmtc1 $14,$f4\n"
++ "ldr $15,%14\n"
++ "ldl $15,%15\n"
++ "dmtc1 $15,$f0\n"
++ "mov.d $f20,$f4\n"
++ "ldr $11,%16\n"
++ "ldl $11,%17\n"
++ "dmtc1 $11,$f6\n"
++ "fxor $f20,$f20,$f0\n"
++ "ldr $12,%18\n"
++ "ldl $12,%19\n"
++ "dmtc1 $12,$f2\n"
++ "mov.d $f10,$f6\n"
++ "fxor $f10,$f10,$f2\n"
++ "pavgb $f4,$f4,$f0\n"
++ "pavgb $f6,$f6,$f2\n"
++ "for $f20,$f20,$f10\n"
++ "mov.d $f10,$f4\n"
++ "fxor $f10,$f10,$f6\n"
++ "fand $f20,$f20,$f10\n"
++ "ldc1 $f16,%10\n"
++ "fand $f20,$f20,$f16\n"
++ "pavgb $f4,$f4,$f6\n"
++ "psubusb $f4,$f4,$f20\n"
++ "ldc1 $f0,%1\n"
++ "pavgb $f4,$f4,$f0\n"
++ "sdc1 $f4,%20\n"
++ ".set\treorder\n"
++ ".set\tmips0\n"
++ :"=m"(*dest),"=m"(*(dest+8))
++ :"m"(*ref),"m"(*(ref+7)),"m"(*(ref+stride+1)),"m"(*(ref+stride+8)),"m"(*(ref+1)),"m"(*(ref+8)),"m"(*(ref+stride)),"m"(*(ref+stride+7)),"m"(mask_one),"m"(*dest),"m"(*(ref+8)),"m"(*(ref+15)),"m"(*(ref+stride+9)),"m"(*(ref+stride+16)),"m"(*(ref+9)),"m"(*(ref+16)),"m"(*(ref+stride+8)),"m"(*(ref+stride+15)),"m"(*(dest+8))
++ :"$f2","$f4","$f6","$f10","$f16","$f20","$10","$11","$12","$13","$14","$15","memory"
++ );
++ ref+=stride;
++ dest+=stride;
++ }while(--height);
++}
++
++
++static void MC_avg_o_16_c (uint8_t * dest, const uint8_t * ref,
++ int stride, int height)
++{
++
++ MC_avg1_16 (height, dest, ref, stride);
++
++}
++
++static void MC_avg_o_8_c (uint8_t * dest, const uint8_t * ref,
++ int stride, int height)
++{
++
++
++ MC_avg1_8 (height, dest, ref, stride);
++
++
++}
++
++static void MC_put_o_16_c (uint8_t * dest, const uint8_t * ref,
++ int stride, int height)
++{
++
++
++ MC_put1_16 (height, dest, ref, stride);
++
++
++}
++
++static void MC_put_o_8_c (uint8_t * dest, const uint8_t * ref,
++ int stride, int height)
++{
++
++
++ MC_put1_8 (height, dest, ref, stride);
++
++
++}
++
++static void MC_avg_x_16_c (uint8_t * dest, const uint8_t * ref,
++ int stride, int height)
++{
++
++
++ MC_avg2_16 (height, dest, ref, stride, 1);
++
++
++}
++
++static void MC_avg_x_8_c (uint8_t * dest, const uint8_t * ref,
++ int stride, int height)
++{
++
++
++ MC_avg2_8 (height, dest, ref, stride, 1);
++
++
++}
++
++static void MC_put_x_16_c (uint8_t * dest, const uint8_t * ref,
++ int stride, int height)
++{
++
++
++ MC_put2_16 (height, dest, ref, stride, 1);
++
++
+ }
+
++static void MC_put_x_8_c (uint8_t * dest, const uint8_t * ref,
++ int stride, int height)
++{
++
++
++ MC_put2_8 (height, dest, ref, stride, 1);
++
++
++}
++
++static void MC_avg_y_16_c (uint8_t * dest, const uint8_t * ref,
++ int stride, int height)
++{
++
++
++ MC_avg2_16 (height, dest, ref, stride, stride);
++
++
++}
++
++static void MC_avg_y_8_c (uint8_t * dest, const uint8_t * ref,
++ int stride, int height)
++{
++
++
++ MC_avg2_8 (height, dest, ref, stride, stride);
++
++
++}
++
++static void MC_put_y_16_c (uint8_t * dest, const uint8_t * ref,
++ int stride, int height)
++{
++
++
++ MC_put2_16 (height, dest, ref, stride, stride);
++
++
++}
++
++static void MC_put_y_8_c (uint8_t * dest, const uint8_t * ref,
++ int stride, int height)
++{
++
++
++ MC_put2_8 (height, dest, ref, stride, stride);
++
++
++}
++
++static void MC_avg_xy_16_c (uint8_t * dest, const uint8_t * ref,
++ int stride, int height)
++{
++
++
++ MC_avg4_16 (height, dest, ref, stride);
++
++
++}
++
++static void MC_avg_xy_8_c (uint8_t * dest, const uint8_t * ref,
++ int stride, int height)
++{
++
++
++ MC_avg4_8 (height, dest, ref, stride);
++
++
++}
++
++static void MC_put_xy_16_c (uint8_t * dest, const uint8_t * ref,
++ int stride, int height)
++{
++
++
++ MC_put4_16 (height, dest, ref, stride);
++
++
++}
++
++static void MC_put_xy_8_c (uint8_t * dest, const uint8_t * ref,
++ int stride, int height)
++{
++
++
++ MC_put4_8 (height, dest, ref, stride);
++
++
++}
++
++
++
++
+ #define avg2(a,b) ((a+b+1)>>1)
+ #define avg4(a,b,c,d) ((a+b+c+d+2)>>2)
+
+@@ -137,7 +919,7 @@
+ }
+
+ /* definitions of the actual mc functions */
+-
++/*
+ MC_FUNC (put,o)
+ MC_FUNC (avg,o)
+ MC_FUNC (put,x)
+@@ -146,5 +928,5 @@
+ MC_FUNC (avg,y)
+ MC_FUNC (put,xy)
+ MC_FUNC (avg,xy)
+-
++*/
+ MPEG2_MC_EXTERN (c)
+diff -urN mplayer-20070622.orig/libmpeg2/motion_comp_loongson.c mplayer-20070622/libmpeg2/motion_comp_loongson.c
+--- mplayer-20070622.orig/libmpeg2/motion_comp_loongson.c 1970-01-01 08:00:00.000000000 +0800
++++ mplayer-20070622/libmpeg2/motion_comp_loongson.c 2007-08-04 07:39:59.000000000 +0800
+@@ -0,0 +1,497 @@
++/*
++ * motion_comp_mmx.c
++ * Copyright (C) 2000-2003 Michel Lespinasse <walken@zoy.org>
++ * Copyright (C) 1999-2000 Aaron Holtzman <aholtzma@ess.engr.uvic.ca>
++ *
++ * This file is part of mpeg2dec, a free MPEG-2 video stream decoder.
++ * See http://libmpeg2.sourceforge.net/ for updates.
++ *
++ * mpeg2dec is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2 of the License, or
++ * (at your option) any later version.
++ *
++ * mpeg2dec is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ *
++ * Modified for use with MPlayer, see libmpeg-0.4.0.diff for the exact changes.
++ * detailed changelog at http://svn.mplayerhq.hu/mplayer/trunk/
++ * $Id: motion_comp_mmx.c 18786 2006-06-22 13:34:00Z diego $
++ */
++
++#include "config.h"
++
++
++#include <inttypes.h>
++
++#include "mpeg2.h"
++#include "attributes.h"
++#include "mpeg2_internal.h"
++#include "loongson_mmx.h"
++
++
++/* MMX code - needs a rewrite */
++
++/*
++ * Motion Compensation frequently needs to average values using the
++ * formula (x+y+1)>>1. Both MMXEXT and 3Dnow include one instruction
++ * to compute this, but it's been left out of classic MMX.
++ *
++ * We need to be careful of overflows when doing this computation.
++ * Rather than unpacking data to 16-bits, which reduces parallelism,
++ * we use the following formulas:
++ *
++ * (x+y)>>1 == (x&y)+((x^y)>>1)
++ * (x+y+1)>>1 == (x|y)-((x^y)>>1)
++ */
++
++/* some rounding constants */
++static mmx_t mask1 = {0xfefefefefefefefeLL};
++static mmx_t round4 = {0x0002000200020002LL};
++
++/*
++ * This code should probably be compiled with loop unrolling
++ * (ie, -funroll-loops in gcc)becuase some of the loops
++ * use a small static number of iterations. This was written
++ * with the assumption the compiler knows best about when
++ * unrolling will help
++ */
++
++static inline void mmx_zero_reg (void)
++{
++ /* load 0 into f0 */
++ pxor_r2r (f0, f0);
++}
++
++static inline void mmx_average_2_U8 (uint8_t * dest, const uint8_t * src1,
++ const uint8_t * src2)
++{
++ /* *dest = (*src1 + *src2 + 1)/ 2; */
++
++ movq_m2r (*src1, f2); /* load 8 src1 bytes */
++ movq_r2r (f2, f4); /* copy 8 src1 bytes */
++
++ movq_m2r (*src2, f6); /* load 8 src2 bytes */
++ movq_r2r (f6, f8); /* copy 8 src2 bytes */
++
++ pxor_r2r (f2, f6); /* xor src1 and src2 */
++ pand_m2r (mask1, f6); /* mask lower bits */
++ psrlq_i2r (1, f6); /* /2 */
++ por_r2r (f4, f8); /* or src1 and src2 */
++ psubb_r2r (f6, f8); /* subtract subresults */
++ movq_r2m (f8, *dest); /* store result in dest */
++}
++
++static inline void mmx_interp_average_2_U8 (uint8_t * dest,
++ const uint8_t * src1,
++ const uint8_t * src2)
++{
++ /* *dest = (*dest + (*src1 + *src2 + 1)/ 2 + 1)/ 2; */
++
++ movq_m2r (*dest, f2); /* load 8 dest bytes */
++ movq_r2r (f2, f4); /* copy 8 dest bytes */
++
++ movq_m2r (*src1, f6); /* load 8 src1 bytes */
++ movq_r2r (f6, f8); /* copy 8 src1 bytes */
++
++ movq_m2r (*src2, f10); /* load 8 src2 bytes */
++ movq_r2r (f10, f12); /* copy 8 src2 bytes */
++
++ pxor_r2r (f6, f10); /* xor src1 and src2 */
++ pand_m2r (mask1, f10); /* mask lower bits */
++ psrlq_i2r (1, f10); /* /2 */
++ por_r2r (f8, f12); /* or src1 and src2 */
++ psubb_r2r (f10, f12); /* subtract subresults */
++ movq_r2r (f12, f10); /* copy subresult */
++
++ pxor_r2r (f2, f10); /* xor srcavg and dest */
++ pand_m2r (mask1, f10); /* mask lower bits */
++ psrlq_i2r (1, f10); /* /2 */
++ por_r2r (f4, f12); /* or srcavg and dest */
++ psubb_r2r (f10, f12); /* subtract subresults */
++ movq_r2m (f12, *dest); /* store result in dest */
++}
++
++static inline void mmx_average_4_U8 (uint8_t * dest, const uint8_t * src1,
++ const uint8_t * src2,
++ const uint8_t * src3,
++ const uint8_t * src4)
++{
++ /* *dest = (*src1 + *src2 + *src3 + *src4 + 2)/ 4; */
++
++ movq_m2r (*src1, f2); /* load 8 src1 bytes */
++ movq_r2r (f2, f4); /* copy 8 src1 bytes */
++
++ punpcklbw_r2r (f0, f2); /* unpack low src1 bytes */
++ punpckhbw_r2r (f0, f4); /* unpack high src1 bytes */
++
++ movq_m2r (*src2, f6); /* load 8 src2 bytes */
++ movq_r2r (f6, f8); /* copy 8 src2 bytes */
++
++ punpcklbw_r2r (f0, f6); /* unpack low src2 bytes */
++ punpckhbw_r2r (f0, f8); /* unpack high src2 bytes */
++
++ paddw_r2r (f6, f2); /* add lows */
++ paddw_r2r (f8, f4); /* add highs */
++
++ /* now have partials in f2 and f4 */
++
++ movq_m2r (*src3, f6); /* load 8 src3 bytes */
++ movq_r2r (f6, f8); /* copy 8 src3 bytes */
++
++ punpcklbw_r2r (f0, f6); /* unpack low src3 bytes */
++ punpckhbw_r2r (f0, f8); /* unpack high src3 bytes */
++
++ paddw_r2r (f6, f2); /* add lows */
++ paddw_r2r (f8, f4); /* add highs */
++
++ movq_m2r (*src4, f10); /* load 8 src4 bytes */
++ movq_r2r (f10, f12); /* copy 8 src4 bytes */
++
++ punpcklbw_r2r (f0, f10); /* unpack low src4 bytes */
++ punpckhbw_r2r (f0, f12); /* unpack high src4 bytes */
++
++ paddw_r2r (f10, f2); /* add lows */
++ paddw_r2r (f12, f4); /* add highs */
++
++ /* now have subtotal in f2 and f4 */
++
++ paddw_m2r (round4, f2);
++ psraw_i2r (2, f2); /* /4 */
++ paddw_m2r (round4, f4);
++ psraw_i2r (2, f4); /* /4 */
++
++ packuswb_r2r (f4, f2); /* pack (w/ saturation) */
++ movq_r2m (f2, *dest); /* store result in dest */
++}
++
++static inline void mmx_interp_average_4_U8 (uint8_t * dest,
++ const uint8_t * src1,
++ const uint8_t * src2,
++ const uint8_t * src3,
++ const uint8_t * src4)
++{
++ /* *dest = (*dest + (*src1 + *src2 + *src3 + *src4 + 2)/ 4 + 1)/ 2; */
++
++ movq_m2r (*src1, f2); /* load 8 src1 bytes */
++ movq_r2r (f2, f4); /* copy 8 src1 bytes */
++
++ punpcklbw_r2r (f0, f2); /* unpack low src1 bytes */
++ punpckhbw_r2r (f0, f4); /* unpack high src1 bytes */
++
++ movq_m2r (*src2, f6); /* load 8 src2 bytes */
++ movq_r2r (f6, f8); /* copy 8 src2 bytes */
++
++ punpcklbw_r2r (f0, f6); /* unpack low src2 bytes */
++ punpckhbw_r2r (f0, f8); /* unpack high src2 bytes */
++
++ paddw_r2r (f6, f2); /* add lows */
++ paddw_r2r (f8, f4); /* add highs */
++
++ /* now have partials in f2 and f4 */
++
++ movq_m2r (*src3, f6); /* load 8 src3 bytes */
++ movq_r2r (f6, f8); /* copy 8 src3 bytes */
++
++ punpcklbw_r2r (f0, f6); /* unpack low src3 bytes */
++ punpckhbw_r2r (f0, f8); /* unpack high src3 bytes */
++
++ paddw_r2r (f6, f2); /* add lows */
++ paddw_r2r (f8, f4); /* add highs */
++
++ movq_m2r (*src4, f10); /* load 8 src4 bytes */
++ movq_r2r (f10, f12); /* copy 8 src4 bytes */
++
++ punpcklbw_r2r (f0, f10); /* unpack low src4 bytes */
++ punpckhbw_r2r (f0, f12); /* unpack high src4 bytes */
++
++ paddw_r2r (f10, f2); /* add lows */
++ paddw_r2r (f12, f4); /* add highs */
++
++ paddw_m2r (round4, f2);
++ psraw_i2r (2, f2); /* /4 */
++ paddw_m2r (round4, f4);
++ psraw_i2r (2, f4); /* /4 */
++
++ /* now have subtotal/4 in f2 and f4 */
++
++ movq_m2r (*dest, f6); /* load 8 dest bytes */
++ movq_r2r (f6, f8); /* copy 8 dest bytes */
++
++ packuswb_r2r (f4, f2); /* pack (w/ saturation) */
++ movq_r2r (f2,f4); /* copy subresult */
++
++ pxor_r2r (f2, f6); /* xor srcavg and dest */
++ pand_m2r (mask1, f6); /* mask lower bits */
++ psrlq_i2r (1, f6); /* /2 */
++ por_r2r (f4, f8); /* or srcavg and dest */
++ psubb_r2r (f6, f8); /* subtract subresults */
++ movq_r2m (f8, *dest); /* store result in dest */
++}
++
++/*-----------------------------------------------------------------------*/
++
++static inline void MC_avg_mmx (const int width, int height, uint8_t * dest,
++ const uint8_t * ref, const int stride)
++{
++ mmx_zero_reg ();
++
++ do {
++ mmx_average_2_U8 (dest, dest, ref);
++
++ if (width == 16)
++ mmx_average_2_U8 (dest+8, dest+8, ref+8);
++
++ dest += stride;
++ ref += stride;
++ } while (--height);
++}
++
++static void MC_avg_o_16_mmx (uint8_t * dest, const uint8_t * ref,
++ int stride, int height)
++{
++ MC_avg_mmx (16, height, dest, ref, stride);
++}
++
++static void MC_avg_o_8_mmx (uint8_t * dest, const uint8_t * ref,
++ int stride, int height)
++{
++ MC_avg_mmx (8, height, dest, ref, stride);
++}
++
++/*-----------------------------------------------------------------------*/
++
++static inline void MC_put_mmx (const int width, int height, uint8_t * dest,
++ const uint8_t * ref, const int stride)
++{
++ mmx_zero_reg ();
++
++ do {
++ movq_m2r (* ref, f2); /* load 8 ref bytes */
++ movq_r2m (f2,* dest); /* store 8 bytes at curr */
++
++ if (width == 16)
++ {
++ movq_m2r (* (ref+8), f2); /* load 8 ref bytes */
++ movq_r2m (f2,* (dest+8)); /* store 8 bytes at curr */
++ }
++
++ dest += stride;
++ ref += stride;
++ } while (--height);
++}
++
++static void MC_put_o_16_mmx (uint8_t * dest, const uint8_t * ref,
++ int stride, int height)
++{
++ MC_put_mmx (16, height, dest, ref, stride);
++}
++
++static void MC_put_o_8_mmx (uint8_t * dest, const uint8_t * ref,
++ int stride, int height)
++{
++ MC_put_mmx (8, height, dest, ref, stride);
++}
++
++/*-----------------------------------------------------------------------*/
++
++/* Half pixel interpolation in the x direction */
++static inline void MC_avg_x_mmx (const int width, int height, uint8_t * dest,
++ const uint8_t * ref, const int stride)
++{
++ mmx_zero_reg ();
++
++ do {
++ mmx_interp_average_2_U8 (dest, ref, ref+1);
++
++ if (width == 16)
++ mmx_interp_average_2_U8 (dest+8, ref+8, ref+9);
++
++ dest += stride;
++ ref += stride;
++ } while (--height);
++}
++
++static void MC_avg_x_16_mmx (uint8_t * dest, const uint8_t * ref,
++ int stride, int height)
++{
++ MC_avg_x_mmx (16, height, dest, ref, stride);
++}
++
++static void MC_avg_x_8_mmx (uint8_t * dest, const uint8_t * ref,
++ int stride, int height)
++{
++ MC_avg_x_mmx (8, height, dest, ref, stride);
++}
++
++/*-----------------------------------------------------------------------*/
++
++static inline void MC_put_x_mmx (const int width, int height, uint8_t * dest,
++ const uint8_t * ref, const int stride)
++{
++ mmx_zero_reg ();
++
++ do {
++ mmx_average_2_U8 (dest, ref, ref+1);
++
++ if (width == 16)
++ mmx_average_2_U8 (dest+8, ref+8, ref+9);
++
++ dest += stride;
++ ref += stride;
++ } while (--height);
++}
++
++static void MC_put_x_16_mmx (uint8_t * dest, const uint8_t * ref,
++ int stride, int height)
++{
++ MC_put_x_mmx (16, height, dest, ref, stride);
++}
++
++static void MC_put_x_8_mmx (uint8_t * dest, const uint8_t * ref,
++ int stride, int height)
++{
++ MC_put_x_mmx (8, height, dest, ref, stride);
++}
++
++/*-----------------------------------------------------------------------*/
++
++static inline void MC_avg_xy_mmx (const int width, int height, uint8_t * dest,
++ const uint8_t * ref, const int stride)
++{
++ const uint8_t * ref_next = ref + stride;
++
++ mmx_zero_reg ();
++
++ do {
++ mmx_interp_average_4_U8 (dest, ref, ref+1, ref_next, ref_next+1);
++
++ if (width == 16)
++ mmx_interp_average_4_U8 (dest+8, ref+8, ref+9,
++ ref_next+8, ref_next+9);
++
++ dest += stride;
++ ref += stride;
++ ref_next += stride;
++ } while (--height);
++}
++
++static void MC_avg_xy_16_mmx (uint8_t * dest, const uint8_t * ref,
++ int stride, int height)
++{
++ MC_avg_xy_mmx (16, height, dest, ref, stride);
++}
++
++static void MC_avg_xy_8_mmx (uint8_t * dest, const uint8_t * ref,
++ int stride, int height)
++{
++ MC_avg_xy_mmx (8, height, dest, ref, stride);
++}
++
++/*-----------------------------------------------------------------------*/
++
++static inline void MC_put_xy_mmx (const int width, int height, uint8_t * dest,
++ const uint8_t * ref, const int stride)
++{
++ const uint8_t * ref_next = ref + stride;
++
++ mmx_zero_reg ();
++
++ do {
++ mmx_average_4_U8 (dest, ref, ref+1, ref_next, ref_next+1);
++
++ if (width == 16)
++ mmx_average_4_U8 (dest+8, ref+8, ref+9, ref_next+8, ref_next+9);
++
++ dest += stride;
++ ref += stride;
++ ref_next += stride;
++ } while (--height);
++}
++
++static void MC_put_xy_16_mmx (uint8_t * dest, const uint8_t * ref,
++ int stride, int height)
++{
++ MC_put_xy_mmx (16, height, dest, ref, stride);
++}
++
++static void MC_put_xy_8_mmx (uint8_t * dest, const uint8_t * ref,
++ int stride, int height)
++{
++ MC_put_xy_mmx (8, height, dest, ref, stride);
++}
++
++/*-----------------------------------------------------------------------*/
++
++static inline void MC_avg_y_mmx (const int width, int height, uint8_t * dest,
++ const uint8_t * ref, const int stride)
++{
++ const uint8_t * ref_next = ref + stride;
++
++ mmx_zero_reg ();
++
++ do {
++ mmx_interp_average_2_U8 (dest, ref, ref_next);
++
++ if (width == 16)
++ mmx_interp_average_2_U8 (dest+8, ref+8, ref_next+8);
++
++ dest += stride;
++ ref += stride;
++ ref_next += stride;
++ } while (--height);
++}
++
++static void MC_avg_y_16_mmx (uint8_t * dest, const uint8_t * ref,
++ int stride, int height)
++{
++ MC_avg_y_mmx (16, height, dest, ref, stride);
++}
++
++static void MC_avg_y_8_mmx (uint8_t * dest, const uint8_t * ref,
++ int stride, int height)
++{
++ MC_avg_y_mmx (8, height, dest, ref, stride);
++}
++
++/*-----------------------------------------------------------------------*/
++
++static inline void MC_put_y_mmx (const int width, int height, uint8_t * dest,
++ const uint8_t * ref, const int stride)
++{
++ const uint8_t * ref_next = ref + stride;
++
++ mmx_zero_reg ();
++
++ do {
++ mmx_average_2_U8 (dest, ref, ref_next);
++
++ if (width == 16)
++ mmx_average_2_U8 (dest+8, ref+8, ref_next+8);
++
++ dest += stride;
++ ref += stride;
++ ref_next += stride;
++ } while (--height);
++}
++
++static void MC_put_y_16_mmx (uint8_t * dest, const uint8_t * ref,
++ int stride, int height)
++{
++ MC_put_y_mmx (16, height, dest, ref, stride);
++}
++
++static void MC_put_y_8_mmx (uint8_t * dest, const uint8_t * ref,
++ int stride, int height)
++{
++ MC_put_y_mmx (8, height, dest, ref, stride);
++}
++
++
++MPEG2_MC_EXTERN (mmx)
+diff -urN mplayer-20070622.orig/libvo/fastmemcpy.h mplayer-20070622/libvo/fastmemcpy.h
+--- mplayer-20070622.orig/libvo/fastmemcpy.h 2007-06-05 22:27:54.000000000 +0800
++++ mplayer-20070622/libvo/fastmemcpy.h 2007-08-04 07:52:48.000000000 +0800
+@@ -33,6 +33,10 @@
+ #else /* HAVE_MMX/MMX2/3DNOW/SSE/SSE2 */
+ #define mem2agpcpy(a,b,c) memcpy(a,b,c)
+ #define fast_memcpy(a,b,c) memcpy(a,b,c)
++
++#ifndef memcpy
++#define memcpy(a,b,c) godson_memcpy(a,b,c)
++#endif
+ #endif
+
+ #else /* USE_FASTMEMCPY */
+diff -urN mplayer-20070622.orig/libvo/godson_memcpy.S mplayer-20070622/libvo/godson_memcpy.S
+--- mplayer-20070622.orig/libvo/godson_memcpy.S 1970-01-01 08:00:00.000000000 +0800
++++ mplayer-20070622/libvo/godson_memcpy.S 2007-08-04 07:39:59.000000000 +0800
+@@ -0,0 +1,145 @@
++/* Copyright (C) 2002, 2003 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++ Contributed by Hartvig Ekner <hartvige@mips.com>, 2002.
++ Ported to mips3 n32/n64 by Alexandre Oliva <aoliva@redhat.com>
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++//#include <sysdep.h>
++#include <endian.h>
++#include <sys/asm.h>
++#include "regdef.h"
++
++
++/* void *godson_memcpy(void *s1, const void *s2, size_t n);
++
++ This could probably be optimized further. */
++
++#if __BYTE_ORDER == __BIG_ENDIAN
++# define LDHI ldl /* high part is left in big-endian */
++# define SDHI sdl /* high part is left in big-endian */
++# define LDLO ldr /* low part is right in big-endian */
++# define SDLO sdr /* low part is right in big-endian */
++#else
++# define LDHI ldr /* high part is right in little-endian */
++# define SDHI sdr /* high part is right in little-endian */
++# define LDLO ldl /* low part is left in little-endian */
++# define SDLO sdl /* low part is left in little-endian */
++#endif
++
++/* ENTRY (godson_memcpy)*/
++ .global godson_memcpy
++ .ent godson_memcpy
++godson_memcpy:
++ .set noreorder
++ .set mips3
++
++ slti t0, a2, 16 # Less than 16?
++ bne t0, zero, last16
++ move v0, a0 # Setup exit value before too late
++
++ xor t0, a1, a0 # Find a0/a1 displacement
++ andi t0, 0x7
++ bne t0, zero, shift # Go handle the unaligned case
++ PTR_SUBU t1, zero, a1
++ andi t1, 0x7 # a0/a1 are aligned, but are we
++ beq t1, zero, chk8w # starting in the middle of a word?
++ PTR_SUBU a2, t1
++ LDHI t0, 0(a1) # Yes we are... take care of that
++ PTR_ADDU a1, t1
++ SDHI t0, 0(a0)
++ PTR_ADDU a0, t1
++
++chk8w:
++ andi t0, a2, 0x3f # 64 or more bytes left?
++ beq t0, a2, chk1w
++ PTR_SUBU a3, a2, t0 # Yes
++ PTR_ADDU a3, a1 # a3 = end address of loop
++ move a2, t0 # a2 = what will be left after loop
++lop8w:
++ ld t0, 0(a1) # Loop taking 8 words at a time
++ ld t1, 8(a1)
++ ld t2, 16(a1)
++ ld t3, 24(a1)
++ ld ta0, 32(a1)
++ ld ta1, 40(a1)
++ ld ta2, 48(a1)
++ ld ta3, 56(a1)
++ PTR_ADDIU a0, 64
++ PTR_ADDIU a1, 64
++ sd t0, -64(a0)
++ sd t1, -56(a0)
++ sd t2, -48(a0)
++ sd t3, -40(a0)
++ sd ta0, -32(a0)
++ sd ta1, -24(a0)
++ sd ta2, -16(a0)
++ bne a1, a3, lop8w
++ sd ta3, -8(a0)
++
++chk1w:
++ andi t0, a2, 0x7 # 8 or more bytes left?
++ beq t0, a2, last16
++ PTR_SUBU a3, a2, t0 # Yes, handle them one dword at a time
++ PTR_ADDU a3, a1 # a3 again end address
++ move a2, t0
++lop1w:
++ ld t0, 0(a1)
++ PTR_ADDIU a0, 8
++ PTR_ADDIU a1, 8
++ bne a1, a3, lop1w
++ sd t0, -8(a0)
++
++last16:
++ blez a2, lst16e # Handle last 16 bytes, one at a time
++ PTR_ADDU a3, a2, a1
++lst16l:
++ lb t0, 0(a1)
++ PTR_ADDIU a0, 1
++ PTR_ADDIU a1, 1
++ bne a1, a3, lst16l
++ sb t0, -1(a0)
++lst16e:
++ jr ra # Bye, bye
++ nop
++
++shift:
++ PTR_SUBU a3, zero, a0 # Src and Dest unaligned
++ andi a3, 0x7 # (unoptimized case...)
++ beq a3, zero, shft1
++ PTR_SUBU a2, a3 # a2 = bytes left
++ LDHI t0, 0(a1) # Take care of first odd part
++ LDLO t0, 7(a1)
++ PTR_ADDU a1, a3
++ SDHI t0, 0(a0)
++ PTR_ADDU a0, a3
++shft1:
++ andi t0, a2, 0x7
++ PTR_SUBU a3, a2, t0
++ PTR_ADDU a3, a1
++shfth:
++ LDHI t1, 0(a1) # Limp through, dword by dword
++ LDLO t1, 7(a1)
++ PTR_ADDIU a0, 8
++ PTR_ADDIU a1, 8
++ bne a1, a3, shfth
++ sd t1, -8(a0)
++ b last16 # Handle anything which may be left
++ move a2, t0
++
++ .set reorder
++ .end godson_memcpy
++/* END (memcpy) */
+diff -urN mplayer-20070622.orig/libvo/Makefile mplayer-20070622/libvo/Makefile
+--- mplayer-20070622.orig/libvo/Makefile 2007-04-23 04:19:00.000000000 +0800
++++ mplayer-20070622/libvo/Makefile 2007-08-04 07:51:11.000000000 +0800
+@@ -10,6 +10,8 @@
+ vo_mpegpes.c \
+ vo_null.c \
+ vo_yuv4mpeg.c \
++ godson_memcpy.S \
++ godson_memcpy.S \
+ $(VO_SRCS) \
+
+ SRCS_MPLAYER-$(VIDIX) += vosub_vidix.c
+diff -urN mplayer-20070622.orig/libvo/vosub_vidix.c mplayer-20070622/libvo/vosub_vidix.c
+--- mplayer-20070622.orig/libvo/vosub_vidix.c 2006-04-24 12:23:53.000000000 +0800
++++ mplayer-20070622/libvo/vosub_vidix.c 2007-08-04 07:39:59.000000000 +0800
+@@ -100,8 +100,14 @@
+
+ /* Plane Y */
+ dest = vidix_mem + vidix_play.offsets[next_frame] + vidix_play.offset.y;
+- dest += dstrides.y*y + x;
+- src = image[0];
++ /* plj */
++ if (x >= 0) {
++ dest += dstrides.y*y + x;
++ src = image[0];
++ } else {
++ dest += dstrides.y*y;
++ src = image[0]-x;
++ }
+ for(i=0;i<h;i++){
+ memcpy(dest,src,w);
+ src+=stride[0];
+@@ -113,11 +119,23 @@
+ int hi,wi;
+ uint8_t *src2;
+ dest = vidix_mem + vidix_play.offsets[next_frame] + vidix_play.offset.v;
+- dest += dstrides.y*y/2 + x; // <- is this correct ?
++/* dest += dstrides.y*y/2 + x; // <- is this correct ? */
++ /* plj */
++ if (x >= 0) {
++ dest += dstrides.y*y/2 + x/2;
++ src = image[1];
++ src2 = image[2];
++ } else {
++ dest += dstrides.y*y/2;
++ src = image[1] - x/2;
++ src2 = image[2] - x/2;
++ }
+ h/=2;
+ w/=2;
++#if 0
+ src = image[1];
+ src2 = image[2];
++#endif
+ for(hi = 0; hi < h; hi++)
+ {
+ for(wi = 0; wi < w; wi++)
+@@ -134,8 +152,15 @@
+ {
+ /* Plane V */
+ dest = vidix_mem + vidix_play.offsets[next_frame] + vidix_play.offset.v;
+- dest += dstrides.v*y/4 + x;
+- src = image[1];
++/* dest += dstrides.v*y/4 + x; */
++ /* plj */
++ if (x >= 0) {
++ dest += dstrides.v*y/4 + x/2;
++ src = image[1];
++ } else {
++ dest += dstrides.v*y/4;
++ src = image[1] - x/2;
++ }
+ for(i=0;i<h/2;i++){
+ memcpy(dest,src,w/2);
+ src+=stride[1];
+@@ -144,8 +169,15 @@
+
+ /* Plane U */
+ dest = vidix_mem + vidix_play.offsets[next_frame] + vidix_play.offset.u;
+- dest += dstrides.u*y/4 + x;
+- src = image[2];
++ /* dest += dstrides.u*y/4 + x; */
++ /* plj */
++ if (x >= 0) {
++ dest += dstrides.u*y/4 + x/2;
++ src = image[2];
++ } else {
++ dest += dstrides.u*y/4;
++ src = image[2] - x/2;
++ }
+ for(i=0;i<h/2;i++){
+ memcpy(dest,src,w/2);
+ src+=stride[2];
+@@ -510,7 +542,7 @@
+ /* HACK: use draw_alpha to clear Y component */
+ for (i = 0; i < vidix_play.num_frames; i++) {
+ next_frame = i;
+- memset(vidix_mem + vidix_play.offsets[i], 0x80,
++ memset(vidix_mem + vidix_play.offsets[i], 0x00,
+ vidix_play.frame_size);
+ draw_alpha(0, 0, image_width, image_height, tmp, tmpa, image_width);
+ }
+diff -urN mplayer-20070622.orig/libvo/x11_common.c mplayer-20070622/libvo/x11_common.c
+--- mplayer-20070622.orig/libvo/x11_common.c 2007-04-23 15:42:42.000000000 +0800
++++ mplayer-20070622/libvo/x11_common.c 2007-08-04 07:39:59.000000000 +0800
+@@ -75,6 +75,7 @@
+ static int kdescreensaver_was_running = 0;
+
+ char *mDisplayName = NULL;
++
+ Display *mDisplay = NULL;
+ Window mRootWin;
+ int mScreen;
+@@ -2021,6 +2022,7 @@
+
+ uint32_t vo_x11_set_equalizer(char *name, int value)
+ {
++
+ float gamma, brightness, contrast;
+ float rf, gf, bf;
+ int k;
+diff -urN mplayer-20070622.orig/mplayer.c mplayer-20070622/mplayer.c
+--- mplayer-20070622.orig/mplayer.c 2007-06-21 16:18:51.000000000 +0800
++++ mplayer-20070622/mplayer.c 2007-08-04 07:47:32.000000000 +0800
+@@ -13,6 +13,7 @@
+ #include <string.h>
+ #include <unistd.h>
+
++long long fp_registers[16];
+ // #include <sys/mman.h>
+ #include <sys/types.h>
+ #ifndef __MINGW32__
+@@ -1619,7 +1620,55 @@
+ if (in_size > max_framesize)
+ max_framesize = in_size;
+ current_module = "decode video";
++ asm (
++ ".set mips3\n"
++ ".set noreorder\n"
++ "sdc1 $f0,(%0)\n"
++ "sdc1 $f2,8(%0)\n"
++ "sdc1 $f4,0x10(%0)\n"
++ "sdc1 $f6,0x18(%0)\n"
++ "sdc1 $f8,0x20(%0)\n"
++ "sdc1 $f10,0x28(%0)\n"
++ "sdc1 $f12,0x30(%0)\n"
++ "sdc1 $f14,0x38(%0)\n"
++ "sdc1 $f16,0x40(%0)\n"
++ "sdc1 $f18,0x48(%0)\n"
++ "sdc1 $f20,0x50(%0)\n"
++ "sdc1 $f22,0x58(%0)\n"
++ "sdc1 $f24,0x60(%0)\n"
++ "sdc1 $f26,0x68(%0)\n"
++ "sdc1 $f28,0x70(%0)\n"
++ "sdc1 $f30,0x78(%0)\n"
++ ".set mips1\n"
++ ".set reorder\n"
++ :
++ :"r"(&fp_registers)
++ );
+ decoded_frame = decode_video(sh_video, start, in_size, 0, pts);
++ asm (
++ ".set mips3\n"
++ ".set noreorder\n"
++ "ldc1 $f0,(%0)\n"
++ "ldc1 $f2,8(%0)\n"
++ "ldc1 $f4,0x10(%0)\n"
++ "ldc1 $f6,0x18(%0)\n"
++ "ldc1 $f8,0x20(%0)\n"
++ "ldc1 $f10,0x28(%0)\n"
++ "ldc1 $f12,0x30(%0)\n"
++ "ldc1 $f14,0x38(%0)\n"
++ "ldc1 $f16,0x40(%0)\n"
++ "ldc1 $f18,0x48(%0)\n"
++ "ldc1 $f20,0x50(%0)\n"
++ "ldc1 $f22,0x58(%0)\n"
++ "ldc1 $f24,0x60(%0)\n"
++ "ldc1 $f26,0x68(%0)\n"
++ "ldc1 $f28,0x70(%0)\n"
++ "ldc1 $f30,0x78(%0)\n"
++ ".set mips1\n"
++ ".set reorder\n"
++ :
++ :"r"(&fp_registers)
++ );
+ if (decoded_frame) {
+ update_subtitles(sh_video, mpctx->d_sub, 0);
+ update_osd_msg();
+diff -urN mplayer-20070622.orig/stream/Makefile mplayer-20070622/stream/Makefile
+--- mplayer-20070622.orig/stream/Makefile 2007-06-21 16:18:51.000000000 +0800
++++ mplayer-20070622/stream/Makefile 2007-08-04 07:43:14.000000000 +0800
+@@ -9,6 +9,7 @@
+ stream_mf.c \
+ stream_null.c \
+ url.c \
++ safe-ctype.c
+
+ SRCS_COMMON-$(CDDA) += stream_cdda.c cdinfo.c
+ SRCS_COMMON-$(CDDB) += stream_cddb.c
+diff -urN mplayer-20070622.orig/stream/safe-ctype.c mplayer-20070622/stream/safe-ctype.c
+--- mplayer-20070622.orig/stream/safe-ctype.c 1970-01-01 08:00:00.000000000 +0800
++++ mplayer-20070622/stream/safe-ctype.c 2007-08-04 07:39:59.000000000 +0800
+@@ -0,0 +1,173 @@
++/* <ctype.h> replacement macros.
++
++ Copyright (C) 2000 Free Software Foundation, Inc.
++ Contributed by Zack Weinberg <zackw@stanford.edu>.
++
++This file is part of the libiberty library.
++Libiberty is free software; you can redistribute it and/or
++modify it under the terms of the GNU Library General Public
++License as published by the Free Software Foundation; either
++version 2 of the License, or (at your option) any later version.
++
++Libiberty is distributed in the hope that it will be useful,
++but WITHOUT ANY WARRANTY; without even the implied warranty of
++MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++Library General Public License for more details.
++
++You should have received a copy of the GNU Library General Public
++License along with libiberty; see the file COPYING.LIB. If
++not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite
++Boston, MA 02111-1307, USA.
++
++In addition, as a special exception, the Free Software Foundation
++gives permission to link the code of its release of Wget with the
++OpenSSL project's "OpenSSL" library (or with modified versions of it
++that use the same license as the "OpenSSL" library), and distribute
++the linked executables. You must obey the GNU General Public License
++in all respects for all of the code used other than "OpenSSL". If you
++modify this file, you may extend this exception to your version of the
++file, but you are not obligated to do so. If you do not wish to do
++so, delete this exception statement from your version. */
++
++/* This is a compatible replacement of the standard C library's <ctype.h>
++ with the following properties:
++
++ - Implements all isxxx() macros required by C99.
++ - Also implements some character classes useful when
++ parsing C-like languages.
++ - Does not change behavior depending on the current locale.
++ - Behaves properly for all values in the range of a signed or
++ unsigned char. */
++
++#include <config.h>
++#include "safe-ctype.h"
++#include <stdio.h> /* for EOF */
++
++/* Shorthand */
++#define bl _sch_isblank
++#define cn _sch_iscntrl
++#define di _sch_isdigit
++#define is _sch_isidst
++#define lo _sch_islower
++#define nv _sch_isnvsp
++#define pn _sch_ispunct
++#define pr _sch_isprint
++#define sp _sch_isspace
++#define up _sch_isupper
++#define vs _sch_isvsp
++#define xd _sch_isxdigit
++
++/* Masks. */
++#define L lo|is |pr /* lower case letter */
++#define XL lo|is|xd|pr /* lowercase hex digit */
++#define U up|is |pr /* upper case letter */
++#define XU up|is|xd|pr /* uppercase hex digit */
++#define D di |xd|pr /* decimal digit */
++#define P pn |pr /* punctuation */
++#define _ pn|is |pr /* underscore */
++
++#define C cn /* control character */
++#define Z nv |cn /* NUL */
++#define M nv|sp |cn /* cursor movement: \f \v */
++#define V vs|sp |cn /* vertical space: \r \n */
++#define T nv|sp|bl|cn /* tab */
++#define S nv|sp|bl|pr /* space */
++
++/* Are we ASCII? */
++#if '\n' == 0x0A && ' ' == 0x20 && '0' == 0x30 \
++ && 'A' == 0x41 && 'a' == 0x61 && '!' == 0x21 \
++ && EOF == -1
++
++const unsigned short _sch_istable[256] =
++{
++ Z, C, C, C, C, C, C, C, /* NUL SOH STX ETX EOT ENQ ACK BEL */
++ C, T, V, M, M, V, C, C, /* BS HT LF VT FF CR SO SI */
++ C, C, C, C, C, C, C, C, /* DLE DC1 DC2 DC3 DC4 NAK SYN ETB */
++ C, C, C, C, C, C, C, C, /* CAN EM SUB ESC FS GS RS US */
++ S, P, P, P, P, P, P, P, /* SP ! " # $ % & ' */
++ P, P, P, P, P, P, P, P, /* ( ) * + , - . / */
++ D, D, D, D, D, D, D, D, /* 0 1 2 3 4 5 6 7 */
++ D, D, P, P, P, P, P, P, /* 8 9 : ; < = > ? */
++ P, XU, XU, XU, XU, XU, XU, U, /* @ A B C D E F G */
++ U, U, U, U, U, U, U, U, /* H I J K L M N O */
++ U, U, U, U, U, U, U, U, /* P Q R S T U V W */
++ U, U, U, P, P, P, P, _, /* X Y Z [ \ ] ^ _ */
++ P, XL, XL, XL, XL, XL, XL, L, /* ` a b c d e f g */
++ L, L, L, L, L, L, L, L, /* h i j k l m n o */
++ L, L, L, L, L, L, L, L, /* p q r s t u v w */
++ L, L, L, P, P, P, P, C, /* x y z { | } ~ DEL */
++
++ /* high half of unsigned char is locale-specific, so all tests are
++ false in "C" locale */
++ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
++ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
++ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
++ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
++
++ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
++ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
++ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
++ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
++};
++
++const unsigned char _sch_tolower[256] =
++{
++ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
++ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
++ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
++ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
++ 64,
++
++ 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm',
++ 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',
++
++ 91, 92, 93, 94, 95, 96,
++
++ 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm',
++ 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',
++
++ 123,124,125,126,127,
++
++ 128,129,130,131, 132,133,134,135, 136,137,138,139, 140,141,142,143,
++ 144,145,146,147, 148,149,150,151, 152,153,154,155, 156,157,158,159,
++ 160,161,162,163, 164,165,166,167, 168,169,170,171, 172,173,174,175,
++ 176,177,178,179, 180,181,182,183, 184,185,186,187, 188,189,190,191,
++
++ 192,193,194,195, 196,197,198,199, 200,201,202,203, 204,205,206,207,
++ 208,209,210,211, 212,213,214,215, 216,217,218,219, 220,221,222,223,
++ 224,225,226,227, 228,229,230,231, 232,233,234,235, 236,237,238,239,
++ 240,241,242,243, 244,245,246,247, 248,249,250,251, 252,253,254,255,
++};
++
++const unsigned char _sch_toupper[256] =
++{
++ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
++ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
++ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
++ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
++ 64,
++
++ 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',
++ 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
++
++ 91, 92, 93, 94, 95, 96,
++
++ 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',
++ 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
++
++ 123,124,125,126,127,
++
++ 128,129,130,131, 132,133,134,135, 136,137,138,139, 140,141,142,143,
++ 144,145,146,147, 148,149,150,151, 152,153,154,155, 156,157,158,159,
++ 160,161,162,163, 164,165,166,167, 168,169,170,171, 172,173,174,175,
++ 176,177,178,179, 180,181,182,183, 184,185,186,187, 188,189,190,191,
++
++ 192,193,194,195, 196,197,198,199, 200,201,202,203, 204,205,206,207,
++ 208,209,210,211, 212,213,214,215, 216,217,218,219, 220,221,222,223,
++ 224,225,226,227, 228,229,230,231, 232,233,234,235, 236,237,238,239,
++ 240,241,242,243, 244,245,246,247, 248,249,250,251, 252,253,254,255,
++};
++
++#else
++ #error "Unsupported host character set"
++#endif /* not ASCII */
+diff -urN mplayer-20070622.orig/stream/safe-ctype.h mplayer-20070622/stream/safe-ctype.h
+--- mplayer-20070622.orig/stream/safe-ctype.h 1970-01-01 08:00:00.000000000 +0800
++++ mplayer-20070622/stream/safe-ctype.h 2007-08-04 07:39:59.000000000 +0800
+@@ -0,0 +1,130 @@
++/* <ctype.h> replacement macros.
++
++ Copyright (C) 2000 Free Software Foundation, Inc.
++ Contributed by Zack Weinberg <zackw@stanford.edu>.
++
++This file is part of the libiberty library.
++Libiberty is free software; you can redistribute it and/or
++modify it under the terms of the GNU Library General Public
++License as published by the Free Software Foundation; either
++version 2 of the License, or (at your option) any later version.
++
++Libiberty is distributed in the hope that it will be useful,
++but WITHOUT ANY WARRANTY; without even the implied warranty of
++MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++Library General Public License for more details.
++
++You should have received a copy of the GNU Library General Public
++License along with libiberty; see the file COPYING.LIB. If
++not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite
++Boston, MA 02111-1307, USA.
++
++In addition, as a special exception, the Free Software Foundation
++gives permission to link the code of its release of Wget with the
++OpenSSL project's "OpenSSL" library (or with modified versions of it
++that use the same license as the "OpenSSL" library), and distribute
++the linked executables. You must obey the GNU General Public License
++in all respects for all of the code used other than "OpenSSL". If you
++modify this file, you may extend this exception to your version of the
++file, but you are not obligated to do so. If you do not wish to do
++so, delete this exception statement from your version. */
++
++/* This is a compatible replacement of the standard C library's <ctype.h>
++ with the following properties:
++
++ - Implements all isxxx() macros required by C99.
++ - Also implements some character classes useful when
++ parsing C-like languages.
++ - Does not change behavior depending on the current locale.
++ - Behaves properly for all values in the range of a signed or
++ unsigned char.
++
++ To avoid conflicts, this header defines the isxxx functions in upper
++ case, e.g. ISALPHA not isalpha. */
++
++#ifndef SAFE_CTYPE_H
++#define SAFE_CTYPE_H
++
++/* Catch erroneous use of ctype macros. Files that really know what
++ they're doing can disable this check by defining the
++ I_REALLY_WANT_CTYPE_MACROS preprocessor constant. */
++
++#ifndef I_REALLY_WANT_CTYPE_MACROS
++
++/* We used to #define these to errors, but that loses when real
++ ctype.h is included, usually by a library's (OpenSSL's) header
++ which gets #included after wget.h. */
++
++#undef isalpha
++#undef isalnum
++#undef isblank
++#undef iscntrl
++#undef isdigit
++#undef isgraph
++#undef islower
++#undef isprint
++#undef ispunct
++#undef isspace
++#undef isupper
++#undef isxdigit
++
++#endif /* I_REALLY_WANT_CTYPE_MACROS */
++
++/* Categories. */
++
++enum {
++ /* In C99 */
++ _sch_isblank = 0x0001, /* space \t */
++ _sch_iscntrl = 0x0002, /* nonprinting characters */
++ _sch_isdigit = 0x0004, /* 0-9 */
++ _sch_islower = 0x0008, /* a-z */
++ _sch_isprint = 0x0010, /* any printing character including ' ' */
++ _sch_ispunct = 0x0020, /* all punctuation */
++ _sch_isspace = 0x0040, /* space \t \n \r \f \v */
++ _sch_isupper = 0x0080, /* A-Z */
++ _sch_isxdigit = 0x0100, /* 0-9A-Fa-f */
++
++ /* Extra categories useful to cpplib. */
++ _sch_isidst = 0x0200, /* A-Za-z_ */
++ _sch_isvsp = 0x0400, /* \n \r */
++ _sch_isnvsp = 0x0800, /* space \t \f \v \0 */
++
++ /* Combinations of the above. */
++ _sch_isalpha = _sch_isupper|_sch_islower, /* A-Za-z */
++ _sch_isalnum = _sch_isalpha|_sch_isdigit, /* A-Za-z0-9 */
++ _sch_isidnum = _sch_isidst|_sch_isdigit, /* A-Za-z0-9_ */
++ _sch_isgraph = _sch_isalnum|_sch_ispunct, /* isprint and not space */
++ _sch_iscppsp = _sch_isvsp|_sch_isnvsp /* isspace + \0 */
++};
++
++/* Character classification. */
++extern const unsigned short _sch_istable[256];
++
++#define _sch_test(c, bit) (_sch_istable[(c) & 0xff] & (unsigned short)(bit))
++
++#define ISALPHA(c) _sch_test(c, _sch_isalpha)
++#define ISALNUM(c) _sch_test(c, _sch_isalnum)
++#define ISBLANK(c) _sch_test(c, _sch_isblank)
++#define ISCNTRL(c) _sch_test(c, _sch_iscntrl)
++#define ISDIGIT(c) _sch_test(c, _sch_isdigit)
++#define ISGRAPH(c) _sch_test(c, _sch_isgraph)
++#define ISLOWER(c) _sch_test(c, _sch_islower)
++#define ISPRINT(c) _sch_test(c, _sch_isprint)
++#define ISPUNCT(c) _sch_test(c, _sch_ispunct)
++#define ISSPACE(c) _sch_test(c, _sch_isspace)
++#define ISUPPER(c) _sch_test(c, _sch_isupper)
++#define ISXDIGIT(c) _sch_test(c, _sch_isxdigit)
++
++#define ISIDNUM(c) _sch_test(c, _sch_isidnum)
++#define ISIDST(c) _sch_test(c, _sch_isidst)
++#define IS_VSPACE(c) _sch_test(c, _sch_isvsp)
++#define IS_NVSPACE(c) _sch_test(c, _sch_isnvsp)
++#define IS_SPACE_OR_NUL(c) _sch_test(c, _sch_iscppsp)
++
++/* Character transformation. */
++extern const unsigned char _sch_toupper[256];
++extern const unsigned char _sch_tolower[256];
++#define TOUPPER(c) _sch_toupper[(c) & 0xff]
++#define TOLOWER(c) _sch_tolower[(c) & 0xff]
++
++#endif /* SAFE_CTYPE_H */
+diff -urN mplayer-20070622.orig/stream/stream.h mplayer-20070622/stream/stream.h
+--- mplayer-20070622.orig/stream/stream.h 2007-03-14 07:35:00.000000000 +0800
++++ mplayer-20070622/stream/stream.h 2007-08-04 07:39:59.000000000 +0800
+@@ -2,10 +2,15 @@
+ #define __STREAM_H
+
+ #include "mp_msg.h"
+-#include <string.h>
++//#include <string.h>
+ #include <inttypes.h>
+ #include <sys/types.h>
+
++#ifndef memcpy
++extern void * godson_memcpy(void *,void *,int);
++#define memcpy(a,b,c) godson_memcpy(a,b,c)
++#endif
++
+ #define STREAMTYPE_DUMMY -1 // for placeholders, when the actual reading is handled in the demuxer
+ #define STREAMTYPE_FILE 0 // read from seekable file
+ #define STREAMTYPE_VCD 1 // raw mode-2 CDROM reading, 2324 bytes/sector
+diff -urN mplayer-20070622.orig/stream/url.c mplayer-20070622/stream/url.c
+--- mplayer-20070622.orig/stream/url.c 2006-11-22 00:27:05.000000000 +0800
++++ mplayer-20070622/stream/url.c 2007-08-04 07:39:59.000000000 +0800
+@@ -43,6 +43,208 @@
+ return res;
+ }
+
++/* from wget */
++#include <assert.h>
++#include "safe-ctype.h"
++enum {
++ /* rfc1738 reserved chars + "$" and ",". */
++ urlchr_reserved = 1,
++
++ /* rfc1738 unsafe chars, plus non-printables. */
++ urlchr_unsafe = 2
++};
++
++#define urlchr_test(c, mask) (urlchr_table[(unsigned char)(c)] & (mask))
++#define URL_RESERVED_CHAR(c) urlchr_test(c, urlchr_reserved)
++#define URL_UNSAFE_CHAR(c) urlchr_test(c, urlchr_unsafe)
++
++/* Shorthands for the table: */
++#define R urlchr_reserved
++#define U urlchr_unsafe
++#define RU R|U
++
++static const unsigned char urlchr_table[256] =
++{
++ U, U, U, U, U, U, U, U, /* NUL SOH STX ETX EOT ENQ ACK BEL */
++ U, U, U, U, U, U, U, U, /* BS HT LF VT FF CR SO SI */
++ U, U, U, U, U, U, U, U, /* DLE DC1 DC2 DC3 DC4 NAK SYN ETB */
++ U, U, U, U, U, U, U, U, /* CAN EM SUB ESC FS GS RS US */
++ U, 0, U, RU, R, U, R, 0, /* SP ! " # $ % & ' */
++ 0, 0, 0, R, R, 0, 0, R, /* ( ) * + , - . / */
++ 0, 0, 0, 0, 0, 0, 0, 0, /* 0 1 2 3 4 5 6 7 */
++ 0, 0, RU, R, U, R, U, R, /* 8 9 : ; < = > ? */
++ RU, 0, 0, 0, 0, 0, 0, 0, /* @ A B C D E F G */
++ 0, 0, 0, 0, 0, 0, 0, 0, /* H I J K L M N O */
++ 0, 0, 0, 0, 0, 0, 0, 0, /* P Q R S T U V W */
++ 0, 0, 0, RU, U, RU, U, 0, /* X Y Z [ \ ] ^ _ */
++ U, 0, 0, 0, 0, 0, 0, 0, /* ` a b c d e f g */
++ 0, 0, 0, 0, 0, 0, 0, 0, /* h i j k l m n o */
++ 0, 0, 0, 0, 0, 0, 0, 0, /* p q r s t u v w */
++ 0, 0, 0, U, U, U, 0, U, /* x y z { | } ~ DEL */
++
++ U, U, U, U, U, U, U, U, U, U, U, U, U, U, U, U,
++ U, U, U, U, U, U, U, U, U, U, U, U, U, U, U, U,
++ U, U, U, U, U, U, U, U, U, U, U, U, U, U, U, U,
++ U, U, U, U, U, U, U, U, U, U, U, U, U, U, U, U,
++
++ U, U, U, U, U, U, U, U, U, U, U, U, U, U, U, U,
++ U, U, U, U, U, U, U, U, U, U, U, U, U, U, U, U,
++ U, U, U, U, U, U, U, U, U, U, U, U, U, U, U, U,
++ U, U, U, U, U, U, U, U, U, U, U, U, U, U, U, U,
++};
++#undef R
++#undef U
++#undef RU
++
++/* Decide whether the char at position P needs to be encoded. (It is
++ not enough to pass a single char *P because the function may need
++ to inspect the surrounding context.)
++
++ Return 1 if the char should be escaped as %XX, 0 otherwise. */
++
++static inline int
++char_needs_escaping (const char *p)
++{
++ if (*p == '%')
++ {
++ if (ISXDIGIT (*(p + 1)) && ISXDIGIT (*(p + 2)))
++ return 0;
++ else
++ /* Garbled %.. sequence: encode `%'. */
++ return 1;
++ }
++ else if (URL_UNSAFE_CHAR (*p) && !URL_RESERVED_CHAR (*p))
++ return 1;
++ else
++ return 0;
++}
++
++/* Translate a %-escaped (but possibly non-conformant) input string S
++ into a %-escaped (and conformant) output string. If no characters
++ are encoded or decoded, return the same string S; otherwise, return
++ a freshly allocated string with the new contents.
++
++ After a URL has been run through this function, the protocols that
++ use `%' as the quote character can use the resulting string as-is,
++ while those that don't can use url_unescape to get to the intended
++ data. This function is stable: once the input is transformed,
++ further transformations of the result yield the same output.
++
++ Let's discuss why this function is needed.
++
++ Imagine Wget is asked to retrieve `http://abc.xyz/abc def'. Since
++ a raw space character would mess up the HTTP request, it needs to
++ be quoted, like this:
++
++ GET /abc%20def HTTP/1.0
++
++ It would appear that the unsafe chars need to be quoted, for
++ example with url_escape. But what if we're requested to download
++ `abc%20def'? url_escape transforms "%" to "%25", which would leave
++ us with `abc%2520def'. This is incorrect -- since %-escapes are
++ part of URL syntax, "%20" is the correct way to denote a literal
++ space on the Wget command line. This leads to the conclusion that
++ in that case Wget should not call url_escape, but leave the `%20'
++ as is. This is clearly contradictory, but it only gets worse.
++
++ What if the requested URI is `abc%20 def'? If we call url_escape,
++ we end up with `/abc%2520%20def', which is almost certainly not
++ intended. If we don't call url_escape, we are left with the
++ embedded space and cannot complete the request. What the user
++ meant was for Wget to request `/abc%20%20def', and this is where
++ reencode_escapes kicks in.
++
++ Wget used to solve this by first decoding %-quotes, and then
++ encoding all the "unsafe" characters found in the resulting string.
++ This was wrong because it didn't preserve certain URL special
++ (reserved) characters. For instance, URI containing "a%2B+b" (0x2b
++ == '+') would get translated to "a%2B%2Bb" or "a++b" depending on
++ whether we considered `+' reserved (it is). One of these results
++ is inevitable because by the second step we would lose information
++ on whether the `+' was originally encoded or not. Both results
++ were wrong because in CGI parameters + means space, while %2B means
++ literal plus. reencode_escapes correctly translates the above to
++ "a%2B+b", i.e. returns the original string.
++
++ This function uses a modified version of the algorithm originally
++ proposed by Anon Sricharoenchai:
++
++ * Encode all "unsafe" characters, except those that are also
++ "reserved", to %XX. See urlchr_table for which characters are
++ unsafe and reserved.
++
++ * Encode the "%" characters not followed by two hex digits to
++ "%25".
++
++ * Pass through all other characters and %XX escapes as-is. (Up to
++ Wget 1.10 this decoded %XX escapes corresponding to "safe"
++ characters, but that was obtrusive and broke some servers.)
++
++ Anon's test case:
++
++ "http://abc.xyz/%20%3F%%36%31%25aa% a?a=%61+a%2Ba&b=b%26c%3Dc"
++ ->
++ "http://abc.xyz/%20%3F%25%36%31%25aa%25%20a?a=%61+a%2Ba&b=b%26c%3Dc"
++
++ Simpler test cases:
++
++ "foo bar" -> "foo%20bar"
++ "foo%20bar" -> "foo%20bar"
++ "foo %20bar" -> "foo%20%20bar"
++ "foo%%20bar" -> "foo%25%20bar" (0x25 == '%')
++ "foo%25%20bar" -> "foo%25%20bar"
++ "foo%2%20bar" -> "foo%252%20bar"
++ "foo+bar" -> "foo+bar" (plus is reserved!)
++ "foo%2b+bar" -> "foo%2b+bar" */
++
++char *
++reencode_escapes (const char *s)
++{
++ const char *p1;
++ char *newstr, *p2;
++ int oldlen, newlen;
++
++ int encode_count = 0;
++
++ /* First pass: inspect the string to see if there's anything to do,
++ and to calculate the new length. */
++ for (p1 = s; *p1; p1++)
++ if (char_needs_escaping (p1))
++ ++encode_count;
++
++ if (!encode_count)
++ /* The string is good as it is. */
++ return (char *) s; /* C const model sucks. */
++
++ oldlen = p1 - s;
++ /* Each encoding adds two characters (hex digits). */
++ newlen = oldlen + 2 * encode_count;
++ newstr = malloc (newlen + 1);
++
++ /* Second pass: copy the string to the destination address, encoding
++ chars when needed. */
++ p1 = s;
++ p2 = newstr;
++
++#define XNUM_TO_DIGIT(x) ("0123456789ABCDEF"[x] + 0)
++#define XNUM_TO_digit(x) ("0123456789abcdef"[x] + 0)
++
++ while (*p1)
++ if (char_needs_escaping (p1))
++ {
++ unsigned char c = *p1++;
++ *p2++ = '%';
++ *p2++ = XNUM_TO_DIGIT (c >> 4);
++ *p2++ = XNUM_TO_DIGIT (c & 0xf);
++ }
++ else
++ *p2++ = *p1++;
++
++ *p2 = '\0';
++ assert (p2 - newstr == newlen);
++ return newstr;
++}
++
+ URL_t*
+ url_new(const char* url) {
+ int pos1, pos2,v6addr = 0;
+@@ -57,11 +259,13 @@
+ mp_msg(MSGT_NETWORK,MSGL_FATAL,MSGTR_MemAllocFailed);
+ goto err_out;
+ }
++#if 0 /* loongson */
+ escfilename=malloc(strlen(url)*3+1);
+ if (!escfilename ) {
+ mp_msg(MSGT_NETWORK,MSGL_FATAL,MSGTR_MemAllocFailed);
+ goto err_out;
+ }
++#endif
+
+ // Create the URL container
+ Curl = malloc(sizeof(URL_t));
+@@ -73,7 +277,9 @@
+ // Initialisation of the URL container members
+ memset( Curl, 0, sizeof(URL_t) );
+
+- url_escape_string(escfilename,url);
++/* url_escape_string(escfilename,url); loongson */
++ escfilename = strdup(reencode_escapes(url));
++/* printf("escfilename %s\n", escfilename); */
+
+ // Copy the url in the URL container
+ Curl->url = strdup(escfilename);
+@@ -395,3 +601,4 @@
+ }
+ }
+ #endif //__URL_DEBUG
++
+diff -urN mplayer-20070622.orig/vidix/dha.h mplayer-20070622/vidix/dha.h
+--- mplayer-20070622.orig/vidix/dha.h 2007-04-22 22:05:41.000000000 +0800
++++ mplayer-20070622/vidix/dha.h 2007-08-04 07:35:34.000000000 +0800
+@@ -41,9 +41,6 @@
+ #endif
+
+ #define MAX_DEV_PER_VENDOR_CFG1 64
+-#define MAX_PCI_DEVICES_PER_BUS 32
+-#define MAX_PCI_DEVICES 64
+-#define PCI_MULTIFUNC_DEV 0x80
+ #define PCI_COMMAND_IO 0x1 /* Enable response to I/O space */
+
+ typedef struct pciinfo_s
+@@ -56,10 +53,6 @@
+ }pciinfo_t;
+
+ /* needed for mga_vid */
+-extern int pci_config_read(unsigned char bus, unsigned char dev, unsigned char func,
+- unsigned char cmd, int len, unsigned long *val);
+- /* Fill array pci_list which must have size MAX_PCI_DEVICES
+- and return 0 if sucessful */
+ extern int pci_scan(pciinfo_t *pci_list,unsigned *num_card);
+
+
+diff -urN mplayer-20070622.orig/vidix/Makefile mplayer-20070622/vidix/Makefile
+--- mplayer-20070622.orig/vidix/Makefile 2007-05-18 05:48:56.000000000 +0800
++++ mplayer-20070622/vidix/Makefile 2007-08-04 07:37:11.000000000 +0800
+@@ -4,9 +4,7 @@
+
+ SRCS_MPLAYER = vidixlib.c \
+ drivers.c \
+- dha.c \
+- mtrr.c \
+- pci.c \
++ mips_dha.c \
+ pci_names.c \
+ pci_dev_ids.c\
+
+diff -urN mplayer-20070622.orig/vidix/mips_dha.c mplayer-20070622/vidix/mips_dha.c
+--- mplayer-20070622.orig/vidix/mips_dha.c 1970-01-01 08:00:00.000000000 +0800
++++ mplayer-20070622/vidix/mips_dha.c 2007-08-04 07:39:59.000000000 +0800
+@@ -0,0 +1,328 @@
++#include <sys/types.h>
++#include <sys/stat.h>
++#include <fcntl.h>
++#include <errno.h>
++#include <unistd.h>
++#include <sys/mman.h>
++#include <syscall.h>
++#include <stdio.h>
++#include "libdha.h"
++
++#undef DEBUG_MIPS_LIBDHA
++
++int pci_scan(pciinfo_t *pci_list, unsigned *num_card)
++{
++ int fd, err;
++ ssize_t len;
++ char cmd_gpi[]="GET PCI INFO";
++
++
++ fd = open("/proc/mipsdha", O_RDWR);
++ if (fd<0) {
++ err = errno;
++ perror("mips-libdha: open /proc/mipsdha");
++ return err;
++ }
++
++ if ((len=write(fd, cmd_gpi, sizeof(cmd_gpi)-1))<0) {
++ err = errno;
++ perror("mips-libdha: write /proc/mipsdha");
++ return err;
++ }
++ if (len != sizeof(cmd_gpi)-1) {
++ fprintf(stderr, "mips-libdha: write /proc/mipsdha incompleted!\n");
++ return 1;
++ }
++
++ if ((len=read(fd, pci_list, sizeof(pciinfo_t)*MAX_PCI_DEVICES))<0) {
++ err = errno;
++ perror("mips-libdha: read /proc/mipsdha");
++ return err;
++ }
++ if (len % sizeof(pciinfo_t) != 0) {
++ fprintf(stderr, "mips-libdha: read /proc/mipsdha incompleted!\n");
++ return 1;
++ }
++
++ if (close(fd)) {
++ perror("mips-libdha: close /proc/mipsdha");
++ }
++
++ *num_card = len / sizeof(pciinfo_t);
++ return 0;
++}
++
++
++static int page_size=0, page_mask=0;
++
++void *map_phys_mem(unsigned long base, unsigned long size)
++{
++ int fd; void *ret;
++ unsigned long ret_fix=0;
++
++ if (page_size==0) {
++ page_size = sysconf(_SC_PAGESIZE);
++ if (page_size<0) {
++ perror("mips-libdha: sysconf(_SC_PAGESIZE) failed!\n");
++ return MAP_FAILED;
++ }
++ page_mask = (~page_size) + 1;
++ }
++ printf("pagesize 0x%x mask 0x%x\n",page_size,page_mask);
++
++ if ((fd = open("/dev/mem", O_RDWR))<0) {
++ perror("mips-libdha: open /dev/mem failed!\n");
++ return MAP_FAILED;
++ }
++
++#ifdef DEBUG_MIPS_LIBDHA
++ printf("mips-libdha: mmap(/dev/mem, base 0x%08x, size 0x%08x)\n", base, size);
++#endif
++
++ if ((base & ~page_mask) || (size & ~page_mask)) {
++ // fix to page aligned
++ unsigned long start, end;
++ start = base & page_mask;
++ end = (base + size + page_size - 1) & page_mask;
++ ret_fix = base-start;
++ base = start;
++ size = end-start;
++
++#ifdef DEBUG_MIPS_LIBDHA
++ printf("mips-libdha: mmap_page(/dev/mem, base 0x%08x, size 0x%08x), ret_fix=0x%08x\n", base, size, ret_fix);
++#endif
++
++ }
++ ret = mmap(0, size, PROT_READ|PROT_WRITE, MAP_SHARED, fd, base);
++
++ if (ret==MAP_FAILED) {
++ perror("mips-libdha: mmap /dev/mem failed!\n");
++ } else {
++ ret += ret_fix;
++ }
++
++ if (close(fd)) {
++ perror("mips-libdha: close /dev/mem failed!\n");
++ }
++
++ printf("%s %s\n",__FILE__,__FUNCTION__);
++ return ret;
++}
++
++void unmap_phys_mem(void *ptr, unsigned long size)
++{
++ unsigned long base=(unsigned long)ptr, ptr_fix;
++
++#ifdef DEBUG_MIPS_LIBDHA
++ printf("mips-libdha: munmap(base 0x%08x, size 0x%08x)\n", base, size);
++#endif
++
++ if ((base & ~page_mask) || (size & ~page_mask)) {
++ // fix to page aligned
++ unsigned long start, end;
++ start = base & page_mask;
++ end = (base + size + page_size - 1) & page_mask;
++ ptr_fix = base-start;
++ base = start;
++ size = end-start;
++
++#ifdef DEBUG_MIPS_LIBDHA
++ printf("mips-libdha: munmap_page(base 0x%08x, size 0x%08x), ptr_fix=0x%08x\n", base, size, ptr_fix);
++#endif
++
++ }
++
++ int res = munmap((void *)base,size);
++
++ if (res == (int)MAP_FAILED) {
++ perror("mips-libdha: munmap /dev/mem failed!\n");
++ }
++}
++
++
++void *IOPortBase=NULL;
++
++int enable_app_io(void)
++{
++ int fd, err;
++ ssize_t len;
++ char cmd_gib[]="GET IO BASE";
++ unsigned long IOPhyBase;
++
++ fd = open("/proc/mipsdha", O_RDWR);
++ if (fd<0) {
++ err = errno;
++ perror("mips-libdha: open /proc/mipsdha");
++ return err;
++ }
++
++ if ((len=write(fd, cmd_gib, sizeof(cmd_gib)-1))<0) {
++ err = errno;
++ perror("mips-libdha: write /proc/mipsdha");
++ return err;
++ }
++ if (len != sizeof(cmd_gib)-1) {
++ fprintf(stderr, "mips-libdha: write /proc/mipsdha incompleted!\n");
++ return 1;
++ }
++
++ if ((len=read(fd, &IOPhyBase, sizeof(IOPhyBase)))<0) {
++ err = errno;
++ perror("mips-libdha: read /proc/mipsdha");
++ return err;
++ }
++ if (len != sizeof(IOPhyBase)) {
++ fprintf(stderr, "mips-libdha: read /proc/mipsdha incompleted!\n");
++ return 1;
++ }
++
++ if (close(fd)) {
++ perror("mips-libdha: close /proc/mipsdha");
++ }
++
++ IOPortBase = map_phys_mem(IOPhyBase, 64*1024);
++
++ if (IOPortBase == MAP_FAILED) {
++ fprintf(stderr, "mips-libdha: map_phys_mem failed!\n");
++ IOPortBase = NULL;
++ return 2;
++ }
++
++ return 0;
++}
++
++int disable_app_io(void)
++{
++ if (IOPortBase == NULL) {
++ fprintf(stderr, "mips-libdha: App IO is NOT enabled yet!\n");
++ return 1;
++ }
++ unmap_phys_mem(IOPortBase, 64*1024);
++ IOPortBase = NULL;
++ return 0;
++}
++
++
++unsigned char INPORT8(unsigned idx)
++{
++ unsigned char *p;
++ printf("%s\n",__FUNCTION__);
++ if (idx>65535) {
++ fprintf(stderr, "mips-libdha: port number %u is too large!\n", idx);
++ return (~0);
++ }
++
++ if (IOPortBase == NULL) {
++ fprintf(stderr, "mips-libdha: App IO is NOT enabled yet!\n");
++ return (~0);
++ }
++
++ p = IOPortBase+idx;
++ return (*p);
++}
++
++unsigned short INPORT16(unsigned idx)
++{
++ unsigned short *p;
++ printf("%s\n",__FUNCTION__);
++
++ if (idx>65535) {
++ fprintf(stderr, "mips-libdha: port number %u is too large!\n", idx);
++ return (~0);
++ }
++
++ if (IOPortBase == NULL) {
++ fprintf(stderr, "mips-libdha: App IO is NOT enabled yet!\n");
++ return (~0);
++ }
++
++ p = IOPortBase+idx;
++ return (*p);
++}
++
++unsigned INPORT32(unsigned idx)
++{
++ unsigned *p;
++ printf("%s\n",__FUNCTION__);
++
++ if (idx>65535) {
++ fprintf(stderr, "mips-libdha: port number %u is too large!\n", idx);
++ return (~0);
++ }
++
++ if (IOPortBase == NULL) {
++ fprintf(stderr, "mips-libdha: App IO is NOT enabled yet!\n");
++ return (~0);
++ }
++
++ p = IOPortBase+idx;
++ return (*p);
++}
++
++void OUTPORT8(unsigned idx, unsigned char val)
++{
++ unsigned char *p;
++ printf("%s\n",__FUNCTION__);
++
++ if (idx>65535) {
++ fprintf(stderr, "mips-libdha: port number %u is too large!\n", idx);
++ return;
++ }
++
++ if (IOPortBase == NULL) {
++ fprintf(stderr, "mips-libdha: App IO is NOT enabled yet!\n");
++ return;
++ }
++
++ p = IOPortBase+idx;
++ *p = val;
++}
++
++void OUTPORT16(unsigned idx, unsigned short val)
++{
++ unsigned short *p;
++ printf("%s\n",__FUNCTION__);
++
++ if (idx>65535) {
++ fprintf(stderr, "mips-libdha: port number %u is too large!\n", idx);
++ return;
++ }
++
++ if (IOPortBase == NULL) {
++ fprintf(stderr, "mips-libdha: App IO is NOT enabled yet!\n");
++ return;
++ }
++
++ p = IOPortBase+idx;
++ *p = val;
++}
++
++void OUTPORT32(unsigned idx, unsigned val)
++{
++ unsigned *p;
++ printf("%s\n",__FUNCTION__);
++
++ if (idx>65535) {
++ fprintf(stderr, "mips-libdha: port number %u is too large!\n", idx);
++ return;
++ }
++
++ if (IOPortBase == NULL) {
++ fprintf(stderr, "mips-libdha: App IO is NOT enabled yet!\n");
++ return;
++ }
++
++ p = IOPortBase+idx;
++ *p = val;
++}
++
++
++int mtrr_set_type(unsigned base,unsigned size,int type)
++{
++
++#ifdef DEBUG_MIPS_LIBDHA
++ printf("%s:request faked (base=0x%08x, size=0x%08x, type=%d)\n", __FUNCTION__, base, size, type);
++#endif
++
++ return 0;
++}
diff --git a/media-video/mplayer/files/mplayer-undefined-reference-fix.patch b/media-video/mplayer/files/mplayer-undefined-reference-fix.patch
new file mode 100644
index 0000000..aaa866b
--- /dev/null
+++ b/media-video/mplayer/files/mplayer-undefined-reference-fix.patch
@@ -0,0 +1,10 @@
+--- mplayer/libvo/vo_yuv4mpeg.c.orig 2006-10-07 10:22:45.000000000 +0000
++++ mplayer/libvo/vo_yuv4mpeg.c 2006-10-20 14:51:37.464890580 +0000
+@@ -41,6 +41,7 @@
+ #include "fastmemcpy.h"
+ #include "libswscale/swscale.h"
+ #include "libmpcodecs/vf_scale.h"
++#include "libswscale/rgb2rgb.h"
+
+ static vo_info_t info =
+ {
diff --git a/media-video/mplayer/files/mplayer-xshape.patch b/media-video/mplayer/files/mplayer-xshape.patch
new file mode 100644
index 0000000..1436ccd
--- /dev/null
+++ b/media-video/mplayer/files/mplayer-xshape.patch
@@ -0,0 +1,12 @@
+--- configure.orig 2006-12-14 09:47:52.000000000 -0500
++++ configure 2006-12-14 09:48:12.000000000 -0500
+@@ -7011,7 +7011,7 @@
+ return exitvar;
+ }
+ EOF
+- cc_check && _xshape=yes
++ cc_check "-lXext" && _xshape=yes
+ fi
+ if test "$_xshape" = yes ; then
+ _def_xshape='#define HAVE_XSHAPE 1'
+
diff --git a/media-video/mplayer/files/mplayer.desktop b/media-video/mplayer/files/mplayer.desktop
new file mode 100644
index 0000000..3e2e7b3
--- /dev/null
+++ b/media-video/mplayer/files/mplayer.desktop
@@ -0,0 +1,13 @@
+[Desktop Entry]
+Type=Application
+Encoding=UTF-8
+StartupNotify=false
+Name=MPlayer
+Comment=Media Player For Linux
+GenericName=Video Player
+Exec=gmplayer
+Terminal=false
+Type=Application
+Icon=mplayer.xpm
+Categories=Application;Multimedia;AudioVideo;Player;
+MimeType=video/quicktime;video/x-quicktime;image/x-quicktime;application/x-quicktimeplayer;video/x-ms-asf-plugin;video/x-msvideo;video/msvideo;application/x-mplayer2;video/x-ms-wm;video/x-ms-asf;video/x-ms-wmv;video/x-ms-wmp;video/x-ms-wvx;audio/x-ms-wax;audio/x-ms-wma;application/x-drm-v2;audio/wav;audio/x-wav;video/mpeg;audio/mpeg;video/x-mpeg;video/x-mpeg2;audio/mpeg;audio/x-mpeg;audio/mpeg2;audio/x-mpeg2;audio/mpeg3;audio/x-mpeg3;audio/x-mp3;audio/mp3;video/mp4;video/fli;video/x-fli;video/vnd.vivo;application/x-ogg;application/ogg
diff --git a/media-video/mplayer/metadata.xml b/media-video/mplayer/metadata.xml
new file mode 100644
index 0000000..edccfe5
--- /dev/null
+++ b/media-video/mplayer/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>video</herd>
+<maintainer>
+<email>media-video@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/media-video/mplayer/mplayer-1.0.20070622-r3.ebuild b/media-video/mplayer/mplayer-1.0.20070622-r3.ebuild
new file mode 100644
index 0000000..09abcd0
--- /dev/null
+++ b/media-video/mplayer/mplayer-1.0.20070622-r3.ebuild
@@ -0,0 +1,556 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-video/mplayer/mplayer-1.0.20070622-r3.ebuild,v 1.1 2007/07/28 15:25:18 beandog Exp $
+
+inherit eutils flag-o-matic multilib
+
+RESTRICT="strip"
+IUSE="3dnow 3dnowext a52 aac aalib alsa altivec amrnb amrwb arts bidi bl bindist
+cddb cpudetection custom-cflags dga doc dts dvb cdparanoia directfb dvd
+dvdnav dv enca encode esd fbcon ftp gif ggi gtk iconv ipv6 ivtv jack joystick
+jpeg libcaca lirc live livecd lzo mad md5sum mmx mmxext mp2 mp3 musepack nas
+unicode vorbis opengl openal oss png pnm quicktime radio rar real rtc samba sdl speex srt sse sse2 ssse3 svga tga theora tivo truetype v4l v4l2 vidix win32codecs X x264 xanim xinerama xv xvid xvmc zoran"
+
+VIDEO_CARDS="s3virge mga tdfx vesa"
+
+for X in ${VIDEO_CARDS}; do
+ IUSE="${IUSE} video_cards_${X}"
+done
+
+BLUV=1.7
+SVGV=1.9.17
+MY_PV="20070622"
+S="${WORKDIR}/${PN}-${MY_PV}"
+AMR_URI="http://www.3gpp.org/ftp/Specs/archive"
+SRC_URI="mirror://gentoo/${PN}-${MY_PV}.tar.bz2
+ !truetype? ( mirror://mplayer/releases/fonts/font-arial-iso-8859-1.tar.bz2
+ mirror://mplayer/releases/fonts/font-arial-iso-8859-2.tar.bz2
+ mirror://mplayer/releases/fonts/font-arial-cp1250.tar.bz2 )
+ !iconv? ( mirror://mplayer/releases/fonts/font-arial-iso-8859-1.tar.bz2
+ mirror://mplayer/releases/fonts/font-arial-iso-8859-2.tar.bz2
+ mirror://mplayer/releases/fonts/font-arial-cp1250.tar.bz2 )
+ gtk? ( mirror://mplayer/Skin/Blue-${BLUV}.tar.bz2 )
+ svga? ( http://mplayerhq.hu/~alex/svgalib_helper-${SVGV}-mplayer.tar.bz2 )"
+
+DESCRIPTION="Media Player for Linux "
+HOMEPAGE="http://www.mplayerhq.hu/"
+
+RDEPEND="sys-libs/ncurses
+ !livecd? (
+ !bindist? (
+ x86? (
+ win32codecs? ( media-libs/win32codecs )
+ real? ( media-libs/win32codecs
+ media-video/realplayer )
+ )
+ amd64? ( real? ( media-libs/amd64codecs ) )
+ )
+ )
+ aalib? ( media-libs/aalib )
+ alsa? ( media-libs/alsa-lib )
+ amrnb? ( media-libs/amrnb )
+ amrwb? ( media-libs/amrwb )
+ arts? ( kde-base/arts )
+ openal? ( media-libs/openal )
+ bidi? ( dev-libs/fribidi )
+ cdparanoia? ( media-sound/cdparanoia )
+ directfb? ( dev-libs/DirectFB )
+ dts? ( media-libs/libdts )
+ dv? ( media-libs/libdv )
+ dvb? ( media-tv/linuxtv-dvb-headers )
+ dvd? ( dvdnav? ( media-libs/libdvdnav ) )
+ encode? (
+ aac? ( media-libs/faac )
+ mp2? ( media-sound/twolame )
+ mp3? ( media-sound/lame )
+ )
+ esd? ( media-sound/esound )
+ enca? ( app-i18n/enca )
+ gif? ( media-libs/giflib )
+ ggi? ( media-libs/libggi )
+ gtk? ( media-libs/libpng
+ x11-libs/libXxf86vm
+ x11-libs/libXext
+ x11-libs/libXi
+ =x11-libs/gtk+-2* )
+ jpeg? ( media-libs/jpeg )
+ libcaca? ( media-libs/libcaca )
+ lirc? ( app-misc/lirc )
+ lzo? ( >=dev-libs/lzo-2 )
+ mad? ( media-libs/libmad )
+ musepack? ( >=media-libs/libmpcdec-1.2.2 )
+ nas? ( media-libs/nas )
+ opengl? ( virtual/opengl )
+ png? ( media-libs/libpng )
+ pnm? ( media-libs/netpbm )
+ samba? ( net-fs/samba )
+ sdl? ( media-libs/libsdl )
+ speex? ( >=media-libs/speex-1.1.7 )
+ srt? ( >=media-libs/freetype-2.1
+ media-libs/fontconfig )
+ svga? ( media-libs/svgalib )
+ theora? ( media-libs/libtheora )
+ live? ( >=media-plugins/live-2007.02.20 )
+ truetype? ( >=media-libs/freetype-2.1
+ media-libs/fontconfig )
+ vidix? ( x11-libs/libXxf86vm
+ x11-libs/libXext )
+ x264? ( media-libs/x264-svn )
+ xanim? ( media-video/xanim )
+ xinerama? ( x11-libs/libXinerama
+ x11-libs/libXxf86vm
+ x11-libs/libXext )
+ xv? ( x11-libs/libXv
+ x11-libs/libXxf86vm
+ x11-libs/libXext
+ xvmc? ( x11-libs/libXvMC ) )
+ xvid? ( media-libs/xvid )
+ X? ( x11-libs/libXxf86vm
+ x11-libs/libXext
+ )"
+# video_cards_vesa? ( sys-apps/vbetool ) restrict on x86 first
+
+DEPEND="${RDEPEND}
+ app-arch/unzip
+ doc? ( >=app-text/docbook-sgml-dtd-4.1.2
+ app-text/docbook-xml-dtd
+ >=app-text/docbook-xml-simple-dtd-1.50.0
+ dev-libs/libxslt
+ )
+ dga? ( x11-proto/xf86dgaproto )
+ xinerama? ( x11-proto/xineramaproto )
+ xv? ( x11-proto/videoproto
+ x11-proto/xf86vidmodeproto )
+ gtk? ( x11-proto/xextproto
+ x11-proto/xf86vidmodeproto )
+ X? ( x11-proto/xextproto
+ x11-proto/xf86vidmodeproto )
+ iconv? ( virtual/libiconv )"
+# Make sure the assembler USE flags are unmasked on amd64
+# Remove this once default-linux/amd64/2006.1 is deprecated
+DEPEND="${DEPEND} amd64? ( >=sys-apps/portage-2.1.2 )
+ mp2? ( >=sys-apps/portage-2.1.2 )
+ ivtv? ( !x86-fbsd? ( <sys-kernel/linux-headers-2.6.20
+ media-tv/ivtv
+ >=sys-apps/portage-2.1.2 ) )"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
+
+pkg_setup() {
+
+ if [[ -n ${LINGUAS} ]]; then
+ elog "For MPlayer's language support, the configuration will"
+ elog "use your LINGUAS variable from /etc/make.conf. If you have more"
+ elog "than one language enabled, then the first one in the list will"
+ elog "be used to output the messages, if a translation is available."
+ elog "man pages will be created for all languages where translations"
+ elog "are also available."
+ fi
+
+}
+
+src_unpack() {
+
+ unpack ${PN}-${MY_PV}.tar.bz2
+
+ if ! use truetype ; then
+ unpack font-arial-iso-8859-1.tar.bz2 \
+ font-arial-iso-8859-2.tar.bz2 \
+ font-arial-cp1250.tar.bz2
+ fi
+
+ use gtk && unpack Blue-${BLUV}.tar.bz2
+
+ use svga && unpack svgalib_helper-${SVGV}-mplayer.tar.bz2
+
+ cd ${S}
+
+ # Fix hppa compilation
+ use hppa && sed -i -e "s/-O4/-O1/" "${S}/configure"
+
+ if use svga; then
+ echo
+ einfo "Enabling vidix non-root mode."
+ einfo "(You need a proper svgalib_helper.o module for your kernel"
+ einfo " to actually use this)"
+ echo
+
+ mv ${WORKDIR}/svgalib_helper ${S}/libdha
+ fi
+
+ # Remove kernel-2.6 workaround as the problem it works around is
+ # fixed, and the workaround breaks sparc
+ # use sparc && sed -i 's:#define __KERNEL__::' osdep/kerneltwosix.h
+
+ # minor fix
+ # sed -i -e "s:-O4:-O4 -D__STDC_LIMIT_MACROS:" configure
+
+ # Fix XShape detection
+ epatch ${FILESDIR}/${PN}-xshape.patch
+ epatch ${FILESDIR}/${PN}-loongson.patch
+
+}
+
+src_compile() {
+
+ local myconf=" --disable-tv-bsdbt848 \
+ --disable-faad-external \
+ --disable-libcdio"
+
+ # MPlayer reads in the LINGUAS variable from make.conf, and sets
+ # the languages accordingly. Some will have to be altered to match
+ # upstream's naming scheme.
+ [[ -n $LINGUAS ]] && LINGUAS=${LINGUAS/da/dk}
+
+ ################
+ #Optional features#
+ ###############
+ use bidi || myconf="${myconf} --disable-fribidi"
+ use bl && myconf="${myconf} --enable-bl"
+ use cddb || myconf="${myconf} --disable-cddb"
+ use cdparanoia || myconf="${myconf} --disable-cdparanoia"
+ use enca || myconf="${myconf} --disable-enca"
+ use ftp || myconf="${myconf} --disable-ftp"
+ use tivo || myconf="${myconf} --disable-vstream"
+
+ # DVD support
+ # dvdread and libdvdcss are internal libs
+ # http://www.mplayerhq.hu/DOCS/HTML/en/dvd.html
+ # You can optionally use external dvdread support, but against
+ # upstream's suggestion. We don't.
+ # dvdnav support is known to be buggy, but it is the only option
+ # for accessing some DVDs.
+ if use dvd; then
+ use dvdnav || myconf="${myconf} --disable-dvdnav"
+ else
+ myconf="${myconf} --disable-dvdnav --disable-dvdread"
+
+ # Don't disable a52 support since it's native to libavcodec, and is
+ # going to be needed on most DVDs.
+ use a52 || myconf="${myconf} --disable-liba52"
+ fi
+
+ if use encode; then
+ use aac || myconf="${myconf} --disable-faac"
+ use dv || myconf="${myconf} --disable-libdv"
+ use x264 || myconf="${myconf} --disable-x264"
+ else
+ myconf="${myconf} --disable-mencoder --disable-libdv --disable-x264 \
+ --disable-faac"
+ fi
+
+ # SRT (subtitles) requires freetype support
+ # freetype support requires iconv
+ # iconv optionally can use unicode
+ if ! use srt; then
+ myconf="${myconf} --disable-ass"
+ if ! use truetype; then
+ myconf="${myconf} --disable-freetype"
+ if ! use iconv; then
+ myconf="${myconf} --disable-iconv --charset=noconv"
+ fi
+ fi
+ fi
+ use iconv && use unicode && myconf="${myconf} --charset=UTF-8"
+
+ use lirc || myconf="${myconf} --disable-lirc --disable-lircc"
+ myconf="${myconf} $(use_enable joystick)"
+ use ipv6 || myconf="${myconf} --disable-inet6"
+ use rar || myconf="${myconf} --disable-unrarlib"
+ use rtc || myconf="${myconf} --disable-rtc"
+ use samba || myconf="${myconf} --disable-smb"
+
+ # DVB / Video4Linux / Radio support
+ if ( use dvb || use v4l || use v4l2 || use radio ); then
+ use dvb || myconf="${myconf} --disable-dvb --disable-dvbhead"
+ use v4l || myconf="${myconf} --disable-tv-v4l1"
+ use v4l2 || myconf="${myconf} --disable-tv-v4l2"
+ if ( use dvb || use v4l || use v4l2 ) && use radio; then
+ myconf="${myconf} --enable-radio $(use_enable encode radio-capture)"
+ else
+ myconf="${myconf} --disable-radio-v4l2 --disable-radio-bsdbt848"
+ fi
+ else
+ myconf="${myconf} --disable-tv --disable-tv-v4l1 --disable-tv-v4l2 \
+ --disable-radio --disable-radio-v4l2 --disable-radio-bsdbt848 \
+ --disable-dvb --disable-dvbhead"
+ fi
+
+ # disable PVR support
+ # The build will break if you have media-tv/ivtv installed and
+ # linux-headers != 2.6.18, which is currently not keyworded
+ # See also, bug 164748
+ myconf="${myconf} --disable-pvr"
+
+ #########
+ # Codecs #
+ ########
+ for x in gif jpeg live mad musepack pnm speex tga theora xanim xvid; do
+ use ${x} || myconf="${myconf} --disable-${x}"
+ done
+ use aac || myconf="${myconf} --disable-faad-internal"
+ use amrnb || myconf="${myconf} --disable-libamr_nb"
+ use amrwb || myconf="${myconf} --disable-libamr_wb"
+ ! use png && ! use gtk && myconf="${myconf} --disable-png"
+ use lzo || myconf="${myconf} --disable-liblzo"
+ use encode && use mp2 || myconf="${myconf} --disable-twolame \
+ --disable-toolame"
+ use mp3 || myconf="${myconf} --disable-mp3lib"
+ use quicktime || myconf="${myconf} --disable-qtx"
+ use vorbis || myconf="${myconf} --disable-libvorbis"
+ use xanim && myconf="${myconf} --xanimcodecsdir=/usr/lib/xanim/mods"
+ if use x86 || use amd64; then
+ # Real codec support, only available on x86, amd64
+ if use real && use x86; then
+ myconf="${myconf} --realcodecsdir=/opt/RealPlayer/codecs"
+ elif use real && use amd64; then
+ myconf="${myconf} --realcodecsdir=/usr/$(get_libdir)/codecs"
+ else
+ myconf="${myconf} --disable-real"
+ fi
+ if ! use livecd && ! use bindist && ! use real; then
+ myconf="${myconf} $(use_enable win32codecs win32dll)"
+ fi
+ fi
+
+ #############
+ # Video Output #
+ #############
+
+ for x in directfb ivtv ggi md5sum sdl xinerama; do
+ use ${x} || myconf="${myconf} --disable-${x}"
+ done
+ use aalib || myconf="${myconf} --disable-aa"
+ use fbcon || myconf="${myconf} --disable-fbdev"
+ use fbcon && use video_cards_s3virge && myconf="${myconf} --enable-s3fb"
+ use libcaca || myconf="${myconf} --disable-caca"
+ use opengl || myconf="${myconf} --disable-gl"
+ use video_cards_mga || myconf="${myconf} --disable-mga"
+ ( use X && use video_cards_mga ) || myconf="${myconf} --disable-xmga"
+ use video_cards_vesa || myconf="${myconf} --disable-vesa"
+ use vidix || myconf="${myconf} --disable-vidix-internal \
+ --disable-vidix-external"
+ use zoran || myconf="${myconf} --disable-zr"
+
+ # GTK gmplayer gui
+ myconf="${myconf} $(use_enable gtk gui)"
+
+ if use xv; then
+ if use xvmc; then
+ myconf="${myconf} --enable-xvmc --with-xvmclib=XvMCW"
+ else
+ myconf="${myconf} --disable-xvmc"
+ fi
+ else
+ myconf="${myconf} --disable-xv --disable-xvmc"
+ fi
+
+ if use video_cards_tdfx; then
+ myconf="${myconf} $(use_enable video_cards_tdfx tdfxvid) \
+ $(use_enable fbcon tdfxfb)"
+ else
+ myconf="${myconf} --disable-3dfx --disable-tdfxvid --disable-tdfxfb"
+ fi
+
+ #############
+ # Audio Output #
+ #############
+ for x in alsa arts esd jack nas openal; do
+ use ${x} || myconf="${myconf} --disable-${x}"
+ done
+ if ! use radio; then
+ use oss || myconf="${myconf} --disable-ossaudio"
+ fi
+ #################
+ # Advanced Options #
+ #################
+ # Platform specific flags, hardcoded on amd64 (see below)
+ if use x86 || use amd64 || use ppc; then
+ if use cpudetection || use livecd || use bindist; then
+ myconf="${myconf} --enable-runtime-cpudetection"
+ fi
+ fi
+ if use mmx; then
+ for x in 3dnow 3dnowext mmxext sse sse2 ssse3; do
+ use ${x} || myconf="${myconf} --disable-${x}"
+ done
+ else
+ myconf="${myconf} --disable-mmx --disable-mmxext --disable-sse \
+ --disable-sse2 --disable-ssse3 --disable-3dnow \
+ --disable-3dnowext"
+ fi
+
+ # debug broken in this release
+ # use debug && myconf="${myconf} --enable-debug=3"
+
+ if use altivec; then
+ myconf="${myconf} --enable-altivec"
+ else
+ myconf="${myconf} --disable-altivec"
+ fi
+
+ if [ -e /dev/.devfsd ]; then
+ myconf="${myconf} --enable-linux-devfs"
+ fi
+
+ #leave this in place till the configure/compilation borkage is completely corrected back to pre4-r4 levels.
+ # it's intended for debugging so we can get the options we configure mplayer w/, rather then hunt about.
+ # it *will* be removed asap; in the meantime, doesn't hurt anything.
+ echo "${myconf}" > ${T}/configure-options
+
+ if use custom-cflags; then
+ # let's play the filtration game! MPlayer hates on all!
+ strip-flags
+ # ugly optimizations cause MPlayer to cry on x86 systems!
+ if use x86 ; then
+ replace-flags -O* -O2
+ filter-flags -fPIC -fPIE
+
+ # debug broken in this release
+ # use debug || append-flags -fomit-frame-pointer
+ append-flags -fomit-frame-pointer
+ fi
+ append-flags -D__STDC_LIMIT_MACROS
+ else
+ unset CFLAGS CXXFLAGS
+ fi
+
+ myconf="--cc=$(tc-getCC) \
+ --host-cc=$(tc-getBUILD_CC) \
+ --prefix=/usr \
+ --confdir=/etc/mplayer \
+ --datadir=/usr/share/mplayer \
+ --libdir=/usr/$(get_libdir) \
+ --enable-largefiles \
+ --enable-menu \
+ --enable-network \
+ ${myconf}"
+ einfo "Running ./configure"
+ echo "CFLAGS=\"${CFLAGS}\" ./configure ${myconf}"
+ CFLAGS="${CFLAGS}" ./configure ${myconf} || die
+
+ # we run into problems if -jN > -j1
+ # see #86245
+ # This should have long ago been fixed, commenting out
+ #MAKEOPTS="${MAKEOPTS} -j1"
+
+ einfo "Make"
+ emake || die "Failed to build MPlayer!"
+ use doc && make -C DOCS/xml html-chunked
+ einfo "Make completed"
+}
+
+src_install() {
+
+ einfo "Make install"
+ make prefix=${D}/usr \
+ BINDIR=${D}/usr/bin \
+ LIBDIR=${D}/usr/$(get_libdir) \
+ CONFDIR=${D}/etc/mplayer \
+ DATADIR=${D}/usr/share/mplayer \
+ MANDIR=${D}/usr/share/man \
+ install || die "Failed to install MPlayer!"
+ einfo "Make install completed"
+
+ dodoc AUTHORS Changelog README
+ # Install the documentation; DOCS is all mixed up not just html
+ if use doc ; then
+ find "${S}/DOCS" -type d | xargs -- chmod 0755
+ find "${S}/DOCS" -type f | xargs -- chmod 0644
+ cp -r "${S}/DOCS" "${D}/usr/share/doc/${PF}/" || die
+ fi
+
+ # Copy misc tools to documentation path, as they're not installed directly
+ # and yes, we are nuking the +x bit.
+ find "${S}/TOOLS" -type d | xargs -- chmod 0755
+ find "${S}/TOOLS" -type f | xargs -- chmod 0644
+ cp -r "${S}/TOOLS" "${D}/usr/share/doc/${PF}/" || die
+
+ # Install the default Skin and Gnome menu entry
+ if use gtk; then
+ dodir /usr/share/mplayer/skins
+ cp -r ${WORKDIR}/Blue ${D}/usr/share/mplayer/skins/default || die
+
+ # Fix the symlink
+ rm -rf ${D}/usr/bin/gmplayer
+ dosym mplayer /usr/bin/gmplayer
+ fi
+
+ if ! use srt && ! use truetype; then
+ dodir /usr/share/mplayer/fonts
+ local x=
+ # Do this generic, as the mplayer people like to change the structure
+ # of their zips ...
+ for x in $(find ${WORKDIR}/ -type d -name 'font-arial-*')
+ do
+ cp -pPR ${x} ${D}/usr/share/mplayer/fonts
+ done
+ # Fix the font symlink ...
+ rm -rf ${D}/usr/share/mplayer/font
+ dosym fonts/font-arial-14-iso-8859-1 /usr/share/mplayer/font
+ fi
+
+ insinto /etc/mplayer
+ newins ${S}/etc/example.conf mplayer.conf
+
+ if use srt || use truetype; then
+ cat >> ${D}/etc/mplayer/mplayer.conf << EOT
+fontconfig=1
+subfont-osd-scale=4
+subfont-text-scale=3
+EOT
+ fi
+
+ dosym ../../../etc/mplayer.conf /usr/share/mplayer/mplayer.conf
+
+ #mv the midentify script to /usr/bin for emovix.
+ #cp ${D}/usr/share/doc/${PF}/TOOLS/midentify ${D}/usr/bin
+ #chmod a+x ${D}/usr/bin/midentify
+ dobin ${D}/usr/share/doc/${PF}/TOOLS/midentify
+
+ insinto /usr/share/mplayer
+ doins ${S}/etc/input.conf
+ doins ${S}/etc/menu.conf
+}
+
+pkg_preinst() {
+
+ if [ -d "${ROOT}/usr/share/mplayer/Skin/default" ]
+ then
+ rm -rf ${ROOT}/usr/share/mplayer/Skin/default
+ fi
+}
+
+pkg_postinst() {
+
+ if use video_cards_mga; then
+ depmod -a &>/dev/null || :
+ fi
+
+ if use dvdnav && use dvd; then
+ ewarn "'dvdnav' support in MPlayer is known to be buggy, and will"
+ ewarn "break if you are using it in GUI mode. It is only"
+ ewarn "included because some DVDs will only play with this feature."
+ ewarn "If using it for playback only (and not menu navigation),"
+ ewarn "specify the track # with your options."
+ ewarn "mplayer dvdnav://1"
+ fi
+}
+
+pkg_postrm() {
+
+ # Cleanup stale symlinks
+ if [ -L ${ROOT}/usr/share/mplayer/font -a \
+ ! -e ${ROOT}/usr/share/mplayer/font ]
+ then
+ rm -f ${ROOT}/usr/share/mplayer/font
+ fi
+
+ if [ -L ${ROOT}/usr/share/mplayer/subfont.ttf -a \
+ ! -e ${ROOT}/usr/share/mplayer/subfont.ttf ]
+ then
+ rm -f ${ROOT}/usr/share/mplayer/subfont.ttf
+ fi
+}