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  * spectrum_ar_model_tables.h
13  *
14  * This file contains definitions of tables with AR coefficients,
15  * Gain coefficients and cosine tables.
16  *
17  */
18 
19 #ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_SPECTRUM_AR_MODEL_TABLES_H_
20 #define WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_SPECTRUM_AR_MODEL_TABLES_H_
21 
22 #include "structs.h"
23 
24 #define NUM_AR_RC_QUANT_BAUNDARY 12
25 
26 /********************* AR Coefficient Tables ************************/
27 /* cdf for quantized reflection coefficient 1 */
28 extern const uint16_t WebRtcIsac_kQArRc1Cdf[NUM_AR_RC_QUANT_BAUNDARY];
29 
30 /* cdf for quantized reflection coefficient 2 */
31 extern const uint16_t WebRtcIsac_kQArRc2Cdf[NUM_AR_RC_QUANT_BAUNDARY];
32 
33 /* cdf for quantized reflection coefficient 3 */
34 extern const uint16_t WebRtcIsac_kQArRc3Cdf[NUM_AR_RC_QUANT_BAUNDARY];
35 
36 /* cdf for quantized reflection coefficient 4 */
37 extern const uint16_t WebRtcIsac_kQArRc4Cdf[NUM_AR_RC_QUANT_BAUNDARY];
38 
39 /* cdf for quantized reflection coefficient 5 */
40 extern const uint16_t WebRtcIsac_kQArRc5Cdf[NUM_AR_RC_QUANT_BAUNDARY];
41 
42 /* cdf for quantized reflection coefficient 6 */
43 extern const uint16_t WebRtcIsac_kQArRc6Cdf[NUM_AR_RC_QUANT_BAUNDARY];
44 
45 /* quantization boundary levels for reflection coefficients */
46 extern const int16_t WebRtcIsac_kQArBoundaryLevels[NUM_AR_RC_QUANT_BAUNDARY];
47 
48 /* initial indices for AR reflection coefficient quantizer and cdf table search */
49 extern const uint16_t WebRtcIsac_kQArRcInitIndex[AR_ORDER];
50 
51 /* pointers to AR cdf tables */
52 extern const uint16_t *WebRtcIsac_kQArRcCdfPtr[AR_ORDER];
53 
54 /* pointers to AR representation levels tables */
55 extern const int16_t *WebRtcIsac_kQArRcLevelsPtr[AR_ORDER];
56 
57 
58 /******************** GAIN Coefficient Tables ***********************/
59 /* cdf for Gain coefficient */
60 extern const uint16_t WebRtcIsac_kQGainCdf[19];
61 
62 /* representation levels for quantized Gain coefficient */
63 extern const int32_t WebRtcIsac_kQGain2Levels[18];
64 
65 /* squared quantization boundary levels for Gain coefficient */
66 extern const int32_t WebRtcIsac_kQGain2BoundaryLevels[19];
67 
68 /* pointer to Gain cdf table */
69 extern const uint16_t *WebRtcIsac_kQGainCdf_ptr[1];
70 
71 /* Gain initial index for gain quantizer and cdf table search */
72 extern const uint16_t WebRtcIsac_kQGainInitIndex[1];
73 
74 /************************* Cosine Tables ****************************/
75 /* Cosine table */
76 extern const int16_t WebRtcIsac_kCos[6][60];
77 
78 #endif /* WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_SPECTRUM_AR_MODEL_TABLES_H_ */
79