summaryrefslogtreecommitdiff
path: root/libavutil/lls.c
diff options
context:
space:
mode:
authorLoren Merritt <lorenm@u.washington.edu>2013-06-18 21:30:42 +0000
committerLuca Barbato <lu_zero@gentoo.org>2013-06-29 13:23:57 +0200
commit502ab21af0ca68f76d6112722c46d2f35c004053 (patch)
treec68ce5c0c787fc552cf572e4aeb3b14f4d80b8a0 /libavutil/lls.c
parent41578f70cf8aec8e7565fba1ca7e07f3dc46c3d2 (diff)
x86: lpc: simd av_update_lls
4x-6x faster on sandybridge Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Diffstat (limited to 'libavutil/lls.c')
-rw-r--r--libavutil/lls.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/libavutil/lls.c b/libavutil/lls.c
index 5a3e4485c8..f87c2cd153 100644
--- a/libavutil/lls.c
+++ b/libavutil/lls.c
@@ -46,8 +46,8 @@ static void update_lls(LLSModel *m, double *var)
void avpriv_solve_lls(LLSModel *m, double threshold, unsigned short min_order)
{
int i, j, k;
- double (*factor)[MAX_VARS + 1] = (void *) &m->covariance[1][0];
- double (*covar) [MAX_VARS + 1] = (void *) &m->covariance[1][1];
+ double (*factor)[MAX_VARS_ALIGN] = (void *) &m->covariance[1][0];
+ double (*covar) [MAX_VARS_ALIGN] = (void *) &m->covariance[1][1];
double *covar_y = m->covariance[0];
int count = m->indep_count;
@@ -117,6 +117,8 @@ av_cold void avpriv_init_lls(LLSModel *m, int indep_count)
m->indep_count = indep_count;
m->update_lls = update_lls;
m->evaluate_lls = evaluate_lls;
+ if (ARCH_X86)
+ ff_init_lls_x86(m);
}
#if FF_API_LLS_PRIVATE
@@ -154,7 +156,7 @@ int main(void)
avpriv_init_lls(&m, 3);
for (i = 0; i < 100; i++) {
- double var[4];
+ LOCAL_ALIGNED(32, double, var, [4]);
double eval;
var[0] = (av_lfg_get(&lfg) / (double) UINT_MAX - 0.5) * 2;