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 MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_LPC_TABLES_H_ 19 #define MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_LPC_TABLES_H_ 20 21 #include "modules/audio_coding/codecs/isac/main/source/settings.h" 22 #include "modules/audio_coding/codecs/isac/main/source/structs.h" 23 24 #define KLT_STEPSIZE 1.00000000 25 #define KLT_NUM_AVG_GAIN 0 26 #define KLT_NUM_AVG_SHAPE 0 27 #define KLT_NUM_MODELS 3 28 #define LPC_GAIN_SCALE 4.000f 29 #define LPC_LOBAND_SCALE 2.100f 30 #define LPC_LOBAND_ORDER ORDERLO 31 #define LPC_HIBAND_SCALE 0.450f 32 #define LPC_HIBAND_ORDER ORDERHI 33 #define LPC_GAIN_ORDER 2 34 35 #define LPC_SHAPE_ORDER (LPC_LOBAND_ORDER + LPC_HIBAND_ORDER) 36 37 #define KLT_ORDER_GAIN (LPC_GAIN_ORDER * SUBFRAMES) 38 #define KLT_ORDER_SHAPE (LPC_SHAPE_ORDER * SUBFRAMES) 39 40 /* cdf array for model indicator */ 41 extern const uint16_t WebRtcIsac_kQKltModelCdf[KLT_NUM_MODELS + 1]; 42 43 /* pointer to cdf array for model indicator */ 44 extern const uint16_t* WebRtcIsac_kQKltModelCdfPtr[1]; 45 46 /* initial cdf index for decoder of model indicator */ 47 extern const uint16_t WebRtcIsac_kQKltModelInitIndex[1]; 48 49 /* offset to go from rounded value to quantization index */ 50 extern const short WebRtcIsac_kQKltQuantMinGain[12]; 51 52 extern const short WebRtcIsac_kQKltQuantMinShape[108]; 53 54 /* maximum quantization index */ 55 extern const uint16_t WebRtcIsac_kQKltMaxIndGain[12]; 56 57 extern const uint16_t WebRtcIsac_kQKltMaxIndShape[108]; 58 59 /* index offset */ 60 extern const uint16_t WebRtcIsac_kQKltOffsetGain[12]; 61 62 extern const uint16_t WebRtcIsac_kQKltOffsetShape[108]; 63 64 /* initial cdf index for KLT coefficients */ 65 extern const uint16_t WebRtcIsac_kQKltInitIndexGain[12]; 66 67 extern const uint16_t WebRtcIsac_kQKltInitIndexShape[108]; 68 69 /* quantizer representation levels */ 70 extern const double WebRtcIsac_kQKltLevelsGain[392]; 71 72 extern const double WebRtcIsac_kQKltLevelsShape[578]; 73 74 /* cdf tables for quantizer indices */ 75 extern const uint16_t WebRtcIsac_kQKltCdfGain[404]; 76 77 extern const uint16_t WebRtcIsac_kQKltCdfShape[686]; 78 79 /* pointers to cdf tables for quantizer indices */ 80 extern const uint16_t* WebRtcIsac_kQKltCdfPtrGain[12]; 81 82 extern const uint16_t* WebRtcIsac_kQKltCdfPtrShape[108]; 83 84 /* left KLT transforms */ 85 extern const double WebRtcIsac_kKltT1Gain[4]; 86 87 extern const double WebRtcIsac_kKltT1Shape[324]; 88 89 /* right KLT transforms */ 90 extern const double WebRtcIsac_kKltT2Gain[36]; 91 92 extern const double WebRtcIsac_kKltT2Shape[36]; 93 94 /* means of log gains and LAR coefficients */ 95 extern const double WebRtcIsac_kLpcMeansGain[12]; 96 97 extern const double WebRtcIsac_kLpcMeansShape[108]; 98 99 #endif /* MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_LPC_TABLES_H_ */ 100