[xiph-commits] r11139 - trunk/speex/libspeex

jm at svn.xiph.org jm at svn.xiph.org
Thu Apr 13 22:11:16 PDT 2006


Author: jm
Date: 2006-04-13 22:11:14 -0700 (Thu, 13 Apr 2006)
New Revision: 11139

Modified:
   trunk/speex/libspeex/jitter.c
   trunk/speex/libspeex/mdf.c
Log:
fixed warnings, added const where appropriate


Modified: trunk/speex/libspeex/jitter.c
===================================================================
--- trunk/speex/libspeex/jitter.c	2006-04-14 05:00:44 UTC (rev 11138)
+++ trunk/speex/libspeex/jitter.c	2006-04-14 05:11:14 UTC (rev 11139)
@@ -341,9 +341,9 @@
    if (i==SPEEX_JITTER_MAX_BUFFER_SIZE)
    {
       int found = 0;
-      spx_uint32_t best_time;
-      int best_span;
-      int besti;
+      spx_uint32_t best_time=0;
+      int best_span=0;
+      int besti=0;
       for (i=0;i<SPEEX_JITTER_MAX_BUFFER_SIZE;i++)
       {
          /* check if packet starts within current chunk */

Modified: trunk/speex/libspeex/mdf.c
===================================================================
--- trunk/speex/libspeex/mdf.c	2006-04-14 05:00:44 UTC (rev 11138)
+++ trunk/speex/libspeex/mdf.c	2006-04-14 05:11:14 UTC (rev 11139)
@@ -188,7 +188,7 @@
 }
 
 /** Compute power spectrum of a half-complex (packed) vector */
-static inline void power_spectrum(spx_word16_t *X, spx_word32_t *ps, int N)
+static inline void power_spectrum(const spx_word16_t *X, spx_word32_t *ps, int N)
 {
    int i, j;
    ps[0]=MULT16_16(X[0],X[0]);
@@ -201,7 +201,7 @@
 
 /** Compute cross-power spectrum of a half-complex (packed) vectors and add to acc */
 #ifdef FIXED_POINT
-static inline void spectral_mul_accum(spx_word16_t *X, spx_word32_t *Y, spx_word16_t *acc, int N, int M)
+static inline void spectral_mul_accum(const spx_word16_t *X, const spx_word32_t *Y, spx_word16_t *acc, int N, int M)
 {
    int i,j;
    spx_word32_t tmp1=0,tmp2=0;
@@ -229,7 +229,7 @@
    acc[N-1] = PSHR32(tmp1,WEIGHT_SHIFT);
 }
 #else
-static inline void spectral_mul_accum(spx_word16_t *X, spx_word32_t *Y, spx_word16_t *acc, int N, int M)
+static inline void spectral_mul_accum(const spx_word16_t *X, const spx_word32_t *Y, spx_word16_t *acc, int N, int M)
 {
    int i,j;
    for (i=0;i<N;i++)
@@ -250,7 +250,7 @@
 #endif
 
 /** Compute weighted cross-power spectrum of a half-complex (packed) vector with conjugate */
-static inline void weighted_spectral_mul_conj(spx_float_t *w, spx_word16_t *X, spx_word16_t *Y, spx_word32_t *prod, int N)
+static inline void weighted_spectral_mul_conj(const spx_float_t *w, const spx_word16_t *X, const spx_word16_t *Y, spx_word32_t *prod, int N)
 {
    int i, j;
    prod[0] = FLOAT_MUL32(w[0],MULT16_16(X[0],Y[0]));



More information about the commits mailing list