FreeCalypso > hg > efr-experiments
comparison src/weight_a.c @ 0:56410792419a
src: original EFR source from ETSI
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Wed, 03 Apr 2024 05:31:37 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:56410792419a |
---|---|
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 } |