entropy.c 253 KB
Newer Older
Jingning Han's avatar
Jingning Han committed
1
/*
Yaowu Xu's avatar
Yaowu Xu committed
2
 * Copyright (c) 2016, Alliance for Open Media. All rights reserved
Jingning Han's avatar
Jingning Han committed
3
 *
Yaowu Xu's avatar
Yaowu Xu committed
4 5 6 7 8 9
 * This source code is subject to the terms of the BSD 2 Clause License and
 * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
 * was not distributed with this source code in the LICENSE file, you can
 * obtain it at www.aomedia.org/license/software. If the Alliance for Open
 * Media Patent License 1.0 was not distributed with this source code in the
 * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
Jingning Han's avatar
Jingning Han committed
10 11
 */

12 13 14
#include "./aom_config.h"
#include "aom/aom_integer.h"
#include "aom_mem/aom_mem.h"
15
#include "av1/common/blockd.h"
Angie Chiang's avatar
Angie Chiang committed
16
#include "av1/common/entropy.h"
17
#include "av1/common/entropymode.h"
18
#include "av1/common/onyxc_int.h"
19
#include "av1/common/scan.h"
Angie Chiang's avatar
Angie Chiang committed
20 21 22
#if CONFIG_LV_MAP
#include "av1/common/txb_common.h"
#endif
Jingning Han's avatar
Jingning Han committed
23 24

// Unconstrained Node Tree
clang-format's avatar
clang-format committed
25
/* clang-format off */
Yaowu Xu's avatar
Yaowu Xu committed
26
const aom_tree_index av1_coef_con_tree[TREE_SIZE(ENTROPY_TOKENS)] = {
Jingning Han's avatar
Jingning Han committed
27 28 29 30 31 32 33 34 35
  2, 6,                                // 0 = LOW_VAL
  -TWO_TOKEN, 4,                       // 1 = TWO
  -THREE_TOKEN, -FOUR_TOKEN,           // 2 = THREE
  8, 10,                               // 3 = HIGH_LOW
  -CATEGORY1_TOKEN, -CATEGORY2_TOKEN,  // 4 = CAT_ONE
  12, 14,                              // 5 = CAT_THREEFOUR
  -CATEGORY3_TOKEN, -CATEGORY4_TOKEN,  // 6 = CAT_THREE
  -CATEGORY5_TOKEN, -CATEGORY6_TOKEN   // 7 = CAT_FIVE
};
clang-format's avatar
clang-format committed
36
/* clang-format on */
Jingning Han's avatar
Jingning Han committed
37

Yaowu Xu's avatar
Yaowu Xu committed
38 39 40 41 42
const aom_prob av1_cat1_prob[] = { 159 };
const aom_prob av1_cat2_prob[] = { 165, 145 };
const aom_prob av1_cat3_prob[] = { 173, 148, 140 };
const aom_prob av1_cat4_prob[] = { 176, 155, 140, 135 };
const aom_prob av1_cat5_prob[] = { 180, 157, 141, 134, 130 };
43 44 45
const aom_prob av1_cat6_prob[] = {
  255, 255, 255, 255, 254, 254, 254, 252, 249,
  243, 230, 196, 177, 153, 140, 133, 130, 129
Jingning Han's avatar
Jingning Han committed
46 47
};

48
const uint16_t band_count_table[TX_SIZES_ALL][8] = {
49 50 51
#if CONFIG_CB4X4
  { 1, 2, 2, 3, 0, 0, 0 },
#endif
52 53 54 55 56 57 58 59
  { 1, 2, 3, 4, 3, 16 - 13, 0 },    { 1, 2, 3, 4, 11, 64 - 21, 0 },
  { 1, 2, 3, 4, 11, 256 - 21, 0 },  { 1, 2, 3, 4, 11, 1024 - 21, 0 },
#if CONFIG_TX64X64
  { 1, 2, 3, 4, 11, 4096 - 21, 0 },
#endif  // CONFIG_TX64X64
  { 1, 2, 3, 4, 8, 32 - 18, 0 },    { 1, 2, 3, 4, 8, 32 - 18, 0 },
  { 1, 2, 3, 4, 11, 128 - 21, 0 },  { 1, 2, 3, 4, 11, 128 - 21, 0 },
  { 1, 2, 3, 4, 11, 512 - 21, 0 },  { 1, 2, 3, 4, 11, 512 - 21, 0 },
60 61
  { 1, 2, 3, 4, 11, 64 - 21, 0 },   { 1, 2, 3, 4, 11, 64 - 21, 0 },
  { 1, 2, 3, 4, 11, 256 - 21, 0 },  { 1, 2, 3, 4, 11, 256 - 21, 0 },
62 63 64
};

const uint16_t band_cum_count_table[TX_SIZES_ALL][8] = {
65 66 67
#if CONFIG_CB4X4
  { 0, 1, 3, 6, 10, 13, 16, 0 },
#endif
68 69 70 71 72 73 74 75
  { 0, 1, 3, 6, 10, 13, 16, 0 },   { 0, 1, 3, 6, 10, 21, 64, 0 },
  { 0, 1, 3, 6, 10, 21, 256, 0 },  { 0, 1, 3, 6, 10, 21, 1024, 0 },
#if CONFIG_TX64X64
  { 0, 1, 3, 6, 10, 21, 4096, 0 },
#endif  // CONFIG_TX64X64
  { 0, 1, 3, 6, 10, 18, 32, 0 },   { 0, 1, 3, 6, 10, 18, 32, 0 },
  { 0, 1, 3, 6, 10, 21, 128, 0 },  { 0, 1, 3, 6, 10, 21, 128, 0 },
  { 0, 1, 3, 6, 10, 21, 512, 0 },  { 0, 1, 3, 6, 10, 21, 512, 0 },
76 77
  { 0, 1, 3, 6, 10, 21, 64, 0 },   { 0, 1, 3, 6, 10, 21, 64, 0 },
  { 0, 1, 3, 6, 10, 21, 256, 0 },  { 0, 1, 3, 6, 10, 21, 256, 0 },
78 79
};

80
const uint8_t av1_coefband_trans_8x8plus[MAX_TX_SQUARE] = {
clang-format's avatar
clang-format committed
81
  0, 1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5,
Jingning Han's avatar
Jingning Han committed
82
  // beyond MAXBAND_INDEX+1 all values are filled as 5
clang-format's avatar
clang-format committed
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121
  5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
  5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
  5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
  5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
  5, 5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
  5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
  5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
  5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
  5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
  5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
  5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
  5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
  5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
  5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242
#if CONFIG_TX64X64
  5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
  5, 5, 5, 5, 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, 5, 5, 5, 5,
  5, 5, 5, 5
#endif  // CONFIG_TX64X64
Jingning Han's avatar
Jingning Han committed
243 244
};

Yaowu Xu's avatar
Yaowu Xu committed
245
const uint8_t av1_coefband_trans_4x8_8x4[32] = {
246 247 248 249
  0, 1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4,
  4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
};

Yaowu Xu's avatar
Yaowu Xu committed
250
const uint8_t av1_coefband_trans_4x4[16] = {
Jingning Han's avatar
Jingning Han committed
251 252 253
  0, 1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 5, 5, 5,
};

Yaowu Xu's avatar
Yaowu Xu committed
254 255
const uint8_t av1_pt_energy_class[ENTROPY_TOKENS] = { 0, 1, 2, 3, 3, 4,
                                                      4, 5, 5, 5, 5, 5 };
Jingning Han's avatar
Jingning Han committed
256

Alex Converse's avatar
Alex Converse committed
257
// Model obtained from a 2-sided zero-centered distribution derived
Jingning Han's avatar
Jingning Han committed
258 259 260 261 262 263 264 265 266 267 268
// from a Pareto distribution. The cdf of the distribution is:
// cdf(x) = 0.5 + 0.5 * sgn(x) * [1 - {alpha/(alpha + |x|)} ^ beta]
//
// For a given beta and a given probablity of the 1-node, the alpha
// is first solved, and then the {alpha, beta} pair is used to generate
// the probabilities for the rest of the nodes.

// beta = 8

