[xiph-cvs] cvs commit: speex/libspeex sb_celp.c testenc_wb.c

Jean-Marc Valin jm at xiph.org
Fri Nov 14 10:28:46 PST 2003



jm          03/11/14 13:28:46

  Modified:    libspeex sb_celp.c testenc_wb.c
  Log:
  fixed-point: before I screw everything up...

Revision  Changes    Path
1.153     +2 -5      speex/libspeex/sb_celp.c

Index: sb_celp.c
===================================================================
RCS file: /usr/local/cvsroot/speex/libspeex/sb_celp.c,v
retrieving revision 1.152
retrieving revision 1.153
diff -u -r1.152 -r1.153
--- sb_celp.c	14 Nov 2003 18:04:28 -0000	1.152
+++ sb_celp.c	14 Nov 2003 18:28:45 -0000	1.153
@@ -530,13 +530,10 @@
       st->pi_gain[sub] /= LPC_SCALING;
 
       rl = low_pi_gain[sub];
-      rl=1/(fabs(rl)+.01);
-      rh=1/(fabs(rh)+.01);
-      /* Compute ratio, will help predict the gain */
 #ifdef FIXED_POINT
-      filter_ratio=128*fabs(.01+rh)/(.01+fabs(rl));
+      filter_ratio=DIV32_16((spx_word32_t)(32768*(rl+.01)),(spx_word16_t)(256*(.01+rh)));
 #else
-      filter_ratio=fabs(.01+rh)/(.01+fabs(rl));
+      filter_ratio=(rl+.01)/(rh+.01);
 #endif
       /* Compute "real excitation" */
       fir_mem2(sp, st->interp_qlpc, exc, st->subframeSize, st->lpcSize, st->mem_sp2);

<p><p>1.35      +2 -2      speex/libspeex/testenc_wb.c

Index: testenc_wb.c
===================================================================
RCS file: /usr/local/cvsroot/speex/libspeex/testenc_wb.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -r1.34 -r1.35
--- testenc_wb.c	13 Nov 2003 08:45:55 -0000	1.34
+++ testenc_wb.c	14 Nov 2003 18:28:45 -0000	1.35
@@ -51,11 +51,11 @@
    speex_encoder_ctl(st, SPEEX_SET_VBR, &tmp);
    tmp=8;
    speex_encoder_ctl(st, SPEEX_SET_QUALITY, &tmp);
-   tmp=5;
+   tmp=2;
    speex_encoder_ctl(st, SPEEX_SET_COMPLEXITY, &tmp);
    tmp=3;
    speex_encoder_ctl(st, SPEEX_SET_HIGH_MODE, &tmp);
-   tmp=7;
+   tmp=6;
    speex_encoder_ctl(st, SPEEX_SET_LOW_MODE, &tmp);
 
 

<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