Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/xiph/speex.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik de Castro Lopo <erikd@mega-nerd.com>2015-07-20 13:30:14 +0300
committerTristan Matthews <tmatth@videolan.org>2015-07-22 07:53:10 +0300
commitd2495c6f4cf53b0be77ce814e58826a2b27f8a88 (patch)
tree007b5740d83df21525bd5a95df293839c9cd462c
parentd9cd05188a20515f02087ef95d7c2a06dc41d4e2 (diff)
Fix compiler warnings from -Wall
-rw-r--r--libspeex/cb_search.c4
-rw-r--r--libspeex/lsp.c8
-rw-r--r--libspeex/nb_celp.c8
-rw-r--r--libspeex/testenc_uwb.c3
-rw-r--r--libspeex/vbr.c8
-rw-r--r--libspeex/vq_sse.h12
-rw-r--r--src/wav_io.c3
7 files changed, 16 insertions, 30 deletions
diff --git a/libspeex/cb_search.c b/libspeex/cb_search.c
index 7f5649e..a170fd6 100644
--- a/libspeex/cb_search.c
+++ b/libspeex/cb_search.c
@@ -531,14 +531,14 @@ spx_int32_t *seed
VARDECL(int *ind);
VARDECL(int *signs);
const signed char *shape_cb;
- int shape_cb_size, subvect_size, nb_subvect;
+ int subvect_size, nb_subvect;
const split_cb_params *params;
int have_sign;
params = (const split_cb_params *) par;
subvect_size = params->subvect_size;
nb_subvect = params->nb_subvect;
- shape_cb_size = 1<<params->shape_bits;
+
shape_cb = params->shape_cb;
have_sign = params->have_sign;
diff --git a/libspeex/lsp.c b/libspeex/lsp.c
index 77254d4..c862eae 100644
--- a/libspeex/lsp.c
+++ b/libspeex/lsp.c
@@ -228,7 +228,7 @@ int lpc_to_lsp (spx_coef_t *a,int lpcrdr,spx_lsp_t *freq,int nb,spx_word16_t del
{
spx_word16_t temp_xr,xl,xr,xm=0;
spx_word32_t psuml,psumr,psumm,temp_psumr/*,temp_qsumr*/;
- int i,j,m,flag,k;
+ int i,j,m,k;
VARDECL(spx_word32_t *Q); /* ptrs for memory allocation */
VARDECL(spx_word32_t *P);
VARDECL(spx_word16_t *Q16); /* ptrs for memory allocation */
@@ -240,8 +240,6 @@ int lpc_to_lsp (spx_coef_t *a,int lpcrdr,spx_lsp_t *freq,int nb,spx_word16_t del
spx_word16_t *pt; /* ptr used for cheb_poly_eval()
whether P' or Q' */
int roots=0; /* DR 8/2/94: number of roots found */
- flag = 1; /* program is searching for a root when,
- 1 else has found one */
m = lpcrdr/2; /* order of P'(z) & Q'(z) polynomials */
/* Allocate memory space for polynomials */
@@ -324,7 +322,7 @@ int lpc_to_lsp (spx_coef_t *a,int lpcrdr,spx_lsp_t *freq,int nb,spx_word16_t del
pt = P16;
psuml = cheb_poly_eva(pt,xl,m,stack); /* evals poly. at xl */
- flag = 1;
+
while(xr >= -FREQ_SCALE){
spx_word16_t dd;
/* Modified by JMV to provide smaller steps around x=+-1 */
@@ -377,7 +375,7 @@ int lpc_to_lsp (spx_coef_t *a,int lpcrdr,spx_lsp_t *freq,int nb,spx_word16_t del
/* once zero is found, reset initial interval to xr */
freq[j] = X2ANGLE(xm);
xl = xm;
- break; /* reset flag for next search */
+ break;
}
else{
psuml=temp_psumr;
diff --git a/libspeex/nb_celp.c b/libspeex/nb_celp.c
index 3956cb6..b68d507 100644
--- a/libspeex/nb_celp.c
+++ b/libspeex/nb_celp.c
@@ -1120,10 +1120,10 @@ void *nb_decoder_init(const SpeexMode *m)
void nb_decoder_destroy(void *state)
{
+#if !(defined(VAR_ARRAYS) || defined (USE_ALLOCA))
DecState *st;
st=(DecState*)state;
-#if !(defined(VAR_ARRAYS) || defined (USE_ALLOCA))
speex_free_scratch(st->stack);
#endif
@@ -1552,7 +1552,6 @@ int nb_decode(void *state, SpeexBits *bits, void *vout)
{
int offset;
spx_word16_t *exc;
- spx_word16_t *sp;
spx_word16_t *innov_save = NULL;
spx_word16_t tmp;
@@ -1561,7 +1560,6 @@ int nb_decode(void *state, SpeexBits *bits, void *vout)
/* Excitation */
exc=st->exc+offset;
/* Original signal */
- sp=out+offset;
if (st->innov_save)
innov_save = st->innov_save+offset;
@@ -1754,13 +1752,11 @@ int nb_decode(void *state, SpeexBits *bits, void *vout)
{
int offset;
spx_word16_t *sp;
- spx_word16_t *exc;
+
/* Offset relative to start of frame */
offset = NB_SUBFRAME_SIZE*sub;
/* Original signal */
sp=out+offset;
- /* Excitation */
- exc=st->exc+offset;
/* LSP interpolation (quantized and unquantized) */
lsp_interpolate(st->old_qlsp, qlsp, interp_qlsp, NB_ORDER, sub, NB_NB_SUBFRAMES, LSP_MARGIN);
diff --git a/libspeex/testenc_uwb.c b/libspeex/testenc_uwb.c
index 16da3cc..9c144fd 100644
--- a/libspeex/testenc_uwb.c
+++ b/libspeex/testenc_uwb.c
@@ -18,7 +18,6 @@ int main(int argc, char **argv)
FILE *fin, *fout, *fbits=NULL;
short in_short[FRAME_SIZE];
short out_short[FRAME_SIZE];
- float in_float[FRAME_SIZE];
float sigpow,errpow,snr, seg_snr=0;
int snr_frames = 0;
char cbits[200];
@@ -82,8 +81,6 @@ int main(int argc, char **argv)
fread(in_short, sizeof(short), FRAME_SIZE, fin);
if (feof(fin))
break;
- for (i=0;i<FRAME_SIZE;i++)
- in_float[i]=in_short[i];
speex_bits_reset(&bits);
speex_encode_int(st, in_short, &bits);
diff --git a/libspeex/vbr.c b/libspeex/vbr.c
index 16d5dc0..015ecd2 100644
--- a/libspeex/vbr.c
+++ b/libspeex/vbr.c
@@ -125,7 +125,6 @@ float vbr_analysis(VBRState *vbr, spx_word16_t *sig, int len, int pitch, float p
int i;
float ener=0, ener1=0, ener2=0;
float qual=7;
- int va;
float log_energy;
float non_st=0;
float voicing;
@@ -158,7 +157,7 @@ float vbr_analysis(VBRState *vbr, spx_word16_t *sig, int len, int pitch, float p
|| (voicing<0 && non_st < .05))
{
float tmp;
- va = 0;
+
vbr->consec_noise++;
if (pow_ener > 3*vbr->noise_level)
tmp = 3*vbr->noise_level;
@@ -170,7 +169,6 @@ float vbr_analysis(VBRState *vbr, spx_word16_t *sig, int len, int pitch, float p
vbr->noise_accum_count = .95*vbr->noise_accum_count + .05;
}
} else {
- va = 1;
vbr->consec_noise=0;
}
@@ -253,7 +251,7 @@ float vbr_analysis(VBRState *vbr, spx_word16_t *sig, int len, int pitch, float p
if (qual<-1)
qual=-1;
- /*printf ("%f %f %f %f %d\n", qual, voicing, non_st, pow_ener/(.01+vbr->noise_level), va);*/
+ /*printf ("%f %f %f %f\n", qual, voicing, non_st, pow_ener/(.01+vbr->noise_level));*/
vbr->last_pitch_coef = pitch_coef;
vbr->last_quality = qual;
@@ -262,7 +260,7 @@ float vbr_analysis(VBRState *vbr, spx_word16_t *sig, int len, int pitch, float p
vbr->last_log_energy[i] = vbr->last_log_energy[i-1];
vbr->last_log_energy[0] = log_energy;
- /*printf ("VBR: %f %f %f %d %f\n", (float)(log_energy-log(vbr->average_energy+MIN_ENERGY)), non_st, voicing, va, vbr->noise_level);*/
+ /*printf ("VBR: %f %f %f %f\n", (float)(log_energy-log(vbr->average_energy+MIN_ENERGY)), non_st, voicing, vbr->noise_level);*/
return qual;
}
diff --git a/libspeex/vq_sse.h b/libspeex/vq_sse.h
index 00a42ce..2abe880 100644
--- a/libspeex/vq_sse.h
+++ b/libspeex/vq_sse.h
@@ -7,18 +7,18 @@
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
-
+
- Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
-
+
- Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
-
+
- Neither the name of the Xiph.org Foundation nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
-
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
@@ -77,10 +77,10 @@ void vq_nbest_sign(spx_word16_t *_in, const __m128 *codebook, int len, int entri
int i,j,k,used;
VARDECL(float *dist);
VARDECL(__m128 *in);
- __m128 half;
+
used = 0;
ALLOC(dist, entries, float);
- half = _mm_set_ps1(.5f);
+
ALLOC(in, len, __m128);
for (i=0;i<len;i++)
in[i] = _mm_set_ps1(_in[i]);
diff --git a/src/wav_io.c b/src/wav_io.c
index 8544288..c2e2bc8 100644
--- a/src/wav_io.c
+++ b/src/wav_io.c
@@ -188,12 +188,9 @@ int read_wav_header(FILE *file, int *rate, int *channels, int *format, spx_int32
void write_wav_header(FILE *file, int rate, int channels, int format, int size)
{
- char ch[5];
spx_int32_t itmp;
spx_int16_t stmp;
- ch[4]=0;
-
fprintf (file, "RIFF");
itmp = 0x7fffffff;