aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/pdp_aa.c24
-rw-r--r--modules/pdp_aging.c38
-rw-r--r--modules/pdp_ascii.c36
-rw-r--r--modules/pdp_background.c48
-rw-r--r--modules/pdp_baltan.c30
-rw-r--r--modules/pdp_binary.c42
-rw-r--r--modules/pdp_cache.c36
-rw-r--r--modules/pdp_canvas.c68
-rw-r--r--modules/pdp_capture.c36
-rw-r--r--modules/pdp_cmap.c56
-rw-r--r--modules/pdp_colorgrid.c4
-rw-r--r--modules/pdp_compose.c68
-rw-r--r--modules/pdp_cropper.c34
-rw-r--r--modules/pdp_ctrack.c54
-rw-r--r--modules/pdp_cycle.c30
-rw-r--r--modules/pdp_dice.c28
-rw-r--r--modules/pdp_dilate.c34
-rw-r--r--modules/pdp_disintegration.c32
-rw-r--r--modules/pdp_distance.c30
-rw-r--r--modules/pdp_edge.c42
-rw-r--r--modules/pdp_erode.c34
-rw-r--r--modules/pdp_fcqt.c33
-rw-r--r--modules/pdp_fdiff.c24
-rw-r--r--modules/pdp_ffmpeg~.c64
-rw-r--r--modules/pdp_form.c32
-rw-r--r--modules/pdp_fqt.c30
-rw-r--r--modules/pdp_hitandmiss.c42
-rw-r--r--modules/pdp_hue.c16
-rw-r--r--modules/pdp_i.c42
-rw-r--r--modules/pdp_icedthe~.c90
-rw-r--r--modules/pdp_ieee1394.c18
-rw-r--r--modules/pdp_imgloader.c50
-rw-r--r--modules/pdp_imgsaver.c24
-rw-r--r--modules/pdp_intrusion.c18
-rw-r--r--modules/pdp_juxta.c34
-rw-r--r--modules/pdp_lens.c38
-rw-r--r--modules/pdp_live~.c78
-rw-r--r--modules/pdp_lumafilt.c20
-rw-r--r--modules/pdp_mapper.c46
-rw-r--r--modules/pdp_mgrid.c26
-rw-r--r--modules/pdp_mosaic.c22
-rw-r--r--modules/pdp_nervous.c30
-rw-r--r--modules/pdp_noquark.c24
-rw-r--r--modules/pdp_o.c48
-rw-r--r--modules/pdp_ocanvas.c54
-rw-r--r--modules/pdp_pen.c92
-rw-r--r--modules/pdp_puzzle.c54
-rwxr-xr-xmodules/pdp_qtext.c96
-rw-r--r--modules/pdp_quark.c24
-rw-r--r--modules/pdp_radioactiv.c54
-rw-r--r--modules/pdp_rec~.c62
-rw-r--r--modules/pdp_rev.c26
-rw-r--r--modules/pdp_ripple.c38
-rw-r--r--modules/pdp_segsnd~.c32
-rw-r--r--modules/pdp_shagadelic.c30
-rw-r--r--modules/pdp_shape.c156
-rw-r--r--modules/pdp_simura.c10
-rw-r--r--modules/pdp_smuck.c18
-rw-r--r--modules/pdp_spigot.c12
-rw-r--r--modules/pdp_spiral.c48
-rw-r--r--modules/pdp_spotlight.c28
-rw-r--r--modules/pdp_text.c94
-rw-r--r--modules/pdp_theonice~.c156
-rw-r--r--modules/pdp_theorin~.c78
-rw-r--r--modules/pdp_theorout~.c100
-rw-r--r--modules/pdp_transform.c44
-rw-r--r--modules/pdp_transition.c48
-rw-r--r--modules/pdp_underwatch.c30
-rw-r--r--modules/pdp_vertigo.c26
-rw-r--r--modules/pdp_warhol.c36
-rw-r--r--modules/pdp_warp.c46
-rw-r--r--modules/pdp_xcanvas.c66
-rw-r--r--modules/pdp_yqt.c28
-rw-r--r--modules/pdp_yvu2rgb.c10
74 files changed, 1636 insertions, 1613 deletions
diff --git a/modules/pdp_aa.c b/modules/pdp_aa.c
index 6f59c39..0c4bd51 100644
--- a/modules/pdp_aa.c
+++ b/modules/pdp_aa.c
@@ -39,24 +39,24 @@ typedef struct pdp_aa_struct
t_object x_obj;
t_float x_f;
- t_int x_packet0;
- t_int x_packet1;
- t_int x_dropped;
- t_int x_queue_id;
+ int x_packet0;
+ int x_packet1;
+ int x_dropped;
+ int x_queue_id;
t_outlet *x_outlet0;
- t_int x_vwidth;
- t_int x_vheight;
- t_int x_vsize;
+ int x_vwidth;
+ int x_vheight;
+ int x_vsize;
/* aalib structures */
aa_context *x_context; // a lot of things and image data
aa_renderparams x_renderparams; // rendering parameters
char* x_driver; // name of driver
- t_int x_render; // rendering option
+ int x_render; // rendering option
char **x_aa_options; // aa options passed as arguments
- t_int x_nb_options; // number of aa options
+ int x_nb_options; // number of aa options
} t_pdp_aa;
@@ -135,9 +135,9 @@ static void pdp_aa_process_yv12(t_pdp_aa *x)
short int *data = (short int *)pdp_packet_data(x->x_packet0);
t_pdp *newheader = pdp_packet_header(x->x_packet1);
short int *newdata = (short int *)pdp_packet_data(x->x_packet1);
- t_int i, pixsum;
- t_int px, py, ppx, ppy;
- t_int hratio, wratio;
+ int i, pixsum;
+ int px, py, ppx, ppy;
+ int hratio, wratio;
if ( ( (int)header->info.image.width != x->x_vwidth ) ||
( (int)header->info.image.height != x->x_vheight ) )
diff --git a/modules/pdp_aging.c b/modules/pdp_aging.c
index 0a47ff1..9d9dcfd 100644
--- a/modules/pdp_aging.c
+++ b/modules/pdp_aging.c
@@ -36,10 +36,10 @@ static unsigned int fastrand_val;
typedef struct _scratch
{
- t_int life;
- t_int x;
- t_int dx;
- t_int init;
+ int life;
+ int x;
+ int dx;
+ int init;
} scratch;
typedef struct pdp_aging_struct
@@ -48,18 +48,18 @@ typedef struct pdp_aging_struct
t_float x_f;
t_outlet *x_outlet0;
- t_int x_packet0;
- t_int x_packet1;
- t_int x_dropped;
- t_int x_queue_id;
-
- t_int x_vwidth;
- t_int x_vheight;
- t_int x_vsize;
- t_int x_area_scale;
- t_int x_nb_scratches;
- t_int x_dust_interval;
- t_int x_pits_interval;
+ int x_packet0;
+ int x_packet1;
+ int x_dropped;
+ int x_queue_id;
+
+ int x_vwidth;
+ int x_vheight;
+ int x_vsize;
+ int x_area_scale;
+ int x_nb_scratches;
+ int x_dusinterval;
+ int x_pits_interval;
scratch x_scratches[PDP_AGING_MAX_SCRATCHES];
} t_pdp_aging;
@@ -167,10 +167,10 @@ static void pdp_aging_dusts(t_pdp_aging *x, short int *dest)
const int width = x->x_vwidth;
const int height = x->x_vheight;
- if(x->x_dust_interval == 0)
+ if(x->x_dusinterval == 0)
{
if((inline_fastrand()&0xf0000000) == 0) {
- x->x_dust_interval = inline_fastrand()>>29;
+ x->x_dusinterval = inline_fastrand()>>29;
}
return;
}
@@ -191,7 +191,7 @@ static void pdp_aging_dusts(t_pdp_aging *x, short int *dest)
d = (d + inline_fastrand()%3 - 1) & 7;
}
}
- x->x_dust_interval--;
+ x->x_dusinterval--;
}
static void pdp_aging_pits(t_pdp_aging *x, short int *dest)
diff --git a/modules/pdp_ascii.c b/modules/pdp_ascii.c
index 34f9e96..af49ef2 100644
--- a/modules/pdp_ascii.c
+++ b/modules/pdp_ascii.c
@@ -38,23 +38,23 @@ typedef struct pdp_ascii_struct
t_object x_obj;
t_float x_f;
- t_int x_packet0;
- t_int x_packet1;
- t_int x_dropped;
- t_int x_queue_id;
+ int x_packet0;
+ int x_packet1;
+ int x_dropped;
+ int x_queue_id;
t_outlet *x_outlet0;
- t_int x_vwidth;
- t_int x_vheight;
- t_int x_vsize;
+ int x_vwidth;
+ int x_vheight;
+ int x_vsize;
- t_int x_color; // rendering color option
- t_int x_brightness; // added value for brightness
+ int x_color; // rendering color option
+ int x_brightness; // added value for brightness
t_float x_ratio; // character to pixel ratio
- t_int x_charwidth; // width of characters
- t_int x_charheight; // height of characters
- t_int x_nbchars; // number of characters in the map
+ int x_charwidth; // width of characters
+ int x_charheight; // height of characters
+ int x_nbchars; // number of characters in the map
char* x_charmaps; // the table of characters
FILE *x_filed; // charmaps file descriptor
@@ -94,10 +94,10 @@ static void pdp_ascii_process_yv12(t_pdp_ascii *x)
short int *data = (short int *)pdp_packet_data(x->x_packet0);
t_pdp *newheader = pdp_packet_header(x->x_packet1);
short int *newdata = (short int *)pdp_packet_data(x->x_packet1);
- t_int i, pixsum;
- t_int px, py, ppx, ppy;
- t_int rank, value;
- t_int pwidth, pheight, offset;
+ int i, pixsum;
+ int px, py, ppx, ppy;
+ int rank, value;
+ int pwidth, pheight, offset;
x->x_vwidth = header->info.image.width;
x->x_vheight = header->info.image.height;
@@ -243,8 +243,8 @@ static void pdp_ascii_load(t_pdp_ascii *x, t_symbol *sfile)
char *word1 = (char*) getbytes( LINE_MAX_LENGTH );
char *word2 = (char*) getbytes( LINE_MAX_LENGTH );
char *word3 = (char*) getbytes( LINE_MAX_LENGTH );
- t_int charwidth, charheight, nbchars, nblines;
- t_int nbexpdata;
+ int charwidth, charheight, nbchars, nblines;
+ int nbexpdata;
char *pdata;
char charread;
diff --git a/modules/pdp_background.c b/modules/pdp_background.c
index 130253d..1f82d93 100644
--- a/modules/pdp_background.c
+++ b/modules/pdp_background.c
@@ -37,17 +37,17 @@ typedef struct pdp_background_struct
t_outlet *x_outlet0;
- t_int x_packet0;
+ int x_packet0;
- t_int x_colorR;
- t_int x_colorG;
- t_int x_colorB;
- t_int x_colorY;
- t_int x_colorU;
- t_int x_colorV;
+ int x_colorR;
+ int x_colorG;
+ int x_colorB;
+ int x_colorY;
+ int x_colorU;
+ int x_colorV;
- t_int x_width;
- t_int x_height;
+ int x_width;
+ int x_height;
} t_pdp_background;
@@ -57,11 +57,11 @@ static void pdp_background_bang(t_pdp_background *x)
t_pdp *header;
unsigned char *data;
unsigned char *pY, *pU, *pV;
- t_int px, py;
+ int px, py;
x->x_packet0 = pdp_packet_new_bitmap_yv12( x->x_width, x->x_height );
- data = (char *)pdp_packet_data(x->x_packet0);
+ data = (unsigned char *)pdp_packet_data(x->x_packet0);
pY = data;
pV = data+(x->x_width*x->x_height);
pU = data+(x->x_width*x->x_height)+((x->x_width*x->x_height)>>2);
@@ -76,32 +76,32 @@ static void pdp_background_bang(t_pdp_background *x)
static void pdp_background_dim(t_pdp_background *x, t_floatarg fwidth, t_floatarg fheight)
{
- if ( ( (t_int)fwidth>0 ) && ( (t_int) fheight>0 ) )
+ if ( ( (int)fwidth>0 ) && ( (int) fheight>0 ) )
{
- if ( ((t_int)fwidth)%8 == 0 )
+ if ( ((int)fwidth)%8 == 0 )
{
- x->x_width = (t_int)fwidth;
+ x->x_width = (int)fwidth;
}
else
{
- x->x_width = (t_int)fwidth + (8-((t_int)fwidth)%8); // align on 8
+ x->x_width = (int)fwidth + (8-((int)fwidth)%8); // align on 8
}
- if ( ((t_int)fheight)%8 == 0 )
+ if ( ((int)fheight)%8 == 0 )
{
- x->x_height = (t_int)fheight;
+ x->x_height = (int)fheight;
}
else
{
- x->x_height = (t_int)fheight + (8-((t_int)fheight)%8); // align on 8
+ x->x_height = (int)fheight + (8-((int)fheight)%8); // align on 8
}
}
}
static void pdp_background_red(t_pdp_background *x, t_floatarg fred)
{
- if ( ( (t_int)fred>=0 ) && ( (t_int) fred <= 255 ) )
+ if ( ( (int)fred>=0 ) && ( (int) fred <= 255 ) )
{
- x->x_colorR = (t_int) fred;
+ x->x_colorR = (int) fred;
x->x_colorY = yuv_RGBtoY( (x->x_colorR << 16) + (x->x_colorG << 8) + x->x_colorB );
x->x_colorU = yuv_RGBtoU( (x->x_colorR << 16) + (x->x_colorG << 8) + x->x_colorB );
x->x_colorV = yuv_RGBtoV( (x->x_colorR << 16) + (x->x_colorG << 8) + x->x_colorB );
@@ -110,9 +110,9 @@ static void pdp_background_red(t_pdp_background *x, t_floatarg fred)
static void pdp_background_green(t_pdp_background *x, t_floatarg fgreen)
{
- if ( ( (t_int)fgreen>=0 ) && ( (t_int) fgreen <= 255 ) )
+ if ( ( (int)fgreen>=0 ) && ( (int) fgreen <= 255 ) )
{
- x->x_colorG = (t_int) fgreen;
+ x->x_colorG = (int) fgreen;
x->x_colorY = yuv_RGBtoY( (x->x_colorR << 16) + (x->x_colorG << 8) + x->x_colorB );
x->x_colorU = yuv_RGBtoU( (x->x_colorR << 16) + (x->x_colorG << 8) + x->x_colorB );
x->x_colorV = yuv_RGBtoV( (x->x_colorR << 16) + (x->x_colorG << 8) + x->x_colorB );
@@ -121,9 +121,9 @@ static void pdp_background_green(t_pdp_background *x, t_floatarg fgreen)
static void pdp_background_blue(t_pdp_background *x, t_floatarg fblue)
{
- if ( ( (t_int)fblue>=0 ) && ( (t_int) fblue <= 255 ) )
+ if ( ( (int)fblue>=0 ) && ( (int) fblue <= 255 ) )
{
- x->x_colorB = (t_int) fblue;
+ x->x_colorB = (int) fblue;
x->x_colorY = yuv_RGBtoY( (x->x_colorR << 16) + (x->x_colorG << 8) + x->x_colorB );
x->x_colorU = yuv_RGBtoU( (x->x_colorR << 16) + (x->x_colorG << 8) + x->x_colorB );
x->x_colorV = yuv_RGBtoV( (x->x_colorR << 16) + (x->x_colorG << 8) + x->x_colorB );
diff --git a/modules/pdp_baltan.c b/modules/pdp_baltan.c
index e919ee2..bafa15e 100644
--- a/modules/pdp_baltan.c
+++ b/modules/pdp_baltan.c
@@ -39,15 +39,15 @@ typedef struct pdp_baltan_struct
t_float x_f;
t_outlet *x_outlet0;
- t_int x_packet0;
- t_int x_packet1;
- t_int x_dropped;
- t_int x_queue_id;
+ int x_packet0;
+ int x_packet1;
+ int x_dropped;
+ int x_queue_id;
- t_int *x_planebuf;
- t_int x_plane;
- t_int x_pixels;
- t_int x_dfts; /* the factor */
+ int *x_planebuf;
+ int x_plane;
+ int x_pixels;
+ int x_dfts; /* the factor */
} t_pdp_baltan;
@@ -67,7 +67,7 @@ static void pdp_baltan_process_yv12(t_pdp_baltan *x)
unsigned int v_offset = size + (size>>2);
unsigned int totnbpixels = size + (size>>1);
- t_int i, cf;
+ int i, cf;
newheader->info.image.encoding = header->info.image.encoding;
newheader->info.image.width = w;
@@ -76,12 +76,12 @@ static void pdp_baltan_process_yv12(t_pdp_baltan *x)
/* allocate buffers if necessary */
if ( ( x->x_planebuf == NULL ) || ( (int)size != x->x_pixels ) )
{
- if ( x->x_planebuf ) freebytes( x->x_planebuf, x->x_pixels*PLANES*sizeof(t_int) );
+ if ( x->x_planebuf ) freebytes( x->x_planebuf, x->x_pixels*PLANES*sizeof(int) );
x->x_pixels = size;
- x->x_planebuf = (t_int*)getbytes(x->x_pixels*PLANES*sizeof(t_int));
- post("pdp_baltan : allocated plane buffer (size=%d)", x->x_pixels*PLANES*sizeof(t_int) );
- bzero(x->x_planebuf, x->x_pixels*PLANES*sizeof(t_int));
+ x->x_planebuf = (int*)getbytes(x->x_pixels*PLANES*sizeof(int));
+ post("pdp_baltan : allocated plane buffer (size=%d)", x->x_pixels*PLANES*sizeof(int) );
+ bzero(x->x_planebuf, x->x_pixels*PLANES*sizeof(int));
x->x_plane = 0;
if ( !x->x_planebuf )
{
@@ -175,12 +175,12 @@ static void pdp_baltan_input_0(t_pdp_baltan *x, t_symbol *s, t_floatarg f)
static void pdp_baltan_dfts(t_pdp_baltan *x, t_floatarg fdfts )
{
- x->x_dfts = (t_int)fdfts;
+ x->x_dfts = (int)fdfts;
}
static void pdp_baltan_free(t_pdp_baltan *x)
{
- if ( x->x_planebuf ) freebytes( x->x_planebuf, x->x_pixels*PLANES*sizeof(t_int) );
+ if ( x->x_planebuf ) freebytes( x->x_planebuf, x->x_pixels*PLANES*sizeof(int) );
pdp_queue_finish(x->x_queue_id);
pdp_packet_mark_unused(x->x_packet0);
}
diff --git a/modules/pdp_binary.c b/modules/pdp_binary.c
index c0ddb10..de0697c 100644
--- a/modules/pdp_binary.c
+++ b/modules/pdp_binary.c
@@ -32,20 +32,20 @@ typedef struct pdp_binary_struct
{
t_object x_obj;
- t_int x_packet0;
- t_int x_packet1;
- t_int x_queue_id;
- t_int x_dropped;
-
- t_int x_vwidth;
- t_int x_vheight;
- t_int x_vsize;
- t_int x_colorY; // YUV components of binary mask
- t_int x_colorU;
- t_int x_colorV;
- t_int x_cursX; // X position of the cursor
- t_int x_cursY; // Y position of the cursor
- t_int x_tolerance; // tolerance
+ int x_packet0;
+ int x_packet1;
+ int x_queue_id;
+ int x_dropped;
+
+ int x_vwidth;
+ int x_vheight;
+ int x_vsize;
+ int x_colorY; // YUV components of binary mask
+ int x_colorU;
+ int x_colorV;
+ int x_cursX; // X position of the cursor
+ int x_cursY; // Y position of the cursor
+ int x_tolerance; // tolerance
short int *x_frame; // keep a copy of current frame for picking color
t_outlet *x_pdp_output; // output packets
@@ -68,7 +68,7 @@ static void pdp_binary_y(t_pdp_binary *x, t_floatarg fy )
{
if ( fy <= 255. )
{
- x->x_colorY = (t_int)fy;
+ x->x_colorY = (int)fy;
outlet_float( x->x_Y, x->x_colorY );
}
}
@@ -77,7 +77,7 @@ static void pdp_binary_u(t_pdp_binary *x, t_floatarg fu )
{
if ( fu <= 255. )
{
- x->x_colorU = (t_int)fu;
+ x->x_colorU = (int)fu;
outlet_float( x->x_U, x->x_colorU );
}
}
@@ -86,7 +86,7 @@ static void pdp_binary_v(t_pdp_binary *x, t_floatarg fv )
{
if ( fv < 255 )
{
- x->x_colorV = (t_int)fv;
+ x->x_colorV = (int)fv;
outlet_float( x->x_V, x->x_colorV );
}
}
@@ -155,11 +155,11 @@ static void pdp_binary_process_yv12(t_pdp_binary *x)
short int *data = (short int *)pdp_packet_data(x->x_packet0);
t_pdp *newheader = pdp_packet_header(x->x_packet1);
short int *newdata = (short int *)pdp_packet_data(x->x_packet1);
- t_int i;
- t_int px=0, py=0;
- t_int y=0, u=0, v=0;
+ int i;
+ int px=0, py=0;
+ int y=0, u=0, v=0;
short int *pfY, *pfU, *pfV;
- t_int diff;
+ int diff;
/* allocate all ressources */
if ( ( (int)header->info.image.width != x->x_vwidth ) ||
diff --git a/modules/pdp_cache.c b/modules/pdp_cache.c
index a2460e2..320b846 100644
--- a/modules/pdp_cache.c
+++ b/modules/pdp_cache.c
@@ -33,10 +33,10 @@ static char *pdp_cache_version = "pdp_cache: version 0.1 : video cache object
typedef struct _triangle
{
- t_int used;
- t_int x1, y1;
- t_int x2, y2;
- t_int x3, y3;
+ int used;
+ int x1, y1;
+ int x2, y2;
+ int x3, y3;
t_float a1, b1;
t_float a2, b2;
t_float a3, b3;
@@ -47,24 +47,24 @@ typedef struct pdp_cache_struct
t_object x_obj;
t_float x_f;
- t_int x_packet0;
- t_int x_packet1;
- t_int x_dropped;
- t_int x_queue_id;
+ int x_packet0;
+ int x_packet1;
+ int x_dropped;
+ int x_queue_id;
t_outlet *x_outlet0;
- t_int x_vwidth;
- t_int x_vheight;
- t_int x_vsize;
+ int x_vwidth;
+ int x_vheight;
+ int x_vsize;
t_triangle x_hiddenzones[ MAX_ZONES ]; // hide these parts of the image
unsigned char *x_mask;
} t_pdp_cache;
-static t_int pdp_cache_isinzone(t_pdp_cache *x, t_int px, t_int py, t_int index)
+static int pdp_cache_isinzone(t_pdp_cache *x, int px, int py, int index)
{
- t_int c1=0, c2=0, c3=0;
+ int c1=0, c2=0, c3=0;
if ( !x->x_hiddenzones[index].used )
{
@@ -187,9 +187,9 @@ static t_int pdp_cache_isinzone(t_pdp_cache *x, t_int px, t_int py, t_int index)
return c1 && c2 && c3;
}
-static t_int pdp_cache_ishidden(t_pdp_cache *x, t_int px, t_int py)
+static int pdp_cache_ishidden(t_pdp_cache *x, int px, int py)
{
- t_int ti;
+ int ti;
for ( ti=0; ti<MAX_ZONES; ti++ )
{
@@ -219,7 +219,7 @@ static void pdp_cache_allocate(t_pdp_cache *x )
static void pdp_cache_update_mask(t_pdp_cache *x )
{
- t_int px, py;
+ int px, py;
for ( py=0; py<x->x_vheight; py++ )
{
@@ -232,7 +232,7 @@ static void pdp_cache_update_mask(t_pdp_cache *x )
static void pdp_cache_hide(t_pdp_cache *x, t_symbol *s, int argc, t_atom *argv)
{
- t_int ti;
+ int ti;
t_float fx1, fy1, fx2, fy2, fx3, fy3;
if ( argc != 6 )
@@ -427,7 +427,7 @@ static void pdp_cache_process_yv12(t_pdp_cache *x)
short int *data = (short int *)pdp_packet_data(x->x_packet0);
t_pdp *newheader = pdp_packet_header(x->x_packet1);
short int *newdata = (short int *)pdp_packet_data(x->x_packet1);
- t_int px, py;
+ int px, py;
t_float alpha, factor;
unsigned char y, u, v;
short int *pY, *pU, *pV;
diff --git a/modules/pdp_canvas.c b/modules/pdp_canvas.c
index 587811e..762428a 100644
--- a/modules/pdp_canvas.c
+++ b/modules/pdp_canvas.c
@@ -37,40 +37,40 @@ typedef struct pdp_canvas_struct
t_float x_f;
t_outlet *x_outlet0;
- t_int x_dropped;
- t_int x_queue_id;
+ int x_dropped;
+ int x_queue_id;
- t_int x_opacket;
- t_int x_lastpacket;
+ int x_opacket;
+ int x_lastpacket;
- t_int x_current;
+ int x_current;
t_float x_xmouse;
t_float x_ymouse;
- t_int *x_packets;
- t_int *x_widths;
- t_int *x_heights;
+ int *x_packets;
+ int *x_widths;
+ int *x_heights;
t_float *x_xoffsets;
t_float *x_yoffsets;
- t_int *x_sizes;
+ int *x_sizes;
- t_int x_owidth;
- t_int x_oheight;
- t_int x_osize;
- t_int x_nbinputs;
+ int x_owidth;
+ int x_oheight;
+ int x_osize;
+ int x_nbinputs;
} t_pdp_canvas;
static void pdp_canvas_process_yv12(t_pdp_canvas *x)
{
- t_int px, py, ppx, ppy, ii, nbs;
+ int px, py, ppx, ppy, ii, nbs;
short int *pY, *pU, *pV;
short int *ppY, *ppU, *ppV;
t_pdp *oheader;
short int *odata, *pdata;
t_pdp *iheader;
short int *idata;
- t_int mx, dx, my, dy;
+ int mx, dx, my, dy;
x->x_opacket = pdp_packet_new_image_YCrCb( x->x_owidth, x->x_oheight );
oheader = pdp_packet_header(x->x_opacket);
@@ -133,12 +133,12 @@ static void pdp_canvas_process_yv12(t_pdp_canvas *x)
for ( py=x->x_yoffsets[ii]+my; py<x->x_yoffsets[ii]+dy; py++)
{
- memcpy( pY+(py*x->x_owidth)+(t_int)x->x_xoffsets[ii]+mx,
- ppY+(py-(t_int)x->x_yoffsets[ii])*x->x_widths[ii]+mx, dx*sizeof(short int) );
- memcpy( pU+((py>>1)*(x->x_owidth>>1))+((t_int)(x->x_xoffsets[ii]+mx)>>1),
- ppU+((py-(t_int)x->x_yoffsets[ii])>>1)*(x->x_widths[ii]>>1)+(mx>>1), dx );
- memcpy( pV+((py>>1)*(x->x_owidth>>1))+((t_int)(x->x_xoffsets[ii]+mx)>>1),
- ppV+((py-(t_int)x->x_yoffsets[ii])>>1)*(x->x_widths[ii]>>1)+(mx>>1), dx );
+ memcpy( pY+(py*x->x_owidth)+(int)x->x_xoffsets[ii]+mx,
+ ppY+(py-(int)x->x_yoffsets[ii])*x->x_widths[ii]+mx, dx*sizeof(short int) );
+ memcpy( pU+((py>>1)*(x->x_owidth>>1))+((int)(x->x_xoffsets[ii]+mx)>>1),
+ ppU+((py-(int)x->x_yoffsets[ii])>>1)*(x->x_widths[ii]>>1)+(mx>>1), dx );
+ memcpy( pV+((py>>1)*(x->x_owidth>>1))+((int)(x->x_xoffsets[ii]+mx)>>1),
+ ppV+((py-(int)x->x_yoffsets[ii])>>1)*(x->x_widths[ii]>>1)+(mx>>1), dx );
}
}
@@ -153,7 +153,7 @@ static void pdp_canvas_sendpacket(t_pdp_canvas *x)
pdp_packet_pass_if_valid(x->x_outlet0, &x->x_opacket);
}
-static void pdp_canvas_process(t_pdp_canvas *x, t_int ni)
+static void pdp_canvas_process(t_pdp_canvas *x, int ni)
{
int encoding;
t_pdp *header = 0;
@@ -193,7 +193,7 @@ static void pdp_canvas_offset(t_pdp_canvas *x, t_floatarg ni, t_floatarg xoffset
static void pdp_canvas_select(t_pdp_canvas *x, t_floatarg X, t_floatarg Y)
{
- t_int ii;
+ int ii;
x->x_current = -1;
X = X*x->x_owidth;
@@ -234,7 +234,7 @@ static void pdp_canvas_unselect(t_pdp_canvas *x)
x->x_current = -1;
}
-static void pdp_canvas_input(t_pdp_canvas *x, t_symbol *s, t_floatarg f, t_int ni)
+static void pdp_canvas_input(t_pdp_canvas *x, t_symbol *s, t_floatarg f, int ni)
{
t_pdp *header;
short int *data;
@@ -318,7 +318,7 @@ static void pdp_canvas_input9(t_pdp_canvas *x, t_symbol *s, t_floatarg f)
static void pdp_canvas_free(t_pdp_canvas *x)
{
- t_int ii;
+ int ii;
pdp_queue_finish(x->x_queue_id);
for ( ii=0; ii<x->x_nbinputs; ii++)
@@ -326,10 +326,10 @@ static void pdp_canvas_free(t_pdp_canvas *x)
pdp_packet_mark_unused(x->x_packets[ii]);
}
pdp_packet_mark_unused(x->x_opacket);
- if ( x->x_packets ) freebytes( x->x_packets, x->x_nbinputs*sizeof(t_int) );
- if ( x->x_widths ) freebytes( x->x_widths, x->x_nbinputs*sizeof(t_int) );
- if ( x->x_heights ) freebytes( x->x_heights, x->x_nbinputs*sizeof(t_int) );
- if ( x->x_sizes ) freebytes( x->x_sizes, x->x_nbinputs*sizeof(t_int) );
+ if ( x->x_packets ) freebytes( x->x_packets, x->x_nbinputs*sizeof(int) );
+ if ( x->x_widths ) freebytes( x->x_widths, x->x_nbinputs*sizeof(int) );
+ if ( x->x_heights ) freebytes( x->x_heights, x->x_nbinputs*sizeof(int) );
+ if ( x->x_sizes ) freebytes( x->x_sizes, x->x_nbinputs*sizeof(int) );
if ( x->x_xoffsets ) freebytes( x->x_xoffsets, x->x_nbinputs*sizeof(t_float) );
if ( x->x_yoffsets ) freebytes( x->x_yoffsets, x->x_nbinputs*sizeof(t_float) );
}
@@ -339,7 +339,7 @@ t_class *pdp_canvas_class;
void *pdp_canvas_new(t_symbol *s, int argc, t_atom *argv)
{
t_pdp_canvas *x = (t_pdp_canvas *)pd_new(pdp_canvas_class);
- t_int ii;
+ int ii;
char *imes[32];
if ( argc != 3 )
@@ -383,10 +383,10 @@ void *pdp_canvas_new(t_symbol *s, int argc, t_atom *argv)
post ( "pdp_canvas : new %dx%d canvas with %d inputs", x->x_owidth, x->x_oheight, x->x_nbinputs );
- x->x_packets = ( t_int* ) getbytes( x->x_nbinputs*sizeof(t_int) );
- x->x_widths = ( t_int* ) getbytes( x->x_nbinputs*sizeof(t_int) );
- x->x_heights = ( t_int* ) getbytes( x->x_nbinputs*sizeof(t_int) );
- x->x_sizes = ( t_int* ) getbytes( x->x_nbinputs*sizeof(t_int) );
+ x->x_packets = ( int* ) getbytes( x->x_nbinputs*sizeof(int) );
+ x->x_widths = ( int* ) getbytes( x->x_nbinputs*sizeof(int) );
+ x->x_heights = ( int* ) getbytes( x->x_nbinputs*sizeof(int) );
+ x->x_sizes = ( int* ) getbytes( x->x_nbinputs*sizeof(int) );
x->x_xoffsets = ( t_float* ) getbytes( x->x_nbinputs*sizeof(t_float) );
x->x_yoffsets = ( t_float* ) getbytes( x->x_nbinputs*sizeof(t_float) );
diff --git a/modules/pdp_capture.c b/modules/pdp_capture.c
index 509ee2d..9f11bed 100644
--- a/modules/pdp_capture.c
+++ b/modules/pdp_capture.c
@@ -37,7 +37,7 @@
#define PDP_DISPLAY_LENGTH 1024
// trick to handle Image Magick compatibility
-#if MagickLibVersion >= 0x619
+#if MagickLibVersion >= 0x618
#include "../include/xwindow-private.h"
#endif
@@ -48,18 +48,18 @@ typedef struct pdp_capture_struct
t_object x_obj;
t_outlet *x_outlet0;
- t_int x_packet0;
+ int x_packet0;
short int *x_data;
t_pdp *x_header;
- t_int x_displayopen;
+ int x_displayopen;
char *x_display;
- t_int x_screen;
- t_int x_x;
- t_int x_y;
- t_int x_vwidth;
- t_int x_vheight;
- t_int x_vsize;
+ int x_screen;
+ int x_x;
+ int x_y;
+ int x_vwidth;
+ int x_vheight;
+ int x_vsize;
Image *x_Ximage;
Display *x_dpy;
@@ -717,8 +717,8 @@ static void pdp_capture_screen(t_pdp_capture *x, t_floatarg fscreen)
static void pdp_capture_x(t_pdp_capture *x, t_floatarg fx)
{
- t_int width;
- t_int err;
+ int width;
+ int err;
if (!x->x_displayopen)
{
@@ -743,8 +743,8 @@ static void pdp_capture_x(t_pdp_capture *x, t_floatarg fx)
static void pdp_capture_y(t_pdp_capture *x, t_floatarg fy)
{
- t_int height;
- t_int err;
+ int height;
+ int err;
if (!x->x_displayopen)
{
@@ -769,8 +769,8 @@ static void pdp_capture_y(t_pdp_capture *x, t_floatarg fy)
static void pdp_capture_width(t_pdp_capture *x, t_floatarg fwidth)
{
- t_int width;
- t_int err;
+ int width;
+ int err;
if (!x->x_displayopen)
{
@@ -791,8 +791,8 @@ static void pdp_capture_width(t_pdp_capture *x, t_floatarg fwidth)
static void pdp_capture_height(t_pdp_capture *x, t_floatarg fheight)
{
- t_int height;
- t_int err;
+ int height;
+ int err;
if (!x->x_displayopen)
{
@@ -825,7 +825,7 @@ static void pdp_capture_bang(t_pdp_capture *x)
PixelPacket pixel;
short int *pY, *pU, *pV;
unsigned char y, u, v;
- t_int px, py, r, g, b;
+ int px, py, r, g, b;
long number_pixels;
// capture the image and output a PDP packet
diff --git a/modules/pdp_cmap.c b/modules/pdp_cmap.c
index 547208d..6288eaa 100644
--- a/modules/pdp_cmap.c
+++ b/modules/pdp_cmap.c
@@ -52,10 +52,10 @@ extern t_rtext *glist_findrtext(t_glist *gl, t_text *who);
typedef struct _color
{
- t_int on;
- t_int y,u,v;
- t_int oy,ou,ov;
- t_int tolerance;
+ int on;
+ int y,u,v;
+ int oy,ou,ov;
+ int tolerance;
} t_color;
#define COLORHEIGHT 5
@@ -68,26 +68,26 @@ typedef struct pdp_cmap_struct
t_object x_obj;
t_float x_f;
- t_int x_packet0;
- t_int x_dropped;
+ int x_packet0;
+ int x_dropped;
- t_int x_vwidth;
- t_int x_vheight;
- t_int x_vsize;
+ int x_vwidth;
+ int x_vheight;
+ int x_vsize;
- t_int x_capacity; // number of mapped colors
- t_int x_current; // current color
+ int x_capacity; // number of mapped colors
+ int x_current; // current color
t_color *x_colors; // color substitution table
- t_int x_cursor; // show cursor or not
- t_int x_luminosity; // use luminosity or not
+ int x_cursor; // show cursor or not
+ int x_luminosity; // use luminosity or not
- t_int x_colorR; // setable r
- t_int x_colorG; // setable g
- t_int x_colorB; // setable b
+ int x_colorR; // setable r
+ int x_colorG; // setable g
+ int x_colorB; // setable b
- t_int x_cursX; // X coordinate of cursor
- t_int x_cursY; // Y coordinate of cursor
+ int x_cursX; // X coordinate of cursor
+ int x_cursY; // Y coordinate of cursor
short int *x_frame; // keep a copy of current frame for picking color
t_outlet *x_pdp_output; // output packets
@@ -96,9 +96,9 @@ typedef struct pdp_cmap_struct
} t_pdp_cmap;
-static void pdp_cmap_draw_color(t_pdp_cmap *x, t_int r, t_int g, t_int b)
+static void pdp_cmap_draw_color(t_pdp_cmap *x, int r, int g, int b)
{
- t_int width, height;
+ int width, height;
char color[32];
sprintf( color, "#%.2X%.2X%.2X", r, g, b );
@@ -189,7 +189,7 @@ static void pdp_cmap_delete(t_pdp_cmap *x, t_floatarg fcolor )
static void pdp_cmap_clear(t_pdp_cmap *x)
{
- t_int ci;
+ int ci;
for ( ci=0; ci<x->x_capacity; ci++)
{
@@ -201,7 +201,7 @@ static void pdp_cmap_clear(t_pdp_cmap *x)
static void pdp_cmap_resize(t_pdp_cmap *x, t_floatarg fnewsize )
{
t_color *colors;
- t_int ci, csize;
+ int ci, csize;
if ( (int) fnewsize<=0 ) return;
@@ -267,7 +267,7 @@ static void pdp_cmap_cursor(t_pdp_cmap *x, t_floatarg fcursor )
static void pdp_cmap_pick(t_pdp_cmap *x)
{
- t_int y,u,v;
+ int y,u,v;
if ( x->x_frame && ( x->x_cursX > 0 ) && ( x->x_cursX < x->x_vwidth )
&& ( x->x_cursY > 0 ) && ( x->x_cursY < x->x_vheight ) )
@@ -309,12 +309,12 @@ static void pdp_cmap_process_yv12(t_pdp_cmap *x)
{
t_pdp *header = pdp_packet_header(x->x_packet0);
short int *data = (short int *)pdp_packet_data(x->x_packet0);
- t_int i, ci;
- t_int px=0, py=0, ppx=0, ppy=0;
- t_int y=0, u=0, v=0;
+ int i, ci;
+ int px=0, py=0, ppx=0, ppy=0;
+ int y=0, u=0, v=0;
short int *pfY, *pfU, *pfV;
short int *poY, *poU, *poV;
- t_int diff;
+ int diff;
/* allocate all ressources */
if ( ( (int)header->info.image.width != x->x_vwidth ) ||
@@ -471,7 +471,7 @@ t_class *pdp_cmap_class;
void *pdp_cmap_new(void)
{
- t_int ci;
+ int ci;
t_pdp_cmap *x = (t_pdp_cmap *)pd_new(pdp_cmap_class);
inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_float, gensym("current"));
diff --git a/modules/pdp_colorgrid.c b/modules/pdp_colorgrid.c
index ece62ad..6751745 100644
--- a/modules/pdp_colorgrid.c
+++ b/modules/pdp_colorgrid.c
@@ -74,7 +74,7 @@ static char *pdp_colorgrid_version = "pdp_colorgrid: version 0.4, written by Y
static void pdp_colorgrid_draw_update(t_pdp_colorgrid *x, t_glist *glist)
{
t_canvas *canvas=glist_getcanvas(glist);
- t_int xpoint=x->x_current, ypoint=x->y_current;
+ int xpoint=x->x_current, ypoint=x->y_current;
// later : try to figure out what's this test for ??
// if (glist_isvisible(glist))
@@ -414,7 +414,7 @@ static void pdp_colorgrid_save(t_gobj *z, t_binbuf *b)
// post( "saving pdp_colorgrid : %s", x->x_name->s_name );
binbuf_addv(b, "ssiissiffiffiffiiff", gensym("#X"),gensym("obj"),
- (t_int)x->x_obj.te_xpix, (t_int)x->x_obj.te_ypix,
+ (int)x->x_obj.te_xpix, (int)x->x_obj.te_ypix,
gensym("pdp_colorgrid"), x->x_name, x->x_width, x->x_min,
x->x_max, x->x_height,
x->y_min, x->y_max,
diff --git a/modules/pdp_compose.c b/modules/pdp_compose.c
index 998c3a3..1bca49f 100644
--- a/modules/pdp_compose.c
+++ b/modules/pdp_compose.c
@@ -31,14 +31,14 @@
struct _rtext
{
char *x_buf;
- t_int x_bufsize;
- t_int x_selstart;
- t_int x_selend;
- t_int x_active;
- t_int x_dragfrom;
- t_int x_height;
- t_int x_drawnwidth;
- t_int x_drawnheight;
+ int x_bufsize;
+ int x_selstart;
+ int x_selend;
+ int x_active;
+ int x_dragfrom;
+ int x_height;
+ int x_drawnwidth;
+ int x_drawnheight;
t_text *x_text;
t_glist *x_glist;
char x_tag[50];
@@ -60,25 +60,25 @@ typedef struct pdp_compose_struct
t_object x_obj;
t_float x_f;
- t_int x_packet0;
- t_int x_packet1;
- t_int x_dropped;
- t_int x_queue_id;
-
- t_int x_vwidth;
- t_int x_vheight;
- t_int x_vsize;
- t_int x_colorR; // RGB components of mixing color
- t_int x_colorG;
- t_int x_colorB;
- t_int x_colorY; // YUV components of mixing color
- t_int x_colorU;
- t_int x_colorV;
- t_int x_tolerance; // tolerance
- t_int x_cursX; // X coordinate of cursor
- t_int x_cursY; // Y coordinate of cursor
- t_int x_cursor; // cursor drawing flag
- t_int x_luminosity; // flag to indicate if luminosity is used
+ int x_packet0;
+ int x_packet1;
+ int x_dropped;
+ int x_queue_id;
+
+ int x_vwidth;
+ int x_vheight;
+ int x_vsize;
+ int x_colorR; // RGB components of mixing color
+ int x_colorG;
+ int x_colorB;
+ int x_colorY; // YUV components of mixing color
+ int x_colorU;
+ int x_colorV;
+ int x_tolerance; // tolerance
+ int x_cursX; // X coordinate of cursor
+ int x_cursY; // Y coordinate of cursor
+ int x_cursor; // cursor drawing flag
+ int x_luminosity; // flag to indicate if luminosity is used
short int *x_frame; // keep a copy of current frame for picking color
short int *x_right_frame; // 2nd video source
@@ -90,7 +90,7 @@ typedef struct pdp_compose_struct
static void pdp_compose_draw_color(t_pdp_compose *x)
{
- t_int width, height;
+ int width, height;
char color[32];
sprintf( color, "#%.2X%.2X%.2X", x->x_colorR, x->x_colorG, x->x_colorB );
@@ -190,7 +190,7 @@ static void pdp_compose_luminosity(t_pdp_compose *x, t_floatarg fluminosity )
static void pdp_compose_pick(t_pdp_compose *x)
{
- t_int y,u,v;
+ int y,u,v;
if ( x->x_frame && ( x->x_cursX > 0 ) && ( x->x_cursX < x->x_vwidth )
&& ( x->x_cursY > 0 ) && ( x->x_cursY < x->x_vheight ) )
@@ -232,11 +232,11 @@ static void pdp_compose_process_yv12(t_pdp_compose *x)
short int *data = (short int *)pdp_packet_data(x->x_packet0);
t_pdp *newheader = pdp_packet_header(x->x_packet1);
short int *newdata = (short int *)pdp_packet_data(x->x_packet1);
- t_int i, cf;
- t_int px=0, py=0, ppx=0, ppy=0, found=0, xcell=0, ycell=0;
- t_int celldiff=0, cellwidth=0, cellheight=0;
- t_int y=0, u=0, v=0;
- t_int sum;
+ int i, cf;
+ int px=0, py=0, ppx=0, ppy=0, found=0, xcell=0, ycell=0;
+ int celldiff=0, cellwidth=0, cellheight=0;
+ int y=0, u=0, v=0;
+ int sum;
short int *pfY, *pfV, *pfU, *prY, *prV, *prU, *pdY, *pdV, *pdU;
/* allocate all ressources */
diff --git a/modules/pdp_cropper.c b/modules/pdp_cropper.c
index f1c3004..2def9f8 100644
--- a/modules/pdp_cropper.c
+++ b/modules/pdp_cropper.c
@@ -35,17 +35,17 @@ typedef struct pdp_cropper_struct
t_float x_f;
t_outlet *x_outlet0;
- t_int x_packet0;
- t_int x_packet1;
- t_int x_dropped;
- t_int x_queue_id;
-
- t_int x_vwidth;
- t_int x_vheight;
- t_int x_vsize;
- t_int x_csizex;
- t_int x_csizey;
- t_int x_csizev;
+ int x_packet0;
+ int x_packet1;
+ int x_dropped;
+ int x_queue_id;
+
+ int x_vwidth;
+ int x_vheight;
+ int x_vsize;
+ int x_csizex;
+ int x_csizey;
+ int x_csizev;
unsigned int x_encoding;
int x_cropx1;
@@ -59,7 +59,7 @@ static void pdp_cropper_cropx1(t_pdp_cropper *x, t_floatarg fcropx1 )
{
if ( ( fcropx1>=0 ) && ( fcropx1<x->x_vwidth ) )
{
- x->x_cropx1 = (t_int)fcropx1;
+ x->x_cropx1 = (int)fcropx1;
}
}
@@ -67,7 +67,7 @@ static void pdp_cropper_cropx2(t_pdp_cropper *x, t_floatarg fcropx2 )
{
if ( ( fcropx2>=0 ) && ( fcropx2<x->x_vwidth ) )
{
- x->x_cropx2 = (t_int)fcropx2;
+ x->x_cropx2 = (int)fcropx2;
}
}
@@ -75,7 +75,7 @@ static void pdp_cropper_cropy1(t_pdp_cropper *x, t_floatarg fcropy1 )
{
if ( ( fcropy1>=0 ) && ( fcropy1<x->x_vheight ) )
{
- x->x_cropy1 = (t_int)fcropy1;
+ x->x_cropy1 = (int)fcropy1;
}
}
@@ -83,7 +83,7 @@ static void pdp_cropper_cropy2(t_pdp_cropper *x, t_floatarg fcropy2 )
{
if ( ( fcropy2>=0 ) && ( fcropy2<x->x_vheight ) )
{
- x->x_cropy2 = (t_int)fcropy2;
+ x->x_cropy2 = (int)fcropy2;
}
}
@@ -102,8 +102,8 @@ static void pdp_cropper_process_yv12(t_pdp_cropper *x)
int miny, maxy;
/* allocate all ressources */
- if ( ( (t_int)header->info.image.width != x->x_vwidth ) ||
- ( (t_int)header->info.image.height != x->x_vheight ) )
+ if ( ( (int)header->info.image.width != x->x_vwidth ) ||
+ ( (int)header->info.image.height != x->x_vheight ) )
{
x->x_vwidth = header->info.image.width;
x->x_vheight = header->info.image.height;
diff --git a/modules/pdp_ctrack.c b/modules/pdp_ctrack.c
index fa56ea6..8235dfe 100644
--- a/modules/pdp_ctrack.c
+++ b/modules/pdp_ctrack.c
@@ -59,25 +59,25 @@ typedef struct pdp_ctrack_struct
t_object x_obj;
t_float x_f;
- t_int x_packet0;
- t_int x_dropped;
-
- t_int x_vwidth;
- t_int x_vheight;
- t_int x_vsize;
- t_int x_colorR; // RGB components of tracked color
- t_int x_colorG;
- t_int x_colorB;
- t_int x_colorY; // YUV components of tracked color
- t_int x_colorU;
- t_int x_colorV;
- t_int x_tolerance; // tolerance
- t_int x_luminosity; // use luminosity or not
- t_int x_steady; // steady mode : the zone is searched around the cursor
- t_int x_cursor; // show cursor or not
- t_int x_showframe; // show frame or not
- t_int x_cursX; // X coordinate of cursor
- t_int x_cursY; // Y coordinate of cursor
+ int x_packet0;
+ int x_dropped;
+
+ int x_vwidth;
+ int x_vheight;
+ int x_vsize;
+ int x_colorR; // RGB components of tracked color
+ int x_colorG;
+ int x_colorB;
+ int x_colorY; // YUV components of tracked color
+ int x_colorU;
+ int x_colorV;
+ int x_tolerance; // tolerance
+ int x_luminosity; // use luminosity or not
+ int x_steady; // steady mode : the zone is searched around the cursor
+ int x_cursor; // show cursor or not
+ int x_showframe; // show frame or not
+ int x_cursX; // X coordinate of cursor
+ int x_cursY; // Y coordinate of cursor
short int *x_frame; // keep a copy of current frame for picking color
t_outlet *x_pdp_output; // output packets
@@ -95,7 +95,7 @@ typedef struct pdp_ctrack_struct
static void pdp_ctrack_draw_color(t_pdp_ctrack *x)
{
- t_int width, height;
+ int width, height;
char color[32];
sprintf( color, "#%.2X%.2X%.2X", x->x_colorR, x->x_colorG, x->x_colorB );
@@ -214,7 +214,7 @@ static void pdp_ctrack_steady(t_pdp_ctrack *x, t_floatarg fsteady )
static void pdp_ctrack_pick(t_pdp_ctrack *x)
{
- t_int y,u,v;
+ int y,u,v;
if ( x->x_frame && ( x->x_cursX > 0 ) && ( x->x_cursX < x->x_vwidth )
&& ( x->x_cursY > 0 ) && ( x->x_cursY < x->x_vheight ) )
@@ -256,13 +256,13 @@ static void pdp_ctrack_process_yv12(t_pdp_ctrack *x)
{
t_pdp *header = pdp_packet_header(x->x_packet0);
short int *data = (short int *)pdp_packet_data(x->x_packet0);
- t_int i, cf;
- t_int px=0, py=0, ppx=0, ppy=0, found=0, xcell=0, ycell=0;
- t_int y=0, u=0, v=0;
- t_int x1=0, y1=0, x2=0, y2=0;
- t_int X1=0, Y1=0, X2=0, Y2=0;
+ int i, cf;
+ int px=0, py=0, ppx=0, ppy=0, found=0, xcell=0, ycell=0;
+ int y=0, u=0, v=0;
+ int x1=0, y1=0, x2=0, y2=0;
+ int X1=0, Y1=0, X2=0, Y2=0;
short int *pfY, *pfU, *pfV;
- t_int diff;
+ int diff;
/* allocate all ressources */
if ( ( (int)header->info.image.width != x->x_vwidth ) ||
diff --git a/modules/pdp_cycle.c b/modules/pdp_cycle.c
index 5f4b44c..1a0e93f 100644
--- a/modules/pdp_cycle.c
+++ b/modules/pdp_cycle.c
@@ -36,23 +36,23 @@ typedef struct pdp_cycle_struct
t_object x_obj;
t_float x_f;
- t_int x_packet0;
- t_int x_packet1;
- t_int x_dropped;
- t_int x_queue_id;
+ int x_packet0;
+ int x_packet1;
+ int x_dropped;
+ int x_queue_id;
t_outlet *x_outlet0;
- t_int x_vwidth;
- t_int x_vheight;
- t_int x_vsize;
+ int x_vwidth;
+ int x_vheight;
+ int x_vsize;
- t_int x_cycley; // flag to activate y cycling
- t_int x_cycleu; // flag to activate u cycling
- t_int x_cyclev; // flag to activate v cycling
+ int x_cycley; // flag to activate y cycling
+ int x_cycleu; // flag to activate u cycling
+ int x_cyclev; // flag to activate v cycling
- t_int x_yoffset;
- t_int x_uoffset;
- t_int x_voffset;
+ int x_yoffset;
+ int x_uoffset;
+ int x_voffset;
} t_pdp_cycle;
@@ -86,8 +86,8 @@ static void pdp_cycle_process_yv12(t_pdp_cycle *x)
short int *data = (short int *)pdp_packet_data(x->x_packet0);
t_pdp *newheader = pdp_packet_header(x->x_packet1);
short int *newdata = (short int *)pdp_packet_data(x->x_packet1);
- t_int i;
- t_int px, py, y, u, v;
+ int i;
+ int px, py, y, u, v;
x->x_vwidth = header->info.image.width;
x->x_vheight = header->info.image.height;
diff --git a/modules/pdp_dice.c b/modules/pdp_dice.c
index f8addbb..90b6d19 100644
--- a/modules/pdp_dice.c
+++ b/modules/pdp_dice.c
@@ -48,22 +48,22 @@ typedef struct pdp_dice_struct
t_object x_obj;
t_float x_f;
- t_int x_packet0;
- t_int x_packet1;
- t_int x_dropped;
- t_int x_queue_id;
+ int x_packet0;
+ int x_packet1;
+ int x_dropped;
+ int x_queue_id;
t_outlet *x_outlet0;
- t_int x_vwidth;
- t_int x_vheight;
- t_int x_vsize;
+ int x_vwidth;
+ int x_vheight;
+ int x_vsize;
char *x_dicemap;
- t_int x_cube_bits;
- t_int x_cube_size;
- t_int x_map_height;
- t_int x_map_width;
+ int x_cube_bits;
+ int x_cube_size;
+ int x_map_height;
+ int x_map_width;
} t_pdp_dice;
@@ -119,9 +119,9 @@ static void pdp_dice_process_yv12(t_pdp_dice *x)
short int *data = (short int *)pdp_packet_data(x->x_packet0);
t_pdp *newheader = pdp_packet_header(x->x_packet1);
short int *newdata = (short int *)pdp_packet_data(x->x_packet1);
- t_int i, iuv;
- t_int mapx, mapy, mapi;
- t_int base, baseuv, dx, dy, di, diuv;
+ int i, iuv;
+ int mapx, mapy, mapi;
+ int base, baseuv, dx, dy, di, diuv;
/* allocate all ressources */
if ( ((int)header->info.image.width != x->x_vwidth) ||
diff --git a/modules/pdp_dilate.c b/modules/pdp_dilate.c
index 062f452..a93b51f 100644
--- a/modules/pdp_dilate.c
+++ b/modules/pdp_dilate.c
@@ -32,17 +32,17 @@ typedef struct pdp_dilate_struct
{
t_object x_obj;
- t_int x_packet0;
- t_int x_packet1;
- t_int x_queue_id;
- t_int x_dropped;
-
- t_int x_vwidth;
- t_int x_vheight;
- t_int x_vsize;
- t_int x_kernelw; // width of the (square) kernel
- t_int x_kernelh; // height of the square kernel
- t_int x_nbpasses; // number of passes
+ int x_packet0;
+ int x_packet1;
+ int x_queue_id;
+ int x_dropped;
+
+ int x_vwidth;
+ int x_vheight;
+ int x_vsize;
+ int x_kernelw; // width of the (square) kernel
+ int x_kernelh; // height of the square kernel
+ int x_nbpasses; // number of passes
short int *x_frame; // keep a copy of current frame for transformations
t_outlet *x_pdp_output; // output packets
@@ -53,7 +53,7 @@ static void pdp_dilate_nbpasses(t_pdp_dilate *x, t_floatarg fpasses )
{
if ( fpasses>=1.)
{
- x->x_nbpasses = (t_int)fpasses;
+ x->x_nbpasses = (int)fpasses;
}
}
@@ -61,7 +61,7 @@ static void pdp_dilate_kernelw(t_pdp_dilate *x, t_floatarg fkernelw )
{
if ( fkernelw>=0.)
{
- x->x_kernelw = (t_int)fkernelw;
+ x->x_kernelw = (int)fkernelw;
}
}
@@ -69,7 +69,7 @@ static void pdp_dilate_kernelh(t_pdp_dilate *x, t_floatarg fkernelh )
{
if ( fkernelh>=0.)
{
- x->x_kernelh = (t_int)fkernelh;
+ x->x_kernelh = (int)fkernelh;
}
}
@@ -95,10 +95,10 @@ static void pdp_dilate_process_yv12(t_pdp_dilate *x)
short int *data = (short int *)pdp_packet_data(x->x_packet0);
t_pdp *newheader = pdp_packet_header(x->x_packet1);
short int *newdata = (short int *)pdp_packet_data(x->x_packet1);
- t_int i;
- t_int px=0, py=0;
+ int i;
+ int px=0, py=0;
short int *pfY, *pfU, *pfV;
- t_int ppx, ppy, ix, iy, pn, kx, ky;
+ int ppx, ppy, ix, iy, pn, kx, ky;
// allocate all ressources
if ( ( (int)header->info.image.width != x->x_vwidth ) ||
diff --git a/modules/pdp_disintegration.c b/modules/pdp_disintegration.c
index 93eeec7..3174edd 100644
--- a/modules/pdp_disintegration.c
+++ b/modules/pdp_disintegration.c
@@ -32,16 +32,16 @@ typedef struct pdp_disintegration_struct
{
t_object x_obj;
- t_int x_packet0;
- t_int x_packet1;
- t_int x_queue_id;
- t_int x_dropped;
-
- t_int x_vwidth;
- t_int x_vheight;
- t_int x_vsize;
- t_int x_nbpasses; // number of passes
- t_int x_reductor; // fraction reductor
+ int x_packet0;
+ int x_packet1;
+ int x_queue_id;
+ int x_dropped;
+
+ int x_vwidth;
+ int x_vheight;
+ int x_vsize;
+ int x_nbpasses; // number of passes
+ int x_reductor; // fraction reductor
short int *x_frame; // keep a copy of current frame for transformations
t_outlet *x_pdp_output; // output packets
@@ -52,7 +52,7 @@ static void pdp_disintegration_nbpasses(t_pdp_disintegration *x, t_floatarg fpa
{
if ( fpasses>=1.)
{
- x->x_nbpasses = (t_int)fpasses;
+ x->x_nbpasses = (int)fpasses;
}
}
@@ -60,7 +60,7 @@ static void pdp_disintegration_reductor(t_pdp_disintegration *x, t_floatarg fre
{
if ( freductor>=1.)
{
- x->x_reductor = (t_int)freductor;
+ x->x_reductor = (int)freductor;
}
}
@@ -86,11 +86,11 @@ static void pdp_disintegration_process_yv12(t_pdp_disintegration *x)
short int *data = (short int *)pdp_packet_data(x->x_packet0);
t_pdp *newheader = pdp_packet_header(x->x_packet1);
short int *newdata = (short int *)pdp_packet_data(x->x_packet1);
- t_int i;
- t_int px=0, py=0;
+ int i;
+ int px=0, py=0;
short int *pfY, *pfU, *pfV;
- t_int ppx, ppy, ix, iy, pn;
- t_int nvalue;
+ int ppx, ppy, ix, iy, pn;
+ int nvalue;
// allocate all ressources
if ( ( (int)header->info.image.width != x->x_vwidth ) ||
diff --git a/modules/pdp_distance.c b/modules/pdp_distance.c
index 34b3ddf..c960efc 100644
--- a/modules/pdp_distance.c
+++ b/modules/pdp_distance.c
@@ -33,20 +33,20 @@ typedef struct pdp_distance_struct
{
t_object x_obj;
- t_int x_packet0;
- t_int x_packet1;
- t_int x_queue_id;
- t_int x_dropped;
-
- t_int x_vwidth;
- t_int x_vheight;
- t_int x_vsize;
+ int x_packet0;
+ int x_packet1;
+ int x_queue_id;
+ int x_dropped;
+
+ int x_vwidth;
+ int x_vheight;
+ int x_vsize;
short int *x_frame; // keep a copy of current frame for transformations
- t_int x_coeff1;
- t_int x_coeff2;
- t_int x_coeff3;
- t_int x_coeff4;
+ int x_coeff1;
+ int x_coeff2;
+ int x_coeff3;
+ int x_coeff4;
t_outlet *x_pdp_output; // output packets
@@ -94,10 +94,10 @@ static void pdp_distance_process_yv12(t_pdp_distance *x)
short int *data = (short int *)pdp_packet_data(x->x_packet0);
t_pdp *newheader = pdp_packet_header(x->x_packet1);
short int *newdata = (short int *)pdp_packet_data(x->x_packet1);
- t_int i;
- t_int px=0, py=0;
+ int i;
+ int px=0, py=0;
short int *pfY, *pfU, *pfV;
- t_int nvalues, values[5], ival, mval;
+ int nvalues, values[5], ival, mval;
// allocate all ressources
if ( ( (int)header->info.image.width != x->x_vwidth ) ||
diff --git a/modules/pdp_edge.c b/modules/pdp_edge.c
index 51396ea..cd66962 100644
--- a/modules/pdp_edge.c
+++ b/modules/pdp_edge.c
@@ -36,30 +36,30 @@ typedef struct pdp_edge_struct
t_float x_f;
t_outlet *x_outlet0;
- t_int x_packet0;
- t_int x_packet1;
- t_int x_dropped;
- t_int x_queue_id;
-
- t_int x_vwidth;
- t_int x_vheight;
- t_int x_vsize;
- t_int x_mapw;
- t_int x_maph;
- t_int x_video_width_margin;
- t_int *x_map;
+ int x_packet0;
+ int x_packet1;
+ int x_dropped;
+ int x_queue_id;
+
+ int x_vwidth;
+ int x_vheight;
+ int x_vsize;
+ int x_mapw;
+ int x_maph;
+ int x_video_width_margin;
+ int *x_map;
} t_pdp_edge;
static void pdp_edge_allocate(t_pdp_edge *x)
{
- x->x_map = (t_int*) getbytes ( ( x->x_vwidth * x->x_vheight * sizeof (t_int) ) << 1 );
- bzero(x->x_map, ( x->x_vwidth * x->x_vheight * sizeof (t_int) ) << 1 );
+ x->x_map = (int*) getbytes ( ( x->x_vwidth * x->x_vheight * sizeof (int) ) << 1 );
+ bzero(x->x_map, ( x->x_vwidth * x->x_vheight * sizeof (int) ) << 1 );
}
static void pdp_edge_free_ressources(t_pdp_edge *x)
{
- if ( x->x_map ) freebytes ( x->x_map, ( x->x_vwidth * x->x_vheight * sizeof (t_int) ) << 1 );
+ if ( x->x_map ) freebytes ( x->x_map, ( x->x_vwidth * x->x_vheight * sizeof (int) ) << 1 );
}
static void pdp_edge_process_yv12(t_pdp_edge *x)
@@ -70,12 +70,12 @@ static void pdp_edge_process_yv12(t_pdp_edge *x)
short int *newdata = (short int *)pdp_packet_data(x->x_packet1);
int i;
- t_int px, py;
- t_int y, u, v;
- t_int y0, u0, v0;
- t_int y1, u1, v1;
- t_int y2, u2, v2;
- t_int y3, u3, v3;
+ int px, py;
+ int y, u, v;
+ int y0, u0, v0;
+ int y1, u1, v1;
+ int y2, u2, v2;
+ int y3, u3, v3;
short int *pdata, *pnewdata;
/* allocate all ressources */
diff --git a/modules/pdp_erode.c b/modules/pdp_erode.c
index a843308..5974dd1 100644
--- a/modules/pdp_erode.c
+++ b/modules/pdp_erode.c
@@ -32,17 +32,17 @@ typedef struct pdp_erode_struct
{
t_object x_obj;
- t_int x_packet0;
- t_int x_packet1;
- t_int x_queue_id;
- t_int x_dropped;
-
- t_int x_vwidth;
- t_int x_vheight;
- t_int x_vsize;
- t_int x_kernelw; // width of the (square) kernel
- t_int x_kernelh; // height of the square kernel
- t_int x_nbpasses; // number of passes
+ int x_packet0;
+ int x_packet1;
+ int x_queue_id;
+ int x_dropped;
+
+ int x_vwidth;
+ int x_vheight;
+ int x_vsize;
+ int x_kernelw; // width of the (square) kernel
+ int x_kernelh; // height of the square kernel
+ int x_nbpasses; // number of passes
short int *x_frame; // keep a copy of current frame for transformations
t_outlet *x_pdp_output; // output packets
@@ -53,7 +53,7 @@ static void pdp_erode_nbpasses(t_pdp_erode *x, t_floatarg fpasses )
{
if ( fpasses>=1.)
{
- x->x_nbpasses = (t_int)fpasses;
+ x->x_nbpasses = (int)fpasses;
}
}
@@ -61,7 +61,7 @@ static void pdp_erode_kernelw(t_pdp_erode *x, t_floatarg fkernelw )
{
if ( fkernelw>=0.)
{
- x->x_kernelw = (t_int)fkernelw;
+ x->x_kernelw = (int)fkernelw;
}
}
@@ -69,7 +69,7 @@ static void pdp_erode_kernelh(t_pdp_erode *x, t_floatarg fkernelh )
{
if ( fkernelh>=0.)
{
- x->x_kernelh = (t_int)fkernelh;
+ x->x_kernelh = (int)fkernelh;
}
}
@@ -95,10 +95,10 @@ static void pdp_erode_process_yv12(t_pdp_erode *x)
short int *data = (short int *)pdp_packet_data(x->x_packet0);
t_pdp *newheader = pdp_packet_header(x->x_packet1);
short int *newdata = (short int *)pdp_packet_data(x->x_packet1);
- t_int i;
- t_int px=0, py=0;
+ int i;
+ int px=0, py=0;
short int *pfY, *pfU, *pfV;
- t_int ppx, ppy, ix, iy, pn, kx, ky;
+ int ppx, ppy, ix, iy, pn, kx, ky;
// allocate all ressources
if ( ( (int)header->info.image.width != x->x_vwidth ) ||
diff --git a/modules/pdp_fcqt.c b/modules/pdp_fcqt.c
index e3659e3..69bdcb0 100644
--- a/modules/pdp_fcqt.c
+++ b/modules/pdp_fcqt.c
@@ -21,11 +21,17 @@
#include "pdp.h"
+#include "pidip_config.h"
#include "pdp_llconv.h"
#include "time.h"
#include "sys/time.h"
+#ifdef QUICKTIME_NEWER
+#include <lqt/lqt.h>
+#include <lqt/colormodels.h>
+#else
#include <quicktime/lqt.h>
#include <quicktime/colormodels.h>
+#endif
#include <bzlib.h> // bz2 compression routines
typedef struct pdp_fcqt_struct
@@ -41,14 +47,14 @@ typedef struct pdp_fcqt_struct
int packet0;
bool initialized;
- t_int x_vwidth;
- t_int x_vheight;
- t_int x_vsize;
- t_int x_fsize; // frames size
- t_int x_length;
- t_int x_current_frame;
- t_int x_cursec;
- t_int x_framescount;
+ int x_vwidth;
+ int x_vheight;
+ int x_vsize;
+ int x_fsize; // frames size
+ int x_length;
+ int x_current_frame;
+ int x_cursec;
+ int x_framescount;
unsigned char * qt_rows[3];
@@ -57,7 +63,7 @@ typedef struct pdp_fcqt_struct
int qt_cmodel;
unsigned int** x_frames;
- t_int* x_fsizes;
+ unsigned int* x_fsizes;
} t_pdp_fcqt;
@@ -65,7 +71,7 @@ typedef struct pdp_fcqt_struct
static void pdp_fcqt_close(t_pdp_fcqt *x)
{
- t_int fi;
+ int fi;
if (x->initialized){
quicktime_close(x->qt);
@@ -82,7 +88,7 @@ static void pdp_fcqt_close(t_pdp_fcqt *x)
static void pdp_fcqt_open(t_pdp_fcqt *x, t_symbol *name)
{
- t_int fi, osize, ret;
+ int fi, osize, ret;
unsigned int *odata, *cdata;
post("pdp_fcqt: opening %s", name->s_name);
@@ -131,7 +137,7 @@ static void pdp_fcqt_open(t_pdp_fcqt *x, t_symbol *name)
// read all frames
x->x_current_frame = 0;
x->x_frames = (unsigned int**) getbytes( x->x_length*sizeof(unsigned int*) );
- x->x_fsizes = (t_int*) getbytes( x->x_length*sizeof(t_int) );
+ x->x_fsizes = (unsigned int*) getbytes( x->x_length*sizeof(int) );
x->x_fsize = 0;
if ( !x->x_frames )
{
@@ -205,7 +211,8 @@ static void pdp_fcqt_open(t_pdp_fcqt *x, t_symbol *name)
static void pdp_fcqt_bang(t_pdp_fcqt *x)
{
- t_int object, ret, dsize, psize;
+ int object, ret;
+ unsigned int dsize, psize;
short int* data;
t_pdp* header;
struct timeval etime;
diff --git a/modules/pdp_fdiff.c b/modules/pdp_fdiff.c
index aefea1f..5c23be0 100644
--- a/modules/pdp_fdiff.c
+++ b/modules/pdp_fdiff.c
@@ -32,20 +32,20 @@ typedef struct pdp_fdiff_struct
t_outlet *x_diffy;
t_outlet *x_diffu;
t_outlet *x_diffv;
- t_int x_packet0;
- t_int x_packet1;
- t_int x_dropped;
- t_int x_queue_id;
-
- t_int x_vwidth;
- t_int x_vheight;
- t_int x_vsize;
+ int x_packet0;
+ int x_packet1;
+ int x_dropped;
+ int x_queue_id;
+
+ int x_vwidth;
+ int x_vheight;
+ int x_vsize;
unsigned int x_encoding;
short int *x_pframe;
} t_pdp_fdiff;
-static void pdp_fdiff_allocate(t_pdp_fdiff *x, t_int newsize)
+static void pdp_fdiff_allocate(t_pdp_fdiff *x, int newsize)
{
int i;
@@ -63,12 +63,12 @@ static void pdp_fdiff_process_yv12(t_pdp_fdiff *x)
short int *newdata = (short int *)pdp_packet_data(x->x_packet1);
int i;
- t_int px, py;
+ int px, py;
short int *diff;
short int *sy, *su, *sv, t;
short int *sby, *sbu, *sbv;
- t_int Y=0, U=0, V=0;
- t_int maxdy=0, maxdu=0, maxdv=0, pdiff;
+ int Y=0, U=0, V=0;
+ int maxdy=0, maxdu=0, maxdv=0, pdiff;
/* allocate all ressources */
if ( ((int)header->info.image.width != x->x_vwidth ) ||
diff --git a/modules/pdp_ffmpeg~.c b/modules/pdp_ffmpeg~.c
index f573a9a..c5d5864 100644
--- a/modules/pdp_ffmpeg~.c
+++ b/modules/pdp_ffmpeg~.c
@@ -42,13 +42,13 @@ typedef struct pdp_ffmpeg_struct
t_object x_obj;
t_float x_f;
- t_int x_packet0;
- t_int x_dropped;
- t_int x_queue_id;
+ int x_packet0;
+ int x_dropped;
+ int x_queue_id;
- t_int x_vwidth;
- t_int x_vheight;
- t_int x_vsize;
+ int x_vwidth;
+ int x_vheight;
+ int x_vsize;
t_outlet *x_outlet_streaming; // indicates the action of streaming
t_outlet *x_outlet_nbframes; // number of frames emitted
@@ -56,13 +56,13 @@ typedef struct pdp_ffmpeg_struct
t_outlet *x_outlet_nbframes_dropped; // number of frames dropped
char *x_feedname;
- t_int x_streaming; // streaming flag
- t_int x_nbframes; // number of frames emitted
- t_int x_nbframes_dropped; // number of frames dropped
- t_int x_nbvideostreams; // number of video streams
- t_int x_nbaudiostreams; // number of audio streams
- t_int x_cursec; // current second
- t_int *x_secondcount; // number of frames emitted in the current second ( per video stream )
+ int x_streaming; // streaming flag
+ int x_nbframes; // number of frames emitted
+ int x_nbframes_dropped; // number of frames dropped
+ int x_nbvideostreams; // number of video streams
+ int x_nbaudiostreams; // number of audio streams
+ int x_cursec; // current second
+ int *x_secondcount; // number of frames emitted in the current second ( per video stream )
/* AV data structures */
AVFormatContext *x_avcontext;
@@ -81,8 +81,8 @@ typedef struct pdp_ffmpeg_struct
short x_audio_buf[2*MAX_AUDIO_PACKET_SIZE]; /* buffer for incoming audio */
short x_audio_enc_buf[2*MAX_AUDIO_PACKET_SIZE]; /* buffer for audio to be encoded */
uint8_t x_audio_out[4*MAX_AUDIO_PACKET_SIZE]; /* buffer for encoded audio */
- t_int x_audioin_position; // writing position for incoming audio
- t_int x_audio_per_frame; // number of audio samples to transmit for each frame
+ int x_audioin_position; // writing position for incoming audio
+ int x_audio_per_frame; // number of audio samples to transmit for each frame
ReSampleContext *x_audio_resample_ctx; // structures for audio resample
FifoBuffer *x_audio_fifo; // audio fifos ( one per codec )
@@ -158,8 +158,8 @@ static int pdp_ffmpeg_read_ffserver_streams(t_pdp_ffmpeg *x)
}
if ( x->x_secondcount ) free( x->x_secondcount );
- x->x_secondcount = (t_int*) malloc( x->x_nbvideostreams*sizeof(t_int) );
- memset( x->x_secondcount, 0x00, x->x_nbvideostreams*sizeof(t_int) );
+ x->x_secondcount = (int*) malloc( x->x_nbvideostreams*sizeof(int) );
+ memset( x->x_secondcount, 0x00, x->x_nbvideostreams*sizeof(int) );
x->x_audio_fifo = (FifoBuffer*) malloc( x->x_nbaudiostreams*sizeof(FifoBuffer) );
for ( i=0; i<x->x_nbaudiostreams; i++)
{
@@ -173,7 +173,7 @@ static int pdp_ffmpeg_read_ffserver_streams(t_pdp_ffmpeg *x)
static void pdp_ffmpeg_starve(t_pdp_ffmpeg *x)
{
- t_int ret, i;
+ int ret, i;
if (!x->x_streaming)
{
@@ -223,7 +223,7 @@ static void pdp_ffmpeg_starve(t_pdp_ffmpeg *x)
static void pdp_ffmpeg_feed(t_pdp_ffmpeg *x, t_symbol *s)
{
- t_int ret, i;
+ int ret, i;
if (x->x_streaming)
{
@@ -346,18 +346,18 @@ static void pdp_ffmpeg_process_yv12(t_pdp_ffmpeg *x)
short int *data = (short int *)pdp_packet_data(x->x_packet0);
t_pdp *newheader = 0;
short int *newdata = 0;
- t_int newpacket = -1, i, j;
+ int newpacket = -1, i, j;
short int *pY, *pU, *pV;
uint8_t *pnY, *pnU, *pnV;
- t_int px, py;
- t_int svideoindex;
- t_int saudioindex;
+ int px, py;
+ int svideoindex;
+ int saudioindex;
struct timeval etime;
- t_int sizeout, size, encsize;
- t_int framebytes;
- t_int owidth, oheight;
+ int sizeout, size, encsize;
+ int framebytes;
+ int owidth, oheight;
short *pencbuf;
- t_int framerate, atime, ttime;
+ int framerate, atime, ttime;
/* allocate all ressources */
if ( ((int)header->info.image.width != x->x_vwidth) ||
@@ -412,7 +412,7 @@ static void pdp_ffmpeg_process_yv12(t_pdp_ffmpeg *x)
/* convert pixel format and size if needed */
if ( x->x_avcontext->streams[i]->codec->codec_type == CODEC_TYPE_VIDEO )
{
- t_int size;
+ int size;
// check if the framerate has been exceeded
if ( gettimeofday(&etime, NULL) == -1)
@@ -521,7 +521,7 @@ static void pdp_ffmpeg_process_yv12(t_pdp_ffmpeg *x)
#if LIBAVCODEC_BUILD > 4715
AVPacket vpkt;
#endif
- t_int fsize, ret;
+ int fsize, ret;
memset(&aframe, 0, sizeof(AVFrame));
*(AVPicture*)&aframe= *x->x_final_picture;
@@ -643,7 +643,7 @@ static void pdp_ffmpeg_process_yv12(t_pdp_ffmpeg *x)
/* convert pixel format and size if needed */
if ( x->x_avcontext->streams[i]->codec.codec_type == CODEC_TYPE_VIDEO )
{
- t_int size;
+ int size;
// check if the framerate has been exceeded
if ( gettimeofday(&etime, NULL) == -1)
@@ -752,7 +752,7 @@ static void pdp_ffmpeg_process_yv12(t_pdp_ffmpeg *x)
#if LIBAVCODEC_BUILD > 4715
AVPacket vpkt;
#endif
- t_int fsize, ret;
+ int fsize, ret;
memset(&aframe, 0, sizeof(AVFrame));
*(AVPicture*)&aframe= *x->x_final_picture;
@@ -889,7 +889,7 @@ static t_int *pdp_ffmpeg_perform(t_int *w)
t_pdp_ffmpeg *x = (t_pdp_ffmpeg *)(w[3]);
int n = (int)(w[4]); // number of samples
t_float fsample;
- t_int isample, i;
+ int isample, i;
// just fills the buffer
while (n--)
diff --git a/modules/pdp_form.c b/modules/pdp_form.c
index b3a59b3..52544b9 100644
--- a/modules/pdp_form.c
+++ b/modules/pdp_form.c
@@ -46,8 +46,8 @@ typedef enum _form_type t_form_type;
typedef struct _form
{
t_form_type type;
- t_int n1,n2,n3,n4; // numerical coordinates or rays
- t_int r,g,b;
+ int n1,n2,n3,n4; // numerical coordinates or rays
+ int r,g,b;
} t_form;
@@ -60,20 +60,20 @@ typedef struct pdp_form_struct
t_object x_obj;
t_float x_f;
- t_int x_packet0;
- t_int x_packet1;
- t_int x_dropped;
- t_int x_queue_id;
+ int x_packet0;
+ int x_packet1;
+ int x_dropped;
+ int x_queue_id;
t_outlet *x_outlet0;
- t_int x_vwidth;
- t_int x_vheight;
- t_int x_vsize;
+ int x_vwidth;
+ int x_vheight;
+ int x_vsize;
t_form *x_forms;
- t_int x_nbforms;
- t_int x_current;
- t_int x_capacity;
+ int x_nbforms;
+ int x_current;
+ int x_capacity;
t_float x_alpha;
/* imlib data */
@@ -300,7 +300,7 @@ static void pdp_form_clear(t_pdp_form *x )
static void pdp_form_delete(t_pdp_form *x, t_floatarg fnum )
{
- t_int i;
+ int i;
char *lostword;
if ( ( fnum>0 ) && ( fnum<=x->x_nbforms ) )
@@ -324,7 +324,7 @@ static void pdp_form_alpha(t_pdp_form *x, t_floatarg falpha )
static void pdp_form_resize(t_pdp_form *x, t_floatarg fnewsize )
{
t_form *forms;
- t_int i, csize;
+ int i, csize;
if ( (int) fnewsize<=0 ) return;
@@ -390,8 +390,8 @@ static void pdp_form_process_yv12(t_pdp_form *x)
short int *data = (short int *)pdp_packet_data(x->x_packet0);
t_pdp *newheader = pdp_packet_header(x->x_packet1);
short int *newdata = (short int *)pdp_packet_data(x->x_packet1);
- t_int ti;
- t_int px, py;
+ int ti;
+ int px, py;
unsigned char y, u, v;
DATA32 *imdata;
DATA32 bgcolor;
diff --git a/modules/pdp_fqt.c b/modules/pdp_fqt.c
index 1747c6f..833caa9 100644
--- a/modules/pdp_fqt.c
+++ b/modules/pdp_fqt.c
@@ -21,11 +21,17 @@
#include "pdp.h"
+#include "pidip_config.h"
#include "pdp_llconv.h"
#include "time.h"
#include "sys/time.h"
+#ifdef QUICKTIME_NEWER
+#include <lqt/lqt.h>
+#include <lqt/colormodels.h>
+#else
#include <quicktime/lqt.h>
#include <quicktime/colormodels.h>
+#endif
typedef struct pdp_fqt_struct
{
@@ -40,14 +46,14 @@ typedef struct pdp_fqt_struct
int packet0;
bool initialized;
- t_int x_vwidth;
- t_int x_vheight;
- t_int x_size;
- t_int x_fsize; // frames size
- t_int x_length;
- t_int x_current_frame;
- t_int x_cursec;
- t_int x_framescount;
+ int x_vwidth;
+ int x_vheight;
+ int x_size;
+ int x_fsize; // frames size
+ int x_length;
+ int x_current_frame;
+ int x_cursec;
+ int x_framescount;
unsigned char *qt_rows[3];
@@ -56,7 +62,7 @@ typedef struct pdp_fqt_struct
int qt_cmodel;
unsigned char **x_frames;
- t_int* x_fsizes;
+ int* x_fsizes;
} t_pdp_fqt;
@@ -64,7 +70,7 @@ typedef struct pdp_fqt_struct
static void pdp_fqt_close(t_pdp_fqt *x)
{
- t_int fi;
+ int fi;
if (x->initialized){
quicktime_close(x->qt);
@@ -81,7 +87,7 @@ static void pdp_fqt_close(t_pdp_fqt *x)
static void pdp_fqt_open(t_pdp_fqt *x, t_symbol *name)
{
- t_int fi;
+ int fi;
post("pdp_fqt: opening %s", name->s_name);
@@ -129,7 +135,7 @@ static void pdp_fqt_open(t_pdp_fqt *x, t_symbol *name)
// read all frames
x->x_current_frame = 0;
x->x_frames = (unsigned char**) getbytes( x->x_length*sizeof(unsigned char*) );
- x->x_fsizes = (t_int*) getbytes( x->x_length*sizeof(t_int) );
+ x->x_fsizes = (int*) getbytes( x->x_length*sizeof(int) );
x->x_fsize = 0;
if ( !x->x_frames )
{
diff --git a/modules/pdp_hitandmiss.c b/modules/pdp_hitandmiss.c
index 0664605..b25258d 100644
--- a/modules/pdp_hitandmiss.c
+++ b/modules/pdp_hitandmiss.c
@@ -33,18 +33,18 @@ typedef struct pdp_hitandmiss_struct
{
t_object x_obj;
- t_int x_packet0;
- t_int x_packet1;
- t_int x_queue_id;
- t_int x_dropped;
-
- t_int x_vwidth;
- t_int x_vheight;
- t_int x_vsize;
- t_int x_kernelw; // width of the (square) kernel
- t_int x_kernelh; // height of the square kernel
+ int x_packet0;
+ int x_packet1;
+ int x_queue_id;
+ int x_dropped;
+
+ int x_vwidth;
+ int x_vheight;
+ int x_vsize;
+ int x_kernelw; // width of the (square) kernel
+ int x_kernelh; // height of the square kernel
char *x_kdata; // kernel data
- t_int x_nbpasses; // number of passes
+ int x_nbpasses; // number of passes
short int *x_frame; // keep a copy of current frame for transformations
t_outlet *x_pdp_output; // output packets
@@ -55,19 +55,19 @@ static void pdp_hitandmiss_nbpasses(t_pdp_hitandmiss *x, t_floatarg fpasses )
{
if ( fpasses>=1.)
{
- x->x_nbpasses = (t_int)fpasses;
+ x->x_nbpasses = (int)fpasses;
}
}
static void pdp_hitandmiss_kernelw(t_pdp_hitandmiss *x, t_floatarg fkernelw )
{
- t_int oldw, minw;
+ int oldw, minw;
char *nkdata;
if ( fkernelw>=0.)
{
oldw = x->x_kernelw;
- x->x_kernelw = (t_int)fkernelw;
+ x->x_kernelw = (int)fkernelw;
nkdata= (char*) malloc( x->x_kernelw*x->x_kernelh );
@@ -85,13 +85,13 @@ static void pdp_hitandmiss_kernelw(t_pdp_hitandmiss *x, t_floatarg fkernelw )
static void pdp_hitandmiss_kernelh(t_pdp_hitandmiss *x, t_floatarg fkernelh )
{
- t_int oldh, minh;
+ int oldh, minh;
char *nkdata;
if ( fkernelh>=0.)
{
oldh = x->x_kernelh;
- x->x_kernelh = (t_int)fkernelh;
+ x->x_kernelh = (int)fkernelh;
nkdata= (char*) malloc( x->x_kernelw*x->x_kernelh );
@@ -108,7 +108,7 @@ static void pdp_hitandmiss_kernelh(t_pdp_hitandmiss *x, t_floatarg fkernelh )
static void pdp_hitandmiss_kdata(t_pdp_hitandmiss *x, t_symbol *s, int argc, t_atom *argv)
{
- t_int nbvalues, ivalue, iv;
+ int nbvalues, ivalue, iv;
if ( argc > x->x_kernelw*x->x_kernelh )
{
@@ -139,7 +139,7 @@ static void pdp_hitandmiss_kdata(t_pdp_hitandmiss *x, t_symbol *s, int argc, t_a
}
else
{
- ivalue = (t_int) argv[iv].a_w.w_float;
+ ivalue = (int) argv[iv].a_w.w_float;
if ( ( ivalue != 0 ) && ( ivalue != 1 ) && ( ivalue != -1 ) )
{
post( "pdp_hitandmiss : wrong data (%d), unchanged", iv );
@@ -174,10 +174,10 @@ static void pdp_hitandmiss_process_yv12(t_pdp_hitandmiss *x)
short int *data = (short int *)pdp_packet_data(x->x_packet0);
t_pdp *newheader = pdp_packet_header(x->x_packet1);
short int *newdata = (short int *)pdp_packet_data(x->x_packet1);
- t_int i;
- t_int px=0, py=0;
+ int i;
+ int px=0, py=0;
short int *pfY, *pfU, *pfV;
- t_int ppx, ppy, ix, iy, pn, kx, ky;
+ int ppx, ppy, ix, iy, pn, kx, ky;
short int pvalue;
// allocate all ressources
diff --git a/modules/pdp_hue.c b/modules/pdp_hue.c
index 28331ff..d8af931 100644
--- a/modules/pdp_hue.c
+++ b/modules/pdp_hue.c
@@ -32,13 +32,13 @@ typedef struct pdp_hue_struct
t_outlet *x_meang;
t_outlet *x_meanb;
- t_int x_packet0;
- t_int x_dropped;
- t_int x_queue_id;
+ int x_packet0;
+ int x_dropped;
+ int x_queue_id;
- t_int x_vwidth;
- t_int x_vheight;
- t_int x_vsize;
+ int x_vwidth;
+ int x_vheight;
+ int x_vsize;
unsigned int x_encoding;
} t_pdp_hue;
@@ -49,10 +49,10 @@ static void pdp_hue_process_rgb(t_pdp_hue *x)
unsigned char *data = (unsigned char*)pdp_packet_data(x->x_packet0);
int i;
- t_int px, py;
+ int px, py;
unsigned char *sr, *sg, *sb;
double meanr=0, meang=0, meanb=0;
- t_int nbpixs=0;
+ int nbpixs=0;
/* allocate all ressources */
x->x_vwidth = header->info.image.width;
diff --git a/modules/pdp_i.c b/modules/pdp_i.c
index f1a47c1..6971f16 100644
--- a/modules/pdp_i.c
+++ b/modules/pdp_i.c
@@ -99,37 +99,37 @@ static t_class *pdp_i_class;
typedef struct _pdp_i
{
t_object x_obj;
- t_int x_socket;
+ int x_socket;
t_outlet *x_connection_status;
t_outlet *x_frames;
t_outlet *x_connectionip;
t_outlet *x_pdp_output;
- t_int x_serversocket;
- t_int x_framesreceived; // total number of frames received
+ int x_serversocket;
+ int x_framesreceived; // total number of frames received
void *x_inbuffer; /* accumulation buffer for incoming frames */
- t_int x_inwriteposition;
- t_int x_inbuffersize;
+ int x_inwriteposition;
+ int x_inbuffersize;
/* PDP data structures */
- t_int x_packet;
+ int x_packet;
t_pdp *x_header;
- t_int x_vheight;
- t_int x_vwidth;
- t_int x_vsize;
- t_int x_psize;
- t_int x_hsize;
- t_int x_bsize;
- t_int x_bzsize;
+ int x_vheight;
+ int x_vwidth;
+ int x_vsize;
+ int x_psize;
+ int x_hsize;
+ unsigned int x_bsize;
+ unsigned int x_bzsize;
short int *x_data;
- unsigned char *x_hdata; // huffman coded data
- unsigned char *x_ddata; // decompressed data
+ char *x_hdata; // huffman coded data
+ char *x_ddata; // decompressed data
unsigned short *x_bdata; // previous data
} t_pdp_i;
/* huffman decoding */
-static int pdp_i_huffman(t_pdp_i *x, char *source, char *dest, t_int size, t_int *dsize)
+static int pdp_i_huffman(t_pdp_i *x, char *source, char *dest, int size, int *dsize)
{
char *pcount=source;
char *pvalue=(source+1);
@@ -163,8 +163,8 @@ static void pdp_i_allocate(t_pdp_i *x)
x->x_psize = x->x_vsize + (x->x_vsize>>1);
x->x_hsize = (x->x_vsize + (x->x_vsize>>1));
x->x_bsize = (x->x_vsize + (x->x_vsize>>1))*sizeof(unsigned short);
- x->x_ddata = (unsigned char*) getbytes(x->x_psize);
- x->x_hdata = (unsigned char*) getbytes(x->x_hsize);
+ x->x_ddata = (char*) getbytes(x->x_psize);
+ x->x_hdata = (char*) getbytes(x->x_hsize);
x->x_bdata = (unsigned short*) getbytes(x->x_bsize);
if ( !x->x_ddata || !x->x_hdata )
{
@@ -219,8 +219,8 @@ static void pdp_i_recv(t_pdp_i *x)
(int)((char*)pheader - (char*)(x->x_inbuffer)) +
(int)sizeof(t_hpacket) + (int)ntohl(pheader->clength) )
{
- if ( ( x->x_vwidth != (t_int)ntohl(pheader->width) ) ||
- ( x->x_vheight != (t_int)ntohl(pheader->height) ) )
+ if ( ( x->x_vwidth != (int)ntohl(pheader->width) ) ||
+ ( x->x_vheight != (int)ntohl(pheader->height) ) )
{
pdp_i_free_ressources(x);
x->x_vheight = ntohl(pheader->height);
@@ -326,7 +326,7 @@ static void pdp_i_recv(t_pdp_i *x)
static void pdp_i_acceptconnection(t_pdp_i *x)
{
struct sockaddr_in incomer_address;
- int sockaddrl = (int) sizeof( struct sockaddr );
+ unsigned int sockaddrl;
int fd = accept(x->x_serversocket, (struct sockaddr*)&incomer_address, &sockaddrl );
diff --git a/modules/pdp_icedthe~.c b/modules/pdp_icedthe~.c
index ee3d959..8d368aa 100644
--- a/modules/pdp_icedthe~.c
+++ b/modules/pdp_icedthe~.c
@@ -70,14 +70,14 @@ typedef struct pdp_icedthe_struct
t_object x_obj;
t_float x_f;
- t_int x_packet0;
- t_int x_dropped;
+ int x_packet0;
+ int x_dropped;
t_pdp *x_header;
unsigned char *x_data;
- t_int x_vwidth;
- t_int x_vheight;
- t_int x_vsize;
+ int x_vwidth;
+ int x_vheight;
+ int x_vsize;
t_outlet *x_pdp_out; // output decoded pdp packets
t_outlet *x_outlet_left; // left audio output
@@ -92,35 +92,35 @@ typedef struct pdp_icedthe_struct
pthread_t x_connectchild; // connecting thread
pthread_mutex_t x_audiolock; // audio mutex
pthread_mutex_t x_videolock; // video mutex
- t_int x_priority; // priority of decoding thread
+ int x_priority; // priority of decoding thread
char *x_url; // url to connect to
char *x_hostname; // hostname of the server ( or IP )
char *x_mountpoint; // mountpoint requested
- t_int x_bitrate; // bitrate of stream read at connection time
+ int x_bitrate; // bitrate of stream read at connection time
char *x_name; // name of stream
char *x_genre; // genre of stream
- t_int x_portnum; // port number
- t_int x_insock; // socket file descriptor
- t_int x_decoding; // decoding flag
- t_int x_theorainit; // flag for indicating that theora is initialized
- t_int x_videoready; // video ready flag
- t_int x_newpicture; // new picture flag
- t_int x_notpackets; // number of theora packets decoded
- t_int x_novpackets; // number of vorbis packets decoded
- t_int x_nbnostream; // number of cycles without a video stream
- t_int x_endofstream; // end of the stream reached
- t_int x_nbframes; // number of frames emitted
+ int x_portnum; // port number
+ int x_insock; // socket file descriptor
+ int x_decoding; // decoding flag
+ int x_theorainit; // flag for indicating that theora is initialized
+ int x_videoready; // video ready flag
+ int x_newpicture; // new picture flag
+ int x_notpackets; // number of theora packets decoded
+ int x_novpackets; // number of vorbis packets decoded
+ int x_nbnostream; // number of cycles without a video stream
+ int x_endofstream; // end of the stream reached
+ int x_nbframes; // number of frames emitted
t_float x_framerate; // framerate
- t_int x_forcedframerate;// the framerate we want to receive
- t_int x_samplerate; // audio sample rate
- t_int x_audiochannels; // audio channels
- t_int x_blocksize; // audio block size
- t_int x_audioon; // audio buffer filling flag
- t_int x_connected; // connection flag
- t_int x_pconnected; // previous state
- t_int x_cursec; // current second
- t_int x_secondcount; // number of frames received in the current second
+ int x_forcedframerate;// the framerate we want to receive
+ int x_samplerate; // audio sample rate
+ int x_audiochannels; // audio channels
+ int x_blocksize; // audio block size
+ int x_audioon; // audio buffer filling flag
+ int x_connected; // connection flag
+ int x_pconnected; // previous state
+ int x_cursec; // current second
+ int x_secondcount; // number of frames received in the current second
struct timeval x_starttime; // reading starting time
char x_request[STRBUF_SIZE]; // string to be send to server
@@ -144,16 +144,16 @@ typedef struct pdp_icedthe_struct
double x_ptime; // previous state
/* audio structures */
- t_int x_audio; // flag to activate the decoding of audio
+ int x_audio; // flag to activate the decoding of audio
t_float x_audio_inl[4*MAX_AUDIO_PACKET_SIZE]; /* buffer for float audio decoded from ogg */
t_float x_audio_inr[4*MAX_AUDIO_PACKET_SIZE]; /* buffer for float audio decoded from ogg */
- t_int x_audioin_position; // writing position for incoming audio
+ int x_audioin_position; // writing position for incoming audio
} t_pdp_icedthe;
static void pdp_icedthe_priority(t_pdp_icedthe *x, t_floatarg fpriority )
{
- if ( ( (t_int)fpriority >= MIN_PRIORITY ) && ( (t_int)fpriority <= MAX_PRIORITY ) )
+ if ( ( (int)fpriority >= MIN_PRIORITY ) && ( (int)fpriority <= MAX_PRIORITY ) )
{
x->x_priority = (int)fpriority;
}
@@ -189,7 +189,7 @@ static int strip_ice_header(char *head, int n)
static void pdp_icedthe_disconnect(t_pdp_icedthe *x)
{
- t_int ret, i, count=0;
+ int ret, i, count=0;
struct timespec twait;
twait.tv_sec = 0;
@@ -249,10 +249,10 @@ static void pdp_icedthe_disconnect(t_pdp_icedthe *x)
x->x_endofstream = 1;
}
-static t_int pdp_icedthe_get_buffer_from_network(t_int socket, ogg_sync_state *oy)
+static int pdp_icedthe_get_buffer_from_network(int socket, ogg_sync_state *oy)
{
char *buffer;
- t_int bytes;
+ int bytes;
buffer=ogg_sync_buffer(oy, NET_BUFFER_SIZE);
if ( ( bytes = read( socket, buffer, NET_BUFFER_SIZE ) ) < 0 )
@@ -265,7 +265,7 @@ static t_int pdp_icedthe_get_buffer_from_network(t_int socket, ogg_sync_state *o
return(bytes);
}
-static t_int pdp_icedthe_queue_page(t_pdp_icedthe *x)
+static int pdp_icedthe_queue_page(t_pdp_icedthe *x)
{
if(x->x_notpackets)
@@ -289,7 +289,7 @@ static t_int pdp_icedthe_queue_page(t_pdp_icedthe *x)
return 0;
}
-static t_int pdp_icedthe_decode_stream(t_pdp_icedthe *x)
+static int pdp_icedthe_decode_stream(t_pdp_icedthe *x)
{
int ret, count, maxsamples, samples, si=0, sj=0;
float **pcm;
@@ -299,7 +299,7 @@ static t_int pdp_icedthe_decode_stream(t_pdp_icedthe *x)
long long ttheoretical;
unsigned char *pY, *pU, *pV;
unsigned char *psY, *psU, *psV;
- t_int px, py;
+ int px, py;
// post( "pdp_icedthe~ : decode packet" );
@@ -477,7 +477,7 @@ static void *pdp_icedthe_decode(void *tdata)
{
t_pdp_icedthe *x = (t_pdp_icedthe*)tdata;
struct sched_param schedprio;
- t_int pmin, pmax, p1;
+ int pmin, pmax, p1;
struct timespec twait;
twait.tv_sec = 0;
@@ -521,7 +521,7 @@ static void *pdp_icedthe_decode(void *tdata)
static void pdp_icedthe_split_url(t_pdp_icedthe *x)
{
char *hostptr = NULL, *p, *endhost = NULL, *pathptr = NULL;
- t_int length;
+ int length;
/* strip http:// or ftp:// */
p = x->x_url;
@@ -552,7 +552,7 @@ static void pdp_icedthe_split_url(t_pdp_icedthe *x)
break;
}
- length = (t_int)(endhost - hostptr);
+ length = (int)(endhost - hostptr);
if ( x->x_hostname )
{
post ("pdp_icedthe~ : freeing hostname" );
@@ -577,15 +577,15 @@ static void *pdp_icedthe_do_connect(void *tdata)
pthread_attr_t decode_child_attr;
ogg_stream_state o_tempstate;
t_pdp_icedthe *x = (t_pdp_icedthe*)tdata;
- t_int sockfd;
+ int sockfd;
struct sockaddr_in server;
struct hostent *hp;
fd_set fdset;
struct timeval tv;
- t_int numrelocs = 0;
- t_int i, ret, rest, nanswers=0;
+ int numrelocs = 0;
+ int i, ret, rest, nanswers=0;
char *cpoint = NULL;
- t_int offset = 0, endofheaders = 0, wpackets = 0;
+ int offset = 0, endofheaders = 0, wpackets = 0;
char *sptr = NULL;
if ( x->x_insock != -1 )
@@ -1113,7 +1113,7 @@ static void *pdp_icedthe_do_connect(void *tdata)
static void pdp_icedthe_connect(t_pdp_icedthe *x, t_symbol *s)
{
- t_int ret, i;
+ int ret, i;
pthread_attr_t connect_child_attr;
if ( x->x_connectchild != 0 )
@@ -1168,7 +1168,7 @@ static t_int *pdp_icedthe_perform(t_int *w)
t_pdp_icedthe *x = (t_pdp_icedthe *)(w[3]);
int n = (int)(w[4]); // number of samples
struct timeval etime;
- t_int sn;
+ int sn;
x->x_blocksize = n;
diff --git a/modules/pdp_ieee1394.c b/modules/pdp_ieee1394.c
index 189398f..60161a3 100644
--- a/modules/pdp_ieee1394.c
+++ b/modules/pdp_ieee1394.c
@@ -58,7 +58,7 @@ typedef struct pdp_ieee1394_struct
bool x_initialized;
bool x_auto_open;
- t_int x_packet;
+ int x_packet;
t_pdp* x_header;
short int *x_data;
unsigned char *x_sdata; // static data to hold the grabbed images
@@ -71,7 +71,7 @@ typedef struct pdp_ieee1394_struct
int x_continue_thread;
unsigned int x_framerate;
int x_frame_ready;
- t_int x_quality;
+ int x_quality;
SeqGrabComponent x_sg;
SGChannel x_vc;
@@ -199,14 +199,14 @@ static void pdp_ieee1394_reset(t_pdp_ieee1394 *x)
static void pdp_ieee1394_quality(t_pdp_ieee1394 *x, t_floatarg fquality)
{
- if ( ( (t_int)fquality < 0 ) || ( (t_int)fquality > 3 ) )
+ if ( ( (int)fquality < 0 ) || ( (int)fquality > 3 ) )
{
- post("pdp_ieee1394: wrong quality %d", (t_int)fquality );
+ post("pdp_ieee1394: wrong quality %d", (int)fquality );
return;
}
else
{
- x->x_quality = (t_int)fquality;
+ x->x_quality = (int)fquality;
}
}
@@ -215,7 +215,7 @@ static void pdp_ieee1394_free(t_pdp_ieee1394 *x)
pdp_ieee1394_close(x);
}
-static t_int pdp_ieee1394_init_grabber(t_pdp_ieee1394 *x)
+static int pdp_ieee1394_init_grabber(t_pdp_ieee1394 *x)
{
OSErr anErr;
x->x_srcRect.top = 0;
@@ -357,7 +357,7 @@ static void pdp_ieee1394_bang(t_pdp_ieee1394 *x)
{
unsigned char *pQ;
short int *pY, *pU, *pV;
- t_int px, py;
+ int px, py;
if (!(x->x_continue_thread))
{
@@ -394,9 +394,9 @@ static void pdp_ieee1394_bang(t_pdp_ieee1394 *x)
pY = x->x_data;
pV = x->x_data+x->x_size;
pU = x->x_data+x->x_size+(x->x_size>>2);
- for ( py=0; py<(t_int)x->x_height; py++ )
+ for ( py=0; py<(int)x->x_height; py++ )
{
- for ( px=0; px<(t_int)x->x_width; px++ )
+ for ( px=0; px<(int)x->x_width; px++ )
{
*(pY+py*x->x_width+px) = (*(pQ+1+2*(py*x->x_width+px)))<<7;
if ( px%2 == 0 )
diff --git a/modules/pdp_imgloader.c b/modules/pdp_imgloader.c
index 2d74738..7043273 100644
--- a/modules/pdp_imgloader.c
+++ b/modules/pdp_imgloader.c
@@ -34,10 +34,10 @@ static char *pdp_imgloader_version = "pdp_imgloader: version 0.2 : image loadi
typedef struct _triangle
{
- t_int used;
- t_int x1, y1;
- t_int x2, y2;
- t_int x3, y3;
+ int used;
+ int x1, y1;
+ int x2, y2;
+ int x3, y3;
t_float a1, b1;
t_float a2, b2;
t_float a3, b3;
@@ -48,29 +48,29 @@ typedef struct pdp_imgloader_struct
t_object x_obj;
t_float x_f;
- t_int x_packet0;
- t_int x_packet1;
- t_int x_dropped;
- t_int x_queue_id;
+ int x_packet0;
+ int x_packet1;
+ int x_dropped;
+ int x_queue_id;
t_outlet *x_outlet0;
- t_int x_vwidth;
- t_int x_vheight;
- t_int x_vsize;
+ int x_vwidth;
+ int x_vheight;
+ int x_vsize;
- t_int x_xoffset; // x offset of the image
- t_int x_yoffset; // y offset of the image
+ int x_xoffset; // x offset of the image
+ int x_yoffset; // y offset of the image
/* imlib data */
Imlib_Image x_image;
DATA32 *x_imdata;
- t_int x_iwidth;
- t_int x_iheight;
- t_int x_operation;
- t_int b_fit;
+ int x_iwidth;
+ int x_iheight;
+ int x_operation;
+ int b_fit;
t_float x_blend;
- t_int x_quality; // quality forces an additional yuv->rgb conversion in yuv mode
+ int x_quality; // quality forces an additional yuv->rgb conversion in yuv mode
t_triangle x_hiddenzones[ MAX_ZONES ]; // hide these parts of the image
unsigned char *x_mask;
@@ -150,9 +150,9 @@ static void pdp_imgloader_operation(t_pdp_imgloader *x, t_symbol *s)
else if (s == gensym("substract")) x->x_operation = IMLIB_OP_SUBTRACT;
else if (s == gensym("reshade")) x->x_operation = IMLIB_OP_RESHADE;
}
-static t_int pdp_imgloader_isinzone(t_pdp_imgloader *x, t_int px, t_int py, t_int index)
+static int pdp_imgloader_isinzone(t_pdp_imgloader *x, int px, int py, int index)
{
- t_int c1=0, c2=0, c3=0;
+ int c1=0, c2=0, c3=0;
if ( !x->x_hiddenzones[index].used )
{
@@ -275,9 +275,9 @@ static t_int pdp_imgloader_isinzone(t_pdp_imgloader *x, t_int px, t_int py, t_in
return c1 && c2 && c3;
}
-static t_int pdp_imgloader_ishidden(t_pdp_imgloader *x, t_int px, t_int py)
+static int pdp_imgloader_ishidden(t_pdp_imgloader *x, int px, int py)
{
- t_int ti;
+ int ti;
for ( ti=0; ti<MAX_ZONES; ti++ )
{
@@ -294,7 +294,7 @@ static t_int pdp_imgloader_ishidden(t_pdp_imgloader *x, t_int px, t_int py)
static void pdp_imgloader_update_mask(t_pdp_imgloader *x )
{
- t_int px, py;
+ int px, py;
for ( py=0; py<x->x_vheight; py++ )
{
@@ -307,7 +307,7 @@ static void pdp_imgloader_update_mask(t_pdp_imgloader *x )
static void pdp_imgloader_hide(t_pdp_imgloader *x, t_symbol *s, int argc, t_atom *argv)
{
- t_int ti;
+ int ti;
t_float fx1, fy1, fx2, fy2, fx3, fy3;
if ( argc != 6 )
@@ -570,7 +570,7 @@ static void pdp_imgloader_process_yv12(t_pdp_imgloader *x)
short int *data = (short int *)pdp_packet_data(x->x_packet0);
t_pdp *newheader = pdp_packet_header(x->x_packet1);
short int *newdata = (short int *)pdp_packet_data(x->x_packet1);
- t_int px, py;
+ int px, py;
t_float alpha, factor;
unsigned char y, u, v;
short int *pY, *pU, *pV;
diff --git a/modules/pdp_imgsaver.c b/modules/pdp_imgsaver.c
index 6e261a0..ecffe07 100644
--- a/modules/pdp_imgsaver.c
+++ b/modules/pdp_imgsaver.c
@@ -37,23 +37,23 @@ typedef struct pdp_imgsaver_struct
t_object x_obj;
t_float x_f;
- t_int x_packet0;
- t_int x_packet1;
- t_int x_dropped;
- t_int x_queue_id;
+ int x_packet0;
+ int x_packet1;
+ int x_dropped;
+ int x_queue_id;
t_outlet *x_outlet0;
- t_int x_vwidth;
- t_int x_vheight;
- t_int x_vsize;
+ int x_vwidth;
+ int x_vheight;
+ int x_vsize;
- t_int x_save_pending;
+ int x_save_pending;
/* imlib data */
Imlib_Image x_image;
DATA32 *x_imdata;
- t_int x_iwidth;
- t_int x_iheight;
+ int x_iwidth;
+ int x_iheight;
t_symbol *x_filename;
short int *x_datas;
@@ -66,7 +66,7 @@ static void *pdp_imgsaver_do_save(void *tdata)
{
Imlib_Load_Error imliberr;
t_pdp_imgsaver *x = (t_pdp_imgsaver*) tdata;
- t_int px, py;
+ int px, py;
short int *pY, *pU, *pV;
unsigned char y, u, v;
@@ -195,7 +195,7 @@ static void pdp_imgsaver_process_yv12(t_pdp_imgsaver *x)
short int *data = (short int *)pdp_packet_data(x->x_packet0);
t_pdp *newheader = pdp_packet_header(x->x_packet1);
short int *newdata = (short int *)pdp_packet_data(x->x_packet1);
- t_int px, py;
+ int px, py;
t_float alpha, factor;
unsigned char y, u, v;
short int *pY, *pU, *pV;
diff --git a/modules/pdp_intrusion.c b/modules/pdp_intrusion.c
index 763f41f..25c956e 100644
--- a/modules/pdp_intrusion.c
+++ b/modules/pdp_intrusion.c
@@ -43,18 +43,18 @@ typedef struct pdp_intrusion_struct
t_float x_f;
t_outlet *x_outlet0;
- t_int x_packet0;
- t_int x_packet1;
- t_int x_dropped;
- t_int x_queue_id;
+ int x_packet0;
+ int x_packet1;
+ int x_dropped;
+ int x_queue_id;
unsigned int x_noisepattern[256]; // noise pattern
- t_int x_vwidth;
- t_int x_vheight;
- t_int x_vsize;
+ int x_vwidth;
+ int x_vheight;
+ int x_vsize;
unsigned int x_encoding;
short int *x_images[NB_IMAGES];
- t_int x_rtimage;
+ int x_rtimage;
short int *x_diff;
short int *x_bdata;
int x_threshold;
@@ -122,7 +122,7 @@ static void pdp_intrusion_background(t_pdp_intrusion *x )
}
}
-static void pdp_intrusion_allocate(t_pdp_intrusion *x, t_int newsize)
+static void pdp_intrusion_allocate(t_pdp_intrusion *x, int newsize)
{
int i;
diff --git a/modules/pdp_juxta.c b/modules/pdp_juxta.c
index 5f04902..be464bf 100644
--- a/modules/pdp_juxta.c
+++ b/modules/pdp_juxta.c
@@ -35,23 +35,23 @@ typedef struct pdp_juxta_struct
t_float x_f;
t_outlet *x_outlet0;
- t_int x_packet0;
- t_int x_packet1;
- t_int x_packet;
- t_int x_dropped;
- t_int x_queue_id;
-
- t_int x_vwidth0;
- t_int x_vheight0;
- t_int x_vsize0;
-
- t_int x_vwidth1;
- t_int x_vheight1;
- t_int x_vsize1;
-
- t_int x_vwidth;
- t_int x_vheight;
- t_int x_vsize;
+ int x_packet0;
+ int x_packet1;
+ int x_packet;
+ int x_dropped;
+ int x_queue_id;
+
+ int x_vwidth0;
+ int x_vheight0;
+ int x_vsize0;
+
+ int x_vwidth1;
+ int x_vheight1;
+ int x_vsize1;
+
+ int x_vwidth;
+ int x_vheight;
+ int x_vsize;
} t_pdp_juxta;
diff --git a/modules/pdp_lens.c b/modules/pdp_lens.c
index 072d8d0..84aab5f 100644
--- a/modules/pdp_lens.c
+++ b/modules/pdp_lens.c
@@ -36,32 +36,32 @@ typedef struct pdp_lens_struct
t_float x_f;
t_outlet *x_outlet0;
- t_int x_packet0;
- t_int x_packet1;
- t_int x_dropped;
- t_int x_queue_id;
-
- t_int x_vwidth;
- t_int x_vheight;
- t_int x_vsize;
+ int x_packet0;
+ int x_packet1;
+ int x_dropped;
+ int x_queue_id;
+
+ int x_vwidth;
+ int x_vheight;
+ int x_vsize;
t_float x_zoom; // zoom factor
- t_int x_cx; // coordinates of lens center
- t_int x_cy; // coordinates of lens center
- t_int x_csize; // width of the lens
- t_int x_xd;
- t_int x_yd;
- t_int x_mode;
- t_int *x_lens;
- t_int x_init;
+ int x_cx; // coordinates of lens center
+ int x_cy; // coordinates of lens center
+ int x_csize; // width of the lens
+ int x_xd;
+ int x_yd;
+ int x_mode;
+ int *x_lens;
+ int x_init;
} t_pdp_lens;
-static void pdp_lens_preset(t_pdp_lens *x, t_int oldsize, t_int newsize)
+static void pdp_lens_preset(t_pdp_lens *x, int oldsize, int newsize)
{
int px, py, r;
- if ( x->x_lens ) freebytes(x->x_lens, oldsize * oldsize * sizeof( t_int) );
- x->x_lens = (t_int *) getbytes( newsize * newsize * sizeof( t_int ) );
+ if ( x->x_lens ) freebytes(x->x_lens, oldsize * oldsize * sizeof( int) );
+ x->x_lens = (int *) getbytes( newsize * newsize * sizeof( int ) );
r = x->x_csize / 2;
/* it is sufficient to generate 1/4 of the lens and reflect this
diff --git a/modules/pdp_live~.c b/modules/pdp_live~.c
index 8b5e69d..1d4327d 100644
--- a/modules/pdp_live~.c
+++ b/modules/pdp_live~.c
@@ -64,14 +64,14 @@ typedef struct pdp_live_struct
t_object x_obj;
t_float x_f;
- t_int x_packet0;
- t_int x_dropped;
+ int x_packet0;
+ int x_dropped;
t_pdp *x_header;
unsigned char *x_data;
- t_int x_vwidth;
- t_int x_vheight;
- t_int x_vsize;
+ int x_vwidth;
+ int x_vheight;
+ int x_vsize;
t_outlet *x_pdp_out; // output decoded pdp packets
t_outlet *x_outlet_left; // left audio output
@@ -85,29 +85,29 @@ typedef struct pdp_live_struct
pthread_t x_decodechild; // stream decoding thread
pthread_mutex_t x_audiolock; // audio mutex
pthread_mutex_t x_videolock; // video mutex
- t_int x_usethread; // flag to activate decoding in a thread
- t_int x_autoplay; // flag to autoplay the file ( default = true )
- t_int x_nextimage; // flag to play next image in manual mode
- t_int x_priority; // priority of decoding thread
+ int x_usethread; // flag to activate decoding in a thread
+ int x_autoplay; // flag to autoplay the file ( default = true )
+ int x_nextimage; // flag to play next image in manual mode
+ int x_priority; // priority of decoding thread
char *x_url;
- t_int x_streaming; // streaming flag
- t_int x_decoding; // decoding flag
- t_int x_loop; // looping flag ( default = on )
- t_int x_nopackets; // no packet to decode
- t_int x_endofstream; // end of the stream reached
- t_int x_nbframes; // number of frames emitted
- t_int x_framerate; // framerate
- t_int x_samplerate; // audio sample rate
- t_int x_audiochannels; // audio channels
- t_int x_audioon; // enough audio data to start playing
- t_int x_blocksize; // audio block size
+ int x_streaming; // streaming flag
+ int x_decoding; // decoding flag
+ int x_loop; // looping flag ( default = on )
+ int x_nopackets; // no packet to decode
+ int x_endofstream; // end of the stream reached
+ int x_nbframes; // number of frames emitted
+ int x_framerate; // framerate
+ int x_samplerate; // audio sample rate
+ int x_audiochannels; // audio channels
+ int x_audioon; // enough audio data to start playing
+ int x_blocksize; // audio block size
struct timeval x_starttime; // streaming starting time
- t_int x_cursec; // current second
- t_int x_secondcount; // number of frames received in the current second
- t_int x_nbvideostreams; // number of video streams
- t_int x_nbaudiostreams; // number of audio streams
- t_int x_videoindex; // index of the first video stream
+ int x_cursec; // current second
+ int x_secondcount; // number of frames received in the current second
+ int x_nbvideostreams; // number of video streams
+ int x_nbaudiostreams; // number of audio streams
+ int x_videoindex; // index of the first video stream
/* AV data structures */
AVFormatContext *x_avcontext;
@@ -117,13 +117,13 @@ typedef struct pdp_live_struct
long long int x_pts; // presentation time stamp
long long int x_previouspts; // previous presentation time stamp
long long int x_firstpts; // first presentation time stamp ( time origin )
- t_int x_newpicture;
+ int x_newpicture;
/* audio structures */
- t_int x_audio; // flag to activate the decoding of audio
+ int x_audio; // flag to activate the decoding of audio
short x_audio_buf[4*MAX_AUDIO_PACKET_SIZE]; /* buffer for audio from stream*/
short x_audio_in[4*MAX_AUDIO_PACKET_SIZE]; /* buffer for resampled PCM audio */
- t_int x_audioin_position; // writing position for incoming audio
+ int x_audioin_position; // writing position for incoming audio
ReSampleContext *x_audio_resample_ctx; // structures for audio resample
} t_pdp_live;
@@ -180,8 +180,8 @@ static void pdp_live_bang(t_pdp_live *x)
static void pdp_live_frame_cold(t_pdp_live *x, t_floatarg frameindex)
{
- t_int frame = (int)frameindex;
- t_int ret, flags=0;
+ int frame = (int)frameindex;
+ int ret, flags=0;
uint64_t newpts;
if (!(x->x_streaming)) return;
@@ -209,15 +209,15 @@ static void pdp_live_frame_cold(t_pdp_live *x, t_floatarg frameindex)
#endif
}
-static t_int pdp_live_decode_packet(t_pdp_live *x)
+static int pdp_live_decode_packet(t_pdp_live *x)
{
- t_int chunksize=0, length, err, ret;
- t_int audiosize, sizeout, imagesize, pictureok;
+ int chunksize=0, length, err, ret;
+ int audiosize, sizeout, imagesize, pictureok;
AVFrame frame;
uint8_t *pcktptr;
unsigned char *pY, *pU, *pV;
uint8_t *psY, *psU, *psV;
- t_int px, py;
+ int px, py;
long long tplaying;
long long ttheoretical;
struct timeval ctime;
@@ -382,7 +382,7 @@ static t_int pdp_live_decode_packet(t_pdp_live *x)
imagesize = (x->x_avcontext->streams[x->x_pkt.stream_index]->codec->width *
x->x_avcontext->streams[x->x_pkt.stream_index]->codec->height * 3) / 2; // yuv planar
- x->x_framerate = ( t_int ) av_q2d( x->x_avcontext->streams[x->x_pkt.stream_index]->r_frame_rate );
+ x->x_framerate = ( int ) av_q2d( x->x_avcontext->streams[x->x_pkt.stream_index]->r_frame_rate );
if ( x->x_framerate == 0 ) x->x_framerate = DEFAULT_FRAME_RATE;
x->x_videoindex = x->x_pkt.stream_index;
@@ -528,7 +528,7 @@ static void *pdp_decode_stream_from_url(void *tdata)
{
t_pdp_live *x = (t_pdp_live*)tdata;
struct sched_param schedprio;
- t_int pmin, pmax;
+ int pmin, pmax;
struct timespec twait;
twait.tv_sec = 0;
@@ -755,7 +755,7 @@ static void *pdp_live_connect_to_url(void *tdata)
static void pdp_live_disconnect(t_pdp_live *x)
{
- t_int ret, i, count=0;
+ int ret, i, count=0;
struct timespec twait;
twait.tv_sec = 0;
@@ -806,7 +806,7 @@ static void pdp_live_disconnect(t_pdp_live *x)
static void pdp_live_connect(t_pdp_live *x, t_symbol *s)
{
- t_int ret, i;
+ int ret, i;
pthread_attr_t connect_child_attr;
if ( ( x->x_streaming ) || ( x->x_connectchild != 0 ) )
@@ -852,7 +852,7 @@ static t_int *pdp_live_perform(t_int *w)
int n = (int)(w[4]); // number of samples
short sampleL, sampleR;
struct timeval etime;
- t_int sn;
+ int sn;
// decode a packet if not in thread mode
if ( !x->x_usethread && x->x_streaming )
diff --git a/modules/pdp_lumafilt.c b/modules/pdp_lumafilt.c
index 17036d4..a6815db 100644
--- a/modules/pdp_lumafilt.c
+++ b/modules/pdp_lumafilt.c
@@ -38,16 +38,16 @@ typedef struct pdp_lumafilt_struct
t_float x_f;
t_outlet *x_outlet0;
- t_int x_packet0;
- t_int x_packet1;
- t_int x_dropped;
- t_int x_queue_id;
+ int x_packet0;
+ int x_packet1;
+ int x_dropped;
+ int x_queue_id;
- t_int x_vwidth;
- t_int x_vheight;
- t_int x_vsize;
+ int x_vwidth;
+ int x_vheight;
+ int x_vsize;
- t_int x_filter[MAX_LUMA]; // transform number
+ int x_filter[MAX_LUMA]; // transform number
} t_pdp_lumafilt;
@@ -74,7 +74,7 @@ static void pdp_lumafilt_filter(t_pdp_lumafilt *x, t_floatarg fluma, t_floatarg
static void pdp_lumafilt_mfilter(t_pdp_lumafilt *x, t_floatarg flumas, t_floatarg flumae, t_floatarg fonoff )
{
- t_int li;
+ int li;
if ( ( (int)flumas >= 0 ) && ( (int)flumas < MAX_LUMA ) &&
( (int)flumae >= 0 ) && ( (int)flumae < MAX_LUMA ) &&
@@ -96,7 +96,7 @@ static void pdp_lumafilt_process_yv12(t_pdp_lumafilt *x)
short int *data = (short int *)pdp_packet_data(x->x_packet0);
t_pdp *newheader = pdp_packet_header(x->x_packet1);
short int *newdata = (short int *)pdp_packet_data(x->x_packet1);
- t_int px, py, luma;
+ int px, py, luma;
short int *pnY, *pnU, *pnV;
/* allocate all ressources */
diff --git a/modules/pdp_mapper.c b/modules/pdp_mapper.c
index 9d6fe55..17d1274 100644
--- a/modules/pdp_mapper.c
+++ b/modules/pdp_mapper.c
@@ -33,16 +33,16 @@ typedef struct pdp_mapper_struct
t_float x_f;
t_outlet *x_outlet0;
- t_int x_packet0;
- t_int x_packet1;
- t_int x_dropped;
- t_int x_queue_id;
-
- t_int x_vwidth;
- t_int x_vheight;
- t_int x_vsize;
+ int x_packet0;
+ int x_packet1;
+ int x_dropped;
+ int x_queue_id;
+
+ int x_vwidth;
+ int x_vheight;
+ int x_vsize;
unsigned int x_encoding;
- t_int *x_pixelmap;
+ int *x_pixelmap;
} t_pdp_mapper;
@@ -53,13 +53,13 @@ static void pdp_mapper_copy(t_pdp_mapper *x, t_floatarg fromX, t_floatarg fromY,
( fromY >= 0 ) && ( fromY < x->x_vheight ) &&
( toY >= 0 ) && ( toY < x->x_vheight ) )
{
- x->x_pixelmap[ (t_int)toY*x->x_vwidth+(t_int)toX ] = x->x_pixelmap[ (t_int)fromY*x->x_vwidth+(t_int)fromX ];
+ x->x_pixelmap[ (int)toY*x->x_vwidth+(int)toX ] = x->x_pixelmap[ (int)fromY*x->x_vwidth+(int)fromX ];
}
}
static void pdp_mapper_reset(t_pdp_mapper *x)
{
- t_int px, py;
+ int px, py;
if ( x->x_vsize > 0 )
{
@@ -76,30 +76,30 @@ static void pdp_mapper_reset(t_pdp_mapper *x)
static void pdp_mapper_swap(t_pdp_mapper *x, t_floatarg fromX, t_floatarg fromY, t_floatarg toX, t_floatarg toY)
{
- t_int tval;
+ int tval;
if ( ( fromX >= 0 ) && ( fromX < x->x_vwidth ) &&
( toX >= 0 ) && ( toX < x->x_vwidth ) &&
( fromY >= 0 ) && ( fromY < x->x_vheight ) &&
( toY >= 0 ) && ( toY < x->x_vheight ) )
{
- tval = x->x_pixelmap[ (t_int)toY*x->x_vwidth+(t_int)toX ];
- x->x_pixelmap[ (t_int)toY*x->x_vwidth+(t_int)toX ] = x->x_pixelmap[ (t_int)fromY*x->x_vwidth+(t_int)fromX ];
- x->x_pixelmap[ (t_int)fromY*x->x_vwidth+(t_int)fromX ] = tval;
+ tval = x->x_pixelmap[ (int)toY*x->x_vwidth+(int)toX ];
+ x->x_pixelmap[ (int)toY*x->x_vwidth+(int)toX ] = x->x_pixelmap[ (int)fromY*x->x_vwidth+(int)fromX ];
+ x->x_pixelmap[ (int)fromY*x->x_vwidth+(int)fromX ] = tval;
}
}
-static void pdp_mapper_allocate(t_pdp_mapper *x, t_int newsize)
+static void pdp_mapper_allocate(t_pdp_mapper *x, int newsize)
{
int i, px, py;
if ( x->x_pixelmap != NULL )
{
- freebytes( x->x_pixelmap, x->x_vsize*sizeof(t_int) );
+ freebytes( x->x_pixelmap, x->x_vsize*sizeof(int) );
}
x->x_vsize = newsize;
- x->x_pixelmap = (t_int*) getbytes( x->x_vsize*sizeof(t_int) );
+ x->x_pixelmap = (int*) getbytes( x->x_vsize*sizeof(int) );
for ( py=0; py<x->x_vheight; py++ )
{
@@ -118,14 +118,14 @@ static void pdp_mapper_process_yv12(t_pdp_mapper *x)
short int *newdata = (short int *)pdp_packet_data(x->x_packet1);
int i;
- t_int px, py, ppx, ppy, offset;
+ int px, py, ppx, ppy, offset;
short int *sy, *su, *sv, t;
- t_int *spy;
+ int *spy;
short int *sny, *snu, *snv;
/* allocate all ressources */
- if ( ((t_int)header->info.image.width != x->x_vwidth ) ||
- ((t_int)header->info.image.height != x->x_vheight ) )
+ if ( ((int)header->info.image.width != x->x_vwidth ) ||
+ ((int)header->info.image.height != x->x_vheight ) )
{
x->x_vwidth = header->info.image.width;
x->x_vheight = header->info.image.height;
@@ -232,7 +232,7 @@ static void pdp_mapper_free(t_pdp_mapper *x)
pdp_queue_finish(x->x_queue_id);
pdp_packet_mark_unused(x->x_packet0);
- if ( x->x_pixelmap ) freebytes( x->x_pixelmap, x->x_vsize*sizeof(t_int) );
+ if ( x->x_pixelmap ) freebytes( x->x_pixelmap, x->x_vsize*sizeof(int) );
}
diff --git a/modules/pdp_mgrid.c b/modules/pdp_mgrid.c
index 77e8ad9..9b8040f 100644
--- a/modules/pdp_mgrid.c
+++ b/modules/pdp_mgrid.c
@@ -36,18 +36,18 @@ typedef struct pdp_mgrid_struct
t_object x_obj;
t_float x_f;
- t_int x_packet0;
- t_int x_dropped;
+ int x_packet0;
+ int x_dropped;
- t_int x_vwidth;
- t_int x_vheight;
- t_int x_vsize;
+ int x_vwidth;
+ int x_vheight;
+ int x_vsize;
short int *x_previous_frame;
- t_int x_xdim;
- t_int x_ydim;
- t_int x_threshold;
+ int x_xdim;
+ int x_ydim;
+ int x_threshold;
short int x_color;
- t_int x_firstimage;
+ int x_firstimage;
t_outlet *x_pdp_output; // output packets
t_outlet *x_xmotion; // output x coordinate of block which has been detected
@@ -119,10 +119,10 @@ static void pdp_mgrid_process_yv12(t_pdp_mgrid *x)
{
t_pdp *header = pdp_packet_header(x->x_packet0);
short int *data = (short int *)pdp_packet_data(x->x_packet0);
- t_int i, cf;
- t_int px=0, py=0, xcell=0, ycell=0;
- t_int celldiff=0, cellwidth=0, cellheight=0;
- t_int yindex=0, uindex=0, vindex=0;
+ int i, cf;
+ int px=0, py=0, xcell=0, ycell=0;
+ int celldiff=0, cellwidth=0, cellheight=0;
+ int yindex=0, uindex=0, vindex=0;
/* allocate all ressources */
if ( ( (int)header->info.image.width != x->x_vwidth ) ||
diff --git a/modules/pdp_mosaic.c b/modules/pdp_mosaic.c
index 9bcca86..18c12fa 100644
--- a/modules/pdp_mosaic.c
+++ b/modules/pdp_mosaic.c
@@ -39,19 +39,19 @@ typedef struct pdp_mosaic_struct
t_float x_f;
t_outlet *x_outlet0;
- t_int x_packet0;
- t_int x_packet1;
- t_int x_dropped;
- t_int x_queue_id;
-
- t_int x_vwidth;
- t_int x_vheight;
- t_int x_vsize;
- t_int x_censor_level;
- t_int x_ssize;
+ int x_packet0;
+ int x_packet1;
+ int x_dropped;
+ int x_queue_id;
+
+ int x_vwidth;
+ int x_vheight;
+ int x_vsize;
+ int x_censor_level;
+ int x_ssize;
short int *x_diff;
short int *x_bdata;
- t_int x_snapshot;
+ int x_snapshot;
} t_pdp_mosaic;
diff --git a/modules/pdp_nervous.c b/modules/pdp_nervous.c
index aeb3553..b1cf651 100644
--- a/modules/pdp_nervous.c
+++ b/modules/pdp_nervous.c
@@ -44,23 +44,23 @@ typedef struct pdp_nervous_struct
t_float x_f;
t_outlet *x_outlet0;
- t_int x_packet0;
- t_int x_packet1;
- t_int x_dropped;
- t_int x_queue_id;
-
- t_int x_vwidth;
- t_int x_vheight;
- t_int x_vsize;
- t_int x_mode;
+ int x_packet0;
+ int x_packet1;
+ int x_dropped;
+ int x_queue_id;
+
+ int x_vwidth;
+ int x_vheight;
+ int x_vsize;
+ int x_mode;
short int *x_buffer;
short int **x_planetable;
- t_int x_planes;
- t_int x_plane;
- t_int x_stock;
- t_int x_timer;
- t_int x_stride;
- t_int x_readplane;
+ int x_planes;
+ int x_plane;
+ int x_stock;
+ int x_timer;
+ int x_stride;
+ int x_readplane;
} t_pdp_nervous;
diff --git a/modules/pdp_noquark.c b/modules/pdp_noquark.c
index 0ba61d9..7c5574f 100644
--- a/modules/pdp_noquark.c
+++ b/modules/pdp_noquark.c
@@ -45,19 +45,19 @@ typedef struct pdp_noquark_struct
t_float x_f;
t_outlet *x_outlet0;
- t_int x_packet0;
- t_int x_packet1;
- t_int x_dropped;
- t_int x_queue_id;
-
- t_int x_vwidth;
- t_int x_vheight;
- t_int x_vsize;
+ int x_packet0;
+ int x_packet1;
+ int x_dropped;
+ int x_queue_id;
+
+ int x_vwidth;
+ int x_vheight;
+ int x_vsize;
short int *x_buffer;
short int **x_planetable;
- t_int x_plane;
- t_int x_planes;
- t_int x_tolerance;
+ int x_plane;
+ int x_planes;
+ int x_tolerance;
} t_pdp_noquark;
@@ -114,7 +114,7 @@ static void pdp_noquark_process_yv12(t_pdp_noquark *x)
short int *data = (short int *)pdp_packet_data(x->x_packet0);
t_pdp *newheader = pdp_packet_header(x->x_packet1);
short int *newdata = (short int *)pdp_packet_data(x->x_packet1);
- t_int px, py, cf, diff, rx, ry;
+ int px, py, cf, diff, rx, ry;
/* allocate all ressources */
if ( (int)(header->info.image.width*header->info.image.height) != x->x_vsize )
diff --git a/modules/pdp_o.c b/modules/pdp_o.c
index 30157cf..45b297b 100644
--- a/modules/pdp_o.c
+++ b/modules/pdp_o.c
@@ -34,8 +34,6 @@
#include <netdb.h>
#include <sys/types.h>
#include <sys/socket.h>
-#include <quicktime/quicktime.h>
-#include <quicktime/colormodels.h>
#include <bzlib.h> // bz2 compression routines
#define DEFAULT_FRAME_RATE 25
@@ -47,26 +45,26 @@ typedef struct pdp_o_struct
t_object x_obj;
t_float x_f;
- t_int x_vwidth;
- t_int x_vheight;
- t_int x_vsize;
- t_int x_hsize; // size of huffman coded data
+ int x_vwidth;
+ int x_vheight;
+ int x_vsize;
+ int x_hsize; // size of huffman coded data
- t_int x_packet0;
- t_int x_dropped;
- t_int x_queue_id;
+ int x_packet0;
+ int x_dropped;
+ int x_queue_id;
- t_int x_emitflag;
+ int x_emitflag;
/* connection data */
int x_fd; // info about connection status
- t_int x_framessent;
- t_int x_framesdropped;
- t_int x_secondcount;
- t_int x_bandwidthcount;
- t_int x_cursec;
- t_int x_framerate;
- t_int x_smoothing;
+ int x_framessent;
+ int x_framesdropped;
+ int x_secondcount;
+ int x_bandwidthcount;
+ int x_cursec;
+ int x_framerate;
+ int x_smoothing;
t_hpacket x_hpacket; // packet header
@@ -137,9 +135,9 @@ static void pdp_o_smoothing(t_pdp_o *x, t_floatarg fsmoothing)
}
/* smoothe image */
-static void pdp_o_smoothe(t_pdp_o *x, short int *source, t_int size )
+static void pdp_o_smoothe(t_pdp_o *x, short int *source, int size )
{
- t_int i;
+ int i;
char evalue, eevalue;
char value;
@@ -179,12 +177,12 @@ static void pdp_o_smoothe(t_pdp_o *x, short int *source, t_int size )
}
/* huffman coding */
-static int pdp_o_huffman(t_pdp_o *x, char *source, char *dest, t_int size, t_int *csize )
+static int pdp_o_huffman(t_pdp_o *x, char *source, char *dest, int size, int *csize )
{
- t_int i;
+ int i;
int value = source[0];
char count = 0;
- t_int tcount=0;
+ int tcount=0;
char *pcount=dest;
char *pvalue=dest+1;
@@ -320,7 +318,7 @@ static void pdp_o_process_yv12(t_pdp_o *x)
{
t_pdp *header = pdp_packet_header(x->x_packet0);
short int *data = (short int *)pdp_packet_data(x->x_packet0);
- t_int count, i, ret=0;
+ int count, i, ret=0;
/* setting video track */
if ( x->x_emitflag )
@@ -341,7 +339,7 @@ static void pdp_o_process_yv12(t_pdp_o *x)
for ( i=0; i<x->x_vsize; i++ )
{
- t_int downvalue;
+ int downvalue;
downvalue = (data[i]>>7);
if ( ( downvalue > 128 ) ||
@@ -361,7 +359,7 @@ static void pdp_o_process_yv12(t_pdp_o *x)
}
for ( i=x->x_vsize; i<(x->x_vsize+(x->x_vsize>>1)); i++ )
{
- t_int downvalue;
+ int downvalue;
downvalue = (data[i]>>8);
if ( ( downvalue > 128 ) ||
diff --git a/modules/pdp_ocanvas.c b/modules/pdp_ocanvas.c
index 598821e..c320d59 100644
--- a/modules/pdp_ocanvas.c
+++ b/modules/pdp_ocanvas.c
@@ -37,35 +37,35 @@ typedef struct pdp_ocanvas_struct
t_float x_f;
t_outlet *x_outlet0;
- t_int x_dropped;
- t_int x_queue_id;
+ int x_dropped;
+ int x_queue_id;
- t_int x_opacket;
+ int x_opacket;
- t_int x_current;
+ int x_current;
t_float x_xmouse;
t_float x_ymouse;
- t_int x_average;
+ int x_average;
- t_int *x_packets;
- t_int *x_widths;
- t_int *x_heights;
+ int *x_packets;
+ int *x_widths;
+ int *x_heights;
t_float *x_xoffsets;
t_float *x_yoffsets;
t_float *x_alphas;
- t_int *x_sizes;
+ int *x_sizes;
- t_int x_owidth;
- t_int x_oheight;
- t_int x_osize;
- t_int x_nbinputs;
+ int x_owidth;
+ int x_oheight;
+ int x_osize;
+ int x_nbinputs;
} t_pdp_ocanvas;
static void pdp_ocanvas_process_yv12(t_pdp_ocanvas *x)
{
- t_int px, py, ppx, ppy, ii, nbs;
+ int px, py, ppx, ppy, ii, nbs;
short int *pY, *pU, *pV;
short int *piY, *piU, *piV;
t_pdp *oheader;
@@ -138,7 +138,7 @@ static void pdp_ocanvas_sendpacket(t_pdp_ocanvas *x)
pdp_packet_pass_if_valid(x->x_outlet0, &x->x_opacket);
}
-static void pdp_ocanvas_process(t_pdp_ocanvas *x, t_int ni)
+static void pdp_ocanvas_process(t_pdp_ocanvas *x, int ni)
{
int encoding;
t_pdp *header = 0;
@@ -193,7 +193,7 @@ static void pdp_ocanvas_alpha(t_pdp_ocanvas *x, t_floatarg ni, t_floatarg xalpha
static void pdp_ocanvas_select(t_pdp_ocanvas *x, t_floatarg X, t_floatarg Y)
{
- t_int ii;
+ int ii;
x->x_current = -1;
X = X*x->x_owidth;
@@ -242,7 +242,7 @@ static void pdp_ocanvas_average(t_pdp_ocanvas *x, t_floatarg bvalue)
}
}
-static void pdp_ocanvas_input(t_pdp_ocanvas *x, t_symbol *s, t_floatarg f, t_int ni)
+static void pdp_ocanvas_input(t_pdp_ocanvas *x, t_symbol *s, t_floatarg f, int ni)
{
t_pdp *header;
short int *data;
@@ -326,7 +326,7 @@ static void pdp_ocanvas_input9(t_pdp_ocanvas *x, t_symbol *s, t_floatarg f)
static void pdp_ocanvas_free(t_pdp_ocanvas *x)
{
- t_int ii;
+ int ii;
pdp_queue_finish(x->x_queue_id);
for ( ii=0; ii<x->x_nbinputs; ii++)
@@ -334,10 +334,10 @@ static void pdp_ocanvas_free(t_pdp_ocanvas *x)
pdp_packet_mark_unused(x->x_packets[ii]);
}
pdp_packet_mark_unused(x->x_opacket);
- if ( x->x_packets ) freebytes( x->x_packets, x->x_nbinputs*sizeof(t_int) );
- if ( x->x_widths ) freebytes( x->x_widths, x->x_nbinputs*sizeof(t_int) );
- if ( x->x_heights ) freebytes( x->x_heights, x->x_nbinputs*sizeof(t_int) );
- if ( x->x_sizes ) freebytes( x->x_sizes, x->x_nbinputs*sizeof(t_int) );
+ if ( x->x_packets ) freebytes( x->x_packets, x->x_nbinputs*sizeof(int) );
+ if ( x->x_widths ) freebytes( x->x_widths, x->x_nbinputs*sizeof(int) );
+ if ( x->x_heights ) freebytes( x->x_heights, x->x_nbinputs*sizeof(int) );
+ if ( x->x_sizes ) freebytes( x->x_sizes, x->x_nbinputs*sizeof(int) );
if ( x->x_xoffsets ) freebytes( x->x_xoffsets, x->x_nbinputs*sizeof(t_float) );
if ( x->x_yoffsets ) freebytes( x->x_yoffsets, x->x_nbinputs*sizeof(t_float) );
if ( x->x_alphas ) freebytes( x->x_alphas, x->x_nbinputs*sizeof(t_float) );
@@ -348,7 +348,7 @@ t_class *pdp_ocanvas_class;
void *pdp_ocanvas_new(t_symbol *s, int argc, t_atom *argv)
{
t_pdp_ocanvas *x = (t_pdp_ocanvas *)pd_new(pdp_ocanvas_class);
- t_int ii;
+ int ii;
char *imes[32];
if ( argc != 3 )
@@ -392,10 +392,10 @@ void *pdp_ocanvas_new(t_symbol *s, int argc, t_atom *argv)
post ( "pdp_ocanvas : new %dx%d canvas with %d inputs", x->x_owidth, x->x_oheight, x->x_nbinputs );
- x->x_packets = ( t_int* ) getbytes( x->x_nbinputs*sizeof(t_int) );
- x->x_widths = ( t_int* ) getbytes( x->x_nbinputs*sizeof(t_int) );
- x->x_heights = ( t_int* ) getbytes( x->x_nbinputs*sizeof(t_int) );
- x->x_sizes = ( t_int* ) getbytes( x->x_nbinputs*sizeof(t_int) );
+ x->x_packets = ( int* ) getbytes( x->x_nbinputs*sizeof(int) );
+ x->x_widths = ( int* ) getbytes( x->x_nbinputs*sizeof(int) );
+ x->x_heights = ( int* ) getbytes( x->x_nbinputs*sizeof(int) );
+ x->x_sizes = ( int* ) getbytes( x->x_nbinputs*sizeof(int) );
x->x_xoffsets = ( t_float* ) getbytes( x->x_nbinputs*sizeof(t_float) );
x->x_yoffsets = ( t_float* ) getbytes( x->x_nbinputs*sizeof(t_float) );
x->x_alphas = ( t_float* ) getbytes( x->x_nbinputs*sizeof(t_float) );
diff --git a/modules/pdp_pen.c b/modules/pdp_pen.c
index 6aa263c..3697c4b 100644
--- a/modules/pdp_pen.c
+++ b/modules/pdp_pen.c
@@ -30,7 +30,7 @@
static char *pdp_pen_version = "pdp_pen: version 0.1, free hand drawing object written by Yves Degoyon (ydegoyon@free.fr)";
-static t_int nbits=0; // number of recursive calls
+static int nbits=0; // number of recursive calls
typedef struct pdp_pen_struct
{
@@ -38,30 +38,30 @@ typedef struct pdp_pen_struct
t_float x_f;
t_outlet *x_outlet0;
- t_int x_packet0;
- t_int x_packet1;
- t_int x_dropped;
- t_int x_queue_id;
-
- t_int x_vwidth;
- t_int x_vheight;
- t_int x_vsize;
-
- t_int x_red;
- t_int x_green;
- t_int x_blue;
- t_int x_xoffset;
- t_int x_yoffset;
+ int x_packet0;
+ int x_packet1;
+ int x_dropped;
+ int x_queue_id;
+
+ int x_vwidth;
+ int x_vheight;
+ int x_vsize;
+
+ int x_red;
+ int x_green;
+ int x_blue;
+ int x_xoffset;
+ int x_yoffset;
t_float x_alpha;
- t_int x_pwidth;
- t_int x_mode; // 0=draw ( default), 1=erase
+ int x_pwidth;
+ int x_mode; // 0=draw ( default), 1=erase
short int *x_bdata;
} t_pdp_pen;
-static void pdp_pen_allocate(t_pdp_pen *x, t_int newsize)
+static void pdp_pen_allocate(t_pdp_pen *x, int newsize)
{
int i;
@@ -75,8 +75,8 @@ static void pdp_pen_allocate(t_pdp_pen *x, t_int newsize)
static void pdp_pen_draw(t_pdp_pen *x, t_floatarg X, t_floatarg Y)
{
short int *pbY, *pbU, *pbV;
- t_int mx, Mx, my, My;
- t_int px, py;
+ int mx, Mx, my, My;
+ int px, py;
if ( !x->x_bdata ) return;
@@ -135,22 +135,22 @@ static void pdp_pen_do_fill(t_pdp_pen *x, t_floatarg X, t_floatarg Y)
if ( !x->x_bdata ) return;
nbits++;
- // post( "pdp_pen_do_fill : X=%d, Y=%d stack=%d", (t_int)X, (t_int)Y, nbits );
+ // post( "pdp_pen_do_fill : X=%d, Y=%d stack=%d", (int)X, (int)Y, nbits );
pbY = x->x_bdata;
pbU = (x->x_bdata+x->x_vsize);
pbV = (x->x_bdata+x->x_vsize+(x->x_vsize>>2));
- if ( ( (t_int)X < 0 ) || ( (t_int)X >= x->x_vwidth ) ||
- ( (t_int)Y < 0 ) || ( (t_int)Y >= x->x_vheight ) )
+ if ( ( (int)X < 0 ) || ( (int)X >= x->x_vwidth ) ||
+ ( (int)Y < 0 ) || ( (int)Y >= x->x_vheight ) )
{
nbits--;
return;
}
- nX = (t_int) X;
- nY = (t_int) Y;
- if ( *(pbY+(t_int)Y*x->x_vwidth+(t_int)X) != 0 )
+ nX = (int) X;
+ nY = (int) Y;
+ if ( *(pbY+(int)Y*x->x_vwidth+(int)X) != 0 )
{
nbits--;
return;
@@ -165,8 +165,8 @@ static void pdp_pen_do_fill(t_pdp_pen *x, t_floatarg X, t_floatarg Y)
(yuv_RGBtoV( (x->x_blue << 16) + (x->x_green << 8) + x->x_red ))-128<<8;
}
- nX = (t_int) X+1;
- nY = (t_int) Y;
+ nX = (int) X+1;
+ nY = (int) Y;
if ( (*(pbY+nY*x->x_vwidth+nX)) == 0 )
{
pdp_pen_do_fill( x, nX, nY );
@@ -178,8 +178,8 @@ static void pdp_pen_do_fill(t_pdp_pen *x, t_floatarg X, t_floatarg Y)
(yuv_RGBtoV( (x->x_blue << 16) + (x->x_green << 8) + x->x_red ))-128<<8;
}
- nX = (t_int) X-1;
- nY = (t_int) Y;
+ nX = (int) X-1;
+ nY = (int) Y;
if ( *(pbY+nY*x->x_vwidth+nX) == 0 )
{
pdp_pen_do_fill( x, nX, nY );
@@ -191,8 +191,8 @@ static void pdp_pen_do_fill(t_pdp_pen *x, t_floatarg X, t_floatarg Y)
(yuv_RGBtoV( (x->x_blue << 16) + (x->x_green << 8) + x->x_red ))-128<<8;
}
- nX = (t_int) X-1;
- nY = (t_int) Y-1;
+ nX = (int) X-1;
+ nY = (int) Y-1;
if ( *(pbY+nY*x->x_vwidth+nX) == 0 )
{
pdp_pen_do_fill( x, nX, nY );
@@ -204,8 +204,8 @@ static void pdp_pen_do_fill(t_pdp_pen *x, t_floatarg X, t_floatarg Y)
(yuv_RGBtoV( (x->x_blue << 16) + (x->x_green << 8) + x->x_red ))-128<<8;
}
- nX = (t_int) X;
- nY = (t_int) Y-1;
+ nX = (int) X;
+ nY = (int) Y-1;
if ( *(pbY+nY*x->x_vwidth+nX) == 0 )
{
pdp_pen_do_fill( x, nX, nY );
@@ -217,8 +217,8 @@ static void pdp_pen_do_fill(t_pdp_pen *x, t_floatarg X, t_floatarg Y)
(yuv_RGBtoV( (x->x_blue << 16) + (x->x_green << 8) + x->x_red ))-128<<8;
}
- nX = (t_int) X+1;
- nY = (t_int) Y-1;
+ nX = (int) X+1;
+ nY = (int) Y-1;
if ( *(pbY+nY*x->x_vwidth+nX) == 0 )
{
pdp_pen_do_fill( x, nX, nY );
@@ -230,8 +230,8 @@ static void pdp_pen_do_fill(t_pdp_pen *x, t_floatarg X, t_floatarg Y)
(yuv_RGBtoV( (x->x_blue << 16) + (x->x_green << 8) + x->x_red ))-128<<8;
}
- nX = (t_int) X-1;
- nY = (t_int) Y+1;
+ nX = (int) X-1;
+ nY = (int) Y+1;
if ( *(pbY+nY*x->x_vwidth+nX) == 0 )
{
pdp_pen_do_fill( x, nX, nY );
@@ -243,8 +243,8 @@ static void pdp_pen_do_fill(t_pdp_pen *x, t_floatarg X, t_floatarg Y)
(yuv_RGBtoV( (x->x_blue << 16) + (x->x_green << 8) + x->x_red ))-128<<8;
}
- nX = (t_int) X;
- nY = (t_int) Y+1;
+ nX = (int) X;
+ nY = (int) Y+1;
if ( *(pbY+nY*x->x_vwidth+nX) == 0 )
{
pdp_pen_do_fill( x, nX, nY );
@@ -256,8 +256,8 @@ static void pdp_pen_do_fill(t_pdp_pen *x, t_floatarg X, t_floatarg Y)
(yuv_RGBtoV( (x->x_blue << 16) + (x->x_green << 8) + x->x_red ))-128<<8;
}
- nX = (t_int) X+1;
- nY = (t_int) Y+1;
+ nX = (int) X+1;
+ nY = (int) Y+1;
if ( *(pbY+nY*x->x_vwidth+nX) == 0 )
{
pdp_pen_do_fill( x, nX, nY );
@@ -358,15 +358,15 @@ static void pdp_pen_process_yv12(t_pdp_pen *x)
short int *data = (short int *)pdp_packet_data(x->x_packet0);
t_pdp *newheader = pdp_packet_header(x->x_packet1);
short int *newdata = (short int *)pdp_packet_data(x->x_packet1);
- t_int i;
- t_int px, py;
+ int i;
+ int px, py;
short int *pY, *pU, *pV;
short int *pbY, *pbU, *pbV;
short int *pnY, *pnU, *pnV;
/* allocate all ressources */
- if ( ((t_int)header->info.image.width != x->x_vwidth ) ||
- ((t_int)header->info.image.height != x->x_vheight ) )
+ if ( ((int)header->info.image.width != x->x_vwidth ) ||
+ ((int)header->info.image.height != x->x_vheight ) )
{
pdp_pen_allocate(x, header->info.image.width*header->info.image.height );
post( "pdp_pen : reallocating buffers" );
diff --git a/modules/pdp_puzzle.c b/modules/pdp_puzzle.c
index f9fad2d..f576779 100644
--- a/modules/pdp_puzzle.c
+++ b/modules/pdp_puzzle.c
@@ -41,36 +41,36 @@ typedef struct pdp_puzzle_struct
t_object x_obj;
t_float x_f;
- t_int x_packet0;
- t_int x_packet1;
- t_int x_dropped;
- t_int x_queue_id;
+ int x_packet0;
+ int x_packet1;
+ int x_dropped;
+ int x_queue_id;
t_outlet *x_outlet0;
- t_int x_vwidth;
- t_int x_vheight;
- t_int x_vsize;
+ int x_vwidth;
+ int x_vheight;
+ int x_vsize;
/* puzzle parameters */
- t_int *x_blockpos;
- t_int *x_blockoffset;
- t_int *x_ublockoffset;
- t_int *x_vblockoffset;
- t_int x_nbblocks;
- t_int x_blockwidth;
- t_int x_blockheight;
- t_int x_blockw;
- t_int x_blockh;
- t_int x_blocknum;
- t_int x_spacepos;
- t_int x_spacex;
- t_int x_spacey;
+ int *x_blockpos;
+ int *x_blockoffset;
+ int *x_ublockoffset;
+ int *x_vblockoffset;
+ int x_nbblocks;
+ int x_blockwidth;
+ int x_blockheight;
+ int x_blockw;
+ int x_blockh;
+ int x_blocknum;
+ int x_spacepos;
+ int x_spacex;
+ int x_spacey;
} t_pdp_puzzle;
static void pdp_puzzle_init_tables(t_pdp_puzzle *x)
{
- t_int i, a, b, c;
+ int i, a, b, c;
for(i=0; i<x->x_blocknum; i++)
{
@@ -95,7 +95,7 @@ static void pdp_puzzle_init_tables(t_pdp_puzzle *x)
static void pdp_puzzle_up(t_pdp_puzzle *x )
{
- t_int tmp, nextpos=-1;
+ int tmp, nextpos=-1;
if(x->x_spacey>0)
{
@@ -113,7 +113,7 @@ static void pdp_puzzle_up(t_pdp_puzzle *x )
static void pdp_puzzle_down(t_pdp_puzzle *x )
{
- t_int tmp, nextpos=-1;
+ int tmp, nextpos=-1;
if(x->x_spacey<x->x_blockh-1)
{
@@ -131,7 +131,7 @@ static void pdp_puzzle_down(t_pdp_puzzle *x )
static void pdp_puzzle_left(t_pdp_puzzle *x )
{
- t_int tmp, nextpos=-1;
+ int tmp, nextpos=-1;
if(x->x_spacex>0)
{
@@ -149,7 +149,7 @@ static void pdp_puzzle_left(t_pdp_puzzle *x )
static void pdp_puzzle_right(t_pdp_puzzle *x )
{
- t_int tmp, nextpos=-1;
+ int tmp, nextpos=-1;
if(x->x_spacex<x->x_blockw-1)
{
@@ -175,7 +175,7 @@ static void pdp_puzzle_free_ressources(t_pdp_puzzle *x)
static void pdp_puzzle_allocate(t_pdp_puzzle *x)
{
- t_int px, py;
+ int px, py;
x->x_blockwidth = x->x_vwidth / x->x_nbblocks;
x->x_blockheight = x->x_vheight / x->x_nbblocks;
@@ -223,7 +223,7 @@ static void pdp_puzzle_process_yv12(t_pdp_puzzle *x)
short int *data = (short int *)pdp_packet_data(x->x_packet0);
t_pdp *newheader = pdp_packet_header(x->x_packet1);
short int *newdata = (short int *)pdp_packet_data(x->x_packet1);
- t_int px, py, xx, yy, i;
+ int px, py, xx, yy, i;
short int *pY, *qY, *pU, *pV, *qU, *qV;
/* allocate all ressources */
diff --git a/modules/pdp_qtext.c b/modules/pdp_qtext.c
index 8bcf4a4..281d8c8 100755
--- a/modules/pdp_qtext.c
+++ b/modules/pdp_qtext.c
@@ -60,34 +60,34 @@ struct text_frame_struct
typedef struct text_layer_struct
{
- t_int l_xoffset; // x position
- t_int l_yoffset; // y position
- t_int l_r; // first color
- t_int l_g;
- t_int l_b;
- t_int l_a;
- t_int l_2r; // color for even lines of feed
- t_int l_2g;
- t_int l_2b;
- t_int l_2a;
- t_int l_borderr; // color for the border
- t_int l_borderg;
- t_int l_borderb;
+ int l_xoffset; // x position
+ int l_yoffset; // y position
+ int l_r; // first color
+ int l_g;
+ int l_b;
+ int l_a;
+ int l_2r; // color for even lines of feed
+ int l_2g;
+ int l_2b;
+ int l_2a;
+ int l_borderr; // color for the border
+ int l_borderg;
+ int l_borderb;
t_float l_angle; // angle
- t_int l_scroll;
- t_int l_alignment; // 0 - center; 1 - left; 2 - right;
- t_int l_marginh; // top margin
- t_int l_marginv; // bottom margin
- t_int l_active; // slot is active?
+ int l_scroll;
+ int l_alignment; // 0 - center; 1 - left; 2 - right;
+ int l_marginh; // top margin
+ int l_marginv; // bottom margin
+ int l_active; // slot is active?
- t_int l_feed_turn; // even or odd turn
+ int l_feed_turn; // even or odd turn
- t_int l_mode; // work mode: static, scroll, feed/chat, slow
- t_int l_scroll_speed;
- t_int l_upwards; // whether to put new elements at top or bottom of the queue
+ int l_mode; // work mode: static, scroll, feed/chat, slow
+ int l_scroll_speed;
+ int l_upwards; // whether to put new elements at top or bottom of the queue
TEXT_FRAME *l_texts;
TEXT_FRAME *l_last_text;
- t_int l_ntexts; // number of texts in the chat queue
+ int l_ntexts; // number of texts in the chat queue
Imlib_Font l_font;
} TEXTLAYER;
@@ -96,19 +96,19 @@ typedef struct pdp_qtext_struct
t_object x_obj;
t_float x_f;
- t_int x_packet0;
- t_int x_packet1;
- t_int x_dropped;
- t_int x_queue_id;
+ int x_packet0;
+ int x_packet1;
+ int x_dropped;
+ int x_queue_id;
t_outlet *x_outlet0;
- t_int x_vwidth;
- t_int x_vheight;
- t_int x_vsize;
+ int x_vwidth;
+ int x_vheight;
+ int x_vsize;
- t_int x_nbtexts;
- t_int x_current; // currently selected layer
- t_int x_capacity; // maximum texts
+ int x_nbtexts;
+ int x_current; // currently selected layer
+ int x_capacity; // maximum texts
// text layers
TEXTLAYER *x_layers;
@@ -220,7 +220,7 @@ static void pdp_qtext_add(t_pdp_qtext *x, t_symbol *s, int argc, t_atom *argv)
{
char *pname;
char *pdname;
- t_int len;
+ int len;
if ( argc < 3 )
{
@@ -270,8 +270,8 @@ static void pdp_qtext_add(t_pdp_qtext *x, t_symbol *s, int argc, t_atom *argv)
{
if ( (*pname=='%') && ( isdigit(*(pname+1)) || (*(pname+1)=='%') ) )
{
- t_int ivalue;
- t_int ndigits;
+ int ivalue;
+ int ndigits;
char *piname;
ndigits=0;
@@ -513,7 +513,7 @@ static void pdp_qtext_right(t_pdp_qtext *x )
static void pdp_qtext_delete(t_pdp_qtext *x, t_floatarg fnum )
{
- t_int i;
+ int i;
char *lostword;
text_layer_flush(&x->x_layers[x->x_current]);
@@ -560,15 +560,15 @@ static void pdp_qtext_mode(t_pdp_qtext *x, t_symbol *s)
static void pdp_qtext_resize(t_pdp_qtext *x, t_floatarg fnewsize )
{
char **text_array;
- t_int *xoffsets;
- t_int *yoffsets;
- t_int *r;
- t_int *g;
- t_int *b;
+ int *xoffsets;
+ int *yoffsets;
+ int *r;
+ int *g;
+ int *b;
t_float *angle;
- t_int *scroll;
+ int *scroll;
- t_int i, csize;
+ int i, csize;
TEXTLAYER * layers;
if ( (int) fnewsize<=0 ) return;
@@ -744,7 +744,7 @@ static void pdp_qtext_draw_all_texts(t_pdp_qtext *x)
int chat_lines = 0; // total lines of chat rendered
int linenumber; // lines of chat we have rendered in current message
int feed_mes = 0; // messages rendered
- t_int tlayer;
+ int tlayer;
// draw all texts
imlib_context_set_direction(IMLIB_TEXT_TO_ANGLE);
@@ -755,7 +755,7 @@ static void pdp_qtext_draw_all_texts(t_pdp_qtext *x)
while (curr_text != NULL) {
if (x->x_layers[tlayer].l_active)
{
- t_int base=tlayer;
+ int base=tlayer;
linenumber = 0;
int ti = feed_mes;
imlib_context_set_angle( x->x_layers[base].l_angle );
@@ -858,8 +858,8 @@ static void pdp_qtext_process_yv12(t_pdp_qtext *x)
short int *data = (short int *)pdp_packet_data(x->x_packet0);
t_pdp *newheader = pdp_packet_header(x->x_packet1);
short int *newdata = (short int *)pdp_packet_data(x->x_packet1);
- t_int ti;
- t_int px, py;
+ int ti;
+ int px, py;
unsigned char y, u, v;
DATA32 *imdata;
DATA32 bgcolor=0;
diff --git a/modules/pdp_quark.c b/modules/pdp_quark.c
index 8a59e9e..ce87c92 100644
--- a/modules/pdp_quark.c
+++ b/modules/pdp_quark.c
@@ -44,19 +44,19 @@ typedef struct pdp_quark_struct
t_float x_f;
t_outlet *x_outlet0;
- t_int x_packet0;
- t_int x_packet1;
- t_int x_dropped;
- t_int x_queue_id;
-
- t_int x_vwidth;
- t_int x_vheight;
- t_int x_vsize;
+ int x_packet0;
+ int x_packet1;
+ int x_dropped;
+ int x_queue_id;
+
+ int x_vwidth;
+ int x_vheight;
+ int x_vsize;
short int *x_buffer;
short int **x_planetable;
- t_int x_plane;
- t_int x_planes;
- t_int x_tolerance;
+ int x_plane;
+ int x_planes;
+ int x_tolerance;
} t_pdp_quark;
@@ -113,7 +113,7 @@ static void pdp_quark_process_yv12(t_pdp_quark *x)
short int *data = (short int *)pdp_packet_data(x->x_packet0);
t_pdp *newheader = pdp_packet_header(x->x_packet1);
short int *newdata = (short int *)pdp_packet_data(x->x_packet1);
- t_int i, cf, diff;
+ int i, cf, diff;
/* allocate all ressources */
if ( (int)(header->info.image.width*header->info.image.height) != x->x_vsize )
diff --git a/modules/pdp_radioactiv.c b/modules/pdp_radioactiv.c
index cab733a..e3c75c5 100644
--- a/modules/pdp_radioactiv.c
+++ b/modules/pdp_radioactiv.c
@@ -44,39 +44,39 @@ typedef struct pdp_radioactiv_struct
t_float x_f;
t_outlet *x_outlet0;
- t_int x_packet0;
- t_int x_packet1;
- t_int x_dropped;
- t_int x_queue_id;
-
- t_int x_vwidth;
- t_int x_vheight;
- t_int x_vsize;
+ int x_packet0;
+ int x_packet1;
+ int x_dropped;
+ int x_queue_id;
+
+ int x_vwidth;
+ int x_vheight;
+ int x_vsize;
unsigned char *x_blurzoombuf;
- t_int *x_blurzoomx;
- t_int *x_blurzoomy;
- t_int x_buf_width_blocks;
- t_int x_buf_width;
- t_int x_buf_height;
- t_int x_buf_area;
- t_int x_buf_margin_right;
- t_int x_buf_margin_left;
- t_int x_palette[COLORS];
- t_int x_mode; /* 0=normal 1=strobe 2=strobe2 3=trigger */
- t_int x_snap_time;
- t_int x_snap_interval;
+ int *x_blurzoomx;
+ int *x_blurzoomy;
+ int x_buf_width_blocks;
+ int x_buf_width;
+ int x_buf_height;
+ int x_buf_area;
+ int x_buf_margin_right;
+ int x_buf_margin_left;
+ int x_palette[COLORS];
+ int x_mode; /* 0=normal 1=strobe 2=strobe2 3=trigger */
+ int x_snap_time;
+ int x_snap_interval;
short int *x_snapframe;
short int *x_diff;
short int *x_bdata;
- t_int x_snapshot;
+ int x_snapshot;
} t_pdp_radioactiv;
static void pdp_radioactiv_free_ressources(t_pdp_radioactiv *x)
{
if ( x->x_blurzoombuf ) freebytes ( x->x_blurzoombuf, x->x_buf_area*2 );
- if ( x->x_blurzoomx ) freebytes ( x->x_blurzoomx, x->x_buf_width*sizeof(t_int) );
- if ( x->x_blurzoomy ) freebytes ( x->x_blurzoomy, x->x_buf_height*sizeof(t_int) );
+ if ( x->x_blurzoomx ) freebytes ( x->x_blurzoomx, x->x_buf_width*sizeof(int) );
+ if ( x->x_blurzoomy ) freebytes ( x->x_blurzoomy, x->x_buf_height*sizeof(int) );
if ( x->x_snapframe ) freebytes ( x->x_snapframe, ( ( x->x_vsize + x->x_vsize>>1 ) << 1 ) );
if ( x->x_diff ) freebytes( x->x_diff, (x->x_vsize + (x->x_vsize>>1))<<1 );
if ( x->x_bdata ) freebytes( x->x_bdata, (( x->x_vsize + (x->x_vsize>>1))<<1));
@@ -94,8 +94,8 @@ static void pdp_radioactiv_allocate(t_pdp_radioactiv *x)
x->x_buf_margin_right = x->x_vwidth - x->x_buf_width - x->x_buf_margin_left;
x->x_blurzoombuf = (unsigned char *) getbytes (x->x_buf_area*2);
- x->x_blurzoomx = (t_int *) getbytes (x->x_buf_width*sizeof(t_int));
- x->x_blurzoomy = (t_int *) getbytes (x->x_buf_height*sizeof(t_int));
+ x->x_blurzoomx = (int *) getbytes (x->x_buf_width*sizeof(int));
+ x->x_blurzoomy = (int *) getbytes (x->x_buf_height*sizeof(int));
x->x_snapframe = (short int *) getbytes ( ( ( x->x_vsize + x->x_vsize>>1 ) << 1 ) );
x->x_diff = (short int*) getbytes((x->x_vsize + (x->x_vsize>>1))<<1);
x->x_bdata = (short int *) getbytes((( x->x_vsize + (x->x_vsize>>1))<<1));
@@ -215,7 +215,7 @@ static void pdp_radioactiv_snap_time(t_pdp_radioactiv *x, t_floatarg fsnaptime )
{
if ( fsnaptime > 0 )
{
- x->x_snap_time = (t_int) fsnaptime;
+ x->x_snap_time = (int) fsnaptime;
}
}
@@ -223,7 +223,7 @@ static void pdp_radioactiv_snap_interval(t_pdp_radioactiv *x, t_floatarg fsnapin
{
if ( fsnapinterval > 1 )
{
- x->x_snap_interval = (t_int) fsnapinterval;
+ x->x_snap_interval = (int) fsnapinterval;
}
}
diff --git a/modules/pdp_rec~.c b/modules/pdp_rec~.c
index 56e11a5..4cca9c8 100644
--- a/modules/pdp_rec~.c
+++ b/modules/pdp_rec~.c
@@ -24,11 +24,17 @@
#include "pdp.h"
+#include "pidip_config.h"
#include <math.h>
#include <time.h>
#include <sys/time.h>
-#include <quicktime/quicktime.h>
+#ifdef QUICKTIME_NEWER
+#include <lqt/lqt.h>
+#include <lqt/colormodels.h>
+#else
+#include <quicktime/lqt.h>
#include <quicktime/colormodels.h>
+#endif
#define DEFAULT_FRAME_RATE 25
#define DEFAULT_CHANNELS 2
@@ -45,36 +51,36 @@ typedef struct pdp_rec_struct
t_float x_f;
t_outlet *x_outlet0;
- t_int x_packet0;
- t_int x_packet1;
- t_int x_dropped;
- t_int x_queue_id;
+ int x_packet0;
+ int x_packet1;
+ int x_dropped;
+ int x_queue_id;
- t_int x_vwidth;
- t_int x_vheight;
- t_int x_vsize;
+ int x_vwidth;
+ int x_vheight;
+ int x_vsize;
quicktime_t *x_qtfile;
unsigned char **x_yuvpointers;
unsigned char *x_yuvbuffer;
- t_int x_framerate;
- t_int x_forced_framerate;
- t_int x_jpeg_quality;
- t_int x_newfile;
+ int x_framerate;
+ int x_forced_framerate;
+ int x_jpeg_quality;
+ int x_newfile;
char *x_compressor;
- t_int x_recflag;
- t_int x_frameswritten;
+ int x_recflag;
+ int x_frameswritten;
struct timeval x_tstart;
struct timeval x_tstop;
struct timeval x_tlastrec;
/* audio structures */
int16_t **x_audio_buf; /* buffer for incoming audio */
- t_int x_audioin_position; // writing position for incoming audio
+ int x_audioin_position; // writing position for incoming audio
char *x_acompressor; // audio compressor
- t_int x_channels; // audio channels
- t_int x_samplerate; // audio sample rate
- t_int x_bits; // audio bits
+ int x_channels; // audio channels
+ int x_samplerate; // audio sample rate
+ int x_bits; // audio bits
} t_pdp_rec;
@@ -107,7 +113,7 @@ static void pdp_rec_allocate(t_pdp_rec *x)
/* set video track whenever width or height is changed */
static void pdp_rec_set_video(t_pdp_rec *x)
{
- t_int ret;
+ int ret;
if ( !x->x_qtfile ) {
post( "pdp_rec~ : no video recording file is opened !!");
@@ -129,7 +135,7 @@ static void pdp_rec_set_video(t_pdp_rec *x)
/* set framerate */
static void pdp_rec_set_framerate(t_pdp_rec *x)
{
- t_int ret;
+ int ret;
if ( !x->x_qtfile ) {
post( "pdp_rec~ : no video recording file is opened !!");
@@ -144,7 +150,7 @@ static void pdp_rec_set_framerate(t_pdp_rec *x)
/* set audio track */
static void pdp_rec_set_audio(t_pdp_rec *x)
{
- t_int ret;
+ int ret;
if ( !x->x_qtfile ) {
post( "pdp_rec~ : no video recording file is opened !!");
@@ -165,7 +171,7 @@ static void pdp_rec_set_audio(t_pdp_rec *x)
/* set color model : it's hard coded : only one model supported */
static void pdp_rec_set_cmodel(t_pdp_rec *x)
{
- t_int ret;
+ int ret;
if ( !x->x_qtfile ) {
post( "pdp_rec~ : no video recording file is opened !!");
@@ -343,7 +349,7 @@ static void pdp_rec_close(t_pdp_rec *x)
/* open a new video file */
static void pdp_rec_open(t_pdp_rec *x, t_symbol *sfile)
{
- t_int ret=0;
+ int ret=0;
// close previous video file if existing
pdp_rec_close(x);
@@ -435,7 +441,7 @@ static t_int *pdp_rec_perform(t_int *w)
t_pdp_rec *x = (t_pdp_rec *)(w[3]);
int n = (int)(w[4]); // number of samples
t_float fsample;
- t_int isample, i;
+ int isample, i;
if ( x->x_recflag )
{
@@ -474,11 +480,11 @@ static void pdp_rec_process_yv12(t_pdp_rec *x)
{
t_pdp *header = pdp_packet_header(x->x_packet0);
short int *data = (short int *)pdp_packet_data(x->x_packet0);
- t_int i, ret;
- t_int px, py;
+ int i, ret;
+ int px, py;
unsigned short *poy, *pou, *pov;
struct timeval trec;
- t_int nbaudiosamples, nbusecs, nbrecorded;
+ int nbaudiosamples, nbusecs, nbrecorded;
t_float fframerate=0.0;
x->x_vwidth = header->info.image.width;
@@ -645,7 +651,7 @@ t_class *pdp_rec_class;
void *pdp_rec_new(void)
{
- t_int i;
+ int i;
t_pdp_rec *x = (t_pdp_rec *)pd_new(pdp_rec_class);
inlet_new (&x->x_obj, &x->x_obj.ob_pd, gensym ("signal"), gensym ("signal"));
diff --git a/modules/pdp_rev.c b/modules/pdp_rev.c
index 1834447..bfd78dc 100644
--- a/modules/pdp_rev.c
+++ b/modules/pdp_rev.c
@@ -36,19 +36,19 @@ typedef struct pdp_rev_struct
t_float x_f;
t_outlet *x_outlet0;
- t_int x_packet0;
- t_int x_packet1;
- t_int x_dropped;
- t_int x_queue_id;
-
- t_int x_vwidth;
- t_int x_vheight;
- t_int x_vsize;
- t_int x_vgrabtime;
- t_int x_vgrab;
- t_int x_linespace;
- t_int x_vscale;
- t_int x_vcolor;
+ int x_packet0;
+ int x_packet1;
+ int x_dropped;
+ int x_queue_id;
+
+ int x_vwidth;
+ int x_vheight;
+ int x_vsize;
+ int x_vgrabtime;
+ int x_vgrab;
+ int x_linespace;
+ int x_vscale;
+ int x_vcolor;
} t_pdp_rev;
diff --git a/modules/pdp_ripple.c b/modules/pdp_ripple.c
index 07b3bfe..87bf2e6 100644
--- a/modules/pdp_ripple.c
+++ b/modules/pdp_ripple.c
@@ -55,26 +55,26 @@ typedef struct pdp_ripple_struct
t_float x_f;
t_outlet *x_outlet0;
- t_int x_packet0;
- t_int x_packet1;
- t_int x_dropped;
- t_int x_queue_id;
-
- t_int x_vwidth;
- t_int x_vheight;
- t_int x_vsize;
- t_int x_maph;
- t_int x_mapw;
- t_int x_mode;
- t_int x_threshold;
- t_int *x_map;
- t_int *x_map1;
- t_int *x_map2;
- t_int *x_map3;
+ int x_packet0;
+ int x_packet1;
+ int x_dropped;
+ int x_queue_id;
+
+ int x_vwidth;
+ int x_vheight;
+ int x_vsize;
+ int x_maph;
+ int x_mapw;
+ int x_mode;
+ int x_threshold;
+ int *x_map;
+ int *x_map1;
+ int *x_map2;
+ int *x_map3;
signed char *x_vtable;
short int *x_diff;
short int *x_bdata;
- t_int x_snapshot;
+ int x_snapshot;
} t_pdp_ripple;
@@ -105,7 +105,7 @@ static void pdp_ripple_free_ressources(t_pdp_ripple *x)
{
if ( x->x_diff != NULL ) freebytes( x->x_diff, (x->x_vsize + (x->x_vsize>>1))<<1 );
if ( x->x_bdata ) freebytes( x->x_bdata, (( x->x_vsize + (x->x_vsize>>1))<<1));
- if ( x->x_map ) freebytes(x->x_map, x->x_maph*x->x_mapw*3*sizeof(t_int));
+ if ( x->x_map ) freebytes(x->x_map, x->x_maph*x->x_mapw*3*sizeof(int));
if ( x->x_vtable ) freebytes(x->x_vtable, x->x_maph*x->x_mapw*2*sizeof(signed char));
}
@@ -117,7 +117,7 @@ static void pdp_ripple_allocate(t_pdp_ripple *x)
x->x_bdata = (short int *) getbytes((( x->x_vsize + (x->x_vsize>>1))<<1));
x->x_maph = x->x_vheight / 2 + 1;
x->x_mapw = x->x_vwidth / 2 + 1;
- x->x_map = (int *)getbytes(x->x_maph*x->x_mapw*3*sizeof(t_int));
+ x->x_map = (int *)getbytes(x->x_maph*x->x_mapw*3*sizeof(int));
x->x_vtable = (signed char *)getbytes(x->x_maph*x->x_mapw*2*sizeof(signed char));
if( !x->x_map || !x->x_vtable || !x->x_bdata || !x->x_diff ) {
post( "pdp_ripple : severe error : cannot allocate buffers" );
diff --git a/modules/pdp_segsnd~.c b/modules/pdp_segsnd~.c
index 4e997f8..2ffc48a 100644
--- a/modules/pdp_segsnd~.c
+++ b/modules/pdp_segsnd~.c
@@ -40,20 +40,20 @@ typedef struct pdp_segsnd_struct
t_float x_f;
t_outlet *x_outlet0;
- t_int x_packet0;
- t_int x_packet1;
- t_int x_dropped;
- t_int x_queue_id;
+ int x_packet0;
+ int x_packet1;
+ int x_dropped;
+ int x_queue_id;
- t_int x_vwidth;
- t_int x_vheight;
- t_int x_vsize;
+ int x_vwidth;
+ int x_vheight;
+ int x_vsize;
- t_int x_x1; // coordinates of fixed segment
- t_int x_y1;
- t_int x_x2;
- t_int x_y2;
- t_int x_random;
+ int x_x1; // coordinates of fixed segment
+ int x_y1;
+ int x_x2;
+ int x_y2;
+ int x_random;
short int *x_data;
@@ -127,8 +127,8 @@ static void pdp_segsnd_process_yv12(t_pdp_segsnd *x)
short int *data = (short int *)pdp_packet_data(x->x_packet0);
t_pdp *newheader = pdp_packet_header(x->x_packet1);
short int *newdata = (short int *)pdp_packet_data(x->x_packet1);
- t_int ti;
- t_int px, py;
+ int ti;
+ int px, py;
unsigned char y, u, v;
short int *pY, *pU, *pV;
DATA32 *imdata;
@@ -278,8 +278,8 @@ static t_int *pdp_segsnd_perform(t_int *w)
{
t_float *out = (t_float *)(w[1]); // audio generated sound
t_pdp_segsnd *x = (t_pdp_segsnd *)(w[2]);
- t_int n = (int)(w[3]);
- t_int npoints, xi, px, py;
+ int n = (int)(w[3]);
+ int npoints, xi, px, py;
t_float a=0;
// set initial coordinates
diff --git a/modules/pdp_shagadelic.c b/modules/pdp_shagadelic.c
index a40bf62..0c8e8ff 100644
--- a/modules/pdp_shagadelic.c
+++ b/modules/pdp_shagadelic.c
@@ -38,24 +38,24 @@ typedef struct pdp_shagadelic_struct
t_object x_obj;
t_float x_f;
- t_int x_packet0;
- t_int x_packet1;
- t_int x_dropped;
- t_int x_queue_id;
+ int x_packet0;
+ int x_packet1;
+ int x_dropped;
+ int x_queue_id;
t_outlet *x_outlet0;
- t_int x_vwidth;
- t_int x_vheight;
- t_int x_vsize;
+ int x_vwidth;
+ int x_vheight;
+ int x_vsize;
/* shagadelic parameters */
char *x_ripple;
char *x_spiral;
unsigned char x_phase;
- t_int x_rx, x_ry;
- t_int x_bx, x_by;
- t_int x_rvx, x_rvy;
- t_int x_bvx, x_bvy;
+ int x_rx, x_ry;
+ int x_bx, x_by;
+ int x_rvx, x_rvy;
+ int x_bvx, x_bvy;
short int x_mask;
} t_pdp_shagadelic;
@@ -68,7 +68,7 @@ static void pdp_shagadelic_mask(t_pdp_shagadelic *x, t_floatarg fmask )
}
}
-static int pdp_shagadelic_map_from_table(t_pdp_shagadelic *x, t_int px, t_int py, t_int t)
+static int pdp_shagadelic_map_from_table(t_pdp_shagadelic *x, int px, int py, int t)
{
int xd,yd;
@@ -82,7 +82,7 @@ static int pdp_shagadelic_map_from_table(t_pdp_shagadelic *x, t_int px, t_int py
static void pdp_shagadelic_init_tables(t_pdp_shagadelic *x)
{
- t_int px, py, i;
+ int px, py, i;
double xx, yy;
i = 0;
@@ -131,8 +131,8 @@ static void pdp_shagadelic_process_yv12(t_pdp_shagadelic *x)
short int *data = (short int *)pdp_packet_data(x->x_packet0);
t_pdp *newheader = pdp_packet_header(x->x_packet1);
short int *newdata = (short int *)pdp_packet_data(x->x_packet1);
- t_int i;
- t_int px, py;
+ int i;
+ int px, py;
unsigned char y, u, v;
char *p_y, *p_u, *p_v;
diff --git a/modules/pdp_shape.c b/modules/pdp_shape.c
index 6a1ed13..3874fa8 100644
--- a/modules/pdp_shape.c
+++ b/modules/pdp_shape.c
@@ -34,31 +34,31 @@ typedef struct pdp_shape_struct
t_float x_f;
t_outlet *x_outlet0;
- t_int x_packet0;
- t_int x_packet1;
- t_int x_dropped;
- t_int x_queue_id;
+ int x_packet0;
+ int x_packet1;
+ int x_dropped;
+ int x_queue_id;
- t_int x_vwidth;
- t_int x_vheight;
- t_int x_vsize;
+ int x_vwidth;
+ int x_vheight;
+ int x_vsize;
- t_int x_red;
- t_int x_green;
- t_int x_blue;
+ int x_red;
+ int x_green;
+ int x_blue;
- t_int x_cursX;
- t_int x_cursY;
+ int x_cursX;
+ int x_cursY;
- t_int x_colorY; // YUV components of selected color
- t_int x_colorU;
- t_int x_colorV;
+ int x_colorY; // YUV components of selected color
+ int x_colorU;
+ int x_colorV;
- t_int x_tolerance; // tolerance
- t_int x_paint; // paint option
- t_int x_isolate; // isolate option
- t_int x_shape; // drawing shape option
- t_int x_luminosity; // use luminosity or not
+ int x_tolerance; // tolerance
+ int x_paint; // paint option
+ int x_isolate; // isolate option
+ int x_shape; // drawing shape option
+ int x_luminosity; // use luminosity or not
short int *x_bdata;
short int *x_bbdata;
@@ -68,15 +68,15 @@ typedef struct pdp_shape_struct
t_outlet *x_y1; // output y1 coordinate of blob
t_outlet *x_x2; // output x2 coordinate of blob
t_outlet *x_y2; // output y2 coordinate of blob
- t_int x_vx1; // x1 coordinate of blob
- t_int x_vx2; // x1 coordinate of blob
- t_int x_vy1; // x1 coordinate of blob
- t_int x_vy2; // x1 coordinate of blob
+ int x_vx1; // x1 coordinate of blob
+ int x_vx2; // x1 coordinate of blob
+ int x_vy1; // x1 coordinate of blob
+ int x_vy2; // x1 coordinate of blob
} t_pdp_shape;
-static void pdp_shape_allocate(t_pdp_shape *x, t_int newsize)
+static void pdp_shape_allocate(t_pdp_shape *x, int newsize)
{
int i;
@@ -117,28 +117,28 @@ static void pdp_shape_isolate(t_pdp_shape *x, t_floatarg fisolate )
static void pdp_shape_paint(t_pdp_shape *x, t_floatarg fpaint )
{
- if ( ( (t_int)fpaint == 0 ) || ( (t_int)fpaint == 1 ) )
+ if ( ( (int)fpaint == 0 ) || ( (int)fpaint == 1 ) )
{
- x->x_paint = (t_int)fpaint;
+ x->x_paint = (int)fpaint;
}
}
static void pdp_shape_shape(t_pdp_shape *x, t_floatarg fshape )
{
- if ( ( (t_int)fshape == 0 ) || ( (t_int)fshape == 1 ) )
+ if ( ( (int)fshape == 0 ) || ( (int)fshape == 1 ) )
{
- x->x_shape = (t_int)fshape;
+ x->x_shape = (int)fshape;
}
}
static void pdp_shape_do_detect(t_pdp_shape *x, t_floatarg X, t_floatarg Y);
static void pdp_shape_frame_detect(t_pdp_shape *x, t_floatarg X, t_floatarg Y);
-static t_int pdp_shape_check_point(t_pdp_shape *x, t_int nX, t_int nY)
+static int pdp_shape_check_point(t_pdp_shape *x, int nX, int nY)
{
short int *pbY, *pbU, *pbV;
short int y, v, u;
- t_int diff;
+ int diff;
if ( ( nX < 0 ) || ( nX >= x->x_vwidth ) ||
( nY < 0 ) || ( nY >= x->x_vheight ) )
@@ -163,7 +163,7 @@ static t_int pdp_shape_check_point(t_pdp_shape *x, t_int nX, t_int nY)
return 0;
}
-static void pdp_shape_propagate(t_pdp_shape *x, t_int nX, t_int nY)
+static void pdp_shape_propagate(t_pdp_shape *x, int nX, int nY)
{
if ( ( nX >= 0 ) && ( nX < x->x_vwidth ) &&
@@ -181,7 +181,7 @@ static void pdp_shape_do_detect(t_pdp_shape *x, t_floatarg X, t_floatarg Y)
short int *pbbY, *pbbU, *pbbV;
short int nX, nY, y, v, u;
short int *data;
- t_int diff, px, py, inc, maxXY;
+ int diff, px, py, inc, maxXY;
pbY = x->x_bdata;
pbU = (x->x_bdata+x->x_vsize);
@@ -190,14 +190,14 @@ static void pdp_shape_do_detect(t_pdp_shape *x, t_floatarg X, t_floatarg Y)
pbbU = (x->x_bbdata+x->x_vsize);
pbbV = (x->x_bbdata+x->x_vsize+(x->x_vsize>>2));
- if ( ( (t_int)X < 0 ) || ( (t_int)X >= x->x_vwidth ) ||
- ( (t_int)Y < 0 ) || ( (t_int)Y >= x->x_vheight ) )
+ if ( ( (int)X < 0 ) || ( (int)X >= x->x_vwidth ) ||
+ ( (int)Y < 0 ) || ( (int)Y >= x->x_vheight ) )
{
return;
}
- nX = (t_int) X;
- nY = (t_int) Y;
+ nX = (int) X;
+ nY = (int) Y;
*(x->x_checked + nY*x->x_vwidth + nX) = 1;
y = *(pbY+nY*x->x_vwidth+nX);
@@ -239,64 +239,64 @@ static void pdp_shape_do_detect(t_pdp_shape *x, t_floatarg X, t_floatarg Y)
{
for ( inc=0; inc<=maxXY; inc++ )
{
- nX = (t_int) X+inc;
- nY = (t_int) Y;
+ nX = (int) X+inc;
+ nY = (int) Y;
if ( pdp_shape_check_point( x, nX, nY ) )
{
pdp_shape_frame_detect( x, x->x_cursX, x->x_cursY );
return;
}
- nX = (t_int) X-inc;
- nY = (t_int) Y;
+ nX = (int) X-inc;
+ nY = (int) Y;
if ( pdp_shape_check_point( x, nX, nY ) )
{
pdp_shape_frame_detect( x, x->x_cursX, x->x_cursY );
return;
}
- nX = (t_int) X-inc;
- nY = (t_int) Y-inc;
+ nX = (int) X-inc;
+ nY = (int) Y-inc;
if ( pdp_shape_check_point( x, nX, nY ) )
{
pdp_shape_frame_detect( x, x->x_cursX, x->x_cursY );
return;
}
- nX = (t_int) X;
- nY = (t_int) Y-inc;
+ nX = (int) X;
+ nY = (int) Y-inc;
if ( pdp_shape_check_point( x, nX, nY ) )
{
pdp_shape_frame_detect( x, x->x_cursX, x->x_cursY );
return;
}
- nX = (t_int) X+inc;
- nY = (t_int) Y-inc;
+ nX = (int) X+inc;
+ nY = (int) Y-inc;
if ( pdp_shape_check_point( x, nX, nY ) )
{
pdp_shape_frame_detect( x, x->x_cursX, x->x_cursY );
return;
}
- nX = (t_int) X-inc;
- nY = (t_int) Y+inc;
+ nX = (int) X-inc;
+ nY = (int) Y+inc;
if ( pdp_shape_check_point( x, nX, nY ) )
{
pdp_shape_frame_detect( x, x->x_cursX, x->x_cursY );
return;
}
- nX = (t_int) X;
- nY = (t_int) Y+inc;
+ nX = (int) X;
+ nY = (int) Y+inc;
if ( pdp_shape_check_point( x, nX, nY ) )
{
pdp_shape_frame_detect( x, x->x_cursX, x->x_cursY );
return;
}
- nX = (t_int) X+inc;
- nY = (t_int) Y+inc;
+ nX = (int) X+inc;
+ nY = (int) Y+inc;
if ( pdp_shape_check_point( x, nX, nY ) )
{
pdp_shape_frame_detect( x, x->x_cursX, x->x_cursY );
@@ -326,46 +326,46 @@ static void pdp_shape_do_detect(t_pdp_shape *x, t_floatarg X, t_floatarg Y)
}
}
- nX = (t_int) X+1;
- nY = (t_int) Y;
+ nX = (int) X+1;
+ nY = (int) Y;
pdp_shape_propagate(x, nX, nY);
- nX = (t_int) X-1;
- nY = (t_int) Y;
+ nX = (int) X-1;
+ nY = (int) Y;
pdp_shape_propagate(x, nX, nY);
- nX = (t_int) X-1;
- nY = (t_int) Y-1;
+ nX = (int) X-1;
+ nY = (int) Y-1;
pdp_shape_propagate(x, nX, nY);
- nX = (t_int) X;
- nY = (t_int) Y-1;
+ nX = (int) X;
+ nY = (int) Y-1;
pdp_shape_propagate(x, nX, nY);
- nX = (t_int) X+1;
- nY = (t_int) Y-1;
+ nX = (int) X+1;
+ nY = (int) Y-1;
pdp_shape_propagate(x, nX, nY);
- nX = (t_int) X-1;
- nY = (t_int) Y+1;
+ nX = (int) X-1;
+ nY = (int) Y+1;
pdp_shape_propagate(x, nX, nY);
- nX = (t_int) X;
- nY = (t_int) Y+1;
+ nX = (int) X;
+ nY = (int) Y+1;
pdp_shape_propagate(x, nX, nY);
- nX = (t_int) X+1;
- nY = (t_int) Y+1;
+ nX = (int) X+1;
+ nY = (int) Y+1;
pdp_shape_propagate(x, nX, nY);
}
static void pdp_shape_pick(t_pdp_shape *x, t_floatarg X, t_floatarg Y)
{
- t_int y,u,v;
+ int y,u,v;
- x->x_cursX = (t_int) (X*(t_float)x->x_vwidth);
- x->x_cursY = (t_int) (Y*(t_float)x->x_vheight);
+ x->x_cursX = (int) (X*(t_float)x->x_vwidth);
+ x->x_cursY = (int) (Y*(t_float)x->x_vheight);
// post( "pdp_shape : pick color at : %d,%d", x->x_cursX, x->x_cursY );
if ( ( x->x_cursX >= 0 ) && ( x->x_cursX < x->x_vwidth )
&& ( x->x_cursY >= 0 ) && ( x->x_cursY < x->x_vheight ) )
@@ -388,7 +388,7 @@ static void pdp_shape_frame_detect(t_pdp_shape *x, t_floatarg X, t_floatarg Y)
{
if ( x->x_bdata == NULL ) return;
- // post( "pdp_shape : detect %d %d", (t_int)x->x_cursX, (t_int)x->x_cursY );
+ // post( "pdp_shape : detect %d %d", (int)x->x_cursX, (int)x->x_cursY );
x->x_vx1 = -1;
x->x_vx2 = -1;
x->x_vy1 = -1;
@@ -404,10 +404,10 @@ static void pdp_shape_frame_detect(t_pdp_shape *x, t_floatarg X, t_floatarg Y)
static void pdp_shape_detect(t_pdp_shape *x, t_floatarg X, t_floatarg Y)
{
- t_int wX, wY;
+ int wX, wY;
- wX = (t_int) (X*(t_float)x->x_vwidth);
- wY = (t_int) (Y*(t_float)x->x_vheight);
+ wX = (int) (X*(t_float)x->x_vwidth);
+ wY = (int) (Y*(t_float)x->x_vheight);
// post( "pdp_shape : detect %d %d", wX, wY );
if ( (wX<0) || (wX>x->x_vwidth) )
{
@@ -445,8 +445,8 @@ static void pdp_shape_process_yv12(t_pdp_shape *x)
short int *pbbY, *pbbU, *pbbV;
/* allocate all ressources */
- if ( ((t_int)header->info.image.width != x->x_vwidth ) ||
- ((t_int)header->info.image.height != x->x_vheight ) )
+ if ( ((int)header->info.image.width != x->x_vwidth ) ||
+ ((int)header->info.image.height != x->x_vheight ) )
{
pdp_shape_allocate(x, header->info.image.width*header->info.image.height );
post( "pdp_shape : reallocating buffers" );
diff --git a/modules/pdp_simura.c b/modules/pdp_simura.c
index 3bae7a8..4ef4fef 100644
--- a/modules/pdp_simura.c
+++ b/modules/pdp_simura.c
@@ -36,13 +36,13 @@ typedef struct pdp_simura_struct
t_float x_f;
t_outlet *x_outlet0;
- t_int x_packet0;
- t_int x_packet1;
- t_int x_dropped;
- t_int x_queue_id;
+ int x_packet0;
+ int x_packet1;
+ int x_dropped;
+ int x_queue_id;
unsigned short int x_color; /* color for the mask */
- t_int x_mode; /* mirror mode */
+ int x_mode; /* mirror mode */
} t_pdp_simura;
diff --git a/modules/pdp_smuck.c b/modules/pdp_smuck.c
index 4737c9f..9e77a3c 100644
--- a/modules/pdp_smuck.c
+++ b/modules/pdp_smuck.c
@@ -42,16 +42,16 @@ typedef struct pdp_smuck_struct
t_float x_f;
t_outlet *x_outlet0;
- t_int x_packet0;
- t_int x_packet1;
- t_int x_dropped;
- t_int x_queue_id;
+ int x_packet0;
+ int x_packet1;
+ int x_dropped;
+ int x_queue_id;
- t_int x_vwidth;
- t_int x_vheight;
- t_int x_vsize;
+ int x_vwidth;
+ int x_vheight;
+ int x_vsize;
- t_int x_n; // transform number
+ int x_n; // transform number
} t_pdp_smuck;
@@ -79,7 +79,7 @@ static void pdp_smuck_process_yv12(t_pdp_smuck *x)
short int *data = (short int *)pdp_packet_data(x->x_packet0);
t_pdp *newheader = pdp_packet_header(x->x_packet1);
short int *newdata = (short int *)pdp_packet_data(x->x_packet1);
- t_int px, py, pxx, pyy;
+ int px, py, pxx, pyy;
short int *pnY, *pnU, *pnV;
/* allocate all ressources */
diff --git a/modules/pdp_spigot.c b/modules/pdp_spigot.c
index 4fd5d6a..376aeb8 100644
--- a/modules/pdp_spigot.c
+++ b/modules/pdp_spigot.c
@@ -35,12 +35,12 @@ typedef struct pdp_spigot_struct
t_outlet *x_outlet0;
t_outlet *x_outlet1;
- t_int x_vwidth;
- t_int x_vheight;
- t_int x_vsize;
+ int x_vwidth;
+ int x_vheight;
+ int x_vsize;
- t_int x_packet0;
- t_int x_toggle;
+ int x_packet0;
+ int x_toggle;
} t_pdp_spigot;
@@ -58,7 +58,7 @@ static void pdp_spigot_process_packet(t_pdp_spigot *x)
short int *data = (short int *)pdp_packet_data(x->x_packet0);
t_pdp *newheader = 0;
short int *newdata = 0;
- t_int newpacket = -1, i;
+ int newpacket = -1, i;
x->x_vwidth = header->info.image.width;
x->x_vheight = header->info.image.height;
diff --git a/modules/pdp_spiral.c b/modules/pdp_spiral.c
index a2430b9..c40d5ec 100644
--- a/modules/pdp_spiral.c
+++ b/modules/pdp_spiral.c
@@ -83,29 +83,29 @@ typedef struct pdp_spiral_struct
t_float x_f;
t_outlet *x_outlet0;
- t_int x_packet0;
- t_int x_packet1;
- t_int x_dropped;
- t_int x_queue_id;
-
- t_int x_vwidth;
- t_int x_vheight;
- t_int x_vsize;
+ int x_packet0;
+ int x_packet1;
+ int x_dropped;
+ int x_queue_id;
+
+ int x_vwidth;
+ int x_vheight;
+ int x_vsize;
short int *x_buffer;
short int *x_planetable[PLANES];
- t_int x_plane;
- t_int *x_depthmap;
- t_int x_mode;
- t_int x_focus_x;
- t_int x_focus_y;
- t_int x_cursor_state;
- t_int x_cursor_local;
- t_int x_toggle_xor;
- t_int x_animate_focus;
- t_int x_focus_interval;
- t_int x_focus_counter;
+ int x_plane;
+ int *x_depthmap;
+ int x_mode;
+ int x_focus_x;
+ int x_focus_y;
+ int x_cursor_state;
+ int x_cursor_local;
+ int x_toggle_xor;
+ int x_animate_focus;
+ int x_focus_interval;
+ int x_focus_counter;
unsigned int x_depth_shift; // Cheesy way to adjust intensity
- t_int x_focus_radius;
+ int x_focus_radius;
double x_focus_degree;
double x_focus_increment;
@@ -113,7 +113,7 @@ typedef struct pdp_spiral_struct
static void pdp_spiral_define_waves(t_pdp_spiral *x)
{
- t_int i, w, iw;
+ int i, w, iw;
double sinus_val = M_PI/2.0;
if (NULL == the_wave_table) return;
@@ -156,10 +156,10 @@ static void pdp_spiral_define_waves(t_pdp_spiral *x)
void pdp_spiral_create_map(t_pdp_spiral *x)
{
- t_int px, py, rel_x, rel_y, yy;
+ int px, py, rel_x, rel_y, yy;
float x_ratio;
float y_ratio;
- t_int v, i, wave_offset;
+ int v, i, wave_offset;
if ( x->x_vsize == -1 )
{
@@ -284,7 +284,7 @@ static void pdp_spiral_allocate(t_pdp_spiral *x)
x->x_planetable[i] = &x->x_buffer[ ( ( x->x_vsize + x->x_vsize>>1 ) << 1 ) * i];
}
- x->x_depthmap = (t_int*) malloc ( x->x_vsize * sizeof ( t_int ) );
+ x->x_depthmap = (int*) malloc ( x->x_vsize * sizeof ( int ) );
if ( !the_wave_table || !x->x_buffer || !x->x_depthmap )
{
diff --git a/modules/pdp_spotlight.c b/modules/pdp_spotlight.c
index e294642..93cbd1d 100644
--- a/modules/pdp_spotlight.c
+++ b/modules/pdp_spotlight.c
@@ -37,22 +37,22 @@ typedef struct pdp_spotlight_struct
t_float x_f;
t_outlet *x_outlet0;
- t_int x_packet0;
- t_int x_packet1;
- t_int x_dropped;
- t_int x_queue_id;
-
- t_int x_vwidth;
- t_int x_vheight;
- t_int x_vsize;
- t_int x_cx; // coordinates of lens center
- t_int x_cy; // coordinates of lens center
- t_int x_ssize; // width of the spotlight
+ int x_packet0;
+ int x_packet1;
+ int x_dropped;
+ int x_queue_id;
+
+ int x_vwidth;
+ int x_vheight;
+ int x_vsize;
+ int x_cx; // coordinates of lens center
+ int x_cy; // coordinates of lens center
+ int x_ssize; // width of the spotlight
t_float x_strength; // strength of the light (0<=strength<=1)
- t_int x_colorR; // red component of the color
- t_int x_colorG; // green component of the color
- t_int x_colorB; // blue component of the color
+ int x_colorR; // red component of the color
+ int x_colorG; // green component of the color
+ int x_colorB; // blue component of the color
} t_pdp_spotlight;
diff --git a/modules/pdp_text.c b/modules/pdp_text.c
index 5d2d633..d14dbfa 100644
--- a/modules/pdp_text.c
+++ b/modules/pdp_text.c
@@ -43,29 +43,29 @@ typedef struct pdp_text_struct
t_object x_obj;
t_float x_f;
- t_int x_packet0;
- t_int x_packet1;
- t_int x_dropped;
- t_int x_queue_id;
+ int x_packet0;
+ int x_packet1;
+ int x_dropped;
+ int x_queue_id;
t_outlet *x_outlet0;
- t_int x_vwidth;
- t_int x_vheight;
- t_int x_vsize;
+ int x_vwidth;
+ int x_vheight;
+ int x_vsize;
char **x_text_array;
- t_int *x_xoffsets;
- t_int *x_yoffsets;
- t_int *x_r;
- t_int *x_g;
- t_int *x_b;
+ int *x_xoffsets;
+ int *x_yoffsets;
+ int *x_r;
+ int *x_g;
+ int *x_b;
t_float *x_angle;
t_float x_alpha;
- t_int *x_scroll;
+ int *x_scroll;
- t_int x_nbtexts;
- t_int x_current;
- t_int x_capacity;
+ int x_nbtexts;
+ int x_current;
+ int x_capacity;
/* imlib data */
Imlib_Image x_image;
@@ -78,7 +78,7 @@ static void pdp_text_add(t_pdp_text *x, t_symbol *s, int argc, t_atom *argv)
{
char *pname;
char *pdname;
- t_int len;
+ int len;
if ( x->x_nbtexts >= x->x_capacity )
{
@@ -106,8 +106,8 @@ static void pdp_text_add(t_pdp_text *x, t_symbol *s, int argc, t_atom *argv)
{
if ( (*pname=='%') && ( isdigit(*(pname+1)) || (*(pname+1)=='%') ) )
{
- t_int ivalue;
- t_int ndigits;
+ int ivalue;
+ int ndigits;
char *piname;
ndigits=0;
@@ -263,7 +263,7 @@ static void pdp_text_clear(t_pdp_text *x )
static void pdp_text_delete(t_pdp_text *x, t_floatarg fnum )
{
- t_int i;
+ int i;
char *lostword;
if ( ( fnum>0 ) && ( fnum<=x->x_nbtexts ) )
@@ -288,27 +288,27 @@ static void pdp_text_delete(t_pdp_text *x, t_floatarg fnum )
static void pdp_text_resize(t_pdp_text *x, t_floatarg fnewsize )
{
char **text_array;
- t_int *xoffsets;
- t_int *yoffsets;
- t_int *r;
- t_int *g;
- t_int *b;
+ int *xoffsets;
+ int *yoffsets;
+ int *r;
+ int *g;
+ int *b;
t_float *angle;
- t_int *scroll;
+ int *scroll;
- t_int i, csize;
+ int i, csize;
if ( (int) fnewsize<=0 ) return;
// allocate new structures
text_array = (char**) getbytes( fnewsize*sizeof(char*) );
- xoffsets = (t_int*) getbytes( fnewsize*sizeof(t_int) );
- yoffsets = (t_int*) getbytes( fnewsize*sizeof(t_int) );
- r = (t_int*) getbytes( fnewsize*sizeof(t_int) );
- g = (t_int*) getbytes( fnewsize*sizeof(t_int) );
- b = (t_int*) getbytes( fnewsize*sizeof(t_int) );
+ xoffsets = (int*) getbytes( fnewsize*sizeof(int) );
+ yoffsets = (int*) getbytes( fnewsize*sizeof(int) );
+ r = (int*) getbytes( fnewsize*sizeof(int) );
+ g = (int*) getbytes( fnewsize*sizeof(int) );
+ b = (int*) getbytes( fnewsize*sizeof(int) );
angle = (t_float*) getbytes( fnewsize*sizeof(t_float) );
- scroll = (t_int*) getbytes( fnewsize*sizeof(t_int) );
+ scroll = (int*) getbytes( fnewsize*sizeof(int) );
for ( i=0; i<fnewsize; i++ )
@@ -343,13 +343,13 @@ static void pdp_text_resize(t_pdp_text *x, t_floatarg fnewsize )
// free old structures
if ( x->x_text_array ) freebytes( x->x_text_array, x->x_capacity*sizeof(char*) );
- if ( x->x_xoffsets ) freebytes( x->x_xoffsets, x->x_capacity*sizeof(t_int) );
- if ( x->x_yoffsets ) freebytes( x->x_yoffsets, x->x_capacity*sizeof(t_int) );
- if ( x->x_r ) freebytes( x->x_r, x->x_capacity*sizeof(t_int) );
- if ( x->x_g ) freebytes( x->x_g, x->x_capacity*sizeof(t_int) );
- if ( x->x_b ) freebytes( x->x_b, x->x_capacity*sizeof(t_int) );
+ if ( x->x_xoffsets ) freebytes( x->x_xoffsets, x->x_capacity*sizeof(int) );
+ if ( x->x_yoffsets ) freebytes( x->x_yoffsets, x->x_capacity*sizeof(int) );
+ if ( x->x_r ) freebytes( x->x_r, x->x_capacity*sizeof(int) );
+ if ( x->x_g ) freebytes( x->x_g, x->x_capacity*sizeof(int) );
+ if ( x->x_b ) freebytes( x->x_b, x->x_capacity*sizeof(int) );
if ( x->x_angle) freebytes( x->x_angle, x->x_capacity*sizeof(t_float) );
- if ( x->x_scroll) freebytes( x->x_scroll, x->x_capacity*sizeof(t_int) );
+ if ( x->x_scroll) freebytes( x->x_scroll, x->x_capacity*sizeof(int) );
// set new structures
x->x_text_array = text_array;
@@ -409,8 +409,8 @@ static void pdp_text_process_yv12(t_pdp_text *x)
short int *data = (short int *)pdp_packet_data(x->x_packet0);
t_pdp *newheader = pdp_packet_header(x->x_packet1);
short int *newdata = (short int *)pdp_packet_data(x->x_packet1);
- t_int ti;
- t_int px, py;
+ int ti;
+ int px, py;
unsigned char y, u, v;
DATA32 *imdata;
DATA32 bgcolor;
@@ -580,13 +580,13 @@ void *pdp_text_new(void)
x->x_text_array = (char**) getbytes( x->x_capacity*sizeof(char*) );
- x->x_xoffsets = (t_int*) getbytes( x->x_capacity*sizeof(t_int) );
- x->x_yoffsets = (t_int*) getbytes( x->x_capacity*sizeof(t_int) );
- x->x_r = (t_int*) getbytes( x->x_capacity*sizeof(t_int) );
- x->x_g = (t_int*) getbytes( x->x_capacity*sizeof(t_int) );
- x->x_b = (t_int*) getbytes( x->x_capacity*sizeof(t_int) );
+ x->x_xoffsets = (int*) getbytes( x->x_capacity*sizeof(int) );
+ x->x_yoffsets = (int*) getbytes( x->x_capacity*sizeof(int) );
+ x->x_r = (int*) getbytes( x->x_capacity*sizeof(int) );
+ x->x_g = (int*) getbytes( x->x_capacity*sizeof(int) );
+ x->x_b = (int*) getbytes( x->x_capacity*sizeof(int) );
x->x_angle = (t_float*) getbytes( x->x_capacity*sizeof(t_float) );
- x->x_scroll = (t_int*) getbytes( x->x_capacity*sizeof(t_int) );
+ x->x_scroll = (int*) getbytes( x->x_capacity*sizeof(int) );
for ( i=0; i<x->x_capacity; i++ )
{
diff --git a/modules/pdp_theonice~.c b/modules/pdp_theonice~.c
index af022ca..6299fe6 100644
--- a/modules/pdp_theonice~.c
+++ b/modules/pdp_theonice~.c
@@ -78,21 +78,21 @@ typedef struct pdp_theonice_struct
t_object x_obj;
t_float x_f;
- t_int x_packet0;
- t_int x_packet1;
- t_int x_dropped;
- t_int x_queue_id;
+ int x_packet0;
+ int x_packet1;
+ int x_dropped;
+ int x_queue_id;
- t_int x_vwidth;
- t_int x_tvwidth; // theora 16 pixels aligned width value
- t_int x_vheight;
- t_int x_tvheight; // theora 16 pixels aligned height value
- t_int x_vsize;
+ int x_vwidth;
+ int x_tvwidth; // theora 16 pixels aligned width value
+ int x_vheight;
+ int x_tvheight; // theora 16 pixels aligned height value
+ int x_vsize;
pthread_t x_connectchild; // thread used for connecting to a stream
int x_socketfd; // connection socket
- t_int x_streaming; // streaming on : connected and all
- t_int x_pstreaming; // previous state
+ int x_streaming; // streaming on : connected and all
+ int x_pstreaming; // previous state
char *x_passwd; // password
char x_title[MAX_COMMENT_LENGTH]; // title of the stream
char x_url[MAX_COMMENT_LENGTH]; // url of the stream
@@ -103,25 +103,25 @@ typedef struct pdp_theonice_struct
char x_date[MAX_COMMENT_LENGTH]; // starting system date
char x_hostname[MAX_COMMENT_LENGTH]; // name or IP of host to connect to
char x_mountpoint[MAX_COMMENT_LENGTH]; // mountpoint
- t_int x_port; // port number
- t_int x_public; // publish on www.oggcast.com
- t_int x_framerate;
- t_int x_mframerate; // measured framerate
- t_int x_pmframerate; // previous state
- t_int x_einit;
- t_int x_frameswritten;
- t_int x_pframeswritten;
- t_int x_frameslate;
- t_int x_nbframes_dropped;
- t_int x_pnbframes_dropped;
- t_int x_frames;
+ int x_port; // port number
+ int x_public; // publish on www.oggcast.com
+ int x_framerate;
+ int x_mframerate; // measured framerate
+ int x_pmframerate; // previous state
+ int x_einit;
+ int x_frameswritten;
+ int x_pframeswritten;
+ int x_frameslate;
+ int x_nbframes_dropped;
+ int x_pnbframes_dropped;
+ int x_frames;
t_float x_maxdrift; /* maximum delay between audio and video */
struct timeval x_tstart;
struct timeval x_tzero;
struct timeval x_tcurrent;
struct timeval x_tprevstream;
- t_int x_cursec; // current second
- t_int x_secondcount; // number of frames emitted in the current second
+ int x_cursec; // current second
+ int x_secondcount; // number of frames emitted in the current second
/* vorbis/theora structures */
ogg_page x_ogg_page; // ogg page for headers
@@ -138,14 +138,14 @@ typedef struct pdp_theonice_struct
vorbis_block x_vorbis_block; // vorbis block
vorbis_comment x_vorbis_comment; // vorbis comment
yuv_buffer x_yuvbuffer; // yuv buffer
- t_int x_eos; // end of stream
+ int x_eos; // end of stream
- t_int x_akbps; // audio bit rate
- t_int x_vkbps; // video bit rate
+ int x_akbps; // audio bit rate
+ int x_vkbps; // video bit rate
t_float x_aquality; // audio quality
- t_int x_vquality; // video quality
- t_int x_abytesout; // audio bytes written
- t_int x_vbytesout; // video bytes written
+ int x_vquality; // video quality
+ int x_abytesout; // audio bytes written
+ int x_vbytesout; // video bytes written
double x_audiotime; // audio stream time
double x_paudiotime; // previous value
double x_videotime; // video stream time
@@ -153,10 +153,10 @@ typedef struct pdp_theonice_struct
/* audio structures */
t_float x_audio_buf[DEFAULT_CHANNELS][MAX_AUDIO_PACKET_SIZE]; // buffer for incoming audio
- t_int x_audioin_position; // writing position for incoming audio
- t_int x_channels; // audio channels
- t_int x_samplerate; // audio sample rate
- t_int x_bits; // audio bits
+ int x_audioin_position; // writing position for incoming audio
+ int x_channels; // audio channels
+ int x_samplerate; // audio sample rate
+ int x_bits; // audio bits
t_outlet *x_outlet_streaming; // indicates the action of streaming
t_outlet *x_outlet_nbframes; // number of frames emitted
@@ -181,9 +181,9 @@ static void pdp_theonice_allocate(t_pdp_theonice *x)
x->x_yuvbuffer.uv_height=x->x_vheight>>1;
x->x_yuvbuffer.uv_stride=x->x_vwidth>>1;
- x->x_yuvbuffer.y = (char *)malloc( x->x_yuvbuffer.y_width * x->x_yuvbuffer.y_height );
- x->x_yuvbuffer.u = (char *)malloc( x->x_yuvbuffer.uv_width * x->x_yuvbuffer.uv_height );
- x->x_yuvbuffer.v = (char *)malloc( x->x_yuvbuffer.uv_width * x->x_yuvbuffer.uv_height );
+ x->x_yuvbuffer.y = (unsigned char *)malloc( x->x_yuvbuffer.y_width * x->x_yuvbuffer.y_height );
+ x->x_yuvbuffer.u = (unsigned char *)malloc( x->x_yuvbuffer.uv_width * x->x_yuvbuffer.uv_height );
+ x->x_yuvbuffer.v = (unsigned char *)malloc( x->x_yuvbuffer.uv_width * x->x_yuvbuffer.uv_height );
}
/* free internal ressources */
@@ -197,7 +197,7 @@ static void pdp_theonice_free_ressources(t_pdp_theonice *x)
/* initialize the encoder */
static void pdp_theonice_init_encoder(t_pdp_theonice *x)
{
- t_int ret;
+ int ret;
x->x_einit=0;
@@ -271,7 +271,7 @@ static void pdp_theonice_init_encoder(t_pdp_theonice *x)
/* terminate the encoding process */
static void pdp_theonice_shutdown_encoder(t_pdp_theonice *x)
{
- t_int ret;
+ int ret;
if ( x->x_streaming )
{
@@ -336,7 +336,7 @@ static void pdp_theonice_disconnect(t_pdp_theonice *x)
static int pdp_theonice_write_headers(t_pdp_theonice *x)
{
- t_int ret;
+ int ret;
ogg_packet aheader, aheadercomm, aheadercode;
if ( !x->x_einit )
@@ -466,7 +466,7 @@ static int pdp_theonice_write_headers(t_pdp_theonice *x)
static int pdp_theonice_start(t_pdp_theonice *x)
{
time_t start_t;
- t_int ret;
+ int ret;
if ( gettimeofday(&x->x_tstart, NULL) == -1)
{
@@ -508,7 +508,7 @@ static void pdp_theonice_url(t_pdp_theonice *x, t_symbol *url)
/* set title */
static void pdp_theonice_title(t_pdp_theonice *x, t_symbol *s, int argc, t_atom *argv)
{
- t_int i;
+ int i;
strcpy( x->x_title, "" );
for ( i=0; i<argc; i++ )
@@ -520,7 +520,7 @@ static void pdp_theonice_title(t_pdp_theonice *x, t_symbol *s, int argc, t_atom
}
if (argv[i].a_type == A_FLOAT)
{
- sprintf( x->x_title, "%s %d", x->x_title, (t_int)argv[i].a_w.w_float );
+ sprintf( x->x_title, "%s %d", x->x_title, (int)argv[i].a_w.w_float );
}
}
sprintf( x->x_title, "%s", x->x_title+1 );
@@ -530,7 +530,7 @@ static void pdp_theonice_title(t_pdp_theonice *x, t_symbol *s, int argc, t_atom
/* set artist */
static void pdp_theonice_artist(t_pdp_theonice *x, t_symbol *s, int argc, t_atom *argv)
{
- t_int i;
+ int i;
strcpy( x->x_artist, "" );
for ( i=0; i<argc; i++ )
@@ -542,7 +542,7 @@ static void pdp_theonice_artist(t_pdp_theonice *x, t_symbol *s, int argc, t_atom
}
if (argv[i].a_type == A_FLOAT)
{
- sprintf( x->x_artist, "%s %d", x->x_artist, (t_int)argv[i].a_w.w_float );
+ sprintf( x->x_artist, "%s %d", x->x_artist, (int)argv[i].a_w.w_float );
}
}
sprintf( x->x_artist, "%s", x->x_artist+1 );
@@ -552,7 +552,7 @@ static void pdp_theonice_artist(t_pdp_theonice *x, t_symbol *s, int argc, t_atom
/* set description */
static void pdp_theonice_description(t_pdp_theonice *x, t_symbol *s, int argc, t_atom *argv)
{
- t_int i;
+ int i;
strcpy( x->x_description, "" );
for ( i=0; i<argc; i++ )
@@ -564,7 +564,7 @@ static void pdp_theonice_description(t_pdp_theonice *x, t_symbol *s, int argc, t
}
if (argv[i].a_type == A_FLOAT)
{
- sprintf( x->x_description, "%s %d", x->x_description, (t_int)argv[i].a_w.w_float );
+ sprintf( x->x_description, "%s %d", x->x_description, (int)argv[i].a_w.w_float );
}
}
sprintf( x->x_description, "%s", x->x_description+1 );
@@ -574,7 +574,7 @@ static void pdp_theonice_description(t_pdp_theonice *x, t_symbol *s, int argc, t
/* set genre */
static void pdp_theonice_genre(t_pdp_theonice *x, t_symbol *s, int argc, t_atom *argv)
{
- t_int i;
+ int i;
strcpy( x->x_genre, "" );
for ( i=0; i<argc; i++ )
@@ -586,7 +586,7 @@ static void pdp_theonice_genre(t_pdp_theonice *x, t_symbol *s, int argc, t_atom
}
if (argv[i].a_type == A_FLOAT)
{
- sprintf( x->x_genre, "%s %d", x->x_genre, (t_int)argv[i].a_w.w_float );
+ sprintf( x->x_genre, "%s %d", x->x_genre, (int)argv[i].a_w.w_float );
}
}
sprintf( x->x_genre, "%s", x->x_genre+1 );
@@ -627,9 +627,9 @@ char *pdp_theonice_base64_encode(char *data)
return result;
}
-static void sendsock( t_int sockfd, char *buf, size_t buflen )
+static void sendsock( int sockfd, char *buf, size_t buflen )
{
- if ( send( sockfd, buf, buflen, MSG_NOSIGNAL ) != (t_int)buflen )
+ if ( send( sockfd, buf, buflen, MSG_NOSIGNAL ) != (int)buflen )
{
post( "pdp_theonice~ : could not send message to the server" );
post( "pdp_theonice~ : message : %s", buf );
@@ -645,7 +645,7 @@ static void *pdp_theonice_do_connect(void *tdata)
unsigned int len;
fd_set fdset;
struct timeval tv;
- t_int sockfd, ret;
+ int sockfd, ret;
struct sockaddr_in sinfo;
struct hostent *hp;
t_pdp_theonice *x;
@@ -783,7 +783,7 @@ static void *pdp_theonice_do_connect(void *tdata)
/* launch a connection thread */
static void pdp_theonice_connect(t_pdp_theonice *x, t_symbol *shost, t_symbol *smountpoint, t_floatarg fport)
{
- t_int ret=0;
+ int ret=0;
pthread_attr_t connect_child_attr;
// check parameters
@@ -797,14 +797,14 @@ static void pdp_theonice_connect(t_pdp_theonice *x, t_symbol *shost, t_symbol *s
strcpy( x->x_hostname, shost->s_name);
}
- if ( ( (t_int)fport < 0 ) || ( (t_int)fport > 65535 ) )
+ if ( ( (int)fport < 0 ) || ( (int)fport > 65535 ) )
{
post("pdp_theonice~ : wrong port number." );
return;
}
else
{
- x->x_port = (t_int)fport;
+ x->x_port = (int)fport;
}
strcpy( x->x_mountpoint, smountpoint->s_name );
@@ -845,61 +845,61 @@ static void pdp_theonice_connect(t_pdp_theonice *x, t_symbol *shost, t_symbol *s
/* set video bitrate */
static void pdp_theonice_vbitrate(t_pdp_theonice *x, t_floatarg vbitrate )
{
- if ( ( (t_int) vbitrate < MIN_VIDEO_BITRATE ) || ( (t_int) vbitrate > MAX_VIDEO_BITRATE ) )
+ if ( ( (int) vbitrate < MIN_VIDEO_BITRATE ) || ( (int) vbitrate > MAX_VIDEO_BITRATE ) )
{
post( "pdp_theonice~ : wrong video bitrate %d : should be in [%d,%d] kbps",
- (t_int) vbitrate, MIN_VIDEO_BITRATE, MAX_VIDEO_BITRATE );
+ (int) vbitrate, MIN_VIDEO_BITRATE, MAX_VIDEO_BITRATE );
return;
}
- x->x_vkbps = (t_int) vbitrate;
+ x->x_vkbps = (int) vbitrate;
}
/* set audio bitrate */
static void pdp_theonice_abitrate(t_pdp_theonice *x, t_floatarg abitrate )
{
- if ( ( (t_int) abitrate < MIN_AUDIO_BITRATE ) || ( (t_int) abitrate > MAX_AUDIO_BITRATE ) )
+ if ( ( (int) abitrate < MIN_AUDIO_BITRATE ) || ( (int) abitrate > MAX_AUDIO_BITRATE ) )
{
post( "pdp_theonice~ : wrong audio bitrate %d : should be in [%d,%d] kbps",
- (t_int) abitrate, MIN_AUDIO_BITRATE, MAX_AUDIO_BITRATE );
+ (int) abitrate, MIN_AUDIO_BITRATE, MAX_AUDIO_BITRATE );
return;
}
- x->x_akbps = (t_int) abitrate;
+ x->x_akbps = (int) abitrate;
}
/* set video quality */
static void pdp_theonice_vquality(t_pdp_theonice *x, t_floatarg vquality )
{
- if ( ( (t_int) vquality < MIN_VIDEO_QUALITY ) || ( (t_int) vquality > MAX_VIDEO_QUALITY ) )
+ if ( ( (int) vquality < MIN_VIDEO_QUALITY ) || ( (int) vquality > MAX_VIDEO_QUALITY ) )
{
post( "pdp_theonice~ : wrong video quality %d : should be in [%d,%d]",
- (t_int) vquality, MIN_VIDEO_QUALITY, MAX_VIDEO_QUALITY );
+ (int) vquality, MIN_VIDEO_QUALITY, MAX_VIDEO_QUALITY );
return;
}
- x->x_vquality = (t_int) vquality;
+ x->x_vquality = (int) vquality;
}
/* set audio quality */
static void pdp_theonice_aquality(t_pdp_theonice *x, t_floatarg aquality )
{
- if ( ( (t_int) aquality < MIN_AUDIO_QUALITY ) || ( (t_int) aquality > MAX_AUDIO_QUALITY ) )
+ if ( ( (int) aquality < MIN_AUDIO_QUALITY ) || ( (int) aquality > MAX_AUDIO_QUALITY ) )
{
post( "pdp_theonice~ : wrong audio quality %d : should be in [%d,%d]",
- (t_int) aquality, MIN_AUDIO_QUALITY, MAX_AUDIO_QUALITY );
+ (int) aquality, MIN_AUDIO_QUALITY, MAX_AUDIO_QUALITY );
return;
}
- x->x_aquality = (t_int) aquality;
+ x->x_aquality = (int) aquality;
}
/* set framerate */
static void pdp_theonice_framerate(t_pdp_theonice *x, t_floatarg fframerate )
{
- if ( ( (t_int) fframerate < MIN_FRAMERATE ) || ( (t_int) fframerate > MAX_FRAMERATE ) )
+ if ( ( (int) fframerate < MIN_FRAMERATE ) || ( (int) fframerate > MAX_FRAMERATE ) )
{
post( "pdp_theonice~ : wrong framerate %d : should be in [%d,%d]",
- (t_int) fframerate, MIN_FRAMERATE, MAX_FRAMERATE );
+ (int) fframerate, MIN_FRAMERATE, MAX_FRAMERATE );
return;
}
- x->x_framerate = (t_int) fframerate;
+ x->x_framerate = (int) fframerate;
}
/* store audio data in PCM format in a buffer for now */
@@ -910,7 +910,7 @@ static t_int *pdp_theonice_perform(t_int *w)
t_pdp_theonice *x = (t_pdp_theonice *)(w[3]);
int n = (int)(w[4]); // number of samples
t_float fsample;
- t_int isample, i;
+ int isample, i;
if ( x->x_streaming )
{
@@ -976,14 +976,14 @@ static void pdp_theonice_process_yv12(t_pdp_theonice *x)
{
t_pdp *header = pdp_packet_header(x->x_packet0);
unsigned char *data = (unsigned char *)pdp_packet_data(x->x_packet0);
- t_int i, ret;
- t_int px, py;
- char *pY, *pU, *pV;
+ int i, ret;
+ int px, py;
+ unsigned char *pY, *pU, *pV;
struct timeval tstream;
struct timeval etime;
- t_int nbaudiosamples, nbusecs, nbsamples;
+ int nbaudiosamples, nbusecs, nbsamples;
t_float fframerate=0.0;
- t_int ttime, atime;
+ int ttime, atime;
if ( ( (int)(header->info.image.width) != x->x_vwidth ) ||
( (int)(header->info.image.height) != x->x_vheight ) )
@@ -1231,7 +1231,7 @@ t_class *pdp_theonice_class;
void *pdp_theonice_new(void)
{
- t_int i;
+ int i;
t_pdp_theonice *x = (t_pdp_theonice *)pd_new(pdp_theonice_class);
inlet_new (&x->x_obj, &x->x_obj.ob_pd, gensym ("signal"), gensym ("signal"));
diff --git a/modules/pdp_theorin~.c b/modules/pdp_theorin~.c
index b52aa33..4ebd4d3 100644
--- a/modules/pdp_theorin~.c
+++ b/modules/pdp_theorin~.c
@@ -63,14 +63,14 @@ typedef struct pdp_theorin_struct
t_object x_obj;
t_float x_f;
- t_int x_packet0;
- t_int x_dropped;
+ int x_packet0;
+ int x_dropped;
t_pdp *x_header;
unsigned char *x_data;
- t_int x_vwidth;
- t_int x_vheight;
- t_int x_vsize;
+ int x_vwidth;
+ int x_vheight;
+ int x_vsize;
t_outlet *x_pdp_out; // output decoded pdp packets
t_outlet *x_outlet_left; // left audio output
@@ -83,31 +83,31 @@ typedef struct pdp_theorin_struct
pthread_t x_decodechild; // file decoding thread
pthread_mutex_t x_audiolock; // audio mutex
pthread_mutex_t x_videolock; // video mutex
- t_int x_usethread; // flag to activate decoding in a thread
- t_int x_autoplay; // flag to autoplay the file ( default = true )
- t_int x_nextimage; // flag to play next image in manual mode
- t_int x_priority; // priority of decoding thread
+ int x_usethread; // flag to activate decoding in a thread
+ int x_autoplay; // flag to autoplay the file ( default = true )
+ int x_nextimage; // flag to play next image in manual mode
+ int x_priority; // priority of decoding thread
char *x_filename;
FILE *x_infile; // file descriptor
- t_int x_decoding; // decoding flag
- t_int x_theorainit; // flag for indicating that theora is initialized
- t_int x_videoready; // video ready flag
- t_int x_noframeshits; // number of tries without getting a frame
- t_int x_newpicture; // new picture flag
- t_int x_newpictureready;// new picture ready flag
- t_int x_notpackets; // number of theora packets decoded
- t_int x_novpackets; // number of vorbis packets decoded
- t_int x_endoffile; // end of the file reached
- t_int x_nbframes; // number of frames emitted
- t_int x_framerate; // framerate
- t_int x_samplerate; // audio sample rate
- t_int x_audiochannels; // audio channels
- t_int x_blocksize; // audio block size
- t_int x_audioon; // audio buffer filling flag
- t_int x_reading; // file reading flag
- t_int x_cursec; // current second
- t_int x_secondcount; // number of frames received in the current second
+ int x_decoding; // decoding flag
+ int x_theorainit; // flag for indicating that theora is initialized
+ int x_videoready; // video ready flag
+ int x_noframeshits; // number of tries without getting a frame
+ int x_newpicture; // new picture flag
+ int x_newpictureready;// new picture ready flag
+ int x_notpackets; // number of theora packets decoded
+ int x_novpackets; // number of vorbis packets decoded
+ int x_endoffile; // end of the file reached
+ int x_nbframes; // number of frames emitted
+ int x_framerate; // framerate
+ int x_samplerate; // audio sample rate
+ int x_audiochannels; // audio channels
+ int x_blocksize; // audio block size
+ int x_audioon; // audio buffer filling flag
+ int x_reading; // file reading flag
+ int x_cursec; // current second
+ int x_secondcount; // number of frames received in the current second
struct timeval x_starttime; // reading starting time
/* vorbis/theora structures */
@@ -126,10 +126,10 @@ typedef struct pdp_theorin_struct
yuv_buffer x_yuvbuffer; // yuv buffer
/* audio structures */
- t_int x_audio; // flag to activate the decoding of audio
+ int x_audio; // flag to activate the decoding of audio
t_float x_audio_inl[4*MAX_AUDIO_PACKET_SIZE]; // left buffer for pd
t_float x_audio_inr[4*MAX_AUDIO_PACKET_SIZE]; // right buffer for pd
- t_int x_audioin_position;// writing position for incoming audio
+ int x_audioin_position;// writing position for incoming audio
t_float **x_pcm; // buffer for vorbis decoding
} t_pdp_theorin;
@@ -176,10 +176,10 @@ static void pdp_theorin_bang(t_pdp_theorin *x)
x->x_nextimage = 1;
}
-static t_int pdp_theorin_get_buffer_from_file(FILE *in, ogg_sync_state *oy)
+static int pdp_theorin_get_buffer_from_file(FILE *in, ogg_sync_state *oy)
{
char *buffer;
- t_int bytes;
+ int bytes;
buffer=ogg_sync_buffer(oy,4096);
bytes=fread(buffer,1,4096,in);
@@ -187,14 +187,14 @@ static t_int pdp_theorin_get_buffer_from_file(FILE *in, ogg_sync_state *oy)
return(bytes);
}
-static t_int pdp_theorin_queue_page(t_pdp_theorin *x)
+static int pdp_theorin_queue_page(t_pdp_theorin *x)
{
if(x->x_notpackets) ogg_stream_pagein(&x->x_statet, &x->x_ogg_page);
if(x->x_novpackets) ogg_stream_pagein(&x->x_statev, &x->x_ogg_page);
return 0;
}
-static t_int pdp_theorin_decode_packet(t_pdp_theorin *x)
+static int pdp_theorin_decode_packet(t_pdp_theorin *x)
{
int ret, count, maxsamples, samples, si=0, sj=0;
struct timespec mwait;
@@ -204,7 +204,7 @@ static t_int pdp_theorin_decode_packet(t_pdp_theorin *x)
unsigned char *pY, *pU, *pV;
unsigned char *psY, *psU, *psV;
t_float **lpcm;
- t_int px, py;
+ int px, py;
// post( "pdp_theorin~ : decode packet" );
@@ -397,7 +397,7 @@ static void *pdp_decode_file(void *tdata)
{
t_pdp_theorin *x = (t_pdp_theorin*)tdata;
struct sched_param schedprio;
- t_int pmin, pmax, p1;
+ int pmin, pmax, p1;
struct timespec twait;
twait.tv_sec = 0;
@@ -434,7 +434,7 @@ static void *pdp_decode_file(void *tdata)
static void pdp_theorin_close(t_pdp_theorin *x)
{
- t_int ret, i, count=0;
+ int ret, i, count=0;
struct timespec twait;
twait.tv_sec = 0;
@@ -497,7 +497,7 @@ static void pdp_theorin_close(t_pdp_theorin *x)
static void pdp_theorin_open(t_pdp_theorin *x, t_symbol *s)
{
- t_int ret, i;
+ int ret, i;
pthread_attr_t decode_child_attr;
ogg_stream_state o_tempstate;
struct stat fileinfos;
@@ -631,7 +631,7 @@ static void pdp_theorin_open(t_pdp_theorin *x, t_symbol *s)
if( x->x_notpackets )
{
theora_decode_init(&x->x_theora_state, &x->x_theora_info);
- x->x_framerate = (t_int)x->x_theora_info.fps_numerator/x->x_theora_info.fps_denominator;
+ x->x_framerate = (int)x->x_theora_info.fps_numerator/x->x_theora_info.fps_denominator;
// post("pdp_theorin~ : stream %x is theora %dx%d %d fps video.",
// x->x_statet.serialno,
// x->x_theora_info.width,x->x_theora_info.height,
@@ -767,7 +767,7 @@ static t_int *pdp_theorin_perform(t_int *w)
t_pdp_theorin *x = (t_pdp_theorin *)(w[3]);
int n = (int)(w[4]); // number of samples
struct timeval etime;
- t_int sn;
+ int sn;
// decode a packet if not in thread mode
if ( !x->x_usethread && x->x_reading )
diff --git a/modules/pdp_theorout~.c b/modules/pdp_theorout~.c
index f5c776b..af06dc5 100644
--- a/modules/pdp_theorout~.c
+++ b/modules/pdp_theorout~.c
@@ -66,25 +66,25 @@ typedef struct pdp_theorout_struct
t_float x_f;
t_outlet *x_outlet0;
- t_int x_packet0;
- t_int x_packet1;
- t_int x_dropped;
- t_int x_queue_id;
+ int x_packet0;
+ int x_packet1;
+ int x_dropped;
+ int x_queue_id;
- t_int x_vwidth;
- t_int x_tvwidth; /* theora 16 pixels aligned width value */
- t_int x_vheight;
- t_int x_tvheight; /* theora 16 pixels aligned height value */
- t_int x_vsize;
+ int x_vwidth;
+ int x_tvwidth; /* theora 16 pixels aligned width value */
+ int x_vheight;
+ int x_tvheight; /* theora 16 pixels aligned height value */
+ int x_vsize;
FILE *x_tfile;
- t_int x_framerate;
- t_int x_newfile;
- t_int x_einit;
- t_int x_recflag;
- t_int x_enduprec;;
- t_int x_frameswritten;
- t_int x_frames;
+ int x_framerate;
+ int x_newfile;
+ int x_einit;
+ int x_recflag;
+ int x_enduprec;;
+ int x_frameswritten;
+ int x_frames;
struct timeval x_tstart;
struct timeval x_tzero;
struct timeval x_tcurrent;
@@ -104,19 +104,19 @@ typedef struct pdp_theorout_struct
vorbis_comment x_vorbis_comment; // vorbis comment
yuv_buffer x_yuvbuffer; // yuv buffer
- t_int x_akbps; // audio bit rate
- t_int x_vkbps; // video bit rate
+ int x_akbps; // audio bit rate
+ int x_vkbps; // video bit rate
t_float x_aquality; // audio quality
- t_int x_vquality; // video quality
- t_int x_abytesout; // audio bytes written
- t_int x_vbytesout; // video bytes written
+ int x_vquality; // video quality
+ int x_abytesout; // audio bytes written
+ int x_vbytesout; // video bytes written
/* audio structures */
t_float **x_audio_buf; /* buffer for incoming audio */
- t_int x_audioin_position; // writing position for incoming audio
- t_int x_channels; // audio channels
- t_int x_samplerate; // audio sample rate
- t_int x_bits; // audio bits
+ int x_audioin_position; // writing position for incoming audio
+ int x_channels; // audio channels
+ int x_samplerate; // audio sample rate
+ int x_bits; // audio bits
} t_pdp_theorout;
@@ -133,9 +133,9 @@ static void pdp_theorout_allocate(t_pdp_theorout *x)
x->x_yuvbuffer.uv_height=x->x_vheight>>1;
x->x_yuvbuffer.uv_stride=x->x_vwidth>>1;
- x->x_yuvbuffer.y = (char *)malloc( x->x_yuvbuffer.y_width * x->x_yuvbuffer.y_height );
- x->x_yuvbuffer.u = (char *)malloc( x->x_yuvbuffer.uv_width * x->x_yuvbuffer.uv_height );
- x->x_yuvbuffer.v = (char *)malloc( x->x_yuvbuffer.uv_width * x->x_yuvbuffer.uv_height );
+ x->x_yuvbuffer.y = (unsigned char *)malloc( x->x_yuvbuffer.y_width * x->x_yuvbuffer.y_height );
+ x->x_yuvbuffer.u = (unsigned char *)malloc( x->x_yuvbuffer.uv_width * x->x_yuvbuffer.uv_height );
+ x->x_yuvbuffer.v = (unsigned char *)malloc( x->x_yuvbuffer.uv_width * x->x_yuvbuffer.uv_height );
}
/* free internal ressources */
@@ -149,7 +149,7 @@ static void pdp_theorout_free_ressources(t_pdp_theorout *x)
/* initialize the encoder */
static void pdp_theorout_init_encoder(t_pdp_theorout *x)
{
- t_int ret;
+ int ret;
x->x_einit=0;
@@ -216,7 +216,7 @@ static void pdp_theorout_init_encoder(t_pdp_theorout *x)
static void pdp_theorout_write_headers(t_pdp_theorout *x)
{
- t_int ret;
+ int ret;
ogg_packet aheader, aheadercomm, aheadercode;
if ( !x->x_einit )
@@ -362,7 +362,7 @@ static void pdp_theorout_close(t_pdp_theorout *x)
/* open a new video file */
static void pdp_theorout_open(t_pdp_theorout *x, t_symbol *sfile)
{
- t_int ret=0;
+ int ret=0;
// close previous video file if existing
pdp_theorout_close(x);
@@ -437,49 +437,49 @@ static void pdp_theorout_stop(t_pdp_theorout *x)
/* set video bitrate */
static void pdp_theorout_vbitrate(t_pdp_theorout *x, t_floatarg vbitrate )
{
- if ( ( (t_int) vbitrate < MIN_VIDEO_BITRATE ) || ( (t_int) vbitrate > MAX_VIDEO_BITRATE ) )
+ if ( ( (int) vbitrate < MIN_VIDEO_BITRATE ) || ( (int) vbitrate > MAX_VIDEO_BITRATE ) )
{
post( "pdp_theorout~ : wrong video bitrate %d : should be in [%d,%d] kbps",
- (t_int) vbitrate, MIN_VIDEO_BITRATE, MAX_VIDEO_BITRATE );
+ (int) vbitrate, MIN_VIDEO_BITRATE, MAX_VIDEO_BITRATE );
return;
}
- x->x_vkbps = (t_int) vbitrate;
+ x->x_vkbps = (int) vbitrate;
}
/* set audio bitrate */
static void pdp_theorout_abitrate(t_pdp_theorout *x, t_floatarg abitrate )
{
- if ( ( (t_int) abitrate < MIN_AUDIO_BITRATE ) || ( (t_int) abitrate > MAX_AUDIO_BITRATE ) )
+ if ( ( (int) abitrate < MIN_AUDIO_BITRATE ) || ( (int) abitrate > MAX_AUDIO_BITRATE ) )
{
post( "pdp_theorout~ : wrong audio bitrate %d : should be in [%d,%d] kbps",
- (t_int) abitrate, MIN_AUDIO_BITRATE, MAX_AUDIO_BITRATE );
+ (int) abitrate, MIN_AUDIO_BITRATE, MAX_AUDIO_BITRATE );
return;
}
- x->x_akbps = (t_int) abitrate;
+ x->x_akbps = (int) abitrate;
}
/* set video quality */
static void pdp_theorout_vquality(t_pdp_theorout *x, t_floatarg vquality )
{
- if ( ( (t_int) vquality < MIN_VIDEO_QUALITY ) || ( (t_int) vquality > MAX_VIDEO_QUALITY ) )
+ if ( ( (int) vquality < MIN_VIDEO_QUALITY ) || ( (int) vquality > MAX_VIDEO_QUALITY ) )
{
post( "pdp_theorout~ : wrong video quality %d : should be in [%d,%d]",
- (t_int) vquality, MIN_VIDEO_QUALITY, MAX_VIDEO_QUALITY );
+ (int) vquality, MIN_VIDEO_QUALITY, MAX_VIDEO_QUALITY );
return;
}
- x->x_vquality = (t_int) vquality;
+ x->x_vquality = (int) vquality;
}
/* set audio quality */
static void pdp_theorout_aquality(t_pdp_theorout *x, t_floatarg aquality )
{
- if ( ( (t_int) aquality < MIN_AUDIO_QUALITY ) || ( (t_int) aquality > MAX_AUDIO_QUALITY ) )
+ if ( ( (int) aquality < MIN_AUDIO_QUALITY ) || ( (int) aquality > MAX_AUDIO_QUALITY ) )
{
post( "pdp_theorout~ : wrong audio quality %d : should be in [%d,%d]",
- (t_int) aquality, MIN_AUDIO_QUALITY, MAX_AUDIO_QUALITY );
+ (int) aquality, MIN_AUDIO_QUALITY, MAX_AUDIO_QUALITY );
return;
}
- x->x_aquality = (t_int) aquality;
+ x->x_aquality = (int) aquality;
}
/* store audio data in PCM format in a buffer for now */
@@ -490,7 +490,7 @@ static t_int *pdp_theorout_perform(t_int *w)
t_pdp_theorout *x = (t_pdp_theorout *)(w[3]);
int n = (int)(w[4]); // number of samples
t_float fsample;
- t_int isample, i;
+ int isample, i;
if ( x->x_recflag )
{
@@ -525,13 +525,13 @@ static void pdp_theorout_process_yv12(t_pdp_theorout *x)
{
t_pdp *header = pdp_packet_header(x->x_packet0);
unsigned char *data = (unsigned char *)pdp_packet_data(x->x_packet0);
- t_int i, ret;
- t_int px, py;
- char *pY, *pU, *pV;
+ int i, ret;
+ int px, py;
+ unsigned char *pY, *pU, *pV;
struct timeval trec;
- t_int nbaudiosamples, nbusecs, nbrecorded;
+ int nbaudiosamples, nbusecs, nbrecorded;
t_float fframerate=0.0;
- t_int precflag;
+ int precflag;
ogg_page apage;
ogg_page vpage;
t_float **vbuffer;
@@ -859,7 +859,7 @@ t_class *pdp_theorout_class;
void *pdp_theorout_new(void)
{
- t_int i;
+ int i;
t_pdp_theorout *x = (t_pdp_theorout *)pd_new(pdp_theorout_class);
inlet_new (&x->x_obj, &x->x_obj.ob_pd, gensym ("signal"), gensym ("signal"));
diff --git a/modules/pdp_transform.c b/modules/pdp_transform.c
index ccde3a4..55101d4 100644
--- a/modules/pdp_transform.c
+++ b/modules/pdp_transform.c
@@ -38,20 +38,20 @@ typedef struct pdp_transform_struct
t_object x_obj;
t_float x_f;
- t_int x_packet0;
- t_int x_packet1;
- t_int x_dropped;
- t_int x_queue_id;
+ int x_packet0;
+ int x_packet1;
+ int x_dropped;
+ int x_queue_id;
t_outlet *x_outlet0;
- t_int x_vwidth;
- t_int x_vheight;
- t_int x_vsize;
+ int x_vwidth;
+ int x_vheight;
+ int x_vsize;
- t_int **x_table_list; // mapping tables
- t_int **x_table_list_u; // mapping tables
- t_int x_table; // current table
- t_int x_t;
+ int **x_table_list; // mapping tables
+ int **x_table_list_u; // mapping tables
+ int x_table; // current table
+ int x_t;
} t_pdp_transform;
@@ -64,7 +64,7 @@ static void pdp_transform_table(t_pdp_transform *x, t_floatarg ftable )
}
}
-static int pdp_transform_map_from_table(t_pdp_transform *x, t_int px, t_int py, t_int t)
+static int pdp_transform_map_from_table(t_pdp_transform *x, int px, int py, int t)
{
int xd,yd;
@@ -76,7 +76,7 @@ static int pdp_transform_map_from_table(t_pdp_transform *x, t_int px, t_int py,
return (xd+yd*x->x_vwidth);
}
-static int pdp_transform_map_from_table_u(t_pdp_transform *x, t_int px, t_int py, t_int t)
+static int pdp_transform_map_from_table_u(t_pdp_transform *x, int px, int py, int t)
{
int xd,yd;
@@ -91,7 +91,7 @@ static int pdp_transform_map_from_table_u(t_pdp_transform *x, t_int px, t_int py
static void pdp_transform_square_table_init(t_pdp_transform *x)
{
const int size = 16;
- t_int px, py, tx, ty;
+ int px, py, tx, ty;
for(py=0; py<x->x_vheight; py++)
{
@@ -130,7 +130,7 @@ static void pdp_transform_square_table_init(t_pdp_transform *x)
static void pdp_transform_init_tables(t_pdp_transform *x)
{
- t_int px, py;
+ int px, py;
for (py=0;py<x->x_vheight;py++)
{
@@ -170,8 +170,8 @@ static void pdp_transform_allocate(t_pdp_transform *x)
// allocate tables
for(i=0;i<MAX_TABLES;i++)
{
- x->x_table_list[i] = (t_int *) getbytes( x->x_vsize*sizeof(int) );
- x->x_table_list_u[i] = (t_int *) getbytes( x->x_vsize*sizeof(int) );
+ x->x_table_list[i] = (int *) getbytes( x->x_vsize*sizeof(int) );
+ x->x_table_list_u[i] = (int *) getbytes( x->x_vsize*sizeof(int) );
}
}
@@ -181,9 +181,9 @@ static void pdp_transform_process_yv12(t_pdp_transform *x)
short int *data = (short int *)pdp_packet_data(x->x_packet0);
t_pdp *newheader = pdp_packet_header(x->x_packet1);
short int *newdata = (short int *)pdp_packet_data(x->x_packet1);
- t_int i, iu;
- t_int px, py;
- t_int d, o, du=0, ou;
+ int i, iu;
+ int px, py;
+ int d, o, du=0, ou;
short int *pY, *pU, *pV, *pnY, *pnU, *pnV;
/* allocate all ressources */
@@ -327,8 +327,8 @@ void *pdp_transform_new(void)
x->x_packet1 = -1;
x->x_queue_id = -1;
- x->x_table_list = (t_int **) getbytes(MAX_TABLES * sizeof(int *));
- x->x_table_list_u = (t_int **) getbytes(MAX_TABLES * sizeof(int *));
+ x->x_table_list = (int **) getbytes(MAX_TABLES * sizeof(int *));
+ x->x_table_list_u = (int **) getbytes(MAX_TABLES * sizeof(int *));
x->x_t = 0;
return (void *)x;
diff --git a/modules/pdp_transition.c b/modules/pdp_transition.c
index 4894c6a..a95a51d 100644
--- a/modules/pdp_transition.c
+++ b/modules/pdp_transition.c
@@ -37,37 +37,37 @@ typedef struct pdp_transition_struct
t_float x_f;
t_outlet *x_outlet0;
- t_int x_packet0;
- t_int x_packet1;
- t_int x_packet;
- t_int x_dropped;
- t_int x_queue_id;
+ int x_packet0;
+ int x_packet1;
+ int x_packet;
+ int x_dropped;
+ int x_queue_id;
- t_int x_vwidth0;
- t_int x_vheight0;
- t_int x_vsize0;
+ int x_vwidth0;
+ int x_vheight0;
+ int x_vsize0;
- t_int x_vwidth1;
- t_int x_vheight1;
- t_int x_vsize1;
+ int x_vwidth1;
+ int x_vheight1;
+ int x_vsize1;
- t_int x_vwidth;
- t_int x_vheight;
- t_int x_vsize;
+ int x_vwidth;
+ int x_vheight;
+ int x_vsize;
- t_int x_transition_mode; // 1 : "circle"
- t_int x_transition_pending;
+ int x_transition_mode; // 1 : "circle"
+ int x_transition_pending;
- t_int x_current_source;
- t_int x_target_source;
+ int x_current_source;
+ int x_target_source;
- t_int x_pos; // current position for transition
- t_int x_inc; // increment for various mode
- t_int x_rand;// randomizing argument
+ int x_pos; // current position for transition
+ int x_inc; // increment for various mode
+ int x_rand;// randomizing argument
} t_pdp_transition;
-static t_int pdp_transition_min( t_int a, t_int b )
+static int pdp_transition_min( int a, int b )
{
if ( a == 0 ) return b;
if ( b == 0 ) return a;
@@ -265,8 +265,8 @@ static void pdp_transition_process_yv12(t_pdp_transition *x)
short int *data1 = (short int *)pdp_packet_data(x->x_packet1);
t_pdp *header;
short int *data;
- t_int tsource, cx=0, cy=0;
- t_int px, py, rvalue=0, h1pos, h2pos, xcent, ycent;
+ int tsource, cx=0, cy=0;
+ int px, py, rvalue=0, h1pos, h2pos, xcent, ycent;
t_float factor, alpha;
int i;
short int *poY, *poV, *poU, *p0Y, *p0V, *p0U, *p1Y, *p1V, *p1U;
diff --git a/modules/pdp_underwatch.c b/modules/pdp_underwatch.c
index c999ceb..35075c3 100644
--- a/modules/pdp_underwatch.c
+++ b/modules/pdp_underwatch.c
@@ -37,21 +37,21 @@ typedef struct pdp_underwatch_struct
t_float x_f;
t_outlet *x_outlet0;
- t_int x_packet0;
- t_int x_packet1;
- t_int x_dropped;
- t_int x_queue_id;
-
- t_int x_vwidth;
- t_int x_vheight;
- t_int x_vsize;
- t_int x_line;
- t_int x_sline;
- t_int x_sheight;
- t_int x_prevline;
- t_int x_prevsline;
- t_int x_prevsheight;
- t_int x_stripsize;
+ int x_packet0;
+ int x_packet1;
+ int x_dropped;
+ int x_queue_id;
+
+ int x_vwidth;
+ int x_vheight;
+ int x_vsize;
+ int x_line;
+ int x_sline;
+ int x_sheight;
+ int x_prevline;
+ int x_prevsline;
+ int x_prevsheight;
+ int x_stripsize;
} t_pdp_underwatch;
diff --git a/modules/pdp_vertigo.c b/modules/pdp_vertigo.c
index f9dd553..26bedb7 100644
--- a/modules/pdp_vertigo.c
+++ b/modules/pdp_vertigo.c
@@ -36,21 +36,21 @@ typedef struct pdp_vertigo_struct
t_float x_f;
t_outlet *x_outlet0;
- t_int x_packet0;
- t_int x_packet1;
- t_int x_dropped;
- t_int x_queue_id;
-
- t_int x_vwidth;
- t_int x_vheight;
- t_int x_vsize;
+ int x_packet0;
+ int x_packet1;
+ int x_dropped;
+ int x_queue_id;
+
+ int x_vwidth;
+ int x_vheight;
+ int x_vsize;
short int *x_buffer;
short int *x_current_buffer;
short int *x_alt_buffer;
- t_int x_dx;
- t_int x_dy;
- t_int x_sx;
- t_int x_sy;
+ int x_dx;
+ int x_dy;
+ int x_sx;
+ int x_sy;
double x_phase;
double x_phase_increment;
double x_zoomrate;
@@ -70,7 +70,7 @@ static void pdp_vertigo_zoomrate(t_pdp_vertigo *x, t_floatarg fzoomrate )
static void pdp_vertigo_allocate(t_pdp_vertigo *x, t_floatarg fnewsize )
{
- t_int nsize = (int) fnewsize;
+ int nsize = (int) fnewsize;
if ( x->x_buffer ) freebytes( x->x_buffer, 2*((x->x_vsize + (x->x_vsize>>1))<<1) );
x->x_buffer = (short int *) getbytes( 2*(( nsize + (nsize>>1))<<1) );
diff --git a/modules/pdp_warhol.c b/modules/pdp_warhol.c
index 508f659..a78269f 100644
--- a/modules/pdp_warhol.c
+++ b/modules/pdp_warhol.c
@@ -29,7 +29,7 @@
#include <math.h>
#define NBCOLORS 9
-static t_int colortable[NBCOLORS] = {
+static int colortable[NBCOLORS] = {
0x000080, 0x008045, 0x07f0e7,
0x0000f0, 0x00f07f, 0x037a10,
0x0023d9, 0x0080f0, 0x083df0
@@ -43,17 +43,17 @@ typedef struct pdp_warhol_struct
t_float x_f;
t_outlet *x_outlet0;
- t_int x_packet0;
- t_int x_packet1;
- t_int x_dropped;
- t_int x_queue_id;
-
- t_int x_vwidth;
- t_int x_vheight;
- t_int x_vsize;
- t_int x_dividerx;
- t_int x_dividery;
- t_int x_colorindex;
+ int x_packet0;
+ int x_packet1;
+ int x_dropped;
+ int x_queue_id;
+
+ int x_vwidth;
+ int x_vheight;
+ int x_vsize;
+ int x_dividerx;
+ int x_dividery;
+ int x_colorindex;
} t_pdp_warhol;
@@ -61,7 +61,7 @@ static void pdp_warhol_dividerx(t_pdp_warhol *x, t_floatarg fdivider )
{
if ( ( fdivider > 1 ) && ( fdivider < x->x_vwidth ) )
{
- x->x_dividerx = (t_int) fdivider;
+ x->x_dividerx = (int) fdivider;
}
}
@@ -69,7 +69,7 @@ static void pdp_warhol_dividery(t_pdp_warhol *x, t_floatarg fdivider )
{
if ( ( fdivider > 1 ) && ( fdivider < x->x_vwidth ) )
{
- x->x_dividery = (t_int) fdivider;
+ x->x_dividery = (int) fdivider;
}
}
@@ -77,13 +77,13 @@ static void pdp_warhol_colorindex(t_pdp_warhol *x, t_floatarg findex )
{
if ( ( findex >= 0 ) && ( findex < NBCOLORS ) )
{
- x->x_colorindex = (t_int) findex;
+ x->x_colorindex = (int) findex;
}
}
static void pdp_warhol_v(t_pdp_warhol *x, t_floatarg fv )
{
- t_int tc;
+ int tc;
if ( ( fv >= 0 ) && ( fv < 255 ) )
{
@@ -95,7 +95,7 @@ static void pdp_warhol_v(t_pdp_warhol *x, t_floatarg fv )
static void pdp_warhol_u(t_pdp_warhol *x, t_floatarg fu )
{
- t_int tc;
+ int tc;
if ( ( fu >= 0 ) && ( fu < 255 ) )
{
@@ -107,7 +107,7 @@ static void pdp_warhol_u(t_pdp_warhol *x, t_floatarg fu )
static void pdp_warhol_y(t_pdp_warhol *x, t_floatarg fy )
{
- t_int tc;
+ int tc;
if ( ( fy >= 0 ) && ( fy < 255 ) )
{
diff --git a/modules/pdp_warp.c b/modules/pdp_warp.c
index b179580..10b0da9 100644
--- a/modules/pdp_warp.c
+++ b/modules/pdp_warp.c
@@ -30,7 +30,7 @@
#define CTABLE_SIZE 1024
-static t_int sintable[CTABLE_SIZE+256];
+static int sintable[CTABLE_SIZE+256];
static char *pdp_warp_version = "pdp_warp: version 0.1, port of warp from effectv( Fukuchi Kentaro ) adapted by Yves Degoyon (ydegoyon@free.fr)";
@@ -40,19 +40,19 @@ typedef struct pdp_warp_struct
t_float x_f;
t_outlet *x_outlet0;
- t_int x_packet0;
- t_int x_packet1;
- t_int x_dropped;
- t_int x_queue_id;
-
- t_int x_vwidth;
- t_int x_vheight;
- t_int x_vsize;
- t_int x_tval;
- t_int x_mode;
- t_int x_ctable[CTABLE_SIZE];
- t_int *x_disttable;
- t_int *x_offstable;
+ int x_packet0;
+ int x_packet1;
+ int x_dropped;
+ int x_queue_id;
+
+ int x_vwidth;
+ int x_vheight;
+ int x_vsize;
+ int x_tval;
+ int x_mode;
+ int x_ctable[CTABLE_SIZE];
+ int *x_disttable;
+ int *x_offstable;
} t_pdp_warp;
@@ -71,7 +71,7 @@ static void pdp_warp_tval(t_pdp_warp *x, t_floatarg ftval )
static void pdp_warp_init_sin_table(void)
{
- t_int *tptr, *tsinptr;
+ int *tptr, *tsinptr;
double i;
tsinptr = tptr = sintable;
@@ -98,7 +98,7 @@ static void pdp_warp_init_offs_table(t_pdp_warp* x)
static void pdp_warp_init_dist_table(t_pdp_warp *x)
{
- t_int halfw, halfh, *distptr;
+ int halfw, halfh, *distptr;
double px,py,m;
halfw = x->x_vwidth>> 1;
@@ -120,16 +120,16 @@ static void pdp_warp_init_dist_table(t_pdp_warp *x)
static void pdp_warp_free_ressources(t_pdp_warp *x)
{
- if ( x->x_offstable ) freebytes( x->x_offstable, x->x_vheight * sizeof (t_int) );
- if ( x->x_disttable ) freebytes( x->x_disttable, x->x_vwidth * x->x_vheight * sizeof (t_int) );
+ if ( x->x_offstable ) freebytes( x->x_offstable, x->x_vheight * sizeof (int) );
+ if ( x->x_disttable ) freebytes( x->x_disttable, x->x_vwidth * x->x_vheight * sizeof (int) );
}
static void pdp_warp_allocate(t_pdp_warp *x)
{
int i;
- x->x_offstable = (t_int*) getbytes ( x->x_vheight * sizeof (t_int) );
- x->x_disttable = (t_int*) getbytes ( x->x_vwidth * x->x_vheight * sizeof (t_int) );
+ x->x_offstable = (int*) getbytes ( x->x_vheight * sizeof (int) );
+ x->x_disttable = (int*) getbytes ( x->x_vwidth * x->x_vheight * sizeof (int) );
pdp_warp_init_offs_table(x);
pdp_warp_init_dist_table(x);
@@ -137,8 +137,8 @@ static void pdp_warp_allocate(t_pdp_warp *x)
void pdp_warp_do_warp(t_pdp_warp *x, short int* src, short int *dest, int xw, int yw, int cw)
{
- t_int c, i, px, py, dx, dy, dxu, dyu, maxx, maxy;
- t_int width, height, skip, *ctptr, *distptr;
+ int c, i, px, py, dx, dy, dxu, dyu, maxx, maxy;
+ int width, height, skip, *ctptr, *distptr;
short int *destptr, *destptru, *destptrv;
ctptr = x->x_ctable;
@@ -207,7 +207,7 @@ static void pdp_warp_process_yv12(t_pdp_warp *x)
int width, height;
int *p, *q, *r;
signed char *vp;
- t_int xw, yw, cw;
+ int xw, yw, cw;
/* allocate all ressources */
if ( (int)(header->info.image.width*header->info.image.height) != x->x_vsize )
diff --git a/modules/pdp_xcanvas.c b/modules/pdp_xcanvas.c
index 90f2700..61adb71 100644
--- a/modules/pdp_xcanvas.c
+++ b/modules/pdp_xcanvas.c
@@ -40,26 +40,26 @@ typedef struct pdp_xcanvas_struct
t_object x_obj;
t_float x_f;
- t_int x_dropped;
- t_int x_queue_id;
+ int x_dropped;
+ int x_queue_id;
- t_int x_opacket;
+ int x_opacket;
- t_int x_current;
+ int x_current;
t_float x_xmouse;
t_float x_ymouse;
- t_int *x_packets;
- t_int *x_widths;
- t_int *x_heights;
+ int *x_packets;
+ int *x_widths;
+ int *x_heights;
t_float *x_xoffsets;
t_float *x_yoffsets;
- t_int *x_sizes;
+ int *x_sizes;
- t_int x_owidth;
- t_int x_oheight;
- t_int x_osize;
- t_int x_nbinputs;
+ int x_owidth;
+ int x_oheight;
+ int x_osize;
+ int x_nbinputs;
// X data
t_outlet *x_events;
@@ -140,13 +140,13 @@ static void pdp_xcanvas_cursor(t_pdp_xcanvas *x, t_floatarg f)
static void pdp_xcanvas_process_yv12(t_pdp_xcanvas *x)
{
- t_int px, py, ppx, ppy, ii, nbs;
+ int px, py, ppx, ppy, ii, nbs;
char *pY, *pU, *pV;
char *ppY, *ppU, *ppV;
t_pdp *oheader;
char *odata, *pdata;
t_pdp *iheader;
- t_int mx, dx, my, dy;
+ int mx, dx, my, dy;
if ( !x->x_initialized )
{
@@ -213,12 +213,12 @@ static void pdp_xcanvas_process_yv12(t_pdp_xcanvas *x)
for ( py=x->x_yoffsets[ii]+my; py<x->x_yoffsets[ii]+dy; py++)
{
- memcpy( pY+(py*x->x_owidth)+(t_int)x->x_xoffsets[ii]+mx,
- ppY+(py-(t_int)x->x_yoffsets[ii])*x->x_widths[ii]+mx, dx );
- memcpy( pU+((py>>1)*(x->x_owidth>>1))+((t_int)(x->x_xoffsets[ii]+mx)>>1),
- ppU+((py-(t_int)x->x_yoffsets[ii])>>1)*(x->x_widths[ii]>>1)+(mx>>1), (dx>>1) );
- memcpy( pV+((py>>1)*(x->x_owidth>>1))+((t_int)(x->x_xoffsets[ii]+mx)>>1),
- ppV+((py-(t_int)x->x_yoffsets[ii])>>1)*(x->x_widths[ii]>>1)+(mx>>1), (dx>>1) );
+ memcpy( pY+(py*x->x_owidth)+(int)x->x_xoffsets[ii]+mx,
+ ppY+(py-(int)x->x_yoffsets[ii])*x->x_widths[ii]+mx, dx );
+ memcpy( pU+((py>>1)*(x->x_owidth>>1))+((int)(x->x_xoffsets[ii]+mx)>>1),
+ ppU+((py-(int)x->x_yoffsets[ii])>>1)*(x->x_widths[ii]>>1)+(mx>>1), (dx>>1) );
+ memcpy( pV+((py>>1)*(x->x_owidth>>1))+((int)(x->x_xoffsets[ii]+mx)>>1),
+ ppV+((py-(int)x->x_yoffsets[ii])>>1)*(x->x_widths[ii]>>1)+(mx>>1), (dx>>1) );
}
}
}
@@ -240,7 +240,7 @@ static void pdp_xcanvas_display_packet(t_pdp_xcanvas *x)
XFlush(x->x_xvid.dpy);
}
-static void pdp_xcanvas_process(t_pdp_xcanvas *x, t_int ni)
+static void pdp_xcanvas_process(t_pdp_xcanvas *x, int ni)
{
int encoding;
t_pdp *header = 0;
@@ -278,7 +278,7 @@ static void pdp_xcanvas_offset(t_pdp_xcanvas *x, t_floatarg ni, t_floatarg xoffs
static void pdp_xcanvas_select(t_pdp_xcanvas *x, t_floatarg X, t_floatarg Y)
{
- t_int ii;
+ int ii;
x->x_current = -1;
X = X*x->x_owidth;
@@ -319,7 +319,7 @@ static void pdp_xcanvas_unselect(t_pdp_xcanvas *x)
x->x_current = -1;
}
-static void pdp_xcanvas_input(t_pdp_xcanvas *x, t_symbol *s, t_floatarg f, t_int ni)
+static void pdp_xcanvas_input(t_pdp_xcanvas *x, t_symbol *s, t_floatarg f, int ni)
{
t_pdp *header;
short int *data;
@@ -403,7 +403,7 @@ static void pdp_xcanvas_input9(t_pdp_xcanvas *x, t_symbol *s, t_floatarg f)
static void pdp_xcanvas_free(t_pdp_xcanvas *x)
{
- t_int ii;
+ int ii;
pdp_queue_finish(x->x_queue_id);
for ( ii=0; ii<x->x_nbinputs; ii++)
@@ -411,10 +411,10 @@ static void pdp_xcanvas_free(t_pdp_xcanvas *x)
pdp_packet_mark_unused(x->x_packets[ii]);
}
pdp_packet_mark_unused(x->x_opacket);
- if ( x->x_packets ) freebytes( x->x_packets, x->x_nbinputs*sizeof(t_int) );
- if ( x->x_widths ) freebytes( x->x_widths, x->x_nbinputs*sizeof(t_int) );
- if ( x->x_heights ) freebytes( x->x_heights, x->x_nbinputs*sizeof(t_int) );
- if ( x->x_sizes ) freebytes( x->x_sizes, x->x_nbinputs*sizeof(t_int) );
+ if ( x->x_packets ) freebytes( x->x_packets, x->x_nbinputs*sizeof(int) );
+ if ( x->x_widths ) freebytes( x->x_widths, x->x_nbinputs*sizeof(int) );
+ if ( x->x_heights ) freebytes( x->x_heights, x->x_nbinputs*sizeof(int) );
+ if ( x->x_sizes ) freebytes( x->x_sizes, x->x_nbinputs*sizeof(int) );
if ( x->x_xoffsets ) freebytes( x->x_xoffsets, x->x_nbinputs*sizeof(t_float) );
if ( x->x_yoffsets ) freebytes( x->x_yoffsets, x->x_nbinputs*sizeof(t_float) );
pdp_xcanvas_destroy(x);
@@ -427,7 +427,7 @@ t_class *pdp_xcanvas_class;
void *pdp_xcanvas_new(t_symbol *s, int argc, t_atom *argv)
{
t_pdp_xcanvas *x = (t_pdp_xcanvas *)pd_new(pdp_xcanvas_class);
- t_int ii;
+ int ii;
char *imes[32];
if ( argc != 3 )
@@ -473,10 +473,10 @@ void *pdp_xcanvas_new(t_symbol *s, int argc, t_atom *argv)
post ( "pdp_xcanvas : new %dx%d canvas with %d inputs", x->x_owidth, x->x_oheight, x->x_nbinputs );
- x->x_packets = ( t_int* ) getbytes( x->x_nbinputs*sizeof(t_int) );
- x->x_widths = ( t_int* ) getbytes( x->x_nbinputs*sizeof(t_int) );
- x->x_heights = ( t_int* ) getbytes( x->x_nbinputs*sizeof(t_int) );
- x->x_sizes = ( t_int* ) getbytes( x->x_nbinputs*sizeof(t_int) );
+ x->x_packets = ( int* ) getbytes( x->x_nbinputs*sizeof(int) );
+ x->x_widths = ( int* ) getbytes( x->x_nbinputs*sizeof(int) );
+ x->x_heights = ( int* ) getbytes( x->x_nbinputs*sizeof(int) );
+ x->x_sizes = ( int* ) getbytes( x->x_nbinputs*sizeof(int) );
x->x_xoffsets = ( t_float* ) getbytes( x->x_nbinputs*sizeof(t_float) );
x->x_yoffsets = ( t_float* ) getbytes( x->x_nbinputs*sizeof(t_float) );
diff --git a/modules/pdp_yqt.c b/modules/pdp_yqt.c
index 8795f77..8bb19ea 100644
--- a/modules/pdp_yqt.c
+++ b/modules/pdp_yqt.c
@@ -24,8 +24,14 @@
#include "pdp_llconv.h"
#include "time.h"
#include "sys/time.h"
+#include "pidip_config.h"
+#ifdef QUICKTIME_NEWER
+#include <lqt/lqt.h>
+#include <lqt/colormodels.h>
+#else
#include <quicktime/lqt.h>
#include <quicktime/colormodels.h>
+#endif
#define MIN_AUDIO_INPUT 1024 /* we must have at least n chunks to play a steady sound */
#define OUTPUT_BUFFER_SIZE 128*1024 /* audio output buffer : 128k */
@@ -48,8 +54,8 @@ typedef struct pdp_yqt_struct
unsigned int x_vwidth;
unsigned int x_vheight;
- t_int x_cursec;
- t_int x_framescount;
+ int x_cursec;
+ int x_framescount;
bool loop;
@@ -59,17 +65,17 @@ typedef struct pdp_yqt_struct
quicktime_t *qt;
int qt_cmodel;
- t_int x_audio; /* indicates the existence of an audio track */
- t_int x_audio_channels; /* number of audio channels of first track */
- t_int x_mono; /* indicates a mono audio track */
- t_int x_audio_rate; /* audio rate */
- t_int x_resampling_factor; /* resampling factor */
+ int x_audio; /* indicates the existence of an audio track */
+ int x_audio_channels; /* number of audio channels of first track */
+ int x_mono; /* indicates a mono audio track */
+ int x_audio_rate; /* audio rate */
+ int x_resampling_factor; /* resampling factor */
t_float *x_outbuffer; /* buffer to store audio decoded data */
- t_int x_outwriteposition;
- t_int x_outreadposition;
- t_int x_outunread;
- t_int x_outbuffersize;
+ int x_outwriteposition;
+ int x_outreadposition;
+ int x_outunread;
+ int x_outbuffersize;
t_float *x_outl;
t_float *x_outr;
diff --git a/modules/pdp_yvu2rgb.c b/modules/pdp_yvu2rgb.c
index a536268..4981457 100644
--- a/modules/pdp_yvu2rgb.c
+++ b/modules/pdp_yvu2rgb.c
@@ -31,13 +31,13 @@ typedef struct pdp_yvu2rgb_struct
t_float x_f;
t_outlet *x_outlet0;
- t_int x_packet0;
- t_int x_packet1;
- t_int x_dropped;
- t_int x_queue_id;
+ int x_packet0;
+ int x_packet1;
+ int x_dropped;
+ int x_queue_id;
unsigned int *x_RGBFrame;
- t_int x_RGBFrameSize;
+ int x_RGBFrameSize;
} t_pdp_yvu2rgb;