diff options
Diffstat (limited to 'third_party/aom/av1/common/entropy.c')
-rw-r--r-- | third_party/aom/av1/common/entropy.c | 722 |
1 files changed, 29 insertions, 693 deletions
diff --git a/third_party/aom/av1/common/entropy.c b/third_party/aom/av1/common/entropy.c index 14ab53ca0..3ce205e3c 100644 --- a/third_party/aom/av1/common/entropy.c +++ b/third_party/aom/av1/common/entropy.c @@ -135,7 +135,7 @@ const aom_prob av1_cat6_prob[] = { }; const uint16_t band_count_table[TX_SIZES_ALL][8] = { -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 { 1, 2, 2, 3, 0, 0, 0 }, #endif { 1, 2, 3, 4, 3, 16 - 13, 0 }, { 1, 2, 3, 4, 11, 64 - 21, 0 }, @@ -151,7 +151,7 @@ const uint16_t band_count_table[TX_SIZES_ALL][8] = { }; const uint16_t band_cum_count_table[TX_SIZES_ALL][8] = { -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 { 0, 1, 3, 6, 10, 13, 16, 0 }, #endif { 0, 1, 3, 6, 10, 13, 16, 0 }, { 0, 1, 3, 6, 10, 21, 64, 0 }, @@ -627,7 +627,6 @@ const aom_prob av1_pareto8_full[COEFF_PROB_MODELS][MODEL_NODES] = { // The full source code of the generating program is available in: // tools/gen_constrained_tokenset.py // -#if CONFIG_NEW_TOKENSET // Values for tokens TWO_TOKEN through CATEGORY6_TOKEN included // in the table here : the ONE_TOKEN probability is // removed and the probabilities rescaled. @@ -891,275 +890,13 @@ const aom_cdf_prob av1_pareto8_tail_probs[COEFF_PROB_MODELS][TAIL_NODES] = { { 31131, 1448, 152, 31, 2, 1, 1, 1, 1 }, { 31486, 1150, 107, 20, 1, 1, 1, 1, 1 }, }; -#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 /* clang-format off */ #if CONFIG_Q_ADAPT_PROBS const av1_coeff_probs_model default_qctx_coef_probs[QCTX_BINS][TX_SIZES][PLANE_TYPES] = { { // Q_Index 0 -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 { // TX_SIZE 0 { // Y plane { // Intra @@ -1825,7 +1562,7 @@ default_qctx_coef_probs[QCTX_BINS][TX_SIZES][PLANE_TYPES] = { #endif // CONFIG_TX64X64 }, { // Q_Index 1 -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 { // TX_SIZE 0 { // Y plane { // Intra @@ -2491,7 +2228,7 @@ default_qctx_coef_probs[QCTX_BINS][TX_SIZES][PLANE_TYPES] = { #endif // CONFIG_TX64X64 }, { // Q_Index 2 -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 { // TX_SIZE 0 { // Y plane { // Intra @@ -3157,7 +2894,7 @@ default_qctx_coef_probs[QCTX_BINS][TX_SIZES][PLANE_TYPES] = { #endif // CONFIG_TX64X64 }, { // Q_Index 3 -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 { // TX_SIZE 0 { // Y plane { // Intra @@ -3824,7 +3561,6 @@ default_qctx_coef_probs[QCTX_BINS][TX_SIZES][PLANE_TYPES] = { }, }; #else -#if CONFIG_NEW_TOKENSET static const av1_coeff_probs_model default_coef_probs_4x4[PLANE_TYPES] = { { // Y plane { // Intra @@ -4249,343 +3985,6 @@ static const av1_coeff_probs_model default_coef_probs_32x32[PLANE_TYPES] = { } } }; -#else // CONFIG_NEW_TOKENSET -static const av1_coeff_probs_model default_coef_probs_4x4[PLANE_TYPES] = { - { // Y plane - { // Intra - { // Band 0 - { 195, 29, 183 }, { 84, 49, 136 }, { 8, 42, 71 } - }, { // Band 1 - { 31, 107, 169 }, { 35, 99, 159 }, { 17, 82, 140 }, - { 8, 66, 114 }, { 2, 44, 76 }, { 1, 19, 32 } - }, { // Band 2 - { 40, 132, 201 }, { 29, 114, 187 }, { 13, 91, 157 }, - { 7, 75, 127 }, { 3, 58, 95 }, { 1, 28, 47 } - }, { // Band 3 - { 69, 142, 221 }, { 42, 122, 201 }, { 15, 91, 159 }, - { 6, 67, 121 }, { 1, 42, 77 }, { 1, 17, 31 } - }, { // Band 4 - { 102, 148, 228 }, { 67, 117, 204 }, { 17, 82, 154 }, - { 6, 59, 114 }, { 2, 39, 75 }, { 1, 15, 29 } - }, { // Band 5 - { 156, 57, 233 }, { 119, 57, 212 }, { 58, 48, 163 }, - { 29, 40, 124 }, { 12, 30, 81 }, { 3, 12, 31 } - } - }, { // Inter - { // Band 0 - { 191, 107, 226 }, { 124, 117, 204 }, { 25, 99, 155 } - }, { // Band 1 - { 29, 148, 210 }, { 37, 126, 194 }, { 8, 93, 157 }, - { 2, 68, 118 }, { 1, 39, 69 }, { 1, 17, 33 } - }, { // Band 2 - { 41, 151, 213 }, { 27, 123, 193 }, { 3, 82, 144 }, - { 1, 58, 105 }, { 1, 32, 60 }, { 1, 13, 26 } - }, { // Band 3 - { 59, 159, 220 }, { 23, 126, 198 }, { 4, 88, 151 }, - { 1, 66, 114 }, { 1, 38, 71 }, { 1, 18, 34 } - }, { // Band 4 - { 114, 136, 232 }, { 51, 114, 207 }, { 11, 83, 155 }, - { 3, 56, 105 }, { 1, 33, 65 }, { 1, 17, 34 } - }, { // Band 5 - { 149, 65, 234 }, { 121, 57, 215 }, { 61, 49, 166 }, - { 28, 36, 114 }, { 12, 25, 76 }, { 3, 16, 42 } - } - } - }, { // UV plane - { // Intra - { // Band 0 - { 214, 49, 220 }, { 132, 63, 188 }, { 42, 65, 137 } - }, { // Band 1 - { 85, 137, 221 }, { 104, 131, 216 }, { 49, 111, 192 }, - { 21, 87, 155 }, { 2, 49, 87 }, { 1, 16, 28 } - }, { // Band 2 - { 89, 163, 230 }, { 90, 137, 220 }, { 29, 100, 183 }, - { 10, 70, 135 }, { 2, 42, 81 }, { 1, 17, 33 } - }, { // Band 3 - { 108, 167, 237 }, { 55, 133, 222 }, { 15, 97, 179 }, - { 4, 72, 135 }, { 1, 45, 85 }, { 1, 19, 38 } - }, { // Band 4 - { 124, 146, 240 }, { 66, 124, 224 }, { 17, 88, 175 }, - { 4, 58, 122 }, { 1, 36, 75 }, { 1, 18, 37 } - }, { // Band 5 - { 141, 79, 241 }, { 126, 70, 227 }, { 66, 58, 182 }, - { 30, 44, 136 }, { 12, 34, 96 }, { 2, 20, 47 } - } - }, { // Inter - { // Band 0 - { 229, 99, 249 }, { 143, 111, 235 }, { 46, 109, 192 } - }, { // Band 1 - { 82, 158, 236 }, { 94, 146, 224 }, { 25, 117, 191 }, - { 9, 87, 149 }, { 3, 56, 99 }, { 1, 33, 57 } - }, { // Band 2 - { 83, 167, 237 }, { 68, 145, 222 }, { 10, 103, 177 }, - { 2, 72, 131 }, { 1, 41, 79 }, { 1, 20, 39 } - }, { // Band 3 - { 99, 167, 239 }, { 47, 141, 224 }, { 10, 104, 178 }, - { 2, 73, 133 }, { 1, 44, 85 }, { 1, 22, 47 } - }, { // Band 4 - { 127, 145, 243 }, { 71, 129, 228 }, { 17, 93, 177 }, - { 3, 61, 124 }, { 1, 41, 84 }, { 1, 21, 52 } - }, { // Band 5 - { 157, 78, 244 }, { 140, 72, 231 }, { 69, 58, 184 }, - { 31, 44, 137 }, { 14, 38, 105 }, { 8, 23, 61 } - } - } - } -}; - -static const av1_coeff_probs_model default_coef_probs_8x8[PLANE_TYPES] = { - { // Y plane - { // Intra - { // Band 0 - { 125, 34, 187 }, { 52, 41, 133 }, { 6, 31, 56 } - }, { // Band 1 - { 37, 109, 153 }, { 51, 102, 147 }, { 23, 87, 128 }, - { 8, 67, 101 }, { 1, 41, 63 }, { 1, 19, 29 } - }, { // Band 2 - { 31, 154, 185 }, { 17, 127, 175 }, { 6, 96, 145 }, - { 2, 73, 114 }, { 1, 51, 82 }, { 1, 28, 45 } - }, { // Band 3 - { 23, 163, 200 }, { 10, 131, 185 }, { 2, 93, 148 }, - { 1, 67, 111 }, { 1, 41, 69 }, { 1, 14, 24 } - }, { // Band 4 - { 29, 176, 217 }, { 12, 145, 201 }, { 3, 101, 156 }, - { 1, 69, 111 }, { 1, 39, 63 }, { 1, 14, 23 } - }, { // Band 5 - { 57, 192, 233 }, { 25, 154, 215 }, { 6, 109, 167 }, - { 3, 78, 118 }, { 1, 48, 69 }, { 1, 21, 29 } - } - }, { // Inter - { // Band 0 - { 202, 105, 245 }, { 108, 106, 216 }, { 18, 90, 144 } - }, { // Band 1 - { 33, 172, 219 }, { 64, 149, 206 }, { 14, 117, 177 }, - { 5, 90, 141 }, { 2, 61, 95 }, { 1, 37, 57 } - }, { // Band 2 - { 33, 179, 220 }, { 11, 140, 198 }, { 1, 89, 148 }, - { 1, 60, 104 }, { 1, 33, 57 }, { 1, 12, 21 } - }, { // Band 3 - { 30, 181, 221 }, { 8, 141, 198 }, { 1, 87, 145 }, - { 1, 58, 100 }, { 1, 31, 55 }, { 1, 12, 20 } - }, { // Band 4 - { 32, 186, 224 }, { 7, 142, 198 }, { 1, 86, 143 }, - { 1, 58, 100 }, { 1, 31, 55 }, { 1, 12, 22 } - }, { // Band 5 - { 57, 192, 227 }, { 20, 143, 204 }, { 3, 96, 154 }, - { 1, 68, 112 }, { 1, 42, 69 }, { 1, 19, 32 } - } - } - }, { // UV plane - { // Intra - { // Band 0 - { 212, 35, 215 }, { 113, 47, 169 }, { 29, 48, 105 } - }, { // Band 1 - { 74, 129, 203 }, { 106, 120, 203 }, { 49, 107, 178 }, - { 19, 84, 144 }, { 4, 50, 84 }, { 1, 15, 25 } - }, { // Band 2 - { 71, 172, 217 }, { 44, 141, 209 }, { 15, 102, 173 }, - { 6, 76, 133 }, { 2, 51, 89 }, { 1, 24, 42 } - }, { // Band 3 - { 64, 185, 231 }, { 31, 148, 216 }, { 8, 103, 175 }, - { 3, 74, 131 }, { 1, 46, 81 }, { 1, 18, 30 } - }, { // Band 4 - { 65, 196, 235 }, { 25, 157, 221 }, { 5, 105, 174 }, - { 1, 67, 120 }, { 1, 38, 69 }, { 1, 15, 30 } - }, { // Band 5 - { 65, 204, 238 }, { 30, 156, 224 }, { 7, 107, 177 }, - { 2, 70, 124 }, { 1, 42, 73 }, { 1, 18, 34 } - } - }, { // Inter - { // Band 0 - { 225, 86, 251 }, { 144, 104, 235 }, { 42, 99, 181 } - }, { // Band 1 - { 85, 175, 239 }, { 112, 165, 229 }, { 29, 136, 200 }, - { 12, 103, 162 }, { 6, 77, 123 }, { 2, 53, 84 } - }, { // Band 2 - { 75, 183, 239 }, { 30, 155, 221 }, { 3, 106, 171 }, - { 1, 74, 128 }, { 1, 44, 76 }, { 1, 17, 28 } - }, { // Band 3 - { 73, 185, 240 }, { 27, 159, 222 }, { 2, 107, 172 }, - { 1, 75, 127 }, { 1, 42, 73 }, { 1, 17, 29 } - }, { // Band 4 - { 62, 190, 238 }, { 21, 159, 222 }, { 2, 107, 172 }, - { 1, 72, 122 }, { 1, 40, 71 }, { 1, 18, 32 } - }, { // Band 5 - { 61, 199, 240 }, { 27, 161, 226 }, { 4, 113, 180 }, - { 1, 76, 129 }, { 1, 46, 80 }, { 1, 23, 41 } - } - } - } -}; - -static const av1_coeff_probs_model default_coef_probs_16x16[PLANE_TYPES] = { - { // Y plane - { // Intra - { // Band 0 - { 7, 27, 153 }, { 5, 30, 95 }, { 1, 16, 30 } - }, { // Band 1 - { 50, 75, 127 }, { 57, 75, 124 }, { 27, 67, 108 }, - { 10, 54, 86 }, { 1, 33, 52 }, { 1, 12, 18 } - }, { // Band 2 - { 43, 125, 151 }, { 26, 108, 148 }, { 7, 83, 122 }, - { 2, 59, 89 }, { 1, 38, 60 }, { 1, 17, 27 } - }, { // Band 3 - { 23, 144, 163 }, { 13, 112, 154 }, { 2, 75, 117 }, - { 1, 50, 81 }, { 1, 31, 51 }, { 1, 14, 23 } - }, { // Band 4 - { 18, 162, 185 }, { 6, 123, 171 }, { 1, 78, 125 }, - { 1, 51, 86 }, { 1, 31, 54 }, { 1, 14, 23 } - }, { // Band 5 - { 15, 199, 227 }, { 3, 150, 204 }, { 1, 91, 146 }, - { 1, 55, 95 }, { 1, 30, 53 }, { 1, 11, 20 } - } - }, { // Inter - { // Band 0 - { 19, 55, 240 }, { 19, 59, 196 }, { 3, 52, 105 } - }, { // Band 1 - { 41, 166, 207 }, { 104, 153, 199 }, { 31, 123, 181 }, - { 14, 101, 152 }, { 5, 72, 106 }, { 1, 36, 52 } - }, { // Band 2 - { 35, 176, 211 }, { 12, 131, 190 }, { 2, 88, 144 }, - { 1, 60, 101 }, { 1, 36, 60 }, { 1, 16, 28 } - }, { // Band 3 - { 28, 183, 213 }, { 8, 134, 191 }, { 1, 86, 142 }, - { 1, 56, 96 }, { 1, 30, 53 }, { 1, 12, 20 } - }, { // Band 4 - { 20, 190, 215 }, { 4, 135, 192 }, { 1, 84, 139 }, - { 1, 53, 91 }, { 1, 28, 49 }, { 1, 11, 20 } - }, { // Band 5 - { 13, 196, 216 }, { 2, 137, 192 }, { 1, 86, 143 }, - { 1, 57, 99 }, { 1, 32, 56 }, { 1, 13, 24 } - } - } - }, { // UV plane - { // Intra - { // Band 0 - { 211, 29, 217 }, { 96, 47, 156 }, { 22, 43, 87 } - }, { // Band 1 - { 78, 120, 193 }, { 111, 116, 186 }, { 46, 102, 164 }, - { 15, 80, 128 }, { 2, 49, 76 }, { 1, 18, 28 } - }, { // Band 2 - { 71, 161, 203 }, { 42, 132, 192 }, { 10, 98, 150 }, - { 3, 69, 109 }, { 1, 44, 70 }, { 1, 18, 29 } - }, { // Band 3 - { 57, 186, 211 }, { 30, 140, 196 }, { 4, 93, 146 }, - { 1, 62, 102 }, { 1, 38, 65 }, { 1, 16, 27 } - }, { // Band 4 - { 47, 199, 217 }, { 14, 145, 196 }, { 1, 88, 142 }, - { 1, 57, 98 }, { 1, 36, 62 }, { 1, 15, 26 } - }, { // Band 5 - { 26, 219, 229 }, { 5, 155, 207 }, { 1, 94, 151 }, - { 1, 60, 104 }, { 1, 36, 62 }, { 1, 16, 28 } - } - }, { // Inter - { // Band 0 - { 233, 29, 248 }, { 146, 47, 220 }, { 43, 52, 140 } - }, { // Band 1 - { 100, 163, 232 }, { 179, 161, 222 }, { 63, 142, 204 }, - { 37, 113, 174 }, { 26, 89, 137 }, { 18, 68, 97 } - }, { // Band 2 - { 85, 181, 230 }, { 32, 146, 209 }, { 7, 100, 164 }, - { 3, 71, 121 }, { 1, 45, 77 }, { 1, 18, 30 } - }, { // Band 3 - { 65, 187, 230 }, { 20, 148, 207 }, { 2, 97, 159 }, - { 1, 68, 116 }, { 1, 40, 70 }, { 1, 14, 29 } - }, { // Band 4 - { 40, 194, 227 }, { 8, 147, 204 }, { 1, 94, 155 }, - { 1, 65, 112 }, { 1, 39, 66 }, { 1, 14, 26 } - }, { // Band 5 - { 16, 208, 228 }, { 3, 151, 207 }, { 1, 98, 160 }, - { 1, 67, 117 }, { 1, 41, 74 }, { 1, 17, 31 } - } - } - } -}; - -static const av1_coeff_probs_model default_coef_probs_32x32[PLANE_TYPES] = { - { // Y plane - { // Intra - { // Band 0 - { 17, 38, 140 }, { 7, 34, 80 }, { 1, 17, 29 } - }, { // Band 1 - { 37, 75, 128 }, { 41, 76, 128 }, { 26, 66, 116 }, - { 12, 52, 94 }, { 2, 32, 55 }, { 1, 10, 16 } - }, { // Band 2 - { 50, 127, 154 }, { 37, 109, 152 }, { 16, 82, 121 }, - { 5, 59, 85 }, { 1, 35, 54 }, { 1, 13, 20 } - }, { // Band 3 - { 40, 142, 167 }, { 17, 110, 157 }, { 2, 71, 112 }, - { 1, 44, 72 }, { 1, 27, 45 }, { 1, 11, 17 } - }, { // Band 4 - { 30, 175, 188 }, { 9, 124, 169 }, { 1, 74, 116 }, - { 1, 48, 78 }, { 1, 30, 49 }, { 1, 11, 18 } - }, { // Band 5 - { 10, 222, 223 }, { 2, 150, 194 }, { 1, 83, 128 }, - { 1, 48, 79 }, { 1, 27, 45 }, { 1, 11, 17 } - } - }, { // Inter - { // Band 0 - { 36, 41, 235 }, { 29, 36, 193 }, { 10, 27, 111 } - }, { // Band 1 - { 85, 165, 222 }, { 177, 162, 215 }, { 110, 135, 195 }, - { 57, 113, 168 }, { 23, 83, 120 }, { 10, 49, 61 } - }, { // Band 2 - { 85, 190, 223 }, { 36, 139, 200 }, { 5, 90, 146 }, - { 1, 60, 103 }, { 1, 38, 65 }, { 1, 18, 30 } - }, { // Band 3 - { 72, 202, 223 }, { 23, 141, 199 }, { 2, 86, 140 }, - { 1, 56, 97 }, { 1, 36, 61 }, { 1, 16, 27 } - }, { // Band 4 - { 55, 218, 225 }, { 13, 145, 200 }, { 1, 86, 141 }, - { 1, 57, 99 }, { 1, 35, 61 }, { 1, 13, 22 } - }, { // Band 5 - { 15, 235, 212 }, { 1, 132, 184 }, { 1, 84, 139 }, - { 1, 57, 97 }, { 1, 34, 56 }, { 1, 14, 23 } - } - } - }, { // UV plane - { // Intra - { // Band 0 - { 181, 21, 201 }, { 61, 37, 123 }, { 10, 38, 71 } - }, { // Band 1 - { 47, 106, 172 }, { 95, 104, 173 }, { 42, 93, 159 }, - { 18, 77, 131 }, { 4, 50, 81 }, { 1, 17, 23 } - }, { // Band 2 - { 62, 147, 199 }, { 44, 130, 189 }, { 28, 102, 154 }, - { 18, 75, 115 }, { 2, 44, 65 }, { 1, 12, 19 } - }, { // Band 3 - { 55, 153, 210 }, { 24, 130, 194 }, { 3, 93, 146 }, - { 1, 61, 97 }, { 1, 31, 50 }, { 1, 10, 16 } - }, { // Band 4 - { 49, 186, 223 }, { 17, 148, 204 }, { 1, 96, 142 }, - { 1, 53, 83 }, { 1, 26, 44 }, { 1, 11, 17 } - }, { // Band 5 - { 13, 217, 212 }, { 2, 136, 180 }, { 1, 78, 124 }, - { 1, 50, 83 }, { 1, 29, 49 }, { 1, 14, 23 } - } - }, { // Inter - { // Band 0 - { 197, 13, 247 }, { 82, 17, 222 }, { 25, 17, 162 } - }, { // Band 1 - { 126, 186, 247 }, { 234, 191, 243 }, { 176, 177, 234 }, - { 104, 158, 220 }, { 66, 128, 186 }, { 55, 90, 137 } - }, { // Band 2 - { 111, 197, 242 }, { 46, 158, 219 }, { 9, 104, 171 }, - { 2, 65, 125 }, { 1, 44, 80 }, { 1, 17, 91 } - }, { // Band 3 - { 104, 208, 245 }, { 39, 168, 224 }, { 3, 109, 162 }, - { 1, 79, 124 }, { 1, 50, 102 }, { 1, 43, 102 } - }, { // Band 4 - { 84, 220, 246 }, { 31, 177, 231 }, { 2, 115, 180 }, - { 1, 79, 134 }, { 1, 55, 77 }, { 1, 60, 79 } - }, { // Band 5 - { 43, 243, 240 }, { 8, 180, 217 }, { 1, 115, 166 }, - { 1, 84, 121 }, { 1, 51, 67 }, { 1, 16, 6 } - } - } - } -}; -#endif // CONFIG_NEW_TOKENSET #if CONFIG_TX64X64 // FIXME. Optimize for EC_MULTISYMBOL @@ -4674,9 +4073,20 @@ static const av1_coeff_probs_model default_coef_probs_64x64[PLANE_TYPES] = { }; #endif // CONFIG_TX64X64 #endif // CONFIG_Q_ADAPT_PROBS -#if CONFIG_NEW_TOKENSET static const aom_prob av1_default_blockzero_probs[TX_SIZES][PLANE_TYPES] [REF_TYPES][BLOCKZ_CONTEXTS] = { +#if CONFIG_CHROMA_2X2 + { // TX_2x2 + { // Y plane + { 195, 84, 8, }, // Intra + { 191, 124, 25, }, // Inter + }, + { // UV plane + { 214, 132, 42, }, // Intra + { 229, 143, 46, }, // Inter + }, + }, +#endif { // TX_4x4 { // Y plane { 195, 84, 8, }, // Intra @@ -5915,7 +5325,6 @@ static const coeff_cdf_model default_coef_head_cdf_32x32[PLANE_TYPES] = { {AOM_ICDF(3009), AOM_ICDF(3246), AOM_ICDF(10158), AOM_ICDF(10533), AOM_ICDF(32768) } } } } }; -#endif // CONFIG_NEW_TOKENSET /* clang-format on */ @@ -5930,8 +5339,6 @@ void av1_model_to_full_probs(const aom_prob *model, aom_prob *full) { extend_to_full_distribution(&full[UNCONSTRAINED_NODES], model[PIVOT_NODE]); } -#if CONFIG_NEW_TOKENSET - 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) { @@ -6041,7 +5448,7 @@ static void av1_default_coef_cdfs(FRAME_CONTEXT *fc) { for (j = 0; j < REF_TYPES; ++j) for (k = 0; k < COEF_BANDS; ++k) for (l = 0; l < BAND_COEFF_CONTEXTS(k); ++l) { -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 av1_copy(fc->coef_head_cdfs[TX_2X2][i][j][k][l], default_coef_head_cdf_4x4[i][j][k][l]); #endif @@ -6074,19 +5481,6 @@ void av1_coef_head_cdfs(FRAME_CONTEXT *fc) { } } -#elif CONFIG_EC_MULTISYMBOL -static void build_token_cdfs(const aom_prob *pdf_model, - aom_cdf_prob cdf[ENTROPY_TOKENS + 1]) { - int i, sum = 0; - assert(pdf_model[2] != 0); - for (i = 0; i < ENTROPY_TOKENS - 2; ++i) { - sum += av1_pareto8_token_probs[pdf_model[2] - 1][i]; - cdf[i] = AOM_ICDF(sum); - } -} -#endif // CONFIG_NEW_TOKENSET - -#if CONFIG_EC_MULTISYMBOL void av1_coef_pareto_cdfs(FRAME_CONTEXT *fc) { /* Build the tail based on a Pareto distribution */ TX_SIZE t; @@ -6096,15 +5490,9 @@ void av1_coef_pareto_cdfs(FRAME_CONTEXT *fc) { for (j = 0; j < REF_TYPES; ++j) for (k = 0; k < COEF_BANDS; ++k) for (l = 0; l < BAND_COEFF_CONTEXTS(k); ++l) -#if CONFIG_NEW_TOKENSET build_tail_cdfs(fc->coef_tail_cdfs[t][i][j][k][l], fc->coef_head_cdfs[t][i][j][k][l], k == 0); -#else - build_token_cdfs(fc->coef_probs[t][i][j][k][l], - fc->coef_cdfs[t][i][j][k][l]); -#endif } -#endif void av1_default_coef_probs(AV1_COMMON *cm) { #if CONFIG_Q_ADAPT_PROBS @@ -6112,7 +5500,7 @@ void av1_default_coef_probs(AV1_COMMON *cm) { ROUND_POWER_OF_TWO(cm->base_qindex, 8 - QCTX_BIN_BITS), QCTX_BINS - 1); av1_copy(cm->fc->coef_probs, default_qctx_coef_probs[index]); #else -#if CONFIG_CB4X4 +#if CONFIG_CHROMA_2X2 av1_copy(cm->fc->coef_probs[TX_2X2], default_coef_probs_4x4); #endif av1_copy(cm->fc->coef_probs[TX_4X4], default_coef_probs_4x4); @@ -6123,44 +5511,29 @@ void av1_default_coef_probs(AV1_COMMON *cm) { av1_copy(cm->fc->coef_probs[TX_64X64], default_coef_probs_64x64); #endif // CONFIG_TX64X64 #endif // CONFIG_Q_ADAPT_PROBS -#if CONFIG_NEW_TOKENSET av1_copy(cm->fc->blockzero_probs, av1_default_blockzero_probs); -#endif -#if CONFIG_NEW_TOKENSET /* Load the head tokens */ av1_default_coef_cdfs(cm->fc); -#endif -#if CONFIG_EC_MULTISYMBOL av1_coef_pareto_cdfs(cm->fc); -#endif // CONFIG_EC_MULTISYMBOL } #if !CONFIG_LV_MAP static void adapt_coef_probs(AV1_COMMON *cm, TX_SIZE tx_size, unsigned int count_sat, unsigned int update_factor) { - const FRAME_CONTEXT *pre_fc = &cm->frame_contexts[cm->frame_context_idx]; + const FRAME_CONTEXT *pre_fc = cm->pre_fc; av1_coeff_probs_model *const probs = cm->fc->coef_probs[tx_size]; -#if CONFIG_SUBFRAME_PROB_UPDATE - const av1_coeff_probs_model *const pre_probs = - cm->partial_prob_update - ? (const av1_coeff_probs_model *)cm->starting_coef_probs[tx_size] - : pre_fc->coef_probs[tx_size]; -#else const av1_coeff_probs_model *const pre_probs = pre_fc->coef_probs[tx_size]; -#endif // CONFIG_SUBFRAME_PROB_UPDATE const av1_coeff_count_model *const counts = (const av1_coeff_count_model *)cm->counts.coef[tx_size]; const unsigned int(*eob_counts)[REF_TYPES][COEF_BANDS][COEFF_CONTEXTS] = (const unsigned int(*)[REF_TYPES][COEF_BANDS][COEFF_CONTEXTS]) cm->counts.eob_branch[tx_size]; -#if CONFIG_NEW_TOKENSET const av1_blockz_probs_model *const pre_blockz_probs = pre_fc->blockzero_probs[tx_size]; av1_blockz_probs_model *const blockz_probs = cm->fc->blockzero_probs[tx_size]; const av1_blockz_count_model *const blockz_counts = (const av1_blockz_count_model *)&cm->counts.blockz_count[tx_size][0]; -#endif int i, j, k, l, m; #if CONFIG_RECT_TX assert(!is_rect_tx(tx_size)); @@ -6183,7 +5556,6 @@ static void adapt_coef_probs(AV1_COMMON *cm, TX_SIZE tx_size, count_sat, update_factor); } -#if CONFIG_NEW_TOKENSET for (i = 0; i < PLANE_TYPES; ++i) { for (j = 0; j < REF_TYPES; ++j) { for (k = 0; k < BLOCKZ_CONTEXTS; ++k) { @@ -6195,7 +5567,6 @@ static void adapt_coef_probs(AV1_COMMON *cm, TX_SIZE tx_size, } } } -#endif } #endif // !CONFIG_LV_MAP @@ -6209,9 +5580,6 @@ void av1_adapt_coef_probs(AV1_COMMON *cm) { update_factor = COEF_MAX_UPDATE_FACTOR; count_sat = COEF_COUNT_SAT; } -#if CONFIG_SUBFRAME_PROB_UPDATE - if (cm->partial_prob_update == 1) update_factor = COEF_MAX_UPDATE_FACTOR; -#endif // CONFIG_SUBFRAME_PROB_UPDATE #if CONFIG_LV_MAP av1_adapt_txb_probs(cm, count_sat, update_factor); @@ -6222,18 +5590,6 @@ void av1_adapt_coef_probs(AV1_COMMON *cm) { #endif } -#if CONFIG_SUBFRAME_PROB_UPDATE -void av1_partial_adapt_probs(AV1_COMMON *cm, int mi_row, int mi_col) { - (void)mi_row; - (void)mi_col; - - if (cm->refresh_frame_context == REFRESH_FRAME_CONTEXT_BACKWARD) { - cm->partial_prob_update = 1; - av1_adapt_coef_probs(cm); - } -} -#endif // CONFIG_SUBFRAME_PROB_UPDATE - #if CONFIG_EC_ADAPT static void av1_average_cdf(aom_cdf_prob *cdf_ptr[], aom_cdf_prob *fc_cdf_ptr, int cdf_size, const int num_tiles) { @@ -6263,26 +5619,21 @@ static void av1_average_cdf(aom_cdf_prob *cdf_ptr[], aom_cdf_prob *fc_cdf_ptr, av1_average_cdf(cdf_ptr, fc_cdf_ptr, cdf_size, num_tiles); void av1_average_tile_coef_cdfs(FRAME_CONTEXT *fc, FRAME_CONTEXT *ec_ctxs[], - aom_cdf_prob *cdf_ptr[], const int num_tiles) { + aom_cdf_prob *cdf_ptr[], int num_tiles) { int i, cdf_size; aom_cdf_prob *fc_cdf_ptr; -#if CONFIG_NEW_TOKENSET AVERAGE_TILE_CDFS(coef_head_cdfs) AVERAGE_TILE_CDFS(coef_tail_cdfs) -#else - AVERAGE_TILE_CDFS(coef_cdfs) -#endif } void av1_average_tile_mv_cdfs(FRAME_CONTEXT *fc, FRAME_CONTEXT *ec_ctxs[], - aom_cdf_prob *cdf_ptr[], const int num_tiles) { + aom_cdf_prob *cdf_ptr[], int num_tiles) { int i, k, cdf_size; aom_cdf_prob *fc_cdf_ptr; -#if CONFIG_REF_MV int j; for (j = 0; j < NMV_CONTEXTS; ++j) { AVERAGE_TILE_CDFS(nmvc[j].joint_cdf) @@ -6293,19 +5644,10 @@ void av1_average_tile_mv_cdfs(FRAME_CONTEXT *fc, FRAME_CONTEXT *ec_ctxs[], AVERAGE_TILE_CDFS(nmvc[j].comps[k].fp_cdf); } } -#else - AVERAGE_TILE_CDFS(nmvc.joint_cdf) - - for (k = 0; k < 2; ++k) { - AVERAGE_TILE_CDFS(nmvc.comps[k].class_cdf) - AVERAGE_TILE_CDFS(nmvc.comps[k].class0_fp_cdf) - AVERAGE_TILE_CDFS(nmvc.comps[k].fp_cdf) - } -#endif } void av1_average_tile_intra_cdfs(FRAME_CONTEXT *fc, FRAME_CONTEXT *ec_ctxs[], - aom_cdf_prob *cdf_ptr[], const int num_tiles) { + aom_cdf_prob *cdf_ptr[], int num_tiles) { int i, cdf_size; aom_cdf_prob *fc_cdf_ptr; @@ -6335,28 +5677,22 @@ void av1_average_tile_intra_cdfs(FRAME_CONTEXT *fc, FRAME_CONTEXT *ec_ctxs[], #if CONFIG_EXT_INTRA && CONFIG_INTRA_INTERP AVERAGE_TILE_CDFS(intra_filter_cdf) #endif // CONFIG_EXT_INTRA && CONFIG_INTRA_INTERP -#if CONFIG_FILTER_INTRA -#endif // CONFIG_FILTER_INTRA } void av1_average_tile_inter_cdfs(AV1_COMMON *cm, FRAME_CONTEXT *fc, FRAME_CONTEXT *ec_ctxs[], - aom_cdf_prob *cdf_ptr[], const int num_tiles) { + aom_cdf_prob *cdf_ptr[], int num_tiles) { int i, cdf_size; aom_cdf_prob *fc_cdf_ptr; -// FIXME: comp_inter_cdf not defined + // FIXME: comp_inter_cdf not defined -// FIXME: comp_ref_cdf and comp_bwd_ref not defined + // FIXME: comp_ref_cdf and comp_bwd_ref not defined -// FIXME: single_ref_cdf not defined + // FIXME: single_ref_cdf not defined -#if CONFIG_REF_MV -// FIXME: cdfs not defined for newmv_mode, zeromv_mode, drl_mode, new2mv_mode -#else - AVERAGE_TILE_CDFS(inter_mode_cdf) -#endif + // FIXME: cdfs not defined for newmv_mode, zeromv_mode, drl_mode, new2mv_mode // FIXME: cdfs not defined for motion_mode_prob, obmc_prob |