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

Jean-Marc Valin jm at xiph.org
Sun May 4 20:42:22 PDT 2003



jm          03/05/04 23:42:22

  Modified:    libspeex Tag: rel-1-0-branch sb_celp.c
               src      Tag: rel-1-0-branch speexenc.c
  Log:
  fixed a bug in wideband VBR (DTX was wrongly enabled sometimes), another
  stupid bug, updated an encoder warning

Revision  Changes    Path
No                   revision

<p>No                   revision

<p>1.118.2.1 +4 -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
retrieving revision 1.118.2.1
diff -u -r1.118 -r1.118.2.1
--- sb_celp.c	18 Mar 2003 06:13:30 -0000	1.118
+++ sb_celp.c	5 May 2003 03:42:22 -0000	1.118.2.1
@@ -351,6 +351,8 @@
          int modeid;
          modeid = mode->nb_modes-1;
          st->relative_quality+=1.0*(ratio+2);
+	 if (st->relative_quality<-1)
+            st->relative_quality=-1;
          while (modeid)
          {
             int v1;
@@ -361,7 +363,7 @@
             else
                thresh = (st->vbr_quality-v1)   * mode->vbr_thresh[modeid][v1+1] + 
                         (1+v1-st->vbr_quality) * mode->vbr_thresh[modeid][v1];
-            if (st->relative_quality > thresh)
+            if (st->relative_quality >= thresh)
                break;
             modeid--;
          }
@@ -1250,7 +1252,7 @@
    switch(request)
    {
    case SPEEX_GET_LOW_MODE:
-      speex_encoder_ctl(st->st_low, SPEEX_GET_LOW_MODE, ptr);
+      speex_decoder_ctl(st->st_low, SPEEX_GET_LOW_MODE, ptr);
       break;
    case SPEEX_GET_FRAME_SIZE:
       (*(int*)ptr) = st->full_frame_size;

<p><p>No                   revision

<p>No                   revision

<p>1.76.2.1  +3 -3      speex/src/speexenc.c

Index: speexenc.c
===================================================================
RCS file: /usr/local/cvsroot/speex/src/speexenc.c,v
retrieving revision 1.76
retrieving revision 1.76.2.1
diff -u -r1.76 -r1.76.2.1
--- speexenc.c	22 Mar 2003 19:19:48 -0000	1.76
+++ speexenc.c	5 May 2003 03:42:22 -0000	1.76.2.1
@@ -611,10 +611,10 @@
       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");
-   } else if ((vbr_enabled || abr_enabled) && (vad_enabled || dtx_enabled))
+      fprintf (stderr, "Warning: --dtx is useless without --vad, --vbr or --abr\n");
+   } else if ((vbr_enabled || abr_enabled) && (vad_enabled))
    {
-      fprintf (stderr, "Warning: --vad and --dtx are already implied by --vbr or --abr\n");
+      fprintf (stderr, "Warning: --vad is already implied by --vbr or --abr\n");
    }
 
    if (abr_enabled)

<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