Remove dead code about old coefficient coding model
Change-Id: I00bbc8fe39c5b6ce4b3bb29b20d23803f15b41de
diff --git a/av1/common/entropy.c b/av1/common/entropy.c
index 7f8c8cb..d3483f9 100644
--- a/av1/common/entropy.c
+++ b/av1/common/entropy.c
@@ -20,537 +20,6 @@
#include "av1/common/token_cdfs.h"
#include "av1/common/txb_common.h"
-/* Extra bits coded from LSB to MSB */
-const aom_cdf_prob av1_cat1_cdf0[CDF_SIZE(2)] = { AOM_CDF2(20352) };
-const aom_cdf_prob *av1_cat1_cdf[] = { av1_cat1_cdf0 };
-
-const aom_cdf_prob av1_cat2_cdf0[CDF_SIZE(4)] = { AOM_CDF4(11963, 21121,
- 27719) };
-const aom_cdf_prob *av1_cat2_cdf[] = { av1_cat2_cdf0 };
-const aom_cdf_prob av1_cat3_cdf0[CDF_SIZE(8)] = { AOM_CDF8(
- 7001, 12802, 17911, 22144, 25503, 28286, 30737) };
-const aom_cdf_prob *av1_cat3_cdf[] = { av1_cat3_cdf0 };
-
-const aom_cdf_prob av1_cat4_cdf0[CDF_SIZE(16)] = { AOM_CDF16(
- 3934, 7460, 10719, 13640, 16203, 18500, 20624, 22528, 24316, 25919, 27401,
- 28729, 29894, 30938, 31903) };
-const aom_cdf_prob *av1_cat4_cdf[] = { av1_cat4_cdf0 };
-
-const aom_cdf_prob av1_cat5_cdf0[CDF_SIZE(16)] = { AOM_CDF16(
- 2942, 5794, 8473, 11069, 13469, 15795, 17980, 20097, 21952, 23750, 25439,
- 27076, 28589, 30056, 31434) };
-const aom_cdf_prob av1_cat5_cdf1[CDF_SIZE(2)] = { AOM_CDF2(23040) };
-const aom_cdf_prob *av1_cat5_cdf[] = { av1_cat5_cdf0, av1_cat5_cdf1 };
-
-const aom_cdf_prob av1_cat6_cdf0[CDF_SIZE(16)] = { AOM_CDF16(
- 2382, 4727, 7036, 9309, 11512, 13681, 15816, 17918, 19892, 21835, 23748,
- 25632, 27458, 29255, 31024) };
-const aom_cdf_prob av1_cat6_cdf1[CDF_SIZE(16)] = { AOM_CDF16(
- 9314, 15584, 19741, 22540, 25391, 27310, 28583, 29440, 30493, 31202, 31672,
- 31988, 32310, 32527, 32671) };
-const aom_cdf_prob av1_cat6_cdf2[CDF_SIZE(16)] = { AOM_CDF16(
- 29548, 31129, 31960, 32004, 32473, 32498, 32511, 32512, 32745, 32757, 32763,
- 32764, 32765, 32766, 32767) };
-const aom_cdf_prob av1_cat6_cdf3[CDF_SIZE(16)] = { AOM_CDF16(
- 32006, 32258, 32510, 32512, 32638, 32639, 32640, 32641, 32761, 32762, 32763,
- 32764, 32765, 32766, 32767) };
-const aom_cdf_prob av1_cat6_cdf4[CDF_SIZE(4)] = { AOM_CDF4(32513, 32641,
- 32767) };
-const aom_cdf_prob *av1_cat6_cdf[] = {
- av1_cat6_cdf0, av1_cat6_cdf1, av1_cat6_cdf2, av1_cat6_cdf3, av1_cat6_cdf4
-};
-
-const uint8_t av1_coefband_trans_8x8plus[MAX_TX_SQUARE] = {
- 0, 1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5,
- // beyond MAXBAND_INDEX+1 all values are filled as 5
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 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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 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 5, 5, 5,
-};
-
-const uint8_t av1_pt_energy_class[ENTROPY_TOKENS] = { 0, 1, 2, 3, 3, 4,
- 4, 5, 5, 5, 5, 5 };
-
-// Model obtained from a 2-sided zero-centered distribution derived
-// 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 probability 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.
-//
-// The full source code of the generating program is available in:
-// tools/gen_constrained_tokenset.py
-//
-// 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 },
-};
-
-static void build_tail_cdfs(aom_cdf_prob cdf_tail[CDF_SIZE(ENTROPY_TOKENS)],
- aom_cdf_prob cdf_head[CDF_SIZE(ENTROPY_TOKENS)],
- int band_zero) {
- int probNZ, prob1, prob_idx, i;
- int phead[HEAD_TOKENS + 1], sum;
- const int is_dc = !!band_zero;
- aom_cdf_prob prev_cdf;
- prev_cdf = 0;
- for (i = 0; i < HEAD_TOKENS + is_dc; ++i) {
- phead[i] = AOM_ICDF(cdf_head[i]) - prev_cdf;
- prev_cdf = AOM_ICDF(cdf_head[i]);
- }
- // Do the tail
- probNZ = CDF_PROB_TOP - phead[ZERO_TOKEN + is_dc] - (is_dc ? phead[0] : 0);
- prob1 = phead[is_dc + ONE_TOKEN_EOB] + phead[is_dc + ONE_TOKEN_NEOB];
- prob_idx =
- AOMMIN(COEFF_PROB_MODELS - 1, AOMMAX(0, (256 * prob1 / probNZ) - 1));
-
- sum = 0;
- for (i = 0; i < TAIL_TOKENS; ++i) {
- sum += av1_pareto8_tail_probs[prob_idx][i];
- cdf_tail[i] = AOM_ICDF(
- ((sum - (i + 1)) * ((CDF_INIT_TOP >> CDF_SHIFT) - TAIL_TOKENS) +
- ((CDF_INIT_TOP - TAIL_TOKENS) >> 1)) /
- ((CDF_INIT_TOP - TAIL_TOKENS)) +
- (i + 1));
- }
-}
-
-void av1_coef_pareto_cdfs(FRAME_CONTEXT *fc) {
- /* Build the tail based on a Pareto distribution */
- TX_SIZE t;
- int i, j, k, l;
- for (t = 0; t < TX_SIZES; ++t)
- for (i = 0; i < PLANE_TYPES; ++i)
- for (j = 0; j < REF_TYPES; ++j)
- for (k = 0; k < COEF_BANDS; ++k)
- for (l = 0; l < BAND_COEFF_CONTEXTS(k); ++l)
- build_tail_cdfs(fc->coef_tail_cdfs[t][i][j][k][l],
- fc->coef_head_cdfs[t][i][j][k][l], k == 0);
-}
-
static int get_q_ctx(int q) {
if (q <= 20) return 0;
if (q <= 60) return 1;
diff --git a/av1/common/entropy.h b/av1/common/entropy.h
index 1ced783..6c6ad95 100644
--- a/av1/common/entropy.h
+++ b/av1/common/entropy.h
@@ -24,38 +24,8 @@
extern "C" {
#endif
-#define DIFF_UPDATE_PROB 252
-#define GROUP_DIFF_UPDATE_PROB 252
-
#define TOKEN_CDF_Q_CTXS 4
-// Coefficient token alphabet
-#define ZERO_TOKEN 0 // 0 Extra Bits 0+0
-#define ONE_TOKEN 1 // 1 Extra Bits 0+1
-#define TWO_TOKEN 2 // 2 Extra Bits 0+1
-#define THREE_TOKEN 3 // 3 Extra Bits 0+1
-#define FOUR_TOKEN 4 // 4 Extra Bits 0+1
-#define CATEGORY1_TOKEN 5 // 5-6 Extra Bits 1+1
-#define CATEGORY2_TOKEN 6 // 7-10 Extra Bits 2+1
-#define CATEGORY3_TOKEN 7 // 11-18 Extra Bits 3+1
-#define CATEGORY4_TOKEN 8 // 19-34 Extra Bits 4+1
-#define CATEGORY5_TOKEN 9 // 35-66 Extra Bits 5+1
-#define CATEGORY6_TOKEN 10 // 67+ Extra Bits 14+1
-#define EOB_TOKEN 11 // EOB Extra Bits 0+0
-#define NO_EOB 0 // Not an end-of-block
-#define EARLY_EOB 1 // End of block before the last position
-#define LAST_EOB 2 // End of block in the last position (implicit)
-#define BLOCK_Z_TOKEN 255 // block zero
-#define HEAD_TOKENS 5
-#define TAIL_TOKENS 9
-#define ONE_TOKEN_EOB 1
-#define ONE_TOKEN_NEOB 2
-#define TWO_TOKEN_PLUS_EOB 3
-#define TWO_TOKEN_PLUS_NEOB 4
-#define ENTROPY_TOKENS 12
-
-#define ENTROPY_NODES 11
-
#define TXB_SKIP_CONTEXTS 13
#define EOB_COEF_CONTEXTS 22
@@ -90,48 +60,6 @@
TX_CLASSES = 3,
} TX_CLASS;
-DECLARE_ALIGNED(16, extern const uint8_t, av1_pt_energy_class[ENTROPY_TOKENS]);
-
-#define CAT1_MIN_VAL 5
-#define CAT2_MIN_VAL 7
-#define CAT3_MIN_VAL 11
-#define CAT4_MIN_VAL 19
-#define CAT5_MIN_VAL 35
-#define CAT6_MIN_VAL 67
-
-#define CAT6_BIT_SIZE 18
-// Extra bit probabilities.
-extern const aom_cdf_prob *av1_cat1_cdf[];
-extern const aom_cdf_prob *av1_cat2_cdf[];
-extern const aom_cdf_prob *av1_cat3_cdf[];
-extern const aom_cdf_prob *av1_cat4_cdf[];
-extern const aom_cdf_prob *av1_cat5_cdf[];
-extern const aom_cdf_prob *av1_cat6_cdf[];
-
-#define EOB_MODEL_TOKEN 3
-
-typedef struct {
- const aom_cdf_prob **cdf;
- int len;
- int base_val;
- const int16_t *cost;
-} av1_extra_bit;
-
-// indexed by token value
-extern const av1_extra_bit av1_extra_bits[ENTROPY_TOKENS];
-
-static INLINE int av1_get_cat6_extrabits_size(TX_SIZE tx_size,
- aom_bit_depth_t bit_depth) {
- tx_size = txsize_sqr_up_map[tx_size];
- // TODO(debargha): Does TX_64X64 require an additional extrabit?
- if (tx_size > TX_32X32) tx_size = TX_32X32;
- int tx_offset = (int)(tx_size - TX_4X4);
- int bits = (int)bit_depth + 3 + tx_offset;
- // Round up
- bits = AOMMIN(CAT6_BIT_SIZE, ((bits + 3) & ~3));
- return bits;
-}
-
#define DCT_MAX_VALUE 16384
#define DCT_MAX_VALUE_HIGH10 65536
#define DCT_MAX_VALUE_HIGH12 262144
@@ -140,77 +68,12 @@
* REF_TYPES, COEF_BANDS and COEF_CONTEXTS. */
#define REF_TYPES 2 // intra=0, inter=1
-/* Middle dimension reflects the coefficient position within the transform. */
-#define COEF_BANDS 6
-
-/* Inside dimension is measure of nearby complexity, that reflects the energy
- of nearby coefficients are nonzero. For the first coefficient (DC, unless
- block type is 0), we look at the (already encoded) blocks above and to the
- left of the current block. The context index is then the number (0,1,or 2)
- of these blocks having nonzero coefficients.
- After decoding a coefficient, the measure is determined by the size of the
- most recently decoded coefficient.
- Note that the intuitive meaning of this measure changes as coefficients
- are decoded, e.g., prior to the first token, a zero means that my neighbors
- are empty while, after the first token, because of the use of end-of-block,
- a zero means we just decoded a zero and hence guarantees that a non-zero
- coefficient will appear later in this block. However, this shift
- in meaning is perfectly OK because our context depends also on the
- coefficient band (and since zigzag positions 0, 1, and 2 are in
- distinct bands). */
-#define COEFF_CONTEXTS 6
-#define COEFF_CONTEXTS0 3 // for band 0
-#define BAND_COEFF_CONTEXTS(band) \
- ((band) == 0 ? COEFF_CONTEXTS0 : COEFF_CONTEXTS)
-
-#define SUBEXP_PARAM 4 /* Subexponential code parameter */
-#define MODULUS_PARAM 13 /* Modulus parameter */
-
struct AV1Common;
struct frame_contexts;
void av1_default_coef_probs(struct AV1Common *cm);
-void av1_adapt_coef_probs(struct AV1Common *cm);
-// This is the index in the scan order beyond which all coefficients for
-// 8x8 transform and above are in the top band.
-// This macro is currently unused but may be used by certain implementations
-#define MAXBAND_INDEX 21
-
-DECLARE_ALIGNED(16, extern const uint8_t,
- av1_coefband_trans_8x8plus[MAX_TX_SQUARE]);
-DECLARE_ALIGNED(16, extern const uint8_t, av1_coefband_trans_4x8_8x4[32]);
-DECLARE_ALIGNED(16, extern const uint8_t, av1_coefband_trans_4x4[16]);
-
-static INLINE const uint8_t *get_band_translate(TX_SIZE tx_size) {
- switch (tx_size) {
- case TX_4X4: return av1_coefband_trans_4x4;
- case TX_8X4:
- case TX_4X8: return av1_coefband_trans_4x8_8x4;
- default: return av1_coefband_trans_8x8plus;
- }
-}
-
-// 128 lists of probabilities are stored for the following ONE node probs:
-// 1, 3, 5, 7, ..., 253, 255
-// In between probabilities are interpolated linearly
-#define COEFF_PROB_MODELS 255
-
-#define UNCONSTRAINED_NODES 3
-
-#define MODEL_NODES (ENTROPY_NODES - UNCONSTRAINED_NODES)
-#define TAIL_NODES (MODEL_NODES + 1)
-
-typedef aom_cdf_prob coeff_cdf_model[REF_TYPES][COEF_BANDS][COEFF_CONTEXTS]
- [CDF_SIZE(ENTROPY_TOKENS)];
-extern const aom_cdf_prob av1_pareto8_token_probs[COEFF_PROB_MODELS]
- [ENTROPY_TOKENS - 2];
-extern const aom_cdf_prob av1_pareto8_tail_probs[COEFF_PROB_MODELS]
- [ENTROPY_TOKENS - 3];
struct frame_contexts;
-void av1_coef_head_cdfs(struct frame_contexts *fc);
-void av1_coef_pareto_cdfs(struct frame_contexts *fc);
-
typedef char ENTROPY_CONTEXT;
static INLINE int combine_entropy_contexts(ENTROPY_CONTEXT a,
@@ -304,11 +167,6 @@
return combine_entropy_contexts(above_ec, left_ec);
}
-#define COEF_COUNT_SAT 24
-#define COEF_MAX_UPDATE_FACTOR 112
-#define COEF_COUNT_SAT_AFTER_KEY 24
-#define COEF_MAX_UPDATE_FACTOR_AFTER_KEY 128
-
static INLINE TX_SIZE get_txsize_entropy_ctx(TX_SIZE txsize) {
return (TX_SIZE)((txsize_sqr_map[txsize] + txsize_sqr_up_map[txsize] + 1) >>
1);
diff --git a/av1/common/entropymode.h b/av1/common/entropymode.h
index daf7609..caa08d2 100644
--- a/av1/common/entropymode.h
+++ b/av1/common/entropymode.h
@@ -68,9 +68,6 @@
} SCAN_ORDER;
typedef struct frame_contexts {
- coeff_cdf_model coef_tail_cdfs[TX_SIZES][PLANE_TYPES];
- coeff_cdf_model coef_head_cdfs[TX_SIZES][PLANE_TYPES];
-
aom_cdf_prob txb_skip_cdf[TX_SIZES][TXB_SKIP_CONTEXTS][CDF_SIZE(2)];
aom_cdf_prob eob_extra_cdf[TX_SIZES][PLANE_TYPES][EOB_COEF_CONTEXTS]
[CDF_SIZE(2)];
diff --git a/av1/encoder/block.h b/av1/encoder/block.h
index 71cdcf8..4612b4c 100644
--- a/av1/encoder/block.h
+++ b/av1/encoder/block.h
@@ -51,9 +51,6 @@
const int16_t *dequant_QTX;
} MACROBLOCK_PLANE;
-typedef int av1_coeff_cost[PLANE_TYPES][REF_TYPES][COEF_BANDS][COEFF_CONTEXTS]
- [TAIL_TOKENS];
-
typedef struct {
int txb_skip_cost[TXB_SKIP_CONTEXTS][2];
int base_eob_cost[SIG_COEF_CONTEXTS_EOB][3];
@@ -246,9 +243,6 @@
LV_MAP_EOB_COST eob_costs[7][2];
uint16_t cb_offset;
- av1_coeff_cost token_head_costs[TX_SIZES];
- av1_coeff_cost token_tail_costs[TX_SIZES];
-
// mode costs
int intra_inter_cost[INTRA_INTER_CONTEXTS][2];
diff --git a/av1/encoder/rd.c b/av1/encoder/rd.c
index 9fe0ba8..0098ca1 100644
--- a/av1/encoder/rd.c
+++ b/av1/encoder/rd.c
@@ -526,22 +526,6 @@
}
}
-void av1_fill_token_costs_from_cdf(av1_coeff_cost *cost,
- coeff_cdf_model (*cdf)[PLANE_TYPES]) {
- for (int tx = 0; tx < TX_SIZES; ++tx) {
- for (int pt = 0; pt < PLANE_TYPES; ++pt) {
- for (int rt = 0; rt < REF_TYPES; ++rt) {
- for (int band = 0; band < COEF_BANDS; ++band) {
- for (int ctx = 0; ctx < BAND_COEFF_CONTEXTS(band); ++ctx) {
- av1_cost_tokens_from_cdf(cost[tx][pt][rt][band][ctx],
- cdf[tx][pt][rt][band][ctx], NULL);
- }
- }
- }
- }
- }
-}
-
void av1_initialize_rd_consts(AV1_COMP *cpi) {
AV1_COMMON *const cm = &cpi->common;
MACROBLOCK *const x = &cpi->td.mb;
diff --git a/av1/encoder/rd.h b/av1/encoder/rd.h
index 9a2c92e..c67d054 100644
--- a/av1/encoder/rd.h
+++ b/av1/encoder/rd.h
@@ -374,17 +374,6 @@
#endif
}
-static INLINE int av1_get_coeff_token_cost(int token, int8_t eob_val,
- int is_first,
- const int *head_cost_table,
- const int *tail_cost_table) {
- if (eob_val == LAST_EOB) return av1_cost_literal(1);
- const int comb_symb = 2 * AOMMIN(token, TWO_TOKEN) - eob_val + is_first;
- int cost = head_cost_table[comb_symb];
- if (token > ONE_TOKEN) cost += tail_cost_table[token - TWO_TOKEN];
- return cost;
-}
-
struct TileInfo;
struct TileDataEnc;
struct AV1_COMP;
@@ -459,9 +448,6 @@
void av1_fill_coeff_costs(MACROBLOCK *x, FRAME_CONTEXT *fc,
const int num_planes);
-void av1_fill_token_costs_from_cdf(av1_coeff_cost *cost,
- coeff_cdf_model (*cdf)[PLANE_TYPES]);
-
#ifdef __cplusplus
} // extern "C"
#endif