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 * pitch_lag_tables.h
13 *
14 * This file contains tables for the pitch filter side-info in the entropy coder.
15 *
16 */
17
18#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_PITCH_LAG_TABLES_H_
19#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_PITCH_LAG_TABLES_H_
20
21#include "webrtc/typedefs.h"
22/* header file for coding tables for the pitch filter side-info in the entropy coder */
23/********************* Pitch Filter Lag Coefficient Tables ************************/
24
25/* tables for use with small pitch gain */
26
27/* cdfs for quantized pitch lags */
28extern const uint16_t WebRtcIsac_kQPitchLagCdf1Lo[127];
29extern const uint16_t WebRtcIsac_kQPitchLagCdf2Lo[20];
30extern const uint16_t WebRtcIsac_kQPitchLagCdf3Lo[2];
31extern const uint16_t WebRtcIsac_kQPitchLagCdf4Lo[10];
32
33extern const uint16_t *WebRtcIsac_kQPitchLagCdfPtrLo[4];
34
35/* size of first cdf table */
36extern const uint16_t WebRtcIsac_kQPitchLagCdfSizeLo[1];
37
38/* index limits and ranges */
39extern const int16_t WebRtcIsac_kQIndexLowerLimitLagLo[4];
40extern const int16_t WebRtcIsac_kQIndexUpperLimitLagLo[4];
41
42/* initial index for arithmetic decoder */
43extern const uint16_t WebRtcIsac_kQInitIndexLagLo[3];
44
45/* mean values of pitch filter lags */
46extern const double WebRtcIsac_kQMeanLag2Lo[19];
47extern const double WebRtcIsac_kQMeanLag3Lo[1];
48extern const double WebRtcIsac_kQMeanLag4Lo[9];
49
50extern const double WebRtcIsac_kQPitchLagStepsizeLo;
51
52
53/* tables for use with medium pitch gain */
54
55/* cdfs for quantized pitch lags */
56extern const uint16_t WebRtcIsac_kQPitchLagCdf1Mid[255];
57extern const uint16_t WebRtcIsac_kQPitchLagCdf2Mid[36];
58extern const uint16_t WebRtcIsac_kQPitchLagCdf3Mid[2];
59extern const uint16_t WebRtcIsac_kQPitchLagCdf4Mid[20];
60
61extern const uint16_t *WebRtcIsac_kQPitchLagCdfPtrMid[4];
62
63/* size of first cdf table */
64extern const uint16_t WebRtcIsac_kQPitchLagCdfSizeMid[1];
65
66/* index limits and ranges */
67extern const int16_t WebRtcIsac_kQIndexLowerLimitLagMid[4];
68extern const int16_t WebRtcIsac_kQIndexUpperLimitLagMid[4];
69
70/* initial index for arithmetic decoder */
71extern const uint16_t WebRtcIsac_kQInitIndexLagMid[3];
72
73/* mean values of pitch filter lags */
74extern const double WebRtcIsac_kQMeanLag2Mid[35];
75extern const double WebRtcIsac_kQMeanLag3Mid[1];
76extern const double WebRtcIsac_kQMeanLag4Mid[19];
77
78extern const double WebRtcIsac_kQPitchLagStepsizeMid;
79
80
81/* tables for use with large pitch gain */
82
83/* cdfs for quantized pitch lags */
84extern const uint16_t WebRtcIsac_kQPitchLagCdf1Hi[511];
85extern const uint16_t WebRtcIsac_kQPitchLagCdf2Hi[68];
86extern const uint16_t WebRtcIsac_kQPitchLagCdf3Hi[2];
87extern const uint16_t WebRtcIsac_kQPitchLagCdf4Hi[35];
88
89extern const uint16_t *WebRtcIsac_kQPitchLagCdfPtrHi[4];
90
91/* size of first cdf table */
92extern const uint16_t WebRtcIsac_kQPitchLagCdfSizeHi[1];
93
94/* index limits and ranges */
95extern const int16_t WebRtcIsac_kQindexLowerLimitLagHi[4];
96extern const int16_t WebRtcIsac_kQindexUpperLimitLagHi[4];
97
98/* initial index for arithmetic decoder */
99extern const uint16_t WebRtcIsac_kQInitIndexLagHi[3];
100
101/* mean values of pitch filter lags */
102extern const double WebRtcIsac_kQMeanLag2Hi[67];
103extern const double WebRtcIsac_kQMeanLag3Hi[1];
104extern const double WebRtcIsac_kQMeanLag4Hi[34];
105
106extern const double WebRtcIsac_kQPitchLagStepsizeHi;
107
108/* transform matrix */
109extern const double WebRtcIsac_kTransform[4][4];
110
111/* transpose transform matrix */
112extern const double WebRtcIsac_kTransformTranspose[4][4];
113
114#endif /* WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_PITCH_LAG_TABLES_H_ */
115