[xiph-cvs] cvs commit: speex/libspeex jitter.c mdf.c preprocess.c smallft.c

Jean-Marc Valin jm at xiph.org
Wed Sep 17 20:58:59 PDT 2003



jm          03/09/17 23:58:59

  Modified:    libspeex jitter.c mdf.c preprocess.c smallft.c
  Log:
  cleaning up for 1.1

Revision  Changes    Path
1.3       +4 -1      speex/libspeex/jitter.c

Index: jitter.c
===================================================================
RCS file: /usr/local/cvsroot/speex/libspeex/jitter.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- jitter.c	4 Aug 2003 17:28:56 -0000	1.2
+++ jitter.c	18 Sep 2003 03:58:58 -0000	1.3
@@ -32,7 +32,10 @@
 
 */
 
-#include <stdlib.h>
+#ifndef NULL
+#define NULL 0
+#endif
+
 #include "speex.h"
 #include "speex_bits.h"
 #include "speex_jitter.h"

<p><p>1.10      +1 -1      speex/libspeex/mdf.c

Index: mdf.c
===================================================================
RCS file: /usr/local/cvsroot/speex/libspeex/mdf.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- mdf.c	16 Sep 2003 18:35:45 -0000	1.9
+++ mdf.c	18 Sep 2003 03:58:58 -0000	1.10
@@ -38,7 +38,7 @@
 #include "speex_echo.h"
 #include "smallft.h"
 #include <math.h>
-#include <stdio.h>
+/*#include <stdio.h>*/
 
 #define BETA .65
 

<p><p>1.12      +1 -2      speex/libspeex/preprocess.c

Index: preprocess.c
===================================================================
RCS file: /usr/local/cvsroot/speex/libspeex/preprocess.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- preprocess.c	18 Sep 2003 03:34:38 -0000	1.11
+++ preprocess.c	18 Sep 2003 03:58:58 -0000	1.12
@@ -33,7 +33,6 @@
 
 #include <math.h>
 #include "speex_preprocess.h"
-#include <stdio.h>
 #include "misc.h"
 #include "smallft.h"
 
@@ -785,7 +784,7 @@
    }
    st->Zlast = Zframe;
 
-   fprintf (stderr, "%f\n", Pframe);
+   /*fprintf (stderr, "%f\n", Pframe);*/
    /* Compute gain according to the Ephraim-Malah algorithm */
    for (i=1;i<N;i++)
    {

<p><p>1.3       +14 -12    speex/libspeex/smallft.c

Index: smallft.c
===================================================================
RCS file: /usr/local/cvsroot/speex/libspeex/smallft.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- smallft.c	16 Sep 2003 18:35:45 -0000	1.2
+++ smallft.c	18 Sep 2003 03:58:58 -0000	1.3
@@ -11,7 +11,7 @@
  ********************************************************************
 
  function: *unnormalized* fft transform
- last mod: $Id: smallft.c,v 1.2 2003/09/16 18:35:45 jm Exp $
+ last mod: $Id: smallft.c,v 1.3 2003/09/18 03:58:58 jm Exp $
 
  ********************************************************************/
 
@@ -28,11 +28,9 @@
  * FORTRAN version
  */
 
-#include <stdlib.h>
-#include <string.h>
 #include <math.h>
 #include "smallft.h"
-/*#include "misc.h"*/
+#include "misc.h"
 
 static void drfti1(int n, float *wa, int *ifac){
   static int ntryh[4] = { 4,2,3,5 };
@@ -1238,17 +1236,21 @@
   drftb1(l->n,data,l->trigcache,l->trigcache+l->n,l->splitcache);
 }
 
-void drft_init(struct drft_lookup *l,int n){
+void drft_init(struct drft_lookup *l,int n)
+{
   l->n=n;
-  l->trigcache=calloc(3*n,sizeof(*l->trigcache));
-  l->splitcache=calloc(32,sizeof(*l->splitcache));
+  l->trigcache=speex_alloc(3*n*sizeof(*l->trigcache));
+  l->splitcache=speex_alloc(32*sizeof(*l->splitcache));
   fdrffti(n, l->trigcache, l->splitcache);
 }
 
-void drft_clear(struct drft_lookup *l){
-  if(l){
-    if(l->trigcache)free(l->trigcache);
-    if(l->splitcache)free(l->splitcache);
-    memset(l,0,sizeof(*l));
+void drft_clear(struct drft_lookup *l)
+{
+  if(l)
+  {
+    if(l->trigcache)
+      speex_free(l->trigcache);
+    if(l->splitcache)
+      speex_free(l->splitcache);
   }
 }

<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