mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-08 10:31:05 +00:00
07c1dceae0
Original commit message from CVS: * gst/goom/filters.c: (zoomFilterNew), (calculatePXandPY), (setPixelRGB), (setPixelRGB_), (getPixelRGB), (getPixelRGB_), (zoomFilterSetResolution), (zoomFilterDestroy), (zoomFilterFastRGB), (pointFilter): * gst/goom/filters.h: * gst/goom/goom_core.c: (goom_init), (goom_set_resolution), (goom_update), (goom_close): * gst/goom/goom_core.h: * gst/goom/goom_tools.h: * gst/goom/graphic.c: * gst/goom/gstgoom.c: (gst_goom_class_init), (gst_goom_init), (gst_goom_dispose), (gst_goom_src_setcaps), (gst_goom_chain): * gst/goom/gstgoom.h: * gst/goom/lines.c: (goom_lines): * gst/goom/lines.h: Make goom reentrant by moving all important static variables into instance structures. (Fixes #329181)
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
|