Move lpc_compute_autocorr() from DSPContext to a new struct LPCContext.

Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 56f8952b25)
This commit is contained in:
Justin Ruggles
2011-01-21 00:11:44 +00:00
committed by Michael Niedermayer
parent d3058be6ee
commit 0d8837bdda
12 changed files with 63 additions and 43 deletions

View File

@@ -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;
}
}