summaryrefslogtreecommitdiff
path: root/libavutil/lls.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-06-30 10:54:12 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-06-30 10:54:20 +0200
commitd3bd320e63bfbc96d78a673a01d36f25dc6316e7 (patch)
tree5ad449c0b1d2da87cc09dccc38893f299b8a0d7f /libavutil/lls.c
parentff130d7363e0b29ab3e5b46fa3647f236c3c7ba5 (diff)
parentcc6714bb16b1f0716ba43701d47273dbe9657b8b (diff)
downloadffmpeg-d3bd320e63bfbc96d78a673a01d36f25dc6316e7.tar.gz
Merge commit 'cc6714bb16b1f0716ba43701d47273dbe9657b8b'
* commit 'cc6714bb16b1f0716ba43701d47273dbe9657b8b': lpc: remove "decay" argument Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil/lls.c')
-rw-r--r--libavutil/lls.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/libavutil/lls.c b/libavutil/lls.c
index dd6442a881..2abfedd552 100644
--- a/libavutil/lls.c
+++ b/libavutil/lls.c
@@ -38,13 +38,12 @@ av_cold void avpriv_init_lls(LLSModel *m, int indep_count)
m->indep_count = indep_count;
}
-void avpriv_update_lls(LLSModel *m, double *var, double decay)
+void avpriv_update_lls(LLSModel *m, double *var)
{
int i, j;
for (i = 0; i <= m->indep_count; i++) {
for (j = i; j <= m->indep_count; j++) {
- m->covariance[i][j] *= decay;
m->covariance[i][j] += var[i] * var[j];
}
}
@@ -125,7 +124,7 @@ av_cold void av_init_lls(LLSModel *m, int indep_count)
}
void av_update_lls(LLSModel *m, double *param, double decay)
{
- avpriv_update_lls(m, param, decay);
+ avpriv_update_lls(m, param);
}
void av_solve_lls(LLSModel *m, double threshold, int min_order)
{
@@ -160,7 +159,7 @@ int main(void)
var[1] = var[0] + av_lfg_get(&lfg) / (double) UINT_MAX - 0.5;
var[2] = var[1] + av_lfg_get(&lfg) / (double) UINT_MAX - 0.5;
var[3] = var[2] + av_lfg_get(&lfg) / (double) UINT_MAX - 0.5;
- avpriv_update_lls(&m, var, 0.99);
+ avpriv_update_lls(&m, var);
avpriv_solve_lls(&m, 0.001, 0);
for (order = 0; order < 3; order++) {
eval = avpriv_evaluate_lls(&m, var + 1, order);