]> git.sesse.net Git - ffmpeg/blobdiff - libavutil/lfg.h
Generate list of lavfi tests in configure
[ffmpeg] / libavutil / lfg.h
index f75491e3538d25800fd245d5e4e1492dec53f4b5..0e89ea308df912a304a2d2e5bfc95f34755aeb3f 100644 (file)
@@ -30,7 +30,7 @@ typedef struct {
 void av_lfg_init(AVLFG *c, unsigned int seed);
 
 /**
- * Gets the next random unsigned 32bit number using a ALFG.
+ * Get the next random unsigned 32-bit number using an ALFG.
  *
  * Please also consider a simple LCG like state= state*1664525+1013904223,
  * it may be good enough and faster for your specific use case.
@@ -41,9 +41,9 @@ static inline unsigned int av_lfg_get(AVLFG *c){
 }
 
 /**
- * Gets the next random unsigned 32bit number using a MLFG.
+ * Get the next random unsigned 32-bit number using a MLFG.
  *
- * Please also consider the av_lfg_get() above, it is faster.
+ * Please also consider av_lfg_get() above, it is faster.
  */
 static inline unsigned int av_mlfg_get(AVLFG *c){
     unsigned int a= c->state[(c->index-55) & 63];
@@ -51,4 +51,12 @@ static inline unsigned int av_mlfg_get(AVLFG *c){
     return c->state[c->index++ & 63] = 2*a*b+a+b;
 }
 
+/**
+ * Get the next two numbers generated by a Box-Muller Gaussian
+ * generator using the random numbers issued by lfg.
+ *
+ * @param out[2] array where the two generated numbers are placed
+ */
+void av_bmg_get(AVLFG *lfg, double out[2]);
+
 #endif /* AVUTIL_LFG_H */