FreeCalypso > hg > gsm-codec-lib
annotate libgsmhr1/sp_rom.h @ 540:5595293e4f29
gsmx-to-tw5a utility: use emit_hex_frame() in libtest
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sun, 22 Sep 2024 00:36:35 +0000 |
parents | 06578223a752 |
children |
rev | line source |
---|---|
506
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1 /*************************************************************************** |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2 * |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3 * Purpose: Define the structure of the Global Constants |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
4 * |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
5 **************************************************************************/ |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
6 |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
7 #ifndef ___ROM |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
8 #define ___ROM |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
9 |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
10 #include "typedefs.h" |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
11 |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
12 /*_________________________________________________________________________ |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
13 | | |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
14 | Data Types | |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
15 |_________________________________________________________________________| |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
16 */ |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
17 |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
18 /* gsp0 vector quantizer */ |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
19 /*-----------------------*/ |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
20 #define GSP0_NUM_OF_TABLES 4 |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
21 #define GSP0_NUM 32 |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
22 #define GSP0_VECTOR_SIZE 5 |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
23 |
507
06578223a752
libgsmhr1: integrate sp_rom.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
506
diff
changeset
|
24 extern const ShortwordRom pppsrGsp0 |
506
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
25 [GSP0_NUM_OF_TABLES][GSP0_NUM][GSP0_VECTOR_SIZE]; |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
26 |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
27 |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
28 /* unvoiced code vectors */ |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
29 /*-----------------------*/ |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
30 #define UVCODEVEC_NUM_OF_CODE_BOOKS 2 |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
31 #define UVCODEVEC_NUM_OF_CODE_BITS 7 |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
32 |
507
06578223a752
libgsmhr1: integrate sp_rom.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
506
diff
changeset
|
33 extern const ShortwordRom pppsrUvCodeVec |
506
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
34 [UVCODEVEC_NUM_OF_CODE_BOOKS][UVCODEVEC_NUM_OF_CODE_BITS][S_LEN]; |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
35 |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
36 |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
37 /* voiced code vectors */ |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
38 /*---------------------*/ |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
39 #define VCDCODEVEC_NUM_OF_CODE_BOOKS 1 |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
40 #define VCDCODEVEC_NUM_OF_CODE_BITS 9 |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
41 |
507
06578223a752
libgsmhr1: integrate sp_rom.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
506
diff
changeset
|
42 extern const ShortwordRom pppsrVcdCodeVec |
506
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
43 [VCDCODEVEC_NUM_OF_CODE_BOOKS][VCDCODEVEC_NUM_OF_CODE_BITS][S_LEN]; |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
44 |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
45 |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
46 /* vector quantizer tables */ |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
47 /*-------------------------*/ |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
48 #define QUANT_NUM_OF_TABLES 3 |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
49 |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
50 #define QUANT1_NUM_OF_BITS 11 |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
51 #define QUANT1_NUM_OF_ROWS (1 << QUANT1_NUM_OF_BITS) |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
52 #define QUANT1_NUM_OF_STAGES 3 |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
53 #define QUANT1_NUM_OF_WORDS (QUANT1_NUM_OF_ROWS*QUANT1_NUM_OF_STAGES/2) |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
54 |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
55 #define QUANT2_NUM_OF_BITS 9 |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
56 #define QUANT2_NUM_OF_ROWS (1 << QUANT2_NUM_OF_BITS) |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
57 #define QUANT2_NUM_OF_STAGES 3 |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
58 #define QUANT2_NUM_OF_WORDS (QUANT2_NUM_OF_ROWS*QUANT2_NUM_OF_STAGES/2) |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
59 |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
60 #define QUANT3_NUM_OF_BITS 8 |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
61 #define QUANT3_NUM_OF_ROWS (1 << QUANT3_NUM_OF_BITS) |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
62 #define QUANT3_NUM_OF_STAGES 4 |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
63 #define QUANT3_NUM_OF_WORDS (QUANT3_NUM_OF_ROWS*QUANT3_NUM_OF_STAGES/2) |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
64 |
507
06578223a752
libgsmhr1: integrate sp_rom.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
506
diff
changeset
|
65 extern const ShortwordRom psrQuant1[QUANT1_NUM_OF_WORDS]; |
506
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
66 |
507
06578223a752
libgsmhr1: integrate sp_rom.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
506
diff
changeset
|
67 extern const ShortwordRom psrQuant2[QUANT2_NUM_OF_WORDS]; |
506
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
68 |
507
06578223a752
libgsmhr1: integrate sp_rom.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
506
diff
changeset
|
69 extern const ShortwordRom psrQuant3[QUANT3_NUM_OF_WORDS]; |
506
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
70 |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
71 |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
72 /* lpc pre-quantizer */ |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
73 /*-------------------*/ |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
74 #define PREQ1_NUM_OF_BITS 6 |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
75 #define PREQ1_NUM_OF_ROWS (1 << PREQ1_NUM_OF_BITS) |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
76 #define PREQ1_NUM_OF_STAGES 3 |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
77 #define PREQ1_NUM_OF_WORDS (PREQ1_NUM_OF_ROWS*PREQ1_NUM_OF_STAGES/2) |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
78 |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
79 #define PREQ2_NUM_OF_BITS 5 |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
80 #define PREQ2_NUM_OF_ROWS (1 << PREQ2_NUM_OF_BITS) |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
81 #define PREQ2_NUM_OF_STAGES 3 |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
82 #define PREQ2_NUM_OF_WORDS (PREQ2_NUM_OF_ROWS*PREQ2_NUM_OF_STAGES/2) |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
83 |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
84 #define PREQ3_NUM_OF_BITS 4 |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
85 #define PREQ3_NUM_OF_ROWS (1 << PREQ3_NUM_OF_BITS) |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
86 #define PREQ3_NUM_OF_STAGES 4 |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
87 #define PREQ3_NUM_OF_WORDS (PREQ3_NUM_OF_ROWS*PREQ3_NUM_OF_STAGES/2) |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
88 |
507
06578223a752
libgsmhr1: integrate sp_rom.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
506
diff
changeset
|
89 extern const ShortwordRom psrPreQ1[PREQ1_NUM_OF_WORDS]; |
506
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
90 |
507
06578223a752
libgsmhr1: integrate sp_rom.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
506
diff
changeset
|
91 extern const ShortwordRom psrPreQ2[PREQ2_NUM_OF_WORDS]; |
506
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
92 |
507
06578223a752
libgsmhr1: integrate sp_rom.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
506
diff
changeset
|
93 extern const ShortwordRom psrPreQ3[PREQ3_NUM_OF_WORDS]; |
506
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
94 |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
95 |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
96 /* size of the vq subset in the kth segment */ |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
97 /*------------------------------------------*/ |
507
06578223a752
libgsmhr1: integrate sp_rom.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
506
diff
changeset
|
98 extern const ShortwordRom psrQuantSz[QUANT_NUM_OF_TABLES]; |
506
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
99 |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
100 |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
101 /* pre-quantizer size */ |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
102 /*--------------------*/ |
507
06578223a752
libgsmhr1: integrate sp_rom.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
506
diff
changeset
|
103 extern const ShortwordRom psrPreQSz[QUANT_NUM_OF_TABLES]; |
506
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
104 |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
105 |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
106 /* reflection coeff scalar quantizer */ |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
107 /*-----------------------------------*/ |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
108 #define SQUANT_NUM_OF_BITS 8 |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
109 #define SQUANT_NUM_OF_ROWS (1 << SQUANT_NUM_OF_BITS) |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
110 |
507
06578223a752
libgsmhr1: integrate sp_rom.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
506
diff
changeset
|
111 extern const ShortwordRom psrSQuant[SQUANT_NUM_OF_ROWS]; |
506
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
112 |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
113 |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
114 /* index structure for LPC Vector Quantizer */ |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
115 /*------------------------------------------*/ |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
116 struct IsubLHn |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
117 { /* index structure for LPC Vector |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
118 * Quantizer */ |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
119 ShortwordRom l; /* lowest index index range |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
120 * from 1..NP */ |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
121 ShortwordRom h; /* highest index */ |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
122 ShortwordRom len; /* h-l+1 */ |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
123 }; |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
124 |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
125 |
507
06578223a752
libgsmhr1: integrate sp_rom.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
506
diff
changeset
|
126 extern const struct IsubLHn psvqIndex[QUANT_NUM_OF_TABLES]; |
506
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
127 |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
128 |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
129 /* square root of p0 table */ |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
130 /*-------------------------*/ |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
131 #define SQRTP0_NUM_OF_BITS 5 |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
132 #define SQRTP0_NUM_OF_ROWS (1 << SQRTP0_NUM_OF_BITS) |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
133 #define SQRTP0_NUM_OF_MODES 3 |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
134 |
507
06578223a752
libgsmhr1: integrate sp_rom.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
506
diff
changeset
|
135 extern const ShortwordRom ppsrSqrtP0[SQRTP0_NUM_OF_MODES][SQRTP0_NUM_OF_ROWS]; |
506
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
136 |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
137 |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
138 /* interpolation filter used for C and G */ |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
139 /*---------------------------------------*/ |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
140 #define CGINTFILT_MACS 6 |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
141 |
507
06578223a752
libgsmhr1: integrate sp_rom.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
506
diff
changeset
|
142 extern const ShortwordRom ppsrCGIntFilt[CGINTFILT_MACS][OS_FCTR]; |
506
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
143 |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
144 |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
145 /* interpolation filter used pitch */ |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
146 /*---------------------------------*/ |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
147 #define PVECINTFILT_MACS 10 |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
148 |
507
06578223a752
libgsmhr1: integrate sp_rom.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
506
diff
changeset
|
149 extern const ShortwordRom ppsrPVecIntFilt[PVECINTFILT_MACS][OS_FCTR]; |
506
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
150 |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
151 |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
152 /* fractional pitch lag table lag*OS_FCTR */ |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
153 /*----------------------------------------*/ |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
154 #define LAGTBL_NUM_OF_ROWS 256 |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
155 |
507
06578223a752
libgsmhr1: integrate sp_rom.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
506
diff
changeset
|
156 extern const ShortwordRom psrLagTbl[LAGTBL_NUM_OF_ROWS]; |
506
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
157 |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
158 |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
159 /* R0 decision value table defines range (not the levels themselves */ |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
160 /*------------------------------------------------------------------*/ |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
161 |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
162 #define R0DECTBL_NUM_OF_R0BITS 5 |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
163 #define R0DECTBL_NUM_OF_ROWS ((1 << R0DECTBL_NUM_OF_R0BITS)*2 - 1) |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
164 |
507
06578223a752
libgsmhr1: integrate sp_rom.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
506
diff
changeset
|
165 extern const ShortwordRom psrR0DecTbl[R0DECTBL_NUM_OF_ROWS]; |
506
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
166 |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
167 |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
168 /* high pass filter coefficients */ |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
169 /*-------------------------------*/ |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
170 #define HPFCOEFS_NUM_OF_CODES 10 |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
171 |
507
06578223a752
libgsmhr1: integrate sp_rom.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
506
diff
changeset
|
172 extern const ShortwordRom psrHPFCoefs[HPFCOEFS_NUM_OF_CODES]; |
506
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
173 |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
174 |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
175 /* spectral smoothing coefficients */ |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
176 /*---------------------------------*/ |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
177 #define NWCOEFS_NUM_OF_CODES 20 |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
178 |
507
06578223a752
libgsmhr1: integrate sp_rom.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
506
diff
changeset
|
179 extern const ShortwordRom psrNWCoefs[NWCOEFS_NUM_OF_CODES]; |
506
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
180 |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
181 |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
182 /* spectral smoothing coefficients for FLAT */ |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
183 /*------------------------------------------*/ |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
184 #define FLATSSTCOEFS_NUM_OF_CODES 10 |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
185 |
507
06578223a752
libgsmhr1: integrate sp_rom.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
506
diff
changeset
|
186 extern const LongwordRom pL_rFlatSstCoefs[FLATSSTCOEFS_NUM_OF_CODES]; |
506
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
187 |
507
06578223a752
libgsmhr1: integrate sp_rom.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
506
diff
changeset
|
188 extern const ShortwordRom psrOldCont[4]; |
06578223a752
libgsmhr1: integrate sp_rom.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
506
diff
changeset
|
189 extern const ShortwordRom psrNewCont[4]; |
506
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
190 |
2d6da062c452
libgsmhr1/sp_rom.[ch]: import original
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
191 #endif |