webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
tables.h
Go to the documentation of this file.
1 /***********************************************************************
2 Copyright (c) 2006-2011, Skype Limited. All rights reserved.
3 Redistribution and use in source and binary forms, with or without
4 modification, are permitted provided that the following conditions
5 are met:
6 - Redistributions of source code must retain the above copyright notice,
7 this list of conditions and the following disclaimer.
8 - Redistributions in binary form must reproduce the above copyright
9 notice, this list of conditions and the following disclaimer in the
10 documentation and/or other materials provided with the distribution.
11 - Neither the name of Internet Society, IETF or IETF Trust, nor the
12 names of specific contributors, may be used to endorse or promote
13 products derived from this software without specific prior written
14 permission.
15 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
16 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
19 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
20 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
21 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
23 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
24 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
25 POSSIBILITY OF SUCH DAMAGE.
26 ***********************************************************************/
27 
28 #ifndef SILK_TABLES_H
29 #define SILK_TABLES_H
30 
31 #include "define.h"
32 #include "structs.h"
33 
34 #ifdef __cplusplus
35 extern "C"
36 {
37 #endif
38 
39 /* Entropy coding tables (with size in bytes indicated) */
40 extern const opus_uint8 silk_gain_iCDF[ 3 ][ N_LEVELS_QGAIN / 8 ]; /* 24 */
42 
44 extern const opus_uint8 silk_pitch_delta_iCDF[ 21 ]; /* 21 */
45 extern const opus_uint8 silk_pitch_contour_iCDF[ 34 ]; /* 34 */
46 extern const opus_uint8 silk_pitch_contour_NB_iCDF[ 11 ]; /* 11 */
47 extern const opus_uint8 silk_pitch_contour_10_ms_iCDF[ 12 ]; /* 12 */
48 extern const opus_uint8 silk_pitch_contour_10_ms_NB_iCDF[ 3 ]; /* 3 */
49 
51 extern const opus_uint8 silk_pulses_per_block_BITS_Q5[ N_RATE_LEVELS - 1 ][ SILK_MAX_PULSES + 2 ]; /* 162 */
52 
53 extern const opus_uint8 silk_rate_levels_iCDF[ 2 ][ N_RATE_LEVELS - 1 ]; /* 18 */
54 extern const opus_uint8 silk_rate_levels_BITS_Q5[ 2 ][ N_RATE_LEVELS - 1 ]; /* 18 */
55 
56 extern const opus_uint8 silk_max_pulses_table[ 4 ]; /* 4 */
57 
58 extern const opus_uint8 silk_shell_code_table0[ 152 ]; /* 152 */
59 extern const opus_uint8 silk_shell_code_table1[ 152 ]; /* 152 */
60 extern const opus_uint8 silk_shell_code_table2[ 152 ]; /* 152 */
61 extern const opus_uint8 silk_shell_code_table3[ 152 ]; /* 152 */
62 extern const opus_uint8 silk_shell_code_table_offsets[ SILK_MAX_PULSES + 1 ]; /* 17 */
63 
64 extern const opus_uint8 silk_lsb_iCDF[ 2 ]; /* 2 */
65 
66 extern const opus_uint8 silk_sign_iCDF[ 42 ]; /* 42 */
67 
68 extern const opus_uint8 silk_uniform3_iCDF[ 3 ]; /* 3 */
69 extern const opus_uint8 silk_uniform4_iCDF[ 4 ]; /* 4 */
70 extern const opus_uint8 silk_uniform5_iCDF[ 5 ]; /* 5 */
71 extern const opus_uint8 silk_uniform6_iCDF[ 6 ]; /* 6 */
72 extern const opus_uint8 silk_uniform8_iCDF[ 8 ]; /* 8 */
73 
74 extern const opus_uint8 silk_NLSF_EXT_iCDF[ 7 ]; /* 7 */
75 
76 extern const opus_uint8 silk_LTP_per_index_iCDF[ 3 ]; /* 3 */
77 extern const opus_uint8 * const silk_LTP_gain_iCDF_ptrs[ NB_LTP_CBKS ]; /* 3 */
78 extern const opus_uint8 * const silk_LTP_gain_BITS_Q5_ptrs[ NB_LTP_CBKS ]; /* 3 */
80 extern const opus_int8 * const silk_LTP_vq_ptrs_Q7[ NB_LTP_CBKS ]; /* 168 */
81 extern const opus_uint8 * const silk_LTP_vq_gain_ptrs_Q7[NB_LTP_CBKS];
82 
83 extern const opus_int8 silk_LTP_vq_sizes[ NB_LTP_CBKS ]; /* 3 */
84 
85 extern const opus_uint8 silk_LTPscale_iCDF[ 3 ]; /* 4 */
86 extern const opus_int16 silk_LTPScales_table_Q14[ 3 ]; /* 6 */
87 
88 extern const opus_uint8 silk_type_offset_VAD_iCDF[ 4 ]; /* 4 */
89 extern const opus_uint8 silk_type_offset_no_VAD_iCDF[ 2 ]; /* 2 */
90 
92 extern const opus_uint8 silk_stereo_pred_joint_iCDF[ 25 ]; /* 25 */
93 extern const opus_uint8 silk_stereo_only_code_mid_iCDF[ 2 ]; /* 2 */
94 
95 extern const opus_uint8 * const silk_LBRR_flags_iCDF_ptr[ 2 ]; /* 10 */
96 
97 extern const opus_uint8 silk_NLSF_interpolation_factor_iCDF[ 5 ]; /* 5 */
98 
99 extern const silk_NLSF_CB_struct silk_NLSF_CB_WB; /* 1040 */
100 extern const silk_NLSF_CB_struct silk_NLSF_CB_NB_MB; /* 728 */
101 
102 /* Piece-wise linear mapping from bitrate in kbps to coding quality in dB SNR */
106 extern const opus_int16 silk_SNR_table_Q1[ TARGET_RATE_TAB_SZ ]; /* 32 */
107 
108 /* Quantization offsets */
109 extern const opus_int16 silk_Quantization_Offsets_Q10[ 2 ][ 2 ]; /* 8 */
110 
111 /* Interpolation points for filter coefficients used in the bandwidth transition smoother */
114 
115 /* Rom table with cosine values */
116 extern const opus_int16 silk_LSFCosTab_FIX_Q12[ LSF_COS_TAB_SZ_FIX + 1 ]; /* 258 */
117 
118 #ifdef __cplusplus
119 }
120 #endif
121 
122 #endif
const opus_int16 silk_SNR_table_Q1[TARGET_RATE_TAB_SZ]
Definition: tables_other.c:51
#define TRANSITION_NB
Definition: define.h:217
const opus_int8 silk_LTP_vq_sizes[NB_LTP_CBKS]
Definition: tables_LTP.c:294
const opus_uint8 silk_shell_code_table2[152]
Definition: tables_pulses_per_block.c:207
#define NB_LTP_CBKS
Definition: define.h:144
#define N_LEVELS_QGAIN
Definition: define.h:118
const opus_uint8 silk_NLSF_interpolation_factor_iCDF[5]
Definition: tables_other.c:92
Definition: structs.h:83
const opus_int16 silk_Quantization_Offsets_Q10[2][2]
Definition: tables_other.c:95
short opus_int16
Definition: opus_types.h:144
#define TRANSITION_NA
Definition: define.h:218
const opus_int8 *const silk_LTP_vq_ptrs_Q7[NB_LTP_CBKS]
Definition: tables_LTP.c:264
#define opus_int8
Definition: opus_types.h:153
const opus_uint8 silk_uniform3_iCDF[3]
Definition: tables_other.c:103
const opus_int16 silk_LTPScales_table_Q14[3]
Definition: tables_other.c:100
const opus_uint8 *const silk_LTP_gain_BITS_Q5_ptrs[NB_LTP_CBKS]
Definition: tables_LTP.c:78
const opus_uint8 silk_pitch_contour_10_ms_NB_iCDF[3]
Definition: tables_pitch_lag.c:65
#define STEREO_QUANT_TAB_SIZE
Definition: define.h:75
const opus_uint8 silk_pitch_contour_iCDF[34]
Definition: tables_pitch_lag.c:47
#define TRANSITION_INT_NUM
Definition: define.h:219
const opus_uint8 silk_type_offset_VAD_iCDF[4]
Definition: tables_other.c:84
const opus_uint8 silk_LTPscale_iCDF[3]
Definition: tables_other.c:81
const opus_uint8 silk_pitch_delta_iCDF[21]
Definition: tables_pitch_lag.c:41
const opus_uint8 silk_stereo_only_code_mid_iCDF[2]
Definition: tables_other.c:67
const opus_int32 silk_TargetRate_table_WB[TARGET_RATE_TAB_SZ]
Definition: tables_other.c:48
const silk_NLSF_CB_struct silk_NLSF_CB_NB_MB
Definition: tables_NLSF_CB_NB_MB.c:146
#define SILK_MAX_PULSES
Definition: define.h:172
#define N_RATE_LEVELS
Definition: define.h:169
const opus_uint8 silk_shell_code_table1[152]
Definition: tables_pulses_per_block.c:185
const opus_uint8 silk_shell_code_table_offsets[SILK_MAX_PULSES+1]
Definition: tables_pulses_per_block.c:251
const opus_int16 silk_stereo_pred_quant_Q13[STEREO_QUANT_TAB_SIZE]
Definition: tables_other.c:56
const opus_int32 silk_Transition_LP_A_Q28[TRANSITION_INT_NUM][TRANSITION_NA]
Definition: tables_other.c:126
const opus_uint8 *const silk_LBRR_flags_iCDF_ptr[2]
Definition: tables_other.c:72
const opus_int32 silk_TargetRate_table_MB[TARGET_RATE_TAB_SZ]
Definition: tables_other.c:45
int opus_int32
Definition: opus_types.h:146
const opus_uint8 silk_type_offset_no_VAD_iCDF[2]
Definition: tables_other.c:87
#define opus_uint8
Definition: opus_types.h:157
const silk_NLSF_CB_struct silk_NLSF_CB_WB
Definition: tables_NLSF_CB_WB.c:184
const opus_uint8 silk_pitch_lag_iCDF[2 *(PITCH_EST_MAX_LAG_MS - PITCH_EST_MIN_LAG_MS)]
Definition: tables_pitch_lag.c:34
#define PITCH_EST_MAX_LAG_MS
Definition: define.h:82
const opus_uint8 silk_pitch_contour_10_ms_iCDF[12]
Definition: tables_pitch_lag.c:60
const opus_uint8 silk_lsb_iCDF[2]
Definition: tables_other.c:78
const opus_uint8 silk_gain_iCDF[3][N_LEVELS_QGAIN/8]
Definition: tables_gain.c:39
const opus_uint8 *const silk_LTP_vq_gain_ptrs_Q7[NB_LTP_CBKS]
Definition: tables_LTP.c:288
const opus_uint8 silk_shell_code_table0[152]
Definition: tables_pulses_per_block.c:163
const opus_uint8 silk_delta_gain_iCDF[MAX_DELTA_GAIN_QUANT - MIN_DELTA_GAIN_QUANT+1]
Definition: tables_gain.c:52
#define MIN_DELTA_GAIN_QUANT
Definition: define.h:122
const opus_uint8 *const silk_LTP_gain_iCDF_ptrs[NB_LTP_CBKS]
Definition: tables_LTP.c:72
#define LSF_COS_TAB_SZ_FIX
Definition: define.h:201
const opus_uint8 silk_pulses_per_block_BITS_Q5[N_RATE_LEVELS - 1][SILK_MAX_PULSES+2]
Definition: tables_pulses_per_block.c:91
const opus_int32 silk_TargetRate_table_NB[TARGET_RATE_TAB_SZ]
Definition: tables_other.c:42
#define TARGET_RATE_TAB_SZ
Definition: define.h:49
const opus_int32 silk_Transition_LP_B_Q28[TRANSITION_INT_NUM][TRANSITION_NB]
Definition: tables_other.c:116
const opus_uint8 silk_pitch_contour_NB_iCDF[11]
Definition: tables_pitch_lag.c:55
const opus_uint8 silk_max_pulses_table[4]
Definition: tables_pulses_per_block.c:34
const opus_uint8 silk_stereo_pred_joint_iCDF[25]
Definition: tables_other.c:60
const opus_uint8 silk_uniform6_iCDF[6]
Definition: tables_other.c:106
const opus_uint8 silk_rate_levels_iCDF[2][N_RATE_LEVELS - 1]
Definition: tables_pulses_per_block.c:139
const opus_uint8 silk_rate_levels_BITS_Q5[2][N_RATE_LEVELS - 1]
Definition: tables_pulses_per_block.c:151
#define PITCH_EST_MIN_LAG_MS
Definition: define.h:81
#define MAX_DELTA_GAIN_QUANT
Definition: define.h:120
const opus_uint8 silk_uniform8_iCDF[8]
Definition: tables_other.c:107
const opus_uint8 silk_NLSF_EXT_iCDF[7]
Definition: tables_other.c:109
const opus_uint8 silk_sign_iCDF[42]
Definition: tables_pulses_per_block.c:257
const opus_uint8 silk_shell_code_table3[152]
Definition: tables_pulses_per_block.c:229
const opus_uint8 silk_pulses_per_block_iCDF[N_RATE_LEVELS][SILK_MAX_PULSES+2]
Definition: tables_pulses_per_block.c:38
const opus_uint8 silk_LTP_per_index_iCDF[3]
Definition: tables_LTP.c:34
const opus_int16 silk_LTP_gain_middle_avg_RD_Q14
Definition: tables_LTP.c:54
const opus_int16 silk_LSFCosTab_FIX_Q12[LSF_COS_TAB_SZ_FIX+1]
Definition: table_LSF_cos.c:36
const opus_uint8 silk_uniform5_iCDF[5]
Definition: tables_other.c:105
const opus_uint8 silk_uniform4_iCDF[4]
Definition: tables_other.c:104