aboutsummaryrefslogtreecommitdiffstats
path: root/libavutil/lls2.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-11-16 16:42:57 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-12-24 01:05:47 +0100
commit0cd61c7f7d105ec6b1652be2a1fce029fade16db (patch)
tree284bbdc63fa4c784359882065a600cf46c8c4057 /libavutil/lls2.c
parent28ac4e91dcfadf1c8723489cbb7d07b72d60b755 (diff)
downloadffmpeg-0cd61c7f7d105ec6b1652be2a1fce029fade16db.tar.gz
rename new lls code to lls2 to avoid conflict with the old which has a different ABI
also remove failed attempt at a compatibility layer, the code simply cannot work Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit c3814ab654a993723b0e5f14cc252d68f233ad79) Conflicts: libavcodec/version.h
Diffstat (limited to 'libavutil/lls2.c')
-rw-r--r--libavutil/lls2.c35
1 files changed, 8 insertions, 27 deletions
diff --git a/libavutil/lls2.c b/libavutil/lls2.c
index f381ebc3ff..8cadacb11d 100644
--- a/libavutil/lls2.c
+++ b/libavutil/lls2.c
@@ -32,7 +32,7 @@
#include "version.h"
#include "lls2.h"
-static void update_lls(LLSModel *m, double *var)
+static void update_lls(LLSModel2 *m, double *var)
{
int i, j;
@@ -43,7 +43,7 @@ static void update_lls(LLSModel *m, double *var)
}
}
-void avpriv_solve_lls(LLSModel *m, double threshold, unsigned short min_order)
+void avpriv_solve_lls2(LLSModel2 *m, double threshold, unsigned short min_order)
{
int i, j, k;
double (*factor)[MAX_VARS_ALIGN] = (void *) &m->covariance[1][0];
@@ -100,7 +100,7 @@ void avpriv_solve_lls(LLSModel *m, double threshold, unsigned short min_order)
}
}
-static double evaluate_lls(LLSModel *m, double *param, int order)
+static double evaluate_lls(LLSModel2 *m, double *param, int order)
{
int i;
double out = 0;
@@ -111,9 +111,9 @@ static double evaluate_lls(LLSModel *m, double *param, int order)
return out;
}
-av_cold void avpriv_init_lls(LLSModel *m, int indep_count)
+av_cold void avpriv_init_lls2(LLSModel2 *m, int indep_count)
{
- memset(m, 0, sizeof(LLSModel));
+ memset(m, 0, sizeof(LLSModel2));
m->indep_count = indep_count;
m->update_lls = update_lls;
m->evaluate_lls = evaluate_lls;
@@ -121,25 +121,6 @@ av_cold void avpriv_init_lls(LLSModel *m, int indep_count)
ff_init_lls_x86(m);
}
-#if FF_API_LLS_PRIVATE
-av_cold void av_init_lls(LLSModel *m, int indep_count)
-{
- avpriv_init_lls(m, indep_count);
-}
-void av_update_lls(LLSModel *m, double *param, double decay)
-{
- m->update_lls(m, param);
-}
-void av_solve_lls(LLSModel *m, double threshold, int min_order)
-{
- avpriv_solve_lls(m, threshold, min_order);
-}
-double av_evaluate_lls(LLSModel *m, double *param, int order)
-{
- return m->evaluate_lls(m, param, order);
-}
-#endif /* FF_API_LLS_PRIVATE */
-
#ifdef TEST
#include <stdio.h>
@@ -148,12 +129,12 @@ double av_evaluate_lls(LLSModel *m, double *param, int order)
int main(void)
{
- LLSModel m;
+ LLSModel2 m;
int i, order;
AVLFG lfg;
av_lfg_init(&lfg, 1);
- avpriv_init_lls(&m, 3);
+ avpriv_init_lls2(&m, 3);
for (i = 0; i < 100; i++) {
LOCAL_ALIGNED(32, double, var, [4]);
@@ -164,7 +145,7 @@ int main(void)
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;
m.update_lls(&m, var);
- avpriv_solve_lls(&m, 0.001, 0);
+ avpriv_solve_lls2(&m, 0.001, 0);
for (order = 0; order < 3; order++) {
eval = m.evaluate_lls(&m, var + 1, order);
printf("real:%9f order:%d pred:%9f var:%f coeffs:%f %9f %9f\n",