[xiph-cvs] cvs commit: speex/libspeex misc.h nb_celp.c quant_lsp.c sb_celp.c

Jean-Marc Valin jm at xiph.org
Tue Nov 11 18:47:38 PST 2003



jm          03/11/11 21:47:38

  Modified:    libspeex Tag: rel-1-0-branch misc.h nb_celp.c quant_lsp.c
                        sb_celp.c
  Log:
  fixed multi-threading issue (removed static weight array) and fixed
  underflow problems that made the decoder (and encoder?) run very slow
  in some cases.

Revision  Changes    Path
No                   revision

<p>No                   revision

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

Index: misc.h
===================================================================
RCS file: /usr/local/cvsroot/speex/libspeex/misc.h,v
retrieving revision 1.20
retrieving revision 1.20.2.1
diff -u -r1.20 -r1.20.2.1
--- misc.h	22 Mar 2003 19:19:48 -0000	1.20
+++ misc.h	12 Nov 2003 02:47:38 -0000	1.20.2.1
@@ -36,7 +36,7 @@
 #define MISC_H
 
 #ifndef VERSION
-#define VERSION "speex-1.0"
+#define VERSION "speex-1.0.3"
 #endif
 
 /*Disable some warnings on VC++*/
@@ -45,6 +45,8 @@
 #pragma warning(disable : 4305)
 #endif
 
+#define VERY_SMALL 1e-30
+
 #ifndef RELEASE
 void print_vec(float *vec, int len, char *name);
 #endif

<p><p>1.114.2.2 +1 -1      speex/libspeex/nb_celp.c

Index: nb_celp.c
===================================================================
RCS file: /usr/local/cvsroot/speex/libspeex/nb_celp.c,v
retrieving revision 1.114.2.1
retrieving revision 1.114.2.2
diff -u -r1.114.2.1 -r1.114.2.2
--- nb_celp.c	26 May 2003 21:25:06 -0000	1.114.2.1
+++ nb_celp.c	12 Nov 2003 02:47:38 -0000	1.114.2.2
@@ -439,7 +439,7 @@
    if (st->submodes[st->submodeID] == NULL)
    {
       for (i=0;i<st->frameSize;i++)
-         st->exc[i]=st->exc2[i]=st->sw[i]=0;
+         st->exc[i]=st->exc2[i]=st->sw[i]=VERY_SMALL;
 
       for (i=0;i<st->lpcSize;i++)
          st->mem_sw[i]=0;

<p><p>1.22.2.1  +4 -3      speex/libspeex/quant_lsp.c

Index: quant_lsp.c
===================================================================
RCS file: /usr/local/cvsroot/speex/libspeex/quant_lsp.c,v
retrieving revision 1.22
retrieving revision 1.22.2.1
diff -u -r1.22 -r1.22.2.1
--- quant_lsp.c	28 Jan 2003 05:22:02 -0000	1.22
+++ quant_lsp.c	12 Nov 2003 02:47:38 -0000	1.22.2.1
@@ -33,9 +33,6 @@
 #include "quant_lsp.h"
 #include <math.h>
 
-extern int lsp_nb_vqid[64];
-static float quant_weight[MAX_LSP_SIZE];
-
 /* Note: x is modified*/
 static int lsp_quant(float *x, signed char *cdbk, int nbVec, int nbDim)
 {
@@ -99,6 +96,7 @@
    int i;
    float tmp1, tmp2;
    int id;
+   float quant_weight[MAX_LSP_SIZE];
 
    for (i=0;i<order;i++)
       qlsp[i]=lsp[i];
@@ -186,6 +184,7 @@
    int i;
    float tmp1, tmp2;
    int id;
+   float quant_weight[MAX_LSP_SIZE];
 
    for (i=0;i<order;i++)
       qlsp[i]=lsp[i];
@@ -259,6 +258,8 @@
    int i;
    float tmp1, tmp2;
    int id;
+   float quant_weight[MAX_LSP_SIZE];
+
    for (i=0;i<order;i++)
       qlsp[i]=lsp[i];
 

<p><p>1.118.2.4 +2 -2      speex/libspeex/sb_celp.c

Index: sb_celp.c
===================================================================
RCS file: /usr/local/cvsroot/speex/libspeex/sb_celp.c,v
retrieving revision 1.118.2.3
retrieving revision 1.118.2.4
diff -u -r1.118.2.3 -r1.118.2.4
--- sb_celp.c	30 May 2003 21:37:30 -0000	1.118.2.3
+++ sb_celp.c	12 Nov 2003 02:47:38 -0000	1.118.2.4
@@ -401,7 +401,7 @@
    if (dtx || st->submodes[st->submodeID] == NULL)
    {
       for (i=0;i<st->frame_size;i++)
-         st->exc[i]=st->sw[i]=0;
+         st->exc[i]=st->sw[i]=VERY_SMALL;
 
       for (i=0;i<st->lpcSize;i++)
          st->mem_sw[i]=0;
@@ -865,7 +865,7 @@
       }
 
       for (i=0;i<st->frame_size;i++)
-         st->exc[i]=0;
+         st->exc[i]=VERY_SMALL;
 
       st->first=1;
 

<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