[xiph-commits] r9099 - in trunk/speex: include/speex libspeex

jm at motherfish-iii.xiph.org jm at motherfish-iii.xiph.org
Tue Mar 29 19:31:25 PST 2005


Author: jm
Date: 2005-03-29 19:31:21 -0800 (Tue, 29 Mar 2005)
New Revision: 9099

Modified:
   trunk/speex/include/speex/speex.h
   trunk/speex/include/speex/speex_jitter.h
   trunk/speex/libspeex/cb_search.c
   trunk/speex/libspeex/filters.c
   trunk/speex/libspeex/filters.h
   trunk/speex/libspeex/ltp.c
   trunk/speex/libspeex/nb_celp.c
   trunk/speex/libspeex/sb_celp.c
   trunk/speex/libspeex/speex.c
Log:
Removed another bunch of warnings (when using some of the -W options)


Modified: trunk/speex/include/speex/speex.h
===================================================================
--- trunk/speex/include/speex/speex.h	2005-03-30 01:13:35 UTC (rev 9098)
+++ trunk/speex/include/speex/speex.h	2005-03-30 03:31:21 UTC (rev 9099)
@@ -241,7 +241,7 @@
    mode_query_func query;
    
    /** The name of the mode (you should not rely on this to identify the mode)*/
-   char *modeName;
+   const char *modeName;
 
    /**ID of the mode*/
    int modeID;
@@ -395,7 +395,7 @@
 extern const SpeexMode * const speex_mode_list[SPEEX_NB_MODES];
 
 /** Obtain one of the modes available */
-const SpeexMode * const speex_lib_get_mode (int mode);
+const SpeexMode * speex_lib_get_mode (int mode);
 
 #ifdef __cplusplus
 }

Modified: trunk/speex/include/speex/speex_jitter.h
===================================================================
--- trunk/speex/include/speex/speex_jitter.h	2005-03-30 01:13:35 UTC (rev 9098)
+++ trunk/speex/include/speex/speex_jitter.h	2005-03-30 03:31:21 UTC (rev 9099)
@@ -77,6 +77,8 @@
 
 void speex_jitter_get(SpeexJitter *jitter, short *out, int *current_timestamp);
 
+int speex_jitter_get_pointer_timestamp(SpeexJitter *jitter);
+
 #ifdef __cplusplus
 }
 #endif

Modified: trunk/speex/libspeex/cb_search.c
===================================================================
--- trunk/speex/libspeex/cb_search.c	2005-03-30 01:13:35 UTC (rev 9098)
+++ trunk/speex/libspeex/cb_search.c	2005-03-30 03:31:21 UTC (rev 9099)
@@ -81,7 +81,7 @@
 
 
 
