summaryrefslogtreecommitdiffstats
path: root/thirdparties/iphone/include/libavutil/lfg.h
diff options
context:
space:
mode:
Diffstat (limited to 'thirdparties/iphone/include/libavutil/lfg.h')
-rwxr-xr-xthirdparties/iphone/include/libavutil/lfg.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/thirdparties/iphone/include/libavutil/lfg.h b/thirdparties/iphone/include/libavutil/lfg.h
index 854ffce..8b4dfd5 100755
--- a/thirdparties/iphone/include/libavutil/lfg.h
+++ b/thirdparties/iphone/include/libavutil/lfg.h
@@ -35,7 +35,8 @@ void av_lfg_init(AVLFG *c, unsigned int seed);
* 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];
return c->state[c->index++ & 63];
}
@@ -45,7 +46,8 @@ static inline unsigned int av_lfg_get(AVLFG *c){
*
* Please also consider av_lfg_get() above, it is faster.
*/
-static inline unsigned int av_mlfg_get(AVLFG *c){
+static inline unsigned int av_mlfg_get(AVLFG *c)
+{
unsigned int a= c->state[(c->index-55) & 63];
unsigned int b= c->state[(c->index-24) & 63];
return c->state[c->index++ & 63] = 2*a*b+a+b;
OpenPOWER on IntegriCloud