[xiph-cvs] cvs commit: speex/libspeex bits.c cb_search.c ltp.c math_approx.c misc.h nb_celp.c speex_callbacks.h

Jean-Marc Valin jm at xiph.org
Mon Mar 10 09:16:18 PST 2003



jm          03/03/10 12:16:18

  Modified:    libspeex bits.c cb_search.c ltp.c math_approx.c misc.h
                        nb_celp.c speex_callbacks.h
  Log:
  Removed some gcc warnings

Revision  Changes    Path
1.26      +1 -1      speex/libspeex/bits.c

Index: bits.c
===================================================================
RCS file: /usr/local/cvsroot/speex/libspeex/bits.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- bits.c	9 Jan 2003 16:30:00 -0000	1.25
+++ bits.c	10 Mar 2003 17:16:17 -0000	1.26
@@ -120,7 +120,7 @@
    bits->overflow=0;
 }
 
-void speex_bits_flush(SpeexBits *bits)
+static void speex_bits_flush(SpeexBits *bits)
 {
    int i;
    if (bits->bytePtr>0)

<p><p>1.85      +3 -3      speex/libspeex/cb_search.c

Index: cb_search.c
===================================================================
RCS file: /usr/local/cvsroot/speex/libspeex/cb_search.c,v
retrieving revision 1.84
retrieving revision 1.85
diff -u -r1.84 -r1.85
--- cb_search.c	27 Jan 2003 22:09:39 -0000	1.84
+++ cb_search.c	10 Mar 2003 17:16:17 -0000	1.85
@@ -257,10 +257,10 @@
       /*update old-new data*/
       /* just swap pointers instead of a long copy */
       {
-         float **tmp;
-         tmp=ot;
+         float **tmp2;
+         tmp2=ot;
          ot=nt;
-         nt=tmp;
+         nt=tmp2;
       }
       for (j=0;j<N;j++)
          for (m=0;m<nb_subvect;m++)

<p><p>1.74      +6 -53     speex/libspeex/ltp.c

Index: ltp.c
===================================================================
RCS file: /usr/local/cvsroot/speex/libspeex/ltp.c,v
retrieving revision 1.73
retrieving revision 1.74
diff -u -r1.73 -r1.74
--- ltp.c	28 Jan 2003 06:52:40 -0000	1.73
+++ ltp.c	10 Mar 2003 17:16:17 -0000	1.74
@@ -271,53 +271,6 @@
 
       *cdbk_index=best_cdbk;
    }
-   /* Calculate gains by matrix inversion... (unquantized) */
-   if (0) {
-      float tmp;
-      float B[3][3];
-      A[0][0]+=1;
-      A[1][1]+=1;
-      A[2][2]+=1;
-      
-      for (i=0;i<3;i++)
-         for (j=0;j<3;j++)
-            B[i][j]=A[i][j];
-
-
-      tmp=A[1][0]/A[0][0];
-      for (i=0;i<3;i++)
-         A[1][i] -= tmp*A[0][i];
-      corr[1] -= tmp*corr[0];
-
-      tmp=A[2][0]/A[0][0];
-      for (i=0;i<3;i++)
-         A[2][i] -= tmp*A[0][i];
-      corr[2] -= tmp*corr[0];
-      
-      tmp=A[2][1]/A[1][1];
-      A[2][2] -= tmp*A[1][2];
-      corr[2] -= tmp*corr[1];
-
-      corr[2] /= A[2][2];
-      corr[1] = (corr[1] - A[1][2]*corr[2])/A[1][1];
-      corr[0] = (corr[0] - A[0][2]*corr[2] - A[0][1]*corr[1])/A[0][0];
-      /*printf ("\n%f %f %f\n", best_corr[0], best_corr[1], best_corr[2]);*/
-
-   
-      /* Put gains in right order */
-      gain[0]=corr[2];gain[1]=corr[1];gain[2]=corr[0];
-
-      {
-         float gain_sum = gain[0]+gain[1]+gain[2];
-         if (fabs(gain_sum)>2.5)
-         {
-            float fact = 2.5/gain_sum;
-            for (i=0;i<3;i++)
-               gain[i]*=fact;
-         }
-      }
-      
-   }
    
    for (i=0;i<nsf;i++)
       exc[i]=gain[0]*e[2][i]+gain[1]*e[1][i]+gain[2]*e[0][i];
