diff options
author | Jan Schmidt <thaytan@mad.scientist.com> | 2006-02-05 20:43:49 +0000 |
---|---|---|
committer | Jan Schmidt <thaytan@mad.scientist.com> | 2006-02-05 20:43:49 +0000 |
commit | 07c1dceae064b547747a1513ca17225c1c1c3e0e (patch) | |
tree | eedb8d00eade1f2fa88e9d4d481e953eca950b11 /gst/goom/filters.h | |
parent | 4b5490014fb102cf65481d76222130d885eecebd (diff) |
gst/goom/: Make goom reentrant by moving all important static variables into instance structures.
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)
Diffstat (limited to 'gst/goom/filters.h')
-rw-r--r-- | gst/goom/filters.h | 54 |
1 files changed, 33 insertions, 21 deletions
diff --git a/gst/goom/filters.h b/gst/goom/filters.h index dac34dd9..65eb3e25 100644 --- a/gst/goom/filters.h +++ b/gst/goom/filters.h @@ -4,21 +4,7 @@ #include <glib.h> #include "graphic.h" - -typedef struct -{ - int vitesse ; - unsigned char pertedec ; - unsigned char sqrtperte ; - int middleX,middleY ; - char reverse ; - char mode ; - /** @since June 2001 */ - int hPlaneEffect ; - int vPlaneEffect ; - char noisify ; -} ZoomFilterData ; - +#include "goom_core.h" #define NORMAL_MODE 0 #define WAVE_MODE 1 @@ -27,7 +13,34 @@ typedef struct #define AMULETTE_MODE 4 #define WATER_MODE 5 -void pointFilter(guint32 *pix1, Color c, +struct ZoomFilterData +{ + int vitesse; + unsigned char pertedec; + unsigned char sqrtperte; + int middleX; + int middleY; + char reverse; + char mode; + /** @since June 2001 */ + int hPlaneEffect; + int vPlaneEffect; + char noisify; + + guint32 res_x; + guint32 res_y; + guint32 buffsize; + + guint32 *buffer; + guint32 *pos10; + guint32 *c[4]; + int *firedec; + + int wave; + int wavesp; +}; + +void pointFilter(GoomData *goomdata, Color c, float t1, float t2, float t3, float t4, guint32 cycle); @@ -42,11 +55,10 @@ Uint middleX, Uint middleY); */ -void zoomFilterFastRGB (guint32 *pix1, - guint32 *pix2, - ZoomFilterData *zf, - guint32 resx, guint32 resy); - +ZoomFilterData *zoomFilterNew (); +void zoomFilterDestroy (ZoomFilterData *zf); +void zoomFilterFastRGB (GoomData *goomdata, ZoomFilterData *zf, + int zfd_update); /* filtre sin : le contenu de pix1 est copie dans pix2, avec l'effet appliqué |