diff options
author | Derek Buitenhuis <derek.buitenhuis@gmail.com> | 2016-05-11 19:10:10 +0100 |
---|---|---|
committer | Derek Buitenhuis <derek.buitenhuis@gmail.com> | 2016-05-11 19:13:03 +0100 |
commit | 96d616052b3d39678e477fa10610ca688f46fff9 (patch) | |
tree | 8bd31d06318bc786ea8f1d84f92090c9c860bc11 /libavutil/lls.c | |
parent | 27506aceda8115f82f89691a4441d62a8cf24a6e (diff) | |
parent | d12b5b2f135aade4099f4b26b0fe678656158c13 (diff) | |
download | ffmpeg-96d616052b3d39678e477fa10610ca688f46fff9.tar.gz |
Merge commit 'd12b5b2f135aade4099f4b26b0fe678656158c13'
* commit 'd12b5b2f135aade4099f4b26b0fe678656158c13':
build: Split test programs off into separate files
Some conversions done by: James Almer <jamrial@gmail.com>
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Diffstat (limited to 'libavutil/lls.c')
-rw-r--r-- | libavutil/lls.c | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/libavutil/lls.c b/libavutil/lls.c index c5753ae574..0560b6a79c 100644 --- a/libavutil/lls.c +++ b/libavutil/lls.c @@ -121,41 +121,3 @@ av_cold void avpriv_init_lls(LLSModel *m, int indep_count) if (ARCH_X86) ff_init_lls_x86(m); } - -#ifdef TEST - -#include <stdio.h> -#include <limits.h> -#include "lfg.h" - -int main(void) -{ - LLSModel m; - int i, order; - AVLFG lfg; - - av_lfg_init(&lfg, 1); - avpriv_init_lls(&m, 3); - - for (i = 0; i < 100; i++) { - LOCAL_ALIGNED(32, double, var, [4]); - double eval; - - var[0] = (av_lfg_get(&lfg) / (double) UINT_MAX - 0.5) * 2; - 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; - m.update_lls(&m, var); - avpriv_solve_lls(&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", - var[0], order, eval, sqrt(m.variance[order] / (i + 1)), - m.coeff[order][0], m.coeff[order][1], - m.coeff[order][2]); - } - } - return 0; -} - -#endif |