mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-14 13:21:28 +00:00
a7bc7485b1
Original commit message from CVS: 2008-02-23 Bastien Nocera <hadess@hadess.net> * configure.ac: Add checks for Flex/Yacc/Bison and other furry animals, for the new goom 2k4 based plugin * gst/goom/*: Update to use goom 2k4, uses liboil to detect CPU optimisations (not working yet), move the old plugin to... * gst/goom2k1/*: ... here, in case somebody is sick enough Fixes #515073
24 lines
637 B
C
24 lines
637 B
C
#ifndef _GOOMTOOLS_H
|
|
#define _GOOMTOOLS_H
|
|
|
|
#define NB_RAND 0x10000
|
|
|
|
#define RAND_INIT(gd,i) \
|
|
srand (i); \
|
|
if (gd->rand_tab == NULL) \
|
|
gd->rand_tab = g_malloc (NB_RAND * sizeof(gint)) ;\
|
|
gd->rand_pos = 0; \
|
|
while (gd->rand_pos < NB_RAND) \
|
|
gd->rand_tab [gd->rand_pos++] = rand ();
|
|
|
|
#define RAND(gd) \
|
|
(gd->rand_tab[gd->rand_pos = ((gd->rand_pos + 1) % NB_RAND)])
|
|
|
|
#define RAND_CLOSE(gd) \
|
|
g_free (gd->rand_tab); \
|
|
gd->rand_tab = NULL;
|
|
|
|
/*#define iRAND(i) ((guint32)((float)i * RAND()/RAND_MAX)) */
|
|
#define iRAND(gd,i) (RAND(gd) % i)
|
|
|
|
#endif
|