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
2cf3c863
Commit
2cf3c863
authored
Jul 28, 2008
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Document av_lfg_get().
Originally committed as revision 14461 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
e80d4741
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
lfg.h
libavutil/lfg.h
+6
-0
No files found.
libavutil/lfg.h
View file @
2cf3c863
...
@@ -29,6 +29,12 @@ typedef struct {
...
@@ -29,6 +29,12 @@ typedef struct {
void
av_lfg_init
(
AVLFG
*
c
,
unsigned
int
seed
);
void
av_lfg_init
(
AVLFG
*
c
,
unsigned
int
seed
);
/**
* Gets the next random unsigned 32bit number.
*
* Please also consider a simple LCG like state= state*1664525+1013904223,
* it may be good enough and faster for your specific use case.
*/
static
inline
unsigned
int
av_lfg_get
(
AVLFG
*
c
){
static
inline
unsigned
int
av_lfg_get
(
AVLFG
*
c
){
c
->
state
[
c
->
index
&
63
]
=
c
->
state
[(
c
->
index
-
24
)
&
63
]
+
c
->
state
[(
c
->
index
-
55
)
&
63
];
c
->
state
[
c
->
index
&
63
]
=
c
->
state
[(
c
->
index
-
24
)
&
63
]
+
c
->
state
[(
c
->
index
-
55
)
&
63
];
return
c
->
state
[
c
->
index
++
&
63
];
return
c
->
state
[
c
->
index
++
&
63
];
...
...
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