summaryrefslogtreecommitdiff
path: root/src/post/goom/ifs.c
diff options
context:
space:
mode:
authorMiguel Freitas <miguelfreitas@users.sourceforge.net>2005-07-19 18:10:29 +0000
committerMiguel Freitas <miguelfreitas@users.sourceforge.net>2005-07-19 18:10:29 +0000
commit6bfc655ee19aa82cce3277e6f9c861661cca5fb4 (patch)
treee73fb914fba58583558278d41fc3b7809db4834c /src/post/goom/ifs.c
parentd1245110dbd99f3018847c59316b677b92423973 (diff)
downloadxine-lib-6bfc655ee19aa82cce3277e6f9c861661cca5fb4.tar.gz
xine-lib-6bfc655ee19aa82cce3277e6f9c861661cca5fb4.tar.bz2
update goom to 2k4-0 + patches. details:
- removed convolve_fx: goom logo is definitely annoying. besides using xine_fast_memcpy instead of convolve makes it much faster! - reduced number of tentacles: too many tentacles on low res (320x240) made it too brighter - darker ifs.c: again problem with low res, image was saturating to white most of the time - increased fps to 14 now that goom is faster ;-) CVS patchset: 7667 CVS date: 2005/07/19 18:10:29
Diffstat (limited to 'src/post/goom/ifs.c')
-rw-r--r--src/post/goom/ifs.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/post/goom/ifs.c b/src/post/goom/ifs.c
index 901bf7348..c51faae8b 100644
--- a/src/post/goom/ifs.c
+++ b/src/post/goom/ifs.c
@@ -70,7 +70,12 @@ IFSPoint;
#define LRAND() ((long) (goom_random(goomInfo->gRandom) & 0x7fffffff))
#define NRAND(n) ((int) (LRAND() % (n)))
+
+#if RAND_MAX < 0x10000
+#define MAXRAND (((float)(RAND_MAX<16)+((float)RAND_MAX)+1.0f)/127.0f)
+#else
#define MAXRAND (2147483648.0/127.0) /* unsigned 1<<31 / 127.0 (cf goom_tools) as a float */
+#endif
/*****************************************************/
@@ -498,6 +503,13 @@ static void ifs_update (PluginInfo *goomInfo, Pixel * data, Pixel * back, int in
for (i = 0; i < 4; i++) {
*tmp = (*tmp) >> cycle10;
+
+ /* xine: make it darker */
+ if( *tmp && !((*tmp) >> 1) )
+ *tmp = 1;
+ else
+ *tmp = (*tmp) >> 1;
+
tmp++;
}
}
@@ -735,7 +747,7 @@ static void ifs_vfx_apply(VisualFX *_this, Pixel *src, Pixel *dest, PluginInfo *
/*TODO: trouver meilleur soluce pour increment (mettre le code de gestion de l'ifs dans ce fichier: ifs_vfx_apply) */
}
-static void ifs_vfx_init(VisualFX *_this) {
+static void ifs_vfx_init(VisualFX *_this, PluginInfo *info) {
IfsData *data = (IfsData*)malloc(sizeof(IfsData));
data->Root = (FRACTAL*)NULL;