// Every odd line in this table can be generated from the even lines
// by averaging :
Yaowu Xu's avatar
Yaowu Xu committed
269 270
// av1_pareto8_full[l][node] = (av1_pareto8_full[l-1][node] +
//                              av1_pareto8_full[l+1][node] ) >> 1;
271
// Values for tokens ONE_TOKEN through CATEGORY6_TOKEN included here.
Yaowu Xu's avatar
Yaowu Xu committed
272
const aom_prob av1_pareto8_full[COEFF_PROB_MODELS][MODEL_NODES] = {
clang-format's avatar
clang-format committed
273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527
  { 3, 86, 128, 6, 86, 23, 88, 29 },
  { 6, 86, 128, 11, 87, 42, 91, 52 },
  { 9, 86, 129, 17, 88, 61, 94, 76 },
  { 12, 86, 129, 22, 88, 77, 97, 93 },
  { 15, 87, 129, 28, 89, 93, 100, 110 },
  { 17, 87, 129, 33, 90, 105, 103, 123 },
  { 20, 88, 130, 38, 91, 118, 106, 136 },
  { 23, 88, 130, 43, 91, 128, 108, 146 },
  { 26, 89, 131, 48, 92, 139, 111, 156 },
  { 28, 89, 131, 53, 93, 147, 114, 163 },
  { 31, 90, 131, 58, 94, 156, 117, 171 },
  { 34, 90, 131, 62, 94, 163, 119, 177 },
  { 37, 90, 132, 66, 95, 171, 122, 184 },
  { 39, 90, 132, 70, 96, 177, 124, 189 },
  { 42, 91, 132, 75, 97, 183, 127, 194 },
  { 44, 91, 132, 79, 97, 188, 129, 198 },
  { 47, 92, 133, 83, 98, 193, 132, 202 },
  { 49, 92, 133, 86, 99, 197, 134, 205 },
  { 52, 93, 133, 90, 100, 201, 137, 208 },
  { 54, 93, 133, 94, 100, 204, 139, 211 },
  { 57, 94, 134, 98, 101, 208, 142, 214 },
  { 59, 94, 134, 101, 102, 211, 144, 216 },
  { 62, 94, 135, 105, 103, 214, 146, 218 },
  { 64, 94, 135, 108, 103, 216, 148, 220 },
  { 66, 95, 135, 111, 104, 219, 151, 222 },
  { 68, 95, 135, 114, 105, 221, 153, 223 },
  { 71, 96, 136, 117, 106, 224, 155, 225 },
  { 73, 96, 136, 120, 106, 225, 157, 226 },
  { 76, 97, 136, 123, 107, 227, 159, 228 },
  { 78, 97, 136, 126, 108, 229, 160, 229 },
  { 80, 98, 137, 129, 109, 231, 162, 231 },
  { 82, 98, 137, 131, 109, 232, 164, 232 },
  { 84, 98, 138, 134, 110, 234, 166, 233 },
  { 86, 98, 138, 137, 111, 235, 168, 234 },
  { 89, 99, 138, 140, 112, 236, 170, 235 },
  { 91, 99, 138, 142, 112, 237, 171, 235 },
  { 93, 100, 139, 145, 113, 238, 173, 236 },
  { 95, 100, 139, 147, 114, 239, 174, 237 },
  { 97, 101, 140, 149, 115, 240, 176, 238 },
  { 99, 101, 140, 151, 115, 241, 177, 238 },
  { 101, 102, 140, 154, 116, 242, 179, 239 },
  { 103, 102, 140, 156, 117, 242, 180, 239 },
  { 105, 103, 141, 158, 118, 243, 182, 240 },
  { 107, 103, 141, 160, 118, 243, 183, 240 },
  { 109, 104, 141, 162, 119, 244, 185, 241 },
  { 111, 104, 141, 164, 119, 244, 186, 241 },
  { 113, 104, 142, 166, 120, 245, 187, 242 },
  { 114, 104, 142, 168, 121, 245, 188, 242 },
  { 116, 105, 143, 170, 122, 246, 190, 243 },
  { 118, 105, 143, 171, 122, 246, 191, 243 },
  { 120, 106, 143, 173, 123, 247, 192, 244 },
  { 121, 106, 143, 175, 124, 247, 193, 244 },
  { 123, 107, 144, 177, 125, 248, 195, 244 },
  { 125, 107, 144, 178, 125, 248, 196, 244 },
  { 127, 108, 145, 180, 126, 249, 197, 245 },
  { 128, 108, 145, 181, 127, 249, 198, 245 },
  { 130, 109, 145, 183, 128, 249, 199, 245 },
  { 132, 109, 145, 184, 128, 249, 200, 245 },
  { 134, 110, 146, 186, 129, 250, 201, 246 },
  { 135, 110, 146, 187, 130, 250, 202, 246 },
  { 137, 111, 147, 189, 131, 251, 203, 246 },
  { 138, 111, 147, 190, 131, 251, 204, 246 },
  { 140, 112, 147, 192, 132, 251, 205, 247 },
  { 141, 112, 147, 193, 132, 251, 206, 247 },
  { 143, 113, 148, 194, 133, 251, 207, 247 },
  { 144, 113, 148, 195, 134, 251, 207, 247 },
  { 146, 114, 149, 197, 135, 252, 208, 248 },
  { 147, 114, 149, 198, 135, 252, 209, 248 },
  { 149, 115, 149, 199, 136, 252, 210, 248 },
  { 150, 115, 149, 200, 137, 252, 210, 248 },
  { 152, 115, 150, 201, 138, 252, 211, 248 },
  { 153, 115, 150, 202, 138, 252, 212, 248 },
  { 155, 116, 151, 204, 139, 253, 213, 249 },
  { 156, 116, 151, 205, 139, 253, 213, 249 },
  { 158, 117, 151, 206, 140, 253, 214, 249 },
  { 159, 117, 151, 207, 141, 253, 215, 249 },
  { 161, 118, 152, 208, 142, 253, 216, 249 },
  { 162, 118, 152, 209, 142, 253, 216, 249 },
  { 163, 119, 153, 210, 143, 253, 217, 249 },
  { 164, 119, 153, 211, 143, 253, 217, 249 },
  { 166, 120, 153, 212, 144, 254, 218, 250 },
  { 167, 120, 153, 212, 145, 254, 219, 250 },
  { 168, 121, 154, 213, 146, 254, 220, 250 },
  { 169, 121, 154, 214, 146, 254, 220, 250 },
  { 171, 122, 155, 215, 147, 254, 221, 250 },
  { 172, 122, 155, 216, 147, 254, 221, 250 },
  { 173, 123, 155, 217, 148, 254, 222, 250 },
  { 174, 123, 155, 217, 149, 254, 222, 250 },
  { 176, 124, 156, 218, 150, 254, 223, 250 },
  { 177, 124, 156, 219, 150, 254, 223, 250 },
  { 178, 125, 157, 220, 151, 254, 224, 251 },
  { 179, 125, 157, 220, 151, 254, 224, 251 },
  { 180, 126, 157, 221, 152, 254, 225, 251 },
  { 181, 126, 157, 221, 152, 254, 225, 251 },
  { 183, 127, 158, 222, 153, 254, 226, 251 },
  { 184, 127, 158, 223, 154, 254, 226, 251 },
  { 185, 128, 159, 224, 155, 255, 227, 251 },
  { 186, 128, 159, 224, 155, 255, 227, 251 },
  { 187, 129, 160, 225, 156, 255, 228, 251 },
  { 188, 130, 160, 225, 156, 255, 228, 251 },
  { 189, 131, 160, 226, 157, 255, 228, 251 },
  { 190, 131, 160, 226, 158, 255, 228, 251 },
  { 191, 132, 161, 227, 159, 255, 229, 251 },
  { 192, 132, 161, 227, 159, 255, 229, 251 },
  { 193, 133, 162, 228, 160, 255, 230, 252 },
  { 194, 133, 162, 229, 160, 255, 230, 252 },
  { 195, 134, 163, 230, 161, 255, 231, 252 },
  { 196, 134, 163, 230, 161, 255, 231, 252 },
  { 197, 135, 163, 231, 162, 255, 231, 252 },
  { 198, 135, 163, 231, 162, 255, 231, 252 },
  { 199, 136, 164, 232, 163, 255, 232, 252 },
  { 200, 136, 164, 232, 164, 255, 232, 252 },
  { 201, 137, 165, 233, 165, 255, 233, 252 },
  { 201, 137, 165, 233, 165, 255, 233, 252 },
  { 202, 138, 166, 233, 166, 255, 233, 252 },
  { 203, 138, 166, 233, 166, 255, 233, 252 },
  { 204, 139, 166, 234, 167, 255, 234, 252 },
  { 205, 139, 166, 234, 167, 255, 234, 252 },
  { 206, 140, 167, 235, 168, 255, 235, 252 },
  { 206, 140, 167, 235, 168, 255, 235, 252 },
  { 207, 141, 168, 236, 169, 255, 235, 252 },
  { 208, 141, 168, 236, 170, 255, 235, 252 },
  { 209, 142, 169, 237, 171, 255, 236, 252 },
  { 209, 143, 169, 237, 171, 255, 236, 252 },
  { 210, 144, 169, 237, 172, 255, 236, 252 },
  { 211, 144, 169, 237, 172, 255, 236, 252 },
  { 212, 145, 170, 238, 173, 255, 237, 252 },
  { 213, 145, 170, 238, 173, 255, 237, 252 },
  { 214, 146, 171, 239, 174, 255, 237, 253 },
  { 214, 146, 171, 239, 174, 255, 237, 253 },
  { 215, 147, 172, 240, 175, 255, 238, 253 },
  { 215, 147, 172, 240, 175, 255, 238, 253 },
  { 216, 148, 173, 240, 176, 255, 238, 253 },
  { 217, 148, 173, 240, 176, 255, 238, 253 },
  { 218, 149, 173, 241, 177, 255, 239, 253 },
  { 218, 149, 173, 241, 178, 255, 239, 253 },
  { 219, 150, 174, 241, 179, 255, 239, 253 },
  { 219, 151, 174, 241, 179, 255, 239, 253 },
  { 220, 152, 175, 242, 180, 255, 240, 253 },
  { 221, 152, 175, 242, 180, 255, 240, 253 },
  { 222, 153, 176, 242, 181, 255, 240, 253 },
  { 222, 153, 176, 242, 181, 255, 240, 253 },
  { 223, 154, 177, 243, 182, 255, 240, 253 },
  { 223, 154, 177, 243, 182, 255, 240, 253 },
  { 224, 155, 178, 244, 183, 255, 241, 253 },
  { 224, 155, 178, 244, 183, 255, 241, 253 },
  { 225, 156, 178, 244, 184, 255, 241, 253 },
  { 225, 157, 178, 244, 184, 255, 241, 253 },
  { 226, 158, 179, 244, 185, 255, 242, 253 },
  { 227, 158, 179, 244, 185, 255, 242, 253 },
  { 228, 159, 180, 245, 186, 255, 242, 253 },
  { 228, 159, 180, 245, 186, 255, 242, 253 },
  { 229, 160, 181, 245, 187, 255, 242, 253 },
  { 229, 160, 181, 245, 187, 255, 242, 253 },
  { 230, 161, 182, 246, 188, 255, 243, 253 },
  { 230, 162, 182, 246, 188, 255, 243, 253 },
  { 231, 163, 183, 246, 189, 255, 243, 253 },
  { 231, 163, 183, 246, 189, 255, 243, 253 },
  { 232, 164, 184, 247, 190, 255, 243, 253 },
  { 232, 164, 184, 247, 190, 255, 243, 253 },
  { 233, 165, 185, 247, 191, 255, 244, 253 },
  { 233, 165, 185, 247, 191, 255, 244, 253 },
  { 234, 166, 185, 247, 192, 255, 244, 253 },
  { 234, 167, 185, 247, 192, 255, 244, 253 },
  { 235, 168, 186, 248, 193, 255, 244, 253 },
  { 235, 168, 186, 248, 193, 255, 244, 253 },
  { 236, 169, 187, 248, 194, 255, 244, 253 },
  { 236, 169, 187, 248, 194, 255, 244, 253 },
  { 236, 170, 188, 248, 195, 255, 245, 253 },
  { 236, 170, 188, 248, 195, 255, 245, 253 },
  { 237, 171, 189, 249, 196, 255, 245, 254 },
  { 237, 172, 189, 249, 196, 255, 245, 254 },
  { 238, 173, 190, 249, 197, 255, 245, 254 },
  { 238, 173, 190, 249, 197, 255, 245, 254 },
  { 239, 174, 191, 249, 198, 255, 245, 254 },
  { 239, 174, 191, 249, 198, 255, 245, 254 },
  { 240, 175, 192, 249, 199, 255, 246, 254 },
  { 240, 176, 192, 249, 199, 255, 246, 254 },
  { 240, 177, 193, 250, 200, 255, 246, 254 },
  { 240, 177, 193, 250, 200, 255, 246, 254 },
  { 241, 178, 194, 250, 201, 255, 246, 254 },
  { 241, 178, 194, 250, 201, 255, 246, 254 },
  { 242, 179, 195, 250, 202, 255, 246, 254 },
  { 242, 180, 195, 250, 202, 255, 246, 254 },
  { 242, 181, 196, 250, 203, 255, 247, 254 },
  { 242, 181, 196, 250, 203, 255, 247, 254 },
  { 243, 182, 197, 251, 204, 255, 247, 254 },
  { 243, 183, 197, 251, 204, 255, 247, 254 },
  { 244, 184, 198, 251, 205, 255, 247, 254 },
  { 244, 184, 198, 251, 205, 255, 247, 254 },
  { 244, 185, 199, 251, 206, 255, 247, 254 },
  { 244, 185, 199, 251, 206, 255, 247, 254 },
  { 245, 186, 200, 251, 207, 255, 247, 254 },
  { 245, 187, 200, 251, 207, 255, 247, 254 },
  { 246, 188, 201, 252, 207, 255, 248, 254 },
  { 246, 188, 201, 252, 207, 255, 248, 254 },
  { 246, 189, 202, 252, 208, 255, 248, 254 },
  { 246, 190, 202, 252, 208, 255, 248, 254 },
  { 247, 191, 203, 252, 209, 255, 248, 254 },
  { 247, 191, 203, 252, 209, 255, 248, 254 },
  { 247, 192, 204, 252, 210, 255, 248, 254 },
  { 247, 193, 204, 252, 210, 255, 248, 254 },
  { 248, 194, 205, 252, 211, 255, 248, 254 },
  { 248, 194, 205, 252, 211, 255, 248, 254 },
  { 248, 195, 206, 252, 212, 255, 249, 254 },
  { 248, 196, 206, 252, 212, 255, 249, 254 },
  { 249, 197, 207, 253, 213, 255, 249, 254 },
  { 249, 197, 207, 253, 213, 255, 249, 254 },
  { 249, 198, 208, 253, 214, 255, 249, 254 },
  { 249, 199, 209, 253, 214, 255, 249, 254 },
  { 250, 200, 210, 253, 215, 255, 249, 254 },
  { 250, 200, 210, 253, 215, 255, 249, 254 },
  { 250, 201, 211, 253, 215, 255, 249, 254 },
  { 250, 202, 211, 253, 215, 255, 249, 254 },
  { 250, 203, 212, 253, 216, 255, 249, 254 },
  { 250, 203, 212, 253, 216, 255, 249, 254 },
  { 251, 204, 213, 253, 217, 255, 250, 254 },
  { 251, 205, 213, 253, 217, 255, 250, 254 },
  { 251, 206, 214, 254, 218, 255, 250, 254 },
  { 251, 206, 215, 254, 218, 255, 250, 254 },
  { 252, 207, 216, 254, 219, 255, 250, 254 },
  { 252, 208, 216, 254, 219, 255, 250, 254 },
  { 252, 209, 217, 254, 220, 255, 250, 254 },
  { 252, 210, 217, 254, 220, 255, 250, 254 },
  { 252, 211, 218, 254, 221, 255, 250, 254 },
  { 252, 212, 218, 254, 221, 255, 250, 254 },
  { 253, 213, 219, 254, 222, 255, 250, 254 },
  { 253, 213, 220, 254, 222, 255, 250, 254 },
  { 253, 214, 221, 254, 223, 255, 250, 254 },
  { 253, 215, 221, 254, 223, 255, 250, 254 },
  { 253, 216, 222, 254, 224, 255, 251, 254 },
  { 253, 217, 223, 254, 224, 255, 251, 254 },
  { 253, 218, 224, 254, 225, 255, 251, 254 },
  { 253, 219, 224, 254, 225, 255, 251, 254 },
  { 254, 220, 225, 254, 225, 255, 251, 254 },
  { 254, 221, 226, 254, 225, 255, 251, 254 },
  { 254, 222, 227, 255, 226, 255, 251, 254 },
  { 254, 223, 227, 255, 226, 255, 251, 254 },
  { 254, 224, 228, 255, 227, 255, 251, 254 },
  { 254, 225, 229, 255, 227, 255, 251, 254 },
  { 254, 226, 230, 255, 228, 255, 251, 254 },
  { 254, 227, 230, 255, 229, 255, 251, 254 },
  { 255, 228, 231, 255, 230, 255, 251, 254 },
  { 255, 229, 232, 255, 230, 255, 251, 254 },
  { 255, 230, 233, 255, 231, 255, 252, 254 },
  { 255, 231, 234, 255, 231, 255, 252, 254 },
  { 255, 232, 235, 255, 232, 255, 252, 254 },
  { 255, 233, 236, 255, 232, 255, 252, 254 },
  { 255, 235, 237, 255, 233, 255, 252, 254 },
  { 255, 236, 238, 255, 234, 255, 252, 254 },
  { 255, 238, 240, 255, 235, 255, 252, 255 },
  { 255, 239, 241, 255, 235, 255, 252, 254 },
  { 255, 241, 243, 255, 236, 255, 252, 254 },
  { 255, 243, 245, 255, 237, 255, 252, 254 },
  { 255, 246, 247, 255, 239, 255, 253, 255 },
Jingning Han's avatar
Jingning Han committed
528 529
};

