fixed first bunch of compiler warnings

Original commit message from CVS:
fixed first bunch of compiler warnings
This commit is contained in:
Benjamin Otte 2002-04-06 03:40:14 +00:00
parent 30cb4afbf6
commit ffd4b556cc
9 changed files with 87 additions and 49 deletions

2
common

@ -1 +1 @@
Subproject commit 38267abf56a3428093cea71429dca6a24a927547
Subproject commit 6148068f2318e85d8e66df485342b630d8fb49ac

View file

@ -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");

View file

@ -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 =

View file

@ -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'):

View file

@ -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 (

View file

@ -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
}
}

View file

@ -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)

View file

@ -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

View file

@ -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