1 /* 2 * Copyright (c) 2010 The WebM 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 #include "entropy.h" 13 14 /* *** GENERATED FILE: DO NOT EDIT *** */ 15 16 #if 0 17 int Contexts[vp8_coef_counter_dimen]; 18 19 const int default_contexts[vp8_coef_counter_dimen] = 20 { 21 { 22 // Block Type ( 0 ) 23 { 24 // Coeff Band ( 0 ) 25 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,}, 26 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,}, 27 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,}, 28 }, 29 { 30 // Coeff Band ( 1 ) 31 {30190, 26544, 225, 24, 4, 0, 0, 0, 0, 0, 0, 4171593,}, 32 {26846, 25157, 1241, 130, 26, 6, 1, 0, 0, 0, 0, 149987,}, 33 {10484, 9538, 1006, 160, 36, 18, 0, 0, 0, 0, 0, 15104,}, 34 }, 35 { 36 // Coeff Band ( 2 ) 37 {25842, 40456, 1126, 83, 11, 2, 0, 0, 0, 0, 0, 0,}, 38 {9338, 8010, 512, 73, 7, 3, 2, 0, 0, 0, 0, 43294,}, 39 {1047, 751, 149, 31, 13, 6, 1, 0, 0, 0, 0, 879,}, 40 }, 41 { 42 // Coeff Band ( 3 ) 43 {26136, 9826, 252, 13, 0, 0, 0, 0, 0, 0, 0, 0,}, 44 {8134, 5574, 191, 14, 2, 0, 0, 0, 0, 0, 0, 35302,}, 45 { 605, 677, 116, 9, 1, 0, 0, 0, 0, 0, 0, 611,}, 46 }, 47 { 48 // Coeff Band ( 4 ) 49 {10263, 15463, 283, 17, 0, 0, 0, 0, 0, 0, 0, 0,}, 50 {2773, 2191, 128, 9, 2, 2, 0, 0, 0, 0, 0, 10073,}, 51 { 134, 125, 32, 4, 0, 2, 0, 0, 0, 0, 0, 50,}, 52 }, 53 { 54 // Coeff Band ( 5 ) 55 {10483, 2663, 23, 1, 0, 0, 0, 0, 0, 0, 0, 0,}, 56 {2137, 1251, 27, 1, 1, 0, 0, 0, 0, 0, 0, 14362,}, 57 { 116, 156, 14, 2, 1, 0, 0, 0, 0, 0, 0, 190,}, 58 }, 59 { 60 // Coeff Band ( 6 ) 61 {40977, 27614, 412, 28, 0, 0, 0, 0, 0, 0, 0, 0,}, 62 {6113, 5213, 261, 22, 3, 0, 0, 0, 0, 0, 0, 26164,}, 63 { 382, 312, 50, 14, 2, 0, 0, 0, 0, 0, 0, 345,}, 64 }, 65 { 66 // Coeff Band ( 7 ) 67 { 0, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,}, 68 { 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 319,}, 69 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8,}, 70 }, 71 }, 72 { 73 // Block Type ( 1 ) 74 { 75 // Coeff Band ( 0 ) 76 {3268, 19382, 1043, 250, 93, 82, 49, 26, 17, 8, 25, 82289,}, 77 {8758, 32110, 5436, 1832, 827, 668, 420, 153, 24, 0, 3, 52914,}, 78 {9337, 23725, 8487, 3954, 2107, 1836, 1069, 399, 59, 0, 0, 18620,}, 79 }, 80 { 81 // Coeff Band ( 1 ) 82 {12419, 8420, 452, 62, 9, 1, 0, 0, 0, 0, 0, 0,}, 83 {11715, 8705, 693, 92, 15, 7, 2, 0, 0, 0, 0, 53988,}, 84 {7603, 8585, 2306, 778, 270, 145, 39, 5, 0, 0, 0, 9136,}, 85 }, 86 { 87 // Coeff Band ( 2 ) 88 {15938, 14335, 1207, 184, 55, 13, 4, 1, 0, 0, 0, 0,}, 89 {7415, 6829, 1138, 244, 71, 26, 7, 0, 0, 0, 0, 9980,}, 90 {1580, 1824, 655, 241, 89, 46, 10, 2, 0, 0, 0, 429,}, 91 }, 92 { 93 // Coeff Band ( 3 ) 94 {19453, 5260, 201, 19, 0, 0, 0, 0, 0, 0, 0, 0,}, 95 {9173, 3758, 213, 22, 1, 1, 0, 0, 0, 0, 0, 9820,}, 96 {1689, 1277, 276, 51, 17, 4, 0, 0, 0, 0, 0, 679,}, 97 }, 98 { 99 // Coeff Band ( 4 ) 100 {12076, 10667, 620, 85, 19, 9, 5, 0, 0, 0, 0, 0,}, 101 {4665, 3625, 423, 55, 19, 9, 0, 0, 0, 0, 0, 5127,}, 102 { 415, 440, 143, 34, 20, 7, 2, 0, 0, 0, 0, 101,}, 103 }, 104 { 105 // Coeff Band ( 5 ) 106 {12183, 4846, 115, 11, 1, 0, 0, 0, 0, 0, 0, 0,}, 107 {4226, 3149, 177, 21, 2, 0, 0, 0, 0, 0, 0, 7157,}, 108 { 375, 621, 189, 51, 11, 4, 1, 0, 0, 0, 0, 198,}, 109 }, 110 { 111 // Coeff Band ( 6 ) 112 {61658, 37743, 1203, 94, 10, 3, 0, 0, 0, 0, 0, 0,}, 113 {15514, 11563, 903, 111, 14, 5, 0, 0, 0, 0, 0, 25195,}, 114 { 929, 1077, 291, 78, 14, 7, 1, 0, 0, 0, 0, 507,}, 115 }, 116 { 117 // Coeff Band ( 7 ) 118 { 0, 990, 15, 3, 0, 0, 0, 0, 0, 0, 0, 0,}, 119 { 0, 412, 13, 0, 0, 0, 0, 0, 0, 0, 0, 1641,}, 120 { 0, 18, 7, 1, 0, 0, 0, 0, 0, 0, 0, 30,}, 121 }, 122 }, 123 { 124 // Block Type ( 2 ) 125 { 126 // Coeff Band ( 0 ) 127 { 953, 24519, 628, 120, 28, 12, 4, 0, 0, 0, 0, 2248798,}, 128 {1525, 25654, 2647, 617, 239, 143, 42, 5, 0, 0, 0, 66837,}, 129 {1180, 11011, 3001, 1237, 532, 448, 239, 54, 5, 0, 0, 7122,}, 130 }, 131 { 132 // Coeff Band ( 1 ) 133 {1356, 2220, 67, 10, 4, 1, 0, 0, 0, 0, 0, 0,}, 134 {1450, 2544, 102, 18, 4, 3, 0, 0, 0, 0, 0, 57063,}, 135 {1182, 2110, 470, 130, 41, 21, 0, 0, 0, 0, 0, 6047,}, 136 }, 137 { 138 // Coeff Band ( 2 ) 139 { 370, 3378, 200, 30, 5, 4, 1, 0, 0, 0, 0, 0,}, 140 { 293, 1006, 131, 29, 11, 0, 0, 0, 0, 0, 0, 5404,}, 141 { 114, 387, 98, 23, 4, 8, 1, 0, 0, 0, 0, 236,}, 142 }, 143 { 144 // Coeff Band ( 3 ) 145 { 579, 194, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,}, 146 { 395, 213, 5, 1, 0, 0, 0, 0, 0, 0, 0, 4157,}, 147 { 119, 122, 4, 0, 0, 0, 0, 0, 0, 0, 0, 300,}, 148 }, 149 { 150 // Coeff Band ( 4 ) 151 { 38, 557, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0,}, 152 { 21, 114, 12, 1, 0, 0, 0, 0, 0, 0, 0, 427,}, 153 { 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7,}, 154 }, 155 { 156 // Coeff Band ( 5 ) 157 { 52, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,}, 158 { 18, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 652,}, 159 { 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30,}, 160 }, 161 { 162 // Coeff Band ( 6 ) 163 { 640, 569, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0,}, 164 { 25, 77, 2, 0, 0, 0, 0, 0, 0, 0, 0, 517,}, 165 { 4, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3,}, 166 }, 167 { 168 // Coeff Band ( 7 ) 169 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,}, 170 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,}, 171 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,}, 172 }, 173 }, 174 { 175 // Block Type ( 3 ) 176 { 177 // Coeff Band ( 0 ) 178 {2506, 20161, 2707, 767, 261, 178, 107, 30, 14, 3, 0, 100694,}, 179 {8806, 36478, 8817, 3268, 1280, 850, 401, 114, 42, 0, 0, 58572,}, 180 {11003, 27214, 11798, 5716, 2482, 2072, 1048, 175, 32, 0, 0, 19284,}, 181 }, 182 { 183 // Coeff Band ( 1 ) 184 {9738, 11313, 959, 205, 70, 18, 11, 1, 0, 0, 0, 0,}, 185 {12628, 15085, 1507, 273, 52, 19, 9, 0, 0, 0, 0, 54280,}, 186 {10701, 15846, 5561, 1926, 813, 570, 249, 36, 0, 0, 0, 6460,}, 187 }, 188 { 189 // Coeff Band ( 2 ) 190 {6781, 22539, 2784, 634, 182, 123, 20, 4, 0, 0, 0, 0,}, 191 {6263, 11544, 2649, 790, 259, 168, 27, 5, 0, 0, 0, 20539,}, 192 {3109, 4075, 2031, 896, 457, 386, 158, 29, 0, 0, 0, 1138,}, 193 }, 194 { 195 // Coeff Band ( 3 ) 196 {11515, 4079, 465, 73, 5, 14, 2, 0, 0, 0, 0, 0,}, 197 {9361, 5834, 650, 96, 24, 8, 4, 0, 0, 0, 0, 22181,}, 198 {4343, 3974, 1360, 415, 132, 96, 14, 1, 0, 0, 0, 1267,}, 199 }, 200 { 201 // Coeff Band ( 4 ) 202 {4787, 9297, 823, 168, 44, 12, 4, 0, 0, 0, 0, 0,}, 203 {3619, 4472, 719, 198, 60, 31, 3, 0, 0, 0, 0, 8401,}, 204 {1157, 1175, 483, 182, 88, 31, 8, 0, 0, 0, 0, 268,}, 205 }, 206 { 207 // Coeff Band ( 5 ) 208 {8299, 1226, 32, 5, 1, 0, 0, 0, 0, 0, 0, 0,}, 209 {3502, 1568, 57, 4, 1, 1, 0, 0, 0, 0, 0, 9811,}, 210 {1055, 1070, 166, 29, 6, 1, 0, 0, 0, 0, 0, 527,}, 211 }, 212 { 213 // Coeff Band ( 6 ) 214 {27414, 27927, 1989, 347, 69, 26, 0, 0, 0, 0, 0, 0,}, 215 {5876, 10074, 1574, 341, 91, 24, 4, 0, 0, 0, 0, 21954,}, 216 {1571, 2171, 778, 324, 124, 65, 16, 0, 0, 0, 0, 979,}, 217 }, 218 { 219 // Coeff Band ( 7 ) 220 { 0, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,}, 221 { 0, 23, 0, 0, 0, 0, 0, 0, 0, 0, 0, 459,}, 222 { 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13,}, 223 }, 224 }, 225 }; 226 227 //Update probabilities for the nodes in the token entropy tree. 228 const vp8_prob tree_update_probs[vp8_coef_tree_dimen] = 229 { 230 { 231 { 232 {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, }, 233 {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, }, 234 {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, }, 235 }, 236 { 237 {176, 246, 255, 255, 255, 255, 255, 255, 255, 255, 255, }, 238 {223, 241, 252, 255, 255, 255, 255, 255, 255, 255, 255, }, 239 {249, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255, }, 240 }, 241 { 242 {255, 244, 252, 255, 255, 255, 255, 255, 255, 255, 255, }, 243 {234, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255, }, 244 {253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, }, 245 }, 246 { 247 {255, 246, 254, 255, 255, 255, 255, 255, 255, 255, 255, }, 248 {239, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255, }, 249 {254, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255, }, 250 }, 251 { 252 {255, 248, 254, 255, 255, 255, 255, 255, 255, 255, 255, }, 253 {251, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255, }, 254 {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, }, 255 }, 256 { 257 {255, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255, }, 258 {251, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255, }, 259 {254, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255, }, 260 }, 261 { 262 {255, 254, 253, 255, 254, 255, 255, 255, 255, 255, 255, }, 263 {250, 255, 254, 255, 254, 255, 255, 255, 255, 255, 255, }, 264 {254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, }, 265 }, 266 { 267 {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, }, 268 {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, }, 269 {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, }, 270 }, 271 }, 272 { 273 { 274 {217, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, }, 275 {225, 252, 241, 253, 255, 255, 254, 255, 255, 255, 255, }, 276 {234, 250, 241, 250, 253, 255, 253, 254, 255, 255, 255, }, 277 }, 278 { 279 {255, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, }, 280 {223, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255, }, 281 {238, 253, 254, 254, 255, 255, 255, 255, 255, 255, 255, }, 282 }, 283 { 284 {255, 248, 254, 255, 255, 255, 255, 255, 255, 255, 255, }, 285 {249, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, }, 286 {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, }, 287 }, 288 { 289 {255, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, }, 290 {247, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, }, 291 {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, }, 292 }, 293 { 294 {255, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255, }, 295 {252, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, }, 296 {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, }, 297 }, 298 { 299 {255, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255, }, 300 {253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, }, 301 {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, }, 302 }, 303 { 304 {255, 254, 253, 255, 255, 255, 255, 255, 255, 255, 255, }, 305 {250, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, }, 306 {254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, }, 307 }, 308 { 309 {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, }, 310 {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, }, 311 {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, }, 312 }, 313 }, 314 { 315 { 316 {186, 251, 250, 255, 255, 255, 255, 255, 255, 255, 255, }, 317 {234, 251, 244, 254, 255, 255, 255, 255, 255, 255, 255, }, 318 {251, 251, 243, 253, 254, 255, 254, 255, 255, 255, 255, }, 319 }, 320 { 321 {255, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255, }, 322 {236, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255, }, 323 {251, 253, 253, 254, 254, 255, 255, 255, 255, 255, 255, }, 324 }, 325 { 326 {255, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255, }, 327 {254, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255, }, 328 {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, }, 329 }, 330 { 331 {255, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, }, 332 {254, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, }, 333 {254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, }, 334 }, 335 { 336 {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, }, 337 {254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, }, 338 {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, }, 339 }, 340 { 341 {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, }, 342 {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, }, 343 {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, }, 344 }, 345 { 346 {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, }, 347 {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, }, 348 {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, }, 349 }, 350 { 351 {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, }, 352 {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, }, 353 {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, }, 354 }, 355 }, 356 { 357 { 358 {248, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, }, 359 {250, 254, 252, 254, 255, 255, 255, 255, 255, 255, 255, }, 360 {248, 254, 249, 253, 255, 255, 255, 255, 255, 255, 255, }, 361 }, 362 { 363 {255, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255, }, 364 {246, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255, }, 365 {252, 254, 251, 254, 254, 255, 255, 255, 255, 255, 255, }, 366 }, 367 { 368 {255, 254, 252, 255, 255, 255, 255, 255, 255, 255, 255, }, 369 {248, 254, 253, 255, 255, 255, 255, 255, 255, 255, 255, }, 370 {253, 255, 254, 254, 255, 255, 255, 255, 255, 255, 255, }, 371 }, 372 { 373 {255, 251, 254, 255, 255, 255, 255, 255, 255, 255, 255, }, 374 {245, 251, 254, 255, 255, 255, 255, 255, 255, 255, 255, }, 375 {253, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255, }, 376 }, 377 { 378 {255, 251, 253, 255, 255, 255, 255, 255, 255, 255, 255, }, 379 {252, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255, }, 380 {255, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, }, 381 }, 382 { 383 {255, 252, 255, 255, 255, 255, 255, 255, 255, 255, 255, }, 384 {249, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255, }, 385 {255, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255, }, 386 }, 387 { 388 {255, 255, 253, 255, 255, 255, 255, 255, 255, 255, 255, }, 389 {250, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, }, 390 {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, }, 391 }, 392 { 393 {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, }, 394 {254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, }, 395 {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, }, 396 }, 397 }, 398 }; 399 #endif 400