summaryrefslogtreecommitdiffstats
path: root/gst
diff options
context:
space:
mode:
authorBenjamin Otte <otte@gnome.org>2002-04-06 03:40:14 +0000
committerBenjamin Otte <otte@gnome.org>2002-04-06 03:40:14 +0000
commitffd4b556cc0e94ccdc92b6fa47a0d1b93ab6a26b (patch)
tree84480c8c8541ea0aafc2c7982e44bd88b1d73afc /gst
parent30cb4afbf65b8b6b3285cca41ffe81a7f1c78754 (diff)
fixed first bunch of compiler warnings
Original commit message from CVS: fixed first bunch of compiler warnings
Diffstat (limited to 'gst')
-rw-r--r--gst/auparse/gstauparse.c37
-rw-r--r--gst/avi/Makefile.am10
-rw-r--r--gst/avi/gstavimux.c4
-rw-r--r--gst/avi/gstcdxaparse.c2
-rw-r--r--gst/goom/filters.c37
-rw-r--r--gst/goom/goom_core.c15
-rw-r--r--gst/law/alaw-conversion.c11
-rw-r--r--gst/median/gstmedian.c18
8 files changed, 86 insertions, 48 deletions
diff --git a/gst/auparse/gstauparse.c b/gst/auparse/gstauparse.c
index 11b049bb..e3fb4a2f 100644
--- a/gst/auparse/gstauparse.c
+++ b/gst/auparse/gstauparse.c
@@ -193,22 +193,35 @@ gst_auparse_chain (GstPad *pad, GstBuffer *buf)
gulong *head = (gulong *)data;
/* normal format is big endian (au is a Sparc format) */
- if (GULONG_FROM_BE (*(head++)) == 0x2e736e64) {
+ if (GULONG_FROM_BE (*head) == 0x2e736e64) {
+ head++;
auparse->le = 0;
- auparse->offset = GULONG_FROM_BE (*(head++));
- auparse->size = GULONG_FROM_BE (*(head++));
- auparse->encoding = GULONG_FROM_BE (*(head++));
- auparse->frequency = GULONG_FROM_BE (*(head++));
- auparse->channels = GULONG_FROM_BE (*(head++));
+ auparse->offset = GULONG_FROM_BE (*head);
+ head++;
+ auparse->size = GULONG_FROM_BE (*head);
+ head++;
+ auparse->encoding = GULONG_FROM_BE (*head);
+ head++;
+ auparse->frequency = GULONG_FROM_BE (*head);
+ head++;
+ auparse->channels = GULONG_FROM_BE (*head);
+ head++;
/* but I wouldn't be surprised by a little endian version */
- } else if (GULONG_FROM_LE (*(head++)) == 0x2e736e64) {
+ } else if (GULONG_FROM_LE (head) == 0x2e736e64) {
auparse->le = 1;
- auparse->offset = GULONG_FROM_LE(*(head++));
- auparse->size = GULONG_FROM_LE(*(head++));
- auparse->encoding = GULONG_FROM_LE(*(head++));
- auparse->frequency = GULONG_FROM_LE(*(head++));
- auparse->channels = GULONG_FROM_LE(*(head++));
+ head++;
+ auparse->le = 0;
+ auparse->offset = GULONG_FROM_LE (*head);
+ head++;
+ auparse->size = GULONG_FROM_LE (*head);
+ head++;
+ auparse->encoding = GULONG_FROM_LE (*head);
+ head++;
+ auparse->frequency = GULONG_FROM_LE (*head);
+ head++;
+ auparse->channels = GULONG_FROM_LE (*head);
+ head++;
} else {
g_warning ("help, dunno what I'm looking at!\n");
diff --git a/gst/avi/Makefile.am b/gst/avi/Makefile.am
index d24d9ce6..49286248 100644
--- a/gst/avi/Makefile.am
+++ b/gst/avi/Makefile.am
@@ -3,12 +3,12 @@ plugindir = $(libdir)/gst
plugin_LTLIBRARIES = \
libgstavimux.la \
libgstavidemux.la \
- libgstaviaudiodecoder.la \
libgstcdxaparse.la
+# libgstaviaudiodecoder.la
libgstavidemux_la_SOURCES = gstavidemux.c
libgstavimux_la_SOURCES = gstavimux.c
-libgstaviaudiodecoder_la_SOURCES = gstaviaudiodecoder.c
+# libgstaviaudiodecoder_la_SOURCES = gstaviaudiodecoder.c
libgstcdxaparse_la_SOURCES = gstcdxaparse.c
noinst_HEADERS = \
@@ -27,9 +27,9 @@ libgstavimux_la_CFLAGS = -O2 -ffast-math $(GST_CFLAGS)
libgstavimux_la_LIBADD =
libgstavimux_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
-libgstaviaudiodecoder_la_CFLAGS = -O2 -ffast-math $(GST_CFLAGS)
-libgstaviaudiodecoder_la_LIBADD =
-libgstaviaudiodecoder_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
+# libgstaviaudiodecoder_la_CFLAGS = -O2 -ffast-math $(GST_CFLAGS)
+# libgstaviaudiodecoder_la_LIBADD =
+# libgstaviaudiodecoder_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
libgstcdxaparse_la_CFLAGS = -O2 -ffast-math $(GST_CFLAGS)
libgstcdxaparse_la_LIBADD =
diff --git a/gst/avi/gstavimux.c b/gst/avi/gstavimux.c
index eab64bad..bb3eada6 100644
--- a/gst/avi/gstavimux.c
+++ b/gst/avi/gstavimux.c
@@ -326,6 +326,7 @@ gst_avimux_sinkconnect (GstPad *pad, GstCaps *vscaps)
else if (!strcmp (mimetype, "video/raw"))
{
guint32 format;
+ gint temp;
gst_caps_get_fourcc_int (caps, "format", &format);
switch (format)
@@ -346,7 +347,8 @@ gst_avimux_sinkconnect (GstPad *pad, GstCaps *vscaps)
avimux->vids.bit_cnt = 16; /* YUY2 */
break;
case GST_MAKE_FOURCC('R','G','B',' '):
- gst_caps_get_int (caps, "bpp", &avimux->vids.bit_cnt); /* RGB */
+ gst_caps_get_int (caps, "bpp", &temp); /* RGB */
+ avimux->vids.bit_cnt = temp;
break;
case GST_MAKE_FOURCC('Y','4','1','P'):
case GST_MAKE_FOURCC('I','4','2','0'):
diff --git a/gst/avi/gstcdxaparse.c b/gst/avi/gstcdxaparse.c
index bcffdaf0..ead5854b 100644
--- a/gst/avi/gstcdxaparse.c
+++ b/gst/avi/gstcdxaparse.c
@@ -141,8 +141,6 @@ gst_cdxa_parse_class_init (GstCDXAParseClass *klass)
static void
gst_cdxa_parse_init (GstCDXAParse *cdxa_parse)
{
- guint i;
-
GST_FLAG_SET (cdxa_parse, GST_ELEMENT_EVENT_AWARE);
cdxa_parse->sinkpad = gst_pad_new_from_template (
diff --git a/gst/goom/filters.c b/gst/goom/filters.c
index 12fcca56..06dd68ea 100644
--- a/gst/goom/filters.c
+++ b/gst/goom/filters.c
@@ -92,17 +92,20 @@ inline void calculatePXandPY (int x, int y, int *px, int *py)
static int wavesp = 0 ;
int yy ;
- yy = y + RAND () % 4 - RAND () % 4 + wave / 10 ;
+ yy = y + RAND () % 4 + wave / 10 ;
+ yy -= RAND () % 4;
if (yy < 0) yy = 0 ;
if (yy >= resoly) yy = resoly - 1 ;
*px = (x<<4) + firedec [yy] + (wave / 10) ;
*py = (y<<4) + 132 - ((vitesse < 132) ? vitesse : 131) ;
- wavesp += RAND () % 3 - RAND () % 3 ;
+ wavesp += RAND () % 3;
+ wavesp -= RAND () % 3;
if (wave < -10) wavesp += 2 ;
if (wave > 10) wavesp -= 2 ;
- wave += (wavesp / 10) + RAND () % 3 - RAND () % 3 ;
+ wave += (wavesp / 10) + RAND () % 3;
+ wave -= RAND () % 3;
if (wavesp > 100) wavesp = (wavesp * 9) / 10 ;
}
else
@@ -113,8 +116,10 @@ inline void calculatePXandPY (int x, int y, int *px, int *py)
if (noisify)
{
- x += RAND() % noisify - RAND() % noisify ;
- y += RAND() % noisify - RAND() % noisify ;
+ x += RAND() % noisify;
+ x -= RAND() % noisify;
+ y += RAND() % noisify;
+ y -= RAND() % noisify;
}
if (hPlaneEffect) vx = ((x - middleX) << 9) + hPlaneEffect * (y - middleY);
@@ -356,7 +361,8 @@ void zoomFilterFastRGB (Uint *pix1,
loopv -- ;
firedec [loopv] = decc ;
decc += spdc / 10 ;
- spdc = spdc + RAND () % 3 - RAND () % 3 ;
+ spdc+= RAND () % 3;
+ spdc-= RAND () % 3;
if (decc > 4)
spdc -= 1 ;
@@ -377,7 +383,8 @@ void zoomFilterFastRGB (Uint *pix1,
if (decc > 8 || decc < -8)
decc = decc * 8 / 9 ;
- accel += RAND () % 2 - RAND () % 2 ;
+ accel += RAND () % 2;
+ accel -= RAND () % 2;
if (accel > 20)
accel -= 2 ;
if (accel < -20)
@@ -419,7 +426,7 @@ void zoomFilterFastRGB (Uint *pix1,
{
int npx10 ;
int npy10 ;
- int pos = (y*prevX+x)*2;
+ int pos;
npx10 = (px/sqrtperte) ;
npy10 = (py/sqrtperte) ;
@@ -430,6 +437,7 @@ void zoomFilterFastRGB (Uint *pix1,
coefh = px % sqrtperte ;
coefv = py % sqrtperte ;
#ifdef USE_ASM
+ pos = (y*prevX+x)*2;
coeffs[pos] = (npx10 + prevX * npy10) * 4;
if (!(coefh || coefv))
@@ -443,16 +451,17 @@ void zoomFilterFastRGB (Uint *pix1,
coeffs[pos+1] |= ((sqrtperte-coefh) * coefv) << 16 ;
coeffs[pos+1] |= (coefh * coefv)<<24 ;
#else
- pos10[y*prevX+x]= npx10 + prevX * npy10 ;
+ pos = y*prevX+x;
+ pos10[pos]= npx10 + prevX * npy10 ;
if (!(coefh || coefv))
- c1[y*prevX+x] = sqrtperte*sqrtperte-1 ;
+ c1[pos] = sqrtperte*sqrtperte-1 ;
else
- c1[y*prevX+x] = (sqrtperte-coefh) * (sqrtperte-coefv);
+ c1[pos] = (sqrtperte-coefh) * (sqrtperte-coefv);
- c2[y*prevX+x] = coefh * (sqrtperte-coefv) ;
- c3[y*prevX+x] = (sqrtperte-coefh) * coefv ;
- c4[y*prevX+x] = coefh * coefv ;
+ c2[pos] = coefh * (sqrtperte-coefv) ;
+ c3[pos] = (sqrtperte-coefh) * coefv ;
+ c4[pos] = coefh * coefv ;
#endif
}
}
diff --git a/gst/goom/goom_core.c b/gst/goom/goom_core.c
index 5f243b40..ab2fea69 100644
--- a/gst/goom/goom_core.c
+++ b/gst/goom/goom_core.c
@@ -245,18 +245,22 @@ guint32 * goom_update (gint16 data [2][512])
switch (vtmp = (iRAND (27)))
{
case 0:
- zfd.vPlaneEffect = iRAND(3) - iRAND(3);
- zfd.hPlaneEffect = iRAND(3) - iRAND(3);
+ zfd.vPlaneEffect = iRAND(3);
+ zfd.vPlaneEffect -= iRAND(3);
+ zfd.hPlaneEffect = iRAND(3);
+ zfd.hPlaneEffect -= iRAND(3);
break;
case 3:
zfd.vPlaneEffect = 0 ;
- zfd.hPlaneEffect = iRAND(8) - iRAND(8);
+ zfd.hPlaneEffect = iRAND(8);
+ zfd.hPlaneEffect -= iRAND(8);
break;
case 4:
case 5:
case 6:
case 7:
- zfd.vPlaneEffect = iRAND(5) - iRAND (5);
+ zfd.vPlaneEffect = iRAND(5);
+ zfd.vPlaneEffect -= iRAND(5);
zfd.hPlaneEffect = - zfd.vPlaneEffect;
break;
case 8:
@@ -269,7 +273,8 @@ guint32 * goom_update (gint16 data [2][512])
break;
case 13:
zfd.hPlaneEffect = 0;
- zfd.vPlaneEffect = iRAND(10) - iRAND(10);
+ zfd.vPlaneEffect = iRAND(10);
+ zfd.vPlaneEffect -= iRAND(10);
break;
default:
if (vtmp < 10)
diff --git a/gst/law/alaw-conversion.c b/gst/law/alaw-conversion.c
index cb3be3e9..d2fa3689 100644
--- a/gst/law/alaw-conversion.c
+++ b/gst/law/alaw-conversion.c
@@ -28,6 +28,7 @@
*/
/* ulaw -> signed 16-bit */
+/* defined but not used
static gint16 isdn_audio_ulaw_to_s16[] =
{
0x8284, 0x8684, 0x8a84, 0x8e84, 0x9284, 0x9684, 0x9a84, 0x9e84,
@@ -63,8 +64,9 @@ static gint16 isdn_audio_ulaw_to_s16[] =
0x0078, 0x0070, 0x0068, 0x0060, 0x0058, 0x0050, 0x0048, 0x0040,
0x0038, 0x0030, 0x0028, 0x0020, 0x0018, 0x0010, 0x0008, 0x0000
};
-
+*/
/* alaw -> signed 16-bit */
+/* defined but not used
static gint16 isdn_audio_alaw_to_s16[] =
{
0x13fc, 0xec04, 0x0144, 0xfebc, 0x517c, 0xae84, 0x051c, 0xfae4,
@@ -100,7 +102,7 @@ static gint16 isdn_audio_alaw_to_s16[] =
0x18fc, 0xe704, 0x018c, 0xfe74, 0x657c, 0x9a84, 0x065c, 0xf9a4,
0x0cbc, 0xf344, 0x0094, 0xff6c, 0x327c, 0xcd84, 0x032c, 0xfcd4
};
-
+*/
/* alaw -> ulaw */
static guint8 isdn_audio_alaw_to_ulaw[] =
{
@@ -179,7 +181,10 @@ static inline void
isdn_audio_tlookup(const guint8 *table, guint8 *buff, gulong n)
{
while (n--)
- *buff++ = table[*(unsigned char *)buff];
+ {
+ *buff = table[*(unsigned char *)buff];
+ buff++;
+ }
}
void
diff --git a/gst/median/gstmedian.c b/gst/median/gstmedian.c
index 79a1311a..9cedb2bc 100644
--- a/gst/median/gstmedian.c
+++ b/gst/median/gstmedian.c
@@ -195,10 +195,13 @@ median_5 (unsigned char *src, unsigned char *dest, int width, int height)
PIX_SORT(p[1],p[2]) ;
dest[i] = p[2];
}
- dest[i] = src[i++];
- dest[i] = src[i++];
+ dest[i] = src[i];
+ i++;
+ dest[i] = src[i];
+ i++;
}
- dest[i] = src[i++];
+ dest[i] = src[i];
+ i++;
}
static void
@@ -244,10 +247,13 @@ median_9 (unsigned char *src, unsigned char *dest, int width, int height)
PIX_SORT(p[4], p[2]) ;
dest[i] = p[4];
}
- dest[i] = src[i++];
- dest[i] = src[i++];
+ dest[i] = src[i];
+ i++;
+ dest[i] = src[i];
+ i++;
}
- dest[i] = src[i++];
+ dest[i] = src[i];
+ i++;
}
static void