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

Jean-Marc Valin jm at xiph.org
Sun Mar 2 22:52:41 PST 2003



jm          03/03/03 01:52:41

  Modified:    .        configure.in
               libspeex nb_celp.c speex_bits.h speex_callbacks.h
                        speex_stereo.h
               src      speexenc.c
  Log:
  build fix for FreeBSD (gnugetopt), allow VBR without DTX

Revision  Changes    Path
1.45      +1 -0      speex/configure.in

Index: configure.in
===================================================================
RCS file: /usr/local/cvsroot/speex/configure.in,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -r1.44 -r1.45
--- configure.in	3 Mar 2003 03:36:55 -0000	1.44
+++ configure.in	3 Mar 2003 06:52:41 -0000	1.45
@@ -53,6 +53,7 @@
 AC_SUBST(src)
 
 AC_CHECK_LIB(m, sin)
+AC_CHECK_LIB(gnugetopt, getopt_long)
 
 AC_DEFINE_UNQUOTED(VERSION, "${VERSION}")
 

<p><p>1.113     +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.112
retrieving revision 1.113
diff -u -r1.112 -r1.113
--- nb_celp.c	23 Jan 2003 07:29:39 -0000	1.112
+++ nb_celp.c	3 Mar 2003 06:52:41 -0000	1.113
@@ -381,7 +381,7 @@
          mode=choice;
          if (mode==0)
          {
-            if (st->dtx_count==0 || lsp_dist>.05 || st->dtx_count>20)
+            if (st->dtx_count==0 || lsp_dist>.05 || !st->dtx_enabled || st->dtx_count>20)
             {
                mode=1;
                st->dtx_count=1;

<p><p>1.20      +2 -0      speex/libspeex/speex_bits.h

Index: speex_bits.h
===================================================================
RCS file: /usr/local/cvsroot/speex/libspeex/speex_bits.h,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- speex_bits.h	23 Jan 2003 07:29:39 -0000	1.19
+++ speex_bits.h	3 Mar 2003 06:52:41 -0000	1.20
@@ -52,6 +52,8 @@
    int   owner;   /**< Does the struct "own" the "raw" buffer (member "bytes") */
    int   overflow;/**< Set to one if we try to read past the valid data */
    int   buf_size;/**< Allocated size for buffer */
+   int   reserved1; /**< Reserved for future use */
+   void *reserved2; /**< Reserved for future use */
 } SpeexBits;
 
 /** Initializes and allocates resources for a SpeexBits struct */

<p><p>1.8       +2 -0      speex/libspeex/speex_callbacks.h

Index: speex_callbacks.h
===================================================================
RCS file: /usr/local/cvsroot/speex/libspeex/speex_callbacks.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- speex_callbacks.h	31 Dec 2002 06:07:33 -0000	1.7
+++ speex_callbacks.h	3 Mar 2003 06:52:41 -0000	1.8
@@ -89,6 +89,8 @@
    int callback_id;             /**< ID associated to the callback */
    speex_callback_func func;    /**< Callback handler function */
    void *data;                  /**< Data that will be sent to the handler */
+   void *reserved1;             /**< Reserved for future use */
+   int   reserved2;             /**< Reserved for future use */
 } SpeexCallback;
 
 /** Handle in-band request */

<p><p>1.6       +2 -0      speex/libspeex/speex_stereo.h

Index: speex_stereo.h
===================================================================
RCS file: /usr/local/cvsroot/speex/libspeex/speex_stereo.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- speex_stereo.h	6 Jan 2003 22:06:45 -0000	1.5
+++ speex_stereo.h	3 Mar 2003 06:52:41 -0000	1.6
@@ -43,6 +43,8 @@
    float e_ratio;      /**< Ratio of energies: E(left+right)/[E(left)+E(right)]  */
    float smooth_left;  /**< Smoothed left channel gain */
    float smooth_right; /**< Smoothed right channel gain */
+   float reserved1;    /**< Reserved for future use */
+   float reserved2;    /**< Reserved for future use */
 } SpeexStereoState;
 
 /** Initialization value for a stereo state */

<p><p>1.74      +4 -4      speex/src/speexenc.c

Index: speexenc.c
===================================================================
RCS file: /usr/local/cvsroot/speex/src/speexenc.c,v
retrieving revision 1.73
retrieving revision 1.74
diff -u -r1.73 -r1.74
--- speexenc.c	24 Feb 2003 07:28:14 -0000	1.73
+++ speexenc.c	3 Mar 2003 06:52:41 -0000	1.74
@@ -265,6 +265,8 @@
    double cumul_bits=0, enc_frames=0;
    char first_bytes[12];
    int wave_input=0;
+   int tmp;
+
    comment_init(&comments, &comments_length, vendor_string);
 
    /*Process command-line options*/
@@ -598,17 +600,15 @@
    }
    if (vbr_enabled)
    {
-      int tmp;
       tmp=1;
       speex_encoder_ctl(st, SPEEX_SET_VBR, &tmp);
    } else if (vad_enabled)
    {
-      int tmp;
       tmp=1;
       speex_encoder_ctl(st, SPEEX_SET_VAD, &tmp);
-      if (dtx_enabled)
-         speex_encoder_ctl(st, SPEEX_SET_DTX, &tmp);
    }
+   if (dtx_enabled)
+      speex_encoder_ctl(st, SPEEX_SET_DTX, &tmp);
    if (dtx_enabled && !(vbr_enabled || abr_enabled || vad_enabled))
    {
       fprintf (stderr, "Warning: --dtx is useless without --vad\n");

<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