530
// Model obtained from a 2-sided zero-centered distribution derived
Alex Converse's avatar
Alex Converse committed
531 532 533
// from a Pareto distribution. The cdf of the distribution is:
// cdf(x) = 0.5 + 0.5 * sgn(x) * [1 - {alpha/(alpha + |x|)} ^ beta]
//
534
// For a given beta and a given probability of the 1-node, the alpha
Alex Converse's avatar
Alex Converse committed
535 536 537
// is first solved, and then the {alpha, beta} pair is used to generate
// the probabilities for the rest of the nodes.
//
538 539 540
// The full source code of the generating program is available in:
// tools/gen_constrained_tokenset.py
//
541
#if CONFIG_NEW_TOKENSET
542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804
// Values for tokens TWO_TOKEN through CATEGORY6_TOKEN included
// in the table here : the ONE_TOKEN probability is
// removed and the probabilities rescaled.
//
// ZERO_TOKEN and ONE_TOKEN are coded as one CDF,
// and EOB_TOKEN is coded as flags outside this coder.
const aom_cdf_prob av1_pareto8_tail_probs[COEFF_PROB_MODELS][TAIL_NODES] = {
  { 128, 127, 127, 252, 497, 969, 1839, 3318, 25511 },
  { 256, 254, 251, 496, 966, 1834, 3308, 5408, 19995 },
  { 383, 378, 373, 732, 1408, 2605, 4470, 6646, 15773 },
  { 511, 502, 493, 961, 1824, 3289, 5373, 7298, 12517 },
  { 638, 625, 611, 1182, 2215, 3894, 6064, 7548, 9991 },
  { 766, 746, 726, 1396, 2582, 4428, 6578, 7529, 8017 },
  { 893, 866, 839, 1603, 2927, 4896, 6945, 7332, 6467 },
  { 1020, 984, 950, 1803, 3250, 5305, 7191, 7022, 5243 },
  { 1147, 1102, 1059, 1996, 3552, 5659, 7338, 6646, 4269 },
  { 1274, 1218, 1166, 2183, 3835, 5963, 7403, 6234, 3492 },
  { 1400, 1334, 1270, 2363, 4099, 6223, 7401, 5809, 2869 },
  { 1527, 1447, 1372, 2537, 4345, 6442, 7346, 5386, 2366 },
  { 1654, 1560, 1473, 2704, 4574, 6624, 7247, 4973, 1959 },
  { 1780, 1672, 1571, 2866, 4787, 6771, 7114, 4579, 1628 },
  { 1906, 1782, 1667, 3022, 4984, 6889, 6954, 4206, 1358 },
  { 2032, 1891, 1762, 3172, 5167, 6979, 6773, 3856, 1136 },
  { 2158, 2000, 1854, 3316, 5335, 7044, 6577, 3530, 954 },
  { 2284, 2106, 1944, 3455, 5490, 7087, 6370, 3229, 803 },
  { 2410, 2212, 2032, 3588, 5632, 7109, 6155, 2951, 679 },
  { 2535, 2317, 2119, 3717, 5761, 7113, 5936, 2695, 575 },
  { 2661, 2420, 2203, 3840, 5880, 7101, 5714, 2461, 488 },
  { 2786, 2522, 2286, 3958, 5987, 7074, 5493, 2246, 416 },
  { 2911, 2624, 2367, 4072, 6083, 7033, 5273, 2050, 355 },
  { 3037, 2724, 2446, 4180, 6170, 6981, 5055, 1871, 304 },
  { 3162, 2822, 2523, 4284, 6247, 6919, 4842, 1708, 261 },
  { 3286, 2920, 2599, 4384, 6315, 6848, 4633, 1559, 224 },
  { 3411, 3017, 2672, 4478, 6374, 6768, 4430, 1424, 194 },
  { 3536, 3112, 2745, 4569, 6426, 6681, 4232, 1300, 167 },
  { 3660, 3207, 2815, 4656, 6469, 6588, 4040, 1188, 145 },
  { 3785, 3300, 2883, 4738, 6505, 6490, 3855, 1086, 126 },
  { 3909, 3392, 2950, 4817, 6534, 6387, 3677, 993, 109 },
  { 4033, 3483, 3015, 4891, 6557, 6281, 3505, 908, 95 },
  { 4157, 3573, 3079, 4962, 6573, 6170, 3340, 831, 83 },
  { 4281, 3662, 3141, 5029, 6584, 6058, 3181, 760, 72 },
  { 4405, 3750, 3201, 5093, 6588, 5943, 3029, 696, 63 },
  { 4529, 3837, 3260, 5152, 6587, 5826, 2883, 638, 56 },
  { 4652, 3922, 3317, 5209, 6582, 5709, 2744, 584, 49 },
  { 4775, 4007, 3373, 5262, 6572, 5590, 2610, 536, 43 },
  { 4899, 4090, 3427, 5312, 6557, 5470, 2483, 492, 38 },
  { 5022, 4173, 3480, 5359, 6538, 5351, 2361, 451, 33 },
  { 5145, 4254, 3531, 5403, 6515, 5231, 2246, 414, 29 },
  { 5268, 4334, 3581, 5443, 6489, 5112, 2135, 380, 26 },
  { 5391, 4414, 3629, 5481, 6458, 4993, 2029, 350, 23 },
  { 5514, 4492, 3676, 5515, 6425, 4875, 1929, 321, 21 },
  { 5637, 4569, 3721, 5548, 6388, 4758, 1833, 296, 18 },
  { 5759, 4645, 3766, 5577, 6349, 4642, 1742, 272, 16 },
  { 5881, 4720, 3808, 5604, 6307, 4528, 1656, 250, 14 },
  { 6004, 4794, 3849, 5628, 6262, 4414, 1573, 231, 13 },
  { 6126, 4867, 3890, 5649, 6215, 4302, 1495, 213, 11 },
  { 6248, 4939, 3928, 5669, 6166, 4192, 1420, 196, 10 },
  { 6370, 5010, 3966, 5686, 6114, 4083, 1349, 181, 9 },
  { 6492, 5080, 4002, 5700, 6061, 3976, 1282, 167, 8 },
  { 6614, 5149, 4037, 5712, 6006, 3871, 1218, 154, 7 },
  { 6735, 5217, 4070, 5723, 5950, 3767, 1157, 142, 7 },
  { 6857, 5284, 4103, 5731, 5891, 3666, 1099, 131, 6 },
  { 6978, 5351, 4134, 5737, 5832, 3566, 1044, 121, 5 },
  { 7099, 5415, 4164, 5741, 5771, 3469, 992, 112, 5 },
  { 7221, 5479, 4192, 5743, 5709, 3373, 943, 104, 4 },
  { 7342, 5542, 4220, 5743, 5646, 3279, 896, 96, 4 },
  { 7462, 5604, 4246, 5742, 5583, 3187, 851, 89, 4 },
  { 7584, 5665, 4272, 5739, 5518, 3097, 808, 82, 3 },
  { 7704, 5725, 4296, 5734, 5453, 3009, 768, 76, 3 },
  { 7825, 5784, 4318, 5727, 5386, 2924, 730, 71, 3 },
  { 7945, 5843, 4341, 5719, 5320, 2840, 693, 65, 2 },
  { 8066, 5900, 4361, 5709, 5252, 2758, 659, 61, 2 },
  { 8186, 5956, 4381, 5698, 5185, 2678, 626, 56, 2 },
  { 8306, 6011, 4400, 5685, 5117, 2600, 595, 52, 2 },
  { 8426, 6066, 4418, 5671, 5049, 2523, 565, 48, 2 },
  { 8547, 6119, 4434, 5655, 4981, 2449, 537, 45, 1 },
  { 8666, 6171, 4450, 5638, 4912, 2377, 511, 42, 1 },
  { 8786, 6223, 4465, 5620, 4843, 2306, 485, 39, 1 },
  { 8906, 6274, 4478, 5600, 4775, 2237, 461, 36, 1 },
  { 9025, 6323, 4491, 5580, 4706, 2170, 438, 34, 1 },
  { 9144, 6372, 4503, 5558, 4637, 2105, 417, 31, 1 },
  { 9264, 6420, 4514, 5535, 4568, 2041, 396, 29, 1 },
  { 9383, 6467, 4524, 5511, 4500, 1979, 376, 27, 1 },
  { 9502, 6513, 4532, 5486, 4432, 1919, 358, 25, 1 },
  { 9621, 6558, 4541, 5460, 4364, 1860, 340, 23, 1 },
  { 9740, 6602, 4548, 5433, 4296, 1803, 323, 22, 1 },
  { 9859, 6645, 4554, 5405, 4229, 1748, 307, 20, 1 },
  { 9978, 6688, 4559, 5376, 4161, 1694, 292, 19, 1 },
  { 10096, 6729, 4564, 5347, 4094, 1641, 278, 18, 1 },
  { 10215, 6770, 4568, 5316, 4028, 1590, 264, 16, 1 },
  { 10333, 6809, 4571, 5285, 3962, 1541, 251, 15, 1 },
  { 10452, 6848, 4573, 5253, 3896, 1492, 239, 14, 1 },
  { 10570, 6886, 4574, 5220, 3831, 1446, 227, 13, 1 },
  { 10688, 6923, 4575, 5186, 3767, 1400, 216, 12, 1 },
  { 10806, 6959, 4575, 5152, 3702, 1356, 205, 12, 1 },
  { 10924, 6994, 4574, 5117, 3639, 1313, 195, 11, 1 },
  { 11041, 7029, 4572, 5082, 3576, 1271, 186, 10, 1 },
  { 11159, 7062, 4570, 5046, 3513, 1231, 177, 9, 1 },
  { 11277, 7095, 4566, 5009, 3451, 1192, 168, 9, 1 },
  { 11394, 7127, 4563, 4972, 3390, 1153, 160, 8, 1 },
  { 11512, 7158, 4558, 4934, 3329, 1116, 152, 8, 1 },
  { 11629, 7188, 4553, 4896, 3269, 1080, 145, 7, 1 },
  { 11746, 7217, 4547, 4857, 3210, 1045, 138, 7, 1 },
  { 11864, 7245, 4540, 4818, 3151, 1012, 131, 6, 1 },
  { 11980, 7273, 4533, 4779, 3093, 979, 124, 6, 1 },
  { 12097, 7300, 4525, 4739, 3035, 947, 118, 6, 1 },
  { 12215, 7326, 4516, 4698, 2978, 916, 113, 5, 1 },
  { 12331, 7351, 4507, 4658, 2922, 886, 107, 5, 1 },
  { 12448, 7375, 4497, 4617, 2866, 857, 102, 5, 1 },
  { 12564, 7398, 4487, 4576, 2812, 829, 97, 4, 1 },
  { 12681, 7421, 4476, 4534, 2757, 802, 92, 4, 1 },
  { 12797, 7443, 4464, 4492, 2704, 775, 88, 4, 1 },
  { 12914, 7464, 4452, 4450, 2651, 749, 84, 3, 1 },
  { 13030, 7484, 4439, 4408, 2599, 725, 79, 3, 1 },
  { 13147, 7503, 4426, 4365, 2547, 700, 76, 3, 1 },
  { 13262, 7522, 4412, 4322, 2497, 677, 72, 3, 1 },
  { 13378, 7539, 4398, 4280, 2447, 654, 68, 3, 1 },
  { 13494, 7556, 4383, 4237, 2397, 632, 65, 3, 1 },
  { 13610, 7573, 4368, 4193, 2348, 611, 62, 2, 1 },
  { 13726, 7588, 4352, 4150, 2300, 590, 59, 2, 1 },
  { 13841, 7602, 4335, 4107, 2253, 571, 56, 2, 1 },
  { 13957, 7616, 4318, 4063, 2207, 551, 53, 2, 1 },
  { 14072, 7629, 4301, 4019, 2161, 532, 51, 2, 1 },
  { 14188, 7641, 4283, 3976, 2115, 514, 48, 2, 1 },
  { 14302, 7652, 4265, 3932, 2071, 497, 46, 2, 1 },
  { 14418, 7663, 4246, 3888, 2027, 480, 44, 1, 1 },
  { 14533, 7673, 4227, 3844, 1984, 463, 42, 1, 1 },
  { 14649, 7682, 4207, 3800, 1941, 447, 40, 1, 1 },
  { 14763, 7690, 4187, 3757, 1899, 432, 38, 1, 1 },
  { 14878, 7698, 4166, 3713, 1858, 417, 36, 1, 1 },
  { 14993, 7705, 4146, 3669, 1817, 402, 34, 1, 1 },
  { 15109, 7711, 4124, 3625, 1777, 388, 32, 1, 1 },
  { 15223, 7715, 4103, 3581, 1738, 375, 31, 1, 1 },
  { 15337, 7720, 4081, 3538, 1699, 362, 29, 1, 1 },
  { 15452, 7724, 4058, 3494, 1661, 349, 28, 1, 1 },
  { 15567, 7727, 4035, 3450, 1624, 337, 26, 1, 1 },
  { 15681, 7729, 4012, 3407, 1587, 325, 25, 1, 1 },
  { 15795, 7730, 3989, 3364, 1551, 313, 24, 1, 1 },
  { 15909, 7731, 3965, 3320, 1516, 302, 23, 1, 1 },
  { 16024, 7731, 3940, 3277, 1481, 291, 22, 1, 1 },
  { 16138, 7730, 3916, 3234, 1446, 281, 21, 1, 1 },
  { 16252, 7728, 3891, 3191, 1413, 271, 20, 1, 1 },
  { 16366, 7726, 3866, 3148, 1380, 261, 19, 1, 1 },
  { 16480, 7723, 3840, 3106, 1347, 252, 18, 1, 1 },
  { 16594, 7720, 3814, 3063, 1315, 243, 17, 1, 1 },
  { 16708, 7715, 3788, 3021, 1284, 234, 16, 1, 1 },
  { 16822, 7710, 3762, 2979, 1253, 225, 15, 1, 1 },
  { 16936, 7704, 3735, 2937, 1223, 217, 14, 1, 1 },
  { 17050, 7697, 3708, 2895, 1193, 209, 14, 1, 1 },
  { 17162, 7690, 3681, 2854, 1164, 202, 13, 1, 1 },
  { 17276, 7682, 3654, 2812, 1136, 194, 12, 1, 1 },
  { 17389, 7673, 3626, 2771, 1108, 187, 12, 1, 1 },
  { 17504, 7663, 3598, 2730, 1080, 180, 11, 1, 1 },
  { 17617, 7653, 3570, 2689, 1053, 173, 11, 1, 1 },
  { 17730, 7642, 3541, 2649, 1027, 167, 10, 1, 1 },
  { 17843, 7630, 3513, 2608, 1001, 161, 10, 1, 1 },
  { 17957, 7618, 3484, 2569, 975, 154, 9, 1, 1 },
  { 18069, 7605, 3455, 2529, 950, 149, 9, 1, 1 },
  { 18183, 7591, 3426, 2489, 926, 143, 8, 1, 1 },
  { 18296, 7576, 3396, 2450, 902, 138, 8, 1, 1 },
  { 18410, 7562, 3366, 2411, 878, 132, 7, 1, 1 },
  { 18523, 7545, 3337, 2372, 855, 127, 7, 1, 1 },
  { 18636, 7529, 3306, 2333, 833, 122, 7, 1, 1 },
  { 18749, 7511, 3276, 2295, 811, 118, 6, 1, 1 },
  { 18862, 7493, 3246, 2257, 789, 113, 6, 1, 1 },
  { 18975, 7474, 3215, 2219, 768, 109, 6, 1, 1 },
  { 19088, 7455, 3185, 2182, 747, 104, 5, 1, 1 },
  { 19201, 7435, 3154, 2144, 727, 100, 5, 1, 1 },
  { 19314, 7414, 3123, 2107, 707, 96, 5, 1, 1 },
  { 19427, 7392, 3092, 2071, 687, 92, 5, 1, 1 },
  { 19541, 7370, 3060, 2034, 668, 89, 4, 1, 1 },
  { 19654, 7347, 3029, 1998, 649, 85, 4, 1, 1 },
  { 19766, 7323, 2997, 1963, 631, 82, 4, 1, 1 },
  { 19878, 7299, 2966, 1927, 613, 79, 4, 1, 1 },
  { 19991, 7274, 2934, 1892, 596, 75, 4, 1, 1 },
  { 20105, 7248, 2902, 1857, 579, 72, 3, 1, 1 },
  { 20218, 7222, 2870, 1822, 562, 69, 3, 1, 1 },
  { 20331, 7195, 2838, 1788, 545, 66, 3, 1, 1 },
  { 20443, 7167, 2806, 1754, 529, 64, 3, 1, 1 },
  { 20556, 7138, 2774, 1720, 514, 61, 3, 1, 1 },
  { 20670, 7109, 2741, 1687, 498, 58, 3, 1, 1 },
  { 20783, 7079, 2709, 1654, 483, 56, 2, 1, 1 },
  { 20895, 7049, 2676, 1621, 469, 54, 2, 1, 1 },
  { 21008, 7017, 2644, 1589, 455, 51, 2, 1, 1 },
  { 21121, 6985, 2611, 1557, 441, 49, 2, 1, 1 },
  { 21234, 6953, 2578, 1525, 427, 47, 2, 1, 1 },
  { 21347, 6919, 2545, 1494, 414, 45, 2, 1, 1 },
  { 21460, 6885, 2513, 1462, 401, 43, 2, 1, 1 },
  { 21573, 6850, 2480, 1432, 388, 41, 2, 1, 1 },
  { 21687, 6815, 2447, 1401, 375, 39, 2, 1, 1 },
  { 21801, 6778, 2414, 1371, 363, 38, 1, 1, 1 },
  { 21914, 6741, 2381, 1341, 352, 36, 1, 1, 1 },
  { 22028, 6704, 2348, 1311, 340, 34, 1, 1, 1 },
  { 22141, 6665, 2315, 1282, 329, 33, 1, 1, 1 },
  { 22255, 6626, 2282, 1253, 318, 31, 1, 1, 1 },
  { 22368, 6586, 2249, 1225, 307, 30, 1, 1, 1 },
  { 22482, 6546, 2216, 1196, 297, 28, 1, 1, 1 },
  { 22595, 6505, 2183, 1169, 286, 27, 1, 1, 1 },
  { 22709, 6463, 2149, 1141, 277, 26, 1, 1, 1 },
  { 22823, 6420, 2116, 1114, 267, 25, 1, 1, 1 },
  { 22938, 6377, 2083, 1087, 257, 23, 1, 1, 1 },
  { 23053, 6332, 2050, 1060, 248, 22, 1, 1, 1 },
  { 23167, 6287, 2017, 1034, 239, 21, 1, 1, 1 },
  { 23280, 6242, 1984, 1008, 231, 20, 1, 1, 1 },
  { 23396, 6195, 1951, 982, 222, 19, 1, 1, 1 },
  { 23510, 6148, 1918, 957, 214, 18, 1, 1, 1 },
  { 23625, 6100, 1885, 932, 206, 17, 1, 1, 1 },
  { 23741, 6051, 1852, 907, 198, 16, 1, 1, 1 },
  { 23855, 6002, 1819, 883, 190, 16, 1, 1, 1 },
  { 23971, 5951, 1786, 859, 183, 15, 1, 1, 1 },
  { 24087, 5900, 1753, 835, 176, 14, 1, 1, 1 },
  { 24203, 5848, 1720, 812, 169, 13, 1, 1, 1 },
  { 24318, 5796, 1687, 789, 162, 13, 1, 1, 1 },
  { 24435, 5742, 1655, 766, 155, 12, 1, 1, 1 },
  { 24552, 5688, 1622, 743, 149, 11, 1, 1, 1 },
  { 24669, 5632, 1589, 721, 143, 11, 1, 1, 1 },
  { 24786, 5576, 1557, 699, 137, 10, 1, 1, 1 },
  { 24903, 5519, 1524, 678, 131, 10, 1, 1, 1 },
  { 25021, 5462, 1491, 657, 125, 9, 1, 1, 1 },
  { 25139, 5403, 1459, 636, 120, 8, 1, 1, 1 },
  { 25258, 5343, 1427, 615, 114, 8, 1, 1, 1 },
  { 25376, 5283, 1394, 595, 109, 8, 1, 1, 1 },
  { 25496, 5221, 1362, 575, 104, 7, 1, 1, 1 },
  { 25614, 5159, 1330, 556, 99, 7, 1, 1, 1 },
  { 25735, 5096, 1298, 536, 94, 6, 1, 1, 1 },
  { 25856, 5031, 1265, 517, 90, 6, 1, 1, 1 },
  { 25977, 4966, 1233, 499, 85, 5, 1, 1, 1 },
  { 26098, 4899, 1202, 480, 81, 5, 1, 1, 1 },
  { 26220, 4831, 1170, 462, 77, 5, 1, 1, 1 },
  { 26343, 4763, 1138, 444, 73, 4, 1, 1, 1 },
  { 26466, 4693, 1106, 427, 69, 4, 1, 1, 1 },
  { 26589, 4622, 1075, 410, 65, 4, 1, 1, 1 },
  { 26713, 4550, 1043, 393, 62, 4, 1, 1, 1 },
  { 26840, 4476, 1012, 376, 58, 3, 1, 1, 1 },
  { 26966, 4401, 980, 360, 55, 3, 1, 1, 1 },
  { 27092, 4325, 949, 344, 52, 3, 1, 1, 1 },
  { 27220, 4248, 918, 328, 48, 3, 1, 1, 1 },
  { 27350, 4169, 886, 313, 45, 2, 1, 1, 1 },
  { 27480, 4088, 855, 298, 42, 2, 1, 1, 1 },
  { 27610, 4006, 824, 283, 40, 2, 1, 1, 1 },
  { 27743, 3922, 793, 268, 37, 2, 1, 1, 1 },
  { 27876, 3837, 762, 254, 34, 2, 1, 1, 1 },
  { 28011, 3749, 731, 240, 32, 2, 1, 1, 1 },
  { 28147, 3659, 701, 227, 30, 1, 1, 1, 1 },
  { 28286, 3568, 670, 213, 27, 1, 1, 1, 1 },
  { 28426, 3474, 639, 200, 25, 1, 1, 1, 1 },
  { 28569, 3377, 608, 187, 23, 1, 1, 1, 1 },
  { 28714, 3278, 577, 174, 21, 1, 1, 1, 1 },
  { 28860, 3176, 547, 162, 19, 1, 1, 1, 1 },
  { 29010, 3071, 516, 150, 17, 1, 1, 1, 1 },
  { 29163, 2962, 485, 138, 16, 1, 1, 1, 1 },
  { 29320, 2849, 454, 127, 14, 1, 1, 1, 1 },
  { 29483, 2731, 423, 115, 12, 1, 1, 1, 1 },
  { 29650, 2608, 391, 104, 11, 1, 1, 1, 1 },
  { 29823, 2479, 360, 93, 9, 1, 1, 1, 1 },
  { 30002, 2343, 328, 83, 8, 1, 1, 1, 1 },
  { 30192, 2198, 295, 72, 7, 1, 1, 1, 1 },
  { 30393, 2041, 262, 62, 6, 1, 1, 1, 1 },
  { 30612, 1869, 227, 52, 4, 1, 1, 1, 1 },
  { 30853, 1676, 191, 41, 3, 1, 1, 1, 1 },
  { 31131, 1448, 152, 31, 2, 1, 1, 1, 1 },
  { 31486, 1150, 107, 20, 1, 1, 1, 1, 1 },
};
805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066
#elif CONFIG_EC_MULTISYMBOL
// Values for tokens ONE_TOKEN through CATEGORY6_TOKEN included here.
// ZERO_TOKEN and EOB_TOKEN are coded as flags outside this coder.
const aom_cdf_prob
    av1_pareto8_token_probs[COEFF_PROB_MODELS][ENTROPY_TOKENS - 2] = {
      { 128, 127, 127, 126, 251, 495, 965, 1832, 3305, 25412 },
      { 256, 254, 252, 249, 492, 959, 1820, 3283, 5365, 19838 },
      { 384, 379, 374, 369, 724, 1392, 2574, 4417, 6568, 15587 },
      { 512, 503, 494, 486, 946, 1795, 3238, 5289, 7184, 12321 },
      { 640, 626, 612, 599, 1159, 2172, 3818, 5946, 7401, 9795 },
      { 768, 748, 728, 709, 1363, 2522, 4324, 6424, 7352, 7830 },
      { 896, 869, 842, 816, 1559, 2847, 4762, 6755, 7131, 6291 },
      { 1024, 988, 954, 921, 1747, 3148, 5139, 6966, 6803, 5078 },
      { 1152, 1107, 1063, 1022, 1926, 3427, 5460, 7080, 6412, 4119 },
      { 1280, 1224, 1171, 1120, 2098, 3685, 5730, 7113, 5991, 3356 },
      { 1408, 1340, 1276, 1216, 2261, 3923, 5955, 7083, 5560, 2746 },
      { 1536, 1455, 1380, 1308, 2418, 4142, 6140, 7001, 5133, 2255 },
      { 1664, 1569, 1481, 1398, 2567, 4342, 6287, 6879, 4721, 1860 },
      { 1792, 1683, 1580, 1485, 2709, 4525, 6401, 6725, 4329, 1539 },
      { 1920, 1794, 1678, 1570, 2845, 4692, 6486, 6546, 3959, 1278 },
      { 2048, 1905, 1773, 1651, 2974, 4844, 6543, 6350, 3615, 1065 },
      { 2176, 2015, 1867, 1731, 3096, 4980, 6576, 6140, 3296, 891 },
      { 2304, 2123, 1958, 1807, 3212, 5104, 6589, 5922, 3002, 747 },
      { 2432, 2231, 2048, 1882, 3322, 5214, 6581, 5698, 2732, 628 },
      { 2560, 2337, 2136, 1953, 3427, 5311, 6557, 5472, 2485, 530 },
      { 2688, 2442, 2222, 2023, 3525, 5397, 6518, 5246, 2259, 448 },
      { 2816, 2547, 2306, 2090, 3618, 5472, 6465, 5021, 2053, 380 },
      { 2944, 2650, 2388, 2154, 3706, 5537, 6401, 4799, 1866, 323 },
      { 3072, 2752, 2468, 2217, 3788, 5591, 6327, 4581, 1696, 276 },
      { 3200, 2853, 2547, 2277, 3866, 5637, 6243, 4369, 1541, 235 },
      { 3328, 2952, 2624, 2335, 3938, 5673, 6152, 4163, 1401, 202 },
      { 3456, 3051, 2699, 2391, 4006, 5702, 6054, 3962, 1274, 173 },
      { 3584, 3149, 2772, 2444, 4070, 5723, 5950, 3769, 1158, 149 },
      { 3712, 3246, 2843, 2496, 4128, 5736, 5842, 3583, 1054, 128 },
      { 3840, 3341, 2913, 2545, 4183, 5743, 5729, 3404, 959, 111 },
      { 3968, 3436, 2981, 2593, 4233, 5743, 5614, 3232, 872, 96 },
      { 4096, 3529, 3048, 2638, 4280, 5737, 5496, 3067, 794, 83 },
      { 4224, 3621, 3113, 2682, 4322, 5726, 5375, 2909, 724, 72 },
      { 4352, 3712, 3176, 2724, 4361, 5709, 5253, 2759, 659, 63 },
      { 4480, 3803, 3237, 2764, 4396, 5687, 5130, 2615, 601, 55 },
      { 4608, 3892, 3297, 2801, 4428, 5661, 5007, 2478, 548, 48 },
      { 4736, 3980, 3355, 2838, 4456, 5631, 4883, 2347, 500, 42 },
      { 4864, 4067, 3412, 2872, 4481, 5596, 4760, 2223, 456, 37 },
      { 4992, 4152, 3467, 2905, 4503, 5558, 4637, 2105, 417, 32 },
      { 5120, 4237, 3521, 2936, 4521, 5516, 4515, 1993, 381, 28 },
      { 5248, 4321, 3573, 2966, 4537, 5471, 4393, 1886, 348, 25 },
      { 5376, 4404, 3623, 2993, 4550, 5424, 4273, 1785, 318, 22 },
      { 5504, 4486, 3672, 3020, 4560, 5373, 4155, 1688, 291, 19 },
      { 5632, 4566, 3720, 3044, 4568, 5321, 4037, 1597, 266, 17 },
      { 5760, 4646, 3766, 3067, 4572, 5265, 3922, 1511, 244, 15 },
      { 5888, 4724, 3811, 3089, 4575, 5208, 3808, 1429, 223, 13 },
      { 6016, 4802, 3854, 3109, 4575, 5148, 3696, 1352, 204, 12 },
      { 6144, 4878, 3895, 3128, 4573, 5088, 3587, 1278, 187, 10 },
      { 6272, 4953, 3936, 3145, 4568, 5025, 3479, 1209, 172, 9 },
      { 6400, 5028, 3975, 3161, 4561, 4961, 3373, 1143, 158, 8 },
      { 6528, 5101, 4012, 3175, 4553, 4896, 3270, 1081, 145, 7 },
      { 6656, 5173, 4048, 3189, 4542, 4830, 3168, 1022, 133, 7 },
      { 6784, 5244, 4083, 3201, 4530, 4763, 3069, 966, 122, 6 },
      { 6912, 5314, 4117, 3212, 4516, 4694, 2973, 913, 112, 5 },
      { 7040, 5383, 4149, 3221, 4500, 4626, 2878, 863, 103, 5 },
      { 7168, 5452, 4180, 3229, 4482, 4556, 2786, 816, 95, 4 },
      { 7296, 5519, 4210, 3236, 4463, 4486, 2696, 771, 87, 4 },
      { 7424, 5585, 4238, 3242, 4442, 4416, 2609, 729, 80, 3 },
      { 7552, 5650, 4265, 3247, 4420, 4345, 2523, 689, 74, 3 },
      { 7680, 5714, 4291, 3251, 4396, 4274, 2440, 651, 68, 3 },
      { 7808, 5777, 4315, 3254, 4371, 4203, 2359, 616, 63, 2 },
      { 7936, 5838, 4339, 3255, 4345, 4132, 2281, 582, 58, 2 },
      { 8064, 5899, 4361, 3256, 4318, 4061, 2204, 550, 53, 2 },
      { 8192, 5959, 4382, 3255, 4289, 3990, 2130, 520, 49, 2 },
      { 8320, 6018, 4402, 3254, 4259, 3919, 2057, 492, 45, 2 },
      { 8448, 6075, 4421, 3252, 4229, 3848, 1987, 465, 42, 1 },
      { 8576, 6133, 4438, 3248, 4197, 3778, 1919, 439, 39, 1 },
      { 8704, 6188, 4455, 3244, 4164, 3708, 1853, 415, 36, 1 },
      { 8832, 6243, 4470, 3239, 4131, 3638, 1789, 392, 33, 1 },
      { 8960, 6297, 4484, 3233, 4096, 3569, 1727, 371, 30, 1 },
      { 9088, 6349, 4497, 3226, 4061, 3500, 1667, 351, 28, 1 },
      { 9216, 6401, 4509, 3219, 4025, 3432, 1608, 331, 26, 1 },
      { 9344, 6452, 4520, 3210, 3989, 3364, 1551, 313, 24, 1 },
      { 9472, 6501, 4530, 3201, 3952, 3297, 1496, 296, 22, 1 },
      { 9600, 6550, 4539, 3191, 3914, 3230, 1443, 280, 20, 1 },
      { 9728, 6597, 4547, 3180, 3875, 3164, 1392, 265, 19, 1 },
      { 9856, 6644, 4554, 3169, 3836, 3098, 1342, 250, 18, 1 },
      { 9984, 6690, 4560, 3157, 3796, 3034, 1293, 237, 16, 1 },
      { 10112, 6734, 4565, 3144, 3756, 2970, 1247, 224, 15, 1 },
      { 10240, 6778, 4568, 3131, 3716, 2907, 1202, 211, 14, 1 },
      { 10368, 6821, 4571, 3117, 3675, 2844, 1158, 200, 13, 1 },
      { 10496, 6862, 4573, 3102, 3634, 2783, 1116, 189, 12, 1 },
      { 10624, 6903, 4574, 3087, 3592, 2722, 1075, 179, 11, 1 },
      { 10752, 6942, 4575, 3071, 3551, 2662, 1035, 169, 10, 1 },
      { 10880, 6981, 4574, 3054, 3508, 2603, 997, 160, 10, 1 },
      { 11008, 7019, 4572, 3038, 3466, 2544, 960, 151, 9, 1 },
      { 11136, 7055, 4570, 3020, 3424, 2487, 924, 143, 8, 1 },
      { 11264, 7091, 4566, 3002, 3381, 2430, 890, 135, 8, 1 },
      { 11392, 7126, 4563, 2984, 3338, 2374, 856, 127, 7, 1 },
      { 11520, 7159, 4557, 2965, 3295, 2319, 824, 121, 7, 1 },
      { 11648, 7193, 4552, 2945, 3252, 2264, 793, 114, 6, 1 },
      { 11776, 7224, 4545, 2925, 3209, 2211, 763, 108, 6, 1 },
      { 11904, 7255, 4538, 2905, 3165, 2159, 734, 102, 5, 1 },
      { 12032, 7285, 4530, 2884, 3122, 2107, 706, 96, 5, 1 },
      { 12160, 7314, 4520, 2863, 3079, 2056, 679, 91, 5, 1 },
      { 12288, 7341, 4511, 2842, 3036, 2006, 653, 86, 4, 1 },
      { 12416, 7368, 4500, 2820, 2993, 1957, 628, 81, 4, 1 },
      { 12544, 7394, 4489, 2797, 2949, 1909, 604, 77, 4, 1 },
      { 12672, 7419, 4477, 2775, 2906, 1861, 581, 73, 3, 1 },
      { 12800, 7443, 4464, 2752, 2863, 1815, 558, 69, 3, 1 },
      { 12928, 7466, 4451, 2729, 2820, 1769, 536, 65, 3, 1 },
      { 13056, 7488, 4437, 2705, 2777, 1724, 516, 61, 3, 1 },
      { 13184, 7509, 4422, 2682, 2734, 1680, 495, 58, 3, 1 },
      { 13312, 7529, 4406, 2658, 2692, 1637, 476, 55, 2, 1 },
      { 13440, 7548, 4390, 2633, 2650, 1595, 457, 52, 2, 1 },
      { 13568, 7567, 4373, 2609, 2607, 1553, 439, 49, 2, 1 },
      { 13696, 7583, 4356, 2584, 2565, 1513, 422, 46, 2, 1 },
      { 13824, 7600, 4337, 2559, 2523, 1473, 405, 44, 2, 1 },
      { 13952, 7615, 4319, 2533, 2482, 1434, 389, 41, 2, 1 },
      { 14080, 7629, 4300, 2508, 2441, 1395, 373, 39, 2, 1 },
      { 14208, 7643, 4280, 2482, 2400, 1358, 358, 37, 1, 1 },
      { 14336, 7655, 4259, 2457, 2359, 1321, 344, 35, 1, 1 },
      { 14464, 7667, 4238, 2431, 2318, 1285, 330, 33, 1, 1 },
      { 14592, 7677, 4217, 2405, 2278, 1250, 316, 31, 1, 1 },
      { 14720, 7687, 4195, 2378, 2238, 1215, 304, 29, 1, 1 },
      { 14848, 7696, 4172, 2352, 2198, 1181, 291, 28, 1, 1 },
      { 14976, 7703, 4149, 2326, 2159, 1148, 279, 26, 1, 1 },
      { 15104, 7710, 4125, 2299, 2119, 1116, 268, 25, 1, 1 },
      { 15232, 7715, 4101, 2272, 2081, 1085, 257, 23, 1, 1 },
      { 15360, 7721, 4076, 2245, 2042, 1054, 246, 22, 1, 1 },
      { 15488, 7724, 4051, 2219, 2004, 1023, 236, 21, 1, 1 },
      { 15616, 7727, 4025, 2192, 1966, 994, 226, 20, 1, 1 },
      { 15744, 7729, 3999, 2164, 1929, 965, 217, 19, 1, 1 },
      { 15872, 7731, 3972, 2137, 1892, 937, 207, 18, 1, 1 },
      { 16000, 7731, 3945, 2110, 1855, 909, 199, 17, 1, 1 },
      { 16128, 7730, 3918, 2083, 1819, 882, 190, 16, 1, 1 },
      { 16256, 7728, 3890, 2056, 1783, 856, 182, 15, 1, 1 },
      { 16384, 7725, 3862, 2029, 1747, 831, 174, 14, 1, 1 },
      { 16512, 7721, 3833, 2002, 1712, 806, 167, 13, 1, 1 },
      { 16640, 7717, 3804, 1975, 1677, 781, 160, 12, 1, 1 },
      { 16768, 7712, 3775, 1947, 1642, 757, 153, 12, 1, 1 },
      { 16896, 7706, 3745, 1920, 1608, 734, 146, 11, 1, 1 },
      { 17024, 7699, 3714, 1893, 1575, 711, 140, 10, 1, 1 },
      { 17152, 7690, 3684, 1866, 1541, 689, 134, 10, 1, 1 },
      { 17280, 7681, 3653, 1839, 1508, 668, 128, 9, 1, 1 },
      { 17408, 7671, 3621, 1812, 1476, 647, 122, 9, 1, 1 },
      { 17536, 7660, 3590, 1785, 1444, 626, 117, 8, 1, 1 },
      { 17664, 7648, 3558, 1758, 1412, 606, 112, 8, 1, 1 },
      { 17792, 7635, 3526, 1731, 1381, 587, 107, 7, 1, 1 },
      { 17920, 7622, 3493, 1704, 1350, 568, 102, 7, 1, 1 },
      { 18048, 7607, 3461, 1678, 1319, 549, 98, 6, 1, 1 },
      { 18176, 7592, 3428, 1651, 1289, 531, 93, 6, 1, 1 },
      { 18304, 7575, 3394, 1625, 1259, 514, 89, 6, 1, 1 },
      { 18432, 7558, 3361, 1598, 1230, 497, 85, 5, 1, 1 },
      { 18560, 7540, 3327, 1572, 1201, 480, 81, 5, 1, 1 },
      { 18688, 7520, 3293, 1546, 1173, 464, 77, 5, 1, 1 },
      { 18816, 7500, 3258, 1520, 1145, 448, 74, 5, 1, 1 },
      { 18944, 7480, 3224, 1494, 1117, 433, 70, 4, 1, 1 },
      { 19072, 7458, 3189, 1468, 1090, 418, 67, 4, 1, 1 },
      { 19200, 7435, 3154, 1442, 1063, 404, 64, 4, 1, 1 },
      { 19328, 7410, 3119, 1417, 1037, 390, 61, 4, 1, 1 },
      { 19456, 7386, 3084, 1392, 1011, 376, 58, 3, 1, 1 },
      { 19584, 7361, 3048, 1366, 986, 363, 55, 3, 1, 1 },
      { 19712, 7335, 3012, 1341, 960, 350, 53, 3, 1, 1 },
      { 19840, 7307, 2977, 1316, 936, 337, 50, 3, 1, 1 },
      { 19968, 7279, 2941, 1291, 911, 325, 48, 3, 1, 1 },
      { 20096, 7251, 2905, 1267, 887, 313, 45, 2, 1, 1 },
      { 20224, 7220, 2868, 1243, 864, 302, 43, 2, 1, 1 },
      { 20352, 7189, 2832, 1218, 841, 291, 41, 2, 1, 1 },
      { 20480, 7158, 2795, 1194, 818, 280, 39, 2, 1, 1 },
      { 20608, 7124, 2759, 1170, 796, 270, 37, 2, 1, 1 },
      { 20736, 7091, 2722, 1147, 774, 259, 35, 2, 1, 1 },
      { 20864, 7056, 2685, 1123, 752, 250, 34, 2, 1, 1 },
      { 20992, 7021, 2648, 1100, 731, 240, 32, 2, 1, 1 },
      { 21120, 6985, 2612, 1077, 710, 231, 30, 1, 1, 1 },
      { 21248, 6948, 2574, 1054, 690, 222, 29, 1, 1, 1 },
      { 21376, 6911, 2537, 1031, 670, 213, 27, 1, 1, 1 },
      { 21504, 6872, 2500, 1008, 650, 205, 26, 1, 1, 1 },
      { 21632, 6831, 2463, 986, 631, 197, 25, 1, 1, 1 },
      { 21760, 6791, 2426, 964, 612, 189, 23, 1, 1, 1 },
      { 21888, 6749, 2389, 942, 594, 181, 22, 1, 1, 1 },
      { 22016, 6707, 2351, 921, 575, 174, 21, 1, 1, 1 },
      { 22144, 6663, 2314, 899, 558, 167, 20, 1, 1, 1 },
      { 22272, 6619, 2277, 878, 540, 160, 19, 1, 1, 1 },
      { 22400, 6574, 2240, 857, 523, 153, 18, 1, 1, 1 },
      { 22528, 6529, 2202, 836, 507, 146, 17, 1, 1, 1 },
      { 22656, 6482, 2165, 816, 490, 140, 16, 1, 1, 1 },
      { 22784, 6435, 2128, 795, 474, 134, 15, 1, 1, 1 },
      { 22912, 6386, 2091, 775, 459, 128, 14, 1, 1, 1 },
      { 23040, 6336, 2054, 756, 443, 123, 13, 1, 1, 1 },
      { 23168, 6286, 2017, 736, 428, 117, 13, 1, 1, 1 },
      { 23296, 6234, 1980, 717, 414, 112, 12, 1, 1, 1 },
      { 23424, 6183, 1943, 698, 399, 107, 11, 1, 1, 1 },
      { 23552, 6130, 1906, 679, 385, 102, 11, 1, 1, 1 },
      { 23680, 6077, 1869, 660, 372, 97, 10, 1, 1, 1 },
      { 23808, 6022, 1833, 642, 358, 93, 9, 1, 1, 1 },
      { 23936, 5966, 1796, 624, 345, 89, 9, 1, 1, 1 },
      { 24064, 5910, 1760, 606, 333, 84, 8, 1, 1, 1 },
      { 24192, 5853, 1724, 588, 320, 80, 8, 1, 1, 1 },
      { 24320, 5796, 1687, 571, 308, 76, 7, 1, 1, 1 },
      { 24448, 5735, 1651, 554, 297, 73, 7, 1, 1, 1 },
      { 24576, 5677, 1615, 537, 285, 69, 6, 1, 1, 1 },
      { 24704, 5615, 1579, 521, 274, 66, 6, 1, 1, 1 },
      { 24832, 5554, 1544, 504, 263, 62, 6, 1, 1, 1 },
      { 24960, 5492, 1508, 488, 253, 59, 5, 1, 1, 1 },
      { 25088, 5428, 1473, 473, 242, 56, 5, 1, 1, 1 },
      { 25216, 5364, 1438, 457, 232, 53, 5, 1, 1, 1 },
      { 25344, 5300, 1403, 442, 222, 50, 4, 1, 1, 1 },
      { 25472, 5233, 1368, 427, 213, 48, 4, 1, 1, 1 },
      { 25600, 5166, 1334, 412, 204, 45, 4, 1, 1, 1 },
      { 25728, 5098, 1299, 398, 195, 43, 4, 1, 1, 1 },
      { 25856, 5030, 1266, 384, 186, 40, 3, 1, 1, 1 },
      { 25984, 4960, 1232, 370, 178, 38, 3, 1, 1, 1 },
      { 26112, 4890, 1198, 356, 170, 36, 3, 1, 1, 1 },
      { 26240, 4819, 1164, 343, 162, 34, 3, 1, 1, 1 },
      { 26368, 4748, 1132, 329, 154, 32, 2, 1, 1, 1 },
      { 26496, 4675, 1098, 317, 147, 30, 2, 1, 1, 1 },
      { 26624, 4602, 1066, 304, 139, 28, 2, 1, 1, 1 },
      { 26752, 4527, 1034, 292, 132, 26, 2, 1, 1, 1 },
      { 26880, 4451, 1001, 280, 126, 25, 2, 1, 1, 1 },
      { 27008, 4375, 970, 268, 119, 23, 2, 1, 1, 1 },
      { 27136, 4299, 938, 256, 113, 21, 2, 1, 1, 1 },
      { 27264, 4221, 907, 245, 107, 20, 1, 1, 1, 1 },
      { 27392, 4142, 876, 234, 101, 19, 1, 1, 1, 1 },
      { 27520, 4063, 846, 223, 95, 17, 1, 1, 1, 1 },
      { 27648, 3982, 815, 213, 90, 16, 1, 1, 1, 1 },
      { 27776, 3900, 786, 202, 85, 15, 1, 1, 1, 1 },
      { 27904, 3818, 756, 192, 80, 14, 1, 1, 1, 1 },
      { 28032, 3734, 727, 183, 75, 13, 1, 1, 1, 1 },
      { 28160, 3651, 698, 173, 70, 12, 1, 1, 1, 1 },
      { 28288, 3566, 669, 164, 66, 11, 1, 1, 1, 1 },
      { 28416, 3481, 641, 155, 61, 10, 1, 1, 1, 1 },
      { 28544, 3393, 614, 147, 57, 9, 1, 1, 1, 1 },
      { 28672, 3306, 586, 138, 53, 9, 1, 1, 1, 1 },
      { 28800, 3217, 559, 130, 50, 8, 1, 1, 1, 1 },
      { 28928, 3128, 533, 122, 46, 7, 1, 1, 1, 1 },
      { 29056, 3037, 507, 114, 43, 7, 1, 1, 1, 1 },
      { 29184, 2947, 481, 107, 39, 6, 1, 1, 1, 1 },
      { 29312, 2855, 456, 100, 36, 5, 1, 1, 1, 1 },
      { 29440, 2762, 431, 93, 33, 5, 1, 1, 1, 1 },
      { 29568, 2668, 407, 86, 31, 4, 1, 1, 1, 1 },
      { 29696, 2573, 383, 80, 28, 4, 1, 1, 1, 1 },
      { 29824, 2478, 359, 74, 25, 4, 1, 1, 1, 1 },
      { 29952, 2381, 337, 68, 23, 3, 1, 1, 1, 1 },
      { 30080, 2284, 314, 62, 21, 3, 1, 1, 1, 1 },
      { 30208, 2185, 293, 57, 19, 2, 1, 1, 1, 1 },
      { 30336, 2086, 271, 52, 17, 2, 1, 1, 1, 1 },
      { 30464, 1986, 250, 47, 15, 2, 1, 1, 1, 1 },
      { 30592, 1885, 230, 42, 13, 2, 1, 1, 1, 1 },
      { 30720, 1782, 211, 38, 12, 1, 1, 1, 1, 1 },
      { 30848, 1679, 192, 34, 10, 1, 1, 1, 1, 1 },
      { 30976, 1575, 173, 30, 9, 1, 1, 1, 1, 1 },
      { 31104, 1469, 156, 26, 8, 1, 1, 1, 1, 1 },
      { 31232, 1364, 138, 23, 6, 1, 1, 1, 1, 1 },
      { 31360, 1257, 122, 19, 5, 1, 1, 1, 1, 1 },
      { 31488, 1149, 106, 16, 4, 1, 1, 1, 1, 1 },
      { 31616, 1038, 91, 14, 4, 1, 1, 1, 1, 1 },
      { 31744, 928, 77, 11, 3, 1, 1, 1, 1, 1 },
      { 31872, 816, 64, 9, 2, 1, 1, 1, 1, 1 },
      { 32000, 703, 51, 7, 2, 1, 1, 1, 1, 1 },
      { 32128, 589, 40, 5, 1, 1, 1, 1, 1, 1 },
      { 32256, 473, 29, 4, 1, 1, 1, 1, 1, 1 },
      { 32384, 357, 19, 2, 1, 1, 1, 1, 1, 1 },
      { 32512, 238, 11, 1, 1, 1, 1, 1, 1, 1 },
      { 32640, 117, 4, 1, 1, 1, 1, 1, 1, 1 },
    };
#endif  // CONFIG_NEW_TOKENSET
Alex Converse's avatar
Alex Converse committed
1067

clang-format's avatar
clang-format committed
1068
/* clang-format off */
hui su's avatar
hui su committed
1069
#if CONFIG_Q_ADAPT_PROBS