annotate src/opus-1.3/silk/tables_other.c @ 169:223a55898ab9 tip default

Add null config files
author Chris Cannam <cannam@all-day-breakfast.com>
date Mon, 02 Mar 2020 14:03:47 +0000
parents 4664ac0c1032
children
rev   line source
cannam@154 1 /***********************************************************************
cannam@154 2 Copyright (c) 2006-2011, Skype Limited. All rights reserved.
cannam@154 3 Redistribution and use in source and binary forms, with or without
cannam@154 4 modification, are permitted provided that the following conditions
cannam@154 5 are met:
cannam@154 6 - Redistributions of source code must retain the above copyright notice,
cannam@154 7 this list of conditions and the following disclaimer.
cannam@154 8 - Redistributions in binary form must reproduce the above copyright
cannam@154 9 notice, this list of conditions and the following disclaimer in the
cannam@154 10 documentation and/or other materials provided with the distribution.
cannam@154 11 - Neither the name of Internet Society, IETF or IETF Trust, nor the
cannam@154 12 names of specific contributors, may be used to endorse or promote
cannam@154 13 products derived from this software without specific prior written
cannam@154 14 permission.
cannam@154 15 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
cannam@154 16 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
cannam@154 17 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
cannam@154 18 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
cannam@154 19 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
cannam@154 20 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
cannam@154 21 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
cannam@154 22 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
cannam@154 23 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
cannam@154 24 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
cannam@154 25 POSSIBILITY OF SUCH DAMAGE.
cannam@154 26 ***********************************************************************/
cannam@154 27
cannam@154 28 #ifdef HAVE_CONFIG_H
cannam@154 29 #include "config.h"
cannam@154 30 #endif
cannam@154 31
cannam@154 32 #include "structs.h"
cannam@154 33 #include "define.h"
cannam@154 34 #include "tables.h"
cannam@154 35
cannam@154 36 #ifdef __cplusplus
cannam@154 37 extern "C"
cannam@154 38 {
cannam@154 39 #endif
cannam@154 40
cannam@154 41 /* Tables for stereo predictor coding */
cannam@154 42 const opus_int16 silk_stereo_pred_quant_Q13[ STEREO_QUANT_TAB_SIZE ] = {
cannam@154 43 -13732, -10050, -8266, -7526, -6500, -5000, -2950, -820,
cannam@154 44 820, 2950, 5000, 6500, 7526, 8266, 10050, 13732
cannam@154 45 };
cannam@154 46 const opus_uint8 silk_stereo_pred_joint_iCDF[ 25 ] = {
cannam@154 47 249, 247, 246, 245, 244,
cannam@154 48 234, 210, 202, 201, 200,
cannam@154 49 197, 174, 82, 59, 56,
cannam@154 50 55, 54, 46, 22, 12,
cannam@154 51 11, 10, 9, 7, 0
cannam@154 52 };
cannam@154 53 const opus_uint8 silk_stereo_only_code_mid_iCDF[ 2 ] = { 64, 0 };
cannam@154 54
cannam@154 55 /* Tables for LBRR flags */
cannam@154 56 static const opus_uint8 silk_LBRR_flags_2_iCDF[ 3 ] = { 203, 150, 0 };
cannam@154 57 static const opus_uint8 silk_LBRR_flags_3_iCDF[ 7 ] = { 215, 195, 166, 125, 110, 82, 0 };
cannam@154 58 const opus_uint8 * const silk_LBRR_flags_iCDF_ptr[ 2 ] = {
cannam@154 59 silk_LBRR_flags_2_iCDF,
cannam@154 60 silk_LBRR_flags_3_iCDF
cannam@154 61 };
cannam@154 62
cannam@154 63 /* Table for LSB coding */
cannam@154 64 const opus_uint8 silk_lsb_iCDF[ 2 ] = { 120, 0 };
cannam@154 65
cannam@154 66 /* Tables for LTPScale */
cannam@154 67 const opus_uint8 silk_LTPscale_iCDF[ 3 ] = { 128, 64, 0 };
cannam@154 68
cannam@154 69 /* Tables for signal type and offset coding */
cannam@154 70 const opus_uint8 silk_type_offset_VAD_iCDF[ 4 ] = {
cannam@154 71 232, 158, 10, 0
cannam@154 72 };
cannam@154 73 const opus_uint8 silk_type_offset_no_VAD_iCDF[ 2 ] = {
cannam@154 74 230, 0
cannam@154 75 };
cannam@154 76
cannam@154 77 /* Tables for NLSF interpolation factor */
cannam@154 78 const opus_uint8 silk_NLSF_interpolation_factor_iCDF[ 5 ] = { 243, 221, 192, 181, 0 };
cannam@154 79
cannam@154 80 /* Quantization offsets */
cannam@154 81 const opus_int16 silk_Quantization_Offsets_Q10[ 2 ][ 2 ] = {
cannam@154 82 { OFFSET_UVL_Q10, OFFSET_UVH_Q10 }, { OFFSET_VL_Q10, OFFSET_VH_Q10 }
cannam@154 83 };
cannam@154 84
cannam@154 85 /* Table for LTPScale */
cannam@154 86 const opus_int16 silk_LTPScales_table_Q14[ 3 ] = { 15565, 12288, 8192 };
cannam@154 87
cannam@154 88 /* Uniform entropy tables */
cannam@154 89 const opus_uint8 silk_uniform3_iCDF[ 3 ] = { 171, 85, 0 };
cannam@154 90 const opus_uint8 silk_uniform4_iCDF[ 4 ] = { 192, 128, 64, 0 };
cannam@154 91 const opus_uint8 silk_uniform5_iCDF[ 5 ] = { 205, 154, 102, 51, 0 };
cannam@154 92 const opus_uint8 silk_uniform6_iCDF[ 6 ] = { 213, 171, 128, 85, 43, 0 };
cannam@154 93 const opus_uint8 silk_uniform8_iCDF[ 8 ] = { 224, 192, 160, 128, 96, 64, 32, 0 };
cannam@154 94
cannam@154 95 const opus_uint8 silk_NLSF_EXT_iCDF[ 7 ] = { 100, 40, 16, 7, 3, 1, 0 };
cannam@154 96
cannam@154 97 /* Elliptic/Cauer filters designed with 0.1 dB passband ripple,
cannam@154 98 80 dB minimum stopband attenuation, and
cannam@154 99 [0.95 : 0.15 : 0.35] normalized cut off frequencies. */
cannam@154 100
cannam@154 101 /* Interpolation points for filter coefficients used in the bandwidth transition smoother */
cannam@154 102 const opus_int32 silk_Transition_LP_B_Q28[ TRANSITION_INT_NUM ][ TRANSITION_NB ] =
cannam@154 103 {
cannam@154 104 { 250767114, 501534038, 250767114 },
cannam@154 105 { 209867381, 419732057, 209867381 },
cannam@154 106 { 170987846, 341967853, 170987846 },
cannam@154 107 { 131531482, 263046905, 131531482 },
cannam@154 108 { 89306658, 178584282, 89306658 }
cannam@154 109 };
cannam@154 110
cannam@154 111 /* Interpolation points for filter coefficients used in the bandwidth transition smoother */
cannam@154 112 const opus_int32 silk_Transition_LP_A_Q28[ TRANSITION_INT_NUM ][ TRANSITION_NA ] =
cannam@154 113 {
cannam@154 114 { 506393414, 239854379 },
cannam@154 115 { 411067935, 169683996 },
cannam@154 116 { 306733530, 116694253 },
cannam@154 117 { 185807084, 77959395 },
cannam@154 118 { 35497197, 57401098 }
cannam@154 119 };
cannam@154 120
cannam@154 121 #ifdef __cplusplus
cannam@154 122 }
cannam@154 123 #endif
cannam@154 124