summaryrefslogtreecommitdiffstats
path: root/gst/goom
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2002-03-19 04:10:05 +0000
committerAndy Wingo <wingo@pobox.com>2002-03-19 04:10:05 +0000
commitd6258153e0aa7d3fe89a31acd3e57b9c13de4464 (patch)
tree92fd06f31c13bf0eee35395bfcef45ba6166c0d8 /gst/goom
parent0f1d7549324aa62357580b1b35e61bec6b6482ab (diff)
removal of //-style comments don't link plugins to core libs -- the versioning is done internally to the plugins with...
Original commit message from CVS: * removal of //-style comments * don't link plugins to core libs -- the versioning is done internally to the plugins with the plugin_info struct, and symbol resolution is lazy, so we can always know if a plugin can be loaded by the plugin_info data. in theory.
Diffstat (limited to 'gst/goom')
-rw-r--r--gst/goom/Makefile.am2
-rw-r--r--gst/goom/filters.c32
-rw-r--r--gst/goom/goom_core.c78
-rw-r--r--gst/goom/goom_tools.h2
-rw-r--r--gst/goom/gstgoom.c8
-rw-r--r--gst/goom/lines.c10
6 files changed, 66 insertions, 66 deletions
diff --git a/gst/goom/Makefile.am b/gst/goom/Makefile.am
index 8c14c8b5..b503d3ce 100644
--- a/gst/goom/Makefile.am
+++ b/gst/goom/Makefile.am
@@ -16,7 +16,7 @@ noinst_HEADERS = filters.h goom_core.h goom_tools.h graphic.h lines.h
#CFLAGS += -Wall -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions -ffast-math -DNDEBUG
libgstgoom_la_CFLAGS = -O2 -ffast-math $(GST_CFLAGS) $(GOOM_FILTER_CFLAGS)
-libgstgoom_la_LIBADD = $(GST_LIBS)
+libgstgoom_la_LIBADD =
libgstgoom_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
EXTRA_DIST = filters.c filters_mmx.s
diff --git a/gst/goom/filters.c b/gst/goom/filters.c
index bd267957..12fcca56 100644
--- a/gst/goom/filters.c
+++ b/gst/goom/filters.c
@@ -10,7 +10,7 @@
* la vitesse est maintenant comprise dans [0..128] au lieu de [0..100]
*/
-//#define _DEBUG_PIXEL;
+/*#define _DEBUG_PIXEL; */
#include "filters.h"
#include "graphic.h"
@@ -51,8 +51,8 @@ unsigned int ppcsize4;
#endif /* PowerPC */
unsigned int *coeffs = 0, *freecoeffs = 0;
-guint32 *expix1 = 0; // pointeur exporte vers p1
-guint32 *expix2 = 0; // pointeur exporte vers p2
+guint32 *expix1 = 0; /* pointeur exporte vers p1 */
+guint32 *expix2 = 0; /* pointeur exporte vers p2 */
guint32 zoom_width;
#endif /* ASM */
@@ -70,7 +70,7 @@ static unsigned char sqrtperte = 16 ;
static int * firedec = 0 ;
-// retourne x>>s , en testant le signe de x
+/* retourne x>>s , en testant le signe de x */
inline int ShiftRight (int x, const unsigned char s)
{
if (x<0)
@@ -151,16 +151,16 @@ inline void calculatePXandPY (int x, int y, int *px, int *py)
}
}
-//#define _DEBUG
+/*#define _DEBUG */
inline void setPixelRGB(Uint *buffer, Uint x, Uint y, Color c)
{
-// buffer[ y*WIDTH + x ] = (c.r<<16)|(c.v<<8)|c.b
+/* buffer[ y*WIDTH + x ] = (c.r<<16)|(c.v<<8)|c.b */
#ifdef _DEBUG_PIXEL
if ( x+y*resolx >= resolx * resoly)
{
fprintf (stderr,"setPixel ERROR : hors du tableau... %i, %i\n", x,y) ;
- //exit (1) ;
+ /*exit (1) ; */
}
#endif
@@ -214,7 +214,7 @@ inline void getPixelRGB (Uint *buffer, Uint x, Uint y, Color *c)
c->b = *(unsigned char *)(tmp8 = (unsigned char*)(buffer + (x + y*resolx)));
c->v = *(unsigned char *)(++tmp8);
c->r = *(unsigned char *)(++tmp8);
-// *c = (Color) buffer[x+y*WIDTH] ;
+/* *c = (Color) buffer[x+y*WIDTH] ; */
#endif
}
@@ -242,7 +242,7 @@ inline void getPixelRGB_ (Uint *buffer, Uint x, Color *c)
c->b = *(unsigned char *)(tmp8 = (unsigned char*)(buffer + x));
c->v = *(unsigned char *)(++tmp8);
c->r = *(unsigned char *)(++tmp8);
-// *c = (Color) buffer[x+y*WIDTH] ;
+/* *c = (Color) buffer[x+y*WIDTH] ; */
#endif
}
@@ -255,14 +255,14 @@ void zoomFilterFastRGB (Uint *pix1,
{
static guint32 prevX = 0, prevY = 0;
- static char reverse = 0 ; //vitesse inversé..(zoom out)
- // static int perte = 100; // 100 = normal
+ static char reverse = 0 ; /*vitesse inversé..(zoom out) */
+ /* static int perte = 100; // 100 = normal */
static unsigned char pertedec = 8 ;
static char firstTime = 1;
Uint x, y;
-// static unsigned int prevX = 0, prevY = 0;
+/* static unsigned int prevX = 0, prevY = 0; */
#ifdef USE_ASM
expix1 = pix1 ;
@@ -322,7 +322,7 @@ void zoomFilterFastRGB (Uint *pix1,
if (firstTime || zf)
{
- // generation d'une table de sinus
+ /* generation d'une table de sinus */
if (firstTime)
{
unsigned short us ;
@@ -387,15 +387,15 @@ void zoomFilterFastRGB (Uint *pix1,
}
- // generation du buffer
+ /* generation du buffer */
for (y = 0 ; y < prevY ; y++)
for (x = 0; x < prevX ; x++)
{
int px,py;
unsigned char coefv,coefh;
- // calculer px et py en fonction de
- // x,y,middleX,middleY et theMode
+ /* calculer px et py en fonction de */
+ /* x,y,middleX,middleY et theMode */
calculatePXandPY (x,y,&px, &py) ;
if ((px == x << 4) && (py == y << 4))
py += 8 ;
diff --git a/gst/goom/goom_core.c b/gst/goom/goom_core.c
index 245c280e..5f243b40 100644
--- a/gst/goom/goom_core.c
+++ b/gst/goom/goom_core.c
@@ -5,7 +5,7 @@
#include "filters.h"
#include "lines.h"
-//#define VERBOSE
+/*#define VERBOSE */
#ifdef VERBOSE
#include <stdio.h>
@@ -63,21 +63,21 @@ void goom_set_resolution (guint32 resx, guint32 resy)
guint32 * goom_update (gint16 data [2][512])
{
- static int lockvar = 0 ; // pour empecher de nouveaux changements
- static int goomvar = 0 ; // boucle des gooms
- static int totalgoom = 0 ; // nombre de gooms par seconds
- static int agoom = 0 ; // un goom a eu lieu..
- static int loopvar = 0 ; // mouvement des points
- static int speedvar = 0 ; // vitesse des particules
- static int lineMode = 0 ; // l'effet lineaire a dessiner
+ static int lockvar = 0 ; /* pour empecher de nouveaux changements */
+ static int goomvar = 0 ; /* boucle des gooms */
+ static int totalgoom = 0 ; /* nombre de gooms par seconds */
+ static int agoom = 0 ; /* un goom a eu lieu.. */
+ static int loopvar = 0 ; /* mouvement des points */
+ static int speedvar = 0 ; /* vitesse des particules */
+ static int lineMode = 0 ; /* l'effet lineaire a dessiner */
guint32 * return_val;
guint32 pointWidth;
guint32 pointHeight;
- int incvar ; // volume du son
- int accelvar ; // acceleration des particules
+ int incvar ; /* volume du son */
+ int accelvar ; /* acceleration des particules */
int i ;
- float largfactor ; // elargissement de l'intervalle d'évolution des points
- static char goomlimit = 2 ; // sensibilité du goom
+ float largfactor ; /* elargissement de l'intervalle d'évolution des points */
+ static char goomlimit = 2 ; /* sensibilité du goom */
static ZoomFilterData zfd =
{
128, 8, 16,
@@ -143,26 +143,26 @@ guint32 * goom_update (gint16 data [2][512])
66.0f, 74.0f, loopvar + i * 500);
}
- // par défaut pas de changement de zoom
+ /* par défaut pas de changement de zoom */
pzfd = NULL ;
- // diminuer de 1 le temps de lockage
- // note pour ceux qui n'ont pas suivis : le lockvar permet d'empecher un
- // changement d'etat du plugins juste apres un autre changement d'etat. oki ?
+ /* diminuer de 1 le temps de lockage */
+ /* note pour ceux qui n'ont pas suivis : le lockvar permet d'empecher un */
+ /* changement d'etat du plugins juste apres un autre changement d'etat. oki ? */
if (--lockvar < 0) lockvar = 0 ;
- // temps du goom
+ /* temps du goom */
if (--agoom < 0) agoom = 0 ;
- // on verifie qu'il ne se pas un truc interressant avec le son.
+ /* on verifie qu'il ne se pas un truc interressant avec le son. */
if ((accelvar>goomlimit) || (accelvar<-goomlimit))
{
- // UN GOOM !!! YAHOO !
+ /* UN GOOM !!! YAHOO ! */
totalgoom ++ ;
- agoom = 20 ; // mais pdt 20 cycles, il n'y en aura plus.
- lineMode = (lineMode + 1)%20; // Tous les 10 gooms on change de mode lineaire
+ agoom = 20 ; /* mais pdt 20 cycles, il n'y en aura plus. */
+ lineMode = (lineMode + 1)%20; /* Tous les 10 gooms on change de mode lineaire */
- // changement eventuel de mode
+ /* changement eventuel de mode */
switch (iRAND(10))
{
case 0:
@@ -190,20 +190,20 @@ guint32 * goom_update (gint16 data [2][512])
}
}
- // tout ceci ne sera fait qu'en cas de non-blocage
+ /* tout ceci ne sera fait qu'en cas de non-blocage */
if (lockvar == 0)
{
- // reperage de goom (acceleration forte de l'acceleration du volume)
- // -> coup de boost de la vitesse si besoin..
+ /* reperage de goom (acceleration forte de l'acceleration du volume) */
+ /* -> coup de boost de la vitesse si besoin.. */
if ( (accelvar>goomlimit) || (accelvar<-goomlimit) )
{
goomvar ++ ;
- //if (goomvar % 1 == 0)
+ /*if (goomvar % 1 == 0) */
{
guint32 vtmp ;
guint32 newvit ;
newvit = STOP_SPEED - speedvar / 2 ;
- // retablir le zoom avant..
+ /* retablir le zoom avant.. */
if ((zfd.reverse) &&
(!(cycle%12)) &&
(rand ()%3==0))
@@ -218,7 +218,7 @@ guint32 * goom_update (gint16 data [2][512])
lockvar = 100;
}
- // changement de milieu..
+ /* changement de milieu.. */
switch (iRAND(20))
{
case 0:
@@ -299,7 +299,7 @@ guint32 * goom_update (gint16 data [2][512])
zfd.hPlaneEffect = iRAND (2) ? 0 : zfd.hPlaneEffect;
}
- if (newvit < zfd.vitesse) // on accelere
+ if (newvit < zfd.vitesse) /* on accelere */
{
pzfd = &zfd;
if ( ( (newvit < STOP_SPEED - 7) &&
@@ -318,7 +318,7 @@ guint32 * goom_update (gint16 data [2][512])
}
}
}
- // mode mega-lent
+ /* mode mega-lent */
if (iRAND(1000) == 0)
{
/*
@@ -333,7 +333,7 @@ guint32 * goom_update (gint16 data [2][512])
}
}
- // gros frein si la musique est calme
+ /* gros frein si la musique est calme */
if ((speedvar < 1) && (zfd.vitesse < STOP_SPEED - 4) && (cycle % 16 == 0))
{
/*
@@ -349,7 +349,7 @@ guint32 * goom_update (gint16 data [2][512])
*/
}
- // baisser regulierement la vitesse...
+ /* baisser regulierement la vitesse... */
if ( (cycle % 73 == 0) && (zfd.vitesse < STOP_SPEED - 5))
{
/*
@@ -359,7 +359,7 @@ guint32 * goom_update (gint16 data [2][512])
zfd.vitesse ++ ;
}
- // arreter de decrémenter au bout d'un certain temps
+ /* arreter de decrémenter au bout d'un certain temps */
if ((cycle % 101 == 0) && (zfd.pertedec == 7))
{
pzfd = &zfd ;
@@ -374,10 +374,10 @@ guint32 * goom_update (gint16 data [2][512])
}
#endif
- // Zoom here !
+ /* Zoom here ! */
zoomFilterFastRGB (p1, p2, pzfd, resolx, resoly) ;
- // si on est dans un goom : afficher les lignes...
+ /* si on est dans un goom : afficher les lignes... */
if (agoom > 15) goom_lines
(data,
((zfd.middleX==resolx/2) && (zfd.middleY==resoly/2) && (zfd.mode!=WATER_MODE))
@@ -389,16 +389,16 @@ guint32 * goom_update (gint16 data [2][512])
p1=p2;
p2=tmp;
- // affichage et swappage des buffers..
+ /* affichage et swappage des buffers.. */
cycle++;
- // tous les 100 cycles : vérifier si le taux de goom est correct
- // et le modifier sinon..
+ /* tous les 100 cycles : vérifier si le taux de goom est correct */
+ /* et le modifier sinon.. */
if (!(cycle%100))
{
if (totalgoom>15)
{
- // printf ("less gooms\n") ;
+ /* printf ("less gooms\n") ; */
goomlimit ++ ;
}
else
diff --git a/gst/goom/goom_tools.h b/gst/goom/goom_tools.h
index d077c0cb..e3613825 100644
--- a/gst/goom/goom_tools.h
+++ b/gst/goom/goom_tools.h
@@ -23,7 +23,7 @@ extern unsigned short rand_pos ;
rand_tab = 0;
-//#define iRAND(i) ((guint32)((float)i * RAND()/RAND_MAX))
+/*#define iRAND(i) ((guint32)((float)i * RAND()/RAND_MAX)) */
#define iRAND(i) (RAND()%i)
#endif
diff --git a/gst/goom/gstgoom.c b/gst/goom/gstgoom.c
index d03aacba..dc59feab 100644
--- a/gst/goom/gstgoom.c
+++ b/gst/goom/gstgoom.c
@@ -38,11 +38,11 @@ struct _GstGOOM {
GstPad *sinkpad,*srcpad;
GstBufferPool *peerpool;
- // the timestamp of the next frame
+ /* the timestamp of the next frame */
guint64 next_time;
gint16 datain[2][512];
- // video state
+ /* video state */
gint fps;
gint width;
gint height;
@@ -198,11 +198,11 @@ gst_goom_init (GstGOOM *goom)
goom->next_time = 0;
goom->peerpool = NULL;
- // reset the initial video state
+ /* reset the initial video state */
goom->first_buffer = TRUE;
goom->width = 320;
goom->height = 200;
- goom->fps = 25; // desired frame rate
+ goom->fps = 25; /* desired frame rate */
}
diff --git a/gst/goom/lines.c b/gst/goom/lines.c
index fbab8b1c..cadf9203 100644
--- a/gst/goom/lines.c
+++ b/gst/goom/lines.c
@@ -27,14 +27,14 @@ void goom_lines(gint16 data [2][512], unsigned int ID,unsigned int* p, guint32 p
switch (ID)
{
- case 0: // Horizontal stereo lines
+ case 0: /* Horizontal stereo lines */
{
color1 = 0x0000AA00;
color2 = 0x00AA0000;
break;
}
- case 1: // Stereo circles
+ case 1: /* Stereo circles */
{
color1 = 0x00AA33DD;
color2 = 0x00AA33DD;
@@ -55,7 +55,7 @@ void goom_lines(gint16 data [2][512], unsigned int ID,unsigned int* p, guint32 p
switch (ID)
{
- case 0: // Horizontal stereo lines
+ case 0: /* Horizontal stereo lines */
{
unsigned int i;
for (i=0;i<512;i++)
@@ -71,7 +71,7 @@ void goom_lines(gint16 data [2][512], unsigned int ID,unsigned int* p, guint32 p
break;
}
- case 1: // Stereo circles
+ case 1: /* Stereo circles */
{
float z;
unsigned int monX = resolx/2;
@@ -79,7 +79,7 @@ void goom_lines(gint16 data [2][512], unsigned int ID,unsigned int* p, guint32 p
float monY2 = resoly/2;
for (z=0;z<6.2832f; z+=1.0f/monY)
{
- // float offset1 = 128+data[1][(unsigned int)(z*81.33f)])/200000;
+ /* float offset1 = 128+data[1][(unsigned int)(z*81.33f)])/200000; */
p[ monX + (unsigned int)( (monY + ((float)resoly) * (128+data[1][(unsigned int)(z*81.33f)])/200000) * cos (z) + resolx * (unsigned int)( monY2 + (monY + ((float)resoly)*(128+data[1][(unsigned int)(z*81.33f)])/400000) * sin (z)))] = color1;
p[ monX + (unsigned int)((monY - ((float)resoly) * (128+data[0][(unsigned int)(z*81.33f)])/200000) * cos (z) + resolx * (unsigned int)( monY2 + (monY - ((float)resoly)*(128+data[0][(unsigned int)(z*81.33f)])/400000) * sin (z)))] = color2;
}