aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-05-09 11:01:14 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-05-09 11:01:14 +0200
commit3469c24a1084f677b407bb9fd4099d7a6b6bbc6c (patch)
tree47ceaab1f59ddadb8574a3c29499aa0c1f48d602 /libavcodec
parente4723a82f7088f5d4ab32ada529c3f69ba3606b0 (diff)
parent87614667606b42476f9017d79faf12b45a0bd77c (diff)
downloadffmpeg-3469c24a1084f677b407bb9fd4099d7a6b6bbc6c.tar.gz
Merge commit '87614667606b42476f9017d79faf12b45a0bd77c'
* commit '87614667606b42476f9017d79faf12b45a0bd77c': x86: dsputil: Move ff_pd assembly constants to the only place they are used Conflicts: libavcodec/x86/lpc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/x86/dsputil_mmx.c3
-rw-r--r--libavcodec/x86/dsputil_mmx.h3
-rw-r--r--libavcodec/x86/lpc.c18
3 files changed, 11 insertions, 13 deletions
diff --git a/libavcodec/x86/dsputil_mmx.c b/libavcodec/x86/dsputil_mmx.c
index c57a31e336..f89a351aeb 100644
--- a/libavcodec/x86/dsputil_mmx.c
+++ b/libavcodec/x86/dsputil_mmx.c
@@ -51,9 +51,6 @@ DECLARE_ALIGNED(16, const xmm_reg, ff_pw_1019) = { 0x03FB03FB03FB03FBULL, 0x03F
DECLARE_ALIGNED(8, const uint64_t, ff_pb_FC) = 0xFCFCFCFCFCFCFCFCULL;
-DECLARE_ALIGNED(16, const double, ff_pd_1)[2] = { 1.0, 1.0 };
-DECLARE_ALIGNED(16, const double, ff_pd_2)[2] = { 2.0, 2.0 };
-
void ff_put_pixels8_l2_mmxext(uint8_t *dst, uint8_t *src1, uint8_t *src2,
int dstStride, int src1Stride, int h);
diff --git a/libavcodec/x86/dsputil_mmx.h b/libavcodec/x86/dsputil_mmx.h
index ce6bc80ac9..16711c2038 100644
--- a/libavcodec/x86/dsputil_mmx.h
+++ b/libavcodec/x86/dsputil_mmx.h
@@ -51,9 +51,6 @@ extern const xmm_reg ff_pb_3;
extern const xmm_reg ff_pb_F8;
extern const uint64_t ff_pb_FC;
-extern const double ff_pd_1[2];
-extern const double ff_pd_2[2];
-
#define SBUTTERFLY(a,b,t,n,m)\
"mov" #m " " #a ", " #t " \n\t" /* abcd */\
"punpckl" #n " " #b ", " #a " \n\t" /* aebf */\
diff --git a/libavcodec/x86/lpc.c b/libavcodec/x86/lpc.c
index 19622123e0..7dd35d4cd8 100644
--- a/libavcodec/x86/lpc.c
+++ b/libavcodec/x86/lpc.c
@@ -22,8 +22,12 @@
#include "libavutil/x86/asm.h"
#include "libavutil/attributes.h"
#include "libavutil/cpu.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,
@@ -35,8 +39,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"
@@ -85,9 +89,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"
@@ -115,8 +119,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"