ref: af7e8d1b71257abdfc1caf93cce47946a11b606c
parent: 177669ad2f8c5a5ed51474bdc926d95609e882f0
author: rrt <rrt>
date: Wed Dec 6 13:08:33 EST 2006
Remove last bits of FAST code
--- a/src/libgsm/lpc.c
+++ b/src/libgsm/lpc.c
@@ -4,7 +4,7 @@
* details. THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE.
*/
-/* $Header: /cvsroot/sox/sox/src/libgsm/Attic/lpc.c,v 1.1 2006/08/27 23:04:56 cbagwell Exp $ */
+/* $Header: /cvsroot/sox/sox/src/libgsm/Attic/lpc.c,v 1.2 2006/12/06 18:08:33 rrt Exp $ */
#include <stdio.h>
#include <assert.h>
@@ -141,34 +141,6 @@
}
}
-#if defined(USE_FLOAT_MUL) && defined(FAST)
-
-static void Fast_Autocorrelation (
- word * s, /* [0..159] IN/OUT */
- longword * L_ACF) /* [0..8] OUT */
-{
- register int k, i;
- float f_L_ACF[9];
- float scale;
-
- float s_f[160];
- register float *sf = s_f;
-
- for (i = 0; i < 160; ++i) sf[i] = s[i];
- for (k = 0; k <= 8; k++) {
- register float L_temp2 = 0;
- register float *sfl = sf - k;
- for (i = k; i < 160; ++i) L_temp2 += sf[i] * sfl[i];
- f_L_ACF[k] = L_temp2;
- }
- scale = MAX_LONGWORD / f_L_ACF[0];
-
- for (k = 0; k <= 8; k++) {
- L_ACF[k] = f_L_ACF[k] * scale;
- }
-}
-#endif /* defined (USE_FLOAT_MUL) && defined (FAST) */
-
/* 4.2.5 */
static void Reflection_coefficients (
@@ -327,10 +299,6 @@
{
longword L_ACF[9];
-#if defined(USE_FLOAT_MUL) && defined(FAST)
- if (S->fast) Fast_Autocorrelation (s, L_ACF );
- else
-#endif
Autocorrelation (s, L_ACF );
Reflection_coefficients (L_ACF, LARc );
Transformation_to_Log_Area_Ratios (LARc);
--- a/src/libgsm/short_term.c
+++ b/src/libgsm/short_term.c
@@ -4,7 +4,7 @@
* details. THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE.
*/
-/* $Header: /cvsroot/sox/sox/src/libgsm/Attic/short_term.c,v 1.1 2006/08/27 23:04:56 cbagwell Exp $ */
+/* $Header: /cvsroot/sox/sox/src/libgsm/Attic/short_term.c,v 1.2 2006/12/06 18:08:33 rrt Exp $ */
#include <stdio.h>
#include <assert.h>
@@ -222,45 +222,6 @@
}
}
-#if defined(USE_FLOAT_MUL) && defined(FAST)
-
-static void Fast_Short_term_analysis_filtering (
- struct gsm_state * S,
- register word * rp, /* [0..7] IN */
- register int k_n, /* k_end - k_start */
- register word * s /* [0..n-1] IN/OUT */
-)
-{
- register word * u = S->u;
- register int i;
-
- float uf[8],
- rpf[8];
-
- register float scalef = 3.0517578125e-5;
- register float sav, di, temp;
-
- for (i = 0; i < 8; ++i) {
- uf[i] = u[i];
- rpf[i] = rp[i] * scalef;
- }
- for (; k_n--; s++) {
- sav = di = *s;
- for (i = 0; i < 8; ++i) {
- register float rpfi = rpf[i];
- register float ufi = uf[i];
-
- uf[i] = sav;
- temp = rpfi * di + ufi;
- di += rpfi * ufi;
- sav = temp;
- }
- *s = di;
- }
- for (i = 0; i < 8; ++i) u[i] = uf[i];
-}
-#endif /* ! (defined (USE_FLOAT_MUL) && defined (FAST)) */
-
static void Short_term_synthesis_filtering (
struct gsm_state * S,
register word * rrp, /* [0..7] IN */
@@ -302,46 +263,6 @@
}
}
-
-#if defined(FAST) && defined(USE_FLOAT_MUL)
-
-static void Fast_Short_term_synthesis_filtering (
- struct gsm_state * S,
- register word * rrp, /* [0..7] IN */
- register int k, /* k_end - k_start */
- register word * wt, /* [0..k-1] IN */
- register word * sr /* [0..k-1] OUT */
-)
-{
- register word * v = S->v;
- register int i;
-
- float va[9], rrpa[8];
- register float scalef = 3.0517578125e-5, temp;
-
- for (i = 0; i < 8; ++i) {
- va[i] = v[i];
- rrpa[i] = (float)rrp[i] * scalef;
- }
- while (k--) {
- register float sri = *wt++;
- for (i = 8; i--;) {
- sri -= rrpa[i] * va[i];
- if (sri < -32768.) sri = -32768.;
- else if (sri > 32767.) sri = 32767.;
-
- temp = va[i] + rrpa[i] * sri;
- if (temp < -32768.) temp = -32768.;
- else if (temp > 32767.) temp = 32767.;
- va[i+1] = temp;
- }
- *sr++ = va[0] = sri;
- }
- for (i = 0; i < 9; ++i) v[i] = va[i];
-}
-
-#endif /* defined(FAST) && defined(USE_FLOAT_MUL) */
-
void Gsm_Short_Term_Analysis_Filter (
struct gsm_state * S,
@@ -356,15 +277,8 @@
word LARp[8];
#undef FILTER
-#if defined(FAST) && defined(USE_FLOAT_MUL)
-# define FILTER (* (S->fast \
- ? Fast_Short_term_analysis_filtering \
- : Short_term_analysis_filtering ))
+#define FILTER Short_term_analysis_filtering
-#else
-# define FILTER Short_term_analysis_filtering
-#endif
-
Decoding_of_the_coded_Log_Area_Ratios( LARc, LARpp_j );
Coefficients_0_12( LARpp_j_1, LARpp_j, LARp );
@@ -399,14 +313,7 @@
word LARp[8];
#undef FILTER
-#if defined(FAST) && defined(USE_FLOAT_MUL)
-
-# define FILTER (* (S->fast \
- ? Fast_Short_term_synthesis_filtering \
- : Short_term_synthesis_filtering ))
-#else
-# define FILTER Short_term_synthesis_filtering
-#endif
+#define FILTER Short_term_synthesis_filtering
Decoding_of_the_coded_Log_Area_Ratios( LARcr, LARpp_j );