[xiph-commits] r10117 - trunk/speex/libspeex
jm at svn.xiph.org
jm at svn.xiph.org
Tue Oct 4 23:08:09 PDT 2005
Author: jm
Date: 2005-10-04 23:08:06 -0700 (Tue, 04 Oct 2005)
New Revision: 10117
Modified:
trunk/speex/libspeex/modes.c
trunk/speex/libspeex/nb_celp.c
Log:
cleaning up noise floor for fixed-point (not complete yet)
Modified: trunk/speex/libspeex/modes.c
===================================================================
--- trunk/speex/libspeex/modes.c 2005-10-04 14:15:21 UTC (rev 10116)
+++ trunk/speex/libspeex/modes.c 2005-10-05 06:08:06 UTC (rev 10117)
@@ -387,7 +387,7 @@
0.9, 0.6, /* gamma1, gamma2 */
#endif
.012, /*lag_factor*/
- 1.0002, /*lpc_floor*/
+ .0002, /*lpc_floor*/
#ifdef EPIC_48K
0,
#endif
@@ -543,7 +543,7 @@
0.9, 0.6, /* gamma1, gamma2 */
#endif
.001, /*lag_factor*/
- 1.0001, /*lpc_floor*/
+ .0001, /*lpc_floor*/
0.9,
{NULL, &wb_submode1, &wb_submode2, &wb_submode3, &wb_submode4, NULL, NULL, NULL},
3,
@@ -589,7 +589,7 @@
0.9, 0.6, /* gamma1, gamma2 */
#endif
.002, /*lag_factor*/
- 1.0001, /*lpc_floor*/
+ .0001, /*lpc_floor*/
0.7,
{NULL, &wb_submode1, NULL, NULL, NULL, NULL, NULL, NULL},
1,
@@ -677,7 +677,7 @@
0.9, /*gamma1*/
0.6, /*gamma2*/
.01, /*lag_factor*/
- 1.0003, /*lpc_floor*/
+ .0003, /*lpc_floor*/
1,
{NULL, NULL, &nb_48k_submode, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL},
2,
Modified: trunk/speex/libspeex/nb_celp.c
===================================================================
--- trunk/speex/libspeex/nb_celp.c 2005-10-04 14:15:21 UTC (rev 10116)
+++ trunk/speex/libspeex/nb_celp.c 2005-10-05 06:08:06 UTC (rev 10117)
@@ -297,7 +297,7 @@
/* Compute auto-correlation */
_spx_autocorr(w_sig, st->autocorr, st->lpcSize+1, st->windowSize);
}
- st->autocorr[0] = (spx_word16_t) (st->autocorr[0]*st->lpc_floor); /* Noise floor in auto-correlation domain */
+ st->autocorr[0] = ADD16(st->autocorr[0],(spx_word16_t) (st->autocorr[0]*st->lpc_floor)); /* Noise floor in auto-correlation domain */
/* Lag windowing: equivalent to filtering in the power-spectrum domain */
for (i=0;i<st->lpcSize+1;i++)
@@ -909,7 +909,7 @@
SUBMODE(innovation_quant)(target, st->interp_qlpc, st->bw_lpc1, st->bw_lpc2,
SUBMODE(innovation_params), st->lpcSize, st->subframeSize,
innov2, syn_resp, bits, stack, st->complexity, 0);
- signal_mul(innov2, innov2, (spx_word32_t) (ener*(1/2.2)), st->subframeSize);
+ signal_mul(innov2, innov2, (spx_word32_t) (ener*(1.f/2.2f)), st->subframeSize);
for (i=0;i<st->subframeSize;i++)
exc[i] = ADD32(exc[i],innov2[i]);
stack = tmp_stack;
More information about the commits
mailing list