summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Ballier <aballier@gentoo.org>2008-05-11 21:13:34 +0000
committerAlexis Ballier <aballier@gentoo.org>2008-05-11 21:13:34 +0000
commitb348d7ee0a309eddf5e6de6ab29d7ef3416fa0b3 (patch)
treee7a5dcd3d5b2f917072b59370435c631349cd500 /media-libs/libtheora/files
parentStable on ppc64; bug #221065 (diff)
downloadgentoo-2-b348d7ee0a309eddf5e6de6ab29d7ef3416fa0b3.tar.gz
gentoo-2-b348d7ee0a309eddf5e6de6ab29d7ef3416fa0b3.tar.bz2
gentoo-2-b348d7ee0a309eddf5e6de6ab29d7ef3416fa0b3.zip
port pic fix to this release too, bug #218267
(Portage version: 2.1.5_rc10)
Diffstat (limited to 'media-libs/libtheora/files')
-rw-r--r--media-libs/libtheora/files/libtheora-1.0_beta3-pic-fix.patch64
1 files changed, 64 insertions, 0 deletions
diff --git a/media-libs/libtheora/files/libtheora-1.0_beta3-pic-fix.patch b/media-libs/libtheora/files/libtheora-1.0_beta3-pic-fix.patch
new file mode 100644
index 000000000000..fc4568e327dd
--- /dev/null
+++ b/media-libs/libtheora/files/libtheora-1.0_beta3-pic-fix.patch
@@ -0,0 +1,64 @@
+Index: libtheora-1.0beta3/lib/enc/x86_32/dct_decode_mmx.c
+===================================================================
+--- libtheora-1.0beta3.orig/lib/enc/x86_32/dct_decode_mmx.c
++++ libtheora-1.0beta3/lib/enc/x86_32/dct_decode_mmx.c
+@@ -24,12 +24,6 @@
+ static const __attribute__((aligned(8),used)) ogg_int64_t V3= 0x0003000300030003LL;
+ static const __attribute__((aligned(8),used)) ogg_int64_t V804= 0x0804080408040804LL;
+
+-#if defined(__APPLE__) || defined(__CYGWIN__) || defined (__WIN32__)
+-#define MANGLE(x) "_"#x
+-#else
+-#define MANGLE(x) #x
+-#endif
+-
+ static void FilterHoriz__mmx(unsigned char * PixelPtr,
+ ogg_int32_t LineLength,
+ ogg_int16_t *BoundingValuePtr){
+@@ -57,9 +51,9 @@ static void FilterHoriz__mmx(unsigned ch
+ "psubw %%mm3,%%mm1\n" /* mm1 = pix[0]-pix[3] mm1 - mm3 */ \
+ "movq %%mm0,%%mm7\n" /* mm7 = pix[2]*/ \
+ "psubw %%mm5,%%mm0\n" /* mm0 = pix[2]-pix[1] mm0 - mm5*/ \
+- "PMULLW "MANGLE(V3)",%%mm0\n" /* *3 */ \
++ "PMULLW %3,%%mm0\n" /* *3 */ \
+ "paddw %%mm0,%%mm1\n" /* mm1 has f[0] ... f[4]*/ \
+- "paddw "MANGLE(V804)",%%mm1\n"/* add 4 */ /* add 256 after shift */ \
++ "paddw %4,%%mm1\n"/* add 4 */ /* add 256 after shift */ \
+ "psraw $3,%%mm1\n" /* >>3 */ \
+ " pextrw $0,%%mm1,%%esi\n" /* In MM1 we have 4 f coefs (16bits) */ \
+ " pextrw $1,%%mm1,%%edi\n" /* now perform MM4 = *(_bv+ f) */ \
+@@ -86,7 +80,7 @@ static void FilterHoriz__mmx(unsigned ch
+ " shrl $16,%%edi\n" \
+ " movw %%di,1(%0,%%esi)\n" \
+ : \
+- : "r" (PixelPtr), "r" (LineLength), "r" (BoundingValuePtr-256) \
++ : "r" (PixelPtr), "r" (LineLength), "r" (BoundingValuePtr-256), "m" (V3), "m" (V804) \
+ : "esi", "edi" , "memory" \
+ );
+
+@@ -125,12 +119,12 @@ static void FilterVert__mmx(unsigned cha
+ "psubw %%mm5,%%mm3\n"
+ "psubw %%mm4,%%mm2\n"
+ /* mm3:mm2 = (pix[ystride*2]-pix[ystride]); */
+- "PMULLW "MANGLE(V3)",%%mm3\n" /* *3 */
+- "PMULLW "MANGLE(V3)",%%mm2\n" /* *3 */
++ "PMULLW %3,%%mm3\n" /* *3 */
++ "PMULLW %3,%%mm2\n" /* *3 */
+ "paddw %%mm7,%%mm3\n" /* highpart */
+ "paddw %%mm6,%%mm2\n" /* lowpart of pix[0]-pix[ystride*3]+3*(pix[ystride*2]-pix[ystride]); */
+- "paddw "MANGLE(V804)",%%mm3\n" /* add 4 */ /* add 256 after shift */
+- "paddw "MANGLE(V804)",%%mm2\n" /* add 4 */ /* add 256 after shift */
++ "paddw %4,%%mm3\n" /* add 4 */ /* add 256 after shift */
++ "paddw %4,%%mm2\n" /* add 4 */ /* add 256 after shift */
+ "psraw $3,%%mm3\n" /* >>3 f coefs high */
+ "psraw $3,%%mm2\n" /* >>3 f coefs low */
+
+@@ -167,7 +161,7 @@ static void FilterVert__mmx(unsigned cha
+ "movq %%mm4,(%0,%1)\n" /* pix[ystride]= */
+ "emms\n"
+ :
+- : "r" (PixelPtr-2*LineLength), "r" (LineLength), "r" (BoundingValuePtr-256)
++ : "r" (PixelPtr-2*LineLength), "r" (LineLength), "r" (BoundingValuePtr-256), "m" (V3), "m" (V804)
+ : "esi", "edi" , "memory"
+ );
+ }