-void split_cb_search_shape_sign_N1(
+static void split_cb_search_shape_sign_N1(
 spx_sig_t target[],			/* target vector */
 spx_coef_t ak[],			/* LPCs for this subframe */
 spx_coef_t awk1[],			/* Weighted LPCs for this subframe */
@@ -110,7 +110,7 @@
    VARDECL(spx_sig_t *e);
    const signed char *shape_cb;
    int shape_cb_size, subvect_size, nb_subvect;
-   split_cb_params *params;
+   const split_cb_params *params;
    int N=2;
    int best_index;
    spx_word32_t best_dist;
@@ -121,7 +121,7 @@
    if (N<1)
       N=1;
    
-   params = (split_cb_params *) par;
+   params = (const split_cb_params *) par;
    subvect_size = params->subvect_size;
    nb_subvect = params->nb_subvect;
    shape_cb_size = 1<<params->shape_bits;
@@ -272,7 +272,7 @@
    VARDECL(int *ind);
    const signed char *shape_cb;
    int shape_cb_size, subvect_size, nb_subvect;
-   split_cb_params *params;
+   const split_cb_params *params;
    int N=2;
    VARDECL(int *best_index);
    VARDECL(spx_word32_t *best_dist);
@@ -293,7 +293,7 @@
    ALLOC(oind, N, int*);
    ALLOC(nind, N, int*);
 
-   params = (split_cb_params *) par;
+   params = (const split_cb_params *) par;
    subvect_size = params->subvect_size;
    nb_subvect = params->nb_subvect;
    shape_cb_size = 1<<params->shape_bits;
@@ -537,10 +537,10 @@
    VARDECL(int *signs);
    const signed char *shape_cb;
    int shape_cb_size, subvect_size, nb_subvect;
-   split_cb_params *params;
+   const split_cb_params *params;
    int have_sign;
 
-   params = (split_cb_params *) par;
+   params = (const split_cb_params *) par;
    subvect_size = params->subvect_size;
    nb_subvect = params->nb_subvect;
    shape_cb_size = 1<<params->shape_bits;

Modified: trunk/speex/libspeex/filters.c
===================================================================
--- trunk/speex/libspeex/filters.c	2005-03-30 01:13:35 UTC (rev 9098)
+++ trunk/speex/libspeex/filters.c	2005-03-30 03:31:21 UTC (rev 9099)
@@ -36,7 +36,6 @@
 
 #include "filters.h"
 #include "stack_alloc.h"
-#include <math.h>
 #include "misc.h"
 #include "math_approx.h"
 #include "ltp.h"

Modified: trunk/speex/libspeex/filters.h
===================================================================
--- trunk/speex/libspeex/filters.h	2005-03-30 01:13:35 UTC (rev 9098)
+++ trunk/speex/libspeex/filters.h	2005-03-30 03:31:21 UTC (rev 9099)
@@ -52,7 +52,7 @@
 } CombFilterMem;
 
 
-void qmf_decomp(const spx_word16_t *xx, const spx_word16_t *aa, spx_sig_t *y1, spx_sig_t *y2, int N, int M, spx_word16_t *mem, char *stack);
+void qmf_decomp(const spx_word16_t *xx, const spx_word16_t *aa, spx_sig_t *, spx_sig_t *y2, int N, int M, spx_word16_t *mem, char *stack);
 void fir_mem_up(const spx_sig_t *x, const spx_word16_t *a, spx_sig_t *y, int N, int M, spx_word32_t *mem, char *stack);
 
 
@@ -61,7 +61,7 @@
 void iir_mem2(const spx_sig_t *x, const spx_coef_t *den, spx_sig_t *y, int N, int ord, spx_mem_t *mem);
 
 /* Apply bandwidth expansion on LPC coef */
-void bw_lpc(spx_word16_t gamma, const spx_coef_t *lpc_in, spx_coef_t *lpc_out, int order);
+void bw_lpc(spx_word16_t , const spx_coef_t *lpc_in, spx_coef_t *lpc_out, int order);
 
 
 

Modified: trunk/speex/libspeex/ltp.c
===================================================================
--- trunk/speex/libspeex/ltp.c	2005-03-30 01:13:35 UTC (rev 9098)
+++ trunk/speex/libspeex/ltp.c	2005-03-30 03:31:21 UTC (rev 9099)
@@ -291,7 +291,7 @@
 )
 {
    int i,j;
-   VARDECL(spx_sig_t *tmp);
+   VARDECL(spx_sig_t *tmp1);
    VARDECL(spx_sig_t *tmp2);
    spx_sig_t *x[3];
    spx_sig_t *e[3];
@@ -306,12 +306,12 @@
    params = (const ltp_params*) par;
    gain_cdbk_size = 1<<params->gain_bits;
    gain_cdbk = params->gain_cdbk + 3*gain_cdbk_size*cdbk_offset;
-   ALLOC(tmp, 3*nsf, spx_sig_t);
+   ALLOC(tmp1, 3*nsf, spx_sig_t);
    ALLOC(tmp2, 3*nsf, spx_sig_t);
 
-   x[0]=tmp;
-   x[1]=tmp+nsf;
-   x[2]=tmp+2*nsf;
+   x[0]=tmp1;
+   x[1]=tmp1+nsf;
+   x[2]=tmp1+2*nsf;
    
    e[0]=tmp2;
    e[1]=tmp2+nsf;

Modified: trunk/speex/libspeex/nb_celp.c
===================================================================
--- trunk/speex/libspeex/nb_celp.c	2005-03-30 01:13:35 UTC (rev 9098)
+++ trunk/speex/libspeex/nb_celp.c	2005-03-30 03:31:21 UTC (rev 9099)
@@ -94,7 +94,7 @@
    const SpeexNBMode *mode;
    int i;
 
-   mode=(SpeexNBMode *)m->mode;
+   mode=(const SpeexNBMode *)m->mode;
    st = (EncState*)speex_alloc(sizeof(EncState)+8000*sizeof(spx_sig_t));
    if (!st)
       return NULL;
@@ -932,7 +932,7 @@
    const SpeexNBMode *mode;
    int i;
 
-   mode=(SpeexNBMode*)m->mode;
+   mode=(const SpeexNBMode*)m->mode;
    st = (DecState *)speex_alloc(sizeof(DecState)+4000*sizeof(spx_sig_t));
    st->mode=m;
 
@@ -1723,7 +1723,7 @@
             quality = 0;
          if (quality > 10)
             quality = 10;
-         st->submodeSelect = st->submodeID = ((SpeexNBMode*)(st->mode->mode))->quality_map[quality];
+         st->submodeSelect = st->submodeID = ((const SpeexNBMode*)(st->mode->mode))->quality_map[quality];
       }
       break;
    case SPEEX_SET_COMPLEXITY:

Modified: trunk/speex/libspeex/sb_celp.c
===================================================================
--- trunk/speex/libspeex/sb_celp.c	2005-03-30 01:13:35 UTC (rev 9098)
+++ trunk/speex/libspeex/sb_celp.c	2005-03-30 03:31:21 UTC (rev 9099)
@@ -190,16 +190,16 @@
 };
 #endif
 
