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