-typedef struct {
- float history[8];
- float output[40];
- float pr1[36];
- float pr2[10];
- int phase, phasep;
-
- float st1a[111], st1b[37], st1[37];
- float st2a[38], st2b[11], st2[11];
- float sb[41];
- float lhist[10];
-} Real288_internal;
-
-static inline float scalar_product_float(float * v1, float * v2, int size)
-{
- float res = 0.;
-
- while (size--)
- res += *v1++ * *v2++;
-
- return res;
-}
-
-/* Decode and produce output */
-static void decode(Real288_internal *glob, float gain, int cb_coef)
-{
- int x, y;
- double sum, sumsum;
- float buffer[5];
-
- memmove(glob->sb + 5, glob->sb, 36 * sizeof(*glob->sb));
-
- for (x=4; x >= 0; x--)
- glob->sb[x] = -scalar_product_float(glob->sb + x + 1, glob->pr1, 36);
-
- /* convert log and do rms */
- sum = 32. - scalar_product_float(glob->pr2, glob->lhist, 10);
-
- if (sum < 0)
- sum = 0;
- else if (sum > 60)
- sum = 60;
-
- sumsum = exp(sum * 0.1151292546497) * gain; /* pow(10.0,sum/20)*f */
+#define MAX_BACKWARD_FILTER_ORDER 36
+#define MAX_BACKWARD_FILTER_LEN 40
+#define MAX_BACKWARD_FILTER_NONREC 35