[xiph-cvs] cvs commit: speex/src speexenc.c
Jean-Marc Valin
jm at xiph.org
Mon May 5 16:34:19 PDT 2003
jm 03/05/05 19:34:19
Modified: libspeex sb_celp.c
src speexenc.c
Log:
merged some fixes in the main branch
Revision Changes Path
1.119 +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.119
diff -u -r1.118 -r1.119
--- sb_celp.c 18 Mar 2003 06:13:30 -0000 1.118
+++ sb_celp.c 5 May 2003 23:34:19 -0000 1.119
@@ -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>1.77 +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.77
diff -u -r1.76 -r1.77
--- speexenc.c 22 Mar 2003 19:19:48 -0000 1.76
+++ speexenc.c 5 May 2003 23:34:19 -0000 1.77
@@ -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