comparison libtwamr/weight_a.c @ 395:8c7d5eec544c

libtwamr: integrate weight_a.c
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 06 May 2024 18:52:57 +0000
parents
children
comparison
equal deleted inserted replaced
394:2af94ba0c075 395:8c7d5eec544c
1 /*
2 ********************************************************************************
3 *
4 * GSM AMR-NB speech codec R98 Version 7.6.0 December 12, 2001
5 * R99 Version 3.3.0
6 * REL-4 Version 4.1.0
7 *
8 ********************************************************************************
9 *
10 * File : weight_a.c
11 * Purpose : Spectral expansion of LP coefficients. (order==10)
12 * Description : a_exp[i] = a[i] * fac[i-1] ,i=1,10
13 *
14 ********************************************************************************
15 */
16 /*
17 ********************************************************************************
18 * MODULE INCLUDE FILE AND VERSION ID
19 ********************************************************************************
20 */
21 #include "namespace.h"
22 #include "weight_a.h"
23
24 /*
25 ********************************************************************************
26 * INCLUDE FILES
27 ********************************************************************************
28 */
29 #include "typedef.h"
30 #include "basic_op.h"
31 #include "no_count.h"
32 #include "cnst.h"
33
34 /*
35 ********************************************************************************
36 * LOCAL VARIABLES AND TABLES
37 ********************************************************************************
38 */
39 /*
40 *--------------------------------------*
41 * Constants (defined in cnst.h *
42 *--------------------------------------*
43 * M : LPC order *
44 *--------------------------------------*
45 */
46
47 /*
48 ********************************************************************************
49 * PUBLIC PROGRAM CODE
50 ********************************************************************************
51 */
52 void Weight_Ai (
53 Word16 a[], /* (i) : a[M+1] LPC coefficients (M=10) */
54 const Word16 fac[], /* (i) : Spectral expansion factors. */
55 Word16 a_exp[] /* (o) : Spectral expanded LPC coefficients */
56 )
57 {
58 Word16 i;
59
60 a_exp[0] = a[0]; move16 ();
61 for (i = 1; i <= M; i++)
62 {
63 a_exp[i] = round (L_mult (a[i], fac[i - 1])); move16 ();
64 }
65
66 return;
67 }