From 2333b980df0ae75049de68b19f2a2a2590ec9a24 Mon Sep 17 00:00:00 2001 From: Fabian Fingerle Date: Thu, 30 Apr 2009 09:15:28 +0200 Subject: [PATCH] Copy from Berkano Overlay --- Documentation/package.keywords/ffmpeg-live | 1 + Documentation/package.keywords/libdvdnav-live | 1 + Documentation/package.keywords/mplayer-live | 1 + Documentation/package.keywords/screen-live | 1 + Documentation/package.keywords/x264-live | 1 + Documentation/package.keywords/xine-lib-live | 1 + Documentation/package.unmask/nvidia-beta | 2 - Documentation/package.unmask/nvidia-prerelease | 2 - app-misc/screen/ChangeLog | 37 ++ app-misc/screen/Manifest | 9 + app-misc/screen/files/.svn/all-wcprops | 47 ++ app-misc/screen/files/.svn/entries | 266 +++++++++ .../.svn/text-base/4.0.2-no-libelf.patch.svn-base | 18 + .../.svn/text-base/4.0.2-no-pty.patch.svn-base | 14 + .../text-base/4.0.2-no-utempter.patch.svn-base | 14 + .../.svn/text-base/9999-no-libelf.patch.svn-base | 17 + .../.svn/text-base/config-h-in.patch.svn-base | 11 + .../text-base/screen-4.0.1-vsprintf.patch.svn-base | 13 + .../screen/files/.svn/text-base/screenrc.svn-base | 354 ++++++++++++ app-misc/screen/files/4.0.2-no-libelf.patch | 18 + app-misc/screen/files/4.0.2-no-pty.patch | 14 + app-misc/screen/files/4.0.2-no-utempter.patch | 14 + app-misc/screen/files/9999-no-libelf.patch | 17 + app-misc/screen/files/config-h-in.patch | 11 + app-misc/screen/files/screen-4.0.1-vsprintf.patch | 13 + app-misc/screen/files/screenrc | 354 ++++++++++++ app-misc/screen/screen-9999-r1.ebuild | 147 +++++ media-libs/libdvdnav/.svn/all-wcprops | 23 + media-libs/libdvdnav/.svn/entries | 130 +++++ .../libdvdnav/.svn/text-base/ChangeLog.svn-base | 12 + .../libdvdnav/.svn/text-base/Manifest.svn-base | 2 + .../text-base/libdvdnav-9999-r1.ebuild.svn-base | 37 ++ media-libs/libdvdnav/ChangeLog | 15 + media-libs/libdvdnav/Manifest | 2 + media-libs/libdvdnav/libdvdnav-9999-r1.ebuild | 37 ++ media-libs/libdvdread/.svn/all-wcprops | 23 + media-libs/libdvdread/.svn/entries | 130 +++++ .../libdvdread/.svn/text-base/ChangeLog.svn-base | 12 + .../libdvdread/.svn/text-base/Manifest.svn-base | 2 + .../.svn/text-base/libdvdread-9999.ebuild.svn-base | 36 ++ media-libs/libdvdread/ChangeLog | 15 + media-libs/libdvdread/Manifest | 2 + media-libs/libdvdread/libdvdread-9999.ebuild | 36 ++ media-libs/x264/.svn/all-wcprops | 29 + media-libs/x264/.svn/entries | 167 ++++++ .../x264-0.0.20080819-r99.ebuild.svn-base | 5 + media-libs/x264/.svn/text-base/ChangeLog.svn-base | 54 ++ media-libs/x264/.svn/text-base/Manifest.svn-base | 9 + .../x264-0.0.20080819-r99.ebuild.svn-base | 64 +++ .../x264/.svn/text-base/x264-9999.ebuild.svn-base | 59 ++ media-libs/x264/ChangeLog | 58 ++ media-libs/x264/Manifest | 7 + media-libs/x264/files/.svn/all-wcprops | 35 ++ media-libs/x264/files/.svn/entries | 198 +++++++ .../.svn/text-base/x264-nostrip.patch.svn-base | 16 + .../x264-psyrd-0.6-psytrellis-0.1.diff.svn-base | 504 +++++++++++++++++ .../.svn/text-base/x264-psyrdo-0.5.diff.svn-base | 298 ++++++++++ .../.svn/text-base/x264-psyrdo-0.6.diff.svn-base | 297 ++++++++++ .../.svn/text-base/x264_psy_rdo.r889.diff.svn-base | 160 ++++++ media-libs/x264/files/x264-nostrip.patch | 16 + .../x264/files/x264-psyrd-0.6-psytrellis-0.1.diff | 504 +++++++++++++++++ media-libs/x264/files/x264-psyrdo-0.5.diff | 298 ++++++++++ media-libs/x264/files/x264-psyrdo-0.6.diff | 297 ++++++++++ media-libs/x264/files/x264_psy_rdo.r889.diff | 160 ++++++ media-libs/x264/x264-9999.ebuild | 59 ++ media-libs/xine-lib/.svn/all-wcprops | 41 ++ media-libs/xine-lib/.svn/entries | 235 ++++++++ .../xine-lib/.svn/text-base/ChangeLog.svn-base | 27 + .../xine-lib/.svn/text-base/Manifest.svn-base | 9 + .../text-base/xine-lib-1.1.9999.ebuild.svn-base | 179 ++++++ .../xine-lib-1.2.9999_p235.ebuild.svn-base | 191 +++++++ .../xine-lib-1.2.9999_p240.ebuild.svn-base | 191 +++++++ .../xine-lib-1.2.9999_p247.ebuild.svn-base | 193 +++++++ media-libs/xine-lib/ChangeLog | 32 ++ media-libs/xine-lib/Manifest | 4 + media-libs/xine-lib/files/.svn/all-wcprops | 11 + media-libs/xine-lib/files/.svn/entries | 62 +++ .../xine-lib-1.2-hg-compile-error.diff.svn-base | 12 + .../files/xine-lib-1.2-hg-compile-error.diff | 12 + media-libs/xine-lib/xine-lib-1.2.9999_p247.ebuild | 193 +++++++ media-video/ffmpeg/ChangeLog | 165 ++++++ media-video/ffmpeg/Manifest | 2 + media-video/ffmpeg/ffmpeg-20099999-r1.ebuild | 189 +++++++ media-video/mplayer/ChangeLog | 228 ++++++++ media-video/mplayer/Manifest | 13 + media-video/mplayer/files/.svn/all-wcprops | 41 ++ media-video/mplayer/files/.svn/entries | 232 ++++++++ .../files/.svn/text-base/README-vdpau.txt.svn-base | 80 +++ ...sable-version-rebranding-2009-01.patch.svn-base | 16 + .../disable-version-rebranding.patch.svn-base | 15 + .../files/.svn/text-base/eac3-id.conf.svn-base | 8 + .../files/.svn/text-base/mplayer.desktop.svn-base | 13 + .../.svn/text-base/nellymoserenc.patch.svn-base | 13 + media-video/mplayer/files/README-vdpau.txt | 80 +++ .../files/disable-version-rebranding-2009-01.patch | 16 + .../mplayer/files/disable-version-rebranding.patch | 15 + media-video/mplayer/files/eac3-id.conf | 8 + media-video/mplayer/files/mplayer.desktop | 13 + media-video/mplayer/files/nellymoserenc.patch | 13 + media-video/mplayer/mplayer-99999999.ebuild | 620 +++++++++++++++++++++ 100 files changed, 8374 insertions(+), 4 deletions(-) create mode 100644 Documentation/package.keywords/ffmpeg-live create mode 100644 Documentation/package.keywords/libdvdnav-live create mode 100644 Documentation/package.keywords/mplayer-live create mode 100644 Documentation/package.keywords/screen-live create mode 100644 Documentation/package.keywords/x264-live create mode 100644 Documentation/package.keywords/xine-lib-live delete mode 100644 Documentation/package.unmask/nvidia-beta delete mode 100644 Documentation/package.unmask/nvidia-prerelease create mode 100644 app-misc/screen/ChangeLog create mode 100644 app-misc/screen/Manifest create mode 100644 app-misc/screen/files/.svn/all-wcprops create mode 100644 app-misc/screen/files/.svn/entries create mode 100644 app-misc/screen/files/.svn/text-base/4.0.2-no-libelf.patch.svn-base create mode 100644 app-misc/screen/files/.svn/text-base/4.0.2-no-pty.patch.svn-base create mode 100644 app-misc/screen/files/.svn/text-base/4.0.2-no-utempter.patch.svn-base create mode 100644 app-misc/screen/files/.svn/text-base/9999-no-libelf.patch.svn-base create mode 100644 app-misc/screen/files/.svn/text-base/config-h-in.patch.svn-base create mode 100644 app-misc/screen/files/.svn/text-base/screen-4.0.1-vsprintf.patch.svn-base create mode 100644 app-misc/screen/files/.svn/text-base/screenrc.svn-base create mode 100644 app-misc/screen/files/4.0.2-no-libelf.patch create mode 100644 app-misc/screen/files/4.0.2-no-pty.patch create mode 100644 app-misc/screen/files/4.0.2-no-utempter.patch create mode 100644 app-misc/screen/files/9999-no-libelf.patch create mode 100644 app-misc/screen/files/config-h-in.patch create mode 100644 app-misc/screen/files/screen-4.0.1-vsprintf.patch create mode 100644 app-misc/screen/files/screenrc create mode 100644 app-misc/screen/screen-9999-r1.ebuild create mode 100644 media-libs/libdvdnav/.svn/all-wcprops create mode 100644 media-libs/libdvdnav/.svn/entries create mode 100644 media-libs/libdvdnav/.svn/text-base/ChangeLog.svn-base create mode 100644 media-libs/libdvdnav/.svn/text-base/Manifest.svn-base create mode 100644 media-libs/libdvdnav/.svn/text-base/libdvdnav-9999-r1.ebuild.svn-base create mode 100644 media-libs/libdvdnav/ChangeLog create mode 100644 media-libs/libdvdnav/Manifest create mode 100644 media-libs/libdvdnav/libdvdnav-9999-r1.ebuild create mode 100644 media-libs/libdvdread/.svn/all-wcprops create mode 100644 media-libs/libdvdread/.svn/entries create mode 100644 media-libs/libdvdread/.svn/text-base/ChangeLog.svn-base create mode 100644 media-libs/libdvdread/.svn/text-base/Manifest.svn-base create mode 100644 media-libs/libdvdread/.svn/text-base/libdvdread-9999.ebuild.svn-base create mode 100644 media-libs/libdvdread/ChangeLog create mode 100644 media-libs/libdvdread/Manifest create mode 100644 media-libs/libdvdread/libdvdread-9999.ebuild create mode 100644 media-libs/x264/.svn/all-wcprops create mode 100644 media-libs/x264/.svn/entries create mode 100644 media-libs/x264/.svn/prop-base/x264-0.0.20080819-r99.ebuild.svn-base create mode 100644 media-libs/x264/.svn/text-base/ChangeLog.svn-base create mode 100644 media-libs/x264/.svn/text-base/Manifest.svn-base create mode 100644 media-libs/x264/.svn/text-base/x264-0.0.20080819-r99.ebuild.svn-base create mode 100644 media-libs/x264/.svn/text-base/x264-9999.ebuild.svn-base create mode 100644 media-libs/x264/ChangeLog create mode 100644 media-libs/x264/Manifest create mode 100644 media-libs/x264/files/.svn/all-wcprops create mode 100644 media-libs/x264/files/.svn/entries create mode 100644 media-libs/x264/files/.svn/text-base/x264-nostrip.patch.svn-base create mode 100644 media-libs/x264/files/.svn/text-base/x264-psyrd-0.6-psytrellis-0.1.diff.svn-base create mode 100644 media-libs/x264/files/.svn/text-base/x264-psyrdo-0.5.diff.svn-base create mode 100644 media-libs/x264/files/.svn/text-base/x264-psyrdo-0.6.diff.svn-base create mode 100644 media-libs/x264/files/.svn/text-base/x264_psy_rdo.r889.diff.svn-base create mode 100644 media-libs/x264/files/x264-nostrip.patch create mode 100644 media-libs/x264/files/x264-psyrd-0.6-psytrellis-0.1.diff create mode 100644 media-libs/x264/files/x264-psyrdo-0.5.diff create mode 100644 media-libs/x264/files/x264-psyrdo-0.6.diff create mode 100644 media-libs/x264/files/x264_psy_rdo.r889.diff create mode 100644 media-libs/x264/x264-9999.ebuild create mode 100644 media-libs/xine-lib/.svn/all-wcprops create mode 100644 media-libs/xine-lib/.svn/entries create mode 100644 media-libs/xine-lib/.svn/text-base/ChangeLog.svn-base create mode 100644 media-libs/xine-lib/.svn/text-base/Manifest.svn-base create mode 100644 media-libs/xine-lib/.svn/text-base/xine-lib-1.1.9999.ebuild.svn-base create mode 100644 media-libs/xine-lib/.svn/text-base/xine-lib-1.2.9999_p235.ebuild.svn-base create mode 100644 media-libs/xine-lib/.svn/text-base/xine-lib-1.2.9999_p240.ebuild.svn-base create mode 100644 media-libs/xine-lib/.svn/text-base/xine-lib-1.2.9999_p247.ebuild.svn-base create mode 100644 media-libs/xine-lib/ChangeLog create mode 100644 media-libs/xine-lib/Manifest create mode 100644 media-libs/xine-lib/files/.svn/all-wcprops create mode 100644 media-libs/xine-lib/files/.svn/entries create mode 100644 media-libs/xine-lib/files/.svn/text-base/xine-lib-1.2-hg-compile-error.diff.svn-base create mode 100644 media-libs/xine-lib/files/xine-lib-1.2-hg-compile-error.diff create mode 100644 media-libs/xine-lib/xine-lib-1.2.9999_p247.ebuild create mode 100644 media-video/ffmpeg/ChangeLog create mode 100644 media-video/ffmpeg/Manifest create mode 100644 media-video/ffmpeg/ffmpeg-20099999-r1.ebuild create mode 100644 media-video/mplayer/ChangeLog create mode 100644 media-video/mplayer/Manifest create mode 100644 media-video/mplayer/files/.svn/all-wcprops create mode 100644 media-video/mplayer/files/.svn/entries create mode 100644 media-video/mplayer/files/.svn/text-base/README-vdpau.txt.svn-base create mode 100644 media-video/mplayer/files/.svn/text-base/disable-version-rebranding-2009-01.patch.svn-base create mode 100644 media-video/mplayer/files/.svn/text-base/disable-version-rebranding.patch.svn-base create mode 100644 media-video/mplayer/files/.svn/text-base/eac3-id.conf.svn-base create mode 100644 media-video/mplayer/files/.svn/text-base/mplayer.desktop.svn-base create mode 100644 media-video/mplayer/files/.svn/text-base/nellymoserenc.patch.svn-base create mode 100644 media-video/mplayer/files/README-vdpau.txt create mode 100644 media-video/mplayer/files/disable-version-rebranding-2009-01.patch create mode 100644 media-video/mplayer/files/disable-version-rebranding.patch create mode 100644 media-video/mplayer/files/eac3-id.conf create mode 100644 media-video/mplayer/files/mplayer.desktop create mode 100644 media-video/mplayer/files/nellymoserenc.patch create mode 100644 media-video/mplayer/mplayer-99999999.ebuild diff --git a/Documentation/package.keywords/ffmpeg-live b/Documentation/package.keywords/ffmpeg-live new file mode 100644 index 0000000..07a99db --- /dev/null +++ b/Documentation/package.keywords/ffmpeg-live @@ -0,0 +1 @@ +=media-video/ffmpeg-20099999-r1 ** diff --git a/Documentation/package.keywords/libdvdnav-live b/Documentation/package.keywords/libdvdnav-live new file mode 100644 index 0000000..b769308 --- /dev/null +++ b/Documentation/package.keywords/libdvdnav-live @@ -0,0 +1 @@ +=media-libs/libdvdnav-9999-r1 ** diff --git a/Documentation/package.keywords/mplayer-live b/Documentation/package.keywords/mplayer-live new file mode 100644 index 0000000..b9a49d3 --- /dev/null +++ b/Documentation/package.keywords/mplayer-live @@ -0,0 +1 @@ +=media-video/mplayer-99999999 ** diff --git a/Documentation/package.keywords/screen-live b/Documentation/package.keywords/screen-live new file mode 100644 index 0000000..953834c --- /dev/null +++ b/Documentation/package.keywords/screen-live @@ -0,0 +1 @@ +=app-misc/screen-9999-r1 ** diff --git a/Documentation/package.keywords/x264-live b/Documentation/package.keywords/x264-live new file mode 100644 index 0000000..4d3053e --- /dev/null +++ b/Documentation/package.keywords/x264-live @@ -0,0 +1 @@ +=media-libs-x264-9999 ** diff --git a/Documentation/package.keywords/xine-lib-live b/Documentation/package.keywords/xine-lib-live new file mode 100644 index 0000000..5f1a2b2 --- /dev/null +++ b/Documentation/package.keywords/xine-lib-live @@ -0,0 +1 @@ +=media-libs/xine-lib-1.2.9999_p247 ** diff --git a/Documentation/package.unmask/nvidia-beta b/Documentation/package.unmask/nvidia-beta deleted file mode 100644 index 178d53c..0000000 --- a/Documentation/package.unmask/nvidia-beta +++ /dev/null @@ -1,2 +0,0 @@ -=media-video/nvidia-settings-185.18.04 -=x11-drivers/nvidia-drivers-185.18.04 diff --git a/Documentation/package.unmask/nvidia-prerelease b/Documentation/package.unmask/nvidia-prerelease deleted file mode 100644 index 17c0928..0000000 --- a/Documentation/package.unmask/nvidia-prerelease +++ /dev/null @@ -1,2 +0,0 @@ -=media-video/nvidia-settings-180.53 -=x11-drivers/nvidia-drivers-180.53 diff --git a/app-misc/screen/ChangeLog b/app-misc/screen/ChangeLog new file mode 100644 index 0000000..14fe015 --- /dev/null +++ b/app-misc/screen/ChangeLog @@ -0,0 +1,37 @@ +# ChangeLog for app-misc/screen +# Copyright 2006-2009 Berkano Overlay; distributed under the GPL version 2 + + 30 Apr 2009, Fabian Fingerle : + Copy from Berkano Overlay + + 29 Apr 2009; Ben de Groot ; screen-9999-r1.ebuild: + Drop keywords in live ebuilds + + 14 Dec 2008; Ben de Groot ; files/9999-no-libelf.patch: + Updating 9999-no-libelf.patch + + 08 Aug 2008; Ben de Groot ; + +files/9999-no-libelf.patch, screen-9999-r1.ebuild: + Updating ebuild for latest upstream changes. Adding USE=doc for info page, + because that depends on sys-apps/texinfo. + + 07 Aug 2008; Ben de Groot ; + -files/screen-4.0.1-int-overflow-fix.patch, + -files/4.0.2-windowlist-multiuser-fix.patch, + -files/screen-4.0.3_p20070403-map.patch, -files/4.0.2-64bit-time.patch, + -screen-9999.ebuild, -files/4.0.2-nonblock.patch, screen-9999-r1.ebuild: + Cleanup + + 20 Jul 2008; Ben de Groot ; +screen-9999-r1.ebuild, + +files/config-h-in.patch: + Moving to git + + 23 Sep 2007; Ben de Groot (yngwin) ; + +files/screen-4.0.1-int-overflow-fix.patch, + +files/screen-4.0.1-vsprintf.patch, +files/4.0.2-64bit-time.patch, + +screen-9999.ebuild, +files/4.0.2-no-libelf.patch, + +files/4.0.2-no-pty.patch, +files/4.0.2-no-utempter.patch, + +files/4.0.2-nonblock.patch, +files/screen-4.0.3_p20070403-map.patch, + +files/4.0.2-windowlist-multiuser-fix.patch, +files/screenrc: + Importing svn ebuild for screen. Based on ebuild in live-ebuilds overlay. + diff --git a/app-misc/screen/Manifest b/app-misc/screen/Manifest new file mode 100644 index 0000000..561a4cf --- /dev/null +++ b/app-misc/screen/Manifest @@ -0,0 +1,9 @@ +AUX 4.0.2-no-libelf.patch 555 RMD160 4af1c158b0a4e0124fec8347090bf5d25634fdf5 SHA1 fe33038030600e60369374b994c47e68e2bb6bd3 SHA256 56cc1f7b2d02ba230501c7c87da170fa791639cb1f36b2b0b87d8644e5372059 +AUX 4.0.2-no-pty.patch 392 RMD160 d29aec55c6b76f66a8340096f627afe2e4dca3e8 SHA1 bd1328e0dbb321397692846b5c2ac62df1885a9c SHA256 edc29bc7b7bea89c2f937ca9c95f2ce51b437e4ea042741d9f4ac6d7954178d5 +AUX 4.0.2-no-utempter.patch 440 RMD160 3e0ee3492e5ae84bf05716a1787dee495362bc39 SHA1 f0f810a969790c7d2f6ecd6787909371bab79879 SHA256 cc0178fb86971c0975e3d6d60677f2ad3a393ea126790dc5d56f566c42ebe384 +AUX 9999-no-libelf.patch 541 RMD160 0f2a7636d240aa3a17342c455edf2e33679ca31c SHA1 ab11a782778e758e587218abab072ec48dc9110e SHA256 5e903a930b4d93441b51a82bb5f6b2fa931f45fc71668b7606e371a6c0e70668 +AUX config-h-in.patch 380 RMD160 d5d6b61a8b7c526d9d7538fd0570cfc2492b6887 SHA1 ef99d5e66a61ffc819a684834e69fb4cd8606a9c SHA256 d09196e319b13b88e41ebbb4728cc84349b058f9b0605a4d5b850f290d714155 +AUX screen-4.0.1-vsprintf.patch 480 RMD160 cc80e7353e19d7d82dc506ae3a5eaaedba4db1ca SHA1 b1bf4b8f45236dc63de748699671679ce7237a59 SHA256 34d2f9d6101555fbc37e983542f3db549ea96ede89c7d87c21c69b7331d9c3cd +AUX screenrc 10357 RMD160 c4c68748b74207f7ee509de9f79262e3fedc66a8 SHA1 d72b16e1b54ba6e529912f0fd8f185f67aa79040 SHA256 1f454ad8acf59024ad2ad2acba2918a10d9c8fb3305a86ff53cd3049e9cef6cf +EBUILD screen-9999-r1.ebuild 3781 RMD160 b3804adcc5f8a558d9aea7e4ce07c4765f688396 SHA1 f46da535a1fa2fd69220ea7a5150dde4d182f665 SHA256 864badd9080569da23c0a2e25c6a5fae2ff7c7fa469b91b3302495a8e36cca29 +MISC ChangeLog 1550 RMD160 30d7bed5ab12aa497dab501f071a7f76645b7ec2 SHA1 49a236415c93003a234a8fe9f8c7de36e38aece1 SHA256 ea506de34576a3841fdb2187a518d4b594b303c11ab45ad4693ddf55f07ec24f diff --git a/app-misc/screen/files/.svn/all-wcprops b/app-misc/screen/files/.svn/all-wcprops new file mode 100644 index 0000000..80512f5 --- /dev/null +++ b/app-misc/screen/files/.svn/all-wcprops @@ -0,0 +1,47 @@ +K 25 +svn:wc:ra_dav:version-url +V 49 +/berkano/!svn/ver/459/trunk/app-misc/screen/files +END +4.0.2-no-pty.patch +K 25 +svn:wc:ra_dav:version-url +V 68 +/berkano/!svn/ver/224/trunk/app-misc/screen/files/4.0.2-no-pty.patch +END +4.0.2-no-libelf.patch +K 25 +svn:wc:ra_dav:version-url +V 71 +/berkano/!svn/ver/224/trunk/app-misc/screen/files/4.0.2-no-libelf.patch +END +screen-4.0.1-vsprintf.patch +K 25 +svn:wc:ra_dav:version-url +V 77 +/berkano/!svn/ver/224/trunk/app-misc/screen/files/screen-4.0.1-vsprintf.patch +END +screenrc +K 25 +svn:wc:ra_dav:version-url +V 58 +/berkano/!svn/ver/224/trunk/app-misc/screen/files/screenrc +END +9999-no-libelf.patch +K 25 +svn:wc:ra_dav:version-url +V 70 +/berkano/!svn/ver/459/trunk/app-misc/screen/files/9999-no-libelf.patch +END +4.0.2-no-utempter.patch +K 25 +svn:wc:ra_dav:version-url +V 73 +/berkano/!svn/ver/224/trunk/app-misc/screen/files/4.0.2-no-utempter.patch +END +config-h-in.patch +K 25 +svn:wc:ra_dav:version-url +V 67 +/berkano/!svn/ver/379/trunk/app-misc/screen/files/config-h-in.patch +END diff --git a/app-misc/screen/files/.svn/entries b/app-misc/screen/files/.svn/entries new file mode 100644 index 0000000..10dc855 --- /dev/null +++ b/app-misc/screen/files/.svn/entries @@ -0,0 +1,266 @@ +10 + +dir +504 +http://svn.liveforge.org/berkano/trunk/app-misc/screen/files +http://svn.liveforge.org/berkano + + + +2008-12-14T16:51:11.222960Z +459 +yngwin + + + + + + + + + + + + + + +3a429e60-251d-0410-826f-ead4734d2cae + +4.0.2-no-pty.patch +file + + + + +2008-12-06T03:31:20.000000Z +bebe7dbe3fee13c1251a9bd30535b245 +2007-09-23T17:58:02.585441Z +224 +yngwin + + + + + + + + + + + + + + + + + + + + + +392 + +4.0.2-no-libelf.patch +file + + + + +2008-12-06T03:31:20.000000Z +2531444b0a51bc5ba5ea1db2d2ec1f4b +2007-09-23T17:58:02.585441Z +224 +yngwin + + + + + + + + + + + + + + + + + + + + + +555 + +screen-4.0.1-vsprintf.patch +file + + + + +2008-12-06T03:31:20.000000Z +304be93a4c3b72f2f761f45194059287 +2007-09-23T17:58:02.585441Z +224 +yngwin + + + + + + + + + + + + + + + + + + + + + +480 + +screenrc +file + + + + +2008-12-06T03:31:20.000000Z +3ddd5c55fd7f0891bb953fc229845898 +2007-09-23T17:58:02.585441Z +224 +yngwin + + + + + + + + + + + + + + + + + + + + + +10357 + +9999-no-libelf.patch +file + + + + +2008-12-14T20:49:52.000000Z +5a3f8da29350edeb2d2237acabc1b3ed +2008-12-14T16:51:11.222960Z +459 +yngwin + + + + + + + + + + + + + + + + + + + + + +541 + +4.0.2-no-utempter.patch +file + + + + +2008-12-06T03:31:20.000000Z +7f5ab1c54d87ad24f0a8bafbbcf24844 +2007-09-23T17:58:02.585441Z +224 +yngwin + + + + + + + + + + + + + + + + + + + + + +440 + +config-h-in.patch +file + + + + +2008-12-06T03:31:20.000000Z +0fb3435cf0a813cc8c824b80b952cdd1 +2008-07-20T00:01:10.853813Z +379 +ben + + + + + + + + + + + + + + + + + + + + + +380 + diff --git a/app-misc/screen/files/.svn/text-base/4.0.2-no-libelf.patch.svn-base b/app-misc/screen/files/.svn/text-base/4.0.2-no-libelf.patch.svn-base new file mode 100644 index 0000000..df06383 --- /dev/null +++ b/app-misc/screen/files/.svn/text-base/4.0.2-no-libelf.patch.svn-base @@ -0,0 +1,18 @@ +--- screen-4.0.2/configure.in 2005-05-22 19:55:06.559874997 +0000 ++++ screen-4.0.2-no-libelf/configure.in 2005-05-22 19:56:05.895801017 +0000 +@@ -195,15 +195,6 @@ + #endif + ], LIBS="$LIBS -lsocket -linet";seqptx=1) + +-oldlibs="$LIBS" +-LIBS="$LIBS -lelf" +-AC_CHECKING(SVR4) +-AC_TRY_LINK([#include +-],, +-[AC_CHECK_HEADER(dwarf.h, AC_DEFINE(SVR4) AC_DEFINE(BUGGYGETLOGIN), +-[AC_CHECK_HEADER(elf.h, AC_DEFINE(SVR4) AC_DEFINE(BUGGYGETLOGIN))])] +-,LIBS="$oldlibs") +- + AC_CHECKING(for Solaris 2.x) + AC_EGREP_CPP(yes, + [#if defined(SVR4) && defined(sun) diff --git a/app-misc/screen/files/.svn/text-base/4.0.2-no-pty.patch.svn-base b/app-misc/screen/files/.svn/text-base/4.0.2-no-pty.patch.svn-base new file mode 100644 index 0000000..7b7b798 --- /dev/null +++ b/app-misc/screen/files/.svn/text-base/4.0.2-no-pty.patch.svn-base @@ -0,0 +1,14 @@ +--- screen-4.0.2/pty.c.orig 2004-07-29 23:53:45.313533536 -0400 ++++ screen-4.0.2/pty.c 2004-07-29 23:53:59.011451136 -0400 +@@ -33,11 +33,6 @@ + # include + #endif + +-/* for solaris 2.1, Unixware (SVR4.2) and possibly others */ +-#ifdef HAVE_SVR4_PTYS +-# include +-#endif +- + #if defined(sun) && defined(LOCKPTY) && !defined(TIOCEXCL) + # include + #endif diff --git a/app-misc/screen/files/.svn/text-base/4.0.2-no-utempter.patch.svn-base b/app-misc/screen/files/.svn/text-base/4.0.2-no-utempter.patch.svn-base new file mode 100644 index 0000000..2a06119 --- /dev/null +++ b/app-misc/screen/files/.svn/text-base/4.0.2-no-utempter.patch.svn-base @@ -0,0 +1,14 @@ +--- screen-4.0.2/configure.in.orig 2004-12-17 19:55:45.314670411 +0100 ++++ screen-4.0.2/configure.in 2004-12-17 19:55:50.575941541 +0100 +@@ -855,11 +855,6 @@ + #include + #endif + ],[struct utmp u; u.ut_host[0] = 0;], AC_DEFINE(UTHOST)) +-AC_CHECK_HEADER(utempter.h, have_utempter=yes, have_utempter=no) +-if test "$have_utempter" = yes; then +- AC_DEFINE(HAVE_UTEMPTER) +- LIBS="$LIBS -lutempter" +-fi + + dnl + dnl **** loadav **** diff --git a/app-misc/screen/files/.svn/text-base/9999-no-libelf.patch.svn-base b/app-misc/screen/files/.svn/text-base/9999-no-libelf.patch.svn-base new file mode 100644 index 0000000..8417a5a --- /dev/null +++ b/app-misc/screen/files/.svn/text-base/9999-no-libelf.patch.svn-base @@ -0,0 +1,17 @@ +--- screen/src/configure.in.orig 2008-12-14 17:46:11.000000000 +0100 ++++ screen/src/configure.in 2008-12-14 17:47:36.000000000 +0100 +@@ -200,14 +200,6 @@ + #endif + ], LIBS="$LIBS -lsocket -linet";seqptx=1) + +-oldlibs="$LIBS" +-LIBS="$LIBS -lelf" +-AC_CHECKING(SVR4) +-AC_TRY_LINK([#include +-],, +-[AC_CHECK_HEADER(dwarf.h, AC_DEFINE(SVR4) AC_DEFINE(BUGGYGETLOGIN), +-[AC_CHECK_HEADER(elf.h, AC_DEFINE(SVR4) AC_DEFINE(BUGGYGETLOGIN))])] +-,LIBS="$oldlibs") + AC_CHECK_HEADERS([stropts.h string.h strings.h]) + + AC_CHECKING(for Solaris 2.x) diff --git a/app-misc/screen/files/.svn/text-base/config-h-in.patch.svn-base b/app-misc/screen/files/.svn/text-base/config-h-in.patch.svn-base new file mode 100644 index 0000000..f1f6cd6 --- /dev/null +++ b/app-misc/screen/files/.svn/text-base/config-h-in.patch.svn-base @@ -0,0 +1,11 @@ +--- config.h.in.orig 2008-07-20 01:53:45.000000000 +0200 ++++ config.h.in 2008-07-20 01:54:08.000000000 +0200 +@@ -564,7 +564,7 @@ + * If you are on a SYS V machine that restricts filename length to 14 + * characters, you may need to enforce that by setting NAME_MAX to 14 + */ +-#undef NAME_MAX /* KEEP_UNDEF_HERE override system value */ ++#undef NAME_MAX + #undef NAME_MAX + + /* diff --git a/app-misc/screen/files/.svn/text-base/screen-4.0.1-vsprintf.patch.svn-base b/app-misc/screen/files/.svn/text-base/screen-4.0.1-vsprintf.patch.svn-base new file mode 100644 index 0000000..b2f7a20 --- /dev/null +++ b/app-misc/screen/files/.svn/text-base/screen-4.0.1-vsprintf.patch.svn-base @@ -0,0 +1,13 @@ +--- screen-4.0.1/configure.in 2003-06-03 07:58:24.000000000 -0400 ++++ screen-4.0.1/configure.in.agriffis 2004-01-13 12:07:37.000000000 -0500 +@@ -1206,7 +1206,9 @@ + rm -f /tmp/conftest* + + AC_MSG_CHECKING(for vsprintf) +-AC_TRY_LINK(,[vsprintf(0,0,0);], AC_MSG_RESULT(yes);AC_DEFINE(USEVARARGS), AC_MSG_RESULT(no)) ++AC_TRY_LINK([#include ],[va_list valist; vsprintf(0,0,valist);], ++ [AC_MSG_RESULT(yes);AC_DEFINE(USEVARARGS)], ++ [AC_MSG_RESULT(no)]) + + AC_HEADER_DIRENT + diff --git a/app-misc/screen/files/.svn/text-base/screenrc.svn-base b/app-misc/screen/files/.svn/text-base/screenrc.svn-base new file mode 100644 index 0000000..6eec032 --- /dev/null +++ b/app-misc/screen/files/.svn/text-base/screenrc.svn-base @@ -0,0 +1,354 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# +# /etc/screenrc +# +# This is the system wide screenrc. +# +# You can use this file to change the default behavior of screen system wide +# or copy it to ~/.screenrc and use it as a starting point for your own +# settings. +# +# Commands in this file are used to set options, bind screen functions to +# keys, redefine terminal capabilities, and to automatically establish one or +# more windows at the beginning of your screen session. +# +# This is not a comprehensive list of options, look at the screen manual for +# details on everything that you can put in this file. +# +# + +# ============================================================================== +# SCREEN SETTINGS +# ============================================================================== + +# ESCAPE - the COMMAND CHARACTER +# =============================================================== +# escape ^aa # default +# escape ^pp # suggested binding for emacs users + + +# PASSWORD +# =============================================================== +# This commands sets the *internal* password for the screen session. +# WARNING!! If this is set then a "lock" command will only let you in to the +# session after you enter the user's account password and then *also* +# the internal password for that session. This gives additional safety but, +# if you forget the internal password then you cannot resume your session. +# Use :password to generate a password +# password ODSJQf.4IJN7E # "1234" + + +# VARIABLES +# =============================================================== +# No annoying audible bell, using "visual bell" +# vbell on # default: off +# vbell_msg " -- Bell,Bell!! -- " # default: "Wuff,Wuff!!" + +# Automatically detach on hangup. + autodetach on # default: on + +# Don't display the copyright page + startup_message off # default: on + +# Uses nethack-style messages +# nethack on # default: off + +# Affects the copying of text regions + crlf off # default: off + +# Enable/disable multiuser mode. Standard screen operation is singleuser. +# In multiuser mode the commands acladd, aclchg, aclgrp and acldel can be used +# to enable (and disable) other user accessing this screen session. +# Requires suid-root. + multiuser off + +# Change default scrollback value for new windows + defscrollback 1000 # default: 100 + +# Define the time that all windows monitored for silence should +# wait before displaying a message. Default 30 seconds. + silencewait 15 # default: 30 + +# bufferfile: The file to use for commands +# "readbuf" ('<') and "writebuf" ('>'): + bufferfile $HOME/.screen_exchange +# +# hardcopydir: The directory which contains all hardcopies. +# hardcopydir ~/.hardcopy +# hardcopydir ~/.screen +# +# shell: Default process started in screen's windows. +# Makes it possible to use a different shell inside screen +# than is set as the default login shell. +# If begins with a '-' character, the shell will be started as a login shell. +# shell zsh +# shell bash +# shell ksh + shell -$SHELL + +# shellaka '> |tcsh' +# shelltitle '$ |bash' + +# emulate .logout message + pow_detach_msg "Screen session of \$LOGNAME \$:cr:\$:nl:ended." + +# caption always " %w --- %c:%s" +# caption always "%3n %t%? @%u%?%? [%h]%?%=%c" + +# advertise hardstatus support to $TERMCAP +# termcapinfo * '' 'hs:ts=\E_:fs=\E\\:ds=\E_\E\\' + +# set every new windows hardstatus line to somenthing descriptive +# defhstatus "screen: ^En (^Et)" + +# don't kill window after the process died +# zombie "^[" + + +# XTERM TWEAKS +# =============================================================== + +# xterm understands both im/ic and doesn't have a status line. +# Note: Do not specify im and ic in the real termcap/info file as +# some programs (e.g. vi) will not work anymore. + termcap xterm hs@:cs=\E[%i%d;%dr:im=\E[4h:ei=\E[4l + terminfo xterm hs@:cs=\E[%i%p1%d;%p2%dr:im=\E[4h:ei=\E[4l + +# 80/132 column switching must be enabled for ^AW to work +# change init sequence to not switch width + termcapinfo xterm Z0=\E[?3h:Z1=\E[?3l:is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l + +# Make the output buffer large for (fast) xterms. +# termcapinfo xterm* OL=10000 + termcapinfo xterm* OL=100 + +# tell screen that xterm can switch to dark background and has function +# keys. + termcapinfo xterm 'VR=\E[?5h:VN=\E[?5l' + termcapinfo xterm 'k1=\E[11~:k2=\E[12~:k3=\E[13~:k4=\E[14~' + termcapinfo xterm 'kh=\EOH:kI=\E[2~:kD=\E[3~:kH=\EOF:kP=\E[5~:kN=\E[6~' + +# special xterm hardstatus: use the window title. + termcapinfo xterm 'hs:ts=\E]2;:fs=\007:ds=\E]2;screen\007' + +#terminfo xterm 'vb=\E[?5h$<200/>\E[?5l' + termcapinfo xterm 'vi=\E[?25l:ve=\E[34h\E[?25h:vs=\E[34l' + +# emulate part of the 'K' charset + termcapinfo xterm 'XC=K%,%\E(B,[\304,\\\\\326,]\334,{\344,|\366,}\374,~\337' + +# xterm-52 tweaks: +# - uses background color for delete operations + termcapinfo xterm* be + +# Do not use xterm's alternative window buffer, it breaks scrollback (see bug #61195) + termcapinfo xterm|xterms|xs ti@:te=\E[2J + +# WYSE TERMINALS +# =============================================================== + +#wyse-75-42 must have flow control (xo = "terminal uses xon/xoff") +#essential to have it here, as this is a slow terminal. + termcapinfo wy75-42 xo:hs@ + +# New termcap sequences for cursor application mode. + termcapinfo wy* CS=\E[?1h:CE=\E[?1l:vi=\E[?25l:ve=\E[?25h:VR=\E[?5h:VN=\E[?5l:cb=\E[1K:CD=\E[1J + + +# OTHER TERMINALS +# =============================================================== + +# make hp700 termcap/info better + termcapinfo hp700 'Z0=\E[?3h:Z1=\E[?3l:hs:ts=\E[62"p\E[0$~\E[2$~\E[1$}:fs=\E[0}\E[61"p:ds=\E[62"p\E[1$~\E[61"p:ic@' + +# Extend the vt100 desciption by some sequences. + termcap vt100* ms:AL=\E[%dL:DL=\E[%dM:UP=\E[%dA:DO=\E[%dB:LE=\E[%dD:RI=\E[%dC + terminfo vt100* ms:AL=\E[%p1%dL:DL=\E[%p1%dM:UP=\E[%p1%dA:DO=\E[%p1%dB:LE=\E[%p1%dD:RI=\E[%p1%dC + termcapinfo linux C8 +# old rxvt versions also need this +# termcapinfo rxvt C8 + + +# KEYBINDINGS +# ============================================================== +# The "bind" command assign keys to (internal) commands +# SCREEN checks all the keys you type; you type the key +# which is known as the "command character" then SCREEN +# eats this key, too, and checks whether this key is +# "bound" to a command. If so then SCREEN will execute it. +# +# The command "bind" allows you to chose which keys +# will be assigned to the commands. +# +# Some commands are bound to several keys - +# usually to both some letter and its corresponding +# control key combination, eg the command +# "(create) screen" is bound to both 'c' and '^C'. +# +# The following list shows the default bindings: +# +# break ^B b +# clear C +# colon : +# copy ^[ [ +# detach ^D d +# digraph ^V +# displays * +# dumptermcap . +# fit F +# flow ^F f +# focus ^I +# hardcopy h +# help ? +# history { } +# info i +# kill K k +# lastmsg ^M m +# license , +# log H +# login L +# meta x +# monitor M +# next ^@ ^N sp n +# number N +# only Q +# other ^X +# pow_break B +# pow_detach D +# prev ^H ^P p ^? +# quit \ +# readbuf < +# redisplay ^L l +# remove X +# removebuf = +# reset Z +# screen ^C c +# select " ' +# silence _ +# split S +# suspend ^Z z +# time ^T t +# title A +# vbell ^G +# version v +# width W +# windows ^W w +# wrap ^R r +# writebuf > +# xoff ^S s +# xon ^Q q +# ^] paste . +# - select - +# 0 select 0 +# 1 select 1 +# 2 select 2 +# 3 select 3 +# 4 select 4 +# 5 select 5 +# 6 select 6 +# 7 select 7 +# 8 select 8 +# 9 select 9 +# I login on +# O login off +# ] paste . +# + +# And here are the default bind commands if you need them: +# +# bind A title +# bind C clear +# bind D pow_detach +# bind F fit +# bind H log +# bind I login on +# bind K kill +# bind L login +# bind M monitor +# bind N number +# bind O login off +# bind Q only +# bind S split +# bind W width +# bind X remove +# bind Z reset + +# Let's remove some dangerous key bindings ... + bind k + bind ^k +# bind . dumptermcap # default + bind . +# bind ^\ quit # default + bind ^\ +# bind \\ quit # default + bind \\ +# bind ^h ??? # default + bind ^h +# bind h hardcopy # default + bind h + +# ... and make them better. + bind 'K' kill + bind 'I' login on + bind 'O' login off + bind '}' history + +# Yet another hack: +# Prepend/append register [/] to the paste if ^a^] is pressed. +# This lets me have autoindent mode in vi. + register [ "\033:se noai\015a" + register ] "\033:se ai\015a" + bind ^] paste [.] + + +# hardstatus alwaysignore +# hardstatus alwayslastline "%Lw" + +# Resize the current region. The space will be removed from or added to +# the region below or if there's not enough space from the region above. + bind = resize = + bind + resize +3 + bind - resize -3 +# bind _ resize max +# +# attrcolor u "-u b" +# attrcolor b "R" + +# STARTUP SCREENS +# =============================================================== +# Defines the time screen delays a new message when one message +# is currently displayed. The default is 1 second. +# msgminwait 2 + +# Time a message is displayed if screen is not disturbed by +# other activity. The dafault is 5 seconds: +# msgwait 2 + +# Briefly show the version number of this starting +# screen session - but only for *one* second: +# msgwait 1 +# version + +# Welcome the user: +# echo "welcome :-)" +# echo "I love you today." + +# Uncomment one/some following lines to automatically let +# SCREEN start some programs in the given window numbers: +# screen -t MAIL 0 mutt +# screen -t EDIT 1 vim +# screen -t GOOGLE 2 links http://www.google.com +# screen -t NEWS 3 slrn +# screen -t WWW 4 links http://www.math.fu-berlin.de/~guckes/ +# screen 5 +# screen 6 + +# Set the environment variable var to value string. If only var is specified, +# you'll be prompted to enter a value. If no parameters are specified, +# you'll be prompted for both variable and value. The environment is +# inherited by all subsequently forked shells. +# setenv PROMPT_COMMAND 'echo -n -e "\033k\033\134"' + +# Don't you want to start programs which need a DISPLAY ? +# setenv DISPLAY '' diff --git a/app-misc/screen/files/4.0.2-no-libelf.patch b/app-misc/screen/files/4.0.2-no-libelf.patch new file mode 100644 index 0000000..df06383 --- /dev/null +++ b/app-misc/screen/files/4.0.2-no-libelf.patch @@ -0,0 +1,18 @@ +--- screen-4.0.2/configure.in 2005-05-22 19:55:06.559874997 +0000 ++++ screen-4.0.2-no-libelf/configure.in 2005-05-22 19:56:05.895801017 +0000 +@@ -195,15 +195,6 @@ + #endif + ], LIBS="$LIBS -lsocket -linet";seqptx=1) + +-oldlibs="$LIBS" +-LIBS="$LIBS -lelf" +-AC_CHECKING(SVR4) +-AC_TRY_LINK([#include +-],, +-[AC_CHECK_HEADER(dwarf.h, AC_DEFINE(SVR4) AC_DEFINE(BUGGYGETLOGIN), +-[AC_CHECK_HEADER(elf.h, AC_DEFINE(SVR4) AC_DEFINE(BUGGYGETLOGIN))])] +-,LIBS="$oldlibs") +- + AC_CHECKING(for Solaris 2.x) + AC_EGREP_CPP(yes, + [#if defined(SVR4) && defined(sun) diff --git a/app-misc/screen/files/4.0.2-no-pty.patch b/app-misc/screen/files/4.0.2-no-pty.patch new file mode 100644 index 0000000..7b7b798 --- /dev/null +++ b/app-misc/screen/files/4.0.2-no-pty.patch @@ -0,0 +1,14 @@ +--- screen-4.0.2/pty.c.orig 2004-07-29 23:53:45.313533536 -0400 ++++ screen-4.0.2/pty.c 2004-07-29 23:53:59.011451136 -0400 +@@ -33,11 +33,6 @@ + # include + #endif + +-/* for solaris 2.1, Unixware (SVR4.2) and possibly others */ +-#ifdef HAVE_SVR4_PTYS +-# include +-#endif +- + #if defined(sun) && defined(LOCKPTY) && !defined(TIOCEXCL) + # include + #endif diff --git a/app-misc/screen/files/4.0.2-no-utempter.patch b/app-misc/screen/files/4.0.2-no-utempter.patch new file mode 100644 index 0000000..2a06119 --- /dev/null +++ b/app-misc/screen/files/4.0.2-no-utempter.patch @@ -0,0 +1,14 @@ +--- screen-4.0.2/configure.in.orig 2004-12-17 19:55:45.314670411 +0100 ++++ screen-4.0.2/configure.in 2004-12-17 19:55:50.575941541 +0100 +@@ -855,11 +855,6 @@ + #include + #endif + ],[struct utmp u; u.ut_host[0] = 0;], AC_DEFINE(UTHOST)) +-AC_CHECK_HEADER(utempter.h, have_utempter=yes, have_utempter=no) +-if test "$have_utempter" = yes; then +- AC_DEFINE(HAVE_UTEMPTER) +- LIBS="$LIBS -lutempter" +-fi + + dnl + dnl **** loadav **** diff --git a/app-misc/screen/files/9999-no-libelf.patch b/app-misc/screen/files/9999-no-libelf.patch new file mode 100644 index 0000000..8417a5a --- /dev/null +++ b/app-misc/screen/files/9999-no-libelf.patch @@ -0,0 +1,17 @@ +--- screen/src/configure.in.orig 2008-12-14 17:46:11.000000000 +0100 ++++ screen/src/configure.in 2008-12-14 17:47:36.000000000 +0100 +@@ -200,14 +200,6 @@ + #endif + ], LIBS="$LIBS -lsocket -linet";seqptx=1) + +-oldlibs="$LIBS" +-LIBS="$LIBS -lelf" +-AC_CHECKING(SVR4) +-AC_TRY_LINK([#include +-],, +-[AC_CHECK_HEADER(dwarf.h, AC_DEFINE(SVR4) AC_DEFINE(BUGGYGETLOGIN), +-[AC_CHECK_HEADER(elf.h, AC_DEFINE(SVR4) AC_DEFINE(BUGGYGETLOGIN))])] +-,LIBS="$oldlibs") + AC_CHECK_HEADERS([stropts.h string.h strings.h]) + + AC_CHECKING(for Solaris 2.x) diff --git a/app-misc/screen/files/config-h-in.patch b/app-misc/screen/files/config-h-in.patch new file mode 100644 index 0000000..f1f6cd6 --- /dev/null +++ b/app-misc/screen/files/config-h-in.patch @@ -0,0 +1,11 @@ +--- config.h.in.orig 2008-07-20 01:53:45.000000000 +0200 ++++ config.h.in 2008-07-20 01:54:08.000000000 +0200 +@@ -564,7 +564,7 @@ + * If you are on a SYS V machine that restricts filename length to 14 + * characters, you may need to enforce that by setting NAME_MAX to 14 + */ +-#undef NAME_MAX /* KEEP_UNDEF_HERE override system value */ ++#undef NAME_MAX + #undef NAME_MAX + + /* diff --git a/app-misc/screen/files/screen-4.0.1-vsprintf.patch b/app-misc/screen/files/screen-4.0.1-vsprintf.patch new file mode 100644 index 0000000..b2f7a20 --- /dev/null +++ b/app-misc/screen/files/screen-4.0.1-vsprintf.patch @@ -0,0 +1,13 @@ +--- screen-4.0.1/configure.in 2003-06-03 07:58:24.000000000 -0400 ++++ screen-4.0.1/configure.in.agriffis 2004-01-13 12:07:37.000000000 -0500 +@@ -1206,7 +1206,9 @@ + rm -f /tmp/conftest* + + AC_MSG_CHECKING(for vsprintf) +-AC_TRY_LINK(,[vsprintf(0,0,0);], AC_MSG_RESULT(yes);AC_DEFINE(USEVARARGS), AC_MSG_RESULT(no)) ++AC_TRY_LINK([#include ],[va_list valist; vsprintf(0,0,valist);], ++ [AC_MSG_RESULT(yes);AC_DEFINE(USEVARARGS)], ++ [AC_MSG_RESULT(no)]) + + AC_HEADER_DIRENT + diff --git a/app-misc/screen/files/screenrc b/app-misc/screen/files/screenrc new file mode 100644 index 0000000..6eec032 --- /dev/null +++ b/app-misc/screen/files/screenrc @@ -0,0 +1,354 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# +# /etc/screenrc +# +# This is the system wide screenrc. +# +# You can use this file to change the default behavior of screen system wide +# or copy it to ~/.screenrc and use it as a starting point for your own +# settings. +# +# Commands in this file are used to set options, bind screen functions to +# keys, redefine terminal capabilities, and to automatically establish one or +# more windows at the beginning of your screen session. +# +# This is not a comprehensive list of options, look at the screen manual for +# details on everything that you can put in this file. +# +# + +# ============================================================================== +# SCREEN SETTINGS +# ============================================================================== + +# ESCAPE - the COMMAND CHARACTER +# =============================================================== +# escape ^aa # default +# escape ^pp # suggested binding for emacs users + + +# PASSWORD +# =============================================================== +# This commands sets the *internal* password for the screen session. +# WARNING!! If this is set then a "lock" command will only let you in to the +# session after you enter the user's account password and then *also* +# the internal password for that session. This gives additional safety but, +# if you forget the internal password then you cannot resume your session. +# Use :password to generate a password +# password ODSJQf.4IJN7E # "1234" + + +# VARIABLES +# =============================================================== +# No annoying audible bell, using "visual bell" +# vbell on # default: off +# vbell_msg " -- Bell,Bell!! -- " # default: "Wuff,Wuff!!" + +# Automatically detach on hangup. + autodetach on # default: on + +# Don't display the copyright page + startup_message off # default: on + +# Uses nethack-style messages +# nethack on # default: off + +# Affects the copying of text regions + crlf off # default: off + +# Enable/disable multiuser mode. Standard screen operation is singleuser. +# In multiuser mode the commands acladd, aclchg, aclgrp and acldel can be used +# to enable (and disable) other user accessing this screen session. +# Requires suid-root. + multiuser off + +# Change default scrollback value for new windows + defscrollback 1000 # default: 100 + +# Define the time that all windows monitored for silence should +# wait before displaying a message. Default 30 seconds. + silencewait 15 # default: 30 + +# bufferfile: The file to use for commands +# "readbuf" ('<') and "writebuf" ('>'): + bufferfile $HOME/.screen_exchange +# +# hardcopydir: The directory which contains all hardcopies. +# hardcopydir ~/.hardcopy +# hardcopydir ~/.screen +# +# shell: Default process started in screen's windows. +# Makes it possible to use a different shell inside screen +# than is set as the default login shell. +# If begins with a '-' character, the shell will be started as a login shell. +# shell zsh +# shell bash +# shell ksh + shell -$SHELL + +# shellaka '> |tcsh' +# shelltitle '$ |bash' + +# emulate .logout message + pow_detach_msg "Screen session of \$LOGNAME \$:cr:\$:nl:ended." + +# caption always " %w --- %c:%s" +# caption always "%3n %t%? @%u%?%? [%h]%?%=%c" + +# advertise hardstatus support to $TERMCAP +# termcapinfo * '' 'hs:ts=\E_:fs=\E\\:ds=\E_\E\\' + +# set every new windows hardstatus line to somenthing descriptive +# defhstatus "screen: ^En (^Et)" + +# don't kill window after the process died +# zombie "^[" + + +# XTERM TWEAKS +# =============================================================== + +# xterm understands both im/ic and doesn't have a status line. +# Note: Do not specify im and ic in the real termcap/info file as +# some programs (e.g. vi) will not work anymore. + termcap xterm hs@:cs=\E[%i%d;%dr:im=\E[4h:ei=\E[4l + terminfo xterm hs@:cs=\E[%i%p1%d;%p2%dr:im=\E[4h:ei=\E[4l + +# 80/132 column switching must be enabled for ^AW to work +# change init sequence to not switch width + termcapinfo xterm Z0=\E[?3h:Z1=\E[?3l:is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l + +# Make the output buffer large for (fast) xterms. +# termcapinfo xterm* OL=10000 + termcapinfo xterm* OL=100 + +# tell screen that xterm can switch to dark background and has function +# keys. + termcapinfo xterm 'VR=\E[?5h:VN=\E[?5l' + termcapinfo xterm 'k1=\E[11~:k2=\E[12~:k3=\E[13~:k4=\E[14~' + termcapinfo xterm 'kh=\EOH:kI=\E[2~:kD=\E[3~:kH=\EOF:kP=\E[5~:kN=\E[6~' + +# special xterm hardstatus: use the window title. + termcapinfo xterm 'hs:ts=\E]2;:fs=\007:ds=\E]2;screen\007' + +#terminfo xterm 'vb=\E[?5h$<200/>\E[?5l' + termcapinfo xterm 'vi=\E[?25l:ve=\E[34h\E[?25h:vs=\E[34l' + +# emulate part of the 'K' charset + termcapinfo xterm 'XC=K%,%\E(B,[\304,\\\\\326,]\334,{\344,|\366,}\374,~\337' + +# xterm-52 tweaks: +# - uses background color for delete operations + termcapinfo xterm* be + +# Do not use xterm's alternative window buffer, it breaks scrollback (see bug #61195) + termcapinfo xterm|xterms|xs ti@:te=\E[2J + +# WYSE TERMINALS +# =============================================================== + +#wyse-75-42 must have flow control (xo = "terminal uses xon/xoff") +#essential to have it here, as this is a slow terminal. + termcapinfo wy75-42 xo:hs@ + +# New termcap sequences for cursor application mode. + termcapinfo wy* CS=\E[?1h:CE=\E[?1l:vi=\E[?25l:ve=\E[?25h:VR=\E[?5h:VN=\E[?5l:cb=\E[1K:CD=\E[1J + + +# OTHER TERMINALS +# =============================================================== + +# make hp700 termcap/info better + termcapinfo hp700 'Z0=\E[?3h:Z1=\E[?3l:hs:ts=\E[62"p\E[0$~\E[2$~\E[1$}:fs=\E[0}\E[61"p:ds=\E[62"p\E[1$~\E[61"p:ic@' + +# Extend the vt100 desciption by some sequences. + termcap vt100* ms:AL=\E[%dL:DL=\E[%dM:UP=\E[%dA:DO=\E[%dB:LE=\E[%dD:RI=\E[%dC + terminfo vt100* ms:AL=\E[%p1%dL:DL=\E[%p1%dM:UP=\E[%p1%dA:DO=\E[%p1%dB:LE=\E[%p1%dD:RI=\E[%p1%dC + termcapinfo linux C8 +# old rxvt versions also need this +# termcapinfo rxvt C8 + + +# KEYBINDINGS +# ============================================================== +# The "bind" command assign keys to (internal) commands +# SCREEN checks all the keys you type; you type the key +# which is known as the "command character" then SCREEN +# eats this key, too, and checks whether this key is +# "bound" to a command. If so then SCREEN will execute it. +# +# The command "bind" allows you to chose which keys +# will be assigned to the commands. +# +# Some commands are bound to several keys - +# usually to both some letter and its corresponding +# control key combination, eg the command +# "(create) screen" is bound to both 'c' and '^C'. +# +# The following list shows the default bindings: +# +# break ^B b +# clear C +# colon : +# copy ^[ [ +# detach ^D d +# digraph ^V +# displays * +# dumptermcap . +# fit F +# flow ^F f +# focus ^I +# hardcopy h +# help ? +# history { } +# info i +# kill K k +# lastmsg ^M m +# license , +# log H +# login L +# meta x +# monitor M +# next ^@ ^N sp n +# number N +# only Q +# other ^X +# pow_break B +# pow_detach D +# prev ^H ^P p ^? +# quit \ +# readbuf < +# redisplay ^L l +# remove X +# removebuf = +# reset Z +# screen ^C c +# select " ' +# silence _ +# split S +# suspend ^Z z +# time ^T t +# title A +# vbell ^G +# version v +# width W +# windows ^W w +# wrap ^R r +# writebuf > +# xoff ^S s +# xon ^Q q +# ^] paste . +# - select - +# 0 select 0 +# 1 select 1 +# 2 select 2 +# 3 select 3 +# 4 select 4 +# 5 select 5 +# 6 select 6 +# 7 select 7 +# 8 select 8 +# 9 select 9 +# I login on +# O login off +# ] paste . +# + +# And here are the default bind commands if you need them: +# +# bind A title +# bind C clear +# bind D pow_detach +# bind F fit +# bind H log +# bind I login on +# bind K kill +# bind L login +# bind M monitor +# bind N number +# bind O login off +# bind Q only +# bind S split +# bind W width +# bind X remove +# bind Z reset + +# Let's remove some dangerous key bindings ... + bind k + bind ^k +# bind . dumptermcap # default + bind . +# bind ^\ quit # default + bind ^\ +# bind \\ quit # default + bind \\ +# bind ^h ??? # default + bind ^h +# bind h hardcopy # default + bind h + +# ... and make them better. + bind 'K' kill + bind 'I' login on + bind 'O' login off + bind '}' history + +# Yet another hack: +# Prepend/append register [/] to the paste if ^a^] is pressed. +# This lets me have autoindent mode in vi. + register [ "\033:se noai\015a" + register ] "\033:se ai\015a" + bind ^] paste [.] + + +# hardstatus alwaysignore +# hardstatus alwayslastline "%Lw" + +# Resize the current region. The space will be removed from or added to +# the region below or if there's not enough space from the region above. + bind = resize = + bind + resize +3 + bind - resize -3 +# bind _ resize max +# +# attrcolor u "-u b" +# attrcolor b "R" + +# STARTUP SCREENS +# =============================================================== +# Defines the time screen delays a new message when one message +# is currently displayed. The default is 1 second. +# msgminwait 2 + +# Time a message is displayed if screen is not disturbed by +# other activity. The dafault is 5 seconds: +# msgwait 2 + +# Briefly show the version number of this starting +# screen session - but only for *one* second: +# msgwait 1 +# version + +# Welcome the user: +# echo "welcome :-)" +# echo "I love you today." + +# Uncomment one/some following lines to automatically let +# SCREEN start some programs in the given window numbers: +# screen -t MAIL 0 mutt +# screen -t EDIT 1 vim +# screen -t GOOGLE 2 links http://www.google.com +# screen -t NEWS 3 slrn +# screen -t WWW 4 links http://www.math.fu-berlin.de/~guckes/ +# screen 5 +# screen 6 + +# Set the environment variable var to value string. If only var is specified, +# you'll be prompted to enter a value. If no parameters are specified, +# you'll be prompted for both variable and value. The environment is +# inherited by all subsequently forked shells. +# setenv PROMPT_COMMAND 'echo -n -e "\033k\033\134"' + +# Don't you want to start programs which need a DISPLAY ? +# setenv DISPLAY '' diff --git a/app-misc/screen/screen-9999-r1.ebuild b/app-misc/screen/screen-9999-r1.ebuild new file mode 100644 index 0000000..0144133 --- /dev/null +++ b/app-misc/screen/screen-9999-r1.ebuild @@ -0,0 +1,147 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +WANT_AUTOCONF="2.5" + +inherit eutils flag-o-matic toolchain-funcs pam autotools git + +EGIT_REPO_URI="git://git.savannah.gnu.org/screen.git" +DESCRIPTION="A full-screen window manager that multiplexes a physical terminal between several processes" +HOMEPAGE="http://www.gnu.org/software/screen/" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="" +IUSE="debug doc nethack pam selinux multiuser" + +RDEPEND=">=sys-libs/ncurses-5.2 + pam? ( virtual/pam ) + selinux? ( + sec-policy/selinux-screen + >=sec-policy/selinux-base-policy-20050821 + )" +DEPEND="${RDEPEND} + doc? ( sys-apps/texinfo )" + +S="${WORKDIR}/${PN}" + +pkg_setup() { + # Make sure utmp group exists, as it's used later on. + enewgroup utmp 406 +} + +src_unpack() { + git_src_unpack ${A} + cd "${S}"/src + + # Bug 31070: configure problem which affects alpha + # (13 Jan 2004 agriffis) + epatch "${FILESDIR}"/screen-4.0.1-vsprintf.patch + + # uclibc doesnt have sys/stropts.h + if ! (echo '#include ' | $(tc-getCC) -E - &>/dev/null) ; then + epatch "${FILESDIR}"/4.0.2-no-pty.patch + fi + + # Don't use utempter even if it is found on the system + epatch "${FILESDIR}"/4.0.2-no-utempter.patch + + # Don't link against libelf even if it is found on the system + #epatch "${FILESDIR}"/9999-no-libelf.patch + + # Fix manpage. + sed -i \ + -e "s:/usr/local/etc/screenrc:/etc/screenrc:g" \ + -e "s:/usr/local/screens:/var/run/screen:g" \ + -e "s:/local/etc/screenrc:/etc/screenrc:g" \ + -e "s:/etc/utmp:/var/run/utmp:g" \ + -e "s:/local/screens/S-:/var/run/screen/S-:g" \ + doc/screen.1 \ + || die "sed doc/screen.1 failed" + + eautoreconf +} + +src_compile() { + cd "${S}"/src + + append-flags "-DMAXWIN=${MAX_SCREEN_WINDOWS:-100}" + use nethack || append-flags "-DNONETHACK" + use debug && append-flags "-DDEBUG" + + econf \ + --with-socket-dir=/var/run/screen \ + --with-sys-screenrc=/etc/screenrc \ + --with-pty-mode=0620 \ + --with-pty-group=5 \ + --enable-rxvt_osc \ + --enable-telnet \ + --enable-colors256 \ + $(use_enable pam) \ + || die "econf failed" + + # Second try to fix bug 12683, this time without changing term.h + # The last try seemed to break screen at run-time. + # (16 Jan 2003 agriffis) + LC_ALL=POSIX make term.h || die "Failed making term.h" + + emake || die "emake failed" + + if use doc + then + cd "${S}"/src/doc/ + make info || die "make info failed" + fi +} + +src_install() { + cd "${S}"/src + dobin screen || die "dobin failed" + keepdir /var/run/screen || die "keepdir failed" + + if use multiuser + then + fperms 4755 /usr/bin/screen || die "fperms failed" + else + fowners root:utmp /{usr/bin,var/run}/screen || die "fowners failed" + fperms 2755 /usr/bin/screen || die "fperms failed" + fi + + insinto /usr/share/screen + doins terminfo/{screencap,screeninfo.src} || die "doins failed" + insinto /usr/share/screen/utf8encodings + doins utf8encodings/?? || die "doins failed" + insinto /etc + doins "${FILESDIR}"/screenrc || die "doins failed" + + pamd_mimic_system screen auth || die "pamd_mimic_system failed" + + dodoc \ + README ChangeLog INSTALL TODO NEWS* patchlevel.h \ + doc/{FAQ,README.DOTSCREEN,fdpat.ps,window_to_display.ps} \ + || die "dodoc failed" + + doman doc/screen.1 || die "doman failed" + + if use doc + then + doinfo doc/screen.info || die "doinfo failed" + fi +} + +pkg_postinst() { + if use multiuser + then + chown root:0 "${ROOT}"/var/run/screen + chmod 0755 "${ROOT}"/var/run/screen + else + chown root:utmp "${ROOT}"/var/run/screen + chmod 0775 "${ROOT}"/var/run/screen + fi + + elog "Some dangerous key bindings have been removed or changed to more safe values." + elog "We enable some xterm hacks in our default screenrc, which might break some" + elog "applications. Please check /etc/screenrc for information on these changes." + +} diff --git a/media-libs/libdvdnav/.svn/all-wcprops b/media-libs/libdvdnav/.svn/all-wcprops new file mode 100644 index 0000000..69b47dd --- /dev/null +++ b/media-libs/libdvdnav/.svn/all-wcprops @@ -0,0 +1,23 @@ +K 25 +svn:wc:ra_dav:version-url +V 48 +/berkano/!svn/ver/504/trunk/media-libs/libdvdnav +END +Manifest +K 25 +svn:wc:ra_dav:version-url +V 57 +/berkano/!svn/ver/504/trunk/media-libs/libdvdnav/Manifest +END +ChangeLog +K 25 +svn:wc:ra_dav:version-url +V 58 +/berkano/!svn/ver/504/trunk/media-libs/libdvdnav/ChangeLog +END +libdvdnav-9999-r1.ebuild +K 25 +svn:wc:ra_dav:version-url +V 73 +/berkano/!svn/ver/504/trunk/media-libs/libdvdnav/libdvdnav-9999-r1.ebuild +END diff --git a/media-libs/libdvdnav/.svn/entries b/media-libs/libdvdnav/.svn/entries new file mode 100644 index 0000000..9720730 --- /dev/null +++ b/media-libs/libdvdnav/.svn/entries @@ -0,0 +1,130 @@ +10 + +dir +504 +http://svn.liveforge.org/berkano/trunk/media-libs/libdvdnav +http://svn.liveforge.org/berkano + + + +2009-04-29T23:11:21.118644Z +504 +yngwin + + + + + + + + + + + + + + +3a429e60-251d-0410-826f-ead4734d2cae + +Manifest +file + + + + +2009-04-30T06:40:02.492198Z +491b727397ba408411120ef0934c2cdc +2009-04-29T23:11:21.118644Z +504 +yngwin + + + + + + + + + + + + + + + + + + + + + +387 + +ChangeLog +file + + + + +2009-04-30T06:40:02.497901Z +386e7f09a8afc4860ddee0a3aa928563 +2009-04-29T23:11:21.118644Z +504 +yngwin + + + + + + + + + + + + + + + + + + + + + +465 + +libdvdnav-9999-r1.ebuild +file + + + + +2009-04-30T06:40:02.498903Z +bfe0eea47f32873daf043bc80941553c +2009-04-29T23:11:21.118644Z +504 +yngwin + + + + + + + + + + + + + + + + + + + + + +986 + diff --git a/media-libs/libdvdnav/.svn/text-base/ChangeLog.svn-base b/media-libs/libdvdnav/.svn/text-base/ChangeLog.svn-base new file mode 100644 index 0000000..de386ce --- /dev/null +++ b/media-libs/libdvdnav/.svn/text-base/ChangeLog.svn-base @@ -0,0 +1,12 @@ +# ChangeLog for media-libs/libdvdnav +# Copyright 2006-2009 Berkano Overlay; distributed under the GPL version 2 + + 29 Apr 2009; Ben de Groot ; libdvdnav-9999-r1.ebuild: + Drop keywords in live ebuilds + + 24 Sep 2008; Ben de Groot ; libdvdnav-9999-r1.ebuild: + Fix dep. Thanks to Malte Skoruppa for reporting. + + 16 Aug 2008; Ben de Groot ; +libdvdnav-9999-r1.ebuild: + Initial import from beandog's overlay + diff --git a/media-libs/libdvdnav/.svn/text-base/Manifest.svn-base b/media-libs/libdvdnav/.svn/text-base/Manifest.svn-base new file mode 100644 index 0000000..9559239 --- /dev/null +++ b/media-libs/libdvdnav/.svn/text-base/Manifest.svn-base @@ -0,0 +1,2 @@ +EBUILD libdvdnav-9999-r1.ebuild 986 RMD160 abcccaa5b9aa39e0f030dd29f3b776800f4b5c66 SHA1 1795f005258d8a5b5fe03e5620bf55cf838b8935 SHA256 eeb174678751845e93871332c6a03c08234e40aa5b7385ee221c6520351991bc +MISC ChangeLog 465 RMD160 389f22736598f0b83137d772da88247d9a083dc6 SHA1 54457794ab97dc463679e1d80ff48fc91bece0b4 SHA256 dbb31c90c68ad8bef99299190dab677a6e64336b64f02ddaaa753a36d561fa91 diff --git a/media-libs/libdvdnav/.svn/text-base/libdvdnav-9999-r1.ebuild.svn-base b/media-libs/libdvdnav/.svn/text-base/libdvdnav-9999-r1.ebuild.svn-base new file mode 100644 index 0000000..0372a30 --- /dev/null +++ b/media-libs/libdvdnav/.svn/text-base/libdvdnav-9999-r1.ebuild.svn-base @@ -0,0 +1,37 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +WANT_AUTOCONF="2.5" + +inherit eutils autotools multilib subversion + +DESCRIPTION="Library for DVD navigation tools" +HOMEPAGE="http://mplayerhq.hu/" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="" +IUSE="debug" + +ESVN_REPO_URI="svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdnav" +ESVN_PROJECT="libdvdnav" + +DEPEND=">=media-libs/libdvdread-4.1.3" +RDEPEND="$DEPEND" + +src_compile() { + ./configure2 --prefix=/usr --libdir=/usr/$(get_libdir) \ + --shlibdir=/usr/$(get_libdir) --enable-static --enable-shared \ + --disable-strip --disable-opts $(use_enable debug) \ + --extra-cflags=${CFLAGS} --extra-ldflags="${LDFLAGS}" \ + || die "configure died" + emake version.h || die "emake version.h died" + emake || die "emake died" +} + +src_install () { + emake -j1 DESTDIR="${D}" install || die "emake install died" + dodoc AUTHORS DEVELOPMENT-POLICY.txt ChangeLog TODO \ + doc/dvd_structures README +} diff --git a/media-libs/libdvdnav/ChangeLog b/media-libs/libdvdnav/ChangeLog new file mode 100644 index 0000000..cdd5cc6 --- /dev/null +++ b/media-libs/libdvdnav/ChangeLog @@ -0,0 +1,15 @@ +# ChangeLog for media-libs/libdvdnav +# Copyright 2006-2009 Berkano Overlay; distributed under the GPL version 2 + + 30 Apr 2009, Fabian Fingerle : + Copy from Berkano Overlay + + 29 Apr 2009; Ben de Groot ; libdvdnav-9999-r1.ebuild: + Drop keywords in live ebuilds + + 24 Sep 2008; Ben de Groot ; libdvdnav-9999-r1.ebuild: + Fix dep. Thanks to Malte Skoruppa for reporting. + + 16 Aug 2008; Ben de Groot ; +libdvdnav-9999-r1.ebuild: + Initial import from beandog's overlay + diff --git a/media-libs/libdvdnav/Manifest b/media-libs/libdvdnav/Manifest new file mode 100644 index 0000000..649643e --- /dev/null +++ b/media-libs/libdvdnav/Manifest @@ -0,0 +1,2 @@ +EBUILD libdvdnav-9999-r1.ebuild 986 RMD160 abcccaa5b9aa39e0f030dd29f3b776800f4b5c66 SHA1 1795f005258d8a5b5fe03e5620bf55cf838b8935 SHA256 eeb174678751845e93871332c6a03c08234e40aa5b7385ee221c6520351991bc +MISC ChangeLog 549 RMD160 32b2f59cbab54af5da16e36bad9e9b531a079f38 SHA1 4e7699e6dab9e30fe408eaf0b3dcedde57ed9c09 SHA256 d9aef7755fef7187a4b8bd5cf3d4efae1d71b848f222faaba7091a2a7b13b2c2 diff --git a/media-libs/libdvdnav/libdvdnav-9999-r1.ebuild b/media-libs/libdvdnav/libdvdnav-9999-r1.ebuild new file mode 100644 index 0000000..0372a30 --- /dev/null +++ b/media-libs/libdvdnav/libdvdnav-9999-r1.ebuild @@ -0,0 +1,37 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +WANT_AUTOCONF="2.5" + +inherit eutils autotools multilib subversion + +DESCRIPTION="Library for DVD navigation tools" +HOMEPAGE="http://mplayerhq.hu/" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="" +IUSE="debug" + +ESVN_REPO_URI="svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdnav" +ESVN_PROJECT="libdvdnav" + +DEPEND=">=media-libs/libdvdread-4.1.3" +RDEPEND="$DEPEND" + +src_compile() { + ./configure2 --prefix=/usr --libdir=/usr/$(get_libdir) \ + --shlibdir=/usr/$(get_libdir) --enable-static --enable-shared \ + --disable-strip --disable-opts $(use_enable debug) \ + --extra-cflags=${CFLAGS} --extra-ldflags="${LDFLAGS}" \ + || die "configure died" + emake version.h || die "emake version.h died" + emake || die "emake died" +} + +src_install () { + emake -j1 DESTDIR="${D}" install || die "emake install died" + dodoc AUTHORS DEVELOPMENT-POLICY.txt ChangeLog TODO \ + doc/dvd_structures README +} diff --git a/media-libs/libdvdread/.svn/all-wcprops b/media-libs/libdvdread/.svn/all-wcprops new file mode 100644 index 0000000..069979c --- /dev/null +++ b/media-libs/libdvdread/.svn/all-wcprops @@ -0,0 +1,23 @@ +K 25 +svn:wc:ra_dav:version-url +V 49 +/berkano/!svn/ver/504/trunk/media-libs/libdvdread +END +libdvdread-9999.ebuild +K 25 +svn:wc:ra_dav:version-url +V 72 +/berkano/!svn/ver/504/trunk/media-libs/libdvdread/libdvdread-9999.ebuild +END +Manifest +K 25 +svn:wc:ra_dav:version-url +V 58 +/berkano/!svn/ver/504/trunk/media-libs/libdvdread/Manifest +END +ChangeLog +K 25 +svn:wc:ra_dav:version-url +V 59 +/berkano/!svn/ver/504/trunk/media-libs/libdvdread/ChangeLog +END diff --git a/media-libs/libdvdread/.svn/entries b/media-libs/libdvdread/.svn/entries new file mode 100644 index 0000000..a288b8b --- /dev/null +++ b/media-libs/libdvdread/.svn/entries @@ -0,0 +1,130 @@ +10 + +dir +504 +http://svn.liveforge.org/berkano/trunk/media-libs/libdvdread +http://svn.liveforge.org/berkano + + + +2009-04-29T23:11:21.118644Z +504 +yngwin + + + + + + + + + + + + + + +3a429e60-251d-0410-826f-ead4734d2cae + +libdvdread-9999.ebuild +file + + + + +2009-04-30T06:40:02.263154Z +eb12f833b458985ad6e95711cb05715f +2009-04-29T23:11:21.118644Z +504 +yngwin + + + + + + + + + + + + + + + + + + + + + +965 + +Manifest +file + + + + +2009-04-30T06:40:02.276153Z +baf91dcacd9b2aaef991d7a54ec3e682 +2009-04-29T23:11:21.118644Z +504 +yngwin + + + + + + + + + + + + + + + + + + + + + +385 + +ChangeLog +file + + + + +2009-04-30T06:40:02.276153Z +a3befe92ac2a32958d916dadfd7c8ecc +2009-04-29T23:11:21.118644Z +504 +yngwin + + + + + + + + + + + + + + + + + + + + + +442 + diff --git a/media-libs/libdvdread/.svn/text-base/ChangeLog.svn-base b/media-libs/libdvdread/.svn/text-base/ChangeLog.svn-base new file mode 100644 index 0000000..cedb9c6 --- /dev/null +++ b/media-libs/libdvdread/.svn/text-base/ChangeLog.svn-base @@ -0,0 +1,12 @@ +# ChangeLog for media-libs/libdvdread +# Copyright 2006-2009 Berkano Overlay; distributed under the GPL version 2 + + 29 Apr 2009; Ben de Groot ; libdvdread-9999.ebuild: + Drop keywords in live ebuilds + + 24 Sep 2008; Ben de Groot ; libdvdread-9999.ebuild: + Block lower libdvdnav versions + + 16 Aug 2008; Ben de Groot ; +libdvdread-9999.ebuild: + Initial import from beandog's overlay + diff --git a/media-libs/libdvdread/.svn/text-base/Manifest.svn-base b/media-libs/libdvdread/.svn/text-base/Manifest.svn-base new file mode 100644 index 0000000..802ca29 --- /dev/null +++ b/media-libs/libdvdread/.svn/text-base/Manifest.svn-base @@ -0,0 +1,2 @@ +EBUILD libdvdread-9999.ebuild 965 RMD160 3dc69c872395db4e7c651503aacfbf9710e76b8b SHA1 5e86f568fad7e7abffc363a12a93ab1e2dd21e8a SHA256 c190223f22e066ea1b0ba9807bad90aa8c1827815ddbe262c93ff12d1d04589b +MISC ChangeLog 442 RMD160 c522f924b9084c81bef602b27057bcadbef1eaf4 SHA1 f3118e1deb5ee3521c3d4cc8f07a6a84dcfa2af9 SHA256 1ddd8948a1426b904a440d6d666011b4b2df5858d5edba1544743c03d0e0801f diff --git a/media-libs/libdvdread/.svn/text-base/libdvdread-9999.ebuild.svn-base b/media-libs/libdvdread/.svn/text-base/libdvdread-9999.ebuild.svn-base new file mode 100644 index 0000000..88e8c6f --- /dev/null +++ b/media-libs/libdvdread/.svn/text-base/libdvdread-9999.ebuild.svn-base @@ -0,0 +1,36 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +WANT_AUTOCONF="2.5" + +inherit eutils autotools multilib subversion + +DESCRIPTION="Library for DVD navigation tools" +HOMEPAGE="http://mplayerhq.hu/" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="" +IUSE="debug" + +ESVN_REPO_URI="svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdread" +ESVN_PROJECT="libdvdread" + +DEPEND="!<=media-libs/libdvdnav-4.1.2" +RDEPEND="$DEPEND" + +src_compile() { + ./configure2 --prefix=/usr --libdir=/usr/$(get_libdir) \ + --shlibdir=/usr/$(get_libdir) --enable-static --enable-shared \ + --disable-strip --disable-opts $(use_enable debug) \ + --extra-cflags=${CFLAGS} --extra-ldflags="${LDFLAGS}" \ + || die "configure died" + emake version.h || die "emake version.h died" + emake || die "emake died" +} + +src_install () { + emake -j1 DESTDIR="${D}" install || die "emake install died" + dodoc AUTHORS DEVELOPMENT-POLICY.txt ChangeLog TODO README +} diff --git a/media-libs/libdvdread/ChangeLog b/media-libs/libdvdread/ChangeLog new file mode 100644 index 0000000..bf4054e --- /dev/null +++ b/media-libs/libdvdread/ChangeLog @@ -0,0 +1,15 @@ +# ChangeLog for media-libs/libdvdread +# Copyright 2006-2009 Berkano Overlay; distributed under the GPL version 2 + + 30 Apr 2009, Fabian Fingerle : + Copy from Berkano Overlay + + 29 Apr 2009; Ben de Groot ; libdvdread-9999.ebuild: + Drop keywords in live ebuilds + + 24 Sep 2008; Ben de Groot ; libdvdread-9999.ebuild: + Block lower libdvdnav versions + + 16 Aug 2008; Ben de Groot ; +libdvdread-9999.ebuild: + Initial import from beandog's overlay + diff --git a/media-libs/libdvdread/Manifest b/media-libs/libdvdread/Manifest new file mode 100644 index 0000000..a8433b5 --- /dev/null +++ b/media-libs/libdvdread/Manifest @@ -0,0 +1,2 @@ +EBUILD libdvdread-9999.ebuild 965 RMD160 3dc69c872395db4e7c651503aacfbf9710e76b8b SHA1 5e86f568fad7e7abffc363a12a93ab1e2dd21e8a SHA256 c190223f22e066ea1b0ba9807bad90aa8c1827815ddbe262c93ff12d1d04589b +MISC ChangeLog 526 RMD160 ece839cf4691b5444cf55175ea2faf0052233f56 SHA1 6afcdadf1d1fbdf4b546788e780472cb0f736be5 SHA256 5501d1a0ca4933cf06a6f805699b424f1e13b0c605ad86a7928a3988fcf487de diff --git a/media-libs/libdvdread/libdvdread-9999.ebuild b/media-libs/libdvdread/libdvdread-9999.ebuild new file mode 100644 index 0000000..88e8c6f --- /dev/null +++ b/media-libs/libdvdread/libdvdread-9999.ebuild @@ -0,0 +1,36 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +WANT_AUTOCONF="2.5" + +inherit eutils autotools multilib subversion + +DESCRIPTION="Library for DVD navigation tools" +HOMEPAGE="http://mplayerhq.hu/" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="" +IUSE="debug" + +ESVN_REPO_URI="svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdread" +ESVN_PROJECT="libdvdread" + +DEPEND="!<=media-libs/libdvdnav-4.1.2" +RDEPEND="$DEPEND" + +src_compile() { + ./configure2 --prefix=/usr --libdir=/usr/$(get_libdir) \ + --shlibdir=/usr/$(get_libdir) --enable-static --enable-shared \ + --disable-strip --disable-opts $(use_enable debug) \ + --extra-cflags=${CFLAGS} --extra-ldflags="${LDFLAGS}" \ + || die "configure died" + emake version.h || die "emake version.h died" + emake || die "emake died" +} + +src_install () { + emake -j1 DESTDIR="${D}" install || die "emake install died" + dodoc AUTHORS DEVELOPMENT-POLICY.txt ChangeLog TODO README +} diff --git a/media-libs/x264/.svn/all-wcprops b/media-libs/x264/.svn/all-wcprops new file mode 100644 index 0000000..f195241 --- /dev/null +++ b/media-libs/x264/.svn/all-wcprops @@ -0,0 +1,29 @@ +K 25 +svn:wc:ra_dav:version-url +V 43 +/berkano/!svn/ver/504/trunk/media-libs/x264 +END +Manifest +K 25 +svn:wc:ra_dav:version-url +V 52 +/berkano/!svn/ver/504/trunk/media-libs/x264/Manifest +END +ChangeLog +K 25 +svn:wc:ra_dav:version-url +V 53 +/berkano/!svn/ver/504/trunk/media-libs/x264/ChangeLog +END +x264-9999.ebuild +K 25 +svn:wc:ra_dav:version-url +V 60 +/berkano/!svn/ver/504/trunk/media-libs/x264/x264-9999.ebuild +END +x264-0.0.20080819-r99.ebuild +K 25 +svn:wc:ra_dav:version-url +V 72 +/berkano/!svn/ver/435/trunk/media-libs/x264/x264-0.0.20080819-r99.ebuild +END diff --git a/media-libs/x264/.svn/entries b/media-libs/x264/.svn/entries new file mode 100644 index 0000000..3b978ce --- /dev/null +++ b/media-libs/x264/.svn/entries @@ -0,0 +1,167 @@ +10 + +dir +504 +http://svn.liveforge.org/berkano/trunk/media-libs/x264 +http://svn.liveforge.org/berkano + + + +2009-04-29T23:11:21.118644Z +504 +yngwin + + + + + + + + + + + + + + +3a429e60-251d-0410-826f-ead4734d2cae + +files +dir + +Manifest +file + + + + +2009-04-30T06:40:02.331904Z +3f826dbd9a236fe380adcd3dfaecef72 +2009-04-29T23:11:21.118644Z +504 +yngwin + + + + + + + + + + + + + + + + + + + + + +1799 + +ChangeLog +file + + + + +2009-04-30T06:40:02.332904Z +168ebeec151937675e0291dfcef32690 +2009-04-29T23:11:21.118644Z +504 +yngwin + + + + + + + + + + + + + + + + + + + + + +2166 + +x264-9999.ebuild +file + + + + +2009-04-30T06:40:02.333905Z +72427cbf75c62200f73114bb5b87bb01 +2009-04-29T23:11:21.118644Z +504 +yngwin + + + + + + + + + + + + + + + + + + + + + +1423 + +x264-0.0.20080819-r99.ebuild +file + + + + +2008-12-06T03:31:20.000000Z +edbd031f023fce89fb95482ed5812a35 +2008-10-20T19:27:42.242438Z +435 +yngwin +has-props + + + + + + + + + + + + + + + + + + + + +1787 + diff --git a/media-libs/x264/.svn/prop-base/x264-0.0.20080819-r99.ebuild.svn-base b/media-libs/x264/.svn/prop-base/x264-0.0.20080819-r99.ebuild.svn-base new file mode 100644 index 0000000..3160658 --- /dev/null +++ b/media-libs/x264/.svn/prop-base/x264-0.0.20080819-r99.ebuild.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mergeinfo +V 0 + +END diff --git a/media-libs/x264/.svn/text-base/ChangeLog.svn-base b/media-libs/x264/.svn/text-base/ChangeLog.svn-base new file mode 100644 index 0000000..0b88fbc --- /dev/null +++ b/media-libs/x264/.svn/text-base/ChangeLog.svn-base @@ -0,0 +1,54 @@ +# ChangeLog for media-libs/x264 +# Copyright 2006-2009 Berkano Overlay; distributed under the GPL version 2 + + 29 Apr 2009; Ben de Groot ; x264-9999.ebuild: + Drop keywords in live ebuilds + + 30 Dec 2008; Ben de Groot ; x264-9999.ebuild: + Removed gtk useflag, as that option is no longer offered. + + 21 Oct 2008; Ben de Groot ; x264-9999.ebuild: + Rekeywording live svn ebuild, as newer stuff is also unmasked in portage. + + 20 Oct 2008; Ben de Groot ; -x264-0.0.20080819.ebuild, + +x264-0.0.20080819-r99.ebuild: + Adding revbump to not conflict with stable ebuild in portage + + 08 Oct 2008; Ben de Groot ; x264-9999.ebuild: + Add sed to use new git command style in version.sh + + 16 Sep 2008; Ben de Groot ; x264-9999.ebuild: + Dropping keywords for api/abi breaking version + + 16 Sep 2008; Ben de Groot ; x264-9999.ebuild: + Patches applied upstream + + 24 Aug 2008; Ben de Groot ; +x264-0.0.20080819.ebuild, + x264-9999.ebuild: + Adding snapshot ebuild with psyrdo and psytrellis patches. Dropping ~mips. + Fixing patching on current svn by adding -l option. + + 12 Jul 2008; Ben de Groot ; + +files/x264-psyrdo-0.5.diff, x264-9999.ebuild: + Updated psy-rdo patch + + 10 Jul 2008; Ben de Groot ; + +files/x264_psy_rdo.r889.diff, x264-9999.ebuild: + Add psy-rdo patch and useflag. For more info see + http://forum.doom9.org/showthread.php?t=138293 + + 16 Apr 2008; Ben de Groot ; x264-9999.ebuild: + Adjust dep as x86 needs yasm-0.7.0 now. + + 14 Apr 2008; Ben de Groot ; x264-9999.ebuild: + Fixing DEPEND, nasm seems to work no longer (bug 217630). + + 07 Apr 2008; Ben de Groot ; x264-9999.ebuild: + Updating block to !media-video/x264-encoder, as x264-svn is removed from + portage. And install all docs. + + 25 Mar 2008; Ben de Groot ; +files/x264-nostrip.patch, + +x264-9999.ebuild: + Initial commit. Moved from x264-svn, which it blocks, because x264 is now + using git. Also updated the homepage. + diff --git a/media-libs/x264/.svn/text-base/Manifest.svn-base b/media-libs/x264/.svn/text-base/Manifest.svn-base new file mode 100644 index 0000000..bee4e04 --- /dev/null +++ b/media-libs/x264/.svn/text-base/Manifest.svn-base @@ -0,0 +1,9 @@ +AUX x264-nostrip.patch 433 RMD160 81c3893b1a02839da38f34484c794996855fab5e SHA1 42c0807d6f2f13f848409d9545994c8b66338c8c SHA256 1210914cc52de908b840775ab8e4a107d95aeced690c2f115320d31e587a2ffa +AUX x264-psyrd-0.6-psytrellis-0.1.diff 23013 RMD160 7eba31a7e48e53673c06e91172174c0c91200f58 SHA1 fbd5e2d820d078ced1ce0ce491d68b60b462b19a SHA256 b72b48190dc34dd565f00143b32b4e22c0e59c596ba805f54678859d45bc93b7 +AUX x264-psyrdo-0.5.diff 13551 RMD160 7fb9de33880b4dcd3cecc2d2b86bf3ef72a6bd96 SHA1 b4da9e36e3920cd7f774106e0e057a9a8c0ef795 SHA256 be03b4ade84a3169e43d5b6ed2fc73eb2422117606bf999cb0a2cd9ea67beb9d +AUX x264-psyrdo-0.6.diff 13452 RMD160 a1e6ae68b146d50b282b3f235e08dcd30b7b1418 SHA1 c8535e18c9891fe707adf2afcae46b5f88511e64 SHA256 d824d7e171e98858472d5c675b7c4e6c2104569e7d55ea6f3a59f99e036285de +AUX x264_psy_rdo.r889.diff 8565 RMD160 1585ea5fbd40a287087551f9c032e641ba038a28 SHA1 4720b9c8c9113f8992c2d5bfe02b33492988c945 SHA256 5f780ddca8bab0ae67f86192cea76c40c6fcca462034c814dfe5da4019c3352e +DIST x264-snapshot-20080819-2245.tar.bz2 2178926 RMD160 a530e4731d5fc19a9032d7c4e9c41bf13e4686cb SHA1 060781142f78087a49eeee3cc15d83bc6132710b SHA256 8db5597014e062fa360e0f466979113e19c3cf60ad565fd8697be0d5c9bdae7a +EBUILD x264-0.0.20080819-r99.ebuild 1787 RMD160 28da24cdef97ce502d709720e41b0cd29759a7bf SHA1 48faaf28ce06437cafe576fa305fed40d4212916 SHA256 04539074ea6cdf717f5cacafbe3fb8a2e41f3ec66a5545e683a236e68d7b26f0 +EBUILD x264-9999.ebuild 1423 RMD160 2d1ccaf83662b4271bec14ba8217024cfe4f95c4 SHA1 f297ebe5e23975f6d387fe0e6674da9d7afc13af SHA256 1fe61d10666fbef632e51a59d776735039e2980f1e5d7d19b884adef3a7c6f45 +MISC ChangeLog 2166 RMD160 f993bb7a51957bce77a196930f8c4085f80615fd SHA1 2a4db0fd974cf932483413e8afce699a8397fc0f SHA256 fd2964793699a311491940aa39e5da65cc7dd6a7394d7de3b0debf24cfb04d33 diff --git a/media-libs/x264/.svn/text-base/x264-0.0.20080819-r99.ebuild.svn-base b/media-libs/x264/.svn/text-base/x264-0.0.20080819-r99.ebuild.svn-base new file mode 100644 index 0000000..c6e2b0a --- /dev/null +++ b/media-libs/x264/.svn/text-base/x264-0.0.20080819-r99.ebuild.svn-base @@ -0,0 +1,64 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="1" +inherit eutils multilib toolchain-funcs versionator + +MY_P="x264-snapshot-$(get_version_component_range 3)-2245" + +DESCRIPTION="A free library for encoding H264/AVC video streams" +HOMEPAGE="http://www.videolan.org/developers/x264.html" +SRC_URI="ftp://ftp.videolan.org/pub/videolan/x264/snapshots/${MY_P}.tar.bz2" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd" +IUSE="debug gtk +mp4 +psyrdo psytrellis +threads X" + +RDEPEND="gtk? ( >=x11-libs/gtk+-2.6.10 + >=dev-libs/glib-2.10.3 ) + mp4? ( media-video/gpac ) + X? ( x11-libs/libX11 )" +DEPEND="${RDEPEND} + amd64? ( >=dev-lang/yasm-0.6.2 ) + x86? ( >=dev-lang/yasm-0.7.0 ) + x86-fbsd? ( >=dev-lang/yasm-0.6.2 ) + dev-util/pkgconfig + !media-video/x264-encoder" + +S="${WORKDIR}/${MY_P}" + +src_unpack() { + unpack ${A} + cd "${S}" + epatch "${FILESDIR}/${PN}-nostrip.patch" + # Psy-RDO see http://forum.doom9.org/showthread.php?t=138293 + if ( use psyrdo && use !psytrellis ); then + epatch "${FILESDIR}/x264-psyrdo-0.6.diff" + fi + use psytrellis && epatch "${FILESDIR}/x264-psyrd-0.6-psytrellis-0.1.diff" +} + +src_compile() { + local myconf="" + use debug && myconf="${myconf} --enable-debug" + ./configure --prefix=/usr \ + --libdir=/usr/$(get_libdir) \ + --enable-pic --enable-shared \ + "--extra-cflags=${CFLAGS}" \ + "--extra-ldflags=${LDFLAGS}" \ + "--extra-asflags=${ASFLAGS}" \ + $(use_enable X visualize) \ + $(use_enable threads pthread) \ + $(use_enable debug) \ + $(use_enable mp4 mp4-output) \ + $(use_enable gtk) \ + ${myconf} \ + || die "configure failed" + emake CC="$(tc-getCC)" || die "make failed" +} + +src_install() { + make DESTDIR="${D}" install || die + dodoc AUTHORS doc/*txt +} diff --git a/media-libs/x264/.svn/text-base/x264-9999.ebuild.svn-base b/media-libs/x264/.svn/text-base/x264-9999.ebuild.svn-base new file mode 100644 index 0000000..dfbc32e --- /dev/null +++ b/media-libs/x264/.svn/text-base/x264-9999.ebuild.svn-base @@ -0,0 +1,59 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +inherit git multilib toolchain-funcs + +EGIT_REPO_URI="git://git.videolan.org/x264.git" + +DESCRIPTION="A free library for encoding H264/AVC video streams" +HOMEPAGE="http://www.videolan.org/developers/x264.html" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="" +IUSE="debug mp4 threads X" + +RDEPEND="mp4? ( media-video/gpac ) + X? ( x11-libs/libX11 )" + +DEPEND="${RDEPEND} + amd64? ( >=dev-lang/yasm-0.6.2 ) + x86? ( >=dev-lang/yasm-0.7.0 ) + x86-fbsd? ( >=dev-lang/yasm-0.6.2 ) + dev-util/pkgconfig + !media-video/x264-encoder" + +src_unpack() { + git_src_unpack + cd "${S}" + EPATCH_OPTS="-l" + epatch "${FILESDIR}/${PN}-nostrip.patch" + + # use git 1.6 command style + sed -i -e "s:git-rev-list:git rev-list:g" \ + -e "s:git-status:git status:" \ + "${S}"/version.sh +} + +src_compile() { + local myconf="" + use debug && myconf="${myconf} --enable-debug" + ./configure --prefix=/usr \ + --libdir=/usr/$(get_libdir) \ + --enable-pic --enable-shared \ + "--extra-cflags=${CFLAGS}" \ + "--extra-ldflags=${LDFLAGS}" \ + "--extra-asflags=${ASFLAGS}" \ + $(use_enable X visualize) \ + $(use_enable threads pthread) \ + $(use_enable debug) \ + $(use_enable mp4 mp4-output) \ + ${myconf} \ + || die "configure failed" + emake CC="$(tc-getCC)" || die "make failed" +} + +src_install() { + make DESTDIR="${D}" install || die + dodoc AUTHORS doc/*txt +} diff --git a/media-libs/x264/ChangeLog b/media-libs/x264/ChangeLog new file mode 100644 index 0000000..73ecd62 --- /dev/null +++ b/media-libs/x264/ChangeLog @@ -0,0 +1,58 @@ +# ChangeLog for media-libs/x264 +# Copyright 2006-2009 Berkano Overlay; distributed under the GPL version 2 + + 30 Apr 2009, Fabian Fingerle + -x264-0.0.20080819-r99.ebuild: + Copy from Berkano Overlay, delete old ebuild + + 29 Apr 2009; Ben de Groot ; x264-9999.ebuild: + Drop keywords in live ebuilds + + 30 Dec 2008; Ben de Groot ; x264-9999.ebuild: + Removed gtk useflag, as that option is no longer offered. + + 21 Oct 2008; Ben de Groot ; x264-9999.ebuild: + Rekeywording live svn ebuild, as newer stuff is also unmasked in portage. + + 20 Oct 2008; Ben de Groot ; -x264-0.0.20080819.ebuild, + +x264-0.0.20080819-r99.ebuild: + Adding revbump to not conflict with stable ebuild in portage + + 08 Oct 2008; Ben de Groot ; x264-9999.ebuild: + Add sed to use new git command style in version.sh + + 16 Sep 2008; Ben de Groot ; x264-9999.ebuild: + Dropping keywords for api/abi breaking version + + 16 Sep 2008; Ben de Groot ; x264-9999.ebuild: + Patches applied upstream + + 24 Aug 2008; Ben de Groot ; +x264-0.0.20080819.ebuild, + x264-9999.ebuild: + Adding snapshot ebuild with psyrdo and psytrellis patches. Dropping ~mips. + Fixing patching on current svn by adding -l option. + + 12 Jul 2008; Ben de Groot ; + +files/x264-psyrdo-0.5.diff, x264-9999.ebuild: + Updated psy-rdo patch + + 10 Jul 2008; Ben de Groot ; + +files/x264_psy_rdo.r889.diff, x264-9999.ebuild: + Add psy-rdo patch and useflag. For more info see + http://forum.doom9.org/showthread.php?t=138293 + + 16 Apr 2008; Ben de Groot ; x264-9999.ebuild: + Adjust dep as x86 needs yasm-0.7.0 now. + + 14 Apr 2008; Ben de Groot ; x264-9999.ebuild: + Fixing DEPEND, nasm seems to work no longer (bug 217630). + + 07 Apr 2008; Ben de Groot ; x264-9999.ebuild: + Updating block to !media-video/x264-encoder, as x264-svn is removed from + portage. And install all docs. + + 25 Mar 2008; Ben de Groot ; +files/x264-nostrip.patch, + +x264-9999.ebuild: + Initial commit. Moved from x264-svn, which it blocks, because x264 is now + using git. Also updated the homepage. + diff --git a/media-libs/x264/Manifest b/media-libs/x264/Manifest new file mode 100644 index 0000000..a59c0ce --- /dev/null +++ b/media-libs/x264/Manifest @@ -0,0 +1,7 @@ +AUX x264-nostrip.patch 433 RMD160 81c3893b1a02839da38f34484c794996855fab5e SHA1 42c0807d6f2f13f848409d9545994c8b66338c8c SHA256 1210914cc52de908b840775ab8e4a107d95aeced690c2f115320d31e587a2ffa +AUX x264-psyrd-0.6-psytrellis-0.1.diff 23013 RMD160 7eba31a7e48e53673c06e91172174c0c91200f58 SHA1 fbd5e2d820d078ced1ce0ce491d68b60b462b19a SHA256 b72b48190dc34dd565f00143b32b4e22c0e59c596ba805f54678859d45bc93b7 +AUX x264-psyrdo-0.5.diff 13551 RMD160 7fb9de33880b4dcd3cecc2d2b86bf3ef72a6bd96 SHA1 b4da9e36e3920cd7f774106e0e057a9a8c0ef795 SHA256 be03b4ade84a3169e43d5b6ed2fc73eb2422117606bf999cb0a2cd9ea67beb9d +AUX x264-psyrdo-0.6.diff 13452 RMD160 a1e6ae68b146d50b282b3f235e08dcd30b7b1418 SHA1 c8535e18c9891fe707adf2afcae46b5f88511e64 SHA256 d824d7e171e98858472d5c675b7c4e6c2104569e7d55ea6f3a59f99e036285de +AUX x264_psy_rdo.r889.diff 8565 RMD160 1585ea5fbd40a287087551f9c032e641ba038a28 SHA1 4720b9c8c9113f8992c2d5bfe02b33492988c945 SHA256 5f780ddca8bab0ae67f86192cea76c40c6fcca462034c814dfe5da4019c3352e +EBUILD x264-9999.ebuild 1423 RMD160 2d1ccaf83662b4271bec14ba8217024cfe4f95c4 SHA1 f297ebe5e23975f6d387fe0e6674da9d7afc13af SHA256 1fe61d10666fbef632e51a59d776735039e2980f1e5d7d19b884adef3a7c6f45 +MISC ChangeLog 2301 RMD160 5142c8b6c58f60b4862b664f5e639a566209ce0d SHA1 66770175b655a46ee3f89470cc4e560737925844 SHA256 47c5bc009899c31fd8c26b3e8b5bd145b24658dc03dc6e65a8b519db6016a786 diff --git a/media-libs/x264/files/.svn/all-wcprops b/media-libs/x264/files/.svn/all-wcprops new file mode 100644 index 0000000..f40ae28 --- /dev/null +++ b/media-libs/x264/files/.svn/all-wcprops @@ -0,0 +1,35 @@ +K 25 +svn:wc:ra_dav:version-url +V 49 +/berkano/!svn/ver/389/trunk/media-libs/x264/files +END +x264_psy_rdo.r889.diff +K 25 +svn:wc:ra_dav:version-url +V 72 +/berkano/!svn/ver/373/trunk/media-libs/x264/files/x264_psy_rdo.r889.diff +END +x264-psyrdo-0.5.diff +K 25 +svn:wc:ra_dav:version-url +V 70 +/berkano/!svn/ver/375/trunk/media-libs/x264/files/x264-psyrdo-0.5.diff +END +x264-psyrdo-0.6.diff +K 25 +svn:wc:ra_dav:version-url +V 70 +/berkano/!svn/ver/389/trunk/media-libs/x264/files/x264-psyrdo-0.6.diff +END +x264-nostrip.patch +K 25 +svn:wc:ra_dav:version-url +V 68 +/berkano/!svn/ver/298/trunk/media-libs/x264/files/x264-nostrip.patch +END +x264-psyrd-0.6-psytrellis-0.1.diff +K 25 +svn:wc:ra_dav:version-url +V 84 +/berkano/!svn/ver/389/trunk/media-libs/x264/files/x264-psyrd-0.6-psytrellis-0.1.diff +END diff --git a/media-libs/x264/files/.svn/entries b/media-libs/x264/files/.svn/entries new file mode 100644 index 0000000..730d4f5 --- /dev/null +++ b/media-libs/x264/files/.svn/entries @@ -0,0 +1,198 @@ +10 + +dir +504 +http://svn.liveforge.org/berkano/trunk/media-libs/x264/files +http://svn.liveforge.org/berkano + + + +2008-08-10T23:17:37.983551Z +389 +ben + + + + + + + + + + + + + + +3a429e60-251d-0410-826f-ead4734d2cae + +x264_psy_rdo.r889.diff +file + + + + +2008-12-06T03:31:20.000000Z +d2c779a4f618e371e8577abe5000ff2f +2008-07-10T02:39:44.150361Z +373 +ben + + + + + + + + + + + + + + + + + + + + + +8565 + +x264-psyrdo-0.5.diff +file + + + + +2008-12-06T03:31:20.000000Z +d2fc0a6a88ecda33839320b36bfe8a18 +2008-07-12T21:48:28.918842Z +375 +ben + + + + + + + + + + + + + + + + + + + + + +13551 + +x264-psyrdo-0.6.diff +file + + + + +2008-12-06T03:31:20.000000Z +0133d2087768da22b113b83062b24750 +2008-08-10T23:17:37.983551Z +389 +ben + + + + + + + + + + + + + + + + + + + + + +13452 + +x264-nostrip.patch +file + + + + +2008-12-06T03:31:20.000000Z +287a591572985d408a30f928f7b65f2a +2008-03-25T00:24:51.948362Z +298 +ben + + + + + + + + + + + + + + + + + + + + + +433 + +x264-psyrd-0.6-psytrellis-0.1.diff +file + + + + +2008-12-06T03:31:20.000000Z +dc50e69924ceb02be0d66c895c75352f +2008-08-10T23:17:37.983551Z +389 +ben + + + + + + + + + + + + + + + + + + + + + +23013 + diff --git a/media-libs/x264/files/.svn/text-base/x264-nostrip.patch.svn-base b/media-libs/x264/files/.svn/text-base/x264-nostrip.patch.svn-base new file mode 100644 index 0000000..b4e2689 --- /dev/null +++ b/media-libs/x264/files/.svn/text-base/x264-nostrip.patch.svn-base @@ -0,0 +1,16 @@ +Index: x264-svn/configure +=================================================================== +--- x264-svn.orig/configure ++++ x264-svn/configure +@@ -374,11 +374,6 @@ if [ "$pic" = "yes" ] ; then + ASFLAGS="$ASFLAGS -D__PIC__" + fi + +-if [ "$debug" != "yes" -a "$gprof" != "yes" ]; then +- CFLAGS="$CFLAGS -s -fomit-frame-pointer" +- LDFLAGS="$LDFLAGS -s" +-fi +- + if [ "$debug" = "yes" ]; then + CFLAGS="-O1 -g $CFLAGS" + else diff --git a/media-libs/x264/files/.svn/text-base/x264-psyrd-0.6-psytrellis-0.1.diff.svn-base b/media-libs/x264/files/.svn/text-base/x264-psyrd-0.6-psytrellis-0.1.diff.svn-base new file mode 100644 index 0000000..3b8738c --- /dev/null +++ b/media-libs/x264/files/.svn/text-base/x264-psyrd-0.6-psytrellis-0.1.diff.svn-base @@ -0,0 +1,504 @@ +diff --git a/common/common.c b/common/common.c +index 71a29b1..21155eb 100644 +--- a/common/common.c ++++ b/common/common.c +@@ -117,6 +117,7 @@ void x264_param_default( x264_param_t *param ) + | X264_ANALYSE_PSUB16x16 | X264_ANALYSE_BSUB16x16; + param->analyse.i_direct_mv_pred = X264_DIRECT_PRED_SPATIAL; + param->analyse.i_me_method = X264_ME_HEX; ++ param->analyse.f_psy_rd = 1.0; + param->analyse.i_me_range = 16; + param->analyse.i_subpel_refine = 5; + param->analyse.b_chroma_me = 1; +@@ -464,6 +465,8 @@ int x264_param_parse( x264_param_t *p, const char *name, const char *value ) + p->analyse.i_mv_range_thread = atoi(value); + OPT2("subme", "subq") + p->analyse.i_subpel_refine = atoi(value); ++ OPT("psy-rd") ++ p->analyse.f_psy_rd = atof(value); + OPT("bime") + p->analyse.b_bidir_me = atobool(value); + OPT("chroma-me") +@@ -856,6 +859,7 @@ char *x264_param2string( x264_param_t *p, int b_res ) + s += sprintf( s, " analyse=%#x:%#x", p->analyse.intra, p->analyse.inter ); + s += sprintf( s, " me=%s", x264_motion_est_names[ p->analyse.i_me_method ] ); + s += sprintf( s, " subme=%d", p->analyse.i_subpel_refine ); ++ s += sprintf( s, " psy_rd=%.1f", p->analyse.f_psy_rd ); + s += sprintf( s, " brdo=%d", p->analyse.b_bframe_rdo ); + s += sprintf( s, " mixed_ref=%d", p->analyse.b_mixed_references ); + s += sprintf( s, " me_range=%d", p->analyse.i_me_range ); +diff --git a/common/common.h b/common/common.h +index 80648a8..78cdb05 100644 +--- a/common/common.h ++++ b/common/common.h +@@ -342,8 +342,6 @@ struct x264_t + x264_frame_t *fref1[16+3]; /* ref list 1 */ + int b_ref_reorder[2]; + +- +- + /* Current MB DCT coeffs */ + struct + { +@@ -454,6 +452,16 @@ struct x264_t + DECLARE_ALIGNED_16( int16_t i8x8_dct_buf[3][64] ); + DECLARE_ALIGNED_16( int16_t i4x4_dct_buf[15][16] ); + ++ /* Psy trellis DCT data */ ++ DECLARE_ALIGNED_16( int16_t fenc_dct8[4][64] ); ++ DECLARE_ALIGNED_16( int16_t fenc_dct4[16][16] ); ++ ++ /* SATD scores for psy RD */ ++ int fenc_satd[4][4]; ++ int fenc_satd_sum; ++ int fenc_sa8d[2][2]; ++ int fenc_sa8d_sum; ++ + /* pointer over mb of the frame to be compressed */ + uint8_t *p_fenc[3]; + +diff --git a/common/dct.h b/common/dct.h +index 1078023..daa96f4 100644 +--- a/common/dct.h ++++ b/common/dct.h +@@ -41,6 +41,17 @@ static const uint16_t x264_dct8_weight_tab[64] = { + }; + #undef W + ++#define W(i) (i==0 ? FIX8(1.76777) :\ ++ i==1 ? FIX8(1.11803) :\ ++ i==2 ? FIX8(0.70711) :0) ++static const uint16_t x264_dct4_weight_tab[16] = { ++ W(0), W(1), W(0), W(1), ++ W(1), W(2), W(1), W(2), ++ W(0), W(1), W(0), W(1), ++ W(1), W(2), W(1), W(2) ++}; ++#undef W ++ + /* inverse squared */ + #define W(i) (i==0 ? FIX8(3.125) :\ + i==1 ? FIX8(1.25) :\ +diff --git a/encoder/analyse.c b/encoder/analyse.c +index 270b90a..59cc89b 100644 +--- a/encoder/analyse.c ++++ b/encoder/analyse.c +@@ -467,6 +467,34 @@ static void predict_4x4_mode_available( unsigned int i_neighbour, + } + } + ++/* Pre-calculate fenc satd scores for psy RD, minus DC coefficients */ ++static inline void x264_mb_cache_fenc_satd( x264_t *h ) ++{ ++ DECLARE_ALIGNED_16(uint8_t zero[16]) = {0}; ++ uint8_t *fenc; ++ int x, y, satd_sum = 0, sa8d_sum = 0; ++ if( !h->param.analyse.i_psy_rd ) ++ return; ++ for( y = 0; y < 4; y++ ) ++ for( x = 0; x < 4; x++ ) ++ { ++ fenc = h->mb.pic.p_fenc[0]+x*4+y*4*FENC_STRIDE; ++ h->mb.pic.fenc_satd[y][x] = h->pixf.satd[PIXEL_4x4]( zero, 0, fenc, FENC_STRIDE ) ++ - (h->pixf.sad[PIXEL_4x4]( zero, 0, fenc, FENC_STRIDE )>>1); ++ satd_sum += h->mb.pic.fenc_satd[y][x]; ++ } ++ for( y = 0; y < 2; y++ ) ++ for( x = 0; x < 2; x++ ) ++ { ++ fenc = h->mb.pic.p_fenc[0]+x*8+y*8*FENC_STRIDE; ++ h->mb.pic.fenc_sa8d[y][x] = h->pixf.sa8d[PIXEL_8x8]( zero, 0, fenc, FENC_STRIDE ) ++ - (h->pixf.sad[PIXEL_8x8]( zero, 0, fenc, FENC_STRIDE )>>2); ++ sa8d_sum += h->mb.pic.fenc_sa8d[y][x]; ++ } ++ h->mb.pic.fenc_satd_sum = satd_sum; ++ h->mb.pic.fenc_sa8d_sum = sa8d_sum; ++} ++ + static void x264_mb_analyse_intra_chroma( x264_t *h, x264_mb_analysis_t *a ) + { + int i; +@@ -1016,12 +1044,15 @@ static void x264_mb_analyse_inter_p16x16( x264_t *h, x264_mb_analysis_t *a ) + assert( a->l0.me16x16.mv[1] <= h->mb.mv_max_spel[1] || h->param.i_threads == 1 ); + + h->mb.i_type = P_L0; +- if( a->b_mbrd && a->l0.me16x16.i_ref == 0 +- && *(uint32_t*)a->l0.me16x16.mv == *(uint32_t*)h->mb.cache.pskip_mv ) ++ if( a->b_mbrd ) + { +- h->mb.i_partition = D_16x16; +- x264_macroblock_cache_mv_ptr( h, 0, 0, 4, 4, 0, a->l0.me16x16.mv ); +- a->l0.i_rd16x16 = x264_rd_cost_mb( h, a->i_lambda2 ); ++ x264_mb_cache_fenc_satd( h ); ++ if( a->l0.me16x16.i_ref == 0 && *(uint32_t*)a->l0.me16x16.mv == *(uint32_t*)h->mb.cache.pskip_mv ) ++ { ++ h->mb.i_partition = D_16x16; ++ x264_macroblock_cache_mv_ptr( h, 0, 0, 4, 4, 0, a->l0.me16x16.mv ); ++ a->l0.i_rd16x16 = x264_rd_cost_mb( h, a->i_lambda2 ); ++ } + } + } + +@@ -1906,7 +1937,7 @@ static void x264_mb_analyse_p_rd( x264_t *h, x264_mb_analysis_t *a, int i_satd ) + + static void x264_mb_analyse_b_rd( x264_t *h, x264_mb_analysis_t *a, int i_satd_inter ) + { +- int thresh = i_satd_inter * 17/16; ++ int thresh = i_satd_inter * (17 + (!!h->param.analyse.i_psy_rd))/16; + + if( a->b_direct_available && a->i_rd16x16direct == COST_MAX ) + { +@@ -2046,6 +2077,21 @@ static inline void x264_mb_analyse_transform_rd( x264_t *h, x264_mb_analysis_t * + } + } + ++void x264_psy_trellis_init( x264_t *h ) ++{ ++ DECLARE_ALIGNED_16( int16_t dct8x8[4][8][8] ); ++ DECLARE_ALIGNED_16( int16_t dct4x4[16][4][4] ); ++ DECLARE_ALIGNED_16( uint8_t zero[16*FDEC_STRIDE] ) = {0}; ++ int i; ++ ++ /* For psy trellis: do DCT on input data */ ++ h->dctf.sub16x16_dct8( dct8x8, h->mb.pic.p_fenc[0], zero ); ++ for( i = 0; i < 4; i++ ) ++ h->zigzagf.scan_8x8( h->mb.pic.fenc_dct8[i], dct8x8[i] ); ++ h->dctf.sub16x16_dct( dct4x4, h->mb.pic.p_fenc[0], zero ); ++ for( i = 0; i < 16; i++ ) ++ h->zigzagf.scan_4x4( h->mb.pic.fenc_dct4[i], dct4x4[i] ); ++} + + /***************************************************************************** + * x264_macroblock_analyse: +@@ -2062,12 +2108,18 @@ void x264_macroblock_analyse( x264_t *h ) + + x264_mb_analyse_init( h, &analysis, h->mb.i_qp ); + ++ if( h->param.analyse.i_psy_rd && h->param.analyse.i_trellis ) ++ x264_psy_trellis_init( h ); ++ + /*--------------------------- Do the analysis ---------------------------*/ + if( h->sh.i_type == SLICE_TYPE_I ) + { + x264_mb_analyse_intra( h, &analysis, COST_MAX ); + if( analysis.b_mbrd ) ++ { ++ x264_mb_cache_fenc_satd( h ); + x264_intra_rd( h, &analysis, COST_MAX ); ++ } + + i_cost = analysis.i_satd_i16x16; + h->mb.i_type = I_16x16; +@@ -2342,6 +2394,9 @@ void x264_macroblock_analyse( x264_t *h ) + { + int i_bskip_cost = COST_MAX; + int b_skip = 0; ++ ++ if( analysis.b_mbrd ) ++ x264_mb_cache_fenc_satd( h ); + + h->mb.i_type = B_SKIP; + if( h->mb.b_direct_auto_write ) +diff --git a/encoder/encoder.c b/encoder/encoder.c +index 8f1ebac..b1d5f7b 100644 +--- a/encoder/encoder.c ++++ b/encoder/encoder.c +@@ -411,5 +411,6 @@ static int x264_validate_parameters( x264_t *h ) + h->param.analyse.b_fast_pskip = 0; + h->param.analyse.i_noise_reduction = 0; ++ h->param.analyse.f_psy_rd = 0; + } + if( h->param.rc.i_rc_method == X264_RC_CQP ) + { +@@ -482,10 +483,23 @@ static int x264_validate_parameters( x264_t *h ) + h->param.analyse.inter &= ~X264_ANALYSE_I8x8; + h->param.analyse.intra &= ~X264_ANALYSE_I8x8; + } +- h->param.analyse.i_chroma_qp_offset = x264_clip3(h->param.analyse.i_chroma_qp_offset, -12, 12); + if( !h->param.b_cabac ) + h->param.analyse.i_trellis = 0; + h->param.analyse.i_trellis = x264_clip3( h->param.analyse.i_trellis, 0, 2 ); ++ h->param.analyse.f_psy_rd = x264_clip3f( h->param.analyse.f_psy_rd, 0, 10 ); ++ if( h->param.analyse.i_subpel_refine < 6) ++ h->param.analyse.f_psy_rd = 0; ++ if( h->param.analyse.f_psy_rd ) ++ { ++ h->param.analyse.i_psy_rd = FIX8( h->param.analyse.f_psy_rd ); ++ /* Psy RDO increases overall quantizers to improve the quality of luma--this indirectly hurts chroma quality */ ++ /* so we lower the chroma QP offset to compensate */ ++ h->param.analyse.i_chroma_qp_offset -= h->param.analyse.f_psy_rd < 0.25 ? 1 : 2; ++ /* Psy trellis has a similar effect. */ ++ if( h->param.analyse.i_trellis ) ++ h->param.analyse.i_chroma_qp_offset -= 2; ++ } ++ h->param.analyse.i_chroma_qp_offset = x264_clip3(h->param.analyse.i_chroma_qp_offset, -12, 12); + h->param.rc.i_aq_mode = x264_clip3( h->param.rc.i_aq_mode, 0, 2 ); + if( h->param.rc.f_aq_strength <= 0 ) + h->param.rc.i_aq_mode = 0; +diff --git a/encoder/macroblock.c b/encoder/macroblock.c +index 788a8ea..b429c16 100644 +--- a/encoder/macroblock.c ++++ b/encoder/macroblock.c +@@ -94,7 +94,7 @@ void x264_mb_encode_i4x4( x264_t *h, int idx, int i_qscale ) + h->dctf.sub4x4_dct( dct4x4, p_src, p_dst ); + + if( h->mb.b_trellis ) +- x264_quant_4x4_trellis( h, dct4x4, CQM_4IY, i_qscale, DCT_LUMA_4x4, 1 ); ++ x264_quant_4x4_trellis( h, dct4x4, CQM_4IY, i_qscale, DCT_LUMA_4x4, 1, idx ); + else + h->quantf.quant_4x4( dct4x4, h->quant4_mf[CQM_4IY][i_qscale], h->quant4_bias[CQM_4IY][i_qscale] ); + +@@ -121,7 +121,7 @@ void x264_mb_encode_i8x8( x264_t *h, int idx, int i_qscale ) + h->dctf.sub8x8_dct8( dct8x8, p_src, p_dst ); + + if( h->mb.b_trellis ) +- x264_quant_8x8_trellis( h, dct8x8, CQM_8IY, i_qscale, 1 ); ++ x264_quant_8x8_trellis( h, dct8x8, CQM_8IY, i_qscale, 1, idx ); + else + h->quantf.quant_8x8( dct8x8, h->quant8_mf[CQM_8IY][i_qscale], h->quant8_bias[CQM_8IY][i_qscale] ); + +@@ -163,7 +163,7 @@ static void x264_mb_encode_i16x16( x264_t *h, int i_qscale ) + + /* quant/scan/dequant */ + if( h->mb.b_trellis ) +- x264_quant_4x4_trellis( h, dct4x4[i], CQM_4IY, i_qscale, DCT_LUMA_AC, 1 ); ++ x264_quant_4x4_trellis( h, dct4x4[i], CQM_4IY, i_qscale, DCT_LUMA_AC, 1, i ); + else + h->quantf.quant_4x4( dct4x4[i], h->quant4_mf[CQM_4IY][i_qscale], h->quant4_bias[CQM_4IY][i_qscale] ); + +@@ -447,7 +447,7 @@ void x264_macroblock_encode( x264_t *h ) + if( h->mb.b_noise_reduction ) + h->quantf.denoise_dct_core( *dct8x8[idx], h->nr_residual_sum[1], h->nr_offset[1], 64 ); + if( h->mb.b_trellis ) +- x264_quant_8x8_trellis( h, dct8x8[idx], CQM_8PY, i_qp, 0 ); ++ x264_quant_8x8_trellis( h, dct8x8[idx], CQM_8PY, i_qp, 0, idx ); + else + h->quantf.quant_8x8( dct8x8[idx], h->quant8_mf[CQM_8PY][i_qp], h->quant8_bias[CQM_8PY][i_qp] ); + +@@ -495,7 +495,7 @@ void x264_macroblock_encode( x264_t *h ) + if( h->mb.b_noise_reduction ) + h->quantf.denoise_dct_core( *dct4x4[idx], h->nr_residual_sum[0], h->nr_offset[0], 16 ); + if( h->mb.b_trellis ) +- x264_quant_4x4_trellis( h, dct4x4[idx], CQM_4PY, i_qp, DCT_LUMA_4x4, 0 ); ++ x264_quant_4x4_trellis( h, dct4x4[idx], CQM_4PY, i_qp, DCT_LUMA_4x4, 0, idx ); + else + h->quantf.quant_4x4( dct4x4[idx], h->quant4_mf[CQM_4PY][i_qp], h->quant4_bias[CQM_4PY][i_qp] ); + +diff --git a/encoder/macroblock.h b/encoder/macroblock.h +index 49d13a2..eb97d44 100644 +--- a/encoder/macroblock.h ++++ b/encoder/macroblock.h +@@ -50,9 +50,9 @@ void x264_mb_encode_8x8_chroma( x264_t *h, int b_inter, int i_qscale ); + void x264_cabac_mb_skip( x264_t *h, int b_skip ); + + void x264_quant_4x4_trellis( x264_t *h, int16_t dct[4][4], int i_quant_cat, +- int i_qp, int i_ctxBlockCat, int b_intra ); ++ int i_qp, int i_ctxBlockCat, int b_intra, int idx ); + void x264_quant_8x8_trellis( x264_t *h, int16_t dct[8][8], int i_quant_cat, +- int i_qp, int b_intra ); ++ int i_qp, int b_intra, int idx ); + + void x264_noise_reduction_update( x264_t *h ); + +diff --git a/encoder/rdo.c b/encoder/rdo.c +index 76bf57b..5b23e18 100644 +--- a/encoder/rdo.c ++++ b/encoder/rdo.c +@@ -50,21 +50,82 @@ static uint16_t cabac_prefix_size[15][128]; + + #define COPY_CABAC h->mc.memcpy_aligned( &cabac_tmp.f8_bits_encoded, &h->cabac.f8_bits_encoded, \ + sizeof(x264_cabac_t) - offsetof(x264_cabac_t,f8_bits_encoded) ) +- +-static int ssd_mb( x264_t *h ) ++ ++#define ADD_ABS_SATD(satdtype, pixel)\ ++ satd += abs((h->pixf.satdtype[pixel]( zero, 0, fdec, FDEC_STRIDE ) - dc_coef)\ ++ - sum_##satdtype( h, pixel, x, y )); ++ ++/* Sum the cached SATDs to avoid repeating them. */ ++static inline int sum_satd( x264_t *h, int pixel, int x, int y ) ++{ ++ int satd = 0; ++ int min_x = x>>2; ++ int min_y = y>>2; ++ int max_x = (x>>2) + (x264_pixel_size[pixel].w>>2); ++ int max_y = (y>>2) + (x264_pixel_size[pixel].h>>2); ++ if( pixel == PIXEL_16x16 ) ++ return h->mb.pic.fenc_satd_sum; ++ for( y = min_y; y < max_y; y++ ) ++ for( x = min_x; x < max_x; x++ ) ++ satd += h->mb.pic.fenc_satd[y][x]; ++ return satd; ++} ++ ++static inline int sum_sa8d( x264_t *h, int pixel, int x, int y ) ++{ ++ int sa8d = 0; ++ int min_x = x>>3; ++ int min_y = y>>3; ++ int max_x = (x>>3) + (x264_pixel_size[pixel].w>>3); ++ int max_y = (y>>3) + (x264_pixel_size[pixel].h>>3); ++ if( pixel == PIXEL_16x16 ) ++ return h->mb.pic.fenc_sa8d_sum; ++ for( y = min_y; y < max_y; y++ ) ++ for( x = min_x; x < max_x; x++ ) ++ sa8d += h->mb.pic.fenc_sa8d[y][x]; ++ return sa8d; ++} ++ ++/* Psy RD distortion metric: SSD plus "Absolute Difference of Complexities" */ ++/* SATD and SA8D are used to measure block complexity. */ ++/* Blocks with a complexity most similar to that of the source are scored best. */ ++/* The difference between SATD and SA8D scores are both used to avoid bias from the DCT size. Using SATD */ ++/* only, for example, results in overusage of 8x8dct, while the opposite occurs when using SA8D. */ ++/* This is because frequencies stored in an 8x8dct sum up to a larger value when viewed through a 4x4 */ ++/* transform and vice versa with a 4x4dct and an 8x8 transform. */ ++/* SSD is still used as the primary RD metric; this value is merely added to it for psy purposes. */ ++ ++/* FIXME: Is there a better metric than averaged SATD/SA8D difference for complexity difference? */ ++/* Hadamard transform is recursive, so a SATD+SA8D can be done faster by taking advantage of this fact. */ ++/* This optimization can also be used in non-RD transform decision. */ ++ ++static inline int ssd_plane( x264_t *h, int size, int p, int x, int y ) + { +- return h->pixf.ssd[PIXEL_16x16]( h->mb.pic.p_fenc[0], FENC_STRIDE, +- h->mb.pic.p_fdec[0], FDEC_STRIDE ) +- + h->pixf.ssd[PIXEL_8x8]( h->mb.pic.p_fenc[1], FENC_STRIDE, +- h->mb.pic.p_fdec[1], FDEC_STRIDE ) +- + h->pixf.ssd[PIXEL_8x8]( h->mb.pic.p_fenc[2], FENC_STRIDE, +- h->mb.pic.p_fdec[2], FDEC_STRIDE ); ++ DECLARE_ALIGNED_16(uint8_t zero[16]) = {0}; ++ int satd = 0; ++ uint8_t *fdec = h->mb.pic.p_fdec[p] + x + y*FDEC_STRIDE; ++ uint8_t *fenc = h->mb.pic.p_fenc[p] + x + y*FENC_STRIDE; ++ if( p == 0 && h->param.analyse.i_psy_rd ) ++ { ++ int dc_coef = h->pixf.sad[size](zero, 0, fdec, FDEC_STRIDE) >> 1; ++ ADD_ABS_SATD(satd, size); ++ /* If the plane is smaller than 8x8, we can't do an SA8D; this probably isn't a big problem. */ ++ if(size <= PIXEL_8x8) ++ { ++ dc_coef >>= 1; ++ ADD_ABS_SATD(sa8d, size); ++ satd >>= 1; ++ } ++ satd = (satd * h->param.analyse.i_psy_rd * x264_lambda_tab[h->mb.i_qp] + 128) >> 8; ++ } ++ return h->pixf.ssd[size](fenc, FENC_STRIDE, fdec, FDEC_STRIDE) + satd; + } + +-static int ssd_plane( x264_t *h, int size, int p, int x, int y ) ++static inline int ssd_mb( x264_t *h ) + { +- return h->pixf.ssd[size]( h->mb.pic.p_fenc[p] + x+y*FENC_STRIDE, FENC_STRIDE, +- h->mb.pic.p_fdec[p] + x+y*FDEC_STRIDE, FDEC_STRIDE ); ++ return ssd_plane(h, PIXEL_16x16, 0, 0, 0) ++ + ssd_plane(h, PIXEL_8x8, 1, 0, 0) ++ + ssd_plane(h, PIXEL_8x8, 2, 0, 0); + } + + static int x264_rd_cost_mb( x264_t *h, int i_lambda2 ) +@@ -267,7 +328,7 @@ static const int lambda2_tab[2][52] = { + }; + + typedef struct { +- uint64_t score; ++ int64_t score; + int level_idx; // index into level_tree[] + uint8_t cabac_state[10]; //just the contexts relevant to coding abs_level_m1 + } trellis_node_t; +@@ -296,7 +357,7 @@ typedef struct { + static inline void quant_trellis_cabac( x264_t *h, int16_t *dct, + const uint16_t *quant_mf, const int *unquant_mf, + const int *coef_weight, const uint8_t *zigzag, +- int i_ctxBlockCat, int i_lambda2, int b_ac, int i_coefs ) ++ int i_ctxBlockCat, int i_lambda2, int b_ac, int i_coefs, int idx ) + { + int abs_coefs[64], signs[64]; + trellis_node_t nodes[2][8]; +@@ -428,8 +489,19 @@ static inline void quant_trellis_cabac( x264_t *h, int16_t *dct, + // that are better left coded, especially at QP > 40. + for( abs_level = q; abs_level >= q-1; abs_level-- ) + { +- int d = i_coef - ((unquant_mf[zigzag[i]] * abs_level + 128) >> 8); +- uint64_t ssd = (int64_t)d*d * coef_weight[i]; ++ int unquant_abs_level = ((unquant_mf[zigzag[i]] * abs_level + 128) >> 8); ++ int d = i_coef - unquant_abs_level; ++ int64_t ssd; ++ if( h->param.analyse.i_psy_rd && i != 0 ) ++ { ++ int orig_coef = (i_coefs == 64) ? h->mb.pic.fenc_dct8[idx][i] : h->mb.pic.fenc_dct4[idx][i]; ++ int predicted_coef = abs(orig_coef - i_coef * signs[i] ); ++ int psy_value = h->param.analyse.i_psy_rd * abs(predicted_coef + unquant_abs_level * signs[i]); ++ int psy_weight = (i_coefs == 64) ? x264_dct8_weight_tab[zigzag[i]] : x264_dct4_weight_tab[zigzag[i]]; ++ ssd = (int64_t)d*d * coef_weight[i] - psy_weight * (psy_value>>2); ++ } ++ else ++ ssd = (int64_t)d*d * coef_weight[i]; + + for( j = 0; j < 8; j++ ) + { +@@ -493,24 +565,24 @@ static inline void quant_trellis_cabac( x264_t *h, int16_t *dct, + + + void x264_quant_4x4_trellis( x264_t *h, int16_t dct[4][4], int i_quant_cat, +- int i_qp, int i_ctxBlockCat, int b_intra ) ++ int i_qp, int i_ctxBlockCat, int b_intra, int idx ) + { + int b_ac = (i_ctxBlockCat == DCT_LUMA_AC); + quant_trellis_cabac( h, (int16_t*)dct, + h->quant4_mf[i_quant_cat][i_qp], h->unquant4_mf[i_quant_cat][i_qp], + x264_dct4_weight2_zigzag[h->mb.b_interlaced], + x264_zigzag_scan4[h->mb.b_interlaced], +- i_ctxBlockCat, lambda2_tab[b_intra][i_qp], b_ac, 16 ); ++ i_ctxBlockCat, lambda2_tab[b_intra][h->mb.i_qp], b_ac, 16, idx ); + } + + + void x264_quant_8x8_trellis( x264_t *h, int16_t dct[8][8], int i_quant_cat, +- int i_qp, int b_intra ) ++ int i_qp, int b_intra, int idx ) + { + quant_trellis_cabac( h, (int16_t*)dct, + h->quant8_mf[i_quant_cat][i_qp], h->unquant8_mf[i_quant_cat][i_qp], + x264_dct8_weight2_zigzag[h->mb.b_interlaced], + x264_zigzag_scan8[h->mb.b_interlaced], +- DCT_LUMA_8x8, lambda2_tab[b_intra][i_qp], 0, 64 ); ++ DCT_LUMA_8x8, lambda2_tab[b_intra][h->mb.i_qp], 0, 64, idx ); + } + +diff --git a/x264.c b/x264.c +index 14466e5..504ca12 100644 +--- a/x264.c ++++ b/x264.c +@@ -243,6 +243,9 @@ static void Help( x264_param_t *defaults, int b_longhelp ) + H0( " -m, --subme Subpixel motion estimation and partition\n" + " decision quality: 1=fast, 7=best. [%d]\n", defaults->analyse.i_subpel_refine ); + H0( " --b-rdo RD based mode decision for B-frames. Requires subme 6.\n" ); ++ H0( " --psy-rd Strength of mode decision psychovisual optimization [\"%.1f\"]\n" ++ " Does nothing at subme < 6.\n", ++ defaults->analyse.f_psy_rd ); + H0( " --mixed-refs Decide references on a per partition basis\n" ); + H1( " --no-chroma-me Ignore chroma in motion estimation\n" ); + H1( " --bime Jointly optimize both MVs in B-frames\n" ); +@@ -411,6 +414,7 @@ static int Parse( int argc, char **argv, + { "mvrange", required_argument, NULL, 0 }, + { "mvrange-thread", required_argument, NULL, 0 }, + { "subme", required_argument, NULL, 'm' }, ++ { "psy-rd", required_argument, NULL, 0 }, + { "b-rdo", no_argument, NULL, 0 }, + { "mixed-refs", no_argument, NULL, 0 }, + { "no-chroma-me", no_argument, NULL, 0 }, +diff --git a/x264.h b/x264.h +index 3b678dc..02266c1 100644 +--- a/x264.h ++++ b/x264.h +@@ -239,6 +239,8 @@ typedef struct x264_param_t + int b_fast_pskip; /* early SKIP detection on P-frames */ + int b_dct_decimate; /* transform coefficient thresholding on P-frames */ + int i_noise_reduction; /* adaptive pseudo-deadzone */ ++ float f_psy_rd; /* Psy RD strength */ ++ int i_psy_rd; /* Psy RD strength--fixed point value*/ + + /* the deadzone size that will be used in luma quantization */ + int i_luma_deadzone[2]; /* {inter, intra} */ diff --git a/media-libs/x264/files/.svn/text-base/x264-psyrdo-0.5.diff.svn-base b/media-libs/x264/files/.svn/text-base/x264-psyrdo-0.5.diff.svn-base new file mode 100644 index 0000000..d743fff --- /dev/null +++ b/media-libs/x264/files/.svn/text-base/x264-psyrdo-0.5.diff.svn-base @@ -0,0 +1,298 @@ +diff --git a/common/common.c b/common/common.c +index 71a29b1..301b9ed 100644 +--- a/common/common.c ++++ b/common/common.c +@@ -117,6 +117,7 @@ void x264_param_default( x264_param_t *param ) + | X264_ANALYSE_PSUB16x16 | X264_ANALYSE_BSUB16x16; + param->analyse.i_direct_mv_pred = X264_DIRECT_PRED_SPATIAL; + param->analyse.i_me_method = X264_ME_HEX; ++ param->analyse.f_psy_rd = 1.0; + param->analyse.i_me_range = 16; + param->analyse.i_subpel_refine = 5; + param->analyse.b_chroma_me = 1; +@@ -464,6 +465,8 @@ int x264_param_parse( x264_param_t *p, const char *name, const char *value ) + p->analyse.i_mv_range_thread = atoi(value); + OPT2("subme", "subq") + p->analyse.i_subpel_refine = atoi(value); ++ OPT("psy-rd") ++ p->analyse.f_psy_rd = atof(value); + OPT("bime") + p->analyse.b_bidir_me = atobool(value); + OPT("chroma-me") +@@ -856,6 +859,7 @@ char *x264_param2string( x264_param_t *p, int b_res ) + s += sprintf( s, " analyse=%#x:%#x", p->analyse.intra, p->analyse.inter ); + s += sprintf( s, " me=%s", x264_motion_est_names[ p->analyse.i_me_method ] ); + s += sprintf( s, " subme=%d", p->analyse.i_subpel_refine ); ++ s += sprintf( s, " psy_rd=%f", p->analyse.f_psy_rd ); + s += sprintf( s, " brdo=%d", p->analyse.b_bframe_rdo ); + s += sprintf( s, " mixed_ref=%d", p->analyse.b_mixed_references ); + s += sprintf( s, " me_range=%d", p->analyse.i_me_range ); +diff --git a/common/common.h b/common/common.h +index e2792cc..fbd88fd 100644 +--- a/common/common.h ++++ b/common/common.h +@@ -454,6 +454,12 @@ struct x264_t + DECLARE_ALIGNED_16( int16_t i8x8_dct_buf[3][64] ); + DECLARE_ALIGNED_16( int16_t i4x4_dct_buf[15][16] ); + ++ /* SATD scores for psy RD */ ++ int fenc_satd[4][4]; ++ int fenc_satd_sum; ++ int fenc_sa8d[2][2]; ++ int fenc_sa8d_sum; ++ + /* pointer over mb of the frame to be compressed */ + uint8_t *p_fenc[3]; + +diff --git a/encoder/analyse.c b/encoder/analyse.c +index 270b90a..25346b4 100644 +--- a/encoder/analyse.c ++++ b/encoder/analyse.c +@@ -467,6 +467,34 @@ static void predict_4x4_mode_available( unsigned int i_neighbour, + } + } + ++/* Pre-calculate fenc satd scores for psy RD, minus DC coefficients */ ++static inline void x264_mb_cache_fenc_satd( x264_t *h ) ++{ ++ DECLARE_ALIGNED_16(uint8_t zero[16]) = {0}; ++ uint8_t *fenc; ++ int x, y, satd_sum = 0, sa8d_sum = 0; ++ if( !h->param.analyse.i_psy_rd) ++ return; ++ for( y = 0; y < 4; y++ ) ++ for( x = 0; x < 4; x++ ) ++ { ++ fenc = h->mb.pic.p_fenc[0]+x*4+y*4*FENC_STRIDE; ++ h->mb.pic.fenc_satd[y][x] = h->pixf.satd[PIXEL_4x4]( zero, 0, fenc, FENC_STRIDE ) ++ - (h->pixf.sad[PIXEL_4x4]( zero, 0, fenc, FENC_STRIDE )>>1); ++ satd_sum += h->mb.pic.fenc_satd[y][x]; ++ } ++ for( y = 0; y < 2; y++ ) ++ for( x = 0; x < 2; x++ ) ++ { ++ fenc = h->mb.pic.p_fenc[0]+x*8+y*8*FENC_STRIDE; ++ h->mb.pic.fenc_sa8d[y][x] = h->pixf.sa8d[PIXEL_8x8]( zero, 0, fenc, FENC_STRIDE ) ++ - (h->pixf.sad[PIXEL_8x8]( zero, 0, fenc, FENC_STRIDE )>>2); ++ sa8d_sum += h->mb.pic.fenc_sa8d[y][x]; ++ } ++ h->mb.pic.fenc_satd_sum = satd_sum; ++ h->mb.pic.fenc_sa8d_sum = sa8d_sum; ++} ++ + static void x264_mb_analyse_intra_chroma( x264_t *h, x264_mb_analysis_t *a ) + { + int i; +@@ -1016,12 +1044,15 @@ static void x264_mb_analyse_inter_p16x16( x264_t *h, x264_mb_analysis_t *a ) + assert( a->l0.me16x16.mv[1] <= h->mb.mv_max_spel[1] || h->param.i_threads == 1 ); + + h->mb.i_type = P_L0; +- if( a->b_mbrd && a->l0.me16x16.i_ref == 0 +- && *(uint32_t*)a->l0.me16x16.mv == *(uint32_t*)h->mb.cache.pskip_mv ) ++ if( a->b_mbrd ) + { +- h->mb.i_partition = D_16x16; +- x264_macroblock_cache_mv_ptr( h, 0, 0, 4, 4, 0, a->l0.me16x16.mv ); +- a->l0.i_rd16x16 = x264_rd_cost_mb( h, a->i_lambda2 ); ++ x264_mb_cache_fenc_satd( h ); ++ if( a->l0.me16x16.i_ref == 0 && *(uint32_t*)a->l0.me16x16.mv == *(uint32_t*)h->mb.cache.pskip_mv ) ++ { ++ h->mb.i_partition = D_16x16; ++ x264_macroblock_cache_mv_ptr( h, 0, 0, 4, 4, 0, a->l0.me16x16.mv ); ++ a->l0.i_rd16x16 = x264_rd_cost_mb( h, a->i_lambda2 ); ++ } + } + } + +@@ -1906,7 +1937,7 @@ static void x264_mb_analyse_p_rd( x264_t *h, x264_mb_analysis_t *a, int i_satd ) + + static void x264_mb_analyse_b_rd( x264_t *h, x264_mb_analysis_t *a, int i_satd_inter ) + { +- int thresh = i_satd_inter * 17/16; ++ int thresh = i_satd_inter * (17 + (!!h->param.analyse.i_psy_rd))/16; + + if( a->b_direct_available && a->i_rd16x16direct == COST_MAX ) + { +@@ -2067,7 +2098,10 @@ void x264_macroblock_analyse( x264_t *h ) + { + x264_mb_analyse_intra( h, &analysis, COST_MAX ); + if( analysis.b_mbrd ) ++ { ++ x264_mb_cache_fenc_satd( h ); + x264_intra_rd( h, &analysis, COST_MAX ); ++ } + + i_cost = analysis.i_satd_i16x16; + h->mb.i_type = I_16x16; +@@ -2342,6 +2376,9 @@ void x264_macroblock_analyse( x264_t *h ) + { + int i_bskip_cost = COST_MAX; + int b_skip = 0; ++ ++ if( analysis.b_mbrd ) ++ x264_mb_cache_fenc_satd( h ); + + h->mb.i_type = B_SKIP; + if( h->mb.b_direct_auto_write ) +diff --git a/encoder/encoder.c b/encoder/encoder.c +index 2c2fe8c..ff5febe 100644 +--- a/encoder/encoder.c ++++ b/encoder/encoder.c +@@ -411,6 +411,7 @@ static int x264_validate_parameters( x264_t *h ) + h->param.analyse.b_fast_pskip = 0; + h->param.analyse.i_noise_reduction = 0; + h->param.analyse.i_subpel_refine = x264_clip3( h->param.analyse.i_subpel_refine, 1, 6 ); ++ h->param.analyse.f_psy_rd = 0; + } + if( h->param.rc.i_rc_method == X264_RC_CQP ) + { +@@ -486,6 +487,16 @@ static int x264_validate_parameters( x264_t *h ) + if( !h->param.b_cabac ) + h->param.analyse.i_trellis = 0; + h->param.analyse.i_trellis = x264_clip3( h->param.analyse.i_trellis, 0, 2 ); ++ h->param.analyse.f_psy_rd = x264_clip3f( h->param.analyse.f_psy_rd, 0, 10 ); ++ if( h->param.analyse.i_subpel_refine < 6) ++ h->param.analyse.f_psy_rd = 0; ++ if( h->param.analyse.f_psy_rd && h->param.analyse.i_trellis == 1 ) ++ { ++ x264_log( h, X264_LOG_WARNING, "psy RD is not compatible with trellis=1; use 0 or 2.\n" ); ++ h->param.analyse.i_trellis = 0; ++ } ++ if( h->param.analyse.f_psy_rd ) ++ h->param.analyse.i_psy_rd = FIX8( h->param.analyse.f_psy_rd ); + h->param.rc.i_aq_mode = x264_clip3( h->param.rc.i_aq_mode, 0, 2 ); + if( h->param.rc.f_aq_strength <= 0 ) + h->param.rc.i_aq_mode = 0; +diff --git a/encoder/rdo.c b/encoder/rdo.c +index 76bf57b..7da862a 100644 +--- a/encoder/rdo.c ++++ b/encoder/rdo.c +@@ -50,21 +50,82 @@ static uint16_t cabac_prefix_size[15][128]; + + #define COPY_CABAC h->mc.memcpy_aligned( &cabac_tmp.f8_bits_encoded, &h->cabac.f8_bits_encoded, \ + sizeof(x264_cabac_t) - offsetof(x264_cabac_t,f8_bits_encoded) ) +- +-static int ssd_mb( x264_t *h ) ++ ++#define ADD_ABS_SATD(satdtype, pixel)\ ++ satd += abs((h->pixf.satdtype[pixel]( zero, 0, fdec, FDEC_STRIDE ) - dc_coef)\ ++ - sum_##satdtype( h, pixel, x, y )); ++ ++/* Sum the cached SATDs to avoid repeating them. */ ++static inline int sum_satd( x264_t *h, int pixel, int x, int y ) ++{ ++ int satd = 0; ++ int min_x = x>>2; ++ int min_y = y>>2; ++ int max_x = (x>>2) + (x264_pixel_size[pixel].w>>2); ++ int max_y = (y>>2) + (x264_pixel_size[pixel].h>>2); ++ if( pixel == PIXEL_16x16 ) ++ return h->mb.pic.fenc_satd_sum; ++ for( y = min_y; y < max_y; y++ ) ++ for( x = min_x; x < max_x; x++ ) ++ satd += h->mb.pic.fenc_satd[y][x]; ++ return satd; ++} ++ ++static inline int sum_sa8d( x264_t *h, int pixel, int x, int y ) ++{ ++ int sa8d = 0; ++ int min_x = x>>3; ++ int min_y = y>>3; ++ int max_x = (x>>3) + (x264_pixel_size[pixel].w>>3); ++ int max_y = (y>>3) + (x264_pixel_size[pixel].h>>3); ++ if( pixel == PIXEL_16x16 ) ++ return h->mb.pic.fenc_sa8d_sum; ++ for( y = min_y; y < max_y; y++ ) ++ for( x = min_x; x < max_x; x++ ) ++ sa8d += h->mb.pic.fenc_sa8d[y][x]; ++ return sa8d; ++} ++ ++/* Psy RD distortion metric: SSD plus "Absolute Difference of Complexities" */ ++/* SATD and SA8D are used to measure block complexity. */ ++/* Blocks with a complexity most similar to that of the source are scored best. */ ++/* The difference between SATD and SA8D scores are both used to avoid bias from the DCT size. Using SATD */ ++/* only, for example, results in overusage of 8x8dct, while the opposite occurs when using SA8D. */ ++/* This is because frequencies stored in an 8x8dct sum up to a larger value when viewed through a 4x4 */ ++/* transform and vice versa with a 4x4dct and an 8x8 transform. */ ++/* SSD is still used as the primary RD metric; this value is merely added to it for psy purposes. */ ++ ++/* FIXME: Is there a better metric than averaged SATD/SA8D difference for complexity difference? */ ++/* Hadamard transform is recursive, so a SATD+SA8D can be done faster by taking advantage of this fact. */ ++/* This optimization can also be used in non-RD transform decision. */ ++ ++static inline int ssd_plane( x264_t *h, int size, int p, int x, int y ) + { +- return h->pixf.ssd[PIXEL_16x16]( h->mb.pic.p_fenc[0], FENC_STRIDE, +- h->mb.pic.p_fdec[0], FDEC_STRIDE ) +- + h->pixf.ssd[PIXEL_8x8]( h->mb.pic.p_fenc[1], FENC_STRIDE, +- h->mb.pic.p_fdec[1], FDEC_STRIDE ) +- + h->pixf.ssd[PIXEL_8x8]( h->mb.pic.p_fenc[2], FENC_STRIDE, +- h->mb.pic.p_fdec[2], FDEC_STRIDE ); ++ DECLARE_ALIGNED_16(uint8_t zero[16]) = {0}; ++ int satd = 0; ++ uint8_t *fdec = h->mb.pic.p_fdec[p] + x + y*FDEC_STRIDE; ++ uint8_t *fenc = h->mb.pic.p_fenc[p] + x + y*FENC_STRIDE; ++ if( p == 0 && h->param.analyse.i_psy_rd ) ++ { ++ int dc_coef = h->pixf.sad[size](zero, 0, fdec, FDEC_STRIDE) >> 1; ++ ADD_ABS_SATD(satd, size); ++ /* If the plane is smaller than 8x8, we can't do an SA8D; this probably isn't a big problem. */ ++ if(size <= PIXEL_8x8) ++ { ++ dc_coef >>= 1; ++ ADD_ABS_SATD(sa8d, size); ++ satd >>= 1; ++ } ++ satd = (satd * h->param.analyse.i_psy_rd * x264_lambda_tab[h->mb.i_qp] + 128) >> 8; ++ } ++ return h->pixf.ssd[size](fenc, FENC_STRIDE, fdec, FDEC_STRIDE) + satd; + } + +-static int ssd_plane( x264_t *h, int size, int p, int x, int y ) ++static inline int ssd_mb( x264_t *h ) + { +- return h->pixf.ssd[size]( h->mb.pic.p_fenc[p] + x+y*FENC_STRIDE, FENC_STRIDE, +- h->mb.pic.p_fdec[p] + x+y*FDEC_STRIDE, FDEC_STRIDE ); ++ return ssd_plane(h, PIXEL_16x16, 0, 0, 0) ++ + ssd_plane(h, PIXEL_8x8, 1, 0, 0) ++ + ssd_plane(h, PIXEL_8x8, 2, 0, 0); + } + + static int x264_rd_cost_mb( x264_t *h, int i_lambda2 ) +diff --git a/x264.c b/x264.c +index 14466e5..96326cd 100644 +--- a/x264.c ++++ b/x264.c +@@ -243,6 +243,9 @@ static void Help( x264_param_t *defaults, int b_longhelp ) + H0( " -m, --subme Subpixel motion estimation and partition\n" + " decision quality: 1=fast, 7=best. [%d]\n", defaults->analyse.i_subpel_refine ); + H0( " --b-rdo RD based mode decision for B-frames. Requires subme 6.\n" ); ++ H0( " --psy-rd Strength of mode decision psychovisual optimization [\"%f\"]\n" ++ " Does nothing at subme < 6.", ++ defaults->analyse.f_psy_rd ); + H0( " --mixed-refs Decide references on a per partition basis\n" ); + H1( " --no-chroma-me Ignore chroma in motion estimation\n" ); + H1( " --bime Jointly optimize both MVs in B-frames\n" ); +@@ -411,6 +414,7 @@ static int Parse( int argc, char **argv, + { "mvrange", required_argument, NULL, 0 }, + { "mvrange-thread", required_argument, NULL, 0 }, + { "subme", required_argument, NULL, 'm' }, ++ { "psy-rd", required_argument, NULL, 0 }, + { "b-rdo", no_argument, NULL, 0 }, + { "mixed-refs", no_argument, NULL, 0 }, + { "no-chroma-me", no_argument, NULL, 0 }, +diff --git a/x264.h b/x264.h +index 3b678dc..02266c1 100644 +--- a/x264.h ++++ b/x264.h +@@ -239,6 +239,8 @@ typedef struct x264_param_t + int b_fast_pskip; /* early SKIP detection on P-frames */ + int b_dct_decimate; /* transform coefficient thresholding on P-frames */ + int i_noise_reduction; /* adaptive pseudo-deadzone */ ++ float f_psy_rd; /* Psy RD strength */ ++ int i_psy_rd; /* Psy RD strength--fixed point value*/ + + /* the deadzone size that will be used in luma quantization */ + int i_luma_deadzone[2]; /* {inter, intra} */ diff --git a/media-libs/x264/files/.svn/text-base/x264-psyrdo-0.6.diff.svn-base b/media-libs/x264/files/.svn/text-base/x264-psyrdo-0.6.diff.svn-base new file mode 100644 index 0000000..4b487ac --- /dev/null +++ b/media-libs/x264/files/.svn/text-base/x264-psyrdo-0.6.diff.svn-base @@ -0,0 +1,297 @@ +diff --git a/common/common.c b/common/common.c +index 71a29b1..301b9ed 100644 +--- a/common/common.c ++++ b/common/common.c +@@ -117,6 +117,7 @@ void x264_param_default( x264_param_t *param ) + | X264_ANALYSE_PSUB16x16 | X264_ANALYSE_BSUB16x16; + param->analyse.i_direct_mv_pred = X264_DIRECT_PRED_SPATIAL; + param->analyse.i_me_method = X264_ME_HEX; ++ param->analyse.f_psy_rd = 1.0; + param->analyse.i_me_range = 16; + param->analyse.i_subpel_refine = 5; + param->analyse.b_chroma_me = 1; +@@ -464,6 +465,8 @@ int x264_param_parse( x264_param_t *p, const char *name, const char *value ) + p->analyse.i_mv_range_thread = atoi(value); + OPT2("subme", "subq") + p->analyse.i_subpel_refine = atoi(value); ++ OPT("psy-rd") ++ p->analyse.f_psy_rd = atof(value); + OPT("bime") + p->analyse.b_bidir_me = atobool(value); + OPT("chroma-me") +@@ -856,6 +859,7 @@ char *x264_param2string( x264_param_t *p, int b_res ) + s += sprintf( s, " analyse=%#x:%#x", p->analyse.intra, p->analyse.inter ); + s += sprintf( s, " me=%s", x264_motion_est_names[ p->analyse.i_me_method ] ); + s += sprintf( s, " subme=%d", p->analyse.i_subpel_refine ); ++ s += sprintf( s, " psy_rd=%f", p->analyse.f_psy_rd ); + s += sprintf( s, " brdo=%d", p->analyse.b_bframe_rdo ); + s += sprintf( s, " mixed_ref=%d", p->analyse.b_mixed_references ); + s += sprintf( s, " me_range=%d", p->analyse.i_me_range ); +diff --git a/common/common.h b/common/common.h +index e2792cc..fbd88fd 100644 +--- a/common/common.h ++++ b/common/common.h +@@ -454,6 +454,12 @@ struct x264_t + DECLARE_ALIGNED_16( int16_t i8x8_dct_buf[3][64] ); + DECLARE_ALIGNED_16( int16_t i4x4_dct_buf[15][16] ); + ++ /* SATD scores for psy RD */ ++ int fenc_satd[4][4]; ++ int fenc_satd_sum; ++ int fenc_sa8d[2][2]; ++ int fenc_sa8d_sum; ++ + /* pointer over mb of the frame to be compressed */ + uint8_t *p_fenc[3]; + +diff --git a/encoder/analyse.c b/encoder/analyse.c +index 270b90a..25346b4 100644 +--- a/encoder/analyse.c ++++ b/encoder/analyse.c +@@ -467,6 +467,34 @@ static void predict_4x4_mode_available( unsigned int i_neighbour, + } + } + ++/* Pre-calculate fenc satd scores for psy RD, minus DC coefficients */ ++static inline void x264_mb_cache_fenc_satd( x264_t *h ) ++{ ++ DECLARE_ALIGNED_16(uint8_t zero[16]) = {0}; ++ uint8_t *fenc; ++ int x, y, satd_sum = 0, sa8d_sum = 0; ++ if( !h->param.analyse.i_psy_rd) ++ return; ++ for( y = 0; y < 4; y++ ) ++ for( x = 0; x < 4; x++ ) ++ { ++ fenc = h->mb.pic.p_fenc[0]+x*4+y*4*FENC_STRIDE; ++ h->mb.pic.fenc_satd[y][x] = h->pixf.satd[PIXEL_4x4]( zero, 0, fenc, FENC_STRIDE ) ++ - (h->pixf.sad[PIXEL_4x4]( zero, 0, fenc, FENC_STRIDE )>>1); ++ satd_sum += h->mb.pic.fenc_satd[y][x]; ++ } ++ for( y = 0; y < 2; y++ ) ++ for( x = 0; x < 2; x++ ) ++ { ++ fenc = h->mb.pic.p_fenc[0]+x*8+y*8*FENC_STRIDE; ++ h->mb.pic.fenc_sa8d[y][x] = h->pixf.sa8d[PIXEL_8x8]( zero, 0, fenc, FENC_STRIDE ) ++ - (h->pixf.sad[PIXEL_8x8]( zero, 0, fenc, FENC_STRIDE )>>2); ++ sa8d_sum += h->mb.pic.fenc_sa8d[y][x]; ++ } ++ h->mb.pic.fenc_satd_sum = satd_sum; ++ h->mb.pic.fenc_sa8d_sum = sa8d_sum; ++} ++ + static void x264_mb_analyse_intra_chroma( x264_t *h, x264_mb_analysis_t *a ) + { + int i; +@@ -1016,12 +1044,15 @@ static void x264_mb_analyse_inter_p16x16( x264_t *h, x264_mb_analysis_t *a ) + assert( a->l0.me16x16.mv[1] <= h->mb.mv_max_spel[1] || h->param.i_threads == 1 ); + + h->mb.i_type = P_L0; +- if( a->b_mbrd && a->l0.me16x16.i_ref == 0 +- && *(uint32_t*)a->l0.me16x16.mv == *(uint32_t*)h->mb.cache.pskip_mv ) ++ if( a->b_mbrd ) + { +- h->mb.i_partition = D_16x16; +- x264_macroblock_cache_mv_ptr( h, 0, 0, 4, 4, 0, a->l0.me16x16.mv ); +- a->l0.i_rd16x16 = x264_rd_cost_mb( h, a->i_lambda2 ); ++ x264_mb_cache_fenc_satd( h ); ++ if( a->l0.me16x16.i_ref == 0 && *(uint32_t*)a->l0.me16x16.mv == *(uint32_t*)h->mb.cache.pskip_mv ) ++ { ++ h->mb.i_partition = D_16x16; ++ x264_macroblock_cache_mv_ptr( h, 0, 0, 4, 4, 0, a->l0.me16x16.mv ); ++ a->l0.i_rd16x16 = x264_rd_cost_mb( h, a->i_lambda2 ); ++ } + } + } + +@@ -1906,7 +1937,7 @@ static void x264_mb_analyse_p_rd( x264_t *h, x264_mb_analysis_t *a, int i_satd ) + + static void x264_mb_analyse_b_rd( x264_t *h, x264_mb_analysis_t *a, int i_satd_inter ) + { +- int thresh = i_satd_inter * 17/16; ++ int thresh = i_satd_inter * (17 + (!!h->param.analyse.i_psy_rd))/16; + + if( a->b_direct_available && a->i_rd16x16direct == COST_MAX ) + { +@@ -2067,7 +2098,10 @@ void x264_macroblock_analyse( x264_t *h ) + { + x264_mb_analyse_intra( h, &analysis, COST_MAX ); + if( analysis.b_mbrd ) ++ { ++ x264_mb_cache_fenc_satd( h ); + x264_intra_rd( h, &analysis, COST_MAX ); ++ } + + i_cost = analysis.i_satd_i16x16; + h->mb.i_type = I_16x16; +@@ -2342,6 +2376,9 @@ void x264_macroblock_analyse( x264_t *h ) + { + int i_bskip_cost = COST_MAX; + int b_skip = 0; ++ ++ if( analysis.b_mbrd ) ++ x264_mb_cache_fenc_satd( h ); + + h->mb.i_type = B_SKIP; + if( h->mb.b_direct_auto_write ) +diff --git a/encoder/encoder.c b/encoder/encoder.c +index 2c2fe8c..ff5febe 100644 +--- a/encoder/encoder.c ++++ b/encoder/encoder.c +@@ -411,5 +411,6 @@ static int x264_validate_parameters( x264_t *h ) + h->param.analyse.b_fast_pskip = 0; + h->param.analyse.i_noise_reduction = 0; ++ h->param.analyse.f_psy_rd = 0; + } + if( h->param.rc.i_rc_method == X264_RC_CQP ) + { +@@ -486,6 +487,16 @@ static int x264_validate_parameters( x264_t *h ) + if( !h->param.b_cabac ) + h->param.analyse.i_trellis = 0; + h->param.analyse.i_trellis = x264_clip3( h->param.analyse.i_trellis, 0, 2 ); ++ h->param.analyse.f_psy_rd = x264_clip3f( h->param.analyse.f_psy_rd, 0, 10 ); ++ if( h->param.analyse.i_subpel_refine < 6) ++ h->param.analyse.f_psy_rd = 0; ++ if( h->param.analyse.f_psy_rd && h->param.analyse.i_trellis == 1 ) ++ { ++ x264_log( h, X264_LOG_WARNING, "psy RD is not compatible with trellis=1; use 0 or 2.\n" ); ++ h->param.analyse.i_trellis = 0; ++ } ++ if( h->param.analyse.f_psy_rd ) ++ h->param.analyse.i_psy_rd = FIX8( h->param.analyse.f_psy_rd ); + h->param.rc.i_aq_mode = x264_clip3( h->param.rc.i_aq_mode, 0, 2 ); + if( h->param.rc.f_aq_strength <= 0 ) + h->param.rc.i_aq_mode = 0; +diff --git a/encoder/rdo.c b/encoder/rdo.c +index 76bf57b..7da862a 100644 +--- a/encoder/rdo.c ++++ b/encoder/rdo.c +@@ -50,21 +50,82 @@ static uint16_t cabac_prefix_size[15][128]; + + #define COPY_CABAC h->mc.memcpy_aligned( &cabac_tmp.f8_bits_encoded, &h->cabac.f8_bits_encoded, \ + sizeof(x264_cabac_t) - offsetof(x264_cabac_t,f8_bits_encoded) ) +- +-static int ssd_mb( x264_t *h ) ++ ++#define ADD_ABS_SATD(satdtype, pixel)\ ++ satd += abs((h->pixf.satdtype[pixel]( zero, 0, fdec, FDEC_STRIDE ) - dc_coef)\ ++ - sum_##satdtype( h, pixel, x, y )); ++ ++/* Sum the cached SATDs to avoid repeating them. */ ++static inline int sum_satd( x264_t *h, int pixel, int x, int y ) ++{ ++ int satd = 0; ++ int min_x = x>>2; ++ int min_y = y>>2; ++ int max_x = (x>>2) + (x264_pixel_size[pixel].w>>2); ++ int max_y = (y>>2) + (x264_pixel_size[pixel].h>>2); ++ if( pixel == PIXEL_16x16 ) ++ return h->mb.pic.fenc_satd_sum; ++ for( y = min_y; y < max_y; y++ ) ++ for( x = min_x; x < max_x; x++ ) ++ satd += h->mb.pic.fenc_satd[y][x]; ++ return satd; ++} ++ ++static inline int sum_sa8d( x264_t *h, int pixel, int x, int y ) ++{ ++ int sa8d = 0; ++ int min_x = x>>3; ++ int min_y = y>>3; ++ int max_x = (x>>3) + (x264_pixel_size[pixel].w>>3); ++ int max_y = (y>>3) + (x264_pixel_size[pixel].h>>3); ++ if( pixel == PIXEL_16x16 ) ++ return h->mb.pic.fenc_sa8d_sum; ++ for( y = min_y; y < max_y; y++ ) ++ for( x = min_x; x < max_x; x++ ) ++ sa8d += h->mb.pic.fenc_sa8d[y][x]; ++ return sa8d; ++} ++ ++/* Psy RD distortion metric: SSD plus "Absolute Difference of Complexities" */ ++/* SATD and SA8D are used to measure block complexity. */ ++/* Blocks with a complexity most similar to that of the source are scored best. */ ++/* The difference between SATD and SA8D scores are both used to avoid bias from the DCT size. Using SATD */ ++/* only, for example, results in overusage of 8x8dct, while the opposite occurs when using SA8D. */ ++/* This is because frequencies stored in an 8x8dct sum up to a larger value when viewed through a 4x4 */ ++/* transform and vice versa with a 4x4dct and an 8x8 transform. */ ++/* SSD is still used as the primary RD metric; this value is merely added to it for psy purposes. */ ++ ++/* FIXME: Is there a better metric than averaged SATD/SA8D difference for complexity difference? */ ++/* Hadamard transform is recursive, so a SATD+SA8D can be done faster by taking advantage of this fact. */ ++/* This optimization can also be used in non-RD transform decision. */ ++ ++static inline int ssd_plane( x264_t *h, int size, int p, int x, int y ) + { +- return h->pixf.ssd[PIXEL_16x16]( h->mb.pic.p_fenc[0], FENC_STRIDE, +- h->mb.pic.p_fdec[0], FDEC_STRIDE ) +- + h->pixf.ssd[PIXEL_8x8]( h->mb.pic.p_fenc[1], FENC_STRIDE, +- h->mb.pic.p_fdec[1], FDEC_STRIDE ) +- + h->pixf.ssd[PIXEL_8x8]( h->mb.pic.p_fenc[2], FENC_STRIDE, +- h->mb.pic.p_fdec[2], FDEC_STRIDE ); ++ DECLARE_ALIGNED_16(uint8_t zero[16]) = {0}; ++ int satd = 0; ++ uint8_t *fdec = h->mb.pic.p_fdec[p] + x + y*FDEC_STRIDE; ++ uint8_t *fenc = h->mb.pic.p_fenc[p] + x + y*FENC_STRIDE; ++ if( p == 0 && h->param.analyse.i_psy_rd ) ++ { ++ int dc_coef = h->pixf.sad[size](zero, 0, fdec, FDEC_STRIDE) >> 1; ++ ADD_ABS_SATD(satd, size); ++ /* If the plane is smaller than 8x8, we can't do an SA8D; this probably isn't a big problem. */ ++ if(size <= PIXEL_8x8) ++ { ++ dc_coef >>= 1; ++ ADD_ABS_SATD(sa8d, size); ++ satd >>= 1; ++ } ++ satd = (satd * h->param.analyse.i_psy_rd * x264_lambda_tab[h->mb.i_qp] + 128) >> 8; ++ } ++ return h->pixf.ssd[size](fenc, FENC_STRIDE, fdec, FDEC_STRIDE) + satd; + } + +-static int ssd_plane( x264_t *h, int size, int p, int x, int y ) ++static inline int ssd_mb( x264_t *h ) + { +- return h->pixf.ssd[size]( h->mb.pic.p_fenc[p] + x+y*FENC_STRIDE, FENC_STRIDE, +- h->mb.pic.p_fdec[p] + x+y*FDEC_STRIDE, FDEC_STRIDE ); ++ return ssd_plane(h, PIXEL_16x16, 0, 0, 0) ++ + ssd_plane(h, PIXEL_8x8, 1, 0, 0) ++ + ssd_plane(h, PIXEL_8x8, 2, 0, 0); + } + + static int x264_rd_cost_mb( x264_t *h, int i_lambda2 ) +diff --git a/x264.c b/x264.c +index 14466e5..96326cd 100644 +--- a/x264.c ++++ b/x264.c +@@ -243,6 +243,9 @@ static void Help( x264_param_t *defaults, int b_longhelp ) + H0( " -m, --subme Subpixel motion estimation and partition\n" + " decision quality: 1=fast, 7=best. [%d]\n", defaults->analyse.i_subpel_refine ); + H0( " --b-rdo RD based mode decision for B-frames. Requires subme 6.\n" ); ++ H0( " --psy-rd Strength of mode decision psychovisual optimization [\"%f\"]\n" ++ " Does nothing at subme < 6.", ++ defaults->analyse.f_psy_rd ); + H0( " --mixed-refs Decide references on a per partition basis\n" ); + H1( " --no-chroma-me Ignore chroma in motion estimation\n" ); + H1( " --bime Jointly optimize both MVs in B-frames\n" ); +@@ -411,6 +414,7 @@ static int Parse( int argc, char **argv, + { "mvrange", required_argument, NULL, 0 }, + { "mvrange-thread", required_argument, NULL, 0 }, + { "subme", required_argument, NULL, 'm' }, ++ { "psy-rd", required_argument, NULL, 0 }, + { "b-rdo", no_argument, NULL, 0 }, + { "mixed-refs", no_argument, NULL, 0 }, + { "no-chroma-me", no_argument, NULL, 0 }, +diff --git a/x264.h b/x264.h +index 3b678dc..02266c1 100644 +--- a/x264.h ++++ b/x264.h +@@ -239,6 +239,8 @@ typedef struct x264_param_t + int b_fast_pskip; /* early SKIP detection on P-frames */ + int b_dct_decimate; /* transform coefficient thresholding on P-frames */ + int i_noise_reduction; /* adaptive pseudo-deadzone */ ++ float f_psy_rd; /* Psy RD strength */ ++ int i_psy_rd; /* Psy RD strength--fixed point value*/ + + /* the deadzone size that will be used in luma quantization */ + int i_luma_deadzone[2]; /* {inter, intra} */ diff --git a/media-libs/x264/files/.svn/text-base/x264_psy_rdo.r889.diff.svn-base b/media-libs/x264/files/.svn/text-base/x264_psy_rdo.r889.diff.svn-base new file mode 100644 index 0000000..6f36ed5 --- /dev/null +++ b/media-libs/x264/files/.svn/text-base/x264_psy_rdo.r889.diff.svn-base @@ -0,0 +1,160 @@ +diff --git a/common/common.c b/common/common.c +index 8a8f660..7e091bc 100644 +--- a/common/common.c ++++ b/common/common.c +@@ -117,6 +117,7 @@ void x264_param_default( x264_param_t *param ) + | X264_ANALYSE_PSUB16x16 | X264_ANALYSE_BSUB16x16; + param->analyse.i_direct_mv_pred = X264_DIRECT_PRED_SPATIAL; + param->analyse.i_me_method = X264_ME_HEX; ++ param->analyse.i_rdcmp = X264_CMP_PSY; + param->analyse.i_me_range = 16; + param->analyse.i_subpel_refine = 5; + param->analyse.b_chroma_me = 1; +@@ -464,6 +465,8 @@ int x264_param_parse( x264_param_t *p, const char *name, const char *value ) + p->analyse.i_mv_range_thread = atoi(value); + OPT2("subme", "subq") + p->analyse.i_subpel_refine = atoi(value); ++ OPT("rdcmp") ++ b_error |= parse_enum( value, x264_rdcmp_names, &p->analyse.i_rdcmp ); + OPT("bime") + p->analyse.b_bidir_me = atobool(value); + OPT("chroma-me") +@@ -856,6 +859,7 @@ char *x264_param2string( x264_param_t *p, int b_res ) + s += sprintf( s, " analyse=%#x:%#x", p->analyse.intra, p->analyse.inter ); + s += sprintf( s, " me=%s", x264_motion_est_names[ p->analyse.i_me_method ] ); + s += sprintf( s, " subme=%d", p->analyse.i_subpel_refine ); ++ s += sprintf( s, " rdcmp=%s", x264_rdcmp_names[ p->analyse.i_rdcmp ] ); + s += sprintf( s, " brdo=%d", p->analyse.b_bframe_rdo ); + s += sprintf( s, " mixed_ref=%d", p->analyse.b_mixed_references ); + s += sprintf( s, " me_range=%d", p->analyse.i_me_range ); +diff --git a/encoder/analyse.c b/encoder/analyse.c +index 9200ace..f0b5409 100644 +--- a/encoder/analyse.c ++++ b/encoder/analyse.c +@@ -1911,7 +1911,7 @@ static void x264_mb_analyse_p_rd( x264_t *h, x264_mb_analysis_t *a, int i_satd ) + + static void x264_mb_analyse_b_rd( x264_t *h, x264_mb_analysis_t *a, int i_satd_inter ) + { +- int thresh = i_satd_inter * 17/16; ++ int thresh = i_satd_inter * (17 + (h->param.analyse.i_rdcmp == X264_CMP_PSY))/16; + + if( a->b_direct_available && a->i_rd16x16direct == COST_MAX ) + { +diff --git a/encoder/rdo.c b/encoder/rdo.c +index 8223efd..55629ff 100644 +--- a/encoder/rdo.c ++++ b/encoder/rdo.c +@@ -52,21 +52,54 @@ static uint16_t cabac_prefix_size[15][128]; + + #define COPY_CABAC h->mc.memcpy_aligned( &cabac_tmp.f8_bits_encoded, &h->cabac.f8_bits_encoded, \ + sizeof(x264_cabac_t) - offsetof(x264_cabac_t,f8_bits_encoded) ) +- +-static int ssd_mb( x264_t *h ) ++ ++#define ADD_ABS_SATD(satdtype, pixel)\ ++ satd += abs((h->pixf.satdtype[pixel]( zero, 0, fdec, FDEC_STRIDE ) - dc_coefs[0]) - \ ++ (h->pixf.satdtype[pixel]( zero, 0, fenc, FENC_STRIDE ) - dc_coefs[1])); ++ ++/* Psy RD distortion metric: SSD plus "Absolute Difference of Complexities" */ ++/* SATD and SA8D are used to measure block complexity. */ ++/* Blocks with a complexity most similar to that of the source are scored best. */ ++/* The difference between SATD and SA8D scores are both used to avoid bias from the DCT size. Using SATD */ ++/* only, for example, results in overusage of 8x8dct, while the opposite occurs when using SA8D. */ ++/* This is because frequencies stored in an 8x8dct sum up to a larger value when viewed through a 4x4 */ ++/* transform and vice versa with a 4x4dct and an 8x8 transform. */ ++/* The weights chosen (5 for each) are arbitrary. They should probably be the same for SATD and SA8D but */ ++/* the overall weight is chosen for no particularly good reason. */ ++/* SSD is still used as the primary RD metric; this value is merely added to it for psy purposes. */ ++ ++/* FIXME: Is there a better metric than averaged SATD/SA8D difference for complexity difference? */ ++/* Hadamard transform is recursive, so a SATD+SA8D can be done faster by taking advantage of this fact. */ ++/* We can factor out the fenc SATD/SA8D so they're only done once. */ ++ ++static inline int ssd_plane( x264_t *h, int size, int p, int x, int y ) + { +- return h->pixf.ssd[PIXEL_16x16]( h->mb.pic.p_fenc[0], FENC_STRIDE, +- h->mb.pic.p_fdec[0], FDEC_STRIDE ) +- + h->pixf.ssd[PIXEL_8x8]( h->mb.pic.p_fenc[1], FENC_STRIDE, +- h->mb.pic.p_fdec[1], FDEC_STRIDE ) +- + h->pixf.ssd[PIXEL_8x8]( h->mb.pic.p_fenc[2], FENC_STRIDE, +- h->mb.pic.p_fdec[2], FDEC_STRIDE ); ++ DECLARE_ALIGNED_16(uint8_t zero[16]) = {0}; ++ int satd = 0; ++ uint8_t *fdec = h->mb.pic.p_fdec[p] + x + y*FDEC_STRIDE; ++ uint8_t *fenc = h->mb.pic.p_fenc[p] + x + y*FENC_STRIDE; ++ if(p == 0 && h->param.analyse.i_rdcmp == X264_CMP_PSY) ++ { ++ int dc_coefs[2]; ++ dc_coefs[0] = h->pixf.sad[size]( zero, 0, fdec, FDEC_STRIDE ) >> 1; ++ dc_coefs[1] = h->pixf.sad[size]( zero, 0, fenc, FENC_STRIDE ) >> 1; ++ ADD_ABS_SATD(satd, size); ++ /* If the plane is smaller than 8x8, we can't do an SA8D; this probably isn't a big problem. */ ++ if(size <= PIXEL_8x8) ++ { ++ dc_coefs[0] >>= 1; ++ dc_coefs[1] >>= 1; ++ ADD_ABS_SATD(sa8d, size); ++ } ++ else ++ satd *= 2; ++ } ++ return h->pixf.ssd[size]( fenc, FENC_STRIDE, fdec, FDEC_STRIDE ) + satd * 5; + } + +-static int ssd_plane( x264_t *h, int size, int p, int x, int y ) ++static inline int ssd_mb( x264_t *h ) + { +- return h->pixf.ssd[size]( h->mb.pic.p_fenc[p] + x+y*FENC_STRIDE, FENC_STRIDE, +- h->mb.pic.p_fdec[p] + x+y*FDEC_STRIDE, FDEC_STRIDE ); ++ return ssd_plane(h, PIXEL_16x16, 0, 0, 0) + ssd_plane(h, PIXEL_8x8, 1, 0, 0) + ssd_plane(h, PIXEL_8x8, 2, 0, 0); + } + + static int x264_rd_cost_mb( x264_t *h, int i_lambda2 ) +diff --git a/x264.c b/x264.c +index d78461f..46b74b9 100644 +--- a/x264.c ++++ b/x264.c +@@ -243,6 +243,10 @@ static void Help( x264_param_t *defaults, int b_longhelp ) + H0( " -m, --subme Subpixel motion estimation and partition\n" + " decision quality: 1=fast, 7=best. [%d]\n", defaults->analyse.i_subpel_refine ); + H0( " --b-rdo RD based mode decision for B-frames. Requires subme 6.\n" ); ++ H0( " --rdcmp Metric used for RD mode decision [\"%s\"]\n", ++ strtable_lookup( x264_rdcmp_names, defaults->analyse.i_rdcmp ) ); ++ H0( " - ssd: normal (maximum PSNR)\n" ++ " - psy: psychovisual (sharper)\n" ); + H0( " --mixed-refs Decide references on a per partition basis\n" ); + H1( " --no-chroma-me Ignore chroma in motion estimation\n" ); + H1( " --bime Jointly optimize both MVs in B-frames\n" ); +@@ -411,6 +415,7 @@ static int Parse( int argc, char **argv, + { "mvrange", required_argument, NULL, 0 }, + { "mvrange-thread", required_argument, NULL, 0 }, + { "subme", required_argument, NULL, 'm' }, ++ { "rdcmp", required_argument, NULL, 0 }, + { "b-rdo", no_argument, NULL, 0 }, + { "mixed-refs", no_argument, NULL, 0 }, + { "no-chroma-me", no_argument, NULL, 0 }, +diff --git a/x264.h b/x264.h +index 0e257a1..432f364 100644 +--- a/x264.h ++++ b/x264.h +@@ -86,9 +86,12 @@ typedef struct x264_t x264_t; + #define X264_AQ_NONE 0 + #define X264_AQ_LOCAL 1 + #define X264_AQ_GLOBAL 2 ++#define X264_CMP_SSD 0 ++#define X264_CMP_PSY 1 + + static const char * const x264_direct_pred_names[] = { "none", "spatial", "temporal", "auto", 0 }; + static const char * const x264_motion_est_names[] = { "dia", "hex", "umh", "esa", "tesa", 0 }; ++static const char * const x264_rdcmp_names[] = { "ssd", "psy", 0 }; + static const char * const x264_overscan_names[] = { "undef", "show", "crop", 0 }; + static const char * const x264_vidformat_names[] = { "component", "pal", "ntsc", "secam", "mac", "undef", 0 }; + static const char * const x264_fullrange_names[] = { "off", "on", 0 }; +@@ -238,6 +241,7 @@ typedef struct x264_param_t + int b_fast_pskip; /* early SKIP detection on P-frames */ + int b_dct_decimate; /* transform coefficient thresholding on P-frames */ + int i_noise_reduction; /* adaptive pseudo-deadzone */ ++ int i_rdcmp; /* RD comparison metric */ + + /* the deadzone size that will be used in luma quantization */ + int i_luma_deadzone[2]; /* {inter, intra} */ diff --git a/media-libs/x264/files/x264-nostrip.patch b/media-libs/x264/files/x264-nostrip.patch new file mode 100644 index 0000000..b4e2689 --- /dev/null +++ b/media-libs/x264/files/x264-nostrip.patch @@ -0,0 +1,16 @@ +Index: x264-svn/configure +=================================================================== +--- x264-svn.orig/configure ++++ x264-svn/configure +@@ -374,11 +374,6 @@ if [ "$pic" = "yes" ] ; then + ASFLAGS="$ASFLAGS -D__PIC__" + fi + +-if [ "$debug" != "yes" -a "$gprof" != "yes" ]; then +- CFLAGS="$CFLAGS -s -fomit-frame-pointer" +- LDFLAGS="$LDFLAGS -s" +-fi +- + if [ "$debug" = "yes" ]; then + CFLAGS="-O1 -g $CFLAGS" + else diff --git a/media-libs/x264/files/x264-psyrd-0.6-psytrellis-0.1.diff b/media-libs/x264/files/x264-psyrd-0.6-psytrellis-0.1.diff new file mode 100644 index 0000000..3b8738c --- /dev/null +++ b/media-libs/x264/files/x264-psyrd-0.6-psytrellis-0.1.diff @@ -0,0 +1,504 @@ +diff --git a/common/common.c b/common/common.c +index 71a29b1..21155eb 100644 +--- a/common/common.c ++++ b/common/common.c +@@ -117,6 +117,7 @@ void x264_param_default( x264_param_t *param ) + | X264_ANALYSE_PSUB16x16 | X264_ANALYSE_BSUB16x16; + param->analyse.i_direct_mv_pred = X264_DIRECT_PRED_SPATIAL; + param->analyse.i_me_method = X264_ME_HEX; ++ param->analyse.f_psy_rd = 1.0; + param->analyse.i_me_range = 16; + param->analyse.i_subpel_refine = 5; + param->analyse.b_chroma_me = 1; +@@ -464,6 +465,8 @@ int x264_param_parse( x264_param_t *p, const char *name, const char *value ) + p->analyse.i_mv_range_thread = atoi(value); + OPT2("subme", "subq") + p->analyse.i_subpel_refine = atoi(value); ++ OPT("psy-rd") ++ p->analyse.f_psy_rd = atof(value); + OPT("bime") + p->analyse.b_bidir_me = atobool(value); + OPT("chroma-me") +@@ -856,6 +859,7 @@ char *x264_param2string( x264_param_t *p, int b_res ) + s += sprintf( s, " analyse=%#x:%#x", p->analyse.intra, p->analyse.inter ); + s += sprintf( s, " me=%s", x264_motion_est_names[ p->analyse.i_me_method ] ); + s += sprintf( s, " subme=%d", p->analyse.i_subpel_refine ); ++ s += sprintf( s, " psy_rd=%.1f", p->analyse.f_psy_rd ); + s += sprintf( s, " brdo=%d", p->analyse.b_bframe_rdo ); + s += sprintf( s, " mixed_ref=%d", p->analyse.b_mixed_references ); + s += sprintf( s, " me_range=%d", p->analyse.i_me_range ); +diff --git a/common/common.h b/common/common.h +index 80648a8..78cdb05 100644 +--- a/common/common.h ++++ b/common/common.h +@@ -342,8 +342,6 @@ struct x264_t + x264_frame_t *fref1[16+3]; /* ref list 1 */ + int b_ref_reorder[2]; + +- +- + /* Current MB DCT coeffs */ + struct + { +@@ -454,6 +452,16 @@ struct x264_t + DECLARE_ALIGNED_16( int16_t i8x8_dct_buf[3][64] ); + DECLARE_ALIGNED_16( int16_t i4x4_dct_buf[15][16] ); + ++ /* Psy trellis DCT data */ ++ DECLARE_ALIGNED_16( int16_t fenc_dct8[4][64] ); ++ DECLARE_ALIGNED_16( int16_t fenc_dct4[16][16] ); ++ ++ /* SATD scores for psy RD */ ++ int fenc_satd[4][4]; ++ int fenc_satd_sum; ++ int fenc_sa8d[2][2]; ++ int fenc_sa8d_sum; ++ + /* pointer over mb of the frame to be compressed */ + uint8_t *p_fenc[3]; + +diff --git a/common/dct.h b/common/dct.h +index 1078023..daa96f4 100644 +--- a/common/dct.h ++++ b/common/dct.h +@@ -41,6 +41,17 @@ static const uint16_t x264_dct8_weight_tab[64] = { + }; + #undef W + ++#define W(i) (i==0 ? FIX8(1.76777) :\ ++ i==1 ? FIX8(1.11803) :\ ++ i==2 ? FIX8(0.70711) :0) ++static const uint16_t x264_dct4_weight_tab[16] = { ++ W(0), W(1), W(0), W(1), ++ W(1), W(2), W(1), W(2), ++ W(0), W(1), W(0), W(1), ++ W(1), W(2), W(1), W(2) ++}; ++#undef W ++ + /* inverse squared */ + #define W(i) (i==0 ? FIX8(3.125) :\ + i==1 ? FIX8(1.25) :\ +diff --git a/encoder/analyse.c b/encoder/analyse.c +index 270b90a..59cc89b 100644 +--- a/encoder/analyse.c ++++ b/encoder/analyse.c +@@ -467,6 +467,34 @@ static void predict_4x4_mode_available( unsigned int i_neighbour, + } + } + ++/* Pre-calculate fenc satd scores for psy RD, minus DC coefficients */ ++static inline void x264_mb_cache_fenc_satd( x264_t *h ) ++{ ++ DECLARE_ALIGNED_16(uint8_t zero[16]) = {0}; ++ uint8_t *fenc; ++ int x, y, satd_sum = 0, sa8d_sum = 0; ++ if( !h->param.analyse.i_psy_rd ) ++ return; ++ for( y = 0; y < 4; y++ ) ++ for( x = 0; x < 4; x++ ) ++ { ++ fenc = h->mb.pic.p_fenc[0]+x*4+y*4*FENC_STRIDE; ++ h->mb.pic.fenc_satd[y][x] = h->pixf.satd[PIXEL_4x4]( zero, 0, fenc, FENC_STRIDE ) ++ - (h->pixf.sad[PIXEL_4x4]( zero, 0, fenc, FENC_STRIDE )>>1); ++ satd_sum += h->mb.pic.fenc_satd[y][x]; ++ } ++ for( y = 0; y < 2; y++ ) ++ for( x = 0; x < 2; x++ ) ++ { ++ fenc = h->mb.pic.p_fenc[0]+x*8+y*8*FENC_STRIDE; ++ h->mb.pic.fenc_sa8d[y][x] = h->pixf.sa8d[PIXEL_8x8]( zero, 0, fenc, FENC_STRIDE ) ++ - (h->pixf.sad[PIXEL_8x8]( zero, 0, fenc, FENC_STRIDE )>>2); ++ sa8d_sum += h->mb.pic.fenc_sa8d[y][x]; ++ } ++ h->mb.pic.fenc_satd_sum = satd_sum; ++ h->mb.pic.fenc_sa8d_sum = sa8d_sum; ++} ++ + static void x264_mb_analyse_intra_chroma( x264_t *h, x264_mb_analysis_t *a ) + { + int i; +@@ -1016,12 +1044,15 @@ static void x264_mb_analyse_inter_p16x16( x264_t *h, x264_mb_analysis_t *a ) + assert( a->l0.me16x16.mv[1] <= h->mb.mv_max_spel[1] || h->param.i_threads == 1 ); + + h->mb.i_type = P_L0; +- if( a->b_mbrd && a->l0.me16x16.i_ref == 0 +- && *(uint32_t*)a->l0.me16x16.mv == *(uint32_t*)h->mb.cache.pskip_mv ) ++ if( a->b_mbrd ) + { +- h->mb.i_partition = D_16x16; +- x264_macroblock_cache_mv_ptr( h, 0, 0, 4, 4, 0, a->l0.me16x16.mv ); +- a->l0.i_rd16x16 = x264_rd_cost_mb( h, a->i_lambda2 ); ++ x264_mb_cache_fenc_satd( h ); ++ if( a->l0.me16x16.i_ref == 0 && *(uint32_t*)a->l0.me16x16.mv == *(uint32_t*)h->mb.cache.pskip_mv ) ++ { ++ h->mb.i_partition = D_16x16; ++ x264_macroblock_cache_mv_ptr( h, 0, 0, 4, 4, 0, a->l0.me16x16.mv ); ++ a->l0.i_rd16x16 = x264_rd_cost_mb( h, a->i_lambda2 ); ++ } + } + } + +@@ -1906,7 +1937,7 @@ static void x264_mb_analyse_p_rd( x264_t *h, x264_mb_analysis_t *a, int i_satd ) + + static void x264_mb_analyse_b_rd( x264_t *h, x264_mb_analysis_t *a, int i_satd_inter ) + { +- int thresh = i_satd_inter * 17/16; ++ int thresh = i_satd_inter * (17 + (!!h->param.analyse.i_psy_rd))/16; + + if( a->b_direct_available && a->i_rd16x16direct == COST_MAX ) + { +@@ -2046,6 +2077,21 @@ static inline void x264_mb_analyse_transform_rd( x264_t *h, x264_mb_analysis_t * + } + } + ++void x264_psy_trellis_init( x264_t *h ) ++{ ++ DECLARE_ALIGNED_16( int16_t dct8x8[4][8][8] ); ++ DECLARE_ALIGNED_16( int16_t dct4x4[16][4][4] ); ++ DECLARE_ALIGNED_16( uint8_t zero[16*FDEC_STRIDE] ) = {0}; ++ int i; ++ ++ /* For psy trellis: do DCT on input data */ ++ h->dctf.sub16x16_dct8( dct8x8, h->mb.pic.p_fenc[0], zero ); ++ for( i = 0; i < 4; i++ ) ++ h->zigzagf.scan_8x8( h->mb.pic.fenc_dct8[i], dct8x8[i] ); ++ h->dctf.sub16x16_dct( dct4x4, h->mb.pic.p_fenc[0], zero ); ++ for( i = 0; i < 16; i++ ) ++ h->zigzagf.scan_4x4( h->mb.pic.fenc_dct4[i], dct4x4[i] ); ++} + + /***************************************************************************** + * x264_macroblock_analyse: +@@ -2062,12 +2108,18 @@ void x264_macroblock_analyse( x264_t *h ) + + x264_mb_analyse_init( h, &analysis, h->mb.i_qp ); + ++ if( h->param.analyse.i_psy_rd && h->param.analyse.i_trellis ) ++ x264_psy_trellis_init( h ); ++ + /*--------------------------- Do the analysis ---------------------------*/ + if( h->sh.i_type == SLICE_TYPE_I ) + { + x264_mb_analyse_intra( h, &analysis, COST_MAX ); + if( analysis.b_mbrd ) ++ { ++ x264_mb_cache_fenc_satd( h ); + x264_intra_rd( h, &analysis, COST_MAX ); ++ } + + i_cost = analysis.i_satd_i16x16; + h->mb.i_type = I_16x16; +@@ -2342,6 +2394,9 @@ void x264_macroblock_analyse( x264_t *h ) + { + int i_bskip_cost = COST_MAX; + int b_skip = 0; ++ ++ if( analysis.b_mbrd ) ++ x264_mb_cache_fenc_satd( h ); + + h->mb.i_type = B_SKIP; + if( h->mb.b_direct_auto_write ) +diff --git a/encoder/encoder.c b/encoder/encoder.c +index 8f1ebac..b1d5f7b 100644 +--- a/encoder/encoder.c ++++ b/encoder/encoder.c +@@ -411,5 +411,6 @@ static int x264_validate_parameters( x264_t *h ) + h->param.analyse.b_fast_pskip = 0; + h->param.analyse.i_noise_reduction = 0; ++ h->param.analyse.f_psy_rd = 0; + } + if( h->param.rc.i_rc_method == X264_RC_CQP ) + { +@@ -482,10 +483,23 @@ static int x264_validate_parameters( x264_t *h ) + h->param.analyse.inter &= ~X264_ANALYSE_I8x8; + h->param.analyse.intra &= ~X264_ANALYSE_I8x8; + } +- h->param.analyse.i_chroma_qp_offset = x264_clip3(h->param.analyse.i_chroma_qp_offset, -12, 12); + if( !h->param.b_cabac ) + h->param.analyse.i_trellis = 0; + h->param.analyse.i_trellis = x264_clip3( h->param.analyse.i_trellis, 0, 2 ); ++ h->param.analyse.f_psy_rd = x264_clip3f( h->param.analyse.f_psy_rd, 0, 10 ); ++ if( h->param.analyse.i_subpel_refine < 6) ++ h->param.analyse.f_psy_rd = 0; ++ if( h->param.analyse.f_psy_rd ) ++ { ++ h->param.analyse.i_psy_rd = FIX8( h->param.analyse.f_psy_rd ); ++ /* Psy RDO increases overall quantizers to improve the quality of luma--this indirectly hurts chroma quality */ ++ /* so we lower the chroma QP offset to compensate */ ++ h->param.analyse.i_chroma_qp_offset -= h->param.analyse.f_psy_rd < 0.25 ? 1 : 2; ++ /* Psy trellis has a similar effect. */ ++ if( h->param.analyse.i_trellis ) ++ h->param.analyse.i_chroma_qp_offset -= 2; ++ } ++ h->param.analyse.i_chroma_qp_offset = x264_clip3(h->param.analyse.i_chroma_qp_offset, -12, 12); + h->param.rc.i_aq_mode = x264_clip3( h->param.rc.i_aq_mode, 0, 2 ); + if( h->param.rc.f_aq_strength <= 0 ) + h->param.rc.i_aq_mode = 0; +diff --git a/encoder/macroblock.c b/encoder/macroblock.c +index 788a8ea..b429c16 100644 +--- a/encoder/macroblock.c ++++ b/encoder/macroblock.c +@@ -94,7 +94,7 @@ void x264_mb_encode_i4x4( x264_t *h, int idx, int i_qscale ) + h->dctf.sub4x4_dct( dct4x4, p_src, p_dst ); + + if( h->mb.b_trellis ) +- x264_quant_4x4_trellis( h, dct4x4, CQM_4IY, i_qscale, DCT_LUMA_4x4, 1 ); ++ x264_quant_4x4_trellis( h, dct4x4, CQM_4IY, i_qscale, DCT_LUMA_4x4, 1, idx ); + else + h->quantf.quant_4x4( dct4x4, h->quant4_mf[CQM_4IY][i_qscale], h->quant4_bias[CQM_4IY][i_qscale] ); + +@@ -121,7 +121,7 @@ void x264_mb_encode_i8x8( x264_t *h, int idx, int i_qscale ) + h->dctf.sub8x8_dct8( dct8x8, p_src, p_dst ); + + if( h->mb.b_trellis ) +- x264_quant_8x8_trellis( h, dct8x8, CQM_8IY, i_qscale, 1 ); ++ x264_quant_8x8_trellis( h, dct8x8, CQM_8IY, i_qscale, 1, idx ); + else + h->quantf.quant_8x8( dct8x8, h->quant8_mf[CQM_8IY][i_qscale], h->quant8_bias[CQM_8IY][i_qscale] ); + +@@ -163,7 +163,7 @@ static void x264_mb_encode_i16x16( x264_t *h, int i_qscale ) + + /* quant/scan/dequant */ + if( h->mb.b_trellis ) +- x264_quant_4x4_trellis( h, dct4x4[i], CQM_4IY, i_qscale, DCT_LUMA_AC, 1 ); ++ x264_quant_4x4_trellis( h, dct4x4[i], CQM_4IY, i_qscale, DCT_LUMA_AC, 1, i ); + else + h->quantf.quant_4x4( dct4x4[i], h->quant4_mf[CQM_4IY][i_qscale], h->quant4_bias[CQM_4IY][i_qscale] ); + +@@ -447,7 +447,7 @@ void x264_macroblock_encode( x264_t *h ) + if( h->mb.b_noise_reduction ) + h->quantf.denoise_dct_core( *dct8x8[idx], h->nr_residual_sum[1], h->nr_offset[1], 64 ); + if( h->mb.b_trellis ) +- x264_quant_8x8_trellis( h, dct8x8[idx], CQM_8PY, i_qp, 0 ); ++ x264_quant_8x8_trellis( h, dct8x8[idx], CQM_8PY, i_qp, 0, idx ); + else + h->quantf.quant_8x8( dct8x8[idx], h->quant8_mf[CQM_8PY][i_qp], h->quant8_bias[CQM_8PY][i_qp] ); + +@@ -495,7 +495,7 @@ void x264_macroblock_encode( x264_t *h ) + if( h->mb.b_noise_reduction ) + h->quantf.denoise_dct_core( *dct4x4[idx], h->nr_residual_sum[0], h->nr_offset[0], 16 ); + if( h->mb.b_trellis ) +- x264_quant_4x4_trellis( h, dct4x4[idx], CQM_4PY, i_qp, DCT_LUMA_4x4, 0 ); ++ x264_quant_4x4_trellis( h, dct4x4[idx], CQM_4PY, i_qp, DCT_LUMA_4x4, 0, idx ); + else + h->quantf.quant_4x4( dct4x4[idx], h->quant4_mf[CQM_4PY][i_qp], h->quant4_bias[CQM_4PY][i_qp] ); + +diff --git a/encoder/macroblock.h b/encoder/macroblock.h +index 49d13a2..eb97d44 100644 +--- a/encoder/macroblock.h ++++ b/encoder/macroblock.h +@@ -50,9 +50,9 @@ void x264_mb_encode_8x8_chroma( x264_t *h, int b_inter, int i_qscale ); + void x264_cabac_mb_skip( x264_t *h, int b_skip ); + + void x264_quant_4x4_trellis( x264_t *h, int16_t dct[4][4], int i_quant_cat, +- int i_qp, int i_ctxBlockCat, int b_intra ); ++ int i_qp, int i_ctxBlockCat, int b_intra, int idx ); + void x264_quant_8x8_trellis( x264_t *h, int16_t dct[8][8], int i_quant_cat, +- int i_qp, int b_intra ); ++ int i_qp, int b_intra, int idx ); + + void x264_noise_reduction_update( x264_t *h ); + +diff --git a/encoder/rdo.c b/encoder/rdo.c +index 76bf57b..5b23e18 100644 +--- a/encoder/rdo.c ++++ b/encoder/rdo.c +@@ -50,21 +50,82 @@ static uint16_t cabac_prefix_size[15][128]; + + #define COPY_CABAC h->mc.memcpy_aligned( &cabac_tmp.f8_bits_encoded, &h->cabac.f8_bits_encoded, \ + sizeof(x264_cabac_t) - offsetof(x264_cabac_t,f8_bits_encoded) ) +- +-static int ssd_mb( x264_t *h ) ++ ++#define ADD_ABS_SATD(satdtype, pixel)\ ++ satd += abs((h->pixf.satdtype[pixel]( zero, 0, fdec, FDEC_STRIDE ) - dc_coef)\ ++ - sum_##satdtype( h, pixel, x, y )); ++ ++/* Sum the cached SATDs to avoid repeating them. */ ++static inline int sum_satd( x264_t *h, int pixel, int x, int y ) ++{ ++ int satd = 0; ++ int min_x = x>>2; ++ int min_y = y>>2; ++ int max_x = (x>>2) + (x264_pixel_size[pixel].w>>2); ++ int max_y = (y>>2) + (x264_pixel_size[pixel].h>>2); ++ if( pixel == PIXEL_16x16 ) ++ return h->mb.pic.fenc_satd_sum; ++ for( y = min_y; y < max_y; y++ ) ++ for( x = min_x; x < max_x; x++ ) ++ satd += h->mb.pic.fenc_satd[y][x]; ++ return satd; ++} ++ ++static inline int sum_sa8d( x264_t *h, int pixel, int x, int y ) ++{ ++ int sa8d = 0; ++ int min_x = x>>3; ++ int min_y = y>>3; ++ int max_x = (x>>3) + (x264_pixel_size[pixel].w>>3); ++ int max_y = (y>>3) + (x264_pixel_size[pixel].h>>3); ++ if( pixel == PIXEL_16x16 ) ++ return h->mb.pic.fenc_sa8d_sum; ++ for( y = min_y; y < max_y; y++ ) ++ for( x = min_x; x < max_x; x++ ) ++ sa8d += h->mb.pic.fenc_sa8d[y][x]; ++ return sa8d; ++} ++ ++/* Psy RD distortion metric: SSD plus "Absolute Difference of Complexities" */ ++/* SATD and SA8D are used to measure block complexity. */ ++/* Blocks with a complexity most similar to that of the source are scored best. */ ++/* The difference between SATD and SA8D scores are both used to avoid bias from the DCT size. Using SATD */ ++/* only, for example, results in overusage of 8x8dct, while the opposite occurs when using SA8D. */ ++/* This is because frequencies stored in an 8x8dct sum up to a larger value when viewed through a 4x4 */ ++/* transform and vice versa with a 4x4dct and an 8x8 transform. */ ++/* SSD is still used as the primary RD metric; this value is merely added to it for psy purposes. */ ++ ++/* FIXME: Is there a better metric than averaged SATD/SA8D difference for complexity difference? */ ++/* Hadamard transform is recursive, so a SATD+SA8D can be done faster by taking advantage of this fact. */ ++/* This optimization can also be used in non-RD transform decision. */ ++ ++static inline int ssd_plane( x264_t *h, int size, int p, int x, int y ) + { +- return h->pixf.ssd[PIXEL_16x16]( h->mb.pic.p_fenc[0], FENC_STRIDE, +- h->mb.pic.p_fdec[0], FDEC_STRIDE ) +- + h->pixf.ssd[PIXEL_8x8]( h->mb.pic.p_fenc[1], FENC_STRIDE, +- h->mb.pic.p_fdec[1], FDEC_STRIDE ) +- + h->pixf.ssd[PIXEL_8x8]( h->mb.pic.p_fenc[2], FENC_STRIDE, +- h->mb.pic.p_fdec[2], FDEC_STRIDE ); ++ DECLARE_ALIGNED_16(uint8_t zero[16]) = {0}; ++ int satd = 0; ++ uint8_t *fdec = h->mb.pic.p_fdec[p] + x + y*FDEC_STRIDE; ++ uint8_t *fenc = h->mb.pic.p_fenc[p] + x + y*FENC_STRIDE; ++ if( p == 0 && h->param.analyse.i_psy_rd ) ++ { ++ int dc_coef = h->pixf.sad[size](zero, 0, fdec, FDEC_STRIDE) >> 1; ++ ADD_ABS_SATD(satd, size); ++ /* If the plane is smaller than 8x8, we can't do an SA8D; this probably isn't a big problem. */ ++ if(size <= PIXEL_8x8) ++ { ++ dc_coef >>= 1; ++ ADD_ABS_SATD(sa8d, size); ++ satd >>= 1; ++ } ++ satd = (satd * h->param.analyse.i_psy_rd * x264_lambda_tab[h->mb.i_qp] + 128) >> 8; ++ } ++ return h->pixf.ssd[size](fenc, FENC_STRIDE, fdec, FDEC_STRIDE) + satd; + } + +-static int ssd_plane( x264_t *h, int size, int p, int x, int y ) ++static inline int ssd_mb( x264_t *h ) + { +- return h->pixf.ssd[size]( h->mb.pic.p_fenc[p] + x+y*FENC_STRIDE, FENC_STRIDE, +- h->mb.pic.p_fdec[p] + x+y*FDEC_STRIDE, FDEC_STRIDE ); ++ return ssd_plane(h, PIXEL_16x16, 0, 0, 0) ++ + ssd_plane(h, PIXEL_8x8, 1, 0, 0) ++ + ssd_plane(h, PIXEL_8x8, 2, 0, 0); + } + + static int x264_rd_cost_mb( x264_t *h, int i_lambda2 ) +@@ -267,7 +328,7 @@ static const int lambda2_tab[2][52] = { + }; + + typedef struct { +- uint64_t score; ++ int64_t score; + int level_idx; // index into level_tree[] + uint8_t cabac_state[10]; //just the contexts relevant to coding abs_level_m1 + } trellis_node_t; +@@ -296,7 +357,7 @@ typedef struct { + static inline void quant_trellis_cabac( x264_t *h, int16_t *dct, + const uint16_t *quant_mf, const int *unquant_mf, + const int *coef_weight, const uint8_t *zigzag, +- int i_ctxBlockCat, int i_lambda2, int b_ac, int i_coefs ) ++ int i_ctxBlockCat, int i_lambda2, int b_ac, int i_coefs, int idx ) + { + int abs_coefs[64], signs[64]; + trellis_node_t nodes[2][8]; +@@ -428,8 +489,19 @@ static inline void quant_trellis_cabac( x264_t *h, int16_t *dct, + // that are better left coded, especially at QP > 40. + for( abs_level = q; abs_level >= q-1; abs_level-- ) + { +- int d = i_coef - ((unquant_mf[zigzag[i]] * abs_level + 128) >> 8); +- uint64_t ssd = (int64_t)d*d * coef_weight[i]; ++ int unquant_abs_level = ((unquant_mf[zigzag[i]] * abs_level + 128) >> 8); ++ int d = i_coef - unquant_abs_level; ++ int64_t ssd; ++ if( h->param.analyse.i_psy_rd && i != 0 ) ++ { ++ int orig_coef = (i_coefs == 64) ? h->mb.pic.fenc_dct8[idx][i] : h->mb.pic.fenc_dct4[idx][i]; ++ int predicted_coef = abs(orig_coef - i_coef * signs[i] ); ++ int psy_value = h->param.analyse.i_psy_rd * abs(predicted_coef + unquant_abs_level * signs[i]); ++ int psy_weight = (i_coefs == 64) ? x264_dct8_weight_tab[zigzag[i]] : x264_dct4_weight_tab[zigzag[i]]; ++ ssd = (int64_t)d*d * coef_weight[i] - psy_weight * (psy_value>>2); ++ } ++ else ++ ssd = (int64_t)d*d * coef_weight[i]; + + for( j = 0; j < 8; j++ ) + { +@@ -493,24 +565,24 @@ static inline void quant_trellis_cabac( x264_t *h, int16_t *dct, + + + void x264_quant_4x4_trellis( x264_t *h, int16_t dct[4][4], int i_quant_cat, +- int i_qp, int i_ctxBlockCat, int b_intra ) ++ int i_qp, int i_ctxBlockCat, int b_intra, int idx ) + { + int b_ac = (i_ctxBlockCat == DCT_LUMA_AC); + quant_trellis_cabac( h, (int16_t*)dct, + h->quant4_mf[i_quant_cat][i_qp], h->unquant4_mf[i_quant_cat][i_qp], + x264_dct4_weight2_zigzag[h->mb.b_interlaced], + x264_zigzag_scan4[h->mb.b_interlaced], +- i_ctxBlockCat, lambda2_tab[b_intra][i_qp], b_ac, 16 ); ++ i_ctxBlockCat, lambda2_tab[b_intra][h->mb.i_qp], b_ac, 16, idx ); + } + + + void x264_quant_8x8_trellis( x264_t *h, int16_t dct[8][8], int i_quant_cat, +- int i_qp, int b_intra ) ++ int i_qp, int b_intra, int idx ) + { + quant_trellis_cabac( h, (int16_t*)dct, + h->quant8_mf[i_quant_cat][i_qp], h->unquant8_mf[i_quant_cat][i_qp], + x264_dct8_weight2_zigzag[h->mb.b_interlaced], + x264_zigzag_scan8[h->mb.b_interlaced], +- DCT_LUMA_8x8, lambda2_tab[b_intra][i_qp], 0, 64 ); ++ DCT_LUMA_8x8, lambda2_tab[b_intra][h->mb.i_qp], 0, 64, idx ); + } + +diff --git a/x264.c b/x264.c +index 14466e5..504ca12 100644 +--- a/x264.c ++++ b/x264.c +@@ -243,6 +243,9 @@ static void Help( x264_param_t *defaults, int b_longhelp ) + H0( " -m, --subme Subpixel motion estimation and partition\n" + " decision quality: 1=fast, 7=best. [%d]\n", defaults->analyse.i_subpel_refine ); + H0( " --b-rdo RD based mode decision for B-frames. Requires subme 6.\n" ); ++ H0( " --psy-rd Strength of mode decision psychovisual optimization [\"%.1f\"]\n" ++ " Does nothing at subme < 6.\n", ++ defaults->analyse.f_psy_rd ); + H0( " --mixed-refs Decide references on a per partition basis\n" ); + H1( " --no-chroma-me Ignore chroma in motion estimation\n" ); + H1( " --bime Jointly optimize both MVs in B-frames\n" ); +@@ -411,6 +414,7 @@ static int Parse( int argc, char **argv, + { "mvrange", required_argument, NULL, 0 }, + { "mvrange-thread", required_argument, NULL, 0 }, + { "subme", required_argument, NULL, 'm' }, ++ { "psy-rd", required_argument, NULL, 0 }, + { "b-rdo", no_argument, NULL, 0 }, + { "mixed-refs", no_argument, NULL, 0 }, + { "no-chroma-me", no_argument, NULL, 0 }, +diff --git a/x264.h b/x264.h +index 3b678dc..02266c1 100644 +--- a/x264.h ++++ b/x264.h +@@ -239,6 +239,8 @@ typedef struct x264_param_t + int b_fast_pskip; /* early SKIP detection on P-frames */ + int b_dct_decimate; /* transform coefficient thresholding on P-frames */ + int i_noise_reduction; /* adaptive pseudo-deadzone */ ++ float f_psy_rd; /* Psy RD strength */ ++ int i_psy_rd; /* Psy RD strength--fixed point value*/ + + /* the deadzone size that will be used in luma quantization */ + int i_luma_deadzone[2]; /* {inter, intra} */ diff --git a/media-libs/x264/files/x264-psyrdo-0.5.diff b/media-libs/x264/files/x264-psyrdo-0.5.diff new file mode 100644 index 0000000..d743fff --- /dev/null +++ b/media-libs/x264/files/x264-psyrdo-0.5.diff @@ -0,0 +1,298 @@ +diff --git a/common/common.c b/common/common.c +index 71a29b1..301b9ed 100644 +--- a/common/common.c ++++ b/common/common.c +@@ -117,6 +117,7 @@ void x264_param_default( x264_param_t *param ) + | X264_ANALYSE_PSUB16x16 | X264_ANALYSE_BSUB16x16; + param->analyse.i_direct_mv_pred = X264_DIRECT_PRED_SPATIAL; + param->analyse.i_me_method = X264_ME_HEX; ++ param->analyse.f_psy_rd = 1.0; + param->analyse.i_me_range = 16; + param->analyse.i_subpel_refine = 5; + param->analyse.b_chroma_me = 1; +@@ -464,6 +465,8 @@ int x264_param_parse( x264_param_t *p, const char *name, const char *value ) + p->analyse.i_mv_range_thread = atoi(value); + OPT2("subme", "subq") + p->analyse.i_subpel_refine = atoi(value); ++ OPT("psy-rd") ++ p->analyse.f_psy_rd = atof(value); + OPT("bime") + p->analyse.b_bidir_me = atobool(value); + OPT("chroma-me") +@@ -856,6 +859,7 @@ char *x264_param2string( x264_param_t *p, int b_res ) + s += sprintf( s, " analyse=%#x:%#x", p->analyse.intra, p->analyse.inter ); + s += sprintf( s, " me=%s", x264_motion_est_names[ p->analyse.i_me_method ] ); + s += sprintf( s, " subme=%d", p->analyse.i_subpel_refine ); ++ s += sprintf( s, " psy_rd=%f", p->analyse.f_psy_rd ); + s += sprintf( s, " brdo=%d", p->analyse.b_bframe_rdo ); + s += sprintf( s, " mixed_ref=%d", p->analyse.b_mixed_references ); + s += sprintf( s, " me_range=%d", p->analyse.i_me_range ); +diff --git a/common/common.h b/common/common.h +index e2792cc..fbd88fd 100644 +--- a/common/common.h ++++ b/common/common.h +@@ -454,6 +454,12 @@ struct x264_t + DECLARE_ALIGNED_16( int16_t i8x8_dct_buf[3][64] ); + DECLARE_ALIGNED_16( int16_t i4x4_dct_buf[15][16] ); + ++ /* SATD scores for psy RD */ ++ int fenc_satd[4][4]; ++ int fenc_satd_sum; ++ int fenc_sa8d[2][2]; ++ int fenc_sa8d_sum; ++ + /* pointer over mb of the frame to be compressed */ + uint8_t *p_fenc[3]; + +diff --git a/encoder/analyse.c b/encoder/analyse.c +index 270b90a..25346b4 100644 +--- a/encoder/analyse.c ++++ b/encoder/analyse.c +@@ -467,6 +467,34 @@ static void predict_4x4_mode_available( unsigned int i_neighbour, + } + } + ++/* Pre-calculate fenc satd scores for psy RD, minus DC coefficients */ ++static inline void x264_mb_cache_fenc_satd( x264_t *h ) ++{ ++ DECLARE_ALIGNED_16(uint8_t zero[16]) = {0}; ++ uint8_t *fenc; ++ int x, y, satd_sum = 0, sa8d_sum = 0; ++ if( !h->param.analyse.i_psy_rd) ++ return; ++ for( y = 0; y < 4; y++ ) ++ for( x = 0; x < 4; x++ ) ++ { ++ fenc = h->mb.pic.p_fenc[0]+x*4+y*4*FENC_STRIDE; ++ h->mb.pic.fenc_satd[y][x] = h->pixf.satd[PIXEL_4x4]( zero, 0, fenc, FENC_STRIDE ) ++ - (h->pixf.sad[PIXEL_4x4]( zero, 0, fenc, FENC_STRIDE )>>1); ++ satd_sum += h->mb.pic.fenc_satd[y][x]; ++ } ++ for( y = 0; y < 2; y++ ) ++ for( x = 0; x < 2; x++ ) ++ { ++ fenc = h->mb.pic.p_fenc[0]+x*8+y*8*FENC_STRIDE; ++ h->mb.pic.fenc_sa8d[y][x] = h->pixf.sa8d[PIXEL_8x8]( zero, 0, fenc, FENC_STRIDE ) ++ - (h->pixf.sad[PIXEL_8x8]( zero, 0, fenc, FENC_STRIDE )>>2); ++ sa8d_sum += h->mb.pic.fenc_sa8d[y][x]; ++ } ++ h->mb.pic.fenc_satd_sum = satd_sum; ++ h->mb.pic.fenc_sa8d_sum = sa8d_sum; ++} ++ + static void x264_mb_analyse_intra_chroma( x264_t *h, x264_mb_analysis_t *a ) + { + int i; +@@ -1016,12 +1044,15 @@ static void x264_mb_analyse_inter_p16x16( x264_t *h, x264_mb_analysis_t *a ) + assert( a->l0.me16x16.mv[1] <= h->mb.mv_max_spel[1] || h->param.i_threads == 1 ); + + h->mb.i_type = P_L0; +- if( a->b_mbrd && a->l0.me16x16.i_ref == 0 +- && *(uint32_t*)a->l0.me16x16.mv == *(uint32_t*)h->mb.cache.pskip_mv ) ++ if( a->b_mbrd ) + { +- h->mb.i_partition = D_16x16; +- x264_macroblock_cache_mv_ptr( h, 0, 0, 4, 4, 0, a->l0.me16x16.mv ); +- a->l0.i_rd16x16 = x264_rd_cost_mb( h, a->i_lambda2 ); ++ x264_mb_cache_fenc_satd( h ); ++ if( a->l0.me16x16.i_ref == 0 && *(uint32_t*)a->l0.me16x16.mv == *(uint32_t*)h->mb.cache.pskip_mv ) ++ { ++ h->mb.i_partition = D_16x16; ++ x264_macroblock_cache_mv_ptr( h, 0, 0, 4, 4, 0, a->l0.me16x16.mv ); ++ a->l0.i_rd16x16 = x264_rd_cost_mb( h, a->i_lambda2 ); ++ } + } + } + +@@ -1906,7 +1937,7 @@ static void x264_mb_analyse_p_rd( x264_t *h, x264_mb_analysis_t *a, int i_satd ) + + static void x264_mb_analyse_b_rd( x264_t *h, x264_mb_analysis_t *a, int i_satd_inter ) + { +- int thresh = i_satd_inter * 17/16; ++ int thresh = i_satd_inter * (17 + (!!h->param.analyse.i_psy_rd))/16; + + if( a->b_direct_available && a->i_rd16x16direct == COST_MAX ) + { +@@ -2067,7 +2098,10 @@ void x264_macroblock_analyse( x264_t *h ) + { + x264_mb_analyse_intra( h, &analysis, COST_MAX ); + if( analysis.b_mbrd ) ++ { ++ x264_mb_cache_fenc_satd( h ); + x264_intra_rd( h, &analysis, COST_MAX ); ++ } + + i_cost = analysis.i_satd_i16x16; + h->mb.i_type = I_16x16; +@@ -2342,6 +2376,9 @@ void x264_macroblock_analyse( x264_t *h ) + { + int i_bskip_cost = COST_MAX; + int b_skip = 0; ++ ++ if( analysis.b_mbrd ) ++ x264_mb_cache_fenc_satd( h ); + + h->mb.i_type = B_SKIP; + if( h->mb.b_direct_auto_write ) +diff --git a/encoder/encoder.c b/encoder/encoder.c +index 2c2fe8c..ff5febe 100644 +--- a/encoder/encoder.c ++++ b/encoder/encoder.c +@@ -411,6 +411,7 @@ static int x264_validate_parameters( x264_t *h ) + h->param.analyse.b_fast_pskip = 0; + h->param.analyse.i_noise_reduction = 0; + h->param.analyse.i_subpel_refine = x264_clip3( h->param.analyse.i_subpel_refine, 1, 6 ); ++ h->param.analyse.f_psy_rd = 0; + } + if( h->param.rc.i_rc_method == X264_RC_CQP ) + { +@@ -486,6 +487,16 @@ static int x264_validate_parameters( x264_t *h ) + if( !h->param.b_cabac ) + h->param.analyse.i_trellis = 0; + h->param.analyse.i_trellis = x264_clip3( h->param.analyse.i_trellis, 0, 2 ); ++ h->param.analyse.f_psy_rd = x264_clip3f( h->param.analyse.f_psy_rd, 0, 10 ); ++ if( h->param.analyse.i_subpel_refine < 6) ++ h->param.analyse.f_psy_rd = 0; ++ if( h->param.analyse.f_psy_rd && h->param.analyse.i_trellis == 1 ) ++ { ++ x264_log( h, X264_LOG_WARNING, "psy RD is not compatible with trellis=1; use 0 or 2.\n" ); ++ h->param.analyse.i_trellis = 0; ++ } ++ if( h->param.analyse.f_psy_rd ) ++ h->param.analyse.i_psy_rd = FIX8( h->param.analyse.f_psy_rd ); + h->param.rc.i_aq_mode = x264_clip3( h->param.rc.i_aq_mode, 0, 2 ); + if( h->param.rc.f_aq_strength <= 0 ) + h->param.rc.i_aq_mode = 0; +diff --git a/encoder/rdo.c b/encoder/rdo.c +index 76bf57b..7da862a 100644 +--- a/encoder/rdo.c ++++ b/encoder/rdo.c +@@ -50,21 +50,82 @@ static uint16_t cabac_prefix_size[15][128]; + + #define COPY_CABAC h->mc.memcpy_aligned( &cabac_tmp.f8_bits_encoded, &h->cabac.f8_bits_encoded, \ + sizeof(x264_cabac_t) - offsetof(x264_cabac_t,f8_bits_encoded) ) +- +-static int ssd_mb( x264_t *h ) ++ ++#define ADD_ABS_SATD(satdtype, pixel)\ ++ satd += abs((h->pixf.satdtype[pixel]( zero, 0, fdec, FDEC_STRIDE ) - dc_coef)\ ++ - sum_##satdtype( h, pixel, x, y )); ++ ++/* Sum the cached SATDs to avoid repeating them. */ ++static inline int sum_satd( x264_t *h, int pixel, int x, int y ) ++{ ++ int satd = 0; ++ int min_x = x>>2; ++ int min_y = y>>2; ++ int max_x = (x>>2) + (x264_pixel_size[pixel].w>>2); ++ int max_y = (y>>2) + (x264_pixel_size[pixel].h>>2); ++ if( pixel == PIXEL_16x16 ) ++ return h->mb.pic.fenc_satd_sum; ++ for( y = min_y; y < max_y; y++ ) ++ for( x = min_x; x < max_x; x++ ) ++ satd += h->mb.pic.fenc_satd[y][x]; ++ return satd; ++} ++ ++static inline int sum_sa8d( x264_t *h, int pixel, int x, int y ) ++{ ++ int sa8d = 0; ++ int min_x = x>>3; ++ int min_y = y>>3; ++ int max_x = (x>>3) + (x264_pixel_size[pixel].w>>3); ++ int max_y = (y>>3) + (x264_pixel_size[pixel].h>>3); ++ if( pixel == PIXEL_16x16 ) ++ return h->mb.pic.fenc_sa8d_sum; ++ for( y = min_y; y < max_y; y++ ) ++ for( x = min_x; x < max_x; x++ ) ++ sa8d += h->mb.pic.fenc_sa8d[y][x]; ++ return sa8d; ++} ++ ++/* Psy RD distortion metric: SSD plus "Absolute Difference of Complexities" */ ++/* SATD and SA8D are used to measure block complexity. */ ++/* Blocks with a complexity most similar to that of the source are scored best. */ ++/* The difference between SATD and SA8D scores are both used to avoid bias from the DCT size. Using SATD */ ++/* only, for example, results in overusage of 8x8dct, while the opposite occurs when using SA8D. */ ++/* This is because frequencies stored in an 8x8dct sum up to a larger value when viewed through a 4x4 */ ++/* transform and vice versa with a 4x4dct and an 8x8 transform. */ ++/* SSD is still used as the primary RD metric; this value is merely added to it for psy purposes. */ ++ ++/* FIXME: Is there a better metric than averaged SATD/SA8D difference for complexity difference? */ ++/* Hadamard transform is recursive, so a SATD+SA8D can be done faster by taking advantage of this fact. */ ++/* This optimization can also be used in non-RD transform decision. */ ++ ++static inline int ssd_plane( x264_t *h, int size, int p, int x, int y ) + { +- return h->pixf.ssd[PIXEL_16x16]( h->mb.pic.p_fenc[0], FENC_STRIDE, +- h->mb.pic.p_fdec[0], FDEC_STRIDE ) +- + h->pixf.ssd[PIXEL_8x8]( h->mb.pic.p_fenc[1], FENC_STRIDE, +- h->mb.pic.p_fdec[1], FDEC_STRIDE ) +- + h->pixf.ssd[PIXEL_8x8]( h->mb.pic.p_fenc[2], FENC_STRIDE, +- h->mb.pic.p_fdec[2], FDEC_STRIDE ); ++ DECLARE_ALIGNED_16(uint8_t zero[16]) = {0}; ++ int satd = 0; ++ uint8_t *fdec = h->mb.pic.p_fdec[p] + x + y*FDEC_STRIDE; ++ uint8_t *fenc = h->mb.pic.p_fenc[p] + x + y*FENC_STRIDE; ++ if( p == 0 && h->param.analyse.i_psy_rd ) ++ { ++ int dc_coef = h->pixf.sad[size](zero, 0, fdec, FDEC_STRIDE) >> 1; ++ ADD_ABS_SATD(satd, size); ++ /* If the plane is smaller than 8x8, we can't do an SA8D; this probably isn't a big problem. */ ++ if(size <= PIXEL_8x8) ++ { ++ dc_coef >>= 1; ++ ADD_ABS_SATD(sa8d, size); ++ satd >>= 1; ++ } ++ satd = (satd * h->param.analyse.i_psy_rd * x264_lambda_tab[h->mb.i_qp] + 128) >> 8; ++ } ++ return h->pixf.ssd[size](fenc, FENC_STRIDE, fdec, FDEC_STRIDE) + satd; + } + +-static int ssd_plane( x264_t *h, int size, int p, int x, int y ) ++static inline int ssd_mb( x264_t *h ) + { +- return h->pixf.ssd[size]( h->mb.pic.p_fenc[p] + x+y*FENC_STRIDE, FENC_STRIDE, +- h->mb.pic.p_fdec[p] + x+y*FDEC_STRIDE, FDEC_STRIDE ); ++ return ssd_plane(h, PIXEL_16x16, 0, 0, 0) ++ + ssd_plane(h, PIXEL_8x8, 1, 0, 0) ++ + ssd_plane(h, PIXEL_8x8, 2, 0, 0); + } + + static int x264_rd_cost_mb( x264_t *h, int i_lambda2 ) +diff --git a/x264.c b/x264.c +index 14466e5..96326cd 100644 +--- a/x264.c ++++ b/x264.c +@@ -243,6 +243,9 @@ static void Help( x264_param_t *defaults, int b_longhelp ) + H0( " -m, --subme Subpixel motion estimation and partition\n" + " decision quality: 1=fast, 7=best. [%d]\n", defaults->analyse.i_subpel_refine ); + H0( " --b-rdo RD based mode decision for B-frames. Requires subme 6.\n" ); ++ H0( " --psy-rd Strength of mode decision psychovisual optimization [\"%f\"]\n" ++ " Does nothing at subme < 6.", ++ defaults->analyse.f_psy_rd ); + H0( " --mixed-refs Decide references on a per partition basis\n" ); + H1( " --no-chroma-me Ignore chroma in motion estimation\n" ); + H1( " --bime Jointly optimize both MVs in B-frames\n" ); +@@ -411,6 +414,7 @@ static int Parse( int argc, char **argv, + { "mvrange", required_argument, NULL, 0 }, + { "mvrange-thread", required_argument, NULL, 0 }, + { "subme", required_argument, NULL, 'm' }, ++ { "psy-rd", required_argument, NULL, 0 }, + { "b-rdo", no_argument, NULL, 0 }, + { "mixed-refs", no_argument, NULL, 0 }, + { "no-chroma-me", no_argument, NULL, 0 }, +diff --git a/x264.h b/x264.h +index 3b678dc..02266c1 100644 +--- a/x264.h ++++ b/x264.h +@@ -239,6 +239,8 @@ typedef struct x264_param_t + int b_fast_pskip; /* early SKIP detection on P-frames */ + int b_dct_decimate; /* transform coefficient thresholding on P-frames */ + int i_noise_reduction; /* adaptive pseudo-deadzone */ ++ float f_psy_rd; /* Psy RD strength */ ++ int i_psy_rd; /* Psy RD strength--fixed point value*/ + + /* the deadzone size that will be used in luma quantization */ + int i_luma_deadzone[2]; /* {inter, intra} */ diff --git a/media-libs/x264/files/x264-psyrdo-0.6.diff b/media-libs/x264/files/x264-psyrdo-0.6.diff new file mode 100644 index 0000000..4b487ac --- /dev/null +++ b/media-libs/x264/files/x264-psyrdo-0.6.diff @@ -0,0 +1,297 @@ +diff --git a/common/common.c b/common/common.c +index 71a29b1..301b9ed 100644 +--- a/common/common.c ++++ b/common/common.c +@@ -117,6 +117,7 @@ void x264_param_default( x264_param_t *param ) + | X264_ANALYSE_PSUB16x16 | X264_ANALYSE_BSUB16x16; + param->analyse.i_direct_mv_pred = X264_DIRECT_PRED_SPATIAL; + param->analyse.i_me_method = X264_ME_HEX; ++ param->analyse.f_psy_rd = 1.0; + param->analyse.i_me_range = 16; + param->analyse.i_subpel_refine = 5; + param->analyse.b_chroma_me = 1; +@@ -464,6 +465,8 @@ int x264_param_parse( x264_param_t *p, const char *name, const char *value ) + p->analyse.i_mv_range_thread = atoi(value); + OPT2("subme", "subq") + p->analyse.i_subpel_refine = atoi(value); ++ OPT("psy-rd") ++ p->analyse.f_psy_rd = atof(value); + OPT("bime") + p->analyse.b_bidir_me = atobool(value); + OPT("chroma-me") +@@ -856,6 +859,7 @@ char *x264_param2string( x264_param_t *p, int b_res ) + s += sprintf( s, " analyse=%#x:%#x", p->analyse.intra, p->analyse.inter ); + s += sprintf( s, " me=%s", x264_motion_est_names[ p->analyse.i_me_method ] ); + s += sprintf( s, " subme=%d", p->analyse.i_subpel_refine ); ++ s += sprintf( s, " psy_rd=%f", p->analyse.f_psy_rd ); + s += sprintf( s, " brdo=%d", p->analyse.b_bframe_rdo ); + s += sprintf( s, " mixed_ref=%d", p->analyse.b_mixed_references ); + s += sprintf( s, " me_range=%d", p->analyse.i_me_range ); +diff --git a/common/common.h b/common/common.h +index e2792cc..fbd88fd 100644 +--- a/common/common.h ++++ b/common/common.h +@@ -454,6 +454,12 @@ struct x264_t + DECLARE_ALIGNED_16( int16_t i8x8_dct_buf[3][64] ); + DECLARE_ALIGNED_16( int16_t i4x4_dct_buf[15][16] ); + ++ /* SATD scores for psy RD */ ++ int fenc_satd[4][4]; ++ int fenc_satd_sum; ++ int fenc_sa8d[2][2]; ++ int fenc_sa8d_sum; ++ + /* pointer over mb of the frame to be compressed */ + uint8_t *p_fenc[3]; + +diff --git a/encoder/analyse.c b/encoder/analyse.c +index 270b90a..25346b4 100644 +--- a/encoder/analyse.c ++++ b/encoder/analyse.c +@@ -467,6 +467,34 @@ static void predict_4x4_mode_available( unsigned int i_neighbour, + } + } + ++/* Pre-calculate fenc satd scores for psy RD, minus DC coefficients */ ++static inline void x264_mb_cache_fenc_satd( x264_t *h ) ++{ ++ DECLARE_ALIGNED_16(uint8_t zero[16]) = {0}; ++ uint8_t *fenc; ++ int x, y, satd_sum = 0, sa8d_sum = 0; ++ if( !h->param.analyse.i_psy_rd) ++ return; ++ for( y = 0; y < 4; y++ ) ++ for( x = 0; x < 4; x++ ) ++ { ++ fenc = h->mb.pic.p_fenc[0]+x*4+y*4*FENC_STRIDE; ++ h->mb.pic.fenc_satd[y][x] = h->pixf.satd[PIXEL_4x4]( zero, 0, fenc, FENC_STRIDE ) ++ - (h->pixf.sad[PIXEL_4x4]( zero, 0, fenc, FENC_STRIDE )>>1); ++ satd_sum += h->mb.pic.fenc_satd[y][x]; ++ } ++ for( y = 0; y < 2; y++ ) ++ for( x = 0; x < 2; x++ ) ++ { ++ fenc = h->mb.pic.p_fenc[0]+x*8+y*8*FENC_STRIDE; ++ h->mb.pic.fenc_sa8d[y][x] = h->pixf.sa8d[PIXEL_8x8]( zero, 0, fenc, FENC_STRIDE ) ++ - (h->pixf.sad[PIXEL_8x8]( zero, 0, fenc, FENC_STRIDE )>>2); ++ sa8d_sum += h->mb.pic.fenc_sa8d[y][x]; ++ } ++ h->mb.pic.fenc_satd_sum = satd_sum; ++ h->mb.pic.fenc_sa8d_sum = sa8d_sum; ++} ++ + static void x264_mb_analyse_intra_chroma( x264_t *h, x264_mb_analysis_t *a ) + { + int i; +@@ -1016,12 +1044,15 @@ static void x264_mb_analyse_inter_p16x16( x264_t *h, x264_mb_analysis_t *a ) + assert( a->l0.me16x16.mv[1] <= h->mb.mv_max_spel[1] || h->param.i_threads == 1 ); + + h->mb.i_type = P_L0; +- if( a->b_mbrd && a->l0.me16x16.i_ref == 0 +- && *(uint32_t*)a->l0.me16x16.mv == *(uint32_t*)h->mb.cache.pskip_mv ) ++ if( a->b_mbrd ) + { +- h->mb.i_partition = D_16x16; +- x264_macroblock_cache_mv_ptr( h, 0, 0, 4, 4, 0, a->l0.me16x16.mv ); +- a->l0.i_rd16x16 = x264_rd_cost_mb( h, a->i_lambda2 ); ++ x264_mb_cache_fenc_satd( h ); ++ if( a->l0.me16x16.i_ref == 0 && *(uint32_t*)a->l0.me16x16.mv == *(uint32_t*)h->mb.cache.pskip_mv ) ++ { ++ h->mb.i_partition = D_16x16; ++ x264_macroblock_cache_mv_ptr( h, 0, 0, 4, 4, 0, a->l0.me16x16.mv ); ++ a->l0.i_rd16x16 = x264_rd_cost_mb( h, a->i_lambda2 ); ++ } + } + } + +@@ -1906,7 +1937,7 @@ static void x264_mb_analyse_p_rd( x264_t *h, x264_mb_analysis_t *a, int i_satd ) + + static void x264_mb_analyse_b_rd( x264_t *h, x264_mb_analysis_t *a, int i_satd_inter ) + { +- int thresh = i_satd_inter * 17/16; ++ int thresh = i_satd_inter * (17 + (!!h->param.analyse.i_psy_rd))/16; + + if( a->b_direct_available && a->i_rd16x16direct == COST_MAX ) + { +@@ -2067,7 +2098,10 @@ void x264_macroblock_analyse( x264_t *h ) + { + x264_mb_analyse_intra( h, &analysis, COST_MAX ); + if( analysis.b_mbrd ) ++ { ++ x264_mb_cache_fenc_satd( h ); + x264_intra_rd( h, &analysis, COST_MAX ); ++ } + + i_cost = analysis.i_satd_i16x16; + h->mb.i_type = I_16x16; +@@ -2342,6 +2376,9 @@ void x264_macroblock_analyse( x264_t *h ) + { + int i_bskip_cost = COST_MAX; + int b_skip = 0; ++ ++ if( analysis.b_mbrd ) ++ x264_mb_cache_fenc_satd( h ); + + h->mb.i_type = B_SKIP; + if( h->mb.b_direct_auto_write ) +diff --git a/encoder/encoder.c b/encoder/encoder.c +index 2c2fe8c..ff5febe 100644 +--- a/encoder/encoder.c ++++ b/encoder/encoder.c +@@ -411,5 +411,6 @@ static int x264_validate_parameters( x264_t *h ) + h->param.analyse.b_fast_pskip = 0; + h->param.analyse.i_noise_reduction = 0; ++ h->param.analyse.f_psy_rd = 0; + } + if( h->param.rc.i_rc_method == X264_RC_CQP ) + { +@@ -486,6 +487,16 @@ static int x264_validate_parameters( x264_t *h ) + if( !h->param.b_cabac ) + h->param.analyse.i_trellis = 0; + h->param.analyse.i_trellis = x264_clip3( h->param.analyse.i_trellis, 0, 2 ); ++ h->param.analyse.f_psy_rd = x264_clip3f( h->param.analyse.f_psy_rd, 0, 10 ); ++ if( h->param.analyse.i_subpel_refine < 6) ++ h->param.analyse.f_psy_rd = 0; ++ if( h->param.analyse.f_psy_rd && h->param.analyse.i_trellis == 1 ) ++ { ++ x264_log( h, X264_LOG_WARNING, "psy RD is not compatible with trellis=1; use 0 or 2.\n" ); ++ h->param.analyse.i_trellis = 0; ++ } ++ if( h->param.analyse.f_psy_rd ) ++ h->param.analyse.i_psy_rd = FIX8( h->param.analyse.f_psy_rd ); + h->param.rc.i_aq_mode = x264_clip3( h->param.rc.i_aq_mode, 0, 2 ); + if( h->param.rc.f_aq_strength <= 0 ) + h->param.rc.i_aq_mode = 0; +diff --git a/encoder/rdo.c b/encoder/rdo.c +index 76bf57b..7da862a 100644 +--- a/encoder/rdo.c ++++ b/encoder/rdo.c +@@ -50,21 +50,82 @@ static uint16_t cabac_prefix_size[15][128]; + + #define COPY_CABAC h->mc.memcpy_aligned( &cabac_tmp.f8_bits_encoded, &h->cabac.f8_bits_encoded, \ + sizeof(x264_cabac_t) - offsetof(x264_cabac_t,f8_bits_encoded) ) +- +-static int ssd_mb( x264_t *h ) ++ ++#define ADD_ABS_SATD(satdtype, pixel)\ ++ satd += abs((h->pixf.satdtype[pixel]( zero, 0, fdec, FDEC_STRIDE ) - dc_coef)\ ++ - sum_##satdtype( h, pixel, x, y )); ++ ++/* Sum the cached SATDs to avoid repeating them. */ ++static inline int sum_satd( x264_t *h, int pixel, int x, int y ) ++{ ++ int satd = 0; ++ int min_x = x>>2; ++ int min_y = y>>2; ++ int max_x = (x>>2) + (x264_pixel_size[pixel].w>>2); ++ int max_y = (y>>2) + (x264_pixel_size[pixel].h>>2); ++ if( pixel == PIXEL_16x16 ) ++ return h->mb.pic.fenc_satd_sum; ++ for( y = min_y; y < max_y; y++ ) ++ for( x = min_x; x < max_x; x++ ) ++ satd += h->mb.pic.fenc_satd[y][x]; ++ return satd; ++} ++ ++static inline int sum_sa8d( x264_t *h, int pixel, int x, int y ) ++{ ++ int sa8d = 0; ++ int min_x = x>>3; ++ int min_y = y>>3; ++ int max_x = (x>>3) + (x264_pixel_size[pixel].w>>3); ++ int max_y = (y>>3) + (x264_pixel_size[pixel].h>>3); ++ if( pixel == PIXEL_16x16 ) ++ return h->mb.pic.fenc_sa8d_sum; ++ for( y = min_y; y < max_y; y++ ) ++ for( x = min_x; x < max_x; x++ ) ++ sa8d += h->mb.pic.fenc_sa8d[y][x]; ++ return sa8d; ++} ++ ++/* Psy RD distortion metric: SSD plus "Absolute Difference of Complexities" */ ++/* SATD and SA8D are used to measure block complexity. */ ++/* Blocks with a complexity most similar to that of the source are scored best. */ ++/* The difference between SATD and SA8D scores are both used to avoid bias from the DCT size. Using SATD */ ++/* only, for example, results in overusage of 8x8dct, while the opposite occurs when using SA8D. */ ++/* This is because frequencies stored in an 8x8dct sum up to a larger value when viewed through a 4x4 */ ++/* transform and vice versa with a 4x4dct and an 8x8 transform. */ ++/* SSD is still used as the primary RD metric; this value is merely added to it for psy purposes. */ ++ ++/* FIXME: Is there a better metric than averaged SATD/SA8D difference for complexity difference? */ ++/* Hadamard transform is recursive, so a SATD+SA8D can be done faster by taking advantage of this fact. */ ++/* This optimization can also be used in non-RD transform decision. */ ++ ++static inline int ssd_plane( x264_t *h, int size, int p, int x, int y ) + { +- return h->pixf.ssd[PIXEL_16x16]( h->mb.pic.p_fenc[0], FENC_STRIDE, +- h->mb.pic.p_fdec[0], FDEC_STRIDE ) +- + h->pixf.ssd[PIXEL_8x8]( h->mb.pic.p_fenc[1], FENC_STRIDE, +- h->mb.pic.p_fdec[1], FDEC_STRIDE ) +- + h->pixf.ssd[PIXEL_8x8]( h->mb.pic.p_fenc[2], FENC_STRIDE, +- h->mb.pic.p_fdec[2], FDEC_STRIDE ); ++ DECLARE_ALIGNED_16(uint8_t zero[16]) = {0}; ++ int satd = 0; ++ uint8_t *fdec = h->mb.pic.p_fdec[p] + x + y*FDEC_STRIDE; ++ uint8_t *fenc = h->mb.pic.p_fenc[p] + x + y*FENC_STRIDE; ++ if( p == 0 && h->param.analyse.i_psy_rd ) ++ { ++ int dc_coef = h->pixf.sad[size](zero, 0, fdec, FDEC_STRIDE) >> 1; ++ ADD_ABS_SATD(satd, size); ++ /* If the plane is smaller than 8x8, we can't do an SA8D; this probably isn't a big problem. */ ++ if(size <= PIXEL_8x8) ++ { ++ dc_coef >>= 1; ++ ADD_ABS_SATD(sa8d, size); ++ satd >>= 1; ++ } ++ satd = (satd * h->param.analyse.i_psy_rd * x264_lambda_tab[h->mb.i_qp] + 128) >> 8; ++ } ++ return h->pixf.ssd[size](fenc, FENC_STRIDE, fdec, FDEC_STRIDE) + satd; + } + +-static int ssd_plane( x264_t *h, int size, int p, int x, int y ) ++static inline int ssd_mb( x264_t *h ) + { +- return h->pixf.ssd[size]( h->mb.pic.p_fenc[p] + x+y*FENC_STRIDE, FENC_STRIDE, +- h->mb.pic.p_fdec[p] + x+y*FDEC_STRIDE, FDEC_STRIDE ); ++ return ssd_plane(h, PIXEL_16x16, 0, 0, 0) ++ + ssd_plane(h, PIXEL_8x8, 1, 0, 0) ++ + ssd_plane(h, PIXEL_8x8, 2, 0, 0); + } + + static int x264_rd_cost_mb( x264_t *h, int i_lambda2 ) +diff --git a/x264.c b/x264.c +index 14466e5..96326cd 100644 +--- a/x264.c ++++ b/x264.c +@@ -243,6 +243,9 @@ static void Help( x264_param_t *defaults, int b_longhelp ) + H0( " -m, --subme Subpixel motion estimation and partition\n" + " decision quality: 1=fast, 7=best. [%d]\n", defaults->analyse.i_subpel_refine ); + H0( " --b-rdo RD based mode decision for B-frames. Requires subme 6.\n" ); ++ H0( " --psy-rd Strength of mode decision psychovisual optimization [\"%f\"]\n" ++ " Does nothing at subme < 6.", ++ defaults->analyse.f_psy_rd ); + H0( " --mixed-refs Decide references on a per partition basis\n" ); + H1( " --no-chroma-me Ignore chroma in motion estimation\n" ); + H1( " --bime Jointly optimize both MVs in B-frames\n" ); +@@ -411,6 +414,7 @@ static int Parse( int argc, char **argv, + { "mvrange", required_argument, NULL, 0 }, + { "mvrange-thread", required_argument, NULL, 0 }, + { "subme", required_argument, NULL, 'm' }, ++ { "psy-rd", required_argument, NULL, 0 }, + { "b-rdo", no_argument, NULL, 0 }, + { "mixed-refs", no_argument, NULL, 0 }, + { "no-chroma-me", no_argument, NULL, 0 }, +diff --git a/x264.h b/x264.h +index 3b678dc..02266c1 100644 +--- a/x264.h ++++ b/x264.h +@@ -239,6 +239,8 @@ typedef struct x264_param_t + int b_fast_pskip; /* early SKIP detection on P-frames */ + int b_dct_decimate; /* transform coefficient thresholding on P-frames */ + int i_noise_reduction; /* adaptive pseudo-deadzone */ ++ float f_psy_rd; /* Psy RD strength */ ++ int i_psy_rd; /* Psy RD strength--fixed point value*/ + + /* the deadzone size that will be used in luma quantization */ + int i_luma_deadzone[2]; /* {inter, intra} */ diff --git a/media-libs/x264/files/x264_psy_rdo.r889.diff b/media-libs/x264/files/x264_psy_rdo.r889.diff new file mode 100644 index 0000000..6f36ed5 --- /dev/null +++ b/media-libs/x264/files/x264_psy_rdo.r889.diff @@ -0,0 +1,160 @@ +diff --git a/common/common.c b/common/common.c +index 8a8f660..7e091bc 100644 +--- a/common/common.c ++++ b/common/common.c +@@ -117,6 +117,7 @@ void x264_param_default( x264_param_t *param ) + | X264_ANALYSE_PSUB16x16 | X264_ANALYSE_BSUB16x16; + param->analyse.i_direct_mv_pred = X264_DIRECT_PRED_SPATIAL; + param->analyse.i_me_method = X264_ME_HEX; ++ param->analyse.i_rdcmp = X264_CMP_PSY; + param->analyse.i_me_range = 16; + param->analyse.i_subpel_refine = 5; + param->analyse.b_chroma_me = 1; +@@ -464,6 +465,8 @@ int x264_param_parse( x264_param_t *p, const char *name, const char *value ) + p->analyse.i_mv_range_thread = atoi(value); + OPT2("subme", "subq") + p->analyse.i_subpel_refine = atoi(value); ++ OPT("rdcmp") ++ b_error |= parse_enum( value, x264_rdcmp_names, &p->analyse.i_rdcmp ); + OPT("bime") + p->analyse.b_bidir_me = atobool(value); + OPT("chroma-me") +@@ -856,6 +859,7 @@ char *x264_param2string( x264_param_t *p, int b_res ) + s += sprintf( s, " analyse=%#x:%#x", p->analyse.intra, p->analyse.inter ); + s += sprintf( s, " me=%s", x264_motion_est_names[ p->analyse.i_me_method ] ); + s += sprintf( s, " subme=%d", p->analyse.i_subpel_refine ); ++ s += sprintf( s, " rdcmp=%s", x264_rdcmp_names[ p->analyse.i_rdcmp ] ); + s += sprintf( s, " brdo=%d", p->analyse.b_bframe_rdo ); + s += sprintf( s, " mixed_ref=%d", p->analyse.b_mixed_references ); + s += sprintf( s, " me_range=%d", p->analyse.i_me_range ); +diff --git a/encoder/analyse.c b/encoder/analyse.c +index 9200ace..f0b5409 100644 +--- a/encoder/analyse.c ++++ b/encoder/analyse.c +@@ -1911,7 +1911,7 @@ static void x264_mb_analyse_p_rd( x264_t *h, x264_mb_analysis_t *a, int i_satd ) + + static void x264_mb_analyse_b_rd( x264_t *h, x264_mb_analysis_t *a, int i_satd_inter ) + { +- int thresh = i_satd_inter * 17/16; ++ int thresh = i_satd_inter * (17 + (h->param.analyse.i_rdcmp == X264_CMP_PSY))/16; + + if( a->b_direct_available && a->i_rd16x16direct == COST_MAX ) + { +diff --git a/encoder/rdo.c b/encoder/rdo.c +index 8223efd..55629ff 100644 +--- a/encoder/rdo.c ++++ b/encoder/rdo.c +@@ -52,21 +52,54 @@ static uint16_t cabac_prefix_size[15][128]; + + #define COPY_CABAC h->mc.memcpy_aligned( &cabac_tmp.f8_bits_encoded, &h->cabac.f8_bits_encoded, \ + sizeof(x264_cabac_t) - offsetof(x264_cabac_t,f8_bits_encoded) ) +- +-static int ssd_mb( x264_t *h ) ++ ++#define ADD_ABS_SATD(satdtype, pixel)\ ++ satd += abs((h->pixf.satdtype[pixel]( zero, 0, fdec, FDEC_STRIDE ) - dc_coefs[0]) - \ ++ (h->pixf.satdtype[pixel]( zero, 0, fenc, FENC_STRIDE ) - dc_coefs[1])); ++ ++/* Psy RD distortion metric: SSD plus "Absolute Difference of Complexities" */ ++/* SATD and SA8D are used to measure block complexity. */ ++/* Blocks with a complexity most similar to that of the source are scored best. */ ++/* The difference between SATD and SA8D scores are both used to avoid bias from the DCT size. Using SATD */ ++/* only, for example, results in overusage of 8x8dct, while the opposite occurs when using SA8D. */ ++/* This is because frequencies stored in an 8x8dct sum up to a larger value when viewed through a 4x4 */ ++/* transform and vice versa with a 4x4dct and an 8x8 transform. */ ++/* The weights chosen (5 for each) are arbitrary. They should probably be the same for SATD and SA8D but */ ++/* the overall weight is chosen for no particularly good reason. */ ++/* SSD is still used as the primary RD metric; this value is merely added to it for psy purposes. */ ++ ++/* FIXME: Is there a better metric than averaged SATD/SA8D difference for complexity difference? */ ++/* Hadamard transform is recursive, so a SATD+SA8D can be done faster by taking advantage of this fact. */ ++/* We can factor out the fenc SATD/SA8D so they're only done once. */ ++ ++static inline int ssd_plane( x264_t *h, int size, int p, int x, int y ) + { +- return h->pixf.ssd[PIXEL_16x16]( h->mb.pic.p_fenc[0], FENC_STRIDE, +- h->mb.pic.p_fdec[0], FDEC_STRIDE ) +- + h->pixf.ssd[PIXEL_8x8]( h->mb.pic.p_fenc[1], FENC_STRIDE, +- h->mb.pic.p_fdec[1], FDEC_STRIDE ) +- + h->pixf.ssd[PIXEL_8x8]( h->mb.pic.p_fenc[2], FENC_STRIDE, +- h->mb.pic.p_fdec[2], FDEC_STRIDE ); ++ DECLARE_ALIGNED_16(uint8_t zero[16]) = {0}; ++ int satd = 0; ++ uint8_t *fdec = h->mb.pic.p_fdec[p] + x + y*FDEC_STRIDE; ++ uint8_t *fenc = h->mb.pic.p_fenc[p] + x + y*FENC_STRIDE; ++ if(p == 0 && h->param.analyse.i_rdcmp == X264_CMP_PSY) ++ { ++ int dc_coefs[2]; ++ dc_coefs[0] = h->pixf.sad[size]( zero, 0, fdec, FDEC_STRIDE ) >> 1; ++ dc_coefs[1] = h->pixf.sad[size]( zero, 0, fenc, FENC_STRIDE ) >> 1; ++ ADD_ABS_SATD(satd, size); ++ /* If the plane is smaller than 8x8, we can't do an SA8D; this probably isn't a big problem. */ ++ if(size <= PIXEL_8x8) ++ { ++ dc_coefs[0] >>= 1; ++ dc_coefs[1] >>= 1; ++ ADD_ABS_SATD(sa8d, size); ++ } ++ else ++ satd *= 2; ++ } ++ return h->pixf.ssd[size]( fenc, FENC_STRIDE, fdec, FDEC_STRIDE ) + satd * 5; + } + +-static int ssd_plane( x264_t *h, int size, int p, int x, int y ) ++static inline int ssd_mb( x264_t *h ) + { +- return h->pixf.ssd[size]( h->mb.pic.p_fenc[p] + x+y*FENC_STRIDE, FENC_STRIDE, +- h->mb.pic.p_fdec[p] + x+y*FDEC_STRIDE, FDEC_STRIDE ); ++ return ssd_plane(h, PIXEL_16x16, 0, 0, 0) + ssd_plane(h, PIXEL_8x8, 1, 0, 0) + ssd_plane(h, PIXEL_8x8, 2, 0, 0); + } + + static int x264_rd_cost_mb( x264_t *h, int i_lambda2 ) +diff --git a/x264.c b/x264.c +index d78461f..46b74b9 100644 +--- a/x264.c ++++ b/x264.c +@@ -243,6 +243,10 @@ static void Help( x264_param_t *defaults, int b_longhelp ) + H0( " -m, --subme Subpixel motion estimation and partition\n" + " decision quality: 1=fast, 7=best. [%d]\n", defaults->analyse.i_subpel_refine ); + H0( " --b-rdo RD based mode decision for B-frames. Requires subme 6.\n" ); ++ H0( " --rdcmp Metric used for RD mode decision [\"%s\"]\n", ++ strtable_lookup( x264_rdcmp_names, defaults->analyse.i_rdcmp ) ); ++ H0( " - ssd: normal (maximum PSNR)\n" ++ " - psy: psychovisual (sharper)\n" ); + H0( " --mixed-refs Decide references on a per partition basis\n" ); + H1( " --no-chroma-me Ignore chroma in motion estimation\n" ); + H1( " --bime Jointly optimize both MVs in B-frames\n" ); +@@ -411,6 +415,7 @@ static int Parse( int argc, char **argv, + { "mvrange", required_argument, NULL, 0 }, + { "mvrange-thread", required_argument, NULL, 0 }, + { "subme", required_argument, NULL, 'm' }, ++ { "rdcmp", required_argument, NULL, 0 }, + { "b-rdo", no_argument, NULL, 0 }, + { "mixed-refs", no_argument, NULL, 0 }, + { "no-chroma-me", no_argument, NULL, 0 }, +diff --git a/x264.h b/x264.h +index 0e257a1..432f364 100644 +--- a/x264.h ++++ b/x264.h +@@ -86,9 +86,12 @@ typedef struct x264_t x264_t; + #define X264_AQ_NONE 0 + #define X264_AQ_LOCAL 1 + #define X264_AQ_GLOBAL 2 ++#define X264_CMP_SSD 0 ++#define X264_CMP_PSY 1 + + static const char * const x264_direct_pred_names[] = { "none", "spatial", "temporal", "auto", 0 }; + static const char * const x264_motion_est_names[] = { "dia", "hex", "umh", "esa", "tesa", 0 }; ++static const char * const x264_rdcmp_names[] = { "ssd", "psy", 0 }; + static const char * const x264_overscan_names[] = { "undef", "show", "crop", 0 }; + static const char * const x264_vidformat_names[] = { "component", "pal", "ntsc", "secam", "mac", "undef", 0 }; + static const char * const x264_fullrange_names[] = { "off", "on", 0 }; +@@ -238,6 +241,7 @@ typedef struct x264_param_t + int b_fast_pskip; /* early SKIP detection on P-frames */ + int b_dct_decimate; /* transform coefficient thresholding on P-frames */ + int i_noise_reduction; /* adaptive pseudo-deadzone */ ++ int i_rdcmp; /* RD comparison metric */ + + /* the deadzone size that will be used in luma quantization */ + int i_luma_deadzone[2]; /* {inter, intra} */ diff --git a/media-libs/x264/x264-9999.ebuild b/media-libs/x264/x264-9999.ebuild new file mode 100644 index 0000000..dfbc32e --- /dev/null +++ b/media-libs/x264/x264-9999.ebuild @@ -0,0 +1,59 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +inherit git multilib toolchain-funcs + +EGIT_REPO_URI="git://git.videolan.org/x264.git" + +DESCRIPTION="A free library for encoding H264/AVC video streams" +HOMEPAGE="http://www.videolan.org/developers/x264.html" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="" +IUSE="debug mp4 threads X" + +RDEPEND="mp4? ( media-video/gpac ) + X? ( x11-libs/libX11 )" + +DEPEND="${RDEPEND} + amd64? ( >=dev-lang/yasm-0.6.2 ) + x86? ( >=dev-lang/yasm-0.7.0 ) + x86-fbsd? ( >=dev-lang/yasm-0.6.2 ) + dev-util/pkgconfig + !media-video/x264-encoder" + +src_unpack() { + git_src_unpack + cd "${S}" + EPATCH_OPTS="-l" + epatch "${FILESDIR}/${PN}-nostrip.patch" + + # use git 1.6 command style + sed -i -e "s:git-rev-list:git rev-list:g" \ + -e "s:git-status:git status:" \ + "${S}"/version.sh +} + +src_compile() { + local myconf="" + use debug && myconf="${myconf} --enable-debug" + ./configure --prefix=/usr \ + --libdir=/usr/$(get_libdir) \ + --enable-pic --enable-shared \ + "--extra-cflags=${CFLAGS}" \ + "--extra-ldflags=${LDFLAGS}" \ + "--extra-asflags=${ASFLAGS}" \ + $(use_enable X visualize) \ + $(use_enable threads pthread) \ + $(use_enable debug) \ + $(use_enable mp4 mp4-output) \ + ${myconf} \ + || die "configure failed" + emake CC="$(tc-getCC)" || die "make failed" +} + +src_install() { + make DESTDIR="${D}" install || die + dodoc AUTHORS doc/*txt +} diff --git a/media-libs/xine-lib/.svn/all-wcprops b/media-libs/xine-lib/.svn/all-wcprops new file mode 100644 index 0000000..15706fe --- /dev/null +++ b/media-libs/xine-lib/.svn/all-wcprops @@ -0,0 +1,41 @@ +K 25 +svn:wc:ra_dav:version-url +V 47 +/berkano/!svn/ver/504/trunk/media-libs/xine-lib +END +xine-lib-1.2.9999_p240.ebuild +K 25 +svn:wc:ra_dav:version-url +V 77 +/berkano/!svn/ver/504/trunk/media-libs/xine-lib/xine-lib-1.2.9999_p240.ebuild +END +xine-lib-1.2.9999_p235.ebuild +K 25 +svn:wc:ra_dav:version-url +V 77 +/berkano/!svn/ver/504/trunk/media-libs/xine-lib/xine-lib-1.2.9999_p235.ebuild +END +Manifest +K 25 +svn:wc:ra_dav:version-url +V 56 +/berkano/!svn/ver/504/trunk/media-libs/xine-lib/Manifest +END +xine-lib-1.2.9999_p247.ebuild +K 25 +svn:wc:ra_dav:version-url +V 77 +/berkano/!svn/ver/504/trunk/media-libs/xine-lib/xine-lib-1.2.9999_p247.ebuild +END +ChangeLog +K 25 +svn:wc:ra_dav:version-url +V 57 +/berkano/!svn/ver/504/trunk/media-libs/xine-lib/ChangeLog +END +xine-lib-1.1.9999.ebuild +K 25 +svn:wc:ra_dav:version-url +V 72 +/berkano/!svn/ver/487/trunk/media-libs/xine-lib/xine-lib-1.1.9999.ebuild +END diff --git a/media-libs/xine-lib/.svn/entries b/media-libs/xine-lib/.svn/entries new file mode 100644 index 0000000..1c09809 --- /dev/null +++ b/media-libs/xine-lib/.svn/entries @@ -0,0 +1,235 @@ +10 + +dir +504 +http://svn.liveforge.org/berkano/trunk/media-libs/xine-lib +http://svn.liveforge.org/berkano + + + +2009-04-29T23:11:21.118644Z +504 +yngwin + + + + + + + + + + + + + + +3a429e60-251d-0410-826f-ead4734d2cae + +xine-lib-1.2.9999_p240.ebuild +file + + + + +2009-04-30T06:40:02.434902Z +eb4b331b6f9fac855115ec1a37bae16e +2009-04-29T23:11:21.118644Z +504 +yngwin + + + + + + + + + + + + + + + + + + + + + +5783 + +files +dir + +xine-lib-1.2.9999_p235.ebuild +file + + + + +2009-04-30T06:40:02.447155Z +eb4b331b6f9fac855115ec1a37bae16e +2009-04-29T23:11:21.118644Z +504 +yngwin + + + + + + + + + + + + + + + + + + + + + +5783 + +Manifest +file + + + + +2009-04-30T06:40:02.447155Z +034835ac2150f49a2e5db9ca8207e7c6 +2009-04-29T23:11:21.118644Z +504 +yngwin + + + + + + + + + + + + + + + + + + + + + +1852 + +xine-lib-1.2.9999_p247.ebuild +file + + + + +2009-04-30T06:40:02.458907Z +cf5347bf3ef1e9730594d8436fb826d3 +2009-04-29T23:11:21.118644Z +504 +yngwin + + + + + + + + + + + + + + + + + + + + + +5917 + +ChangeLog +file + + + + +2009-04-30T06:40:02.459904Z +dc7e82fcddb2035f8da8356b8085724a +2009-04-29T23:11:21.118644Z +504 +yngwin + + + + + + + + + + + + + + + + + + + + + +1011 + +xine-lib-1.1.9999.ebuild +file + + + + +2009-03-02T07:33:14.893716Z +dd9b23505fe33e8698f3d8a1430f6a37 +2009-03-01T22:57:08.320615Z +487 +yngwin + + + + + + + + + + + + + + + + + + + + + +5231 + diff --git a/media-libs/xine-lib/.svn/text-base/ChangeLog.svn-base b/media-libs/xine-lib/.svn/text-base/ChangeLog.svn-base new file mode 100644 index 0000000..18118de --- /dev/null +++ b/media-libs/xine-lib/.svn/text-base/ChangeLog.svn-base @@ -0,0 +1,27 @@ +# ChangeLog for media-libs/xine-lib +# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 +# $Header: $ + + 29 Apr 2009; Ben de Groot ; + xine-lib-1.2.9999_p235.ebuild, xine-lib-1.2.9999_p240.ebuild, + xine-lib-1.2.9999_p247.ebuild: + Drop keywords in live ebuilds + + 15 Mar 2009; Ben de Groot xine-lib-1.2.9999_p247: + Fix unpack location for vdpau patch. Add needed docbook-xml-dtd dep. + +* xine-lib-1.2.9999_p247 (14 Mar 2009) + + 14 Mar 2009; Ben de Groot xine-lib-1.2.9999_p247: + Add new patch version + + 02 Mar 2009; Ben de Groot ++, ++, + -xine-lib-1.2_pre235.ebuild, -xine-lib-1.2_pre240.ebuild: + Reversioning the 1.2 vdpau branch ebuilds - they are live hg 1.2 branch + with vdpau snapshot patches + + 01 Mar 2009; Ben de Groot + +files/xine-lib-1.2-hg-compile-error.diff, +xine-lib-1.1.9999.ebuild, + +xine-lib-1.2_pre235.ebuild, +xine-lib-1.2_pre240.ebuild: + Adding xine-lib on request + diff --git a/media-libs/xine-lib/.svn/text-base/Manifest.svn-base b/media-libs/xine-lib/.svn/text-base/Manifest.svn-base new file mode 100644 index 0000000..2b4601f --- /dev/null +++ b/media-libs/xine-lib/.svn/text-base/Manifest.svn-base @@ -0,0 +1,9 @@ +AUX xine-lib-1.2-hg-compile-error.diff 518 RMD160 68087d3c35b009c3172e5bad225fa1139f0cb508 SHA1 53881c973b588f5d76bd3a8fdc5592a265091f72 SHA256 09ed05fdafb44ed1a6e342dde18163da31dabcc9648086a706e88e53e5d713bd +DIST xine-lib-1.2-vdpau-r235.diff.bz2 49176 RMD160 b129f767649d89c8bf56e1ba7b180870ba015a37 SHA1 b09a523c66bffbce281efc25bf8290b3f6b6f50d SHA256 dbbf4bd76fcf5eece2a507a40eb43dcb4d9802cfcb39cf8eb371d12b7372d957 +DIST xine-lib-1.2-vdpau-r240.diff.bz2 49276 RMD160 d2e3c9abcc8c399dcb8a728d728b74efd4a913e7 SHA1 446578cd00be97bd08d56740c37ec153051224e8 SHA256 e32d7b5d41bb69fc0c042bfb8a1033b5d2497cb689b3a2ee542b7e36e4fb18e5 +DIST xine-lib-1.2-vdpau-r247.diff.bz2 49479 RMD160 2b2ba8add9648a2ab0c285aad8238a6fb0c24b7f SHA1 0dcacc501f5a2d5eddc70fffb3ab19acec1abace SHA256 fc31df4cb0f8a135b90820ecac40205854a13d0a2dec91f1dcfe35c949a91a84 +EBUILD xine-lib-1.1.9999.ebuild 5231 RMD160 5f1c2a1a6ec5b71e00836eb6fb09e0c86bcb45ef SHA1 1af8a50ad25f4347704e67ec81df8834f8753e9e SHA256 f694e9c37572dac92c281ea284b050357ba16e8a62f5c9f9eed4d64fd53b0f7e +EBUILD xine-lib-1.2.9999_p235.ebuild 5783 RMD160 468b470e7c1dc1aeffe07ee42088184c454c0c55 SHA1 3e429f4364e11338098fbfedf25768df5c075ac5 SHA256 d57eb1479ee7018e2b216ed7a8957cd331ad1b25ab385f471a8c4f6f53d1e846 +EBUILD xine-lib-1.2.9999_p240.ebuild 5783 RMD160 468b470e7c1dc1aeffe07ee42088184c454c0c55 SHA1 3e429f4364e11338098fbfedf25768df5c075ac5 SHA256 d57eb1479ee7018e2b216ed7a8957cd331ad1b25ab385f471a8c4f6f53d1e846 +EBUILD xine-lib-1.2.9999_p247.ebuild 5917 RMD160 ede3e5cc2f89283213dcbc63cdadd478421981a6 SHA1 caf996ba40e5e21f94165bf0b89be5e688a3f414 SHA256 e470006c7f0720d8a05162f4190a803f39b9561899f036c8a5f7f2b292b5dac2 +MISC ChangeLog 1011 RMD160 eddec3e5c7f8175c1f7d6ef7dbc662e6f9bd678c SHA1 f2848822db54b579b45b25d9b72ac4bbbff8e29c SHA256 b255966a873bd95a8b60b8ad42eb75e2c1f155063187d0e79d8d7f3771544315 diff --git a/media-libs/xine-lib/.svn/text-base/xine-lib-1.1.9999.ebuild.svn-base b/media-libs/xine-lib/.svn/text-base/xine-lib-1.1.9999.ebuild.svn-base new file mode 100644 index 0000000..fddc143 --- /dev/null +++ b/media-libs/xine-lib/.svn/text-base/xine-lib-1.1.9999.ebuild.svn-base @@ -0,0 +1,179 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=1 + +inherit eutils flag-o-matic toolchain-funcs libtool multilib subversion autotools + +ESVN_REPO_URI="svn://jusst.de/xine-vdpau" + +S="${WORKDIR}/xine-vdpau" + +DESCRIPTION="Core libraries for Xine movie player, VDPAU branch" +HOMEPAGE="http://xine.sourceforge.net" + +LICENSE="GPL-2" +SLOT="1" +KEYWORDS="" + +IUSE="aalib libcaca -arts esd win32codecs nls +dvd +X directfb +vorbis +alsa +gnome sdl speex +theora ipv6 altivec opengl +aac fbcon +xv xvmc +samba dxr3 vidix mng +flac oss v4l xinerama vcd +a52 +mad imagemagick +dts +debug modplug -gtk pulseaudio -mmap truetype wavpack +musepack +xcb jack +-real +vis vdr" + +RDEPEND="X? ( x11-libs/libXext + x11-libs/libX11 ) + xv? ( x11-libs/libXv ) + xvmc? ( x11-libs/libXvMC ) + xinerama? ( x11-libs/libXinerama ) + win32codecs? ( >=media-libs/win32codecs-0.50 ) + esd? ( media-sound/esound ) + dvd? ( >=media-libs/libdvdcss-1.2.7 ) + arts? ( kde-base/arts ) + alsa? ( media-libs/alsa-lib ) + aalib? ( media-libs/aalib ) + directfb? ( >=dev-libs/DirectFB-0.9.9 ) + gnome? ( >=gnome-base/gnome-vfs-2.0 ) + flac? ( >=media-libs/flac-1.1.2 ) + sdl? ( >=media-libs/libsdl-1.1.5 ) + dxr3? ( >=media-libs/libfame-0.9.0 ) + vorbis? ( media-libs/libogg media-libs/libvorbis ) + theora? ( media-libs/libogg media-libs/libvorbis >=media-libs/libtheora-1.0_alpha6 ) + speex? ( media-libs/libogg media-libs/libvorbis media-libs/speex ) + libcaca? ( >=media-libs/libcaca-0.99_beta1 ) + samba? ( net-fs/samba ) + mng? ( media-libs/libmng ) + vcd? ( media-video/vcdimager ) + a52? ( >=media-libs/a52dec-0.7.4-r5 ) + mad? ( media-libs/libmad ) + imagemagick? ( media-gfx/imagemagick ) + dts? ( media-libs/libdca ) + aac? ( >=media-libs/faad2-2.6.1 ) + media-video/ffmpeg + modplug? ( media-libs/libmodplug ) + nls? ( virtual/libintl ) + gtk? ( x11-libs/gtk+:2 ) + pulseaudio? ( media-sound/pulseaudio ) + truetype? ( media-libs/freetype:2 media-libs/fontconfig ) + virtual/libiconv + wavpack? ( >=media-sound/wavpack-4.31 ) + musepack? ( media-libs/libmpcdec ) + xcb? ( >=x11-libs/libxcb-1.0 ) + jack? ( >=media-sound/jack-audio-connection-kit-0.100 ) + real? ( + x86? ( media-libs/win32codecs ) + x86-fbsd? ( media-libs/win32codecs ) + amd64? ( media-libs/amd64codecs ) )" + +DEPEND="${RDEPEND} + X? ( x11-libs/libXt + x11-proto/xproto + x11-proto/videoproto + x11-proto/xf86vidmodeproto + xinerama? ( x11-proto/xineramaproto ) ) + v4l? ( virtual/os-headers ) + dev-util/pkgconfig + sys-devel/libtool + nls? ( sys-devel/gettext )" + +src_unpack() { + # download and copy files + subversion_src_unpack + cd "${S}" + # Generate configure + ./autogen.sh +} + +src_compile() { + #prevent quicktime crashing + append-flags -frename-registers -ffunction-sections + + # Specific workarounds for too-few-registers arch... + if [[ $(tc-arch) == "x86" ]]; then + filter-flags -fforce-addr + filter-flags -momit-leaf-frame-pointer # break on gcc 3.4/4.x + filter-flags -fno-omit-frame-pointer #breaks per bug #149704 + is-flag -O? || append-flags -O2 + fi + + # Set the correct win32 dll path, bug #197236 + local win32dir + if has_multilib_profile ; then + win32dir=/usr/$(ABI="x86" get_libdir)/win32 + else + win32dir=/usr/$(get_libdir)/win32 + fi + + # Too many file names are the same (xine_decoder.c), change the builddir + # So that the relative path is used to identify them. + mkdir "${WORKDIR}/build" + + elibtoolize + ECONF_SOURCE="${S}" econf \ + $(use_enable gnome gnomevfs) \ + $(use_enable nls) \ + $(use_enable ipv6) \ + $(use_enable samba) \ + $(use_enable altivec) \ + $(use_enable v4l) \ + $(use_enable mng) \ + $(use_with imagemagick) \ + $(use_enable gtk gdkpixbuf) \ + $(use_enable aac faad) --with-external-libfaad \ + $(use_with flac libflac) \ + $(use_with vorbis) \ + $(use_with speex) \ + $(use_with theora) \ + $(use_with wavpack) \ + $(use_enable modplug) \ + $(use_enable a52 a52dec) --with-external-a52dec \ + $(use_enable mad) --with-external-libmad \ + $(use_enable dts) --with-external-libdts \ + $(use_enable musepack) --with-external-libmpcdec \ + $(use_with X x) \ + $(use_enable xinerama) \ + $(use_enable vidix) \ + $(use_enable dxr3) \ + $(use_enable directfb) \ + $(use_enable fbcon fb) \ + $(use_enable opengl) \ + $(use_enable aalib) \ + $(use_with libcaca caca) \ + $(use_with sdl) \ + $(use_enable xvmc) \ + $(use_with xcb) \ + $(use_enable oss) \ + $(use_with alsa) \ + $(use_with arts) \ + $(use_with esd esound) \ + $(use_with pulseaudio) \ + $(use_with jack) \ + $(use_enable vcd) --without-internal-vcdlibs \ + $(use_enable win32codecs w32dll) \ + $(use_enable real real-codecs) \ + $(use_enable mmap) \ + $(use_with truetype freetype) $(use_with truetype fontconfig) \ + $(use_enable debug) \ + $(use_enable vis) \ + --enable-asf \ + --with-external-ffmpeg \ + --disable-optimizations \ + --disable-syncfb \ + --with-xv-path=/usr/$(get_libdir) \ + --with-w32-path=${win32dir} \ + --with-real-codecs-path=/usr/$(get_libdir)/codecs \ + --enable-fast-install \ + --disable-dependency-tracking || die "econf failed." + + emake || die "emake failed." +} + +src_install() { + emake DESTDIR="${D}" \ + docdir="/usr/share/doc/${PF}" htmldir="/usr/share/doc/${PF}/html" \ + install || die "emake install failed." + + dodoc ChangeLog +} diff --git a/media-libs/xine-lib/.svn/text-base/xine-lib-1.2.9999_p235.ebuild.svn-base b/media-libs/xine-lib/.svn/text-base/xine-lib-1.2.9999_p235.ebuild.svn-base new file mode 100644 index 0000000..e3c65b0 --- /dev/null +++ b/media-libs/xine-lib/.svn/text-base/xine-lib-1.2.9999_p235.ebuild.svn-base @@ -0,0 +1,191 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=1 +inherit eutils flag-o-matic toolchain-funcs libtool mercurial + +MY_PV=${PV/.9999_p/-vdpau-r} +MY_P=${PN}-${MY_PV} +S="${WORKDIR}/xine-lib-1.2" + +: ${EHG_REPO_URI:=http://hg.debian.org/hg/xine-lib/xine-lib-1.2} + +DESCRIPTION="Core libraries for Xine movie player - 1.2 development branch" +HOMEPAGE="http://hg.debian.org/hg/xine-lib/xine-lib-1.2/" +SRC_URI="http://www.jusst.de/vdpau/files/xine-lib-1.2/${MY_P}.diff.bz2" + +LICENSE="GPL-2" +SLOT="1" +KEYWORDS="" + +IUSE="aalib libcaca -arts esd win32codecs nls +dvd +X directfb +vorbis +alsa +gnome sdl speex +theora ipv6 altivec opengl +aac fbcon +xv xvmc +samba dxr3 vidix mng +flac oss v4l xinerama vcd +a52 +mad imagemagick +dts +debug modplug -gtk pulseaudio -mmap truetype vdpau wavpack +musepack +xcb jack +real vdr" + +RDEPEND="X? ( x11-libs/libXext + x11-libs/libX11 ) + xv? ( x11-libs/libXv ) + xvmc? ( x11-libs/libXvMC ) + xinerama? ( x11-libs/libXinerama ) + win32codecs? ( >=media-libs/win32codecs-0.50 ) + esd? ( media-sound/esound ) + dvd? ( >=media-libs/libdvdcss-1.2.7 ) + arts? ( kde-base/arts ) + alsa? ( media-libs/alsa-lib ) + aalib? ( media-libs/aalib ) + directfb? ( >=dev-libs/DirectFB-0.9.9 ) + gnome? ( >=gnome-base/gnome-vfs-2.0 ) + flac? ( >=media-libs/flac-1.1.2 ) + sdl? ( >=media-libs/libsdl-1.1.5 ) + dxr3? ( >=media-libs/libfame-0.9.0 ) + vorbis? ( media-libs/libogg media-libs/libvorbis ) + theora? ( media-libs/libogg media-libs/libvorbis >=media-libs/libtheora-1.0_alpha6 ) + speex? ( media-libs/libogg media-libs/libvorbis media-libs/speex ) + libcaca? ( >=media-libs/libcaca-0.99_beta1 ) + samba? ( net-fs/samba ) + mng? ( media-libs/libmng ) + vcd? ( media-video/vcdimager ) + a52? ( >=media-libs/a52dec-0.7.4-r5 ) + mad? ( media-libs/libmad ) + imagemagick? ( media-gfx/imagemagick ) + dts? ( || ( media-libs/libdca media-libs/libdts ) ) + >=media-video/ffmpeg-0.4.9_p20070129 + modplug? ( media-libs/libmodplug ) + nls? ( virtual/libintl ) + gtk? ( x11-libs/gtk+:2 ) + pulseaudio? ( media-sound/pulseaudio ) + truetype? ( media-libs/freetype:2 media-libs/fontconfig ) + vdpau? ( >=x11-drivers/nvidia-drivers-180.22 ) + virtual/libiconv + wavpack? ( >=media-sound/wavpack-4.31 ) + musepack? ( media-libs/libmpcdec ) + xcb? ( >=x11-libs/libxcb-1.0 ) + jack? ( >=media-sound/jack-audio-connection-kit-0.100 ) + real? ( + x86? ( media-libs/win32codecs ) + x86-fbsd? ( media-libs/win32codecs ) + amd64? ( media-libs/amd64codecs ) )" + +DEPEND="${RDEPEND} + X? ( x11-libs/libXt + x11-proto/xproto + x11-proto/videoproto + x11-proto/xf86vidmodeproto + xinerama? ( x11-proto/xineramaproto ) ) + v4l? ( virtual/os-headers ) + dev-util/pkgconfig + sys-devel/libtool + nls? ( sys-devel/gettext )" + +src_unpack() { + mercurial_src_unpack + unpack ${A} + + cd "${S}" || die "cd failed" + + if use vdpau; then + epatch "${WORKDIR}"/${MY_P}.diff + fi + + epatch "${FILESDIR}"/xine-lib-1.2-hg-compile-error.diff + + use vdr && sed -i src/vdr/input_vdr.c -e '/define VDR_ABS_FIFO_DIR/s|".*"|"/var/vdr/xine"|' + + ./autogen.sh noconfig || die "autogen failed" +} + +src_compile() { + + #prevent quicktime crashing + append-flags -frename-registers -ffunction-sections + + # Specific workarounds for too-few-registers arch... + if [[ $(tc-arch) == "x86" ]]; then + filter-flags -fforce-addr + filter-flags -momit-leaf-frame-pointer # break on gcc 3.4/4.x + filter-flags -fno-omit-frame-pointer #breaks per bug #149704 + is-flag -O? || append-flags -O2 + fi + + local myconf + + # enable/disable appropiate optimizations on sparc + [[ "${PROFILE_ARCH}" == "sparc64" ]] && myconf="${myconf} --enable-vis" + [[ "${PROFILE_ARCH}" == "sparc" ]] && myconf="${myconf} --disable-vis" + + # The default CFLAGS (-O) is the only thing working on hppa. + use hppa && unset CFLAGS + + # Too many file names are the same (xine_decoder.c), change the builddir + # So that the relative path is used to identify them. + mkdir "${WORKDIR}/build" + + elibtoolize + ECONF_SOURCE="${S}" econf \ + $(use_enable gnome gnomevfs) \ + $(use_enable nls) \ + $(use_enable ipv6) \ + $(use_enable samba) \ + $(use_enable altivec) \ + $(use_enable v4l) \ + $(use_enable mng) \ + $(use_with imagemagick) \ + $(use_enable gtk gdkpixbuf) \ + $(use_enable aac faad) \ + $(use_with flac libflac) \ + $(use_with vorbis) \ + $(use_with speex) \ + $(use_with theora) \ + $(use_with wavpack) \ + $(use_enable modplug) \ + $(use_enable a52 a52dec) --with-external-a52dec \ + $(use_enable mad) --with-external-libmad \ + $(use_enable dts) --with-external-libdts \ + $(use_enable musepack) --with-external-libmpcdec \ + $(use_with X x) \ + $(use_enable xinerama) \ + $(use_enable vidix) \ + $(use_enable dxr3) \ + $(use_enable directfb) \ + $(use_enable fbcon fb) \ + $(use_enable opengl) \ + $(use_enable aalib) \ + $(use_with libcaca caca) \ + $(use_with sdl) \ + $(use_enable xvmc) \ + $(use_with xcb) \ + $(use_enable oss) \ + $(use_with alsa) \ + $(use_with arts) \ + $(use_with esd esound) \ + $(use_with pulseaudio) \ + $(use_with jack) \ + $(use_enable vcd) --without-internal-vcdlibs \ + $(use_enable win32codecs w32dll) \ + $(use_enable real real-codecs) \ + $(use_enable mmap) \ + $(use_with truetype freetype) $(use_with truetype fontconfig) \ + $(use_enable vdr) \ + $(use_enable debug) \ + --enable-asf \ + --with-external-ffmpeg \ + --disable-optimizations \ + --disable-syncfb \ + ${myconf} \ + --with-xv-path=/usr/$(get_libdir) \ + --with-w32-path=/usr/$(ABI=x86 get_libdir)/win32 \ + --with-real-codecs-path=/usr/$(get_libdir)/codecs \ + --enable-fast-install \ + --disable-dependency-tracking || die "econf failed." + + emake || die "emake failed." +} + +src_install() { + emake -j1 DESTDIR="${D}" \ + docdir="/usr/share/doc/${PF}" htmldir="/usr/share/doc/${PF}/html" \ + install || die "emake install failed." +} diff --git a/media-libs/xine-lib/.svn/text-base/xine-lib-1.2.9999_p240.ebuild.svn-base b/media-libs/xine-lib/.svn/text-base/xine-lib-1.2.9999_p240.ebuild.svn-base new file mode 100644 index 0000000..e3c65b0 --- /dev/null +++ b/media-libs/xine-lib/.svn/text-base/xine-lib-1.2.9999_p240.ebuild.svn-base @@ -0,0 +1,191 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=1 +inherit eutils flag-o-matic toolchain-funcs libtool mercurial + +MY_PV=${PV/.9999_p/-vdpau-r} +MY_P=${PN}-${MY_PV} +S="${WORKDIR}/xine-lib-1.2" + +: ${EHG_REPO_URI:=http://hg.debian.org/hg/xine-lib/xine-lib-1.2} + +DESCRIPTION="Core libraries for Xine movie player - 1.2 development branch" +HOMEPAGE="http://hg.debian.org/hg/xine-lib/xine-lib-1.2/" +SRC_URI="http://www.jusst.de/vdpau/files/xine-lib-1.2/${MY_P}.diff.bz2" + +LICENSE="GPL-2" +SLOT="1" +KEYWORDS="" + +IUSE="aalib libcaca -arts esd win32codecs nls +dvd +X directfb +vorbis +alsa +gnome sdl speex +theora ipv6 altivec opengl +aac fbcon +xv xvmc +samba dxr3 vidix mng +flac oss v4l xinerama vcd +a52 +mad imagemagick +dts +debug modplug -gtk pulseaudio -mmap truetype vdpau wavpack +musepack +xcb jack +real vdr" + +RDEPEND="X? ( x11-libs/libXext + x11-libs/libX11 ) + xv? ( x11-libs/libXv ) + xvmc? ( x11-libs/libXvMC ) + xinerama? ( x11-libs/libXinerama ) + win32codecs? ( >=media-libs/win32codecs-0.50 ) + esd? ( media-sound/esound ) + dvd? ( >=media-libs/libdvdcss-1.2.7 ) + arts? ( kde-base/arts ) + alsa? ( media-libs/alsa-lib ) + aalib? ( media-libs/aalib ) + directfb? ( >=dev-libs/DirectFB-0.9.9 ) + gnome? ( >=gnome-base/gnome-vfs-2.0 ) + flac? ( >=media-libs/flac-1.1.2 ) + sdl? ( >=media-libs/libsdl-1.1.5 ) + dxr3? ( >=media-libs/libfame-0.9.0 ) + vorbis? ( media-libs/libogg media-libs/libvorbis ) + theora? ( media-libs/libogg media-libs/libvorbis >=media-libs/libtheora-1.0_alpha6 ) + speex? ( media-libs/libogg media-libs/libvorbis media-libs/speex ) + libcaca? ( >=media-libs/libcaca-0.99_beta1 ) + samba? ( net-fs/samba ) + mng? ( media-libs/libmng ) + vcd? ( media-video/vcdimager ) + a52? ( >=media-libs/a52dec-0.7.4-r5 ) + mad? ( media-libs/libmad ) + imagemagick? ( media-gfx/imagemagick ) + dts? ( || ( media-libs/libdca media-libs/libdts ) ) + >=media-video/ffmpeg-0.4.9_p20070129 + modplug? ( media-libs/libmodplug ) + nls? ( virtual/libintl ) + gtk? ( x11-libs/gtk+:2 ) + pulseaudio? ( media-sound/pulseaudio ) + truetype? ( media-libs/freetype:2 media-libs/fontconfig ) + vdpau? ( >=x11-drivers/nvidia-drivers-180.22 ) + virtual/libiconv + wavpack? ( >=media-sound/wavpack-4.31 ) + musepack? ( media-libs/libmpcdec ) + xcb? ( >=x11-libs/libxcb-1.0 ) + jack? ( >=media-sound/jack-audio-connection-kit-0.100 ) + real? ( + x86? ( media-libs/win32codecs ) + x86-fbsd? ( media-libs/win32codecs ) + amd64? ( media-libs/amd64codecs ) )" + +DEPEND="${RDEPEND} + X? ( x11-libs/libXt + x11-proto/xproto + x11-proto/videoproto + x11-proto/xf86vidmodeproto + xinerama? ( x11-proto/xineramaproto ) ) + v4l? ( virtual/os-headers ) + dev-util/pkgconfig + sys-devel/libtool + nls? ( sys-devel/gettext )" + +src_unpack() { + mercurial_src_unpack + unpack ${A} + + cd "${S}" || die "cd failed" + + if use vdpau; then + epatch "${WORKDIR}"/${MY_P}.diff + fi + + epatch "${FILESDIR}"/xine-lib-1.2-hg-compile-error.diff + + use vdr && sed -i src/vdr/input_vdr.c -e '/define VDR_ABS_FIFO_DIR/s|".*"|"/var/vdr/xine"|' + + ./autogen.sh noconfig || die "autogen failed" +} + +src_compile() { + + #prevent quicktime crashing + append-flags -frename-registers -ffunction-sections + + # Specific workarounds for too-few-registers arch... + if [[ $(tc-arch) == "x86" ]]; then + filter-flags -fforce-addr + filter-flags -momit-leaf-frame-pointer # break on gcc 3.4/4.x + filter-flags -fno-omit-frame-pointer #breaks per bug #149704 + is-flag -O? || append-flags -O2 + fi + + local myconf + + # enable/disable appropiate optimizations on sparc + [[ "${PROFILE_ARCH}" == "sparc64" ]] && myconf="${myconf} --enable-vis" + [[ "${PROFILE_ARCH}" == "sparc" ]] && myconf="${myconf} --disable-vis" + + # The default CFLAGS (-O) is the only thing working on hppa. + use hppa && unset CFLAGS + + # Too many file names are the same (xine_decoder.c), change the builddir + # So that the relative path is used to identify them. + mkdir "${WORKDIR}/build" + + elibtoolize + ECONF_SOURCE="${S}" econf \ + $(use_enable gnome gnomevfs) \ + $(use_enable nls) \ + $(use_enable ipv6) \ + $(use_enable samba) \ + $(use_enable altivec) \ + $(use_enable v4l) \ + $(use_enable mng) \ + $(use_with imagemagick) \ + $(use_enable gtk gdkpixbuf) \ + $(use_enable aac faad) \ + $(use_with flac libflac) \ + $(use_with vorbis) \ + $(use_with speex) \ + $(use_with theora) \ + $(use_with wavpack) \ + $(use_enable modplug) \ + $(use_enable a52 a52dec) --with-external-a52dec \ + $(use_enable mad) --with-external-libmad \ + $(use_enable dts) --with-external-libdts \ + $(use_enable musepack) --with-external-libmpcdec \ + $(use_with X x) \ + $(use_enable xinerama) \ + $(use_enable vidix) \ + $(use_enable dxr3) \ + $(use_enable directfb) \ + $(use_enable fbcon fb) \ + $(use_enable opengl) \ + $(use_enable aalib) \ + $(use_with libcaca caca) \ + $(use_with sdl) \ + $(use_enable xvmc) \ + $(use_with xcb) \ + $(use_enable oss) \ + $(use_with alsa) \ + $(use_with arts) \ + $(use_with esd esound) \ + $(use_with pulseaudio) \ + $(use_with jack) \ + $(use_enable vcd) --without-internal-vcdlibs \ + $(use_enable win32codecs w32dll) \ + $(use_enable real real-codecs) \ + $(use_enable mmap) \ + $(use_with truetype freetype) $(use_with truetype fontconfig) \ + $(use_enable vdr) \ + $(use_enable debug) \ + --enable-asf \ + --with-external-ffmpeg \ + --disable-optimizations \ + --disable-syncfb \ + ${myconf} \ + --with-xv-path=/usr/$(get_libdir) \ + --with-w32-path=/usr/$(ABI=x86 get_libdir)/win32 \ + --with-real-codecs-path=/usr/$(get_libdir)/codecs \ + --enable-fast-install \ + --disable-dependency-tracking || die "econf failed." + + emake || die "emake failed." +} + +src_install() { + emake -j1 DESTDIR="${D}" \ + docdir="/usr/share/doc/${PF}" htmldir="/usr/share/doc/${PF}/html" \ + install || die "emake install failed." +} diff --git a/media-libs/xine-lib/.svn/text-base/xine-lib-1.2.9999_p247.ebuild.svn-base b/media-libs/xine-lib/.svn/text-base/xine-lib-1.2.9999_p247.ebuild.svn-base new file mode 100644 index 0000000..bfc5752 --- /dev/null +++ b/media-libs/xine-lib/.svn/text-base/xine-lib-1.2.9999_p247.ebuild.svn-base @@ -0,0 +1,193 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=1 +inherit eutils flag-o-matic toolchain-funcs libtool mercurial + +MY_PV=${PV/.9999_p/-vdpau-r} +MY_P=${PN}-${MY_PV} +S="${WORKDIR}/xine-lib-1.2" + +: ${EHG_REPO_URI:=http://hg.debian.org/hg/xine-lib/xine-lib-1.2} + +DESCRIPTION="Core libraries for Xine movie player - 1.2 development branch" +HOMEPAGE="http://hg.debian.org/hg/xine-lib/xine-lib-1.2/" +SRC_URI="http://www.jusst.de/vdpau/files/xine-lib-1.2/${MY_P}.diff.bz2" + +LICENSE="GPL-2" +SLOT="1" +KEYWORDS="" + +IUSE="aalib libcaca -arts esd win32codecs nls +dvd +X directfb +vorbis +alsa +gnome sdl speex +theora ipv6 altivec opengl +aac fbcon +xv xvmc +samba dxr3 vidix mng +flac oss v4l xinerama vcd +a52 +mad imagemagick +dts +debug modplug -gtk pulseaudio -mmap truetype vdpau wavpack +musepack +xcb jack +real vdr" + +RDEPEND="X? ( x11-libs/libXext + x11-libs/libX11 ) + xv? ( x11-libs/libXv ) + xvmc? ( x11-libs/libXvMC ) + xinerama? ( x11-libs/libXinerama ) + win32codecs? ( >=media-libs/win32codecs-0.50 ) + esd? ( media-sound/esound ) + dvd? ( >=media-libs/libdvdcss-1.2.7 ) + arts? ( kde-base/arts ) + alsa? ( media-libs/alsa-lib ) + aalib? ( media-libs/aalib ) + directfb? ( >=dev-libs/DirectFB-0.9.9 ) + gnome? ( >=gnome-base/gnome-vfs-2.0 ) + flac? ( >=media-libs/flac-1.1.2 ) + sdl? ( >=media-libs/libsdl-1.1.5 ) + dxr3? ( >=media-libs/libfame-0.9.0 ) + vorbis? ( media-libs/libogg media-libs/libvorbis ) + theora? ( media-libs/libogg media-libs/libvorbis >=media-libs/libtheora-1.0_alpha6 ) + speex? ( media-libs/libogg media-libs/libvorbis media-libs/speex ) + libcaca? ( >=media-libs/libcaca-0.99_beta1 ) + samba? ( net-fs/samba ) + mng? ( media-libs/libmng ) + vcd? ( media-video/vcdimager ) + a52? ( >=media-libs/a52dec-0.7.4-r5 ) + mad? ( media-libs/libmad ) + imagemagick? ( media-gfx/imagemagick ) + dts? ( || ( media-libs/libdca media-libs/libdts ) ) + >=media-video/ffmpeg-0.4.9_p20070129 + modplug? ( media-libs/libmodplug ) + nls? ( virtual/libintl ) + gtk? ( x11-libs/gtk+:2 ) + pulseaudio? ( media-sound/pulseaudio ) + truetype? ( media-libs/freetype:2 media-libs/fontconfig ) + vdpau? ( >=x11-drivers/nvidia-drivers-180.22 ) + virtual/libiconv + wavpack? ( >=media-sound/wavpack-4.31 ) + musepack? ( media-libs/libmpcdec ) + xcb? ( >=x11-libs/libxcb-1.0 ) + jack? ( >=media-sound/jack-audio-connection-kit-0.100 ) + real? ( + x86? ( media-libs/win32codecs ) + x86-fbsd? ( media-libs/win32codecs ) + amd64? ( media-libs/amd64codecs ) )" + +DEPEND="${RDEPEND} + X? ( x11-libs/libXt + x11-proto/xproto + x11-proto/videoproto + x11-proto/xf86vidmodeproto + xinerama? ( x11-proto/xineramaproto ) ) + v4l? ( virtual/os-headers ) + app-text/docbook-xml-dtd:4.4 + dev-util/pkgconfig + sys-devel/libtool + nls? ( sys-devel/gettext ) + || ( www-client/lynx www-client/w3m )" # needed for xmlto + +src_unpack() { + mercurial_src_unpack + cd "${WORKDIR}" || die "cd to workdir failed" + unpack ${A} + cd "${S}" || die "cd failed" + + if use vdpau; then + epatch "${WORKDIR}"/${MY_P}.diff + fi + + epatch "${FILESDIR}"/xine-lib-1.2-hg-compile-error.diff + + use vdr && sed -i src/vdr/input_vdr.c -e '/define VDR_ABS_FIFO_DIR/s|".*"|"/var/vdr/xine"|' + + ./autogen.sh noconfig || die "autogen failed" +} + +src_compile() { + + #prevent quicktime crashing + append-flags -frename-registers -ffunction-sections + + # Specific workarounds for too-few-registers arch... + if [[ $(tc-arch) == "x86" ]]; then + filter-flags -fforce-addr + filter-flags -momit-leaf-frame-pointer # break on gcc 3.4/4.x + filter-flags -fno-omit-frame-pointer #breaks per bug #149704 + is-flag -O? || append-flags -O2 + fi + + local myconf + + # enable/disable appropiate optimizations on sparc + [[ "${PROFILE_ARCH}" == "sparc64" ]] && myconf="${myconf} --enable-vis" + [[ "${PROFILE_ARCH}" == "sparc" ]] && myconf="${myconf} --disable-vis" + + # The default CFLAGS (-O) is the only thing working on hppa. + use hppa && unset CFLAGS + + # Too many file names are the same (xine_decoder.c), change the builddir + # So that the relative path is used to identify them. + mkdir "${WORKDIR}/build" + + elibtoolize + ECONF_SOURCE="${S}" econf \ + $(use_enable gnome gnomevfs) \ + $(use_enable nls) \ + $(use_enable ipv6) \ + $(use_enable samba) \ + $(use_enable altivec) \ + $(use_enable v4l) \ + $(use_enable mng) \ + $(use_with imagemagick) \ + $(use_enable gtk gdkpixbuf) \ + $(use_enable aac faad) \ + $(use_with flac libflac) \ + $(use_with vorbis) \ + $(use_with speex) \ + $(use_with theora) \ + $(use_with wavpack) \ + $(use_enable modplug) \ + $(use_enable a52 a52dec) --with-external-a52dec \ + $(use_enable mad) --with-external-libmad \ + $(use_enable dts) --with-external-libdts \ + $(use_enable musepack) --with-external-libmpcdec \ + $(use_with X x) \ + $(use_enable xinerama) \ + $(use_enable vidix) \ + $(use_enable dxr3) \ + $(use_enable directfb) \ + $(use_enable fbcon fb) \ + $(use_enable opengl) \ + $(use_enable aalib) \ + $(use_with libcaca caca) \ + $(use_with sdl) \ + $(use_enable xvmc) \ + $(use_with xcb) \ + $(use_enable oss) \ + $(use_with alsa) \ + $(use_with arts) \ + $(use_with esd esound) \ + $(use_with pulseaudio) \ + $(use_with jack) \ + $(use_enable vcd) --without-internal-vcdlibs \ + $(use_enable win32codecs w32dll) \ + $(use_enable real real-codecs) \ + $(use_enable mmap) \ + $(use_with truetype freetype) $(use_with truetype fontconfig) \ + $(use_enable vdr) \ + $(use_enable debug) \ + --enable-asf \ + --with-external-ffmpeg \ + --disable-optimizations \ + --disable-syncfb \ + ${myconf} \ + --with-xv-path=/usr/$(get_libdir) \ + --with-w32-path=/usr/$(ABI=x86 get_libdir)/win32 \ + --with-real-codecs-path=/usr/$(get_libdir)/codecs \ + --enable-fast-install \ + --disable-dependency-tracking || die "econf failed." + + emake || die "emake failed." +} + +src_install() { + emake -j1 DESTDIR="${D}" \ + docdir="/usr/share/doc/${PF}" htmldir="/usr/share/doc/${PF}/html" \ + install || die "emake install failed." +} diff --git a/media-libs/xine-lib/ChangeLog b/media-libs/xine-lib/ChangeLog new file mode 100644 index 0000000..5341c93 --- /dev/null +++ b/media-libs/xine-lib/ChangeLog @@ -0,0 +1,32 @@ +# ChangeLog for media-libs/xine-lib +# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 +# $Header: $ + + 30 Apr 2009, Fabian Fingerle + -xine-lib-1.1.9999.ebuild, -xine-lib-1.2.9999_p235.ebuild, + -xine-lib-1.2.9999_p240.ebuild: + Copy from Berkano Overlay, delete old ebuilds + + 29 Apr 2009; Ben de Groot ; + xine-lib-1.2.9999_p235.ebuild, xine-lib-1.2.9999_p240.ebuild, + xine-lib-1.2.9999_p247.ebuild: + Drop keywords in live ebuilds + + 15 Mar 2009; Ben de Groot xine-lib-1.2.9999_p247: + Fix unpack location for vdpau patch. Add needed docbook-xml-dtd dep. + +* xine-lib-1.2.9999_p247 (14 Mar 2009) + + 14 Mar 2009; Ben de Groot xine-lib-1.2.9999_p247: + Add new patch version + + 02 Mar 2009; Ben de Groot ++, ++, + -xine-lib-1.2_pre235.ebuild, -xine-lib-1.2_pre240.ebuild: + Reversioning the 1.2 vdpau branch ebuilds - they are live hg 1.2 branch + with vdpau snapshot patches + + 01 Mar 2009; Ben de Groot + +files/xine-lib-1.2-hg-compile-error.diff, +xine-lib-1.1.9999.ebuild, + +xine-lib-1.2_pre235.ebuild, +xine-lib-1.2_pre240.ebuild: + Adding xine-lib on request + diff --git a/media-libs/xine-lib/Manifest b/media-libs/xine-lib/Manifest new file mode 100644 index 0000000..a32643e --- /dev/null +++ b/media-libs/xine-lib/Manifest @@ -0,0 +1,4 @@ +AUX xine-lib-1.2-hg-compile-error.diff 518 RMD160 68087d3c35b009c3172e5bad225fa1139f0cb508 SHA1 53881c973b588f5d76bd3a8fdc5592a265091f72 SHA256 09ed05fdafb44ed1a6e342dde18163da31dabcc9648086a706e88e53e5d713bd +DIST xine-lib-1.2-vdpau-r247.diff.bz2 49479 RMD160 2b2ba8add9648a2ab0c285aad8238a6fb0c24b7f SHA1 0dcacc501f5a2d5eddc70fffb3ab19acec1abace SHA256 fc31df4cb0f8a135b90820ecac40205854a13d0a2dec91f1dcfe35c949a91a84 +EBUILD xine-lib-1.2.9999_p247.ebuild 5917 RMD160 ede3e5cc2f89283213dcbc63cdadd478421981a6 SHA1 caf996ba40e5e21f94165bf0b89be5e688a3f414 SHA256 e470006c7f0720d8a05162f4190a803f39b9561899f036c8a5f7f2b292b5dac2 +MISC ChangeLog 1209 RMD160 98ab1c527c555a3a776aa56bbbed7db0c8bc10cb SHA1 412b47bb87cd5edcfd45669559fa3bb4b2f685fd SHA256 03e6575bf660714cfe38088546ff7cee4a4370e977d403a5e95b84f125e158cb diff --git a/media-libs/xine-lib/files/.svn/all-wcprops b/media-libs/xine-lib/files/.svn/all-wcprops new file mode 100644 index 0000000..e75d241 --- /dev/null +++ b/media-libs/xine-lib/files/.svn/all-wcprops @@ -0,0 +1,11 @@ +K 25 +svn:wc:ra_dav:version-url +V 53 +/berkano/!svn/ver/487/trunk/media-libs/xine-lib/files +END +xine-lib-1.2-hg-compile-error.diff +K 25 +svn:wc:ra_dav:version-url +V 88 +/berkano/!svn/ver/487/trunk/media-libs/xine-lib/files/xine-lib-1.2-hg-compile-error.diff +END diff --git a/media-libs/xine-lib/files/.svn/entries b/media-libs/xine-lib/files/.svn/entries new file mode 100644 index 0000000..2e26970 --- /dev/null +++ b/media-libs/xine-lib/files/.svn/entries @@ -0,0 +1,62 @@ +10 + +dir +504 +http://svn.liveforge.org/berkano/trunk/media-libs/xine-lib/files +http://svn.liveforge.org/berkano + + + +2009-03-01T22:57:08.320615Z +487 +yngwin + + + + + + + + + + + + + + +3a429e60-251d-0410-826f-ead4734d2cae + +xine-lib-1.2-hg-compile-error.diff +file + + + + +2009-03-02T07:33:14.883714Z +40ee9124460a5699834ff47d2300ff51 +2009-03-01T22:57:08.320615Z +487 +yngwin + + + + + + + + + + + + + + + + + + + + + +518 + diff --git a/media-libs/xine-lib/files/.svn/text-base/xine-lib-1.2-hg-compile-error.diff.svn-base b/media-libs/xine-lib/files/.svn/text-base/xine-lib-1.2-hg-compile-error.diff.svn-base new file mode 100644 index 0000000..23af86c --- /dev/null +++ b/media-libs/xine-lib/files/.svn/text-base/xine-lib-1.2-hg-compile-error.diff.svn-base @@ -0,0 +1,12 @@ +--- configure.ac 2009-01-15 15:45:01.000000000 +0200 ++++ configure.ac.good 2009-01-15 15:11:39.000000000 +0200 +@@ -1133,8 +1133,7 @@ + CC_CHECK_CFLAGS_APPEND([-Wstrict-aliasing=2 -Wstrict-aliasing], [break;]) + + dnl This *has* to stay at the end as it can break some autoconf tests. +-CC_CHECK_CFLAGS_APPEND([-Werror=implicit-function-declaration dnl +- -Werror-implicit-function-declaration], [break;]) ++CC_CHECK_CFLAGS_APPEND([-Werrorimplicit-function-declaration], [break;]) + + CC_NOUNDEFINED + diff --git a/media-libs/xine-lib/files/xine-lib-1.2-hg-compile-error.diff b/media-libs/xine-lib/files/xine-lib-1.2-hg-compile-error.diff new file mode 100644 index 0000000..23af86c --- /dev/null +++ b/media-libs/xine-lib/files/xine-lib-1.2-hg-compile-error.diff @@ -0,0 +1,12 @@ +--- configure.ac 2009-01-15 15:45:01.000000000 +0200 ++++ configure.ac.good 2009-01-15 15:11:39.000000000 +0200 +@@ -1133,8 +1133,7 @@ + CC_CHECK_CFLAGS_APPEND([-Wstrict-aliasing=2 -Wstrict-aliasing], [break;]) + + dnl This *has* to stay at the end as it can break some autoconf tests. +-CC_CHECK_CFLAGS_APPEND([-Werror=implicit-function-declaration dnl +- -Werror-implicit-function-declaration], [break;]) ++CC_CHECK_CFLAGS_APPEND([-Werrorimplicit-function-declaration], [break;]) + + CC_NOUNDEFINED + diff --git a/media-libs/xine-lib/xine-lib-1.2.9999_p247.ebuild b/media-libs/xine-lib/xine-lib-1.2.9999_p247.ebuild new file mode 100644 index 0000000..bfc5752 --- /dev/null +++ b/media-libs/xine-lib/xine-lib-1.2.9999_p247.ebuild @@ -0,0 +1,193 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=1 +inherit eutils flag-o-matic toolchain-funcs libtool mercurial + +MY_PV=${PV/.9999_p/-vdpau-r} +MY_P=${PN}-${MY_PV} +S="${WORKDIR}/xine-lib-1.2" + +: ${EHG_REPO_URI:=http://hg.debian.org/hg/xine-lib/xine-lib-1.2} + +DESCRIPTION="Core libraries for Xine movie player - 1.2 development branch" +HOMEPAGE="http://hg.debian.org/hg/xine-lib/xine-lib-1.2/" +SRC_URI="http://www.jusst.de/vdpau/files/xine-lib-1.2/${MY_P}.diff.bz2" + +LICENSE="GPL-2" +SLOT="1" +KEYWORDS="" + +IUSE="aalib libcaca -arts esd win32codecs nls +dvd +X directfb +vorbis +alsa +gnome sdl speex +theora ipv6 altivec opengl +aac fbcon +xv xvmc +samba dxr3 vidix mng +flac oss v4l xinerama vcd +a52 +mad imagemagick +dts +debug modplug -gtk pulseaudio -mmap truetype vdpau wavpack +musepack +xcb jack +real vdr" + +RDEPEND="X? ( x11-libs/libXext + x11-libs/libX11 ) + xv? ( x11-libs/libXv ) + xvmc? ( x11-libs/libXvMC ) + xinerama? ( x11-libs/libXinerama ) + win32codecs? ( >=media-libs/win32codecs-0.50 ) + esd? ( media-sound/esound ) + dvd? ( >=media-libs/libdvdcss-1.2.7 ) + arts? ( kde-base/arts ) + alsa? ( media-libs/alsa-lib ) + aalib? ( media-libs/aalib ) + directfb? ( >=dev-libs/DirectFB-0.9.9 ) + gnome? ( >=gnome-base/gnome-vfs-2.0 ) + flac? ( >=media-libs/flac-1.1.2 ) + sdl? ( >=media-libs/libsdl-1.1.5 ) + dxr3? ( >=media-libs/libfame-0.9.0 ) + vorbis? ( media-libs/libogg media-libs/libvorbis ) + theora? ( media-libs/libogg media-libs/libvorbis >=media-libs/libtheora-1.0_alpha6 ) + speex? ( media-libs/libogg media-libs/libvorbis media-libs/speex ) + libcaca? ( >=media-libs/libcaca-0.99_beta1 ) + samba? ( net-fs/samba ) + mng? ( media-libs/libmng ) + vcd? ( media-video/vcdimager ) + a52? ( >=media-libs/a52dec-0.7.4-r5 ) + mad? ( media-libs/libmad ) + imagemagick? ( media-gfx/imagemagick ) + dts? ( || ( media-libs/libdca media-libs/libdts ) ) + >=media-video/ffmpeg-0.4.9_p20070129 + modplug? ( media-libs/libmodplug ) + nls? ( virtual/libintl ) + gtk? ( x11-libs/gtk+:2 ) + pulseaudio? ( media-sound/pulseaudio ) + truetype? ( media-libs/freetype:2 media-libs/fontconfig ) + vdpau? ( >=x11-drivers/nvidia-drivers-180.22 ) + virtual/libiconv + wavpack? ( >=media-sound/wavpack-4.31 ) + musepack? ( media-libs/libmpcdec ) + xcb? ( >=x11-libs/libxcb-1.0 ) + jack? ( >=media-sound/jack-audio-connection-kit-0.100 ) + real? ( + x86? ( media-libs/win32codecs ) + x86-fbsd? ( media-libs/win32codecs ) + amd64? ( media-libs/amd64codecs ) )" + +DEPEND="${RDEPEND} + X? ( x11-libs/libXt + x11-proto/xproto + x11-proto/videoproto + x11-proto/xf86vidmodeproto + xinerama? ( x11-proto/xineramaproto ) ) + v4l? ( virtual/os-headers ) + app-text/docbook-xml-dtd:4.4 + dev-util/pkgconfig + sys-devel/libtool + nls? ( sys-devel/gettext ) + || ( www-client/lynx www-client/w3m )" # needed for xmlto + +src_unpack() { + mercurial_src_unpack + cd "${WORKDIR}" || die "cd to workdir failed" + unpack ${A} + cd "${S}" || die "cd failed" + + if use vdpau; then + epatch "${WORKDIR}"/${MY_P}.diff + fi + + epatch "${FILESDIR}"/xine-lib-1.2-hg-compile-error.diff + + use vdr && sed -i src/vdr/input_vdr.c -e '/define VDR_ABS_FIFO_DIR/s|".*"|"/var/vdr/xine"|' + + ./autogen.sh noconfig || die "autogen failed" +} + +src_compile() { + + #prevent quicktime crashing + append-flags -frename-registers -ffunction-sections + + # Specific workarounds for too-few-registers arch... + if [[ $(tc-arch) == "x86" ]]; then + filter-flags -fforce-addr + filter-flags -momit-leaf-frame-pointer # break on gcc 3.4/4.x + filter-flags -fno-omit-frame-pointer #breaks per bug #149704 + is-flag -O? || append-flags -O2 + fi + + local myconf + + # enable/disable appropiate optimizations on sparc + [[ "${PROFILE_ARCH}" == "sparc64" ]] && myconf="${myconf} --enable-vis" + [[ "${PROFILE_ARCH}" == "sparc" ]] && myconf="${myconf} --disable-vis" + + # The default CFLAGS (-O) is the only thing working on hppa. + use hppa && unset CFLAGS + + # Too many file names are the same (xine_decoder.c), change the builddir + # So that the relative path is used to identify them. + mkdir "${WORKDIR}/build" + + elibtoolize + ECONF_SOURCE="${S}" econf \ + $(use_enable gnome gnomevfs) \ + $(use_enable nls) \ + $(use_enable ipv6) \ + $(use_enable samba) \ + $(use_enable altivec) \ + $(use_enable v4l) \ + $(use_enable mng) \ + $(use_with imagemagick) \ + $(use_enable gtk gdkpixbuf) \ + $(use_enable aac faad) \ + $(use_with flac libflac) \ + $(use_with vorbis) \ + $(use_with speex) \ + $(use_with theora) \ + $(use_with wavpack) \ + $(use_enable modplug) \ + $(use_enable a52 a52dec) --with-external-a52dec \ + $(use_enable mad) --with-external-libmad \ + $(use_enable dts) --with-external-libdts \ + $(use_enable musepack) --with-external-libmpcdec \ + $(use_with X x) \ + $(use_enable xinerama) \ + $(use_enable vidix) \ + $(use_enable dxr3) \ + $(use_enable directfb) \ + $(use_enable fbcon fb) \ + $(use_enable opengl) \ + $(use_enable aalib) \ + $(use_with libcaca caca) \ + $(use_with sdl) \ + $(use_enable xvmc) \ + $(use_with xcb) \ + $(use_enable oss) \ + $(use_with alsa) \ + $(use_with arts) \ + $(use_with esd esound) \ + $(use_with pulseaudio) \ + $(use_with jack) \ + $(use_enable vcd) --without-internal-vcdlibs \ + $(use_enable win32codecs w32dll) \ + $(use_enable real real-codecs) \ + $(use_enable mmap) \ + $(use_with truetype freetype) $(use_with truetype fontconfig) \ + $(use_enable vdr) \ + $(use_enable debug) \ + --enable-asf \ + --with-external-ffmpeg \ + --disable-optimizations \ + --disable-syncfb \ + ${myconf} \ + --with-xv-path=/usr/$(get_libdir) \ + --with-w32-path=/usr/$(ABI=x86 get_libdir)/win32 \ + --with-real-codecs-path=/usr/$(get_libdir)/codecs \ + --enable-fast-install \ + --disable-dependency-tracking || die "econf failed." + + emake || die "emake failed." +} + +src_install() { + emake -j1 DESTDIR="${D}" \ + docdir="/usr/share/doc/${PF}" htmldir="/usr/share/doc/${PF}/html" \ + install || die "emake install failed." +} diff --git a/media-video/ffmpeg/ChangeLog b/media-video/ffmpeg/ChangeLog new file mode 100644 index 0000000..1581933 --- /dev/null +++ b/media-video/ffmpeg/ChangeLog @@ -0,0 +1,165 @@ +# ChangeLog for media-video/ffmpeg +# Copyright 2006-2009 Berkano Overlay; distributed under the GPL version 2 + + 30 Apr 2009, Fabian Fingerle : + Copy from Verkano Overlay + + 29 Apr 2009; Ben de Groot ; ffmpeg-20099999-r1.ebuild: + Drop keywords in live ebuilds + +* ffmpeg-20099999-r1 (14 Mar 2009) + + 14 Mar 2009; Ben de Groot + -files/ffmpeg-shared-gcc4.1.patch, -files/ffmpeg-amr-64bit.patch, + -files/disable-version-rebranding-2008.10.patch, + -files/disable-version-rebranding-2008.patch, + -files/disable-version-rebranding-2009.01.patch, + -files/ffmpeg-eac3_decoder-20080817.patch, + -files/ffmpeg-x86-pic-fix-20080916.patch, -files/cabac-asm.patch, + -files/disable-version-rebranding.patch, -files/ffmpeg-asm-pic.patch, + -files/ffmpeg-icc.patch, -files/ffmpeg-libdir.patch, + -files/ffmpeg-libdir-pic.patch, -files/ffmpeg-soname-symlink.patch, + -files/ffmpeg-unknown-options.patch, -files/ffmpeg-x86-pic-fix.patch, + ffmpeg-20099999, ffmpeg-20099999-r1: + Sync with portage ebuild and changed configure options. Remove old. + + 26 Jan 2009; Ben de Groot ; + +files/disable-version-rebranding-2009.01.patch, ffmpeg-20099999.ebuild: + Update patch + + 06 Jan 2009; Ben de Groot ; ffmpeg-20099999.ebuild: + Adding X and gsm useflags + + 06 Jan 2009; Ben de Groot ; -ffmpeg-20080908.ebuild, + +ffmpeg-20099999.ebuild: + Add vdpau useflag + + 06 Nov 2008; Ben de Groot ; ffmpeg-20089999-r1.ebuild: + Remove ffmpeg-shared-gcc4.1.patch from live svn ebuild + + 21 Oct 2008; Ben de Groot ; ffmpeg-20089999-r1.ebuild: + Rekeywording live svn ebuild, as newer stuff is also unmasked in portage, + and updating the x264 dep. + + 09 Oct 2008; Ben de Groot ; + +files/disable-version-rebranding-2008.10.patch, + files/disable-version-rebranding-2008.patch, ffmpeg-20089999-r1.ebuild: + Restoring patch for 20080908 snapshot version. Renaming current patch for + 20089999 live ebuild. + + 08 Oct 2008; Ben de Groot ; ffmpeg-20089999-r1.ebuild: + Removing a52 useflag and dep as upstream has dropped support. + + 01 Oct 2008; Ben de Groot ; + files/disable-version-rebranding-2008.patch: + Updating patch + + 16 Sep 2008; Ben de Groot ; ffmpeg-20089999-r1.ebuild: + Dropping keywords for api/abi breaking version + + 16 Sep 2008; Ben de Groot ; +ffmpeg-20080908.ebuild, + +files/ffmpeg-x86-pic-fix-20080916.patch, -ffmpeg-20089999.ebuild, + +ffmpeg-20089999-r1.ebuild: + Adding ffmpeg-20080908 - latest revision before current API/ABI breakage, + and updating 20089999 with adjusted x86-pic patch. + + 06 Sep 2008; Ben de Groot ; ffmpeg-20089999.ebuild, + +files/ffmpeg-icc.patch: + Adding icc patch and useflag + + 06 Sep 2008; Ben de Groot ; ffmpeg-20089999.ebuild: + Removing eac3 patching and useflag, as this is now part of the internal ac3 + codec. + + 22 Aug 2008; Ben de Groot ; ffmpeg-20089999.ebuild: + Changing eac3 patch to live svn checkout + + 19 Aug 2008; Ben de Groot ; + +files/ffmpeg-eac3_decoder-20080817.patch, ffmpeg-20089999.ebuild: + Adding new eac3 patch, removed the swscaler useflag and enabled swscale by + default. Also (temporarily) adding -D_BSD_SOURCE to fix a compile issue + reported on the forums. + + 10 Jul 2008; Ben de Groot ; ffmpeg-20089999.ebuild: + Added schroedinger useflag and dep for dirac support. + + 21 Jun 2008; Ben de Groot ; + files/disable-version-rebranding-2008.patch, ffmpeg-20089999.ebuild: + New versioning stuff as upstream changed things. + + 10 May 2008; Ben de Groot ; + files/ffmpeg-x86-pic-fix.patch, -ffmpeg-20079999-r2.ebuild, + ffmpeg-20089999.ebuild: + Removing old ebuild, rekeywording the new one. Updated pic-fix patch. + + 18 Apr 2008; Ben de Groot ; ffmpeg-20089999.ebuild: + Current svn no longer needs libdir patch, so removed from ebuild. + + 17 Apr 2008; Ben de Groot ; files/ffmpeg-libdir.patch: + Fixing libdir patch for current version + + 12 Apr 2008; Ben de Groot ; + +files/disable-version-rebranding-2008.patch, ffmpeg-20089999.ebuild: + New disable-version-rebranding patch + + 12 Apr 2008; Ben de Groot ; ffmpeg-20089999.ebuild: + Adding hardcoded-tables useflag and broken relocations flag. + + 08 Apr 2008; Ben de Groot ; ffmpeg-20079999-r2.ebuild, + ffmpeg-20089999.ebuild: + Adjust x264 dep. + + 29 Mar 2008; Ben de Groot ; ffmpeg-20079999-r2.ebuild, + ffmpeg-20089999.ebuild: + Fix x264 dep to either in old ebuild. Update disable-stripping option in + current ebuild. + + 25 Mar 2008; Ben de Groot ; ffmpeg-20089999.ebuild: + Changing x264 dep to x264 || x264-svn. + + 11 Mar 2008; Ben de Groot ; +ffmpeg-20089999.ebuild: + Changed and added current configure options. Dropping keywords because at this + point most packages that depend on ffmpeg will not build against current svn. + + 17 Nov 2007; Ben de Groot (yngwin) ; + ffmpeg-20079999-r2.ebuild: + Removed no longer valid libogg configure option. Removed ogg useflag. Libogg + is now a dependency with vorbis and theora useflags. Also made a few + cosmetic changes. + + 13 Sep 2007; Ben de Groot (yngwin) ; + -ffmpeg-20069999-r1.ebuild, -ffmpeg-20069999-r2.ebuild, + -ffmpeg-20079999.ebuild, -ffmpeg-20079999-r1.ebuild, + ffmpeg-20079999-r2.ebuild: + Removing older ebuilds. Updating current ebuild with latest changes in + configure options. Adding ipv6 useflag. + + 07 Jun 2007; Ben de Groot; ffmpeg-20079999-r2.ebuild: + Updated renamed configure options for xvid and x264. + + 22 May 2007; Ben de Groot; +ffmpeg-20079999-r2.ebuild: + Removing dts useflag, as internal libavcodec is now used instead of libdts. + + 11 May 2007; Ben de Groot; ffmpeg-20079999-r1.ebuild, + +files/ffmpeg-x86-pic-fix.patch: + Change x86 PIC fix to a more elegant patch. + + 10 May 2007; Ben de Groot; ffmpeg-20079999-r1.ebuild: + Adding -fPIC flag for x86 to fix assembly compilation borkage. + + 08 May 2007; Ben de Groot; ffmpeg-20079999-r1.ebuild: + Updated configure flags for libamr-(nb|wb). + + 30 Apr 2007; Ben de Groot; ffmpeg-20079999-r1.ebuild: + Removing no longer needed asm-pic patch from ebuild. + + 30 Apr 2007; Ben de Groot; +ffmpeg-20079999-r1.ebuild: + Recent svn uses external amr libs. Changed ebuild accordingly after adding + those external deps. USE-flag amr now replaced by amrnb and amrwb. + + 11 Apr 2007; torstenvdb; ffmpeg-20079999.ebuild: + Added ~sparc keyword to ffmpeg ebuild. + + 09 Apr 2007; Ben de Groot; ChangeLog: + Fixed ebuild with asm-pic.patch from official tree. + diff --git a/media-video/ffmpeg/Manifest b/media-video/ffmpeg/Manifest new file mode 100644 index 0000000..27fb9de --- /dev/null +++ b/media-video/ffmpeg/Manifest @@ -0,0 +1,2 @@ +EBUILD ffmpeg-20099999-r1.ebuild 5743 RMD160 726de46e74bcc9b43eae93871b07cd6e15d4f2e7 SHA1 89a8586e3a3a0b938160cfd9607117bace2a4215 SHA256 4261a6b573e2e3e69efc0f24a9bbafc9db2a09ce6f0a964048e0cb0db47b5086 +MISC ChangeLog 6868 RMD160 ebaf0c14df30a32a41eab1579d5d6564a1ed1e31 SHA1 96e1413242ba93603452b2c47ea89c2379c7cc05 SHA256 5dbbabedab2fbd2307e437f2c6b3b78890ba27cceb83afdf9de3b5fa94cc9c2d diff --git a/media-video/ffmpeg/ffmpeg-20099999-r1.ebuild b/media-video/ffmpeg/ffmpeg-20099999-r1.ebuild new file mode 100644 index 0000000..abf542b --- /dev/null +++ b/media-video/ffmpeg/ffmpeg-20099999-r1.ebuild @@ -0,0 +1,189 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=1 +ESVN_REPO_URI="svn://svn.mplayerhq.hu/ffmpeg/trunk" + +inherit eutils flag-o-matic multilib toolchain-funcs subversion + +DESCRIPTION="Complete solution to record, convert and stream audio and video" +HOMEPAGE="http://ffmpeg.org/" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="" +IUSE="+3dnow +3dnowext +alsa altivec amr custom-cflags debug dirac doc ieee1394 + +encode +faac +faad gsm ipv6 +mmx +mmxext +vorbis test theora +threads + +x264 +xvid network zlib sdl X +mp3 oss schroedinger +hardcoded-tables + bindist v4l v4l2 speex +ssse3 jpeg2k" + +RDEPEND="sdl? ( >=media-libs/libsdl-1.2.10 ) + alsa? ( media-libs/alsa-lib ) + encode? ( + faac? ( media-libs/faac ) + mp3? ( media-sound/lame ) + vorbis? ( media-libs/libvorbis media-libs/libogg ) + theora? ( media-libs/libtheora media-libs/libogg ) + x264? ( >=media-libs/x264-0.0.20081006 ) + xvid? ( >=media-libs/xvid-1.1.0 ) ) + faad? ( >=media-libs/faad2-2.6.1 ) + zlib? ( sys-libs/zlib ) + ieee1394? ( media-libs/libdc1394 + sys-libs/libraw1394 ) + dirac? ( media-video/dirac ) + gsm? ( >=media-sound/gsm-1.0.12-r1 ) + jpeg2k? ( >=media-libs/openjpeg-1.3-r2 ) + schroedinger? ( media-libs/schroedinger ) + speex? ( >=media-libs/speex-1.2_beta3 ) + X? ( x11-libs/libX11 x11-libs/libXext ) + amr? ( media-libs/amrnb media-libs/amrwb )" + +DEPEND="${RDEPEND} + >=sys-devel/make-3.81 + mmx? ( dev-lang/yasm ) + doc? ( app-text/texi2html ) + test? ( net-misc/wget ) + v4l? ( sys-kernel/linux-headers ) + v4l2? ( sys-kernel/linux-headers )" + +src_compile() { + local myconf="${EXTRA_ECONF}" + + # enabled by default + use debug || myconf="${myconf} --disable-debug" + use zlib || myconf="${myconf} --disable-zlib" + use sdl || myconf="${myconf} --disable-ffplay" + + if use network; then + use ipv6 || myconf="${myconf} --disable-ipv6" + else + myconf="${myconf} --disable-network" + fi + + use custom-cflags && myconf="${myconf} --disable-optimizations" + + # enabled by default + if use encode + then + use faac && myconf="${myconf} --enable-libfaac" + use mp3 && myconf="${myconf} --enable-libmp3lame" + use vorbis && myconf="${myconf} --enable-libvorbis" + use theora && myconf="${myconf} --enable-libtheora" + use x264 && myconf="${myconf} --enable-libx264" + use xvid && myconf="${myconf} --enable-libxvid" + else + myconf="${myconf} --disable-encoders" + fi + + # libavdevice options + use ieee1394 && myconf="${myconf} --enable-libdc1394" + # Demuxers + for i in v4l v4l2 alsa oss ; do + use $i || myconf="${myconf} --disable-demuxer=$i" + done + # Muxers + for i in alsa oss ; do + use $i || myconf="${myconf} --disable-muxer=$i" + done + use X && myconf="${myconf} --enable-x11grab" + + # Threads; we only support pthread for now but ffmpeg supports more + use threads && myconf="${myconf} --enable-pthreads" + + # Decoders + use faad && myconf="${myconf} --enable-libfaad" + use dirac && myconf="${myconf} --enable-libdirac" + use schroedinger && myconf="${myconf} --enable-libschroedinger" + use speex && myconf="${myconf} --enable-libspeex" + use jpeg2k && myconf="${myconf} --enable-libopenjpeg" + if use gsm; then + myconf="${myconf} --enable-libgsm" + # Crappy detection or our installation is weird, pick one (FIXME) + append-flags -I/usr/include/gsm + fi + if use bindist + then + use amr && ewarn "libamr is nonfree and cannot be distributed; disabling amr support." + else + use amr && myconf="${myconf} --enable-libamr-nb \ + --enable-libamr-wb \ + --enable-nonfree" + fi + + # CPU features + for i in mmx ssse3 altivec ; do + use $i || myconf="${myconf} --disable-$i" + done + use mmxext || myconf="${myconf} --disable-mmx2" + use 3dnow || myconf="${myconf} --disable-amd3dnow" + use 3dnowext || myconf="${myconf} --disable-amd3dnowext" + # disable mmx accelerated code if PIC is required + # as the provided asm decidedly is not PIC. + if gcc-specs-pie ; then + myconf="${myconf} --disable-mmx --disable-mmx2" + fi + + # Try to get cpu type based on CFLAGS. + # Bug #172723 + # We need to do this so that features of that CPU will be better used + # If they contain an unknown CPU it will not hurt since ffmpeg's configure + # will just ignore it. + for i in $(get-flag march) $(get-flag mcpu) $(get-flag mtune) ; do + myconf="${myconf} --cpu=$i" + break + done + + # Mandatory configuration + myconf="${myconf} --enable-gpl --enable-postproc \ + --enable-avfilter --enable-avfilter-lavf \ + --disable-stripping" + + # cross compile support + tc-is-cross-compiler && myconf="${myconf} --enable-cross-compile --arch=$(tc-arch-kernel)" + + # Misc stuff + use hardcoded-tables && myconf="${myconf} --enable-hardcoded-tables" + + # Specific workarounds for too-few-registers arch... + if [[ $(tc-arch) == "x86" ]]; then + filter-flags -fforce-addr -momit-leaf-frame-pointer + append-flags -fomit-frame-pointer + is-flag -O? || append-flags -O2 + if (use debug); then + # no need to warn about debug if not using debug flag + ewarn "" + ewarn "Debug information will be almost useless as the frame pointer is omitted." + ewarn "This makes debugging harder, so crashes that has no fixed behavior are" + ewarn "difficult to fix. Please have that in mind." + ewarn "" + fi + fi + + cd "${S}" + ./configure \ + --prefix=/usr \ + --libdir=/usr/$(get_libdir) \ + --shlibdir=/usr/$(get_libdir) \ + --mandir=/usr/share/man \ + --enable-static --enable-shared \ + --cc="$(tc-getCC)" \ + ${myconf} || die "configure failed" + + emake version.h || die #252269 + emake || die "make failed" +} + +src_install() { + emake DESTDIR="${D}" install || die "Install Failed" + + dodoc Changelog README INSTALL + dodoc doc/* +} + +# Never die for now... +src_test() { + for t in codectest libavtest seektest ; do + emake ${t} || ewarn "Some tests in ${t} failed" + done +} diff --git a/media-video/mplayer/ChangeLog b/media-video/mplayer/ChangeLog new file mode 100644 index 0000000..d581d57 --- /dev/null +++ b/media-video/mplayer/ChangeLog @@ -0,0 +1,228 @@ +# ChangeLog for media-video/mplayer +# Copyright 2006-2009 Berkano Overlay; distributed under the GPL version 2 + + 30 Apr 2009, Fabian Fingerle + Copy from Berkano Overlay + + 29 Apr 2009; Ben de Groot ; mplayer-99999999.ebuild: + Drop keywords in live ebuilds + + 29 Apr 2009; Ben de Groot ; mplayer-99999999.ebuild: + Add app-arch/rar as satisfying unrar dep, make app-arch/unrar default + + 23 Mar 2009; Ben de Groot ; mplayer-99999999.ebuild: + Drop strip-flags + +* mplayer-99999999 (14 Mar 2009) + + 14 Mar 2009; Ben de Groot -mplayer-1.0_rc2_p27960-r1, + -mplayer-1.0_rc2_p28348, -mplayer-9999-r21, +mplayer-99999999: + Bump to trump portage version, and sync it with the official ebuild + +* mplayer-1.0_rc2_p28348 (14 Feb 2009) + + 14 Feb 2009; Ben de Groot mplayer-1.0_rc2_p28348: + New vdpau prepatched snapshot + + 26 Jan 2009; Ben de Groot ; + +files/disable-version-rebranding-2009-01.patch, mplayer-9999-r21.ebuild: + Update patch + + 29 Dec 2008; Ben de Groot ; + +mplayer-1.0_rc2_p27960-r1.ebuild, -mplayer-2008.0103.ebuild, + mplayer-9999-r21.ebuild, -files/truehd-20071218.patch, + -files/truehd-20080107.patch, -files/mplayer-vdpau-libavcodec.patch, + -files/mplayer-vdpau-libavutil.patch, -files/mplayer-vdpau-mplayer.patch: + Add new vdpau patched version, update live ebuild to not use vdpau (patches + dont apply), and remove the patches from filesdir which we no longer use. + + 14 Dec 2008; Ben de Groot ; + +mplayer-1.0_rc2_p27960.ebuild: + Adding mplayer-1.0_rc2_p27960.ebuild which uses a tarball prepatched with + nVidia's vdpau patches. + + 04 Dec 2008; Ben de Groot ; + files/mplayer-vdpau-libavcodec.patch, files/mplayer-vdpau-libavutil.patch, + files/mplayer-vdpau-mplayer.patch: + Updating vdpau patches to upstream version 3139462, with minor fixes. + + 02 Dec 2008; Ben de Groot ; -mplayer-9999-r20.ebuild, + +mplayer-9999-r21.ebuild: + Change srt useflag back to ass in compliance with portage version. + + 20 Nov 2008; Ben de Groot ; mplayer-9999-r20.ebuild: + Add teletext to USE, fix vdpau configure flag logic. + + 19 Nov 2008; Ben de Groot ; mplayer-9999-r20.ebuild, + +files/README-vdpau.txt, -files/ffmpeg-icc.patch, + +files/mplayer-vdpau-libavcodec.patch, + +files/mplayer-vdpau-libavutil.patch, +files/mplayer-vdpau-mplayer.patch, + +files/nellymoserenc.patch: + Remove icc patch. Add vdpau patches from nVidia, updated by Civilus and me. + + 06 Nov 2008; Ben de Groot ; mplayer-9999-r20.ebuild, + -files/startupvol.patch: + Dropping volume patch+useflag, as this has been accepted upstream. Fixing + fontconfig useflag QA issue. + + 21 Oct 2008; Ben de Groot ; mplayer-9999-r20.ebuild, + +files/startupvol.patch: + Adding startup volume patch from smplayer svn repo. Update x264 dependency. + + 16 Oct 2008; Ben de Groot ; mplayer-9999-r20.ebuild: + Remove no longer used nvidia useflag + + 20 Sep 2008; Ben de Groot ; mplayer-9999-r20.ebuild: + Adjusting for midentify renaming + + 14 Sep 2008; Ben de Groot ; mplayer-9999-r20.ebuild: + Re-enabling a52 useflag by default, more useflag tweaking. + + 06 Sep 2008; Ben de Groot ; mplayer-9999-r20.ebuild, + +files/ffmpeg-icc.patch: + Adding icc patch and useflag + + 06 Sep 2008; Ben de Groot ; mplayer-9999-r20.ebuild: + Removing eac3 patching and useflag, as this is now part of the internal ac3 + codec. + + 03 Sep 2008; Ben de Groot ; -mplayer-9999-r19.ebuild, + +mplayer-9999-r20.ebuild: + Updating some deps, fix the changed faad configure option. + + 20 Aug 2008; Ben de Groot ; mplayer-9999-r19.ebuild: + Re-adding live svn eac3 patching and eac3 useflag, as well as config + tweak. + + 19 Aug 2008; Ben de Groot ; mplayer-9999-r19.ebuild: + Splitting useflags for dirac and schroedinger implementations. + + 16 Aug 2008; Ben de Groot ; mplayer-9999-r19.ebuild: + Various ebuild updates + + 08 Jun 2008; Ben de Groot ; mplayer-9999-r19.ebuild, + -files/libswscale-sparc.patch: + Removing sparc patch that seems no longer needed. + + 07 Jun 2008; Ben de Groot ; mplayer-9999-r19.ebuild, + +files/libswscale-sparc.patch: + Updated vidix configure options that were changed upstream. Incorporated a + number of changes from the offial ebuild in portage. + + 28 May 2008; Ben de Groot ; + files/disable-version-rebranding.patch: + Updated versioning patch again + + 30 Apr 2008; Ben de Groot ; + files/disable-version-rebranding.patch: + Updating disable-version-rebranding.patch again. + + 29 Apr 2008; Ben de Groot ; + files/disable-version-rebranding.patch: + Updating disable-version-rebranding.patch + + 12 Apr 2008; Ben de Groot ; mplayer-9999-r19.ebuild: + Removed color-console useflag, as that option is no longer present. + + 08 Apr 2008; Ben de Groot ; mplayer-9999-r19.ebuild: + Adjust dep to only x264 in 9999-r19 ebuild, as x264-svn is no longer in the + tree. + + 08 Apr 2008; Ben de Groot ; mplayer-2008.0103.ebuild: + Fix x264 dependency. + + 25 Mar 2008; Ben de Groot ; mplayer-9999-r19.ebuild: + Adjust x264 dep. Added warning about unsupported gtk gui. + + 22 Mar 2008; Ben de Groot ; -mplayer-9999-r18.ebuild, + mplayer-9999-r19.ebuild, +files/truehd-20080107.patch: + Removing old ebuild. Updating TrueHD patch. + + 05 Jan 2008; Ben de Groot (yngwin) ; +files/eac3-id.conf, + +mplayer-2008.0103.ebuild, +mplayer-9999-r19.ebuild, -files/eac3v4.patch, + +files/truehd-20071218.patch: + Adding new ebuild for mplayer svn snapshot, prepatched with E-AC3 and TrueHD + patches. Updated live svn ebuild also has the latest patches, but may not + compile. Only the 9999-r19 ebuild has useflags for eac3 and truehd. + + 05 Jan 2008; Ben de Groot (yngwin) ; mplayer-9999-r18.ebuild: + Fixing unrarlib -> unrarexec. The eac3 patch currently doesn't apply. + + 13 Dec 2007; Ben de Groot (yngwin) ; -files/eac3v3.patch, + mplayer-9999-r18.ebuild, +files/eac3v4.patch: + Updated eac3 patch and put it behind eac3 useflag. + + 05 Dec 2007; Ben de Groot (yngwin) ; -files/eac3v2.patch, + -mplayer-9999-r17.ebuild, +files/eac3v3.patch, mplayer-9999-r18.ebuild: + Remove old ebuild and add new eac3 patch to current ebuild. Patch is from + http://www.db-instable.org/misc/ + + 02 Dec 2007; Ben de Groot (yngwin) ; + mplayer-9999-r18.ebuild: + Removing eac3 patch, which no longer applies. Not in the mood to fix :) + + 30 Nov 2007; Ben de Groot (yngwin) ; + mplayer-9999-r18.ebuild: + Re-adding dts useflag and dependancy. + + 25 Nov 2007; Ben de Groot (yngwin) ; + files/mplayer.desktop: + Fixing mplayer.desktop for Nautilus (hopefully). + + 12 Nov 2007; Ben de Groot (yngwin) ; +files/eac3v2.patch, + +mplayer-9999-r18.ebuild: + Updated ebuild, adding eac3v2.patch. + + 18 Oct 2007; Ben de Groot (yngwin) ; + mplayer-9999-r17.ebuild, -files/pulseaudio.patch: + Removed pulseaudio patch, which has (finally) been applied upstream. + + 01 Oct 2007; Ben de Groot (yngwin) ; + mplayer-9999-r17.ebuild, -files/xshape.patch: + Remove xshape.patch which has finally been applied upstream. + + 13 Sep 2007; Ben de Groot (yngwin) ; + -mplayer-9999-r13.ebuild, -mplayer-9999-r14.ebuild, + -mplayer-9999-r15.ebuild, -mplayer-9999-r16.ebuild, + mplayer-9999-r17.ebuild: + Removing older ebuilds. Updating r17, removing no longer valid --disable-dga + flag. + + 22 Jul 2007; Ben de Groot (yngwin) ; + mplayer-9999-r17.ebuild: + Adjust configure option for nut. + + 22 Jun 2007; Ben de Groot; -mplayer-9999-r18.ebuild: + Removing -r18 as dts is actually not an option at this time. + + 22 Jun 2007; Ben de Groot; +mplayer-9999-r18.ebuild: + Adding dts useflag. + + 22 May 2007; Ben de Groot; +mplayer-9999-r17.ebuild: + Replacing amr useflag with amrnb and amrwb, now using external libs. + + 22 May 2007; Ben de Groot; +mplayer-9999-r16.ebuild: + Removed dts useflag and dependency on libdts, as this is no longer used. It + now uses the internal codec in libavcodec. + + 20 Mar 2007; Ben de Groot; mplayer-9999-r15.ebuild, + +files/mplayer.desktop, ,files/pulseaudio.patch: + Updated 9999-r15 ebuild with corrected pulseaudio patch. + + 20 Mar 2007; Ben de Groot; +mplayer-9999-r15.ebuild, + +files/pulseaudio.patch: + Updated mplayer subversion ebuild, with some changes incorporated from + beandog's pre-release snapshot ebuild. Work started on pulseaudio patch. + + 23 Feb 2007 Ben de Groot + Added ~sparc keyword to mplayer-9999-r14. + + 22 Feb 2007 Ben de Groot + Added mplayer-9999-r14.ebuild incorporating some changes suggested by + weedy in http://forums.gentoo.org/viewtopic-p-3920042.html - I made + dvdread non-optional when USE=dvd. This compiles now, but USE=live + still gives me problems on ~amd64. + + 21 Feb 2007 Ben de Groot + Initial import from previous overlay. Ebuild by me, based on the ebuilds + in the portage tree and the kpex-media overlay. diff --git a/media-video/mplayer/Manifest b/media-video/mplayer/Manifest new file mode 100644 index 0000000..abeae69 --- /dev/null +++ b/media-video/mplayer/Manifest @@ -0,0 +1,13 @@ +AUX README-vdpau.txt 3262 RMD160 66b146ab4e5d8dccc73f29fc191b4697c08bd4ea SHA1 c717b4f555fbec9b908c246cf87349da5ae437af SHA256 e93692f9933157fd1b1c829082be85fce8d0999d121681aa4e65271519e25d30 +AUX disable-version-rebranding-2009-01.patch 441 RMD160 4a07278595e382188f2681e01c732a82b690097b SHA1 f926e0d3dc8c5232caad7a67ff410cbac259bdb0 SHA256 7018bb6e487c78b56b281f16ffc7819740c7d43d54ae42cf084a6e0a35632579 +AUX disable-version-rebranding.patch 492 RMD160 d7aae6a8991224a7da2345dd28507e9472e1b6e7 SHA1 a9576aea7fb32eb95366ac9e3835a22a9af176e2 SHA256 7ad66df7b2e6a94cb2d0648e4411ee4b585078c3b215998b7df67f9bce1f8292 +AUX eac3-id.conf 110 RMD160 5ab0f26a42125c6c994ba882b275cf216466b5aa SHA1 3a64c554911be90eb8d623bfaca1bfdb1d8e6cf6 SHA256 86954e207198b13d7c43b0a579eacc900c9f85116603469df05adac243ab8274 +AUX mplayer.desktop 797 RMD160 2cd08a28c7a5e890659f1087ddf02deeab07bc7c SHA1 a0fead36ff1d7001d24327a222cb32c32a2e616c SHA256 d141fed7e063fde82a5068059cf89c3c5440e7a900fd3c5f3f2d8c33ff1f41c8 +AUX nellymoserenc.patch 393 RMD160 7ff948d98282f43bb1c6d96bf50b5b69d2bbd300 SHA1 3fe15f74881ad8ee597311d81810c7d762abda93 SHA256 85a106919f0152c454f96df6613c6c125de782db374006733e604f5f4a541f79 +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 productive-1.0.tar.bz2 53690 RMD160 3a99186c9c127d742730626d5e7c7bd82dc7e963 SHA1 9061c80fa27b6ceb66d0c201a5afbeef13827957 SHA256 4ecaa8a1e354edeea748d785de532de5b6dfeff3bac00715a74e69b370f23bd6 +DIST svgalib_helper-1.9.17-mplayer.tar.bz2 7234 RMD160 e0c4ae039478732404dd743e250e1061cc9cf0a4 SHA1 d2d596f1ddd283188b2990417d22903c0b466d25 SHA256 016edd27d74b5c66481ddb4563c961fbb579e3a95dd846cc857a639df09999e5 +EBUILD mplayer-99999999.ebuild 18947 RMD160 65bf8a6c5b0d80e533d171c6d75c4116056913d3 SHA1 03122c7fcdd3db692a0fc38ebc2730de29c8fcba SHA256 596ab35e5f29023dd730c8d682324b2488c5b8573f6fce3a1bb392222a3ca6f2 +MISC ChangeLog 9466 RMD160 1f645420cd5b1d1a4b445e6f88830796d0bb8b0a SHA1 647a58c82aeee716f0a8059ac818dfe2813a12bf SHA256 3c34ad311e40a2f9bb93a04b66b34b4a42ea855b5c866158db38a1f1dbe7c7f0 diff --git a/media-video/mplayer/files/.svn/all-wcprops b/media-video/mplayer/files/.svn/all-wcprops new file mode 100644 index 0000000..60bdb25 --- /dev/null +++ b/media-video/mplayer/files/.svn/all-wcprops @@ -0,0 +1,41 @@ +K 25 +svn:wc:ra_dav:version-url +V 53 +/berkano/!svn/ver/478/trunk/media-video/mplayer/files +END +mplayer.desktop +K 25 +svn:wc:ra_dav:version-url +V 69 +/berkano/!svn/ver/267/trunk/media-video/mplayer/files/mplayer.desktop +END +disable-version-rebranding-2009-01.patch +K 25 +svn:wc:ra_dav:version-url +V 94 +/berkano/!svn/ver/478/trunk/media-video/mplayer/files/disable-version-rebranding-2009-01.patch +END +README-vdpau.txt +K 25 +svn:wc:ra_dav:version-url +V 70 +/berkano/!svn/ver/445/trunk/media-video/mplayer/files/README-vdpau.txt +END +eac3-id.conf +K 25 +svn:wc:ra_dav:version-url +V 66 +/berkano/!svn/ver/275/trunk/media-video/mplayer/files/eac3-id.conf +END +disable-version-rebranding.patch +K 25 +svn:wc:ra_dav:version-url +V 86 +/berkano/!svn/ver/351/trunk/media-video/mplayer/files/disable-version-rebranding.patch +END +nellymoserenc.patch +K 25 +svn:wc:ra_dav:version-url +V 73 +/berkano/!svn/ver/445/trunk/media-video/mplayer/files/nellymoserenc.patch +END diff --git a/media-video/mplayer/files/.svn/entries b/media-video/mplayer/files/.svn/entries new file mode 100644 index 0000000..a60e9c2 --- /dev/null +++ b/media-video/mplayer/files/.svn/entries @@ -0,0 +1,232 @@ +10 + +dir +504 +http://svn.liveforge.org/berkano/trunk/media-video/mplayer/files +http://svn.liveforge.org/berkano + + + +2009-01-26T22:12:37.296927Z +478 +yngwin + + + + + + + + + + + + + + +3a429e60-251d-0410-826f-ead4734d2cae + +mplayer.desktop +file + + + + +2008-12-06T03:31:18.000000Z +1597022db7f26a23cb148ce5f4296993 +2007-11-25T16:57:42.705815Z +267 +yngwin + + + + + + + + + + + + + + + + + + + + + +797 + +disable-version-rebranding-2009-01.patch +file + + + + +2009-01-27T04:21:42.878537Z +62b1bae94eb14a4720662837fe61af71 +2009-01-26T22:12:37.296927Z +478 +yngwin + + + + + + + + + + + + + + + + + + + + + +441 + +README-vdpau.txt +file + + + + +2008-12-06T03:31:18.000000Z +10b0a59703a2889cb80e7b65b4957349 +2008-11-19T19:02:12.891145Z +445 +yngwin + + + + + + + + + + + + + + + + + + + + + +3262 + +eac3-id.conf +file + + + + +2008-12-06T03:31:18.000000Z +2d6829a8884b5a3cb98516815b4163ce +2008-01-05T15:40:20.749015Z +275 +ben + + + + + + + + + + + + + + + + + + + + + +110 + +disable-version-rebranding.patch +file + + + + +2008-12-06T03:31:18.000000Z +b47344b98bf3b94e2f7a67160d1ba7b5 +2008-05-28T12:33:43.984417Z +351 +ben + + + + + + + + + + + + + + + + + + + + + +492 + +nellymoserenc.patch +file + + + + +2008-12-06T03:31:18.000000Z +db61df59fec6e770e51e700b5f1b7f31 +2008-11-19T19:02:12.891145Z +445 +yngwin + + + + + + + + + + + + + + + + + + + + + +393 + diff --git a/media-video/mplayer/files/.svn/text-base/README-vdpau.txt.svn-base b/media-video/mplayer/files/.svn/text-base/README-vdpau.txt.svn-base new file mode 100644 index 0000000..7b2a3d9 --- /dev/null +++ b/media-video/mplayer/files/.svn/text-base/README-vdpau.txt.svn-base @@ -0,0 +1,80 @@ +MPlayer patches for VDPAU + +Brief Overview: + These patches add VDPAU support to ffmpeg and MPlayer: + + * HW decode acceleration is provided for MPEG-1/2, H.264 and VC-1. + + * A VDPAU video output module is added to MPlayer. + +Current support: + The NVIDIA 180.06 beta driver for Linux, Solaris, and FreeBSD + provides initial VDPAU support for some GeForce 8xxx and 9xxx + series GPUs. Please see the VDPAU announcement on the nvnews.net + Linux forum for further details. + +Prerequisite: + The following should be acquired using your distribution package + management system, or from source if required: + + * Subversion (svn); See http://subversion.tigris.org + * C development tools: make, gcc, binutils. + * Various X11 libraries (and their development packages) + that MPlayer relies upon. + +Installing the patch: + Run the supplied shell script: + + $ sh checkout-patch-build.sh + +Running MPlayer: + $ cd mplayer-vdpau + $ ./mplayer -vc -vo vdpau + + 'VDPAU-codec-name' can be one of: + + ffmpeg12vdpau + ffh264vdpau + ffwmv3vdpau + ffvc1vdpau + + based on the type of video bitstream (ffmpeg12vdpau for MPEG-1 + or MPEG-2, ffh264vdpau for H.264, ffwmv3vdpau for WMV3, and + ffvc1vdpau for VC-1). + + If a VDPAU codec is used, the VDPAU output module must be used. + + Alternatively, you may use the VDPAU output module without specifying + a VDPAU codec. In this case, the bitstream decoding is not accelerated + using VDPAU, but the decoded video is still presented using VDPAU: + + $ cd mplayer-vdpau + $ ./mplayer -vo vdpau + +Known Limitations: + 1. Playing some video streams may cause GPU errors and/or hang or + crash the system. + 2. The skip forward/backward features are not robust yet and + can cause application or system hangs/crashes. + 3. MPlayer OSD or Composite Picture is currently not supported. + 4. Problems have been observed when building MPlayer with these + patches using gcc-4.3.2. + +Example Movie Clips: + MPEG: http://inventaaustralia.zftp.com.nyud.net/videos/MPEGIO3MBPS30sec.mpg + ./mplayer -vo vdpau -vc ffmpeg12vdpau MPEGIO3MBPS30sec.mpg + + H.264: http://samples.mplayerhq.hu.nyud.net/V-codecs/h264/PAFF/Grey.ts + ./mplayer -vo vdpau -vc ffh264vdpau Grey.ts + http://samples.mplayerhq.hu.nyud.net/V-codecs/h264/nature_704x576_25Hz_1500kbits.h264 + ./mplayer -vo vdpau -vc ffh264vdpau nature_704x576_25Hz_1500kbits.h264 + + WMV3: http://download.microsoft.com.nyud.net/download/0/9/d/09d051c4-decc-4d39-9c57-f520187213a1/Amazing_Caves_720.exe + (use `unzip` to extract the .exe) + ./mplayer -vo vdpau -vc ffwmv3vdpau Amazing_Caves_720.wmv + + VC-1: http://samples.mplayerhq.hu.nyud.net/V-codecs/WVC1/FlightSimX_720p60_51_15Mbps.wmv + ./mplayer -vo vdpau -vc ffvc1vdpau FlightSimX_720p60_51_15Mbps.wmv + + Note: .nyud.net added to the above URLs to cache the content on CoralCDN (http://www.coralcdn.org/) + diff --git a/media-video/mplayer/files/.svn/text-base/disable-version-rebranding-2009-01.patch.svn-base b/media-video/mplayer/files/.svn/text-base/disable-version-rebranding-2009-01.patch.svn-base new file mode 100644 index 0000000..89dc33f --- /dev/null +++ b/media-video/mplayer/files/.svn/text-base/disable-version-rebranding-2009-01.patch.svn-base @@ -0,0 +1,16 @@ +--- mplayer/Makefile.orig 2009-01-26 20:41:18.000000000 +0100 ++++ mplayer/Makefile 2009-01-26 20:42:40.000000000 +0100 +@@ -834,13 +834,6 @@ + help_mp.h: help/help_mp-en.h $(HELP_FILE) + help/help_create.sh $(HELP_FILE) $(CHARSET) + +-# rebuild version.h each time the working copy is updated +-ifeq ($(wildcard .svn/entries),.svn/entries) +-version.h: .svn/entries +-endif +-version.h: version.sh +- ./$< `$(CC) -dumpversion` +- + %(EXESUF): %.c + + diff --git a/media-video/mplayer/files/.svn/text-base/disable-version-rebranding.patch.svn-base b/media-video/mplayer/files/.svn/text-base/disable-version-rebranding.patch.svn-base new file mode 100644 index 0000000..1d2e707 --- /dev/null +++ b/media-video/mplayer/files/.svn/text-base/disable-version-rebranding.patch.svn-base @@ -0,0 +1,15 @@ +--- mplayer-orig/Makefile 2008-05-28 14:28:39.000000000 +0200 ++++ mplayer/Makefile 2008-05-28 14:29:32.000000000 +0200 +@@ -745,12 +745,6 @@ + help_mp.h: help/help_mp-en.h $(HELP_FILE) + help/help_create.sh $(HELP_FILE) $(CHARSET) + +-# rebuild version.h each time the working copy is updated +-ifeq ($(wildcard .svn/entries),.svn/entries) +-version.h: .svn/entries +-endif +-version.h: +- ./version.sh `$(CC) -dumpversion` + + osdep/mplayer-rc.o: osdep/mplayer.rc version.h + $(WINDRES) -I. -o $@ $< diff --git a/media-video/mplayer/files/.svn/text-base/eac3-id.conf.svn-base b/media-video/mplayer/files/.svn/text-base/eac3-id.conf.svn-base new file mode 100644 index 0000000..bf0c4cd --- /dev/null +++ b/media-video/mplayer/files/.svn/text-base/eac3-id.conf.svn-base @@ -0,0 +1,8 @@ + +audiocodec ffeac3 + info "FFmpeg EAC3" + status buggy + format 0x0 + driver ffmpeg + dll "E-AC3" + diff --git a/media-video/mplayer/files/.svn/text-base/mplayer.desktop.svn-base b/media-video/mplayer/files/.svn/text-base/mplayer.desktop.svn-base new file mode 100644 index 0000000..4bd9fe3 --- /dev/null +++ b/media-video/mplayer/files/.svn/text-base/mplayer.desktop.svn-base @@ -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 %F +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/files/.svn/text-base/nellymoserenc.patch.svn-base b/media-video/mplayer/files/.svn/text-base/nellymoserenc.patch.svn-base new file mode 100644 index 0000000..b46af00 --- /dev/null +++ b/media-video/mplayer/files/.svn/text-base/nellymoserenc.patch.svn-base @@ -0,0 +1,13 @@ +--- mplayer/libavcodec/nellymoserenc.c~ 2008-11-15 17:58:38.000000000 +0300 ++++ mplayer/libavcodec/nellymoserenc.c 2008-11-15 18:00:04.000000000 +0300 +@@ -38,6 +38,10 @@ + #include "nellymoser.h" + #include "avcodec.h" + #include "dsputil.h" ++#include ++#if !defined(INFINITY) && defined(HUGE_VAL) ++#define INFINITY HUGE_VAL ++#endif + + #define BITSTREAM_WRITER_LE + #include "bitstream.h" diff --git a/media-video/mplayer/files/README-vdpau.txt b/media-video/mplayer/files/README-vdpau.txt new file mode 100644 index 0000000..7b2a3d9 --- /dev/null +++ b/media-video/mplayer/files/README-vdpau.txt @@ -0,0 +1,80 @@ +MPlayer patches for VDPAU + +Brief Overview: + These patches add VDPAU support to ffmpeg and MPlayer: + + * HW decode acceleration is provided for MPEG-1/2, H.264 and VC-1. + + * A VDPAU video output module is added to MPlayer. + +Current support: + The NVIDIA 180.06 beta driver for Linux, Solaris, and FreeBSD + provides initial VDPAU support for some GeForce 8xxx and 9xxx + series GPUs. Please see the VDPAU announcement on the nvnews.net + Linux forum for further details. + +Prerequisite: + The following should be acquired using your distribution package + management system, or from source if required: + + * Subversion (svn); See http://subversion.tigris.org + * C development tools: make, gcc, binutils. + * Various X11 libraries (and their development packages) + that MPlayer relies upon. + +Installing the patch: + Run the supplied shell script: + + $ sh checkout-patch-build.sh + +Running MPlayer: + $ cd mplayer-vdpau + $ ./mplayer -vc -vo vdpau + + 'VDPAU-codec-name' can be one of: + + ffmpeg12vdpau + ffh264vdpau + ffwmv3vdpau + ffvc1vdpau + + based on the type of video bitstream (ffmpeg12vdpau for MPEG-1 + or MPEG-2, ffh264vdpau for H.264, ffwmv3vdpau for WMV3, and + ffvc1vdpau for VC-1). + + If a VDPAU codec is used, the VDPAU output module must be used. + + Alternatively, you may use the VDPAU output module without specifying + a VDPAU codec. In this case, the bitstream decoding is not accelerated + using VDPAU, but the decoded video is still presented using VDPAU: + + $ cd mplayer-vdpau + $ ./mplayer -vo vdpau + +Known Limitations: + 1. Playing some video streams may cause GPU errors and/or hang or + crash the system. + 2. The skip forward/backward features are not robust yet and + can cause application or system hangs/crashes. + 3. MPlayer OSD or Composite Picture is currently not supported. + 4. Problems have been observed when building MPlayer with these + patches using gcc-4.3.2. + +Example Movie Clips: + MPEG: http://inventaaustralia.zftp.com.nyud.net/videos/MPEGIO3MBPS30sec.mpg + ./mplayer -vo vdpau -vc ffmpeg12vdpau MPEGIO3MBPS30sec.mpg + + H.264: http://samples.mplayerhq.hu.nyud.net/V-codecs/h264/PAFF/Grey.ts + ./mplayer -vo vdpau -vc ffh264vdpau Grey.ts + http://samples.mplayerhq.hu.nyud.net/V-codecs/h264/nature_704x576_25Hz_1500kbits.h264 + ./mplayer -vo vdpau -vc ffh264vdpau nature_704x576_25Hz_1500kbits.h264 + + WMV3: http://download.microsoft.com.nyud.net/download/0/9/d/09d051c4-decc-4d39-9c57-f520187213a1/Amazing_Caves_720.exe + (use `unzip` to extract the .exe) + ./mplayer -vo vdpau -vc ffwmv3vdpau Amazing_Caves_720.wmv + + VC-1: http://samples.mplayerhq.hu.nyud.net/V-codecs/WVC1/FlightSimX_720p60_51_15Mbps.wmv + ./mplayer -vo vdpau -vc ffvc1vdpau FlightSimX_720p60_51_15Mbps.wmv + + Note: .nyud.net added to the above URLs to cache the content on CoralCDN (http://www.coralcdn.org/) + diff --git a/media-video/mplayer/files/disable-version-rebranding-2009-01.patch b/media-video/mplayer/files/disable-version-rebranding-2009-01.patch new file mode 100644 index 0000000..89dc33f --- /dev/null +++ b/media-video/mplayer/files/disable-version-rebranding-2009-01.patch @@ -0,0 +1,16 @@ +--- mplayer/Makefile.orig 2009-01-26 20:41:18.000000000 +0100 ++++ mplayer/Makefile 2009-01-26 20:42:40.000000000 +0100 +@@ -834,13 +834,6 @@ + help_mp.h: help/help_mp-en.h $(HELP_FILE) + help/help_create.sh $(HELP_FILE) $(CHARSET) + +-# rebuild version.h each time the working copy is updated +-ifeq ($(wildcard .svn/entries),.svn/entries) +-version.h: .svn/entries +-endif +-version.h: version.sh +- ./$< `$(CC) -dumpversion` +- + %(EXESUF): %.c + + diff --git a/media-video/mplayer/files/disable-version-rebranding.patch b/media-video/mplayer/files/disable-version-rebranding.patch new file mode 100644 index 0000000..1d2e707 --- /dev/null +++ b/media-video/mplayer/files/disable-version-rebranding.patch @@ -0,0 +1,15 @@ +--- mplayer-orig/Makefile 2008-05-28 14:28:39.000000000 +0200 ++++ mplayer/Makefile 2008-05-28 14:29:32.000000000 +0200 +@@ -745,12 +745,6 @@ + help_mp.h: help/help_mp-en.h $(HELP_FILE) + help/help_create.sh $(HELP_FILE) $(CHARSET) + +-# rebuild version.h each time the working copy is updated +-ifeq ($(wildcard .svn/entries),.svn/entries) +-version.h: .svn/entries +-endif +-version.h: +- ./version.sh `$(CC) -dumpversion` + + osdep/mplayer-rc.o: osdep/mplayer.rc version.h + $(WINDRES) -I. -o $@ $< diff --git a/media-video/mplayer/files/eac3-id.conf b/media-video/mplayer/files/eac3-id.conf new file mode 100644 index 0000000..bf0c4cd --- /dev/null +++ b/media-video/mplayer/files/eac3-id.conf @@ -0,0 +1,8 @@ + +audiocodec ffeac3 + info "FFmpeg EAC3" + status buggy + format 0x0 + driver ffmpeg + dll "E-AC3" + diff --git a/media-video/mplayer/files/mplayer.desktop b/media-video/mplayer/files/mplayer.desktop new file mode 100644 index 0000000..4bd9fe3 --- /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 %F +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/files/nellymoserenc.patch b/media-video/mplayer/files/nellymoserenc.patch new file mode 100644 index 0000000..b46af00 --- /dev/null +++ b/media-video/mplayer/files/nellymoserenc.patch @@ -0,0 +1,13 @@ +--- mplayer/libavcodec/nellymoserenc.c~ 2008-11-15 17:58:38.000000000 +0300 ++++ mplayer/libavcodec/nellymoserenc.c 2008-11-15 18:00:04.000000000 +0300 +@@ -38,6 +38,10 @@ + #include "nellymoser.h" + #include "avcodec.h" + #include "dsputil.h" ++#include ++#if !defined(INFINITY) && defined(HUGE_VAL) ++#define INFINITY HUGE_VAL ++#endif + + #define BITSTREAM_WRITER_LE + #include "bitstream.h" diff --git a/media-video/mplayer/mplayer-99999999.ebuild b/media-video/mplayer/mplayer-99999999.ebuild new file mode 100644 index 0000000..18ba9c3 --- /dev/null +++ b/media-video/mplayer/mplayer-99999999.ebuild @@ -0,0 +1,620 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="1" +ESVN_REPO_URI="svn://svn.mplayerhq.hu/mplayer/trunk" +ESVN_PROJECT="mplayer" + +inherit eutils flag-o-matic multilib subversion + +IUSE="3dnow 3dnowext +a52 +aac aalib +alsa altivec +amrnb +amrwb -arts +ass +bidi bindist bl +cddb +cdio cdparanoia -cpudetection -custom-cflags +-custom-cpuopts debug dga +dirac directfb doc +dts +dv dvb +dvd +dvdnav dxr3 ++enca +encode esd +faac +faad fbcon +ftp +gif ggi -gtk +iconv ipv6 jack +joystick +jpeg kernel_linux ladspa libcaca lirc +live lzo +mad +md5sum ++mmx mmxext mng +mp2 +mp3 musepack nas +nemesi +network openal +opengl oss ++png +pnm pulseaudio -pvr +quicktime radio +rar +real -realcodecs +rtc +-samba +schroedinger +sdl +speex sse sse2 ssse3 svga teletext tga +theora ++tremor +truetype +unicode v4l v4l2 vdpau vidix +vorbis -win32codecs +X +x264 +xanim xinerama +xscreensaver +xv +xvid +xvmc zoran" + +VIDEO_CARDS="s3virge mga tdfx nvidia vesa" + +for x in ${VIDEO_CARDS}; do + IUSE="${IUSE} video_cards_${x}" +done + +SRC_URI=" + !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/productive-1.0.tar.bz2 ) + svga? ( mirror://mplayer/contrib/svgalib/svgalib_helper-1.9.17-mplayer.tar.bz2 )" + +DESCRIPTION="A very versatile media player" +HOMEPAGE="http://www.mplayerhq.hu/" + +RDEPEND="sys-libs/ncurses + !bindist? ( + x86? ( + win32codecs? ( media-libs/win32codecs ) + realcodecs? ( media-libs/win32codecs + media-libs/realcodecs ) + ) + amd64? ( realcodecs? ( media-libs/amd64codecs ) ) + ) + aalib? ( media-libs/aalib ) + alsa? ( media-libs/alsa-lib ) + amrnb? ( media-libs/amrnb ) + amrwb? ( media-libs/amrwb ) + arts? ( kde-base/arts ) + ass? ( media-libs/freetype:2 + media-libs/fontconfig ) + openal? ( media-libs/openal ) + bidi? ( dev-libs/fribidi ) + cdio? ( dev-libs/libcdio ) + cdparanoia? ( media-sound/cdparanoia ) + dirac? ( media-video/dirac ) + directfb? ( dev-libs/DirectFB ) + dga? ( x11-libs/libXxf86dga ) + dts? ( media-libs/libdca ) + dv? ( media-libs/libdv ) + dvb? ( media-tv/linuxtv-dvb-headers ) + encode? ( + mp2? ( media-sound/twolame ) + mp3? ( media-sound/lame ) + faac? ( media-libs/faac ) + x264? ( >=media-libs/x264-0.0.20081006 ) + xvid? ( media-libs/xvid ) + ) + esd? ( media-sound/esound ) + enca? ( app-i18n/enca ) + faad? ( media-libs/faad2 ) + gif? ( media-libs/giflib ) + ggi? ( media-libs/libggi + media-libs/libggiwmh ) + gtk? ( media-libs/libpng + x11-libs/libXxf86vm + x11-libs/libXext + x11-libs/libXi + x11-libs/gtk+:2 ) + jpeg? ( media-libs/jpeg ) + ladspa? ( media-libs/ladspa-sdk ) + libcaca? ( media-libs/libcaca ) + lirc? ( app-misc/lirc ) + lzo? ( >=dev-libs/lzo-2 ) + mad? ( media-libs/libmad ) + mng? ( media-libs/libmng ) + musepack? ( >=media-libs/libmpcdec-1.2.2 ) + nas? ( media-libs/nas ) + opengl? ( virtual/opengl ) + png? ( media-libs/libpng ) + pnm? ( media-libs/netpbm ) + pulseaudio? ( media-sound/pulseaudio ) + rar? ( || ( app-arch/unrar + app-arch/rar + app-arch/unrar-gpl ) ) + samba? ( net-fs/samba ) + schroedinger? ( media-libs/schroedinger ) + sdl? ( media-libs/libsdl ) + speex? ( media-libs/speex ) + svga? ( media-libs/svgalib ) + theora? ( media-libs/libtheora ) + live? ( >=media-plugins/live-2007.02.20 ) + truetype? ( media-libs/freetype:2 + media-libs/fontconfig ) + vdpau? ( >=x11-drivers/nvidia-drivers-180.22 ) + vidix? ( x11-libs/libXxf86vm + x11-libs/libXext ) + vorbis? ( media-libs/libvorbis ) + xanim? ( media-video/xanim ) + xinerama? ( x11-libs/libXinerama + x11-libs/libXxf86vm + x11-libs/libXext ) + xscreensaver? ( x11-libs/libXScrnSaver ) + xv? ( x11-libs/libXv + x11-libs/libXxf86vm + x11-libs/libXext + xvmc? ( x11-libs/libXvMC ) ) + X? ( x11-libs/libXxf86vm + x11-libs/libXext + )" + +DEPEND="${RDEPEND} + doc? ( dev-libs/libxslt ) + dga? ( x11-proto/xf86dgaproto ) + dxr3? ( media-video/em8300-libraries ) + 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 ) + xscreensaver? ( x11-proto/scrnsaverproto ) + iconv? ( virtual/libiconv )" + +SLOT="0" +LICENSE="GPL-2" +KEYWORDS="" + +S="${WORKDIR}/${PN}" + +pkg_setup() { + + if [[ -n ${LINGUAS} ]]; then + elog "" + elog "MPlayer's build system uses the LINGUAS variable for both" + elog "output messages and which man pages to build. The first" + elog "language in the LINGUAS variable will be used to display" + elog "output messages. See bug #228799." + fi + + if use gtk; then + ewarn "" + ewarn "You've enabled the 'gtk' use flag which will build" + ewarn "GMPlayer, which is no longer actively developed upstream" + ewarn "and is not supported by Gentoo. There are alternatives" + ewarn "for a GUI frontend: smplayer, gnome-mplayer and kmplayer." + fi + + if use cpudetection; then + ewarn "" + ewarn "You've enabled the cpudetection flag. This feature is" + ewarn "included mainly for people who want to use the same" + ewarn "binary on another system with a different CPU architecture." + ewarn "MPlayer will already detect your CPU settings by default at" + ewarn "buildtime; this flag is used for runtime detection." + ewarn "You won't need this turned on if you are only building" + ewarn "mplayer for this system. Also, if your compile fails, try" + ewarn "disabling this use flag." + fi + + if use custom-cpuopts; then + ewarn "" + ewarn "You are using the custom-cpuopts flag which will" + ewarn "specifically allow you to enable / disable certain" + ewarn "CPU optimizations." + ewarn "" + ewarn "Most desktop users won't need this functionality, but it" + ewarn "is included for corner cases like cross-compiling and" + ewarn "certain profiles. If unsure, disable this flag and MPlayer" + ewarn "will automatically detect and use your available CPU" + ewarn "optimizations." + ewarn "" + ewarn "Using this flag means your build is unsupported, so" + ewarn "please make sure your CPU optimization use flags (3dnow" + ewarn "3dnowext mmx mmxext sse sse2 ssse3) are properly set." + fi +} + +src_unpack() { + subversion_src_unpack + + cd "${WORKDIR}" + 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 productive-1.0.tar.bz2 + + use svga && unpack "svgalib_helper-1.9.17-mplayer.tar.bz2" + + # For Version Branding + cd "${ESVN_STORE_DIR}/${ESVN_CO_DIR}/${ESVN_PROJECT}/${ESVN_REPO_URI##*/}" + ./version.sh + mv version.h "${S}" + + cd "${S}" + epatch "${FILESDIR}"/disable-version-rebranding-2009-01.patch + + # 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 + + # Fix polish spelling errors + [[ -n ${LINGUAS} ]] && sed -e 's:Zarządano:Zażądano:' -i help/help_mp-pl.h +} + +src_compile() { + + local myconf="" + + # 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}" + + # mplayer ebuild uses "use foo || --disable-foo" to forcibly disable + # compilation in almost every situation. The reason for this is + # because if --enable is used, it will force the build of that option, + # regardless of whether the dependency is available or not. + + ################ + #Optional features# + ############### + myconf="${myconf} --enable-menu" + myconf="${myconf} $(use_enable network)" + use ass || myconf="${myconf} --disable-ass" + use bidi || myconf="${myconf} --disable-fribidi" + use bl && myconf="${myconf} --enable-bl" + use enca || myconf="${myconf} --disable-enca" + use encode || myconf="${myconf} --disable-mencoder" + use ftp || myconf="${myconf} --disable-ftp" + use ipv6 || myconf="${myconf} --disable-inet6" + use lirc || myconf="${myconf} --disable-lirc --disable-lircc" + use nemesi || myconf="${myconf} --disable-nemesi" + use rar || myconf="${myconf} --disable-unrarexec" + use rtc || myconf="${myconf} --disable-rtc" + use samba || myconf="${myconf} --disable-smb" + use xscreensaver || myconf="${myconf} --disable-xss" + myconf="${myconf} $(use_enable joystick)" + + # libcdio support: prefer libcdio over cdparanoia + # don't check for cddb w/cdio + if use cdio; then + myconf="${myconf} --disable-cdparanoia" + else + myconf="${myconf} --disable-libcdio" + use cdparanoia || myconf="${myconf} --disable-cdparanoia" + use cddb || myconf="${myconf} --disable-cddb" + fi + + ############### + # DVD read, navigation support + ############### + # + # dvdread - accessing a DVD + # dvdnav - navigation of menus + # + # internal dvdread and dvdnav use flags enable internal + # versions of the libraries, which are snapshots of the fork. + # + # Only check for disabled a52 use flag inside the DVD check, + # since many users were getting confused why there was no + # audio stream. + # + if use dvd; then + use dvdnav || myconf="${myconf} --disable-dvdnav" + else + myconf="${myconf} --disable-dvdnav --disable-dvdread \ + --disable-dvdread-internal --disable-libdvdcss-internal" + use a52 || myconf="${myconf} --disable-liba52-internal" + fi + + ############### + # Subtitles + ############### + # + # SRT/ASS/SSA (subtitles) requires freetype support + # freetype support requires iconv + # iconv optionally can use unicode + if ! use ass; then + 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" + + ############### + # DVB / Video4Linux / Radio support + ############### + myconf="${myconf} --disable-tv-bsdbt848" + # broken upstream, won't work with recent kernels + myconf="${myconf} --disable-ivtv" + if { use dvb || use v4l || use v4l2 || use pvr || use radio; }; then + use dvb || myconf="${myconf} --disable-dvb --disable-dvbhead" + use pvr || myconf="${myconf} --disable-pvr" + use v4l || myconf="${myconf} --disable-tv-v4l1" + use v4l2 || myconf="${myconf} --disable-tv-v4l2" + use teletext || myconf="${myconf} --disable-tv-teletext" + if use radio && { use dvb || use v4l || use v4l2; }; 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 --disable-tv-teletext \ + --disable-v4l2 --disable-pvr" + fi + + ######### + # Codecs # + ######## + # Won't work with external liba52 + myconf="${myconf} --disable-liba52" + + use aac || myconf="${myconf} --disable-faad-internal" + use amrnb || myconf="${myconf} --disable-libamr_nb" + use amrwb || myconf="${myconf} --disable-libamr_wb" + use dirac || myconf="${myconf} --disable-libdirac-lavc" + use dts || myconf="${myconf} --disable-libdca" + use dv || myconf="${myconf} --disable-libdv" + use faad || myconf="${myconf} --disable-faad" + use lzo || myconf="${myconf} --disable-liblzo" + use mp3 || myconf="${myconf} --disable-mp3lame --disable-mp3lame-lavc \ + --disable-mp3lib" + use schroedinger || myconf="${myconf} --disable-libschroedinger-lavc" + use xanim && myconf="${myconf} --xanimcodecsdir=/usr/lib/xanim/mods" + ! use png && ! use gtk && myconf="${myconf} --disable-png" + for x in gif jpeg live mad mng musepack pnm speex tga theora xanim; do + use ${x} || myconf="${myconf} --disable-${x}" + done + if use vorbis || use tremor; then + use tremor || myconf="${myconf} --disable-tremor-internal" + use vorbis || myconf="${myconf} --disable-libvorbis" + else + myconf="${myconf} --disable-tremor-internal --disable-tremor \ + --disable-libvorbis" + fi + # Encoding + if use encode; then + use aac || myconf="${myconf} --disable-faac-lavc" + use faac || myconf="${myconf} --disable-faac" + use x264 || myconf="${myconf} --disable-x264" + use xvid || myconf="${myconf} --disable-xvid" + use mp2 || myconf="${myconf} --disable-twolame --disable-toolame" + else + myconf="${myconf} --disable-faac-lavc --disable-faac --disable-x264 \ + --disable-xvid --disable-x264-lavc --disable-xvid-lavc \ + --disable-twolame --disable-toolame" + fi + + ############### + # Binary codecs + ############### + # bug 213836 + if ! use x86 || ! use win32codecs; then + use quicktime || myconf="${myconf} --disable-qtx" + fi + + ############### + # RealPlayer support + ############### + # + # Realplayer support shows up in four places: + # - libavcodec (internal) + # - win32codecs + # - realcodecs (win32codecs libs) + # - realcodecs (realplayer libs) + # + + # internal + use real || myconf="${myconf} --disable-real" + + # Real binary codec support only available on x86, amd64 + if use realcodecs; then + use x86 && myconf="${myconf} \ + --realcodecsdir=/opt/RealPlayer/codecs" + use amd64 && myconf="${myconf} \ + --realcodecsdir=/usr/$(get_libdir)/codecs" + elif ! use bindist; then + myconf="${myconf} $(use_enable win32codecs win32dll)" + fi + + ############# + # Video Output # + ############# + for x in directfb ggi md5sum sdl xinerama; do + use ${x} || myconf="${myconf} --disable-${x}" + done + use aalib || myconf="${myconf} --disable-aa" + use dga || myconf="${myconf} --disable-dga1 --disable-dga2" + 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_vesa || myconf="${myconf} --disable-vesa" + use video_cards_nvidia && use vdpau || myconf="${myconf} --disable-vdpau" + use vidix || myconf="${myconf} --disable-vidix --disable-vidix-pcidb" + use zoran || myconf="${myconf} --disable-zr" + + # MPlayer incorrectly looks for DXR3 support, so forcibly enable + # if requested. See bug 223587 + myconf="${myconf} $(use_enable dxr3)" + + # GTK gmplayer gui + # Unsupported by Gentoo, upstream has dropped development + 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 kernel_linux && ! use video_cards_mga; then + myconf="${myconf} --disable-mga --disable-xmga" + 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 ladspa nas openal; do + use ${x} || myconf="${myconf} --disable-${x}" + done + use pulseaudio || myconf="${myconf} --disable-pulse" + if ! use radio; then + use oss || myconf="${myconf} --disable-ossaudio" + fi + + ################# + # Advanced Options # + ################# + # Platform specific flags, hardcoded on amd64 (see below) + if use cpudetection; then + myconf="${myconf} --enable-runtime-cpudetection" + fi + + # Turning off CPU optimizations usually will break the build. + # However, this use flag, if enabled, will allow users to completely + # specify which ones to use. If disabled, mplayer will automatically + # enable all CPU optimizations that the host build supports. + if use custom-cpuopts; then + for x in 3dnow 3dnowext mmx mmxext sse sse2 ssse3; do + myconf="${myconf} $(use_enable $x)" + done + fi + + use debug && myconf="${myconf} --enable-debug=3" + + myconf="${myconf} $(use_enable altivec)" + + if use custom-cflags; then + # ugly optimizations cause MPlayer to cry on x86 systems! + if use x86 || use x86-fbsd ; then + replace-flags -O* -O2 + filter-flags -fPIC -fPIE + + use debug || 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) \ + ${myconf}" + + #echo "CFLAGS=\"${CFLAGS}\" ./configure ${myconf}" + CFLAGS="${CFLAGS}" ./configure ${myconf} || die "configure died" + + emake || die "Failed to build MPlayer!" + use doc && make -C DOCS/xml html-chunked +} + +src_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" \ + INSTALLSTRIP="" \ + install || die "Failed to install MPlayer!" + + dodoc AUTHORS Changelog Copyright README etc/codecs.conf + + docinto tech/ + dodoc DOCS/tech/{*.txt,MAINTAINERS,mpsub.sub,playtree,TODO,wishlist} + docinto tech/realcodecs/ + dodoc DOCS/tech/realcodecs/* + docinto tech/mirrors/ + dodoc DOCS/tech/mirrors/* + + docinto TOOLS/ + dodoc TOOLS/* + docinto TOOLS/realcodecs/ + dodoc TOOLS/realcodecs/* + + if use gtk; then + dodir /usr/share/mplayer/skins + cp -r "${WORKDIR}/productive" \ + "${D}/usr/share/mplayer/skins/default" || die "cp skins died" + + # Fix the symlink + rm -rf "${D}/usr/bin/gmplayer" + dosym mplayer /usr/bin/gmplayer + fi + + if ! use ass && ! 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 ass || use truetype; then + cat >> "${D}/etc/mplayer/mplayer.conf" << EOT +fontconfig=1 +subfont-osd-scale=4 +subfont-text-scale=3 +EOT + fi + + # bug 256203 + if use rar; then + cat >> "${D}/etc/mplayer/mplayer.conf" << EOT +unrarexec=/usr/bin/unrar +EOT + fi + + dosym ../../../etc/mplayer/mplayer.conf /usr/share/mplayer/mplayer.conf + + newbin "${S}/TOOLS/midentify.sh" 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_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 +} -- 2.11.4.GIT