mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-16 00:41:41 +00:00
cleanup msvc 2005 build warnings
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12200 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
a52c9cf4a6
commit
c199053bcd
@ -123,8 +123,8 @@ SPAN_DECLARE(void) cvec_lmsi16(const complexi16_t x[], complexi16_t y[], int n,
|
|||||||
|
|
||||||
for (i = 0; i < n; i++)
|
for (i = 0; i < n; i++)
|
||||||
{
|
{
|
||||||
y[i].re += ((int32_t) x[i].im*(int32_t) error->im + (int32_t) x[i].re*(int32_t) error->re) >> 12;
|
y[i].re = (int16_t)(y[i].re + (((int32_t) x[i].im*(int32_t) error->im + (int32_t) x[i].re*(int32_t) error->re) >> 12));
|
||||||
y[i].im += ((int32_t) x[i].re*(int32_t) error->im - (int32_t) x[i].im*(int32_t) error->re) >> 12;
|
y[i].im = (int16_t)(y[i].im + (((int32_t) x[i].re*(int32_t) error->im - (int32_t) x[i].im*(int32_t) error->re) >> 12));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*- End of function --------------------------------------------------------*/
|
/*- End of function --------------------------------------------------------*/
|
||||||
|
@ -309,8 +309,8 @@ SPAN_DECLARE(complexi16_t) dds_complexi16_mod(uint32_t *phase_acc, int32_t phase
|
|||||||
{
|
{
|
||||||
complexi16_t amp;
|
complexi16_t amp;
|
||||||
|
|
||||||
amp = complex_seti16(((int32_t) dds_lookup(*phase_acc + phase + (1 << 30))*(int32_t) scale) >> 15,
|
amp = complex_seti16((int16_t)(((int32_t) dds_lookup(*phase_acc + phase + (1 << 30))*(int32_t) scale) >> 15),
|
||||||
((int32_t) dds_lookup(*phase_acc + phase)*(int32_t) scale) >> 15);
|
(int16_t)(((int32_t) dds_lookup(*phase_acc + phase)*(int32_t) scale) >> 15));
|
||||||
*phase_acc += phase_rate;
|
*phase_acc += phase_rate;
|
||||||
return amp;
|
return amp;
|
||||||
}
|
}
|
||||||
|
@ -214,7 +214,7 @@ static void block4(g722_band_t *s, int16_t dx)
|
|||||||
|
|
||||||
/* UPPOL1 */
|
/* UPPOL1 */
|
||||||
wd1 = ((p ^ s->p[0]) & 0x8000) ? -192 : 192;
|
wd1 = ((p ^ s->p[0]) & 0x8000) ? -192 : 192;
|
||||||
wd2 = ((int32_t) s->a[0]*(int32_t) 32640) >> 15;
|
wd2 = (int16_t)(((int32_t) s->a[0]*(int32_t) 32640) >> 15);
|
||||||
ap[0] = saturated_add16(wd1, wd2);
|
ap[0] = saturated_add16(wd1, wd2);
|
||||||
|
|
||||||
wd3 = saturated_sub16(15360, ap[1]);
|
wd3 = saturated_sub16(15360, ap[1]);
|
||||||
@ -223,9 +223,9 @@ static void block4(g722_band_t *s, int16_t dx)
|
|||||||
|
|
||||||
/* FILTEP */
|
/* FILTEP */
|
||||||
wd1 = saturated_add16(r, r);
|
wd1 = saturated_add16(r, r);
|
||||||
wd1 = ((int32_t) ap[0]*(int32_t) wd1) >> 15;
|
wd1 = (int16_t)(((int32_t) ap[0]*(int32_t) wd1) >> 15);
|
||||||
wd2 = saturated_add16(s->r, s->r);
|
wd2 = saturated_add16(s->r, s->r);
|
||||||
wd2 = ((int32_t) ap[1]*(int32_t) wd2) >> 15;
|
wd2 = (int16_t)(((int32_t) ap[1]*(int32_t) wd2) >> 15);
|
||||||
sp = saturated_add16(wd1, wd2);
|
sp = saturated_add16(wd1, wd2);
|
||||||
s->r = r;
|
s->r = r;
|
||||||
s->a[1] = ap[1];
|
s->a[1] = ap[1];
|
||||||
@ -242,7 +242,7 @@ static void block4(g722_band_t *s, int16_t dx)
|
|||||||
for (i = 5; i >= 0; i--)
|
for (i = 5; i >= 0; i--)
|
||||||
{
|
{
|
||||||
wd2 = ((s->d[i + 1] ^ dx) & 0x8000) ? -wd1 : wd1;
|
wd2 = ((s->d[i + 1] ^ dx) & 0x8000) ? -wd1 : wd1;
|
||||||
wd3 = ((int32_t) s->b[i]*(int32_t) 32640) >> 15;
|
wd3 = (int16_t)(((int32_t) s->b[i]*(int32_t) 32640) >> 15);
|
||||||
s->b[i] = saturated_add16(wd2, wd3);
|
s->b[i] = saturated_add16(wd2, wd3);
|
||||||
wd3 = saturated_add16(s->d[i], s->d[i]);
|
wd3 = saturated_add16(s->d[i], s->d[i]);
|
||||||
sz += ((int32_t) s->b[i]*(int32_t) wd3) >> 15;
|
sz += ((int32_t) s->b[i]*(int32_t) wd3) >> 15;
|
||||||
|
@ -68,7 +68,7 @@ static int32_t lpc10_random(lpc10_decode_state_t *s)
|
|||||||
|
|
||||||
/* The following is a 16 bit 2's complement addition,
|
/* The following is a 16 bit 2's complement addition,
|
||||||
with overflow checking disabled */
|
with overflow checking disabled */
|
||||||
s->y[s->k] += s->y[s->j];
|
s->y[s->k] = (int16_t)(s->y[s->k] + s->y[s->j]);
|
||||||
ret_val = s->y[s->k];
|
ret_val = s->y[s->k];
|
||||||
if (--s->k < 0)
|
if (--s->k < 0)
|
||||||
s->k = 4;
|
s->k = 4;
|
||||||
|
@ -178,7 +178,7 @@ static int16_t decode(oki_adpcm_state_t *s, uint8_t adpcm)
|
|||||||
e += (ss >> 1);
|
e += (ss >> 1);
|
||||||
/*endif*/
|
/*endif*/
|
||||||
if (adpcm & 0x04)
|
if (adpcm & 0x04)
|
||||||
e += ss;
|
e = (int16_t)(e + ss);
|
||||||
/*endif*/
|
/*endif*/
|
||||||
if (adpcm & 0x08)
|
if (adpcm & 0x08)
|
||||||
e = -e;
|
e = -e;
|
||||||
@ -193,7 +193,7 @@ static int16_t decode(oki_adpcm_state_t *s, uint8_t adpcm)
|
|||||||
/*endif*/
|
/*endif*/
|
||||||
|
|
||||||
s->last = linear;
|
s->last = linear;
|
||||||
s->step_index += step_adjustment[adpcm & 0x07];
|
s->step_index = (int16_t)(s->step_index + step_adjustment[adpcm & 0x07]);
|
||||||
if (s->step_index < 0)
|
if (s->step_index < 0)
|
||||||
s->step_index = 0;
|
s->step_index = 0;
|
||||||
else if (s->step_index > 48)
|
else if (s->step_index > 48)
|
||||||
@ -222,13 +222,13 @@ static uint8_t encode(oki_adpcm_state_t *s, int16_t linear)
|
|||||||
if (e >= ss)
|
if (e >= ss)
|
||||||
{
|
{
|
||||||
adpcm |= (uint8_t) 0x04;
|
adpcm |= (uint8_t) 0x04;
|
||||||
e -= ss;
|
e = (int16_t)(e - ss);
|
||||||
}
|
}
|
||||||
/*endif*/
|
/*endif*/
|
||||||
if (e >= (ss >> 1))
|
if (e >= (ss >> 1))
|
||||||
{
|
{
|
||||||
adpcm |= (uint8_t) 0x02;
|
adpcm |= (uint8_t) 0x02;
|
||||||
e -= ss;
|
e = (int16_t)(e - ss);
|
||||||
}
|
}
|
||||||
/*endif*/
|
/*endif*/
|
||||||
if (e >= (ss >> 2))
|
if (e >= (ss >> 2))
|
||||||
|
@ -343,8 +343,8 @@ static __inline__ complexi16_t complex_muli16(const complexi16_t *x, const compl
|
|||||||
{
|
{
|
||||||
complexi16_t z;
|
complexi16_t z;
|
||||||
|
|
||||||
z.re = (int32_t) x->re*(int32_t) y->re - (int32_t) x->im*(int32_t) y->im;
|
z.re = (int16_t)((int32_t) x->re*(int32_t) y->re - (int32_t) x->im*(int32_t) y->im);
|
||||||
z.im = (int32_t) x->re*(int32_t) y->im + (int32_t) x->im*(int32_t) y->re;
|
z.im = (int16_t)((int32_t) x->re*(int32_t) y->im + (int32_t) x->im*(int32_t) y->re);
|
||||||
return z;
|
return z;
|
||||||
}
|
}
|
||||||
/*- End of function --------------------------------------------------------*/
|
/*- End of function --------------------------------------------------------*/
|
||||||
@ -353,8 +353,8 @@ static __inline__ complexi16_t complex_mul_q1_15(const complexi16_t *x, const co
|
|||||||
{
|
{
|
||||||
complexi16_t z;
|
complexi16_t z;
|
||||||
|
|
||||||
z.re = ((int32_t) x->re*(int32_t) y->re - (int32_t) x->im*(int32_t) y->im) >> 15;
|
z.re = (int16_t)(((int32_t) x->re*(int32_t) y->re - (int32_t) x->im*(int32_t) y->im) >> 15);
|
||||||
z.im = ((int32_t) x->re*(int32_t) y->im + (int32_t) x->im*(int32_t) y->re) >> 15;
|
z.im = (int16_t)(((int32_t) x->re*(int32_t) y->im + (int32_t) x->im*(int32_t) y->re) >> 15);
|
||||||
return z;
|
return z;
|
||||||
}
|
}
|
||||||
/*- End of function --------------------------------------------------------*/
|
/*- End of function --------------------------------------------------------*/
|
||||||
|
@ -300,7 +300,7 @@ SPAN_DECLARE(void) vec_lmsi16(const int16_t x[], int16_t y[], int n, int16_t err
|
|||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < n; i++)
|
for (i = 0; i < n; i++)
|
||||||
y[i] += ((int32_t) x[i]*(int32_t) error) >> 15;
|
y[i] = (int16_t) (y[i] + (((int32_t) x[i]*(int32_t) error) >> 15));
|
||||||
}
|
}
|
||||||
/*- End of function --------------------------------------------------------*/
|
/*- End of function --------------------------------------------------------*/
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user