]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/aacenc_utils.h
avcodec: remove missing bits from deprecated VIMA decoder
[ffmpeg] / libavcodec / aacenc_utils.h
index 327fbad83335637cf1311bbea75eadbe819b301c..0ab15a3e5e87de139ed2c56e5d8cf3c81092b6c5 100644 (file)
@@ -128,6 +128,15 @@ static inline int quant_array_idx(const float val, const float *arr, const int n
     return index;
 }
 
+/*
+ * linear congruential pseudorandom number generator, copied from the decoder
+ */
+static inline int lcg_random(unsigned previous_val)
+{
+    union { unsigned u; int s; } v = { previous_val * 1664525u + 1013904223 };
+    return v.s;
+}
+
 #define ERROR_IF(cond, ...) \
     if (cond) { \
         av_log(avctx, AV_LOG_ERROR, __VA_ARGS__); \