summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMagnus Granberg <zorry@ume.nu>2009-08-30 01:11:51 +0200
committerMagnus Granberg <zorry@ume.nu>2009-08-30 01:11:51 +0200
commitfb6bdc898d237909c21f3324f12df453fae53dfc (patch)
tree032892e7fa1f8d929f6b005dc7177bad247cde9c
parentMore updates to the README file part2 (diff)
downloadhardened-dev-fb6bdc898d237909c21f3324f12df453fae53dfc.tar.gz
hardened-dev-fb6bdc898d237909c21f3324f12df453fae53dfc.tar.bz2
hardened-dev-fb6bdc898d237909c21f3324f12df453fae53dfc.zip
Added media-libs/xine-lib-1.1.16.3-r2 for testing bug #164425
-rw-r--r--media-libs/xine-lib/ChangeLog11
-rw-r--r--media-libs/xine-lib/Manifest6
-rw-r--r--media-libs/xine-lib/files/xine-lib-1.1.15-pic-fix.patch657
-rw-r--r--media-libs/xine-lib/files/xine-lib-1.1.16.3-libmpcdecsv7.patch38
-rw-r--r--media-libs/xine-lib/metadata.xml70
-rw-r--r--media-libs/xine-lib/xine-lib-1.1.16.3-r2.ebuild188
6 files changed, 970 insertions, 0 deletions
diff --git a/media-libs/xine-lib/ChangeLog b/media-libs/xine-lib/ChangeLog
new file mode 100644
index 00000000..ab0dcfda
--- /dev/null
+++ b/media-libs/xine-lib/ChangeLog
@@ -0,0 +1,11 @@
+# ChangeLog for media-libs/xine-lib
+# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+*xine-lib-1.1.16.3-r2 (29 Aug 2009)
+
+ 29 Aug 2009; Magnus Granberg <zorry@ume.nu>
+ +files/xine-lib-1.1.15-pic-fix.patch, +xine-lib-1.1.16.3-r2.ebuild,
+ +files/xine-lib-1.1.16.3-libmpcdecsv7.patch, +metadata.xml:
+ Fix bug #164425 Thanks PaX Team
+
diff --git a/media-libs/xine-lib/Manifest b/media-libs/xine-lib/Manifest
new file mode 100644
index 00000000..82bff20e
--- /dev/null
+++ b/media-libs/xine-lib/Manifest
@@ -0,0 +1,6 @@
+AUX xine-lib-1.1.15-pic-fix.patch 31285 RMD160 c14dfecc382060bd03537848e4190c0f031efcdf SHA1 9ccea43eba1397e5c65909f0ecc808fe7061e8a1 SHA256 92d67efccd0d0e9c26f349ea0007fa22a5bcf738e8929070787e92686cb858bb
+AUX xine-lib-1.1.16.3-libmpcdecsv7.patch 1798 RMD160 57ea11ed7ab5d345b588017ff38fde8cd4e2db59 SHA1 0f62d6d60809c641ae8147774225c113620f8a19 SHA256 111ecc67d11cb0847b2bf7ded7db776a08651ee5171d92da6a30f10430a3623b
+DIST xine-lib-1.1.16.3.tar.bz2 7468182 RMD160 279304a4e998472b2b5e79887e54c47765044ec6 SHA1 64c57c5f55ff37023cc4c3d93d4df3c06950d235 SHA256 d25a241efa55dc7d8f482336efa8bb7b9bb9d69b6df8a8a37f2660948fd67b52
+EBUILD xine-lib-1.1.16.3-r2.ebuild 5676 RMD160 7cbe0d98989b9baca80cbcb6d32bb24cf9da4586 SHA1 d186cb33de25fcbedffc867e1b5e2108c45a6d25 SHA256 a2f9ab50f439c0b6e6d51d925ca120b4f8079a9c1d51a32c135329518830cb0e
+MISC ChangeLog 370 RMD160 f22d25a7933a6df6565a367c3ef1b074888dade6 SHA1 297a6efe447edfdaa34276ef1a93d9644dfeaeed SHA256 fefc012ceffd6b7a7c0f510d09e70529bf978169727f991a514e14b9ee38842c
+MISC metadata.xml 2914 RMD160 bed4bab81a32b49e4923ddfcc02e8338a45ef7ef SHA1 fe3faf7dba7f929241acfe5eaa17b2f66bfb2722 SHA256 efe3b879c59c9971e1ffcd732c2bdbd8f60f2b173fde675a371202ceeb96b0fe
diff --git a/media-libs/xine-lib/files/xine-lib-1.1.15-pic-fix.patch b/media-libs/xine-lib/files/xine-lib-1.1.15-pic-fix.patch
new file mode 100644
index 00000000..71e1bf41
--- /dev/null
+++ b/media-libs/xine-lib/files/xine-lib-1.1.15-pic-fix.patch
@@ -0,0 +1,657 @@
+2008-09-20 PaX Team <pageexec@freemail.hu>
+
+ #164425 bugs.gentoo.org
+ * /usr/lib/xine/plugins/1.24/post/xineplug_post_tvtime.so Fix TEXTREL
+
+diff -rup xine-lib-1.1.15-old/src/post/deinterlace/plugins/tomsmocomp/SearchLoop0A.inc xine-lib-1.1.15/src/post/deinterlace/plugins/tomsmocomp/SearchLoop0A.inc
+--- xine-lib-1.1.15-old/src/post/deinterlace/plugins/tomsmocomp/SearchLoop0A.inc 2008-04-17 18:53:59.000000000 +0200
++++ xine-lib-1.1.15/src/post/deinterlace/plugins/tomsmocomp/SearchLoop0A.inc 2008-09-20 12:04:56.000000000 +0200
+@@ -7,9 +7,9 @@
+ // up by a little, and adjust later
+
+ #ifdef IS_SSE2
+- "paddusb "MANGLE(ONES)", %%xmm7\n\t" // bias toward no motion
++ "paddusb "_ONES", %%xmm7\n\t" // bias toward no motion
+ #else
+- "paddusb "MANGLE(ONES)", %%mm7\n\t" // bias toward no motion
++ "paddusb "_ONES", %%mm7\n\t" // bias toward no motion
+ #endif
+
+ MERGE4PIXavg("(%%"XDI", %%"XCX")", "(%%"XSI", %%"XCX")") // center, in old and new
+diff -rup xine-lib-1.1.15-old/src/post/deinterlace/plugins/tomsmocomp/SearchLoopBottom.inc xine-lib-1.1.15/src/post/deinterlace/plugins/tomsmocomp/SearchLoopBottom.inc
+--- xine-lib-1.1.15-old/src/post/deinterlace/plugins/tomsmocomp/SearchLoopBottom.inc 2008-04-17 18:53:59.000000000 +0200
++++ xine-lib-1.1.15/src/post/deinterlace/plugins/tomsmocomp/SearchLoopBottom.inc 2008-09-20 12:04:56.000000000 +0200
+@@ -18,7 +18,7 @@
+ // Use the best weave if diffs less than 10 as that
+ // means the image is still or moving cleanly
+ // if there is motion we will clip which will catch anything
+- "psubusb "MANGLE(FOURS)", %%mm7\n\t" // sets bits to zero if weave diff < 4
++ "psubusb "_FOURS", %%mm7\n\t" // sets bits to zero if weave diff < 4
+ "pxor %%mm0, %%mm0\n\t"
+ "pcmpeqb %%mm0, %%mm7\n\t" // all ff where weave better, else 00
+ "pcmpeqb %%mm7, %%mm0\n\t" // all ff where bob better, else 00
+@@ -28,10 +28,10 @@
+ #else
+ // Use the better of bob or weave
+ // pminub mm4, TENS // the most we care about
+- V_PMINUB ("%%mm4", MANGLE(TENS), "%%mm0") // the most we care about
++ V_PMINUB ("%%mm4", _TENS, "%%mm0") // the most we care about
+
+ "psubusb %%mm4, %%mm7\n\t" // foregive that much from weave est?
+- "psubusb "MANGLE(FOURS)", %%mm7\n\t" // bias it a bit toward weave
++ "psubusb "_FOURS", %%mm7\n\t" // bias it a bit toward weave
+ "pxor %%mm0, %%mm0\n\t"
+ "pcmpeqb %%mm0, %%mm7\n\t" // all ff where weave better, else 00
+ "pcmpeqb %%mm7, %%mm0\n\t" // all ff where bob better, else 00
+@@ -42,39 +42,39 @@
+
+
+ // pminub mm0, Max_Vals // but clip to catch the stray error
+-// V_PMINUB ("%%mm0", MANGLE(Max_Vals), "%%mm1") // but clip to catch the stray error
++// V_PMINUB ("%%mm0", _Max_Vals, "%%mm1") // but clip to catch the stray error
+ // pmaxub mm0, Min_Vals
+-// V_PMAXUB ("%%mm0", MANGLE(Min_Vals))
++// V_PMAXUB ("%%mm0", _Min_Vals)
+
+ #endif
+
+
+ MOVX" "_pDest", %%"XAX"\n\t"
+-
++ ADDX" "_olddx", %%"XAX"\n\t"
++
+ #ifdef USE_VERTICAL_FILTER
+ "movq %%mm0, %%mm1\n\t"
+- // pavgb mm0, qword ptr["XBX"]
+- V_PAVGB ("%%mm0", "(%%"XBX")", "%%mm2", MANGLE(ShiftMask))
+- // movntq qword ptr["XAX"+"XDX"], mm0
+- V_MOVNTQ ("(%"XAX", %%"XDX")", "%%mm0")
+- // pavgb mm1, qword ptr["XBX"+"XCX"]
+- V_PAVGB ("%%mm1", "(%%"XBX", %%"XCX")", "%%mm2", MANGLE(ShiftMask))
+- "addq "_dst_pitchw", %%"XBX
+- // movntq qword ptr["XAX"+"XDX"], mm1
+- V_MOVNTQ ("(%%"XAX", %%"XDX")", "%%mm1")
++ // pavgb mm0, qword ptr["XDX"]
++ V_PAVGB ("%%mm0", "(%%"XDX")", "%%mm2", _ShiftMask)
++ // movntq qword ptr["XAX"+"_olddx"], mm0
++ V_MOVNTQ ("(%"XAX")", "%%mm0")
++ // pavgb mm1, qword ptr["XDX"+"XCX"]
++ V_PAVGB ("%%mm1", "(%%"XDX", %%"XCX")", "%%mm2", _ShiftMask)
++ "addq "_dst_pitchw", %%"XDX
++ // movntq qword ptr["XAX"+"_olddx"], mm1
++ V_MOVNTQ ("(%%"XAX")", "%%mm1")
+ #else
+
+- // movntq qword ptr["XAX"+"XDX"], mm0
+- V_MOVNTQ ("(%%"XAX", %%"XDX")", "%%mm0")
++ // movntq qword ptr["XAX"+"_olddx"], mm0
++ V_MOVNTQ ("(%%"XAX")", "%%mm0")
+ #endif
+
+- LEAX" 8(%%"XDX"), %%"XDX"\n\t" // bump offset pointer
+- CMPX" "_Last8", %%"XDX"\n\t" // done with line?
++ ADDX" $8, "_olddx"\n\t" // bump offset pointer
++ MOVX" "_olddx", %%"XAX"\n\t"
++ CMPX" "_Last8", %%"XAX"\n\t" // done with line?
+ "jb 1b\n\t" // y
+ #endif
+
+- MOVX" "_oldbx", %%"XBX"\n\t"
+-
+ : /* no outputs */
+
+ : "m"(pBob),
+@@ -85,7 +85,17 @@
+ "m"(pSrc),
+ "m"(pSrcP),
+ "m"(pBobP),
+- "m"(oldbx)
++ "m"(olddx),
++ "m"(UVMask),
++ "m"(ShiftMask),
++ "m"(FOURS),
++ "m"(TENS),
++ "m"(Max_Vals),
++ "m"(Min_Vals),
++ "m"(YMask),
++ "m"(Max_Mov),
++ "m"(ONES),
++ "m"(DiffThres)
+
+ : XAX, XCX, XDX, XSI, XDI,
+ #ifdef ARCH_X86
+diff -rup xine-lib-1.1.15-old/src/post/deinterlace/plugins/tomsmocomp/SearchLoopTop.inc xine-lib-1.1.15/src/post/deinterlace/plugins/tomsmocomp/SearchLoopTop.inc
+--- xine-lib-1.1.15-old/src/post/deinterlace/plugins/tomsmocomp/SearchLoopTop.inc 2008-04-17 18:53:59.000000000 +0200
++++ xine-lib-1.1.15/src/post/deinterlace/plugins/tomsmocomp/SearchLoopTop.inc 2008-09-20 12:04:56.000000000 +0200
+@@ -66,7 +66,17 @@ long dst_pitchw = dst_pitch; // local s
+ #define _pSrc "%5"
+ #define _pSrcP "%6"
+ #define _pBobP "%7"
+-#define _oldbx "%8"
++#define _olddx "%8"
++#define _UVMask "%9"
++#define _ShiftMask "%10"
++#define _FOURS "%11"
++#define _TENS "%12"
++#define _Max_Vals "%13"
++#define _Min_Vals "%14"
++#define _YMask "%15"
++#define _Max_Mov "%16"
++#define _ONES "%17"
++#define _DiffThres "%18"
+ #endif
+
+ for (y=1; y < FldHeight-1; y++)
+@@ -77,75 +87,75 @@ long dst_pitchw = dst_pitch; // local s
+ // Loop general reg usage
+ //
+ // XAX - pBobP, then pDest
+- // XBX - pBob
++ // XDX - pBob
+ // XCX - src_pitch2
+- // XDX - current offset
++ // _olddx - current offset
+ // XDI - prev weave pixels, 1 line up
+ // XSI - next weave pixels, 1 line up
+
+- // Save "XBX" (-fPIC)
+- MOVX" %%"XBX", "_oldbx"\n\t"
+-
+ #ifdef IS_SSE2
+
+ // sse2 code deleted for now
+
+ #else
+ // simple bob first 8 bytes
+- MOVX" "_pBob", %%"XBX"\n\t"
++ MOVX" "_pBob", %%"XDX"\n\t"
+ MOVX" "_src_pitch2", %%"XCX"\n\t"
+
+ #ifdef USE_VERTICAL_FILTER
+- "movq (%%"XBX"), %%mm0\n\t"
+- "movq (%%"XBX", %%"XCX"), %%mm1\n\t" //, qword ptr["XBX"+"XCX"]
++ "movq (%%"XDX"), %%mm0\n\t"
++ "movq (%%"XDX", %%"XCX"), %%mm1\n\t" //, qword ptr["XDX"+"XCX"]
+ "movq %%mm0, %%mm2\n\t"
+- V_PAVGB ("%%mm2", "%%mm1", "%%mm3", MANGLE(ShiftMask)) // halfway between
+- V_PAVGB ("%%mm0", "%%mm2", "%%mm3", MANGLE(ShiftMask)) // 1/4 way
+- V_PAVGB ("%%mm1", "%%mm2", "%%mm3", MANGLE(ShiftMask)) // 3/4 way
++ V_PAVGB ("%%mm2", "%%mm1", "%%mm3", _ShiftMask) // halfway between
++ V_PAVGB ("%%mm0", "%%mm2", "%%mm3", _ShiftMask) // 1/4 way
++ V_PAVGB ("%%mm1", "%%mm2", "%%mm3", _ShiftMask) // 3/4 way
+ MOVX" "_pDest", %%"XDI"\n\t"
+ MOVX" "_dst_pitchw", %%"XAX"\n\t"
+ V_MOVNTQ ("(%%"XDI")", "%%mm0")
+ V_MOVNTQ ("(%%"XDI", %%"XAX")", "%%mm1") // qword ptr["XDI"+"XAX"], mm1
+
+ // simple bob last 8 bytes
+- MOVX" "_Last8", %%"XDX"\n\t"
+- LEAX" (%%"XBX", %%"XDX"), %%"XSI"\n\t" // ["XBX"+"XDX"]
++ MOVX" "_Last8", %%"XSI"\n\t"
++ MOVX" %%"XSI", "_olddx"\n\t"
++ ADDX" %%"XDX", %%"XSI"\n\t" // ["XDX"+"_olddx"]
+ "movq (%%"XSI"), %%mm0\n\t"
+ "movq (%%"XSI", %%"XCX"), %%mm1\n\t" // qword ptr["XSI"+"XCX"]
+ "movq %%mm0, %%mm2\n\t"
+- V_PAVGB ("%%mm2", "%%mm1", "%%mm3", MANGLE(ShiftMask)) // halfway between
+- V_PAVGB ("%%mm0", "%%mm2", "%%mm3", MANGLE(ShiftMask)) // 1/4 way
+- V_PAVGB ("%%mm1", "%%mm2", "%%mm3", MANGLE(ShiftMask)) // 3/4 way
+- ADDX" %%"XDX", %%"XDI"\n\t" // last 8 bytes of dest
++ V_PAVGB ("%%mm2", "%%mm1", "%%mm3", _ShiftMask) // halfway between
++ V_PAVGB ("%%mm0", "%%mm2", "%%mm3", _ShiftMask) // 1/4 way
++ V_PAVGB ("%%mm1", "%%mm2", "%%mm3", _ShiftMask) // 3/4 way
++ ADDX" "_olddx", %%"XDI"\n\t" // last 8 bytes of dest
+ V_MOVNTQ ("%%"XDI"", "%%mm0")
+ V_MOVNTQ ("(%%"XDI", %%"XAX")", "%%mm1") // qword ptr["XDI"+"XAX"], mm1)
+
+ #else
+- "movq (%%"XBX"), %%mm0\n\t"
+- // pavgb mm0, qword ptr["XBX"+"XCX"]
+- V_PAVGB ("%%mm0", "(%%"XBX", %%"XCX")", "%%mm2", MANGLE(ShiftMask)) // qword ptr["XBX"+"XCX"], mm2, ShiftMask)
++ "movq (%%"XDX"), %%mm0\n\t"
++ // pavgb mm0, qword ptr["XDX"+"XCX"]
++ V_PAVGB ("%%mm0", "(%%"XDX", %%"XCX")", "%%mm2", _ShiftMask) // qword ptr["XDX"+"XCX"], mm2, ShiftMask)
+ MOVX" "_pDest", %%"XDI"\n\t"
+ V_MOVNTQ ("(%%"XDI")", "%%mm0")
+
+ // simple bob last 8 bytes
+- MOVX" "_Last8", %%"XDX"\n\t"
+- LEAX" (%%"XBX", %%"XDX"), %%"XSI"\n\t" //"XSI", ["XBX"+"XDX"]
++ MOVX" "_Last8", %%"XSI"\n\t"
++ MOVX" %%"XSI", "_olddx"\n\t"
++ ADDX" %%"XDX", %%"XSI"\n\t" //"XSI", ["XDX"+"_olddx"]
+ "movq (%%"XSI"), %%mm0\n\t"
+ // pavgb mm0, qword ptr["XSI"+"XCX"]
+- V_PAVGB ("%%mm0", "(%%"XSI", %%"XCX")", "%%mm2", MANGLE(ShiftMask)) // qword ptr["XSI"+"XCX"], mm2, ShiftMask)
+- V_MOVNTQ ("(%%"XDI", %%"XDX")", "%%mm0") // qword ptr["XDI"+"XDX"], mm0)
++ V_PAVGB ("%%mm0", "(%%"XSI", %%"XCX")", "%%mm2", _ShiftMask) // qword ptr["XSI"+"XCX"], mm2, ShiftMask)
++ ADDX" "_olddx", %%"XDI"\n\t"
++ V_MOVNTQ ("(%%"XDI")", "%%mm0") // qword ptr["XDI"+"_olddx"], mm0)
+ #endif
+ // now loop and get the middle qwords
+ MOVX" "_pSrc", %%"XSI"\n\t"
+ MOVX" "_pSrcP", %%"XDI"\n\t"
+- MOVX" $8, %%"XDX"\n\t" // curr offset longo all lines
++ MOVX" $8, "_olddx"\n\t" // curr offset longo all lines
+
+ "1:\n\t"
+ MOVX" "_pBobP", %%"XAX"\n\t"
+ ADDX" $8, %%"XDI"\n\t"
+ ADDX" $8, %%"XSI"\n\t"
+- ADDX" $8, %%"XBX"\n\t"
+- ADDX" %%"XDX", %%"XAX"\n\t"
++ ADDX" $8, %%"XDX"\n\t"
++ ADDX" "_olddx", %%"XAX"\n\t"
+
+ #ifdef USE_STRANGE_BOB
+ #include "StrangeBob.inc"
+diff -rup xine-lib-1.1.15-old/src/post/deinterlace/plugins/tomsmocomp/StrangeBob.inc xine-lib-1.1.15/src/post/deinterlace/plugins/tomsmocomp/StrangeBob.inc
+--- xine-lib-1.1.15-old/src/post/deinterlace/plugins/tomsmocomp/StrangeBob.inc 2008-04-17 18:53:59.000000000 +0200
++++ xine-lib-1.1.15/src/post/deinterlace/plugins/tomsmocomp/StrangeBob.inc 2008-09-20 12:04:56.000000000 +0200
+@@ -31,22 +31,22 @@
+ "pxor %%mm6, %%mm6\n\t"
+ "pxor %%mm7, %%mm7\n\t"
+
+- "movq -2(%%"XBX"), %%mm0\n\t" // value a from top left
+- "movq -4(%%"XBX", %%"XCX"), %%mm1\n\t" // value m from bottom right
++ "movq -2(%%"XDX"), %%mm0\n\t" // value a from top left
++ "movq -4(%%"XDX", %%"XCX"), %%mm1\n\t" // value m from bottom right
+
+ "movq %%mm0, %%mm3\n\t"
+ "psubusb %%mm1, %%mm3\n\t"
+ "psubusb %%mm0, %%mm1\n\t"
+ "por %%mm1, %%mm3\n\t" // abs(a,m)
+
+- "psubusb "MANGLE(DiffThres)", %%mm3\n\t" // nonzero where abs(a,m) > Thres else 0
++ "psubusb "_DiffThres", %%mm3\n\t" // nonzero where abs(a,m) > Thres else 0
+ "pxor %%mm4, %%mm4\n\t"
+ "pcmpeqb %%mm4, %%mm3\n\t" // now ff where abs(a,m) < Thres, else 00
+ "pcmpeqb %%mm3, %%mm4\n\t" // here ff where abs(a,m) > Thres, else 00
+
+
+- "movq -4(%%"XBX"), %%mm0\n\t" // value j
+- "movq 4(%%"XBX", %%"XCX"), %%mm1\n\t" // value n
++ "movq -4(%%"XDX"), %%mm0\n\t" // value j
++ "movq 4(%%"XDX", %%"XCX"), %%mm1\n\t" // value n
+ "movq %%mm0, %%mm2\n\t"
+ "pavgb %%mm1, %%mm2\n\t" // avg(j,n)
+ "movq %%mm0, %%mm3\n\t"
+@@ -55,7 +55,7 @@
+ "por %%mm1, %%mm0\n\t" // abs(j,n)
+
+ "movq %%mm0, %%mm1\n\t"
+- "psubusb "MANGLE(DiffThres)", %%mm1\n\t" // nonzero where abs(j,n) > Thres else 0
++ "psubusb "_DiffThres", %%mm1\n\t" // nonzero where abs(j,n) > Thres else 0
+ "pxor %%mm3, %%mm3\n\t"
+ "pcmpeqb %%mm3, %%mm1\n\t" // now ff where abs(j,n) < Thres, else 00
+
+@@ -75,31 +75,31 @@
+ "por %%mm0, %%mm7\n\t"
+
+ // k & m
+- "movq 2(%%"XBX"), %%mm0\n\t" // value c from top left
+- "movq 4(%%"XBX", %%"XCX"), %%mm1\n\t" // value n from bottom right
++ "movq 2(%%"XDX"), %%mm0\n\t" // value c from top left
++ "movq 4(%%"XDX", %%"XCX"), %%mm1\n\t" // value n from bottom right
+
+ "movq %%mm0, %%mm3\n\t"
+ "psubusb %%mm1, %%mm3\n\t"
+ "psubusb %%mm0, %%mm1\n\t"
+ "por %%mm1, %%mm3\n\t" // abs(c,n)
+
+- "psubusb "MANGLE(DiffThres)", %%mm3\n\t" // nonzero where abs(c,n) > Thres else 0
++ "psubusb "_DiffThres", %%mm3\n\t" // nonzero where abs(c,n) > Thres else 0
+ "pxor %%mm4, %%mm4\n\t"
+ "pcmpeqb %%mm4, %%mm3\n\t" // now ff where abs(c,n) < Thres, else 00
+ "pcmpeqb %%mm3, %%mm4\n\t" // here ff where abs(c,n) > Thres, else 00
+
+
+- "movq 4(%%"XBX"), %%mm0\n\t" // value k
+- "movq -4(%%"XBX", %%"XCX"), %%mm1\n\t" // value m
++ "movq 4(%%"XDX"), %%mm0\n\t" // value k
++ "movq -4(%%"XDX", %%"XCX"), %%mm1\n\t" // value m
+ "movq %%mm0, %%mm2\n\t"
+- V_PAVGB ("%%mm2", "%%mm1", "%%mm3", MANGLE(ShiftMask)) // avg(k,m)
++ V_PAVGB ("%%mm2", "%%mm1", "%%mm3", _ShiftMask) // avg(k,m)
+ "movq %%mm0, %%mm3\n\t"
+ "psubusb %%mm1, %%mm0\n\t"
+ "psubusb %%mm3, %%mm1\n\t"
+ "por %%mm1, %%mm0\n\t" // abs(k,m)
+
+ "movq %%mm0, %%mm1\n\t"
+- "psubusb "MANGLE(DiffThres)", %%mm1\n\t" // nonzero where abs(k,m) > Thres else 0
++ "psubusb "_DiffThres", %%mm1\n\t" // nonzero where abs(k,m) > Thres else 0
+ "pxor %%mm3, %%mm3\n\t"
+ "pcmpeqb %%mm3, %%mm1\n\t" // now ff where abs(k,m) < Thres, else 00
+
+@@ -120,30 +120,30 @@
+
+
+ // c & d
+- "movq (%%"XBX"), %%mm0\n\t" // value b from top left
+- "movq 2(%%"XBX", %%"XCX"), %%mm1\n\t" // value f from bottom right
++ "movq (%%"XDX"), %%mm0\n\t" // value b from top left
++ "movq 2(%%"XDX", %%"XCX"), %%mm1\n\t" // value f from bottom right
+
+ "movq %%mm0, %%mm3\n\t"
+ "psubusb %%mm1, %%mm3\n\t"
+ "psubusb %%mm0, %%mm1\n\t"
+ "por %%mm1, %%mm3\n\t" // abs(b,f)
+
+- "psubusb "MANGLE(DiffThres)", %%mm3\n\t" // nonzero where abs(b,f) > Thres else 0
++ "psubusb "_DiffThres", %%mm3\n\t" // nonzero where abs(b,f) > Thres else 0
+ "pxor %%mm4, %%mm4\n\t"
+ "pcmpeqb %%mm4, %%mm3\n\t" // now ff where abs(b,f) < Thres, else 00
+ "pcmpeqb %%mm3, %%mm4\n\t" // here ff where abs(b,f) > Thres, else 00
+
+- "movq 2(%%"XBX"), %%mm0\n\t" // value c
+- "movq -2(%%"XBX", %%"XCX"), %%mm1\n\t" // value d
++ "movq 2(%%"XDX"), %%mm0\n\t" // value c
++ "movq -2(%%"XDX", %%"XCX"), %%mm1\n\t" // value d
+ "movq %%mm0, %%mm2\n\t"
+- V_PAVGB ("%%mm2", "%%mm1", "%%mm3", MANGLE(ShiftMask)) // avg(c,d)
++ V_PAVGB ("%%mm2", "%%mm1", "%%mm3", _ShiftMask) // avg(c,d)
+ "movq %%mm0, %%mm3\n\t"
+ "psubusb %%mm1, %%mm0\n\t"
+ "psubusb %%mm3, %%mm1\n\t"
+ "por %%mm1, %%mm0\n\t" // abs(c,d)
+
+ "movq %%mm0, %%mm1\n\t"
+- "psubusb "MANGLE(DiffThres)", %%mm1\n\t" // nonzero where abs(c,d) > Thres else 0
++ "psubusb "_DiffThres", %%mm1\n\t" // nonzero where abs(c,d) > Thres else 0
+ "pxor %%mm3, %%mm3\n\t"
+ "pcmpeqb %%mm3, %%mm1\n\t" // now ff where abs(c,d) < Thres, else 00
+
+@@ -163,30 +163,30 @@
+ "por %%mm0, %%mm7\n\t"
+
+ // a & f
+- "movq (%%"XBX"), %%mm0\n\t" // value b from top left
+- "movq -2(%%"XBX", %%"XCX"), %%mm1\n\t" // value d from bottom right
++ "movq (%%"XDX"), %%mm0\n\t" // value b from top left
++ "movq -2(%%"XDX", %%"XCX"), %%mm1\n\t" // value d from bottom right
+
+ "movq %%mm0, %%mm3\n\t"
+ "psubusb %%mm1, %%mm3\n\t"
+ "psubusb %%mm0, %%mm1\n\t"
+ "por %%mm1, %%mm3\n\t" // abs(b,d)
+
+- "psubusb "MANGLE(DiffThres)", %%mm3\n\t" // nonzero where abs(b,d) > Thres else 0
++ "psubusb "_DiffThres", %%mm3\n\t" // nonzero where abs(b,d) > Thres else 0
+ "pxor %%mm4, %%mm4\n\t"
+ "pcmpeqb %%mm4, %%mm3\n\t" // now ff where abs(b,d) < Thres, else 00
+ "pcmpeqb %%mm3, %%mm4\n\t" // here ff where abs(b,d) > Thres, else 00
+
+- "movq -2(%%"XBX"), %%mm0\n\t" // value a
+- "movq 2(%%"XBX", %%"XCX"), %%mm1\n\t" // value f
++ "movq -2(%%"XDX"), %%mm0\n\t" // value a
++ "movq 2(%%"XDX", %%"XCX"), %%mm1\n\t" // value f
+ "movq %%mm0, %%mm2\n\t"
+- V_PAVGB ("%%mm2", "%%mm1", "%%mm3", MANGLE(ShiftMask)) // avg(a,f)
++ V_PAVGB ("%%mm2", "%%mm1", "%%mm3", _ShiftMask) // avg(a,f)
+ "movq %%mm0, %%mm3\n\t"
+ "psubusb %%mm1, %%mm0\n\t"
+ "psubusb %%mm3, %%mm1\n\t"
+ "por %%mm1, %%mm0\n\t" // abs(a,f)
+
+ "movq %%mm0, %%mm1\n\t"
+- "psubusb "MANGLE(DiffThres)", %%mm1\n\t" // nonzero where abs(a,f) > Thres else 0
++ "psubusb "_DiffThres", %%mm1\n\t" // nonzero where abs(a,f) > Thres else 0
+ "pxor %%mm3, %%mm3\n\t"
+ "pcmpeqb %%mm3, %%mm1\n\t" // now ff where abs(a,f) < Thres, else 00
+
+@@ -205,22 +205,22 @@
+ "por %%mm2, %%mm6\n\t"
+ "por %%mm0, %%mm7\n\t"
+
+- "pand "MANGLE(YMask)", %%mm5\n\t" // mask out chroma from here
+- "pand "MANGLE(YMask)", %%mm6\n\t" // mask out chroma from here
+- "pand "MANGLE(YMask)", %%mm7\n\t" // mask out chroma from here
++ "pand "_YMask", %%mm5\n\t" // mask out chroma from here
++ "pand "_YMask", %%mm6\n\t" // mask out chroma from here
++ "pand "_YMask", %%mm7\n\t" // mask out chroma from here
+
+ // b,e
+- "movq (%%"XBX"), %%mm0\n\t" // value b from top
+- "movq (%%"XBX", %%"XCX"), %%mm1\n\t" // value e from bottom
++ "movq (%%"XDX"), %%mm0\n\t" // value b from top
++ "movq (%%"XDX", %%"XCX"), %%mm1\n\t" // value e from bottom
+ "movq %%mm0, %%mm2\n\t"
+- V_PAVGB ("%%mm2", "%%mm1", "%%mm3", MANGLE(ShiftMask)) // avg(b,e)
++ V_PAVGB ("%%mm2", "%%mm1", "%%mm3", _ShiftMask) // avg(b,e)
+ "movq %%mm0, %%mm3\n\t"
+ "psubusb %%mm1, %%mm0\n\t"
+ "psubusb %%mm3, %%mm1\n\t"
+ "por %%mm1, %%mm0\n\t" // abs(b,e)
+
+ "movq %%mm0, %%mm1\n\t"
+- "psubusb "MANGLE(DiffThres)", %%mm1\n\t" // nonzero where abs(b,e) > Thres else 0
++ "psubusb "_DiffThres", %%mm1\n\t" // nonzero where abs(b,e) > Thres else 0
+ "pxor %%mm3, %%mm3\n\t"
+ "pcmpeqb %%mm3, %%mm1\n\t" // now ff where abs(b,e) < Thres, else 00
+
+@@ -238,8 +238,8 @@
+ "por %%mm0, %%mm7\n\t"
+
+ // bob in any leftovers
+- "movq (%%"XBX"), %%mm0\n\t" // value b from top
+- "movq (%%"XBX", %%"XCX"), %%mm1\n\t" // value e from bottom
++ "movq (%%"XDX"), %%mm0\n\t" // value b from top
++ "movq (%%"XDX", %%"XCX"), %%mm1\n\t" // value e from bottom
+
+
+ // We will also calc here the max/min values to later limit comb
+@@ -271,7 +271,7 @@
+ "por %%mm2, %%mm3\n\t" // abs diff
+ // pmaxub %%mm3, %%mm4 // top or bottom pixel moved most
+ V_PMAXUB ("%%mm3", "%%mm4") // top or bottom pixel moved most
+- "psubusb "MANGLE(DiffThres)", %%mm3\n\t" // moved more than allowed? or goes to 0?
++ "psubusb "_DiffThres", %%mm3\n\t" // moved more than allowed? or goes to 0?
+ "pxor %%mm4, %%mm4\n\t"
+ "pcmpeqb %%mm4, %%mm3\n\t" // now ff where low motion, else high motion
+
+@@ -283,19 +283,19 @@
+ V_PMAXUB ("%%mm6", "%%mm2")
+
+ "psubusb %%mm3, %%mm2\n\t" // maybe decrease it to 0000.. if no surround motion
+-// "movq %%mm2, "MANGLE(Min_Vals)"\n\t"
++// "movq %%mm2, "_Min_Vals"\n\t"
+
+ "movq %%mm0, %%mm2\n\t"
+ V_PMAXUB ("%%mm2", "%%mm1")
+ // pminub %%mm6, %%mm2 // clip our current results so far to be below this
+ V_PMINUB ("%%mm6", "%%mm2", "%%mm4")
+ "paddusb %%mm3, %%mm2\n\t" // maybe increase it to ffffff if no surround motion
+-// "movq %%mm2, "MANGLE(Max_Vals)"\n\t"
++// "movq %%mm2, "_Max_Vals"\n\t"
+ #endif
+
+ "movq %%mm0, %%mm2\n\t"
+ // pavgb %%mm2, %%mm1 // avg(b,e)
+- V_PAVGB ("%%mm2", "%%mm1", "%%mm3", MANGLE(ShiftMask)) // avg(b,e)
++ V_PAVGB ("%%mm2", "%%mm1", "%%mm3", _ShiftMask) // avg(b,e)
+
+ "movq %%mm0, %%mm3\n\t"
+ "psubusb %%mm1, %%mm3\n\t"
+diff -rup xine-lib-1.1.15-old/src/post/deinterlace/plugins/tomsmocomp/TomsMoCompAll.inc xine-lib-1.1.15/src/post/deinterlace/plugins/tomsmocomp/TomsMoCompAll.inc
+--- xine-lib-1.1.15-old/src/post/deinterlace/plugins/tomsmocomp/TomsMoCompAll.inc 2008-04-17 18:53:59.000000000 +0200
++++ xine-lib-1.1.15/src/post/deinterlace/plugins/tomsmocomp/TomsMoCompAll.inc 2008-09-20 12:04:56.000000000 +0200
+@@ -33,8 +33,8 @@ static const int64_t __attribute__((__us
+ static const int64_t __attribute__((__used__)) FOURS = 0x0404040404040404ull;
+ static const int64_t __attribute__((__used__)) ONES = 0x0101010101010101ull;
+ static const int64_t __attribute__((__used__)) ShiftMask = 0xfefffefffefffeffull;
+-//static int64_t Min_Vals = 0x0000000000000000ull;
+-//static int64_t Max_Vals = 0x0000000000000000ull;
++static int64_t Min_Vals = 0x0000000000000000ull;
++static int64_t Max_Vals = 0x0000000000000000ull;
+ #endif
+
+ #ifndef TopFirst
+@@ -69,7 +69,7 @@ static void FUNCT_NAME(uint8_t *output,
+ int rowsize;
+ int FldHeight;
+ int stride = (width*2);
+- long oldbx;
++ long olddx;
+
+
+ src_pitch = stride*2;
+diff -rup xine-lib-1.1.15-old/src/post/deinterlace/plugins/tomsmocomp/WierdBob.inc xine-lib-1.1.15/src/post/deinterlace/plugins/tomsmocomp/WierdBob.inc
+--- xine-lib-1.1.15-old/src/post/deinterlace/plugins/tomsmocomp/WierdBob.inc 2008-04-17 18:53:59.000000000 +0200
++++ xine-lib-1.1.15/src/post/deinterlace/plugins/tomsmocomp/WierdBob.inc 2008-09-20 12:04:56.000000000 +0200
+@@ -14,22 +14,22 @@
+ // selected for the smallest of abs(a,f), abs(c,d), or abs(b,e), etc.
+
+ // a,f
+- "movq -2(%%"XBX"), %%mm0\n\t" // value a from top left
+- "movq 2(%%"XBX", %%"XCX"), %%mm1\n\t" // value f from bottom right
++ "movq -2(%%"XDX"), %%mm0\n\t" // value a from top left
++ "movq 2(%%"XDX", %%"XCX"), %%mm1\n\t" // value f from bottom right
+ "movq %%mm0, %%mm6\n\t"
+ // pavgb %%mm6, %%mm1 // avg(a,f), also best so far
+- V_PAVGB ("%%mm6", "%%mm1", "%%mm7", MANGLE(ShiftMask)) // avg(a,f), also best so far
++ V_PAVGB ("%%mm6", "%%mm1", "%%mm7", _ShiftMask) // avg(a,f), also best so far
+ "movq %%mm0, %%mm7\n\t"
+ "psubusb %%mm1, %%mm7\n\t"
+ "psubusb %%mm0, %%mm1\n\t"
+ "por %%mm1, %%mm7\n\t" // abs diff, also best so far
+
+ // c,d
+- "movq 2(%%"XBX"), %%mm0\n\t" // value a from top left
+- "movq -2(%%"XBX", %%"XCX"), %%mm1\n\t" // value f from bottom right
++ "movq 2(%%"XDX"), %%mm0\n\t" // value a from top left
++ "movq -2(%%"XDX", %%"XCX"), %%mm1\n\t" // value f from bottom right
+ "movq %%mm0, %%mm2\n\t"
+ // pavgb %%mm2, %%mm1 // avg(c,d)
+- V_PAVGB ("%%mm2", "%%mm1", "%%mm3", MANGLE(ShiftMask)) // avg(c,d)
++ V_PAVGB ("%%mm2", "%%mm1", "%%mm3", _ShiftMask) // avg(c,d)
+ "movq %%mm0, %%mm3\n\t"
+ "psubusb %%mm1, %%mm3\n\t"
+ "psubusb %%mm0, %%mm1\n\t"
+@@ -49,15 +49,15 @@
+
+ "por %%mm2, %%mm6\n\t" // and merge new & old vals keeping best
+ "por %%mm1, %%mm7\n\t"
+- "por "MANGLE(UVMask)", %%mm7\n\t" // but we know chroma is worthless so far
+- "pand "MANGLE(YMask)", %%mm5\n\t" // mask out chroma from here also
++ "por "_UVMask", %%mm7\n\t" // but we know chroma is worthless so far
++ "pand "_YMask", %%mm5\n\t" // mask out chroma from here also
+
+ // j,n
+- "movq -4(%%"XBX"), %%mm0\n\t" // value j from top left
+- "movq 4(%%"XBX", %%"XCX"), %%mm1\n\t" // value n from bottom right
++ "movq -4(%%"XDX"), %%mm0\n\t" // value j from top left
++ "movq 4(%%"XDX", %%"XCX"), %%mm1\n\t" // value n from bottom right
+ "movq %%mm0, %%mm2\n\t"
+ // pavgb %%mm2, %%mm1 // avg(j,n)
+- V_PAVGB ("%%mm2", "%%mm1", "%%mm3", MANGLE(ShiftMask)) // avg(j,n)
++ V_PAVGB ("%%mm2", "%%mm1", "%%mm3", _ShiftMask) // avg(j,n)
+ "movq %%mm0, %%mm3\n\t"
+ "psubusb %%mm1, %%mm3\n\t"
+ "psubusb %%mm0, %%mm1\n\t"
+@@ -79,11 +79,11 @@
+ "por %%mm1, %%mm7\n\t" // "
+
+ // k, m
+- "movq 4(%%"XBX"), %%mm0\n\t" // value k from top right
+- "movq -4(%%"XBX", %%"XCX"), %%mm1\n\t" // value n from bottom left
++ "movq 4(%%"XDX"), %%mm0\n\t" // value k from top right
++ "movq -4(%%"XDX", %%"XCX"), %%mm1\n\t" // value n from bottom left
+ "movq %%mm0, %%mm4\n\t"
+ // pavgb %%mm4, %%mm1 // avg(k,m)
+- V_PAVGB ("%%mm4", "%%mm1", "%%mm3", MANGLE(ShiftMask)) // avg(k,m)
++ V_PAVGB ("%%mm4", "%%mm1", "%%mm3", _ShiftMask) // avg(k,m)
+
+ "movq %%mm0, %%mm3\n\t"
+ "psubusb %%mm1, %%mm3\n\t"
+@@ -108,8 +108,8 @@
+ "por %%mm1, %%mm7\n\t" // "
+
+ // b,e
+- "movq (%%"XBX"), %%mm0\n\t" // value b from top
+- "movq (%%"XBX", %%"XCX"), %%mm1\n\t" // value e from bottom
++ "movq (%%"XDX"), %%mm0\n\t" // value b from top
++ "movq (%%"XDX", %%"XCX"), %%mm1\n\t" // value e from bottom
+
+ // We will also calc here the max/min values to later limit comb
+ // so the max excursion will not exceed the Max_Comb constant
+@@ -140,7 +140,7 @@
+ "por %%mm2, %%mm3\n\t" // abs diff
+ // pmaxub %%mm3, %%mm4 // top or bottom pixel moved most
+ V_PMAXUB ("%%mm3", "%%mm4") // top or bottom pixel moved most
+- "psubusb "MANGLE(Max_Mov)", %%mm3\n\t" // moved more than allowed? or goes to 0?
++ "psubusb "_Max_Mov", %%mm3\n\t" // moved more than allowed? or goes to 0?
+ "pxor %%mm4, %%mm4\n\t"
+ "pcmpeqb %%mm4, %%mm3\n\t" // now ff where low motion, else high motion
+
+@@ -152,19 +152,19 @@
+ V_PMAXUB ("%%mm6", "%%mm2")
+
+ "psubusb %%mm3, %%mm2\n\t" // maybe decrease it to 0000.. if no surround motion
+-// "movq %%mm2, "MANGLE(Min_Vals)"\n\t"
++// "movq %%mm2, "_Min_Vals"\n\t"
+
+ "movq %%mm0, %%mm2\n\t"
+ V_PMAXUB ("%%mm2", "%%mm1")
+ // pminub %%mm6, %%mm2 // clip our current results so far to be below this
+ V_PMINUB ("%%mm6", "%%mm2", "%%mm4")
+ "paddusb %%mm3, %%mm2\n\t" // maybe increase it to ffffff if no surround motion
+-// "movq %%mm2, "MANGLE(Max_Vals)"\n\t"
++// "movq %%mm2, "_Max_Vals"\n\t"
+ #endif
+
+ "movq %%mm0, %%mm2\n\t"
+ // pavgb %%mm2, %%mm1 // avg(b,e)
+- V_PAVGB ("%%mm2", "%%mm1", "%%mm3", MANGLE(ShiftMask)) // avg(b,e)
++ V_PAVGB ("%%mm2", "%%mm1", "%%mm3", _ShiftMask) // avg(b,e)
+
+ "movq %%mm0, %%mm3\n\t"
+ "psubusb %%mm1, %%mm3\n\t"
+diff -rup xine-lib-1.1.15-old/src/post/deinterlace/plugins/tomsmocomp/tomsmocompmacros.h xine-lib-1.1.15/src/post/deinterlace/plugins/tomsmocomp/tomsmocompmacros.h
+--- xine-lib-1.1.15-old/src/post/deinterlace/plugins/tomsmocomp/tomsmocompmacros.h 2008-05-19 16:15:43.000000000 +0200
++++ xine-lib-1.1.15/src/post/deinterlace/plugins/tomsmocomp/tomsmocompmacros.h 2008-09-20 12:04:56.000000000 +0200
+@@ -114,7 +114,7 @@
+ "por %%xmm0, %%xmm5\n\t" /* and merge new & old vals */ \
+ "por %%xmm2, %%xmm7\n\t"
+
+-#define RESET_CHROMA "por "MANGLE(UVMask)", %%xmm7\n\t"
++#define RESET_CHROMA "por "_UVMask", %%xmm7\n\t"
+
+ #else // ifdef IS_SSE2
+
+@@ -126,7 +126,7 @@
+ "psubusb %%mm1, %%mm2\n\t" \
+ "psubusb %%mm0, %%mm3\n\t" \
+ "por %%mm3, %%mm2\n\t" \
+- V_PAVGB ("%%mm0", "%%mm1", "%%mm3", MANGLE(ShiftMask)) /* avg of 2 pixels */ \
++ V_PAVGB ("%%mm0", "%%mm1", "%%mm3", _ShiftMask) /* avg of 2 pixels */ \
+ "movq %%mm2, %%mm3\n\t" /* another copy of our our weights */ \
+ "pxor %%mm1, %%mm1\n\t" \
+ "psubusb %%mm7, %%mm3\n\t" /* nonzero where old weights lower, else 0 */ \
+@@ -144,14 +144,14 @@
+ "movq "PADDR2A", %%mm1\n\t" /* our pixel2 value */ \
+ "movq "PADDR1B", %%mm2\n\t" /* our 4 pixels */ \
+ "movq "PADDR2B", %%mm3\n\t" /* our pixel2 value */ \
+- V_PAVGB("%%mm0", "%%mm2", "%%mm2", MANGLE(ShiftMask)) \
+- V_PAVGB("%%mm1", "%%mm3", "%%mm3", MANGLE(ShiftMask)) \
++ V_PAVGB("%%mm0", "%%mm2", "%%mm2", _ShiftMask) \
++ V_PAVGB("%%mm1", "%%mm3", "%%mm3", _ShiftMask) \
+ "movq %%mm0, %%mm2\n\t" /* another copy of our pixel1 value */ \
+ "movq %%mm1, %%mm3\n\t" /* another copy of our pixel1 value */ \
+ "psubusb %%mm1, %%mm2\n\t" \
+ "psubusb %%mm0, %%mm3\n\t" \
+ "por %%mm3, %%mm2\n\t" \
+- V_PAVGB("%%mm0", "%%mm1", "%%mm3", MANGLE(ShiftMask)) /* avg of 2 pixels */ \
++ V_PAVGB("%%mm0", "%%mm1", "%%mm3", _ShiftMask) /* avg of 2 pixels */ \
+ "movq %%mm2, %%mm3\n\t" /* another copy of our our weights */ \
+ "pxor %%mm1, %%mm1\n\t" \
+ "psubusb %%mm7, %%mm3\n\t" /* nonzero where old weights lower, else 0 */ \
+@@ -164,7 +164,7 @@
+ "por %%mm0, %%mm5\n\t" /* and merge new & old vals */ \
+ "por %%mm2, %%mm7\n\t"
+
+-#define RESET_CHROMA "por "MANGLE(UVMask)", %%mm7\n\t"
++#define RESET_CHROMA "por "_UVMask", %%mm7\n\t"
+
+ #endif
+
diff --git a/media-libs/xine-lib/files/xine-lib-1.1.16.3-libmpcdecsv7.patch b/media-libs/xine-lib/files/xine-lib-1.1.16.3-libmpcdecsv7.patch
new file mode 100644
index 00000000..97989d38
--- /dev/null
+++ b/media-libs/xine-lib/files/xine-lib-1.1.16.3-libmpcdecsv7.patch
@@ -0,0 +1,38 @@
+diff -ur xine-lib-1.1.16.3.orig/configure.ac xine-lib-1.1.16.3/configure.ac
+--- xine-lib-1.1.16.3.orig/configure.ac 2009-04-02 21:44:45.000000000 +0300
++++ xine-lib-1.1.16.3/configure.ac 2009-07-26 15:34:10.000000000 +0300
+@@ -1341,8 +1341,8 @@
+ if test "x$enable_musepack" = "xno"; then
+ AC_MSG_RESULT([musepack support disabled])
+ elif test "x$with_external_libmpcdec" = "xyes"; then
+- AC_CHECK_LIB([mpcdec], [mpc_decoder_decode], [have_mpcdec=yes])
+- AC_CHECK_HEADERS([mpcdec/mpcdec.h], , [have_mpcdec=no])
++ AC_CHECK_LIB([mpcdecsv7], [mpc_decoder_decode], [have_mpcdec=yes])
++ AC_CHECK_HEADERS([mpcdecsv7/mpcdec.h], , [have_mpcdec=no])
+ if test "x$have_mpcdec" != "xyes"; then
+ AC_MSG_ERROR([Unable to find mpcdec])
+ fi
+diff -ur xine-lib-1.1.16.3.orig/src/libmusepack/Makefile.am xine-lib-1.1.16.3/src/libmusepack/Makefile.am
+--- xine-lib-1.1.16.3.orig/src/libmusepack/Makefile.am 2009-02-10 19:32:23.000000000 +0200
++++ xine-lib-1.1.16.3/src/libmusepack/Makefile.am 2009-07-26 15:34:27.000000000 +0300
+@@ -17,7 +17,7 @@
+ endif
+
+ if EXTERNAL_MPCDEC
+-xineplug_decode_mpc_la_LIBADD = $(XINE_LIB) $(LTLIBINTL) -lmpcdec
++xineplug_decode_mpc_la_LIBADD = $(XINE_LIB) $(LTLIBINTL) -lmpcdecsv7
+ else
+ xineplug_decode_mpc_la_LIBADD = $(XINE_LIB) $(LTLIBINTL)
+ endif
+diff -ur xine-lib-1.1.16.3.orig/src/libmusepack/xine_musepack_decoder.c xine-lib-1.1.16.3/src/libmusepack/xine_musepack_decoder.c
+--- xine-lib-1.1.16.3.orig/src/libmusepack/xine_musepack_decoder.c 2009-02-10 19:32:23.000000000 +0200
++++ xine-lib-1.1.16.3/src/libmusepack/xine_musepack_decoder.c 2009-07-26 15:34:49.000000000 +0300
+@@ -46,7 +46,7 @@
+ #include "xineutils.h"
+
+ #ifdef HAVE_MPCDEC_MPCDEC_H
+-# include <mpcdec/mpcdec.h>
++# include <mpcdecsv7/mpcdec.h>
+ #else
+ # include "musepack/musepack.h"
+ #endif
diff --git a/media-libs/xine-lib/metadata.xml b/media-libs/xine-lib/metadata.xml
new file mode 100644
index 00000000..6686277d
--- /dev/null
+++ b/media-libs/xine-lib/metadata.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>video</herd>
+<maintainer>
+ <email>media-video@gentoo.org</email>
+</maintainer>
+<longdescription>An open source library for media applications</longdescription>
+<use>
+ <flag name="real">
+ Enable support for loading and using RealPlayer binary codecs on x86 and
+ amd64 Linux. Enabling this USE flag might make the package
+ non-redistributable in binary form.
+ </flag>
+ <flag name="win32codecs">
+ Enable support for loading and using Windows 32-bit binary codecs on x86
+ Linux and FreeBSD. Enabling this USE flag might make the package
+ non-redistributable in binary form.
+ </flag>
+ <flag name="mad">
+ Build the <pkg>media-libs/libmad</pkg> based mp3 decoder. This mp3 decoder
+ has superior support compared to the one coming from FFmpeg that is used as
+ a fallback. If you experience any bad behaviour with mp3 files (skipping,
+ distorted sound) make sure you enabled this USE flag.
+ </flag>
+ <flag name="flac">
+ Build the <pkg>media-libs/flac</pkg> based FLAC demuxer and decoder. This
+ flag is not needed for playing FLAC content, neither standalone nor in Ogg
+ container (OggFLAC), but might have better support for exotic features like
+ 24-bit samples or 96kHz sample rates.
+ </flag>
+ <flag name="gtk">
+ Build the gdkpixbuf-based image decoder plugin.
+ </flag>
+ <flag name="imagemagick">
+ Build the ImageMagick-based image decoder plugin.
+ </flag>
+ <flag name="gnome">
+ Build the <pkg>gnome-base/gnome-vfs</pkg> based input plugin. This plugin is
+ used to access any resource that can be accessed through Nautilus's (and
+ others') URLs.
+ </flag>
+ <flag name="mmap">
+ Use mmap() function while reading file from local disks. Using mmap() will
+ use more virtual memory space, but leaves to the Kernel the task of caching
+ the file's data. mmap() access should be faster, but might misbehave if the
+ device where the file resides in is removed during playback.
+ </flag>
+ <flag name="truetype">
+ Use <pkg>media-libs/freetype</pkg> for font rendering and
+ <pkg>media-libs/fontconfig</pkg> for font discovery. Enabling this USE flag
+ will allow OSD (such as subtitles) to use more advanced font and to more
+ easily select which font to use. The support for TrueType fonts in xine-lib
+ is still experimental, and might not be as good looking as the bitmap fonts
+ used with this USE flag disabled.
+ </flag>
+ <flag name="xvmc">
+ Enable support for XVideo Motion Compensation (accelerated mpeg playback).
+ </flag>
+ <flag name="dxr3">
+ Enable support for DXR3 mpeg accelleration cards.
+ </flag>
+ <flag name="vidix">
+ Enable support for vidix video output.
+ </flag>
+ <flag name="vis">
+ Adds support for SIMD optimizations for UltraSPARC processors.
+ </flag>
+</use>
+</pkgmetadata>
diff --git a/media-libs/xine-lib/xine-lib-1.1.16.3-r2.ebuild b/media-libs/xine-lib/xine-lib-1.1.16.3-r2.ebuild
new file mode 100644
index 00000000..1ab3d1b9
--- /dev/null
+++ b/media-libs/xine-lib/xine-lib-1.1.16.3-r2.ebuild
@@ -0,0 +1,188 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-libs/xine-lib/xine-lib-1.1.16.3-r1.ebuild,v 1.4 2009/08/25 12:58:07 jer Exp $
+
+EAPI=1
+
+inherit autotools eutils flag-o-matic toolchain-funcs multilib
+
+# This should normally be empty string, unless a release has a suffix.
+if [[ "${P/_pre/}" != "${P}" ]]; then
+ SRC_URI="mirror://gentoo/${P}.tar.bz2"
+else
+ MY_PKG_SUFFIX=""
+ MY_P="${PN}-${PV/_/-}${MY_PKG_SUFFIX}"
+ S="${WORKDIR}/${MY_P}"
+
+ SRC_URI="mirror://sourceforge/xine/${MY_P}.tar.bz2"
+fi
+
+DESCRIPTION="Core libraries for Xine movie player"
+HOMEPAGE="http://xine.sourceforge.net"
+
+LICENSE="GPL-2"
+SLOT="1"
+KEYWORDS="~alpha ~amd64 ~arm hppa ~ia64 ~ppc ~ppc64 ~sparc x86 ~x86-fbsd"
+
+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
++modplug -gtk pulseaudio -mmap -truetype wavpack +musepack +xcb -jack
+-real +vis"
+
+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_beta14 )
+ 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-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 )
+ virtual/libiconv
+ wavpack? ( >=media-sound/wavpack-4.31 )
+ musepack? ( media-libs/libmpcdecsv7 )
+ 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() {
+ unpack ${A}
+ cd "${S}"
+ rm -f ltmain.sh m4/{libtool,lt*}.m4 || die "libtool patch failed"
+ epatch "${FILESDIR}"/${P}-libmpcdecsv7.patch
+
+ # Bug 164425
+ epatch "${FILESDIR}"/xine-lib-1.1.15-pic-fix.patch
+
+ eautoreconf
+}
+
+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"
+
+ 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 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
+
+ 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
+}