aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/x86/lpc_mmx.c
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2011-01-21 00:11:44 +0000
committerMans Rullgard <mans@mansr.com>2011-01-21 19:58:59 +0000
commit56f8952b252f85281317ecd3e0b04c4cae93fd72 (patch)
treea6c8fa8727be01daa6c9200b9dee20ba261b2c05 /libavcodec/x86/lpc_mmx.c
parent50196a982bf7c8be9b41053fa0975473c217e709 (diff)
downloadffmpeg-56f8952b252f85281317ecd3e0b04c4cae93fd72.tar.gz
Move lpc_compute_autocorr() from DSPContext to a new struct LPCContext.
Signed-off-by: Mans Rullgard <mans@mansr.com>
Diffstat (limited to 'libavcodec/x86/lpc_mmx.c')
-rw-r--r--libavcodec/x86/lpc_mmx.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/libavcodec/x86/lpc_mmx.c b/libavcodec/x86/lpc_mmx.c
index 49eb569eea..19aad9860f 100644
--- a/libavcodec/x86/lpc_mmx.c
+++ b/libavcodec/x86/lpc_mmx.c
@@ -20,7 +20,8 @@
*/
#include "libavutil/x86_cpu.h"
-#include "dsputil_mmx.h"
+#include "libavutil/cpu.h"
+#include "libavcodec/lpc.h"
static void apply_welch_window_sse2(const int32_t *data, int len, double *w_data)
{
@@ -68,7 +69,7 @@ static void apply_welch_window_sse2(const int32_t *data, int len, double *w_data
#undef WELCH
}
-void ff_lpc_compute_autocorr_sse2(const int32_t *data, int len, int lag,
+static void lpc_compute_autocorr_sse2(const int32_t *data, int len, int lag,
double *autoc)
{
double tmp[len + lag + 2];
@@ -141,3 +142,12 @@ void ff_lpc_compute_autocorr_sse2(const int32_t *data, int len, int lag,
}
}
}
+
+av_cold void ff_lpc_init_x86(LPCContext *c)
+{
+ int mm_flags = av_get_cpu_flags();
+
+ if (mm_flags & (AV_CPU_FLAG_SSE2|AV_CPU_FLAG_SSE2SLOW)) {
+ c->lpc_compute_autocorr = lpc_compute_autocorr_sse2;
+ }
+}