• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  *  Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3  *
4  *  Use of this source code is governed by a BSD-style license
5  *  that can be found in the LICENSE file in the root of the source
6  *  tree. An additional intellectual property rights grant can be found
7  *  in the file PATENTS.  All contributing project authors may
8  *  be found in the AUTHORS file in the root of the source tree.
9  */
10 
11 /*
12  * lpc_tables.h
13  *
14  * header file for coding tables for the LPC coefficients
15  *
16  */
17 
18 #ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_LPC_TABLES_H_
19 #define WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_LPC_TABLES_H_
20 
21 #include "structs.h"
22 
23 #include "settings.h"
24 
25 #define KLT_STEPSIZE         1.00000000
26 #define KLT_NUM_AVG_GAIN     0
27 #define KLT_NUM_AVG_SHAPE    0
28 #define KLT_NUM_MODELS  3
29 #define LPC_GAIN_SCALE     4.000f
30 #define LPC_LOBAND_SCALE   2.100f
31 #define LPC_LOBAND_ORDER   ORDERLO
32 #define LPC_HIBAND_SCALE   0.450f
33 #define LPC_HIBAND_ORDER   ORDERHI
34 #define LPC_GAIN_ORDER     2
35 
36 #define LPC_SHAPE_ORDER    (LPC_LOBAND_ORDER + LPC_HIBAND_ORDER)
37 
38 #define KLT_ORDER_GAIN     (LPC_GAIN_ORDER * SUBFRAMES)
39 #define KLT_ORDER_SHAPE    (LPC_SHAPE_ORDER * SUBFRAMES)
40 
41 /* cdf array for model indicator */
42 extern const uint16_t WebRtcIsac_kQKltModelCdf[KLT_NUM_MODELS+1];
43 
44 /* pointer to cdf array for model indicator */
45 extern const uint16_t *WebRtcIsac_kQKltModelCdfPtr[1];
46 
47 /* initial cdf index for decoder of model indicator */
48 extern const uint16_t WebRtcIsac_kQKltModelInitIndex[1];
49 
50 /* offset to go from rounded value to quantization index */
51 extern const short WebRtcIsac_kQKltQuantMinGain[12];
52 
53 extern const short WebRtcIsac_kQKltQuantMinShape[108];
54 
55 /* maximum quantization index */
56 extern const uint16_t WebRtcIsac_kQKltMaxIndGain[12];
57 
58 extern const uint16_t WebRtcIsac_kQKltMaxIndShape[108];
59 
60 /* index offset */
61 extern const uint16_t WebRtcIsac_kQKltOffsetGain[12];
62 
63 extern const uint16_t WebRtcIsac_kQKltOffsetShape[108];
64 
65 /* initial cdf index for KLT coefficients */
66 extern const uint16_t WebRtcIsac_kQKltInitIndexGain[12];
67 
68 extern const uint16_t WebRtcIsac_kQKltInitIndexShape[108];
69 
70 /* quantizer representation levels */
71 extern const double WebRtcIsac_kQKltLevelsGain[392];
72 
73 extern const double WebRtcIsac_kQKltLevelsShape[578];
74 
75 /* cdf tables for quantizer indices */
76 extern const uint16_t WebRtcIsac_kQKltCdfGain[404];
77 
78 extern const uint16_t WebRtcIsac_kQKltCdfShape[686];
79 
80 /* pointers to cdf tables for quantizer indices */
81 extern const uint16_t *WebRtcIsac_kQKltCdfPtrGain[12];
82 
83 extern const uint16_t *WebRtcIsac_kQKltCdfPtrShape[108];
84 
85 /* left KLT transforms */
86 extern const double WebRtcIsac_kKltT1Gain[4];
87 
88 extern const double WebRtcIsac_kKltT1Shape[324];
89 
90 /* right KLT transforms */
91 extern const double WebRtcIsac_kKltT2Gain[36];
92 
93 extern const double WebRtcIsac_kKltT2Shape[36];
94 
95 /* means of log gains and LAR coefficients */
96 extern const double WebRtcIsac_kLpcMeansGain[12];
97 
98 extern const double WebRtcIsac_kLpcMeansShape[108];
99 
100 #endif /* WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_LPC_TABLES_H_ */
101