summaryrefslogtreecommitdiff
path: root/libavcodec/x86/lpc.c
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2013-05-07 01:42:08 +0200
committerDiego Biurrun <diego@biurrun.de>2013-05-08 01:04:04 +0200
commit87614667606b42476f9017d79faf12b45a0bd77c (patch)
tree2033d03173f89c551d4569f9021d3faf7b3c2f6b /libavcodec/x86/lpc.c
parent06122c253394b10a694d3d95e00e503c89852134 (diff)
x86: dsputil: Move ff_pd assembly constants to the only place they are used
Diffstat (limited to 'libavcodec/x86/lpc.c')
-rw-r--r--libavcodec/x86/lpc.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/libavcodec/x86/lpc.c b/libavcodec/x86/lpc.c
index 02b489fc91..7a37b88582 100644
--- a/libavcodec/x86/lpc.c
+++ b/libavcodec/x86/lpc.c
@@ -23,8 +23,12 @@
#include "libavutil/attributes.h"
#include "libavutil/cpu.h"
#include "libavutil/internal.h"
+#include "libavutil/mem.h"
#include "libavcodec/lpc.h"
+DECLARE_ASM_CONST(16, double, pd_1)[2] = { 1.0, 1.0 };
+DECLARE_ASM_CONST(16, double, pd_2)[2] = { 2.0, 2.0 };
+
#if HAVE_SSE2_INLINE
static void lpc_apply_welch_window_sse2(const int32_t *data, int len,
@@ -36,8 +40,8 @@ static void lpc_apply_welch_window_sse2(const int32_t *data, int len,
x86_reg j = n2*sizeof(int32_t);
__asm__ volatile(
"movsd %4, %%xmm7 \n\t"
- "movapd "MANGLE(ff_pd_1)", %%xmm6 \n\t"
- "movapd "MANGLE(ff_pd_2)", %%xmm5 \n\t"
+ "movapd "MANGLE(pd_1)", %%xmm6 \n\t"
+ "movapd "MANGLE(pd_2)", %%xmm5 \n\t"
"movlhps %%xmm7, %%xmm7 \n\t"
"subpd %%xmm5, %%xmm7 \n\t"
"addsd %%xmm6, %%xmm7 \n\t"
@@ -86,9 +90,9 @@ static void lpc_compute_autocorr_sse2(const double *data, int len, int lag,
x86_reg i = -len*sizeof(double);
if(j == lag-2) {
__asm__ volatile(
- "movsd "MANGLE(ff_pd_1)", %%xmm0 \n\t"
- "movsd "MANGLE(ff_pd_1)", %%xmm1 \n\t"
- "movsd "MANGLE(ff_pd_1)", %%xmm2 \n\t"
+ "movsd "MANGLE(pd_1)", %%xmm0 \n\t"
+ "movsd "MANGLE(pd_1)", %%xmm1 \n\t"
+ "movsd "MANGLE(pd_1)", %%xmm2 \n\t"
"1: \n\t"
"movapd (%2,%0), %%xmm3 \n\t"
"movupd -8(%3,%0), %%xmm4 \n\t"
@@ -116,8 +120,8 @@ static void lpc_compute_autocorr_sse2(const double *data, int len, int lag,
);
} else {
__asm__ volatile(
- "movsd "MANGLE(ff_pd_1)", %%xmm0 \n\t"
- "movsd "MANGLE(ff_pd_1)", %%xmm1 \n\t"
+ "movsd "MANGLE(pd_1)", %%xmm0 \n\t"
+ "movsd "MANGLE(pd_1)", %%xmm1 \n\t"
"1: \n\t"
"movapd (%3,%0), %%xmm3 \n\t"
"movupd -8(%4,%0), %%xmm4 \n\t"