gstreamer/gst/goom2k1/goom_tools.h
Bastien Nocera a7bc7485b1 configure.ac: Add checks for Flex/Yacc/Bison and other furry animals, for the new goom 2k4 based plugin
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
2008-02-23 01:51:37 +00:00

25 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