comparison libgsmefr/weight_a.c @ 53:49dd1ac8e75b

libgsmefr: import most *.c files from ETSI source
author Mychaela Falconia <falcon@freecalypso.org>
date Fri, 25 Nov 2022 16:18:21 +0000
parents
children b651adfce60d
comparison
equal deleted inserted replaced
52:988fd7ff514f 53:49dd1ac8e75b
1 /*************************************************************************
2 *
3 * FUNCTION: Weight_Ai
4 *
5 * PURPOSE: Spectral expansion of LP coefficients. (order==10)
6 *
7 * DESCRIPTION:
8 * a_exp[i] = a[i] * fac[i-1] ,i=1,10
9 *
10 *************************************************************************/
11
12 #include "typedef.h"
13 #include "basic_op.h"
14 #include "count.h"
15
16 /* m = LPC order == 10 */
17 #define m 10
18
19 void Weight_Ai (
20 Word16 a[], /* (i) : a[m+1] LPC coefficients (m=10) */
21 Word16 fac[], /* (i) : Spectral expansion factors. */
22 Word16 a_exp[] /* (o) : Spectral expanded LPC coefficients */
23 )
24 {
25 Word16 i;
26
27 a_exp[0] = a[0]; move16 ();
28 for (i = 1; i <= m; i++)
29 {
30 a_exp[i] = round (L_mult (a[i], fac[i - 1])); move16 ();
31 }
32
33 return;
34 }