Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | /*********************************************************************** |
michael@0 | 2 | Copyright (c) 2006-2011, Skype Limited. All rights reserved. |
michael@0 | 3 | Redistribution and use in source and binary forms, with or without |
michael@0 | 4 | modification, are permitted provided that the following conditions |
michael@0 | 5 | are met: |
michael@0 | 6 | - Redistributions of source code must retain the above copyright notice, |
michael@0 | 7 | this list of conditions and the following disclaimer. |
michael@0 | 8 | - Redistributions in binary form must reproduce the above copyright |
michael@0 | 9 | notice, this list of conditions and the following disclaimer in the |
michael@0 | 10 | documentation and/or other materials provided with the distribution. |
michael@0 | 11 | - Neither the name of Internet Society, IETF or IETF Trust, nor the |
michael@0 | 12 | names of specific contributors, may be used to endorse or promote |
michael@0 | 13 | products derived from this software without specific prior written |
michael@0 | 14 | permission. |
michael@0 | 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
michael@0 | 16 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
michael@0 | 17 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
michael@0 | 18 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE |
michael@0 | 19 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
michael@0 | 20 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
michael@0 | 21 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
michael@0 | 22 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
michael@0 | 23 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
michael@0 | 24 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
michael@0 | 25 | POSSIBILITY OF SUCH DAMAGE. |
michael@0 | 26 | ***********************************************************************/ |
michael@0 | 27 | |
michael@0 | 28 | #ifdef HAVE_CONFIG_H |
michael@0 | 29 | #include "config.h" |
michael@0 | 30 | #endif |
michael@0 | 31 | |
michael@0 | 32 | #include "tables.h" |
michael@0 | 33 | |
michael@0 | 34 | const opus_uint8 silk_max_pulses_table[ 4 ] = { |
michael@0 | 35 | 8, 10, 12, 16 |
michael@0 | 36 | }; |
michael@0 | 37 | |
michael@0 | 38 | const opus_uint8 silk_pulses_per_block_iCDF[ 10 ][ 18 ] = { |
michael@0 | 39 | { |
michael@0 | 40 | 125, 51, 26, 18, 15, 12, 11, 10, |
michael@0 | 41 | 9, 8, 7, 6, 5, 4, 3, 2, |
michael@0 | 42 | 1, 0 |
michael@0 | 43 | }, |
michael@0 | 44 | { |
michael@0 | 45 | 198, 105, 45, 22, 15, 12, 11, 10, |
michael@0 | 46 | 9, 8, 7, 6, 5, 4, 3, 2, |
michael@0 | 47 | 1, 0 |
michael@0 | 48 | }, |
michael@0 | 49 | { |
michael@0 | 50 | 213, 162, 116, 83, 59, 43, 32, 24, |
michael@0 | 51 | 18, 15, 12, 9, 7, 6, 5, 3, |
michael@0 | 52 | 2, 0 |
michael@0 | 53 | }, |
michael@0 | 54 | { |
michael@0 | 55 | 239, 187, 116, 59, 28, 16, 11, 10, |
michael@0 | 56 | 9, 8, 7, 6, 5, 4, 3, 2, |
michael@0 | 57 | 1, 0 |
michael@0 | 58 | }, |
michael@0 | 59 | { |
michael@0 | 60 | 250, 229, 188, 135, 86, 51, 30, 19, |
michael@0 | 61 | 13, 10, 8, 6, 5, 4, 3, 2, |
michael@0 | 62 | 1, 0 |
michael@0 | 63 | }, |
michael@0 | 64 | { |
michael@0 | 65 | 249, 235, 213, 185, 156, 128, 103, 83, |
michael@0 | 66 | 66, 53, 42, 33, 26, 21, 17, 13, |
michael@0 | 67 | 10, 0 |
michael@0 | 68 | }, |
michael@0 | 69 | { |
michael@0 | 70 | 254, 249, 235, 206, 164, 118, 77, 46, |
michael@0 | 71 | 27, 16, 10, 7, 5, 4, 3, 2, |
michael@0 | 72 | 1, 0 |
michael@0 | 73 | }, |
michael@0 | 74 | { |
michael@0 | 75 | 255, 253, 249, 239, 220, 191, 156, 119, |
michael@0 | 76 | 85, 57, 37, 23, 15, 10, 6, 4, |
michael@0 | 77 | 2, 0 |
michael@0 | 78 | }, |
michael@0 | 79 | { |
michael@0 | 80 | 255, 253, 251, 246, 237, 223, 203, 179, |
michael@0 | 81 | 152, 124, 98, 75, 55, 40, 29, 21, |
michael@0 | 82 | 15, 0 |
michael@0 | 83 | }, |
michael@0 | 84 | { |
michael@0 | 85 | 255, 254, 253, 247, 220, 162, 106, 67, |
michael@0 | 86 | 42, 28, 18, 12, 9, 6, 4, 3, |
michael@0 | 87 | 2, 0 |
michael@0 | 88 | } |
michael@0 | 89 | }; |
michael@0 | 90 | |
michael@0 | 91 | const opus_uint8 silk_pulses_per_block_BITS_Q5[ 9 ][ 18 ] = { |
michael@0 | 92 | { |
michael@0 | 93 | 31, 57, 107, 160, 205, 205, 255, 255, |
michael@0 | 94 | 255, 255, 255, 255, 255, 255, 255, 255, |
michael@0 | 95 | 255, 255 |
michael@0 | 96 | }, |
michael@0 | 97 | { |
michael@0 | 98 | 69, 47, 67, 111, 166, 205, 255, 255, |
michael@0 | 99 | 255, 255, 255, 255, 255, 255, 255, 255, |
michael@0 | 100 | 255, 255 |
michael@0 | 101 | }, |
michael@0 | 102 | { |
michael@0 | 103 | 82, 74, 79, 95, 109, 128, 145, 160, |
michael@0 | 104 | 173, 205, 205, 205, 224, 255, 255, 224, |
michael@0 | 105 | 255, 224 |
michael@0 | 106 | }, |
michael@0 | 107 | { |
michael@0 | 108 | 125, 74, 59, 69, 97, 141, 182, 255, |
michael@0 | 109 | 255, 255, 255, 255, 255, 255, 255, 255, |
michael@0 | 110 | 255, 255 |
michael@0 | 111 | }, |
michael@0 | 112 | { |
michael@0 | 113 | 173, 115, 85, 73, 76, 92, 115, 145, |
michael@0 | 114 | 173, 205, 224, 224, 255, 255, 255, 255, |
michael@0 | 115 | 255, 255 |
michael@0 | 116 | }, |
michael@0 | 117 | { |
michael@0 | 118 | 166, 134, 113, 102, 101, 102, 107, 118, |
michael@0 | 119 | 125, 138, 145, 155, 166, 182, 192, 192, |
michael@0 | 120 | 205, 150 |
michael@0 | 121 | }, |
michael@0 | 122 | { |
michael@0 | 123 | 224, 182, 134, 101, 83, 79, 85, 97, |
michael@0 | 124 | 120, 145, 173, 205, 224, 255, 255, 255, |
michael@0 | 125 | 255, 255 |
michael@0 | 126 | }, |
michael@0 | 127 | { |
michael@0 | 128 | 255, 224, 192, 150, 120, 101, 92, 89, |
michael@0 | 129 | 93, 102, 118, 134, 160, 182, 192, 224, |
michael@0 | 130 | 224, 224 |
michael@0 | 131 | }, |
michael@0 | 132 | { |
michael@0 | 133 | 255, 224, 224, 182, 155, 134, 118, 109, |
michael@0 | 134 | 104, 102, 106, 111, 118, 131, 145, 160, |
michael@0 | 135 | 173, 131 |
michael@0 | 136 | } |
michael@0 | 137 | }; |
michael@0 | 138 | |
michael@0 | 139 | const opus_uint8 silk_rate_levels_iCDF[ 2 ][ 9 ] = |
michael@0 | 140 | { |
michael@0 | 141 | { |
michael@0 | 142 | 241, 190, 178, 132, 87, 74, 41, 14, |
michael@0 | 143 | 0 |
michael@0 | 144 | }, |
michael@0 | 145 | { |
michael@0 | 146 | 223, 193, 157, 140, 106, 57, 39, 18, |
michael@0 | 147 | 0 |
michael@0 | 148 | } |
michael@0 | 149 | }; |
michael@0 | 150 | |
michael@0 | 151 | const opus_uint8 silk_rate_levels_BITS_Q5[ 2 ][ 9 ] = |
michael@0 | 152 | { |
michael@0 | 153 | { |
michael@0 | 154 | 131, 74, 141, 79, 80, 138, 95, 104, |
michael@0 | 155 | 134 |
michael@0 | 156 | }, |
michael@0 | 157 | { |
michael@0 | 158 | 95, 99, 91, 125, 93, 76, 123, 115, |
michael@0 | 159 | 123 |
michael@0 | 160 | } |
michael@0 | 161 | }; |
michael@0 | 162 | |
michael@0 | 163 | const opus_uint8 silk_shell_code_table0[ 152 ] = { |
michael@0 | 164 | 128, 0, 214, 42, 0, 235, 128, 21, |
michael@0 | 165 | 0, 244, 184, 72, 11, 0, 248, 214, |
michael@0 | 166 | 128, 42, 7, 0, 248, 225, 170, 80, |
michael@0 | 167 | 25, 5, 0, 251, 236, 198, 126, 54, |
michael@0 | 168 | 18, 3, 0, 250, 238, 211, 159, 82, |
michael@0 | 169 | 35, 15, 5, 0, 250, 231, 203, 168, |
michael@0 | 170 | 128, 88, 53, 25, 6, 0, 252, 238, |
michael@0 | 171 | 216, 185, 148, 108, 71, 40, 18, 4, |
michael@0 | 172 | 0, 253, 243, 225, 199, 166, 128, 90, |
michael@0 | 173 | 57, 31, 13, 3, 0, 254, 246, 233, |
michael@0 | 174 | 212, 183, 147, 109, 73, 44, 23, 10, |
michael@0 | 175 | 2, 0, 255, 250, 240, 223, 198, 166, |
michael@0 | 176 | 128, 90, 58, 33, 16, 6, 1, 0, |
michael@0 | 177 | 255, 251, 244, 231, 210, 181, 146, 110, |
michael@0 | 178 | 75, 46, 25, 12, 5, 1, 0, 255, |
michael@0 | 179 | 253, 248, 238, 221, 196, 164, 128, 92, |
michael@0 | 180 | 60, 35, 18, 8, 3, 1, 0, 255, |
michael@0 | 181 | 253, 249, 242, 229, 208, 180, 146, 110, |
michael@0 | 182 | 76, 48, 27, 14, 7, 3, 1, 0 |
michael@0 | 183 | }; |
michael@0 | 184 | |
michael@0 | 185 | const opus_uint8 silk_shell_code_table1[ 152 ] = { |
michael@0 | 186 | 129, 0, 207, 50, 0, 236, 129, 20, |
michael@0 | 187 | 0, 245, 185, 72, 10, 0, 249, 213, |
michael@0 | 188 | 129, 42, 6, 0, 250, 226, 169, 87, |
michael@0 | 189 | 27, 4, 0, 251, 233, 194, 130, 62, |
michael@0 | 190 | 20, 4, 0, 250, 236, 207, 160, 99, |
michael@0 | 191 | 47, 17, 3, 0, 255, 240, 217, 182, |
michael@0 | 192 | 131, 81, 41, 11, 1, 0, 255, 254, |
michael@0 | 193 | 233, 201, 159, 107, 61, 20, 2, 1, |
michael@0 | 194 | 0, 255, 249, 233, 206, 170, 128, 86, |
michael@0 | 195 | 50, 23, 7, 1, 0, 255, 250, 238, |
michael@0 | 196 | 217, 186, 148, 108, 70, 39, 18, 6, |
michael@0 | 197 | 1, 0, 255, 252, 243, 226, 200, 166, |
michael@0 | 198 | 128, 90, 56, 30, 13, 4, 1, 0, |
michael@0 | 199 | 255, 252, 245, 231, 209, 180, 146, 110, |
michael@0 | 200 | 76, 47, 25, 11, 4, 1, 0, 255, |
michael@0 | 201 | 253, 248, 237, 219, 194, 163, 128, 93, |
michael@0 | 202 | 62, 37, 19, 8, 3, 1, 0, 255, |
michael@0 | 203 | 254, 250, 241, 226, 205, 177, 145, 111, |
michael@0 | 204 | 79, 51, 30, 15, 6, 2, 1, 0 |
michael@0 | 205 | }; |
michael@0 | 206 | |
michael@0 | 207 | const opus_uint8 silk_shell_code_table2[ 152 ] = { |
michael@0 | 208 | 129, 0, 203, 54, 0, 234, 129, 23, |
michael@0 | 209 | 0, 245, 184, 73, 10, 0, 250, 215, |
michael@0 | 210 | 129, 41, 5, 0, 252, 232, 173, 86, |
michael@0 | 211 | 24, 3, 0, 253, 240, 200, 129, 56, |
michael@0 | 212 | 15, 2, 0, 253, 244, 217, 164, 94, |
michael@0 | 213 | 38, 10, 1, 0, 253, 245, 226, 189, |
michael@0 | 214 | 132, 71, 27, 7, 1, 0, 253, 246, |
michael@0 | 215 | 231, 203, 159, 105, 56, 23, 6, 1, |
michael@0 | 216 | 0, 255, 248, 235, 213, 179, 133, 85, |
michael@0 | 217 | 47, 19, 5, 1, 0, 255, 254, 243, |
michael@0 | 218 | 221, 194, 159, 117, 70, 37, 12, 2, |
michael@0 | 219 | 1, 0, 255, 254, 248, 234, 208, 171, |
michael@0 | 220 | 128, 85, 48, 22, 8, 2, 1, 0, |
michael@0 | 221 | 255, 254, 250, 240, 220, 189, 149, 107, |
michael@0 | 222 | 67, 36, 16, 6, 2, 1, 0, 255, |
michael@0 | 223 | 254, 251, 243, 227, 201, 166, 128, 90, |
michael@0 | 224 | 55, 29, 13, 5, 2, 1, 0, 255, |
michael@0 | 225 | 254, 252, 246, 234, 213, 183, 147, 109, |
michael@0 | 226 | 73, 43, 22, 10, 4, 2, 1, 0 |
michael@0 | 227 | }; |
michael@0 | 228 | |
michael@0 | 229 | const opus_uint8 silk_shell_code_table3[ 152 ] = { |
michael@0 | 230 | 130, 0, 200, 58, 0, 231, 130, 26, |
michael@0 | 231 | 0, 244, 184, 76, 12, 0, 249, 214, |
michael@0 | 232 | 130, 43, 6, 0, 252, 232, 173, 87, |
michael@0 | 233 | 24, 3, 0, 253, 241, 203, 131, 56, |
michael@0 | 234 | 14, 2, 0, 254, 246, 221, 167, 94, |
michael@0 | 235 | 35, 8, 1, 0, 254, 249, 232, 193, |
michael@0 | 236 | 130, 65, 23, 5, 1, 0, 255, 251, |
michael@0 | 237 | 239, 211, 162, 99, 45, 15, 4, 1, |
michael@0 | 238 | 0, 255, 251, 243, 223, 186, 131, 74, |
michael@0 | 239 | 33, 11, 3, 1, 0, 255, 252, 245, |
michael@0 | 240 | 230, 202, 158, 105, 57, 24, 8, 2, |
michael@0 | 241 | 1, 0, 255, 253, 247, 235, 214, 179, |
michael@0 | 242 | 132, 84, 44, 19, 7, 2, 1, 0, |
michael@0 | 243 | 255, 254, 250, 240, 223, 196, 159, 112, |
michael@0 | 244 | 69, 36, 15, 6, 2, 1, 0, 255, |
michael@0 | 245 | 254, 253, 245, 231, 209, 176, 136, 93, |
michael@0 | 246 | 55, 27, 11, 3, 2, 1, 0, 255, |
michael@0 | 247 | 254, 253, 252, 239, 221, 194, 158, 117, |
michael@0 | 248 | 76, 42, 18, 4, 3, 2, 1, 0 |
michael@0 | 249 | }; |
michael@0 | 250 | |
michael@0 | 251 | const opus_uint8 silk_shell_code_table_offsets[ 17 ] = { |
michael@0 | 252 | 0, 0, 2, 5, 9, 14, 20, 27, |
michael@0 | 253 | 35, 44, 54, 65, 77, 90, 104, 119, |
michael@0 | 254 | 135 |
michael@0 | 255 | }; |
michael@0 | 256 | |
michael@0 | 257 | const opus_uint8 silk_sign_iCDF[ 42 ] = { |
michael@0 | 258 | 254, 49, 67, 77, 82, 93, 99, |
michael@0 | 259 | 198, 11, 18, 24, 31, 36, 45, |
michael@0 | 260 | 255, 46, 66, 78, 87, 94, 104, |
michael@0 | 261 | 208, 14, 21, 32, 42, 51, 66, |
michael@0 | 262 | 255, 94, 104, 109, 112, 115, 118, |
michael@0 | 263 | 248, 53, 69, 80, 88, 95, 102 |
michael@0 | 264 | }; |