-static void mix_and_saturate(spx_word32_t *y0, spx_word32_t *y1, spx_word16_t *out, int len)
+static void mix_and_saturate(spx_word32_t *x0, spx_word32_t *x1, spx_word16_t *out, int len)
 {
    int i;
    for (i=0;i<len;i++)
    {
       spx_word32_t tmp;
 #ifdef FIXED_POINT
-      tmp=PSHR(y0[i]-y1[i],SIG_SHIFT-1);
+      tmp=PSHR(x0[i]-x1[i],SIG_SHIFT-1);
 #else
-      tmp=2*(y0[i]-y1[i]);
+      tmp=2*(x0[i]-x1[i]);
 #endif
       if (tmp>32767)
          out[i] = 32767;
@@ -218,7 +218,7 @@
 
    st = (SBEncState*)speex_alloc(sizeof(SBEncState)+10000*sizeof(spx_sig_t));
    st->mode = m;
-   mode = (SpeexSBMode*)m->mode;
+   mode = (const SpeexSBMode*)m->mode;
 
    st->stack = ((char*)st) + sizeof(SBEncState);
 
@@ -333,13 +333,13 @@
    VARDECL(spx_word32_t *low_pi_gain);
    VARDECL(spx_sig_t *low_exc);
    VARDECL(spx_sig_t *low_innov);
-   SpeexSBMode *mode;
+   const SpeexSBMode *mode;
    int dtx;
    spx_word16_t *in = vin;
 
    st = (SBEncState*)state;
    stack=st->stack;
-   mode = (SpeexSBMode*)(st->mode->mode);
+   mode = (const SpeexSBMode*)(st->mode->mode);
 
    {
       VARDECL(spx_word16_t *low);
@@ -783,7 +783,7 @@
    const SpeexSBMode *mode;
    st = (SBDecState*)speex_alloc(sizeof(SBDecState)+6000*sizeof(spx_sig_t));
    st->mode = m;
-   mode=(SpeexSBMode*)m->mode;
+   mode=(const SpeexSBMode*)m->mode;
 
    st->encode_submode = 1;
 
@@ -938,12 +938,12 @@
    VARDECL(spx_coef_t *awk2);
    VARDECL(spx_coef_t *awk3);
    int dtx;
-   SpeexSBMode *mode;
+   const SpeexSBMode *mode;
    spx_word16_t *out = vout;
    
    st = (SBDecState*)state;
    stack=st->stack;
-   mode = (SpeexSBMode*)(st->mode->mode);
+   mode = (const SpeexSBMode*)(st->mode->mode);
 
    {
       VARDECL(spx_word16_t *low);
@@ -1280,8 +1280,8 @@
             quality = 0;
          if (quality > 10)
             quality = 10;
-         st->submodeSelect = st->submodeID = ((SpeexSBMode*)(st->mode->mode))->quality_map[quality];
-         nb_qual = ((SpeexSBMode*)(st->mode->mode))->low_quality_map[quality];
+         st->submodeSelect = st->submodeID = ((const SpeexSBMode*)(st->mode->mode))->quality_map[quality];
+         nb_qual = ((const SpeexSBMode*)(st->mode->mode))->low_quality_map[quality];
          speex_encoder_ctl(st->st_low, SPEEX_SET_MODE, &nb_qual);
       }
       break;
@@ -1422,8 +1422,8 @@
             quality = 0;
          if (quality > 10)
             quality = 10;
-         st->submodeID = ((SpeexSBMode*)(st->mode->mode))->quality_map[quality];
-         nb_qual = ((SpeexSBMode*)(st->mode->mode))->low_quality_map[quality];
+         st->submodeID = ((const SpeexSBMode*)(st->mode->mode))->quality_map[quality];
+         nb_qual = ((const SpeexSBMode*)(st->mode->mode))->low_quality_map[quality];
          speex_decoder_ctl(st->st_low, SPEEX_SET_MODE, &nb_qual);
       }
       break;

Modified: trunk/speex/libspeex/speex.c
===================================================================
--- trunk/speex/libspeex/speex.c	2005-03-30 01:13:35 UTC (rev 9098)
+++ trunk/speex/libspeex/speex.c	2005-03-30 03:31:21 UTC (rev 9099)
@@ -247,10 +247,10 @@
          *((int*)ptr) = SPEEX_MICRO_VERSION;
          break;
       case SPEEX_LIB_GET_EXTRA_VERSION:
-         *((char**)ptr) = SPEEX_EXTRA_VERSION;
+         *((const char**)ptr) = SPEEX_EXTRA_VERSION;
          break;
       case SPEEX_LIB_GET_VERSION_STRING:
-         *((char**)ptr) = SPEEX_VERSION;
+         *((const char**)ptr) = SPEEX_VERSION;
          break;
       /*case SPEEX_LIB_SET_ALLOC_FUNC:
          break;



More information about the commits mailing list