2 * Copyright 1992 by Jutta Degener and Carsten Bormann, Technische
3 * Universitaet Berlin. See the accompanying file "COPYRIGHT" for
4 * details. THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE.
9 #include "gsm610_priv.h"
12 * 4.3 FIXED POINT IMPLEMENTATION OF THE RPE-LTP DECODER
15 static void Postprocessing (
20 register word msr
= S
->msr
;
23 for (k
= 160; k
--; s
++) {
24 tmp
= GSM_MULT_R( msr
, 28180 );
25 msr
= GSM_ADD(*s
, tmp
); /* Deemphasis */
26 *s
= GSM_ADD(msr
, msr
) & 0xFFF8; /* Truncation & Upscaling */
34 word
* LARcr
, /* [0..7] IN */
36 word
* Ncr
, /* [0..3] IN */
37 word
* bcr
, /* [0..3] IN */
38 word
* Mcr
, /* [0..3] IN */
39 word
* xmaxcr
, /* [0..3] IN */
40 word
* xMcr
, /* [0..13*4] IN */
42 word
* s
) /* [0..159] OUT */
45 word erp
[40], wt
[160];
46 word
* drp
= S
->dp0
+ 120;
48 for (j
=0; j
<= 3; j
++, xmaxcr
++, bcr
++, Ncr
++, Mcr
++, xMcr
+= 13) {
50 Gsm_RPE_Decoding( /*-S,-*/ *xmaxcr
, *Mcr
, xMcr
, erp
);
51 Gsm_Long_Term_Synthesis_Filtering( S
, *Ncr
, *bcr
, erp
, drp
);
53 for (k
= 0; k
<= 39; k
++) wt
[ j
* 40 + k
] = drp
[ k
];
56 Gsm_Short_Term_Synthesis_Filter( S
, LARcr
, wt
, s
);