Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
7ce914fb
Commit
7ce914fb
authored
Jul 08, 2011
by
Mans Rullgard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lls: use av_lfg instead of rand() in test program
Signed-off-by:
Mans Rullgard
<
mans@mansr.com
>
parent
1fef92fd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
lls.c
libavutil/lls.c
+8
-5
No files found.
libavutil/lls.c
View file @
7ce914fb
...
...
@@ -118,24 +118,27 @@ double av_evaluate_lls(LLSModel *m, double *param, int order)
#ifdef TEST
#include <stdlib.h>
#include <stdio.h>
#include <limits.h>
#include "lfg.h"
int
main
(
void
)
{
LLSModel
m
;
int
i
,
order
;
AVLFG
lfg
;
av_lfg_init
(
&
lfg
,
1
);
av_init_lls
(
&
m
,
3
);
for
(
i
=
0
;
i
<
100
;
i
++
)
{
double
var
[
4
];
double
eval
;
var
[
0
]
=
(
rand
()
/
(
double
)
RAND
_MAX
-
0
.
5
)
*
2
;
var
[
1
]
=
var
[
0
]
+
rand
()
/
(
double
)
RAND
_MAX
-
0
.
5
;
var
[
2
]
=
var
[
1
]
+
rand
()
/
(
double
)
RAND
_MAX
-
0
.
5
;
var
[
3
]
=
var
[
2
]
+
rand
()
/
(
double
)
RAND
_MAX
-
0
.
5
;
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
;
av_update_lls
(
&
m
,
var
,
0
.
99
);
av_solve_lls
(
&
m
,
0
.
001
,
0
);
for
(
order
=
0
;
order
<
3
;
order
++
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment