]> git.sesse.net Git - ffmpeg/blobdiff - libavutil/lfg.h
avoptions: Support getting flag values using av_get_int
[ffmpeg] / libavutil / lfg.h
index 3250c18e794295e6dd4575b913e70fecd9a3822e..0e89ea308df912a304a2d2e5bfc95f34755aeb3f 100644 (file)
@@ -30,7 +30,7 @@ typedef struct {
 void av_lfg_init(AVLFG *c, unsigned int seed);
 
 /**
- * Gets the next random unsigned 32-bit number using an 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,7 +41,7 @@ static inline unsigned int av_lfg_get(AVLFG *c){
 }
 
 /**
- * Gets the next random unsigned 32-bit number using a MLFG.
+ * Get the next random unsigned 32-bit number using a MLFG.
  *
  * Please also consider av_lfg_get() above, it is faster.
  */
@@ -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 */