summaryrefslogtreecommitdiffstats
path: root/liba52/downmix.c
diff options
context:
space:
mode:
authornplourde <nplourde@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-04-15 20:46:54 +0000
committernplourde <nplourde@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-04-15 20:46:54 +0000
commita3713ceb29828cce576fa3ea6f936f3ab1d61a38 (patch)
tree7c3284eed13ac128e3b5a9a56874f269d437fc1a /liba52/downmix.c
parent563dca1090f8cf7f2d683277a197ff3b6a2c3aaf (diff)
downloadmpv-a3713ceb29828cce576fa3ea6f936f3ab1d61a38.tar.bz2
mpv-a3713ceb29828cce576fa3ea6f936f3ab1d61a38.tar.xz
add support for intel mac. mp3lib is not fixed yet.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18105 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'liba52/downmix.c')
-rw-r--r--liba52/downmix.c55
1 files changed, 28 insertions, 27 deletions
diff --git a/liba52/downmix.c b/liba52/downmix.c
index 52955c6335..67eee7a89e 100644
--- a/liba52/downmix.c
+++ b/liba52/downmix.c
@@ -28,6 +28,7 @@
*/
#include "config.h"
+#include "asmalign.h"
#include <string.h>
#include <inttypes.h>
@@ -691,7 +692,7 @@ static void mix2to1_SSE (sample_t * dest, sample_t * src, sample_t bias)
"movlps %2, %%xmm7 \n\t"
"shufps $0x00, %%xmm7, %%xmm7 \n\t"
"mov $-1024, %%"REG_S" \n\t"
- ".balign 16\n\t"
+ ASMALIGN16
"1: \n\t"
"movaps (%0, %%"REG_S"), %%xmm0 \n\t"
"movaps 16(%0, %%"REG_S"), %%xmm1\n\t"
@@ -714,7 +715,7 @@ static void mix3to1_SSE (sample_t * samples, sample_t bias)
"movlps %1, %%xmm7 \n\t"
"shufps $0x00, %%xmm7, %%xmm7 \n\t"
"mov $-1024, %%"REG_S" \n\t"
- ".balign 16\n\t"
+ ASMALIGN16
"1: \n\t"
"movaps (%0, %%"REG_S"), %%xmm0 \n\t"
"movaps 1024(%0, %%"REG_S"), %%xmm1\n\t"
@@ -735,7 +736,7 @@ static void mix4to1_SSE (sample_t * samples, sample_t bias)
"movlps %1, %%xmm7 \n\t"
"shufps $0x00, %%xmm7, %%xmm7 \n\t"
"mov $-1024, %%"REG_S" \n\t"
- ".balign 16\n\t"
+ ASMALIGN16
"1: \n\t"
"movaps (%0, %%"REG_S"), %%xmm0 \n\t"
"movaps 1024(%0, %%"REG_S"), %%xmm1\n\t"
@@ -757,7 +758,7 @@ static void mix5to1_SSE (sample_t * samples, sample_t bias)
"movlps %1, %%xmm7 \n\t"
"shufps $0x00, %%xmm7, %%xmm7 \n\t"
"mov $-1024, %%"REG_S" \n\t"
- ".balign 16\n\t"
+ ASMALIGN16
"1: \n\t"
"movaps (%0, %%"REG_S"), %%xmm0 \n\t"
"movaps 1024(%0, %%"REG_S"), %%xmm1\n\t"
@@ -780,7 +781,7 @@ static void mix3to2_SSE (sample_t * samples, sample_t bias)
"movlps %1, %%xmm7 \n\t"
"shufps $0x00, %%xmm7, %%xmm7 \n\t"
"mov $-1024, %%"REG_S" \n\t"
- ".balign 16\n\t"
+ ASMALIGN16
"1: \n\t"
"movaps 1024(%0, %%"REG_S"), %%xmm0\n\t"
"addps %%xmm7, %%xmm0 \n\t" //common
@@ -803,7 +804,7 @@ static void mix21to2_SSE (sample_t * left, sample_t * right, sample_t bias)
"movlps %2, %%xmm7 \n\t"
"shufps $0x00, %%xmm7, %%xmm7 \n\t"
"mov $-1024, %%"REG_S" \n\t"
- ".balign 16\n\t"
+ ASMALIGN16
"1: \n\t"
"movaps 1024(%1, %%"REG_S"), %%xmm0\n\t"
"addps %%xmm7, %%xmm0 \n\t" //common
@@ -826,7 +827,7 @@ static void mix21toS_SSE (sample_t * samples, sample_t bias)
"movlps %1, %%xmm7 \n\t"
"shufps $0x00, %%xmm7, %%xmm7 \n\t"
"mov $-1024, %%"REG_S" \n\t"
- ".balign 16\n\t"
+ ASMALIGN16
"1: \n\t"
"movaps 2048(%0, %%"REG_S"), %%xmm0\n\t" // surround
"movaps (%0, %%"REG_S"), %%xmm1 \n\t"
@@ -850,7 +851,7 @@ static void mix31to2_SSE (sample_t * samples, sample_t bias)
"movlps %1, %%xmm7 \n\t"
"shufps $0x00, %%xmm7, %%xmm7 \n\t"
"mov $-1024, %%"REG_S" \n\t"
- ".balign 16\n\t"
+ ASMALIGN16
"1: \n\t"
"movaps 1024(%0, %%"REG_S"), %%xmm0\n\t"
"addps 3072(%0, %%"REG_S"), %%xmm0\n\t"
@@ -874,7 +875,7 @@ static void mix31toS_SSE (sample_t * samples, sample_t bias)
"movlps %1, %%xmm7 \n\t"
"shufps $0x00, %%xmm7, %%xmm7 \n\t"
"mov $-1024, %%"REG_S" \n\t"
- ".balign 16\n\t"
+ ASMALIGN16
"1: \n\t"
"movaps 1024(%0, %%"REG_S"), %%xmm0\n\t"
"movaps 3072(%0, %%"REG_S"), %%xmm3\n\t" // surround
@@ -900,7 +901,7 @@ static void mix22toS_SSE (sample_t * samples, sample_t bias)
"movlps %1, %%xmm7 \n\t"
"shufps $0x00, %%xmm7, %%xmm7 \n\t"
"mov $-1024, %%"REG_S" \n\t"
- ".balign 16\n\t"
+ ASMALIGN16
"1: \n\t"
"movaps 2048(%0, %%"REG_S"), %%xmm0\n\t"
"addps 3072(%0, %%"REG_S"), %%xmm0\n\t" // surround
@@ -925,7 +926,7 @@ static void mix32to2_SSE (sample_t * samples, sample_t bias)
"movlps %1, %%xmm7 \n\t"
"shufps $0x00, %%xmm7, %%xmm7 \n\t"
"mov $-1024, %%"REG_S" \n\t"
- ".balign 16\n\t"
+ ASMALIGN16
"1: \n\t"
"movaps 1024(%0, %%"REG_S"), %%xmm0\n\t"
"addps %%xmm7, %%xmm0 \n\t" // common
@@ -949,7 +950,7 @@ static void mix32toS_SSE (sample_t * samples, sample_t bias)
"movlps %1, %%xmm7 \n\t"
"shufps $0x00, %%xmm7, %%xmm7 \n\t"
"mov $-1024, %%"REG_S" \n\t"
- ".balign 16\n\t"
+ ASMALIGN16
"1: \n\t"
"movaps 1024(%0, %%"REG_S"), %%xmm0\n\t"
"movaps 3072(%0, %%"REG_S"), %%xmm2\n\t"
@@ -976,7 +977,7 @@ static void move2to1_SSE (sample_t * src, sample_t * dest, sample_t bias)
"movlps %2, %%xmm7 \n\t"
"shufps $0x00, %%xmm7, %%xmm7 \n\t"
"mov $-1024, %%"REG_S" \n\t"
- ".balign 16\n\t"
+ ASMALIGN16
"1: \n\t"
"movaps (%0, %%"REG_S"), %%xmm0 \n\t"
"movaps 16(%0, %%"REG_S"), %%xmm1\n\t"
@@ -998,7 +999,7 @@ static void zero_MMX(sample_t * samples)
asm volatile(
"mov $-1024, %%"REG_S" \n\t"
"pxor %%mm0, %%mm0 \n\t"
- ".balign 16\n\t"
+ ASMALIGN16
"1: \n\t"
"movq %%mm0, (%0, %%"REG_S") \n\t"
"movq %%mm0, 8(%0, %%"REG_S") \n\t"
@@ -1258,7 +1259,7 @@ static void mix2to1_3dnow (sample_t * dest, sample_t * src, sample_t bias)
"movd %2, %%mm7 \n\t"
"punpckldq %2, %%mm7 \n\t"
"mov $-1024, %%"REG_S" \n\t"
- ".balign 16\n\t"
+ ASMALIGN16
"1: \n\t"
"movq (%0, %%"REG_S"), %%mm0 \n\t"
"movq 8(%0, %%"REG_S"), %%mm1 \n\t"
@@ -1289,7 +1290,7 @@ static void mix3to1_3dnow (sample_t * samples, sample_t bias)
"movd %1, %%mm7 \n\t"
"punpckldq %1, %%mm7 \n\t"
"mov $-1024, %%"REG_S" \n\t"
- ".balign 16\n\t"
+ ASMALIGN16
"1: \n\t"
"movq (%0, %%"REG_S"), %%mm0 \n\t"
"movq 8(%0, %%"REG_S"), %%mm1 \n\t"
@@ -1316,7 +1317,7 @@ static void mix4to1_3dnow (sample_t * samples, sample_t bias)
"movd %1, %%mm7 \n\t"
"punpckldq %1, %%mm7 \n\t"
"mov $-1024, %%"REG_S" \n\t"
- ".balign 16\n\t"
+ ASMALIGN16
"1: \n\t"
"movq (%0, %%"REG_S"), %%mm0 \n\t"
"movq 8(%0, %%"REG_S"), %%mm1 \n\t"
@@ -1345,7 +1346,7 @@ static void mix5to1_3dnow (sample_t * samples, sample_t bias)
"movd %1, %%mm7 \n\t"
"punpckldq %1, %%mm7 \n\t"
"mov $-1024, %%"REG_S" \n\t"
- ".balign 16\n\t"
+ ASMALIGN16
"1: \n\t"
"movq (%0, %%"REG_S"), %%mm0 \n\t"
"movq 8(%0, %%"REG_S"), %%mm1 \n\t"
@@ -1376,7 +1377,7 @@ static void mix3to2_3dnow (sample_t * samples, sample_t bias)
"movd %1, %%mm7 \n\t"
"punpckldq %1, %%mm7 \n\t"
"mov $-1024, %%"REG_S" \n\t"
- ".balign 16\n\t"
+ ASMALIGN16
"1: \n\t"
"movq 1024(%0, %%"REG_S"), %%mm0\n\t"
"movq 1032(%0, %%"REG_S"), %%mm1\n\t"
@@ -1407,7 +1408,7 @@ static void mix21to2_3dnow (sample_t * left, sample_t * right, sample_t bias)
"movd %2, %%mm7 \n\t"
"punpckldq %2, %%mm7 \n\t"
"mov $-1024, %%"REG_S" \n\t"
- ".balign 16\n\t"
+ ASMALIGN16
"1: \n\t"
"movq 1024(%1, %%"REG_S"), %%mm0\n\t"
"movq 1032(%1, %%"REG_S"), %%mm1\n\t"
@@ -1438,7 +1439,7 @@ static void mix21toS_3dnow (sample_t * samples, sample_t bias)
"movd %1, %%mm7 \n\t"
"punpckldq %1, %%mm7 \n\t"
"mov $-1024, %%"REG_S" \n\t"
- ".balign 16\n\t"
+ ASMALIGN16
"1: \n\t"
"movq 2048(%0, %%"REG_S"), %%mm0\n\t" // surround
"movq 2056(%0, %%"REG_S"), %%mm1\n\t" // surround
@@ -1471,7 +1472,7 @@ static void mix31to2_3dnow (sample_t * samples, sample_t bias)
"movd %1, %%mm7 \n\t"
"punpckldq %1, %%mm7 \n\t"
"mov $-1024, %%"REG_S" \n\t"
- ".balign 16\n\t"
+ ASMALIGN16
"1: \n\t"
"movq 1024(%0, %%"REG_S"), %%mm0\n\t"
"movq 1032(%0, %%"REG_S"), %%mm1\n\t"
@@ -1504,7 +1505,7 @@ static void mix31toS_3dnow (sample_t * samples, sample_t bias)
"movd %1, %%mm7 \n\t"
"punpckldq %1, %%mm7 \n\t"
"mov $-1024, %%"REG_S" \n\t"
- ".balign 16\n\t"
+ ASMALIGN16
"1: \n\t"
"movq 1024(%0, %%"REG_S"), %%mm0\n\t"
"movq 1032(%0, %%"REG_S"), %%mm1\n\t"
@@ -1541,7 +1542,7 @@ static void mix22toS_3dnow (sample_t * samples, sample_t bias)
"movd %1, %%mm7 \n\t"
"punpckldq %1, %%mm7 \n\t"
"mov $-1024, %%"REG_S" \n\t"
- ".balign 16\n\t"
+ ASMALIGN16
"1: \n\t"
"movq 2048(%0, %%"REG_S"), %%mm0\n\t"
"movq 2056(%0, %%"REG_S"), %%mm1\n\t"
@@ -1576,7 +1577,7 @@ static void mix32to2_3dnow (sample_t * samples, sample_t bias)
"movd %1, %%mm7 \n\t"
"punpckldq %1, %%mm7 \n\t"
"mov $-1024, %%"REG_S" \n\t"
- ".balign 16\n\t"
+ ASMALIGN16
"1: \n\t"
"movq 1024(%0, %%"REG_S"), %%mm0\n\t"
"movq 1032(%0, %%"REG_S"), %%mm1\n\t"
@@ -1608,7 +1609,7 @@ static void mix32toS_3dnow (sample_t * samples, sample_t bias)
{
asm volatile(
"mov $-1024, %%"REG_S" \n\t"
- ".balign 16\n\t"
+ ASMALIGN16
"1: \n\t"
"movd %1, %%mm7 \n\t"
"punpckldq %1, %%mm7 \n\t"
@@ -1649,7 +1650,7 @@ static void move2to1_3dnow (sample_t * src, sample_t * dest, sample_t bias)
"movd %2, %%mm7 \n\t"
"punpckldq %2, %%mm7 \n\t"
"mov $-1024, %%"REG_S" \n\t"
- ".balign 16\n\t"
+ ASMALIGN16
"1: \n\t"
"movq (%0, %%"REG_S"), %%mm0 \n\t"
"movq 8(%0, %%"REG_S"), %%mm1 \n\t"