@@ -512,18 +465,18 @@
          }
 #else
          {
-            int tmp1, tmp2;
+            int tmp1, tmp3;
             tmp1=nsf;
             if (tmp1>pp)
                tmp1=pp;
             for (j=0;j<tmp1;j++)
                e[i][j]=exc[j-pp];
-            tmp2=nsf;
-            if (tmp2>pp+pitch)
-               tmp2=pp+pitch;
-            for (j=tmp1;j<tmp2;j++)
+            tmp3=nsf;
+            if (tmp3>pp+pitch)
+               tmp3=pp+pitch;
+            for (j=tmp1;j<tmp3;j++)
                e[i][j]=exc[j-pp-pitch];
-            for (j=tmp2;j<nsf;j++)
+            for (j=tmp3;j<nsf;j++)
                e[i][j]=0;
          }
 #endif

<p><p>1.3       +1 -0      speex/libspeex/math_approx.c

Index: math_approx.c
===================================================================
RCS file: /usr/local/cvsroot/speex/libspeex/math_approx.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- math_approx.c	5 Mar 2003 17:46:24 -0000	1.2
+++ math_approx.c	10 Mar 2003 17:16:17 -0000	1.3
@@ -31,6 +31,7 @@
 */
 
 #include <math.h>
+#include "math_approx.h"
 
 float cos_sin[102] = {
    1.00000000, 0.00000000,

<p><p>1.19      +1 -1      speex/libspeex/misc.h

Index: misc.h
===================================================================
RCS file: /usr/local/cvsroot/speex/libspeex/misc.h,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- misc.h	5 Mar 2003 17:47:14 -0000	1.18
+++ misc.h	10 Mar 2003 17:16:17 -0000	1.19
@@ -40,7 +40,7 @@
 #endif
 
 /*Disable some warnings on VC++*/
-#if _MSC_VER
+#ifdef _MSC_VER
 #pragma warning(disable : 4244)
 #pragma warning(disable : 4305)
 #endif

<p><p>1.114     +5 -7      speex/libspeex/nb_celp.c

Index: nb_celp.c
===================================================================
RCS file: /usr/local/cvsroot/speex/libspeex/nb_celp.c,v
retrieving revision 1.113
retrieving revision 1.114
diff -u -r1.113 -r1.114
--- nb_celp.c	3 Mar 2003 06:52:41 -0000	1.113
+++ nb_celp.c	10 Mar 2003 17:16:17 -0000	1.114
@@ -1055,8 +1055,6 @@
             wideband = speex_bits_unpack_unsigned(bits, 1);
             if (wideband)
             {
-               int submode;
-               int advance;
                advance = submode = speex_bits_unpack_unsigned(bits, SB_SUBMODE_BITS);
                speex_mode_query(&speex_wb_mode, SPEEX_SUBMODE_BITS_PER_FRAME, &advance);
                if (advance < 0)
@@ -1118,9 +1116,9 @@
         st->exc[i]=0;*/
       {
          float innov_gain=0;
-         float pitch_gain=st->last_pitch_gain;
-         if (pitch_gain>.6)
-            pitch_gain=.6;
+         float pgain=st->last_pitch_gain;
+         if (pgain>.6)
+            pgain=.6;
          for (i=0;i<st->frameSize;i++)
             innov_gain += st->innov[i]*st->innov[i];
          innov_gain=sqrt(innov_gain/st->frameSize);
@@ -1391,9 +1389,9 @@
                g=1;
             for (i=0;i<st->subframeSize;i++)
             {
-               float tmp=exc[i];
+               float exci=exc[i];
                exc[i]=.8*g*exc[i]*ol_gain + .6*g*st->voc_m1*ol_gain + .5*g*innov[i] - .5*g*st->voc_m2 + (1-g)*innov[i];
-               st->voc_m1 = tmp;
+               st->voc_m1 = exci;
                st->voc_m2=innov[i];
                st->voc_mean = .95*st->voc_mean + .05*exc[i];
                exc[i]-=st->voc_mean;

<p><p>1.9       +12 -0     speex/libspeex/speex_callbacks.h

Index: speex_callbacks.h
===================================================================
RCS file: /usr/local/cvsroot/speex/libspeex/speex_callbacks.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- speex_callbacks.h	3 Mar 2003 06:52:41 -0000	1.8
+++ speex_callbacks.h	10 Mar 2003 17:16:17 -0000	1.9
@@ -108,6 +108,18 @@
 /** Default handler for user-defined requests: in this case, just ignore */
 int speex_default_user_handler(SpeexBits *bits, void *state, void *data);
 
+
+
+
+int speex_std_low_mode_request_handler(SpeexBits *bits, void *state, void *data);
+
+int speex_std_vbr_request_handler(SpeexBits *bits, void *state, void *data);
+
+int speex_std_enh_request_handler(SpeexBits *bits, void *state, void *data);
+
+int speex_std_vbr_quality_request_handler(SpeexBits *bits, void *state, void *data);
+
+
 #ifdef __cplusplus
 }
 #endif

<p><p>--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the commits mailing list