From ec81c2e463dce18c916c7da360d352d0a2aa9c22 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Wed, 22 Sep 2004 20:53:51 +0000 Subject: Version bump. Removing old versions. --- media-libs/libvorbis/ChangeLog | 7 +- media-libs/libvorbis/files/digest-libvorbis-1.0-r4 | 1 - media-libs/libvorbis/files/libvorbis-m4.patch | 28 - media-libs/libvorbis/files/libvorbis-simd.patch | 1019 -------------------- media-libs/libvorbis/libvorbis-1.0-r2.ebuild | 65 -- media-libs/libvorbis/libvorbis-1.0-r3.ebuild | 72 -- media-libs/libvorbis/libvorbis-1.0-r4.ebuild | 80 -- media-libs/libvorbis/libvorbis-1.0.1-r1.ebuild | 64 -- media-libs/libvorbis/libvorbis-1.0.1.ebuild | 61 -- media-libs/libvorbis/libvorbis-1.1.0.ebuild | 80 ++ 10 files changed, 84 insertions(+), 1393 deletions(-) delete mode 100644 media-libs/libvorbis/files/digest-libvorbis-1.0-r4 delete mode 100644 media-libs/libvorbis/files/libvorbis-m4.patch delete mode 100644 media-libs/libvorbis/files/libvorbis-simd.patch delete mode 100644 media-libs/libvorbis/libvorbis-1.0-r2.ebuild delete mode 100644 media-libs/libvorbis/libvorbis-1.0-r3.ebuild delete mode 100644 media-libs/libvorbis/libvorbis-1.0-r4.ebuild delete mode 100644 media-libs/libvorbis/libvorbis-1.0.1-r1.ebuild delete mode 100644 media-libs/libvorbis/libvorbis-1.0.1.ebuild create mode 100644 media-libs/libvorbis/libvorbis-1.1.0.ebuild (limited to 'media-libs/libvorbis') diff --git a/media-libs/libvorbis/ChangeLog b/media-libs/libvorbis/ChangeLog index f26a2ec3252d..1fdd1d908556 100644 --- a/media-libs/libvorbis/ChangeLog +++ b/media-libs/libvorbis/ChangeLog @@ -1,13 +1,14 @@ # ChangeLog for media-libs/libvorbis # Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-libs/libvorbis/ChangeLog,v 1.39 2004/09/22 20:51:58 eradicator Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-libs/libvorbis/ChangeLog,v 1.40 2004/09/22 20:53:51 eradicator Exp $ *libvorbis-1.1.0 (22 Sep 2004) 22 Sep 2004; Jeremy Huddleston -libvorbis-1.0-r2.ebuild, -libvorbis-1.0-r3.ebuild, - -libvorbis-1.0.1-r1.ebuild, -libvorbis-1.0.1.ebuild, - +libvorbis-1.1.0.ebuild: + -libvorbis-1.0-r4.ebuild, -libvorbis-1.0.1-r1.ebuild, + -libvorbis-1.0.1.ebuild, -files/libvorbis-m4.patch, + -files/libvorbis-simd.patch, +libvorbis-1.1.0.ebuild: Version bump. Removing old versions. 12 Sep 2004; Michael Hanselmann diff --git a/media-libs/libvorbis/files/digest-libvorbis-1.0-r4 b/media-libs/libvorbis/files/digest-libvorbis-1.0-r4 deleted file mode 100644 index 6c800c478006..000000000000 --- a/media-libs/libvorbis/files/digest-libvorbis-1.0-r4 +++ /dev/null @@ -1 +0,0 @@ -MD5 d1ad94fe8e240269c790e18992171e53 libvorbis-1.0.tar.gz 749064 diff --git a/media-libs/libvorbis/files/libvorbis-m4.patch b/media-libs/libvorbis/files/libvorbis-m4.patch deleted file mode 100644 index 55a82bc98411..000000000000 --- a/media-libs/libvorbis/files/libvorbis-m4.patch +++ /dev/null @@ -1,28 +0,0 @@ ---- libvorbis-1.0/vorbis.m4 2002-07-09 23:08:57.000000000 +1000 -+++ libvorbis-cvs/vorbis.m4 2002-08-07 02:01:40.000000000 +1000 -@@ -54,6 +54,7 @@ - #include - #include - #include -+#include - - int main () - { -@@ -62,7 +63,7 @@ - vorbis_info vi; - - vorbis_info_init (&vi); -- vorbis_encode_init (&vi, 2, 44100, -1, 128, -1); -+ vorbis_encode_init (&vi, 2, 44100, -1, 128000, -1); - vorbis_analysis_init (&vd, &vi); - vorbis_block_init (&vd, &vb); - /* this function was added in 1.0rc3, so this is what we're testing for */ -@@ -87,7 +88,7 @@ - else - echo "*** Could not run Vorbis test program, checking why..." - CFLAGS="$CFLAGS $VORBIS_CFLAGS" -- LIBS="$LIBS $VORBIS_LIBS $OGG_LIBS" -+ LIBS="$LIBS $VORBIS_LIBS $VORBISENC_LIBS $OGG_LIBS" - AC_TRY_LINK([ - #include - #include diff --git a/media-libs/libvorbis/files/libvorbis-simd.patch b/media-libs/libvorbis/files/libvorbis-simd.patch deleted file mode 100644 index 85f1d1aef7be..000000000000 --- a/media-libs/libvorbis/files/libvorbis-simd.patch +++ /dev/null @@ -1,1019 +0,0 @@ -diff -ur libvorbis-1.0/lib/block.c libvorbis-1.0-simd/lib/block.c ---- libvorbis-1.0/lib/block.c 2002-07-11 08:40:48.000000000 +0200 -+++ libvorbis-1.0-simd/lib/block.c 2003-04-26 20:32:07.000000000 +0200 -@@ -22,6 +22,7 @@ - #include - #include - #include -+#include - #include "vorbis/codec.h" - #include "codec_internal.h" - -@@ -31,6 +32,10 @@ - #include "registry.h" - #include "misc.h" - -+#ifdef __SSE__ -+#include -+#endif -+ - static int ilog2(unsigned int v){ - int ret=0; - if(v)--v; -@@ -701,11 +706,95 @@ - /* the overlap/add section */ - if(v->lW){ - if(v->W){ -+#ifdef __SSE__ -+ /* large/large */ -+ float *pcm=v->pcm[j]+prevCenter; -+ float *p=vb->pcm[j]; -+ unsigned long _pcm=(unsigned long)pcm&15; -+ unsigned long _p=(unsigned long)p&15; -+ register __m128* PCM,* P; -+ i=0; -+ /* n1 is always 1024, prevCenter is either 0 or 1024 */ -+ /* both pcm and p can be unaligned, and they usually are. -+ * This code assumes unaligned addresses are still 8-byte -+ * aligned (which is true because glibc's malloc does 8-byte -+ * alignment */ -+ if (_pcm) { -+ pcm[0]+=p[0]; pcm[1]+=p[1]; -+ i=2; -+ PCM=(__m128*)(pcm+2); -+ P=(__m128*)(p+2); -+ } else { -+ PCM=(__m128*)pcm; -+ P=(__m128*)p; -+ } -+ if (_pcm ^ _p) { -+ /* one is properly aligned, the other is not */ -+ register __m128 a; -+ P=(__m128*)((float*)P-2); -+ a=P[0]; -+ for (; i+7pcm[j])), -+ "r" ((float*)(v->pcm[j]+prevCenter)) : "memory" ); -+#else - /* large/large */ - float *pcm=v->pcm[j]+prevCenter; - float *p=vb->pcm[j]; - for(i=0;ipcm[j]+prevCenter+n1/2-n0/2; -@@ -732,12 +821,60 @@ - } - - /* the copy section */ -+#ifdef simd_3dn -+ assert((n&1)==0); -+ asm volatile("jecxz 2f\n\t" -+ "testl $1,%%ecx\n\t" -+ "jz 1f\n\t" -+ "3: movl (%1),%%eax\n\t" -+ "addl $4,%1\n\t" -+ "movl %%eax,(%2)\n\t" -+ "addl $4,%2\n\t" -+ "decl %%ecx\n\t" -+ "jz 2f\n\t" -+ "1: " -+ "movq (%1),%%mm0\n\t" -+ "addl $8,%1\n\t" -+ "movq %%mm0,(%2)\n\t" -+ "addl $8,%2\n\t" -+ "subl $2,%%ecx\n\t" -+ "jc 3b\n\t" -+ "jz 2f\n\t" -+ "movq (%1),%%mm0\n\t" -+ "addl $8,%1\n\t" -+ "movq %%mm0,(%2)\n\t" -+ "addl $8,%2\n\t" -+ "subl $2,%%ecx\n\t" -+ "jc 3b\n\t" -+ "jz 2f\n\t" -+ "movq (%1),%%mm0\n\t" -+ "addl $8,%1\n\t" -+ "movq %%mm0,(%2)\n\t" -+ "addl $8,%2\n\t" -+ "subl $2,%%ecx\n\t" -+ "jc 3b\n\t" -+ "jz 2f\n\t" -+ "movq (%1),%%mm0\n\t" -+ "addl $8,%1\n\t" -+ "movq %%mm0,(%2)\n\t" -+ "addl $8,%2\n\t" -+ "subl $2,%%ecx\n\t" -+ "jc 3b\n\t" -+ "jz 2f\n\t" -+ "jmp 1b\n\t" -+ "2: femms\n\t" -+ : : "c" (n), -+ "r" ((float*)(vb->pcm[j]+n)), -+ "r" ((float*)(v->pcm[j]+thisCenter)) -+ : "%eax", "memory" ); -+#else - { - float *pcm=v->pcm[j]+thisCenter; - float *p=vb->pcm[j]+n; - for(i=0;icenterW) -diff -ur libvorbis-1.0/lib/lsp.c libvorbis-1.0-simd/lib/lsp.c ---- libvorbis-1.0/lib/lsp.c 2002-07-17 23:28:37.000000000 +0200 -+++ libvorbis-1.0-simd/lib/lsp.c 2003-04-26 20:32:27.000000000 +0200 -@@ -54,7 +54,12 @@ - #define FLOAT_LOOKUP - #undef INT_LOOKUP - -+#ifdef __SSE__ -+#include -+#endif -+ - #ifdef FLOAT_LOOKUP -+ - #include "lookup.c" /* catch this in the build system; we #include for - compilers (like gcc) that can't inline across - modules */ -@@ -73,17 +78,88 @@ - while(i>1; - -+#ifdef __SSE__ -+ static float __attribute__((aligned(16))) w; -+ w=vorbis_coslook(wdel*k); -+ PQPQ[0]=PQPQ[1]=.7071067812f; -+ if ((((long)ftmp)&15)==8) { -+ PQPQ[2]=ftmp[0]-w; -+ PQPQ[3]=ftmp[1]-w; -+ --c; -+ ftmp+=2; -+ } else { -+ PQPQ[2]=PQPQ[3]=1.f; -+ } -+ pqpq=*(__m128*)&(PQPQ[0]); -+ wwww=_mm_load1_ps(&w); -+#define UNROLL -+#ifdef UNROLL -+ while (c>3) { -+ pqpq=_mm_mul_ps(pqpq,_mm_sub_ps(*(__m128*)ftmp,wwww)); -+ ftmp+=4; -+ pqpq=_mm_mul_ps(pqpq,_mm_sub_ps(*(__m128*)ftmp,wwww)); -+ ftmp+=4; -+ c-=4; -+ } -+#endif -+ while (c>1) { -+ pqpq=_mm_mul_ps(pqpq,_mm_sub_ps(*(__m128*)ftmp,wwww)); -+ ftmp+=4; -+ c-=2; -+ } -+ pqpq=_mm_mul_ps(pqpq,_mm_shuffle_ps(pqpq,pqpq,_MM_SHUFFLE(1,0,3,2))); -+ _mm_storel_pi((__m64*)(&(pq[0])),pqpq); -+ if (c) { -+ q*=ftmp[0]-w; -+ p*=ftmp[1]-w; -+ ftmp+=2; -+ }; -+#else -+#ifdef simd_3dn -+ pq[0]=pq[1]=.7071067812f; -+ ww[0]=ww[1]=vorbis_coslook(wdel*k); -+ -+ asm volatile("movq (%2),%%mm1\n\t" /* mm1 = (w,w) */ -+ "movq (%3),%%mm2\n\t" /* mm2 = (p,q) */ -+ "1: movq (%0),%%mm0\n\t" /* mm0 = (ftmp[0],ftmp[1]) */ -+ "pfsub %%mm1,%%mm0\n\t" /* mm0 = (ftmp[0]-w,ftmp[1]-w) */ -+ "pfmul %%mm0,%%mm2\n\t" /* mm2 *= (ftmp[0]-w,ftmp[1]-w) */ -+ "addl $8,%0\n\t" /* ftmp += 2 */ -+ "decl %1\n\t" /* --c */ -+ "jnz 1b\n\t" -+ "movq %%mm2,(%3)\n\t" /* pq = mm0 */ -+ "femms\n\t" -+ : "+r" (ftmp), "+r" (c) : "r" (ww), "r" (pq) : "memory" ); -+#else - do{ - q*=ftmp[0]-w; - p*=ftmp[1]-w; - ftmp+=2; - }while(--c); -+#endif -+#endif - - if(m&1){ - /* odd order filter; slightly assymetric */ -@@ -107,6 +183,9 @@ - curve[i++]*=q; - }while(map[i]==k); - } -+#undef p -+#undef q -+#undef w - vorbis_fpu_restore(fpu); - } - -diff -ur libvorbis-1.0/lib/mdct.c libvorbis-1.0-simd/lib/mdct.c ---- libvorbis-1.0/lib/mdct.c 2002-06-29 00:19:36.000000000 +0200 -+++ libvorbis-1.0-simd/lib/mdct.c 2003-01-26 07:09:54.000000000 +0100 -@@ -271,41 +271,158 @@ - REG_TYPE r0; - REG_TYPE r1; - -+#if DATA_TYPE != float -+#undef simd_3dn -+#endif -+ - do{ - -+#ifdef simd_3dn -+ static unsigned long negxor[2]={0x80000000,0}; -+ asm ( /* mm0 = (r0,r1) */ -+ "movq %0,%%mm0\n\t" /* mm0 = (x1[6],x1[7]) */ -+ "movq %1,%%mm1\n\t" /* mm1 = (x2[6],x2[7]) */ -+ "movq %%mm0,%%mm2\n\t" /* mm2 = (x1[6],x1[7]) */ -+ "pfsub %%mm1,%%mm0\n\t" /* mm0 = (x1[6]-x2[6],x1[7]-x2[7]) */ -+ "pfadd %%mm1,%%mm2\n\t" /* mm2 = (x1[6]+x2[6],x1[7]+x2[7]) */ -+ "movq %%mm2,%0\n\t" -+ -+ "movq %2,%%mm1\n\t" -+ "movq %%mm0,%%mm2\n\t" -+ "pfmul %%mm1,%%mm0\n\t" -+ "pxor %3,%%mm2\n\t" -+#ifdef simd_sse -+ "pshufw $0x4e,%%mm1,%%mm1\n\t" -+#else -+ "movq %%mm1,%%mm3\n\t" -+ "psllq $32,%%mm3\n\t" -+ "psrlq $32,%%mm1\n\t" -+ "por %%mm3,%%mm1\n\t" -+#endif -+ "pfmul %%mm2,%%mm1\n\t" -+ "pfacc %%mm1,%%mm0\n\t" -+ "movq %%mm0,%1\n\t" -+ "femms\n\t" -+ : : "m" (x1[6]), "m" (x2[6]), "m" (T[0]), "m" (negxor[0]) : "memory"); -+#else - r0 = x1[6] - x2[6]; - r1 = x1[7] - x2[7]; - x1[6] += x2[6]; - x1[7] += x2[7]; - x2[6] = MULT_NORM(r1 * T[1] + r0 * T[0]); - x2[7] = MULT_NORM(r1 * T[0] - r0 * T[1]); -+#endif - - T+=trigint; - -+#ifdef simd_3dn -+ asm ( /* mm0 = (r0,r1) */ -+ "movq %0,%%mm0\n\t" /* mm0 = (x1[6],x1[7]) */ -+ "movq %1,%%mm1\n\t" /* mm1 = (x2[6],x2[7]) */ -+ "movq %%mm0,%%mm2\n\t" /* mm2 = (x1[6],x1[7]) */ -+ "pfsub %%mm1,%%mm0\n\t" /* mm0 = (x1[6]-x2[6],x1[7]-x2[7]) */ -+ "pfadd %%mm1,%%mm2\n\t" /* mm2 = (x1[6]+x2[6],x1[7]+x2[7]) */ -+ "movq %%mm2,%0\n\t" -+ -+ "movq %2,%%mm1\n\t" -+ "movq %%mm0,%%mm2\n\t" -+ "pfmul %%mm1,%%mm0\n\t" -+ "pxor %3,%%mm2\n\t" -+#ifdef simd_sse -+ "pshufw $0x4e,%%mm1,%%mm1\n\t" -+#else -+ "movq %%mm1,%%mm3\n\t" -+ "psllq $32,%%mm3\n\t" -+ "psrlq $32,%%mm1\n\t" -+ "por %%mm3,%%mm1\n\t" -+#endif -+ "pfmul %%mm2,%%mm1\n\t" -+ "pfacc %%mm1,%%mm0\n\t" -+ "movq %%mm0,%1\n\t" -+ "femms\n\t" -+ : : "m" (x1[4]), "m" (x2[4]), "m" (T[0]), "m" (negxor[0]) : "memory"); -+#else - r0 = x1[4] - x2[4]; - r1 = x1[5] - x2[5]; - x1[4] += x2[4]; - x1[5] += x2[5]; - x2[4] = MULT_NORM(r1 * T[1] + r0 * T[0]); - x2[5] = MULT_NORM(r1 * T[0] - r0 * T[1]); -+#endif - - T+=trigint; - -+#ifdef simd_3dn -+ asm ( /* mm0 = (r0,r1) */ -+ "movq %0,%%mm0\n\t" /* mm0 = (x1[6],x1[7]) */ -+ "movq %1,%%mm1\n\t" /* mm1 = (x2[6],x2[7]) */ -+ "movq %%mm0,%%mm2\n\t" /* mm2 = (x1[6],x1[7]) */ -+ "pfsub %%mm1,%%mm0\n\t" /* mm0 = (x1[6]-x2[6],x1[7]-x2[7]) */ -+ "pfadd %%mm1,%%mm2\n\t" /* mm2 = (x1[6]+x2[6],x1[7]+x2[7]) */ -+ "movq %%mm2,%0\n\t" -+ -+ "movq %2,%%mm1\n\t" -+ "movq %%mm0,%%mm2\n\t" -+ "pfmul %%mm1,%%mm0\n\t" -+ "pxor %3,%%mm2\n\t" -+#ifdef simd_sse -+ "pshufw $0x4e,%%mm1,%%mm1\n\t" -+#else -+ "movq %%mm1,%%mm3\n\t" -+ "psllq $32,%%mm3\n\t" -+ "psrlq $32,%%mm1\n\t" -+ "por %%mm3,%%mm1\n\t" -+#endif -+ "pfmul %%mm2,%%mm1\n\t" -+ "pfacc %%mm1,%%mm0\n\t" -+ "movq %%mm0,%1\n\t" -+ "femms\n\t" -+ : : "m" (x1[2]), "m" (x2[2]), "m" (T[0]), "m" (negxor[0]) : "memory"); -+#else - r0 = x1[2] - x2[2]; - r1 = x1[3] - x2[3]; - x1[2] += x2[2]; - x1[3] += x2[3]; - x2[2] = MULT_NORM(r1 * T[1] + r0 * T[0]); - x2[3] = MULT_NORM(r1 * T[0] - r0 * T[1]); -+#endif - - T+=trigint; - -+#ifdef simd_3dn -+ asm ( /* mm0 = (r0,r1) */ -+ "movq %0,%%mm0\n\t" /* mm0 = (x1[6],x1[7]) */ -+ "movq %1,%%mm1\n\t" /* mm1 = (x2[6],x2[7]) */ -+ "movq %%mm0,%%mm2\n\t" /* mm2 = (x1[6],x1[7]) */ -+ "pfsub %%mm1,%%mm0\n\t" /* mm0 = (x1[6]-x2[6],x1[7]-x2[7]) */ -+ "pfadd %%mm1,%%mm2\n\t" /* mm2 = (x1[6]+x2[6],x1[7]+x2[7]) */ -+ "movq %%mm2,%0\n\t" -+ -+ "movq %2,%%mm1\n\t" -+ "movq %%mm0,%%mm2\n\t" -+ "pfmul %%mm1,%%mm0\n\t" -+ "pxor %3,%%mm2\n\t" -+#ifdef simd_sse -+ "pshufw $0x4e,%%mm1,%%mm1\n\t" -+#else -+ "movq %%mm1,%%mm3\n\t" -+ "psllq $32,%%mm3\n\t" -+ "psrlq $32,%%mm1\n\t" -+ "por %%mm3,%%mm1\n\t" -+#endif -+ "pfmul %%mm2,%%mm1\n\t" -+ "pfacc %%mm1,%%mm0\n\t" -+ "movq %%mm0,%1\n\t" -+ "femms\n\t" -+ : : "m" (x1[0]), "m" (x2[0]), "m" (T[0]), "m" (negxor[0]) : "memory"); -+#else - r0 = x1[0] - x2[0]; - r1 = x1[1] - x2[1]; - x1[0] += x2[0]; - x1[1] += x2[1]; - x2[0] = MULT_NORM(r1 * T[1] + r0 * T[0]); - x2[1] = MULT_NORM(r1 * T[0] - r0 * T[1]); -+#endif - - T+=trigint; - x1-=8; -diff -ur libvorbis-1.0/lib/psy.c libvorbis-1.0-simd/lib/psy.c ---- libvorbis-1.0/lib/psy.c 2002-07-13 12:18:33.000000000 +0200 -+++ libvorbis-1.0-simd/lib/psy.c 2003-04-17 20:50:13.000000000 +0200 -@@ -29,9 +29,25 @@ - #include "scales.h" - #include "misc.h" - -+#ifdef __SSE__ -+#include -+#include -+#endif -+ - #define NEGINF -9999.f - static double stereo_threshholds[]={0.0, .5, 1.0, 1.5, 2.5, 4.5, 8.5, 16.5, 9e10}; - -+#ifdef __SSE__ -+static void* align(void* x) { -+ long l=(long)x; -+ int r=l&0xf; -+ if (r) -+ return (void*)(l+16-(l&0xf)); -+ else -+ return x; -+} -+#endif -+ - vorbis_look_psy_global *_vp_global_look(vorbis_info *vi){ - codec_setup_info *ci=vi->codec_setup; - vorbis_info_psy_global *gi=&ci->psy_g_param; -@@ -530,17 +546,31 @@ - - } - -+#ifdef __SSE__ -+__m128 tmp __attribute__((aligned(16))); -+#endif -+ - static void bark_noise_hybridmp(int n,const long *b, - const float *f, - float *noise, - const float offset, - const int fixed){ - -+#ifdef __SSE__ -+ /* we need to be 16-bytes aligned for SSE */ -+ /* so we can be at most 16-4=12 bytes off, allocate three more floats */ -+ float *N=align(alloca((n+4)*sizeof(*N))); -+ float *X=align(alloca((n+4)*sizeof(*N))); -+ float *XX=align(alloca((n+4)*sizeof(*N))); -+ float *Y=align(alloca((n+4)*sizeof(*N))); -+ float *XY=align(alloca((n+4)*sizeof(*N))); -+#else - float *N=alloca((n+1)*sizeof(*N)); - float *X=alloca((n+1)*sizeof(*N)); - float *XX=alloca((n+1)*sizeof(*N)); - float *Y=alloca((n+1)*sizeof(*N)); - float *XY=alloca((n+1)*sizeof(*N)); -+#endif - - float tN, tX, tXX, tY, tXY; - float fi; -@@ -548,9 +578,131 @@ - - int lo, hi; - float R, A, B, D; -+#ifdef __SSE__ -+ register __m128 offset4=_mm_set_ps1(offset); -+#endif - - tN = tX = tXX = tY = tXY = 0.f; -+#ifdef __SSE__ -+ for (i=0, fi=0.f; i+4> 16; - hi = b[i] & 0xffff; -@@ -644,6 +797,7 @@ - if (R > 0.f && R - offset < noise[i]) noise[i] = R - offset; - } - for ( ; hi < n; i++, fi += 1.f) { -+ /* TODO hotspot */ - - hi = i + fixed / 2; - lo = hi - fixed; -@@ -744,6 +898,7 @@ - - if(sliding_lowpass>n)sliding_lowpass=n; - -+ /* TODO hotspot */ - for(i=0;i=NOISE_COMPAND_LEVELS)dB=NOISE_COMPAND_LEVELS-1; -@@ -816,7 +972,28 @@ - specified att) */ - if(attvi->ath_maxatt)att=p->vi->ath_maxatt; - -+ /* TODO hotspot */ -+#ifdef __SSE__ -+/* this optimization does not make a difference for me */ -+ { -+ register __m128 att4=_mm_set_ps1(att); -+#if 0 -+ for (i=0;i+4ath+i)&0xf;++i) -+ logmask[i]=p->ath[i]+att; -+#endif -+ for (i=0;i+16ath+i),att4)); -+ _mm_storeu_ps(logmask+i+4,_mm_add_ps(_mm_loadu_ps(p->ath+i+4),att4)); -+ _mm_storeu_ps(logmask+i+8,_mm_add_ps(_mm_loadu_ps(p->ath+i+8),att4)); -+ _mm_storeu_ps(logmask+i+12,_mm_add_ps(_mm_loadu_ps(p->ath+i+12),att4)); -+ } -+ for (;i+4ath+i),att4)); -+ } -+ for(;iath[i]+att; - - /* tone masking */ -@@ -833,7 +1010,21 @@ - int i,n=p->n; - float toneatt=p->vi->tone_masteratt[offset_select]; - -+ /* TODO hotspot */ -+#ifdef __SSE__ -+ register float* no=p->noiseoffset[offset_select]; -+ register __m128 toneatt4=_mm_set_ps1(toneatt); -+ register __m128 noisemax4=_mm_set_ps1(p->vi->noisemaxsupp); -+ for(i=0;i+4noiseoffset[offset_select][i]; - if(val>p->vi->noisemaxsupp)val=p->vi->noisemaxsupp; - logmask[i]=max(val,tone[i]+toneatt); -@@ -883,6 +1074,7 @@ - -0.159093, -0.175146, -0.192286, -0.210490, - -0.229718, -0.249913, -0.271001, -0.292893}; - -+/* minor hotspot */ - static void precomputed_couple_point(float premag, - int floorA,int floorB, - float *mag, float *ang){ -@@ -949,6 +1141,7 @@ - } - - /* this is for per-channel noise normalization */ -+/* TODO hotspot */ - static int apsort(const void *a, const void *b){ - if(fabs(**(float **)a)>fabs(**(float **)b))return -1; - return 1; -@@ -972,6 +1165,8 @@ - for(j=0;jn)start=n; - - if(vi->normal_channel_p){ -+ /* TODO hotspot */ -+#ifdef __SSE__DISABLED -+ /* this optimization does not make a difference */ -+ /* also, it appears to distort the results :( */ -+ register __m128 half4=_mm_set1_ps(0.5f); -+ for(;j+4n;j+=partition){ - float acc=0.f; - -+ /* TODO hotspot */ - for(k=0;kvi->normal_point_p){ -+ /* TODO minor hotspot */ - for(k=0;k=p->vi->normal_thresh;k++){ - int l=mag_sort[i][j+k]; - if(l=pointlimit && rint(qM[l])==0.f){ -diff -ur libvorbis-1.0/lib/vorbisfile.c libvorbis-1.0-simd/lib/vorbisfile.c ---- libvorbis-1.0/lib/vorbisfile.c 2002-07-06 06:20:03.000000000 +0200 -+++ libvorbis-1.0-simd/lib/vorbisfile.c 2003-04-26 21:55:49.000000000 +0200 -@@ -21,12 +21,19 @@ - #include - #include - -+#include -+ - #include "vorbis/codec.h" - #include "vorbis/vorbisfile.h" - - #include "os.h" - #include "misc.h" - -+#ifdef __SSE__ -+#include -+#include -+#endif -+ - /* A 'chained bitstream' is a Vorbis bitstream that contains more than - one logical bitstream arranged end to end (the only form of Ogg - multiplexing allowed in a Vorbis bitstream; grouping [parallel -@@ -1500,7 +1507,72 @@ - - if(host_endian==bigendianp){ - if(sgned){ -- -+#ifdef __SSE__ -+ /* Oh no! On my box, exactly one of pcm[0][j] and pcm[1][j] -+ * is always misaligned! SSE required 16-byte alignment. -+ * Also, the pcm[][] array layout is bad for vectorizing, -+ * but we can fix that with mmx unpack magic for the common -+ * case where channels==2. */ -+ if (channels==2 && samples>8) { -+ register __m128 scale=_mm_set1_ps(32768.f); -+ for (j=0; j+832767)val=32767; -+ else if(val<-32768)val=-32768; -+ *(short*)buffer=val; -+ val=vorbis_ftoi(pcm[1][j]*32768.f); -+ if(val>32767)val=32767; -+ else if(val<-32768)val=-32768; -+ *(short*)(buffer+2)=val; -+ buffer+=4; -+ } -+ } else { -+#elif defined(simd_3dn) -+ if (channels==2) { -+ static float scale[2]={32768.f,32768.f}; -+ for(j=0;j - #include -+#include - #include "os.h" - #include "misc.h" - -+#ifdef __SSE__ -+#include -+#endif -+ - float *_vorbis_window(int type, int left){ - float *ret=_ogg_calloc(left,sizeof(*ret)); - int i; -@@ -67,8 +72,68 @@ - for(i=0;i8) { /* make it worth our while */ -+ unsigned long _d=(long)(d+i)&15; -+ unsigned long _win=(long)(window[lW])&15; -+ register __m128* D,* WIN; -+ if (_d) { -+ d[i]*=window[lW][p]; -+ d[i+1]*=window[lW][p+1]; -+ i+=2; p+=2; -+ } -+ D=(__m128*)(d+i); -+ WIN=(__m128*)(window[lW]+p); -+ if (_d ^ _win) { -+ /* one is properly aligned, the other is not */ -+ register __m128 a; -+ WIN=(__m128*)((float*)WIN-2); -+ a=WIN[0]; -+ for(;i+7configure -} - -src_compile() { - elibtoolize - - export CFLAGS="${CFLAGS/-march=*/}" - - ./configure --prefix=/usr \ - --host=${CHOST} || die - - emake || die -} - -src_install () { - make DESTDIR=${D} install || die - - dosym /usr/lib/libvorbisfile.so.3.0.0 /usr/lib/libvorbisfile.so.0 - dosym /usr/lib/libvorbisenc.so.2.0.0 /usr/lib/libvorbisenc.so.0 - - echo "Removing docs installed by make install" - rm -rf ${D}/usr/share/doc - - dodoc AUTHORS COPYING README todo.txt - docinto txt - dodoc doc/*.txt - dohtml -r doc -} - -pkg_postinst() { - einfo - einfo "Note the 1.0 version of libvorbis has been installed" - einfo "Applications that used pre-1.0 vorbis libraries will" - einfo "need to be recompiled for the new version." - einfo "Now that the vorbis folks have finalized the API" - einfo "this should be the last time for a while that" - einfo "recompilation is needed for these things." - einfo -} diff --git a/media-libs/libvorbis/libvorbis-1.0-r3.ebuild b/media-libs/libvorbis/libvorbis-1.0-r3.ebuild deleted file mode 100644 index fa13552417cc..000000000000 --- a/media-libs/libvorbis/libvorbis-1.0-r3.ebuild +++ /dev/null @@ -1,72 +0,0 @@ -# Copyright 1999-2004 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-libs/libvorbis/libvorbis-1.0-r3.ebuild,v 1.6 2004/06/24 23:15:54 agriffis Exp $ - -inherit libtool eutils - -DESCRIPTION="the Ogg Vorbis sound file format library" -SRC_URI="http://fatpipe.vorbis.com/files/1.0/unix/${P}.tar.gz" -HOMEPAGE="http://www.xiph.org/ogg/vorbis/index.html" - -IUSE="sse" -DEPEND=">=media-libs/libogg-1.0" - -SLOT="0" -LICENSE="as-is" -KEYWORDS="~x86" - -IUSE="" - -src_unpack() { - unpack ${A} - - cd ${S} - if use x86 ; then - use sse && epatch ${FILESDIR}/${PN}-simd.patch - fi - - epatch ${FILESDIR}/${PN}-m4.patch || die "Patching failed" - # Fix a gcc crash. With the new atexit patch to gcc, it - # seems it do not handle -mno-ieee-fp too well. - cp configure configure.orig - sed -e "s:-mno-ieee-fp::g" \ - configure.orig >configure -} - -src_compile() { - elibtoolize - - #export CFLAGS="${CFLAGS/-march=*/}" - - ./configure --prefix=/usr \ - --host=${CHOST} || die - - emake || die -} - -src_install () { - make DESTDIR=${D} install || die - - dosym /usr/lib/libvorbisfile.so.3.0.0 /usr/lib/libvorbisfile.so.0 - dosym /usr/lib/libvorbisenc.so.2.0.0 /usr/lib/libvorbisenc.so.0 - - echo "Removing docs installed by make install" - rm -rf ${D}/usr/share/doc - - dodoc AUTHORS COPYING README todo.txt - docinto txt - dodoc doc/*.txt - dohtml -r doc -} - -pkg_postinst() { - einfo - einfo "Note the 1.0 version of libvorbis has been installed" - einfo "Applications that used pre-1.0 vorbis libraries will" - einfo "need to be recompiled for the new version." - einfo "Now that the vorbis folks have finalized the API" - einfo "this should be the last time for a while that" - einfo "recompilation is needed for these things." - einfo -} - diff --git a/media-libs/libvorbis/libvorbis-1.0-r4.ebuild b/media-libs/libvorbis/libvorbis-1.0-r4.ebuild deleted file mode 100644 index f74156261cad..000000000000 --- a/media-libs/libvorbis/libvorbis-1.0-r4.ebuild +++ /dev/null @@ -1,80 +0,0 @@ -# Copyright 1999-2004 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-libs/libvorbis/libvorbis-1.0-r4.ebuild,v 1.14 2004/06/24 23:15:54 agriffis Exp $ - -inherit libtool eutils flag-o-matic - -DESCRIPTION="the Ogg Vorbis sound file format library" -SRC_URI="http://fatpipe.vorbis.com/files/1.0/unix/${P}.tar.gz" -HOMEPAGE="http://www.xiph.org/ogg/vorbis/index.html" - -IUSE="sse 3dnow" -DEPEND=">=media-libs/libogg-1.0" - -SLOT="0" -LICENSE="as-is" -KEYWORDS="x86 amd64 ~mips hppa" - -IUSE="" - -src_unpack() { - unpack ${A} - - cd ${S} - if use x86 ; then - if use sse; then - epatch ${FILESDIR}/${PN}-simd.patch - # patch doesn't support sse2. See #28439 - filter-flags "-msse2" - fi - use 3dnow && append-flags -Dsimd_3dn - fi - - epatch ${FILESDIR}/${PN}-m4.patch || die "Patching failed" - # Fix a gcc crash. With the new atexit patch to gcc, it - # seems it do not handle -mno-ieee-fp too well. - sed -i -e "s:-mno-ieee-fp::g" configure -} - -src_compile() { - elibtoolize - - # take out -fomit-frame-pointer from CFLAGS if k6-2 - is-flag "-march=k6-3" && filter-flags "-fomit-frame-pointer" - is-flag "-march=k6-2" && filter-flags "-fomit-frame-pointer" - is-flag "-march=k6" && filter-flags "-fomit-frame-pointer" - - # filter march, see bug #26463 for details - filter-flags "-march=pentium?" - - ./configure --prefix=/usr \ - --host=${CHOST} || die - - emake || die -} - -src_install () { - make DESTDIR=${D} install || die - - dosym /usr/lib/libvorbisfile.so.3.0.0 /usr/lib/libvorbisfile.so.0 - dosym /usr/lib/libvorbisenc.so.2.0.0 /usr/lib/libvorbisenc.so.0 - - echo "Removing docs installed by make install" - rm -rf ${D}/usr/share/doc - - dodoc AUTHORS COPYING README todo.txt - docinto txt - dodoc doc/*.txt - dohtml -r doc -} - -pkg_postinst() { - einfo - einfo "Note the 1.0 version of libvorbis has been installed" - einfo "Applications that used pre-1.0 vorbis libraries will" - einfo "need to be recompiled for the new version." - einfo "Now that the vorbis folks have finalized the API" - einfo "this should be the last time for a while that" - einfo "recompilation is needed for these things." - einfo -} diff --git a/media-libs/libvorbis/libvorbis-1.0.1-r1.ebuild b/media-libs/libvorbis/libvorbis-1.0.1-r1.ebuild deleted file mode 100644 index 2460611a39b4..000000000000 --- a/media-libs/libvorbis/libvorbis-1.0.1-r1.ebuild +++ /dev/null @@ -1,64 +0,0 @@ -# Copyright 1999-2004 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-libs/libvorbis/libvorbis-1.0.1-r1.ebuild,v 1.4 2004/06/24 23:15:54 agriffis Exp $ - -inherit libtool flag-o-matic gcc - -DESCRIPTION="the Ogg Vorbis sound file format library" -HOMEPAGE="http://www.xiph.org/ogg/vorbis/index.html" -SRC_URI="http://www.vorbis.com/files/${PV}/unix/${P}.tar.gz" - -LICENSE="as-is" -SLOT="0" -KEYWORDS="x86 ~amd64 ~mips sparc hppa alpha ia64" - -IUSE="" - -RDEPEND=">=media-libs/libogg-1.0" -DEPEND="${RDEPEND} - sys-apps/sed" - -src_unpack() { - unpack ${A} - cd ${S} - # Fix a gcc crash. With the new atexit patch to gcc, it - # seems it does not handle -mno-ieee-fp very well. - sed -i -e "s:-mno-ieee-fp::g" configure -} - -src_compile() { - elibtoolize - - # Cannot compile with sse2 support it would seem #36104 - use x86 && [ $(gcc-major-version) -eq 3 ] && append-flags -mno-sse2 - - # take out -fomit-frame-pointer from CFLAGS if k6-2 - is-flag -march=k6-3 && filter-flags -fomit-frame-pointer - is-flag -march=k6-2 && filter-flags -fomit-frame-pointer - is-flag -march=k6 && filter-flags -fomit-frame-pointer - - # over optimization causes horrible audio artifacts #26463 - filter-flags -march=pentium? - - # gcc on hppa causes issues when assembling - use hppa && replace-flags -march=2.0 -march=1.0 - - # Make prelink work properly - append-flags -fPIC - append-ldflags -fPIC - - econf || die - emake || die -} - -src_install() { - make DESTDIR=${D} install || die - dosym /usr/lib/libvorbisfile.so.3.0.0 /usr/lib/libvorbisfile.so.0 - dosym /usr/lib/libvorbisenc.so.2.0.0 /usr/lib/libvorbisenc.so.0 - - rm -rf ${D}/usr/share/doc - dodoc AUTHORS COPYING README todo.txt - docinto txt - dodoc doc/*.txt - dohtml -r doc -} diff --git a/media-libs/libvorbis/libvorbis-1.0.1.ebuild b/media-libs/libvorbis/libvorbis-1.0.1.ebuild deleted file mode 100644 index 0134d3e00f70..000000000000 --- a/media-libs/libvorbis/libvorbis-1.0.1.ebuild +++ /dev/null @@ -1,61 +0,0 @@ -# Copyright 1999-2004 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-libs/libvorbis/libvorbis-1.0.1.ebuild,v 1.11 2004/06/24 23:15:54 agriffis Exp $ - -inherit libtool flag-o-matic gcc - -DESCRIPTION="the Ogg Vorbis sound file format library" -HOMEPAGE="http://www.xiph.org/ogg/vorbis/index.html" -SRC_URI="http://www.vorbis.com/files/${PV}/unix/${P}.tar.gz" - -LICENSE="as-is" -SLOT="0" -KEYWORDS="x86 ~amd64 ~mips sparc hppa" - -IUSE="" - -RDEPEND=">=media-libs/libogg-1.0" - -DEPEND="${RDEPEND} - sys-apps/sed" - -src_unpack() { - unpack ${A} - cd ${S} - # Fix a gcc crash. With the new atexit patch to gcc, it - # seems it does not handle -mno-ieee-fp very well. - sed -i -e "s:-mno-ieee-fp::g" configure -} - -src_compile() { - elibtoolize - - # Cannot compile with sse2 support it would seem #36104 - use x86 && [ $(gcc-major-version) -eq 3 ] && append-flags -mno-sse2 - - # take out -fomit-frame-pointer from CFLAGS if k6-2 - is-flag -march=k6-3 && filter-flags -fomit-frame-pointer - is-flag -march=k6-2 && filter-flags -fomit-frame-pointer - is-flag -march=k6 && filter-flags -fomit-frame-pointer - - # over optimization causes horrible audio artifacts #26463 - filter-flags -march=pentium? - - # gcc on hppa causes issues when assembling - use hppa && replace-flags -march=2.0 -march=1.0 - - econf || die - emake || die -} - -src_install() { - make DESTDIR=${D} install || die - dosym /usr/lib/libvorbisfile.so.3.0.0 /usr/lib/libvorbisfile.so.0 - dosym /usr/lib/libvorbisenc.so.2.0.0 /usr/lib/libvorbisenc.so.0 - - rm -rf ${D}/usr/share/doc - dodoc AUTHORS COPYING README todo.txt - docinto txt - dodoc doc/*.txt - dohtml -r doc -} diff --git a/media-libs/libvorbis/libvorbis-1.1.0.ebuild b/media-libs/libvorbis/libvorbis-1.1.0.ebuild new file mode 100644 index 000000000000..4a3b48247001 --- /dev/null +++ b/media-libs/libvorbis/libvorbis-1.1.0.ebuild @@ -0,0 +1,80 @@ +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-libs/libvorbis/libvorbis-1.1.0.ebuild,v 1.1 2004/09/22 20:51:58 eradicator Exp $ + +inherit libtool flag-o-matic gcc + +DESCRIPTION="the Ogg Vorbis sound file format library" +HOMEPAGE="http://www.xiph.org/ogg/vorbis/index.html" +SRC_URI="http://downloads.xiph.org/releases/vorbis/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~x86 ~amd64 ~mips ~sparc ~hppa ~alpha ~ia64 ~ppc ~ppc64 ~macos ~ppc-macos" + +IUSE="" + +RDEPEND=">=media-libs/libogg-1.0" +DEPEND="${RDEPEND} + sys-apps/sed" + +src_unpack() { + unpack ${A} + cd ${S} + # Fix a gcc crash. With the new atexit patch to gcc, it + # seems it does not handle -mno-ieee-fp very well. + sed -i -e "s:-mno-ieee-fp::g" configure +} + +src_compile() { + # Fixes some strange sed-, libtool- and ranlib-errors on + # Mac OS X + if use macos || use ppc-macos; then + glibtoolize + else + elibtoolize + fi + + # Cannot compile with sse2 support it would seem #36104 + use x86 && [ $(gcc-major-version) -eq 3 ] && append-flags -mno-sse2 + + # take out -fomit-frame-pointer from CFLAGS if k6-2 + is-flag -march=k6-3 && filter-flags -fomit-frame-pointer + is-flag -march=k6-2 && filter-flags -fomit-frame-pointer + is-flag -march=k6 && filter-flags -fomit-frame-pointer + + # over optimization causes horrible audio artifacts #26463 + filter-flags -march=pentium? + + # gcc on hppa causes issues when assembling + use hppa && replace-flags -march=2.0 -march=1.0 + + # Make prelink work properly + append-flags -fPIC + append-ldflags -fPIC + + econf || die + use macos && cd ${S} && sed -i -e 's/examples//' Makefile + use ppc-macos && cd ${S} && sed -i -e 's/examples//' Makefile + emake || die +} + +src_install() { + make DESTDIR=${D} install || die + if use macos; then + dosym /usr/lib/libvorbisfile.3.1.0.dylib /usr/lib/libvorbisfile.0.dylib + dosym /usr/lib/libvorbisenc.2.0.0.dylib /usr/lib/libvorbisenc.0.dylib + elif use ppc-macos; then + dosym /usr/lib/libvorbisfile.3.1.0.dylib /usr/lib/libvorbisfile.0.dylib + dosym /usr/lib/libvorbisenc.2.0.0.dylib /usr/lib/libvorbisenc.0.dylib + else + dosym /usr/lib/libvorbisfile.so.3.1.0 /usr/lib/libvorbisfile.so.0 + dosym /usr/lib/libvorbisenc.so.2.0.0 /usr/lib/libvorbisenc.so.0 + fi + + rm -rf ${D}/usr/share/doc + dodoc AUTHORS README todo.txt + docinto txt + dodoc doc/*.txt + dohtml -r doc +} -- cgit v1.2.3-65-gdbad