1 /*
2  *  Copyright (c) 2011 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_FIX_SOURCE_LPC_TABLES_H_
19 #define WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_SOURCE_LPC_TABLES_H_
20 
21 #include "webrtc/typedefs.h"
22 
23 /* indices of KLT coefficients used */
24 extern const uint16_t WebRtcIsacfix_kSelIndGain[12];
25 
26 extern const uint16_t WebRtcIsacfix_kSelIndShape[108];
27 
28 /* cdf array for model indicator */
29 extern const uint16_t WebRtcIsacfix_kModelCdf[KLT_NUM_MODELS+1];
30 
31 /* pointer to cdf array for model indicator */
32 extern const uint16_t *WebRtcIsacfix_kModelCdfPtr[1];
33 
34 /* initial cdf index for decoder of model indicator */
35 extern const uint16_t WebRtcIsacfix_kModelInitIndex[1];
36 
37 /* offset to go from rounded value to quantization index */
38 extern const int16_t WebRtcIsacfix_kQuantMinGain[12];
39 
40 extern const int16_t WebRtcIsacfix_kQuantMinShape[108];
41 
42 /* maximum quantization index */
43 extern const uint16_t WebRtcIsacfix_kMaxIndGain[12];
44 
45 extern const uint16_t WebRtcIsacfix_kMaxIndShape[108];
46 
47 /* index offset */
48 extern const uint16_t WebRtcIsacfix_kOffsetGain[KLT_NUM_MODELS][12];
49 
50 extern const uint16_t WebRtcIsacfix_kOffsetShape[KLT_NUM_MODELS][108];
51 
52 /* initial cdf index for KLT coefficients */
53 extern const uint16_t WebRtcIsacfix_kInitIndexGain[KLT_NUM_MODELS][12];
54 
55 extern const uint16_t WebRtcIsacfix_kInitIndexShape[KLT_NUM_MODELS][108];
56 
57 /* offsets for quantizer representation levels */
58 extern const uint16_t WebRtcIsacfix_kOfLevelsGain[3];
59 
60 extern const uint16_t WebRtcIsacfix_kOfLevelsShape[3];
61 
62 /* quantizer representation levels */
63 extern const int32_t WebRtcIsacfix_kLevelsGainQ17[1176];
64 
65 extern const int16_t WebRtcIsacfix_kLevelsShapeQ10[1735];
66 
67 /* cdf tables for quantizer indices */
68 extern const uint16_t WebRtcIsacfix_kCdfGain[1212];
69 
70 extern const uint16_t WebRtcIsacfix_kCdfShape[2059];
71 
72 /* pointers to cdf tables for quantizer indices */
73 extern const uint16_t *WebRtcIsacfix_kCdfGainPtr[KLT_NUM_MODELS][12];
74 
75 extern const uint16_t *WebRtcIsacfix_kCdfShapePtr[KLT_NUM_MODELS][108];
76 
77 /* code length for all coefficients using different models */
78 extern const int16_t WebRtcIsacfix_kCodeLenGainQ11[392];
79 
80 extern const int16_t WebRtcIsacfix_kCodeLenShapeQ11[577];
81 
82 /* left KLT transforms */
83 extern const int16_t WebRtcIsacfix_kT1GainQ15[KLT_NUM_MODELS][4];
84 
85 extern const int16_t WebRtcIsacfix_kT1ShapeQ15[KLT_NUM_MODELS][324];
86 
87 /* right KLT transforms */
88 extern const int16_t WebRtcIsacfix_kT2GainQ15[KLT_NUM_MODELS][36];
89 
90 extern const int16_t WebRtcIsacfix_kT2ShapeQ15[KLT_NUM_MODELS][36];
91 
92 /* means of log gains and LAR coefficients */
93 extern const int16_t WebRtcIsacfix_kMeansGainQ8[KLT_NUM_MODELS][12];
94 
95 extern const int32_t WebRtcIsacfix_kMeansShapeQ17[3][108];
96 
97 #endif /* WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_SOURCE_LPC_TABLES_H_ */
98