[xiph-cvs] cvs commit: speex/libspeex sb_celp.c lsp.c
Jean-Marc Valin
jm at xiph.org
Fri Nov 14 10:04:29 PST 2003
jm 03/11/14 13:04:29
Modified: libspeex sb_celp.c lsp.c
Log:
fixed-point: fixed float regression
Revision Changes Path
1.152 +5 -1 speex/libspeex/sb_celp.c
Index: sb_celp.c
===================================================================
RCS file: /usr/local/cvsroot/speex/libspeex/sb_celp.c,v
retrieving revision 1.151
retrieving revision 1.152
diff -u -r1.151 -r1.152
--- sb_celp.c 14 Nov 2003 17:48:58 -0000 1.151
+++ sb_celp.c 14 Nov 2003 18:04:28 -0000 1.152
@@ -552,7 +552,11 @@
/* Gain to use if we want to use the low-band excitation for high-band */
g=eh/(.01+el);
+#ifdef FIXED_POINT
g *= filter_ratio/128.;
+#else
+ g *= filter_ratio;
+#endif
/*print_vec(&g, 1, "gain factor");*/
/* Gain quantization */
{
@@ -571,7 +575,7 @@
spx_word16_t el;
el = compute_rms(low_exc+offset, st->subframeSize);
- gc = DIV32_16(MULT16_16((int)(filter_ratio),(1+eh)),1+el);
+ gc = DIV32_16(MULT16_16(filter_ratio,1+eh),1+el);
/* This is a kludge that cleans up a historical bug */
if (st->subframeSize==80)
<p><p>1.45 +5 -5 speex/libspeex/lsp.c
Index: lsp.c
===================================================================
RCS file: /usr/local/cvsroot/speex/libspeex/lsp.c,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -r1.44 -r1.45
--- lsp.c 12 Nov 2003 17:16:38 -0000 1.44
+++ lsp.c 14 Nov 2003 18:04:28 -0000 1.45
@@ -81,13 +81,13 @@
#define FREQ_SCALE 16384
-//#define ANGLE2X(a) (32768*cos(((a)/8192.)))
+
+/*#define ANGLE2X(a) (32768*cos(((a)/8192.)))*/
#define ANGLE2X(a) (SHL(spx_cos(a),2))
-//#define X2ANGLE(x) (acos(.00006103515625*(x))*LSP_SCALING)
+
+/*#define X2ANGLE(x) (acos(.00006103515625*(x))*LSP_SCALING)*/
#define X2ANGLE(x) (spx_acos(x))
-/* maybe we could approximate acos as
- sqrt(6.7349563814-5.213449731*sqrt(0.6688572663+x))
-*/
+
#else
#define C1 0.99940307
<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