[xiph-cvs] cvs commit: speex/src speexdec.c

Jean-Marc Valin jm at xiph.org
Mon Sep 29 17:44:09 PDT 2003



jm          03/09/29 20:44:08

  Modified:    libspeex cb_search.c preprocess.c
               src      speexdec.c
  Log:
  denoiser tuning, Solaris support, small optimization in codebook
  computations.

Revision  Changes    Path
1.86      +2 -1      speex/libspeex/cb_search.c

Index: cb_search.c
===================================================================
RCS file: /usr/local/cvsroot/speex/libspeex/cb_search.c,v
retrieving revision 1.85
retrieving revision 1.86
diff -u -r1.85 -r1.86
--- cb_search.c	10 Mar 2003 17:16:17 -0000	1.85
+++ cb_search.c	30 Sep 2003 00:44:08 -0000	1.86
@@ -136,7 +136,8 @@
       {
          res[j]=0;
          for (k=0;k<=j;k++)
-            res[j] += 0.03125*shape[k]*r[j-k];
+            res[j] += shape[k]*r[j-k];
+         res[j] *= 0.03125;
       }
       
       /* Compute codeword energy */

<p><p>1.13      +8 -7      speex/libspeex/preprocess.c

Index: preprocess.c
===================================================================
RCS file: /usr/local/cvsroot/speex/libspeex/preprocess.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- preprocess.c	18 Sep 2003 03:58:58 -0000	1.12
+++ preprocess.c	30 Sep 2003 00:44:08 -0000	1.13
@@ -582,7 +582,7 @@
          st->Smin[i] = st->Stmp[i] = st->S[i]+100;
    }
 
-   if (st->nb_preprocess%80==0)
+   if (st->nb_preprocess%100==0)
    {
       for (i=1;i<N-1;i++)
       {
@@ -670,14 +670,15 @@
       else
          min_gamma *= 4.;
 #else
-      min_gamma = .2*fabs(mean_prior - mean_post)*fabs(mean_prior - mean_post);
-      if (min_gamma>.6)
-         min_gamma = .6;
-      if (min_gamma<.01)
-         min_gamma = .01;
+      min_gamma = .1*fabs(mean_prior - mean_post)*fabs(mean_prior - mean_post);
+      if (min_gamma>.15)
+         min_gamma = .15;
+      if (min_gamma<.02)
+         min_gamma = .02;
 #endif
+      /*min_gamma = .08;*/
 
-      if (gamma<min_gamma)
+      /*if (gamma<min_gamma)*/
          gamma=min_gamma;
       
       for (i=1;i<N;i++)

<p><p>1.80      +1 -0      speex/src/speexdec.c

Index: speexdec.c
===================================================================
RCS file: /usr/local/cvsroot/speex/src/speexdec.c,v
retrieving revision 1.79
retrieving revision 1.80
diff -u -r1.79 -r1.80
--- speexdec.c	19 Sep 2003 14:06:51 -0000	1.79
+++ speexdec.c	30 Sep 2003 00:44:08 -0000	1.80
@@ -194,6 +194,7 @@
 #endif
       info.play.encoding = AUDIO_ENCODING_SLINEAR;
       info.play.precision = 16;
+      info.play.sample_rate = rate;
       info.play.channels = *channels;
       
       if (ioctl(audio_fd, AUDIO_SETINFO, &info) < 0)

<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