ref: 61f40418fab2205c94ed1f113e10677a0679baf4
parent: 49f76805ba9ee5672ba882a0152ca87bdbf0ed1e
author: Jean-Marc Valin <[email protected]>
date: Thu Jan 27 12:14:33 EST 2011
Adjusting post-filter coefficients to be exact in 13 bit precision. That way they can be exact in 16 bits once multiplied by the gain
--- a/libcelt/celt.c
+++ b/libcelt/celt.c
@@ -406,9 +406,9 @@
/* printf ("%d %d %f %f\n", T0, T1, g0, g1); */
celt_word16 g00, g01, g02, g10, g11, g12;
static const celt_word16 gains[3][3] = {
- {QCONST16(0.30690f, 15), QCONST16(0.21701f, 15), QCONST16(0.12954f, 15)},
- {QCONST16(0.46410f, 15), QCONST16(0.26795f, 15), QCONST16(0.f, 15)},
- {QCONST16(0.8f, 15), QCONST16(0.1f, 15), QCONST16(0.f, 15)}};
+ {QCONST16(0.3066406250f, 15), QCONST16(0.2170410156f, 15), QCONST16(0.1296386719f, 15)},
+ {QCONST16(0.4638671875f, 15), QCONST16(0.2680664062f, 15), QCONST16(0.f, 15)},
+ {QCONST16(0.7998046875f, 15), QCONST16(0.1000976562f, 15), QCONST16(0.f, 15)}};
g00 = MULT16_16_Q15(g0, gains[tapset0][0]);
g01 = MULT16_16_Q15(g0, gains[tapset0][1]);
g02 = MULT16_16_Q15(g0, gains[tapset0][2]);