Commit 87aeeb85 authored by Thomas Davies's avatar Thomas Davies
Browse files

Use default CDF tables when initialising coef probs.

When creating the CDF head, do not use 8-bit probabilities
to make the CDF tables, but load them directly.

CDF tail values are created from the ONE_TOKEN relative
probability as before.

No change to BDR.

Change-Id: I7386b8952f6f69cc9b77aa1b2bee71cf8e3cc9ff
parent c21acce2
......@@ -9,14 +9,14 @@
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
#include "./aom_config.h"
#include "av1/common/entropy.h"
#include "./aom_config.h"
#include "aom/aom_integer.h"
#include "aom_mem/aom_mem.h"
#include "av1/common/blockd.h"
#include "av1/common/onyxc_int.h"
#include "av1/common/entropymode.h"
#include "av1/common/onyxc_int.h"
#include "av1/common/scan.h"
#include "aom_mem/aom_mem.h"
#include "aom/aom_integer.h"
// Unconstrained Node Tree
/* clang-format off */
......@@ -4642,7 +4642,664 @@ static const aom_prob av1_default_blockzero_probs[TX_SIZES][PLANE_TYPES]
},
},
};
#endif
static const coeff_cdf_model default_coef_head_cdf_4x4[PLANE_TYPES] = {
{ // Y plane
{ // Intra
{ // Band 0
{ 25024, 25863, 27361, 29796, 30374, 32768 },
{ 10816, 14127, 17116, 23516, 24999, 32768 },
{ 1088, 6358, 8428, 16648, 18276, 32768 } },
{ // Band 1
{ 1, 14529, 18769, 29100, 29634, 32768 },
{ 1, 12993, 17117, 28404, 28988, 32768 },
{ 1, 11201, 14084, 25818, 26504, 32768 },
{ 1, 9793, 11267, 21775, 22451, 32768 },
{ 1, 7105, 7562, 15777, 16225, 32768 },
{ 1, 3905, 3966, 8359, 8526, 32768 } },
{ // Band 2
{ 1, 20033, 23643, 31102, 31374, 32768 },
{ 1, 16321, 20350, 30167, 30546, 32768 },
{ 1, 12993, 15512, 26859, 27396, 32768 },
{ 1, 10305, 11659, 21669, 22330, 32768 },
{ 1, 7361, 7819, 15450, 15940, 32768 },
{ 1, 3521, 3580, 7805, 7976, 32768 } },
{ // Band 3
{ 1, 21057, 25460, 31740, 31952, 32768 },
{ 1, 16449, 21173, 30761, 31092, 32768 },
{ 1, 11841, 14615, 26188, 26824, 32768 },
{ 1, 7745, 8991, 18937, 19707, 32768 },
{ 1, 4417, 4706, 10342, 10890, 32768 },
{ 1, 7617, 8392, 17295, 17915, 32768 } },
{ // Band 4
{ 1, 20417, 26452, 32166, 32321, 32768 },
{ 1, 15809, 21634, 30947, 31298, 32768 },
{ 1, 10049, 12176, 23495, 24229, 32768 },
{ 1, 5953, 6731, 16166, 16798, 32768 },
{ 1, 6081, 6188, 8114, 8764, 32768 },
{ 1, 2113, 2291, 4448, 5527, 32768 } },
{ // Band 5
{ 1, 9153, 25905, 31431, 31934, 32768 },
{ 1, 9025, 23345, 30033, 30965, 32768 },
{ 1, 5953, 13835, 22032, 24664, 32768 },
{ 1, 6337, 11435, 18366, 21418, 32768 },
{ 1, 3137, 4871, 8519, 12426, 32768 },
{ 1, 1857, 2727, 5540, 8757, 32768 } } },
{ // Intra
{ // Band 0
{ 24512, 26673, 28962, 31929, 32126, 32768 },
{ 15936, 21711, 25569, 30899, 31305, 32768 },
{ 3264, 14756, 20107, 29407, 30032, 32768 } },
{ // Band 1
{ 1, 21313, 26020, 32523, 32575, 32768 },
{ 1, 18369, 24215, 32291, 32391, 32768 },
{ 1, 15297, 19637, 30414, 30752, 32768 },
{ 1, 11713, 14040, 25408, 26033, 32768 },
{ 1, 9537, 10173, 18839, 19315, 32768 },
{ 1, 9025, 9093, 13987, 14115, 32768 } },
{ // Band 2
{ 1, 22721, 27599, 32592, 32636, 32768 },
{ 1, 19009, 24676, 32258, 32367, 32768 },
{ 1, 12737, 16769, 28739, 29247, 32768 },
{ 1, 8769, 10956, 21941, 22840, 32768 },
{ 1, 6721, 7678, 15319, 16290, 32768 },
{ 1, 4417, 4430, 4583, 5712, 32768 } },
{ // Band 3
{ 1, 22849, 28333, 32633, 32671, 32768 },
{ 1, 18497, 24619, 32184, 32315, 32768 },
{ 1, 11841, 14640, 27251, 27752, 32768 },
{ 1, 8385, 10154, 18339, 19621, 32768 },
{ 1, 5697, 6977, 13787, 15289, 32768 },
{ 1, 193, 194, 384, 479, 32768 } },
{ // Band 4
{ 1, 20417, 28167, 32552, 32621, 32768 },
{ 1, 16833, 23968, 31991, 32174, 32768 },
{ 1, 10433, 13387, 26356, 26951, 32768 },
{ 1, 5057, 6823, 18967, 19843, 32768 },
{ 1, 5697, 6479, 11672, 13052, 32768 },
{ 1, 2241, 2265, 6355, 6432, 32768 } },
{ // Band 5
{ 1, 12097, 28717, 32406, 32555, 32768 },
{ 1, 10433, 26113, 31504, 31975, 32768 },
{ 1, 5825, 14284, 21349, 24461, 32768 },
{ 1, 4545, 8454, 12648, 17501, 32768 },
{ 1, 193, 7173, 15272, 19322, 32768 },
{ 1, 2113, 2183, 7202, 7377, 32768 } } } },
{ // UV plane
{ // Inter
{ // Band 0
{ 27456, 28244, 31289, 32358, 32534, 32768 },
{ 16960, 21207, 26511, 30539, 31190, 32768 },
{ 5440, 13412, 18469, 26423, 27669, 32768 } },
{ // Band 1
{ 1, 17857, 26327, 31983, 32219, 32768 },
{ 1, 16065, 24198, 31431, 31785, 32768 },
{ 1, 12865, 18011, 28454, 29166, 32768 },
{ 1, 9665, 12501, 24331, 25147, 32768 },
{ 1, 2753, 3121, 12661, 13034, 32768 },
{ 1, 4033, 4140, 11834, 11977, 32768 } },
{ // Band 2
{ 1, 21185, 28338, 32249, 32417, 32768 },
{ 1, 18497, 25227, 31905, 32122, 32768 },
{ 1, 12097, 16516, 28610, 29166, 32768 },
{ 1, 9281, 11157, 21438, 22312, 32768 },
{ 1, 5697, 6566, 15585, 16340, 32768 },
{ 1, 9409, 9659, 11827, 12911, 32768 } },
{ // Band 3
{ 1, 22337, 29459, 32382, 32519, 32768 },
{ 1, 16961, 25262, 31874, 32123, 32768 },
{ 1, 12353, 17748, 29300, 29852, 32768 },
{ 1, 9025, 11528, 24468, 25141, 32768 },
{ 1, 6209, 6565, 15806, 16121, 32768 },
{ 1, 2497, 2524, 7050, 7125, 32768 } },
{ // Band 4
{ 1, 20417, 29779, 32552, 32636, 32768 },
{ 1, 15553, 26420, 32063, 32295, 32768 },
{ 1, 9665, 17946, 29385, 30096, 32768 },
{ 1, 5569, 10207, 22410, 23836, 32768 },
{ 1, 16449, 16450, 16545, 16593, 32768 },
{ 1, 2369, 2395, 6822, 6898, 32768 } },
{ // Band 5
{ 1, 10177, 30567, 32725, 32745, 32768 },
{ 1, 9537, 28243, 32179, 32423, 32768 },
{ 1, 13377, 23187, 29322, 30382, 32768 },
{ 1, 13121, 21346, 29507, 30326, 32768 },
{ 1, 4417, 4939, 15104, 15535, 32768 },
{ 1, 2625, 2680, 8218, 8338, 32768 } } },
{ // Inter
{ // Band 0
{ 29376, 30098, 32421, 32766, 32767, 32768 },
{ 18368, 22916, 30116, 32541, 32650, 32768 },
{ 5952, 16505, 25955, 32163, 32365, 32768 } },
{ // Band 1
{ 1, 19649, 30160, 32743, 32753, 32768 },
{ 1, 18881, 28724, 32688, 32717, 32768 },
{ 1, 16833, 23053, 31244, 31573, 32768 },
{ 1, 14657, 17714, 26083, 26978, 32768 },
{ 1, 14657, 16618, 24597, 25403, 32768 },
{ 1, 4289, 4326, 10686, 10751, 32768 } },
{ // Band 2
{ 1, 21953, 30956, 32748, 32757, 32768 },
{ 1, 20929, 29412, 32700, 32725, 32768 },
{ 1, 13377, 21495, 31216, 31569, 32768 },
{ 1, 9153, 15097, 28295, 28990, 32768 },
{ 1, 5313, 5363, 13839, 13894, 32768 },
{ 1, 2625, 2652, 7276, 7351, 32768 } },
{ // Band 3
{ 1, 20289, 31164, 32745, 32755, 32768 },
{ 1, 17601, 29635, 32739, 32751, 32768 },
{ 1, 18241, 24284, 32116, 32258, 32768 },
{ 1, 32705, 32706, 32739, 32740, 32768 },
{ 1, 5697, 5750, 14739, 14792, 32768 },
{ 1, 2881, 2913, 8427, 8498, 32768 } },
{ // Band 4
{ 1, 19009, 31481, 32742, 32754, 32768 },
{ 1, 15809, 30521, 32736, 32750, 32768 },
{ 1, 16449, 32705, 32737, 32753, 32768 },
{ 1, 7873, 8039, 19981, 20068, 32768 },
{ 1, 5313, 5366, 14376, 14430, 32768 },
{ 1, 2753, 2789, 8909, 8979, 32768 } },
{ // Band 5
{ 1, 11841, 32116, 32728, 32748, 32768 },
{ 1, 12353, 32132, 32729, 32748, 32768 },
{ 1, 7489, 12435, 25708, 26666, 32768 },
{ 1, 5697, 7486, 20238, 21009, 32768 },
{ 1, 4929, 5579, 16402, 16866, 32768 },
{ 1, 3009, 3246, 10158, 10533, 32768 } } } }
};
static const coeff_cdf_model default_coef_head_cdf_8x8[PLANE_TYPES] = {
{ // Y plane
{ // Intra
{ // Band 0
{ 16064, 18127, 22153, 27289, 28507, 32768 },
{ 6720, 10545, 13491, 20948, 22631, 32768 },
{ 832, 5270, 5918, 12645, 13532, 32768 } },
{ // Band 1
{ 1, 14017, 16139, 26799, 27295, 32768 },
{ 1, 12737, 15136, 26235, 26816, 32768 },
{ 1, 10817, 12445, 23637, 24217, 32768 },
{ 1, 8897, 9702, 20040, 20500, 32768 },
{ 1, 5953, 6156, 13966, 14205, 32768 },
{ 1, 2497, 2519, 6222, 6300, 32768 } },
{ // Band 2
{ 1, 19777, 21403, 30054, 30269, 32768 },
{ 1, 16193, 17913, 28593, 28883, 32768 },
{ 1, 12609, 13572, 25248, 25534, 32768 },
{ 1, 9665, 10118, 20721, 20968, 32768 },
{ 1, 6849, 7028, 15202, 15391, 32768 },
{ 1, 3009, 3036, 7601, 7675, 32768 } },
{ // Band 3
{ 1, 22593, 23915, 31159, 31283, 32768 },
{ 1, 17345, 18690, 29425, 29611, 32768 },
{ 1, 11969, 12540, 24685, 24867, 32768 },
{ 1, 8129, 8355, 18668, 18819, 32768 },
{ 1, 4673, 4714, 11752, 11814, 32768 },
{ 1, 1857, 1876, 5057, 5138, 32768 } },
{ // Band 4
{ 1, 24513, 25718, 31947, 32014, 32768 },
{ 1, 18881, 20029, 30409, 30527, 32768 },
{ 1, 12481, 12953, 25201, 25341, 32768 },
{ 1, 8385, 8528, 18815, 18910, 32768 },
{ 1, 4289, 4327, 10797, 10861, 32768 },
{ 1, 1857, 1872, 4332, 4415, 32768 } },
{ // Band 5
{ 1, 26049, 27752, 32415, 32462, 32768 },
{ 1, 20417, 22100, 31056, 31192, 32768 },
{ 1, 12481, 13075, 24646, 24844, 32768 },
{ 1, 7489, 7696, 17117, 17285, 32768 },
{ 1, 3777, 3814, 10062, 10129, 32768 },
{ 1, 1473, 1486, 3735, 3820, 32768 } } },
{ // Intra
{ // Band 0
{ 25920, 27743, 29455, 32147, 32280, 32768 },
{ 13888, 19845, 23350, 30219, 30660, 32768 },
{ 2368, 12781, 16196, 27232, 27894, 32768 } },
{ // Band 1
{ 1, 21697, 24758, 32358, 32417, 32768 },
{ 1, 20289, 23960, 32111, 32213, 32768 },
{ 1, 17345, 19966, 30630, 30841, 32768 },
{ 1, 14529, 16070, 27461, 27777, 32768 },
{ 1, 9793, 10613, 21146, 21566, 32768 },
{ 1, 6977, 7162, 15591, 15776, 32768 } },
{ // Band 2
{ 1, 23617, 26783, 32572, 32607, 32768 },
{ 1, 20801, 24292, 32185, 32275, 32768 },
{ 1, 15169, 17905, 29916, 30181, 32768 },
{ 1, 10945, 12972, 25565, 26064, 32768 },
{ 1, 6849, 8334, 18543, 19446, 32768 },
{ 1, 3649, 4346, 12351, 13169, 32768 } },
{ // Band 3
{ 1, 25281, 28440, 32667, 32689, 32768 },
{ 1, 22081, 25694, 32414, 32476, 32768 },
{ 1, 15297, 18341, 30141, 30410, 32768 },
{ 1, 10305, 12381, 24477, 25084, 32768 },
{ 1, 5697, 6673, 16325, 17080, 32768 },
{ 1, 2369, 2393, 6466, 6543, 32768 } },
{ // Band 4
{ 1, 25921, 29445, 32729, 32739, 32768 },
{ 1, 22465, 26834, 32588, 32627, 32768 },
{ 1, 16449, 20062, 31016, 31233, 32768 },
{ 1, 11073, 13165, 25353, 25896, 32768 },
{ 1, 11713, 13837, 20144, 21734, 32768 },
{ 1, 2241, 2265, 6355, 6432, 32768 } },
{ // Band 5
{ 1, 26177, 29403, 32705, 32721, 32768 },
{ 1, 22337, 26344, 32545, 32589, 32768 },
{ 1, 19009, 21527, 31775, 31873, 32768 },
{ 1, 11585, 12685, 22632, 23137, 32768 },
{ 1, 8257, 8305, 16444, 16492, 32768 },
{ 1, 2113, 2183, 7202, 7377, 32768 } } } },
{ // UV plane
{ // Inter
{ // Band 0
{ 27200, 27981, 31389, 32444, 32592, 32768 },
{ 14528, 19068, 24887, 29901, 30688, 32768 },
{ 3776, 11778, 14700, 23745, 24854, 32768 } },
{ // Band 1
{ 1, 20289, 25202, 31672, 31909, 32768 },
{ 1, 18369, 23493, 31166, 31487, 32768 },
{ 1, 15425, 18619, 28941, 29393, 32768 },
{ 1, 10945, 12535, 24287, 24792, 32768 },
{ 1, 6465, 6810, 15764, 16080, 32768 },
{ 1, 2113, 2137, 6125, 6203, 32768 } },
{ // Band 2
{ 1, 23745, 27041, 31976, 32135, 32768 },
{ 1, 19521, 22766, 31139, 31367, 32768 },
{ 1, 14273, 15834, 27820, 28105, 32768 },
{ 1, 9537, 10445, 22106, 22491, 32768 },
{ 1, 7233, 7386, 15961, 16109, 32768 },
{ 1, 2369, 2401, 7891, 7964, 32768 } },
{ // Band 3
{ 1, 26305, 28703, 32352, 32435, 32768 },
{ 1, 20673, 23490, 31517, 31680, 32768 },
{ 1, 14017, 15251, 27458, 27702, 32768 },
{ 1, 10945, 11374, 22496, 22687, 32768 },
{ 1, 9153, 9435, 22299, 22411, 32768 },
{ 1, 193, 269, 13236, 13293, 32768 } },
{ // Band 4
{ 1, 27713, 29770, 32522, 32575, 32768 },
{ 1, 21569, 24342, 31785, 31919, 32768 },
{ 1, 15297, 16497, 28367, 28569, 32768 },
{ 1, 17601, 17828, 24444, 24582, 32768 },
{ 1, 6977, 7035, 16901, 16947, 32768 },
{ 1, 193, 384, 32706, 32707, 32768 } },
{ // Band 5
{ 1, 28737, 30879, 32667, 32695, 32768 },
{ 1, 22593, 26241, 32073, 32207, 32768 },
{ 1, 16577, 19148, 28436, 28906, 32768 },
{ 1, 12993, 14005, 23151, 23630, 32768 },
{ 1, 7617, 9188, 22797, 23313, 32768 },
{ 1, 2625, 2680, 8218, 8338, 32768 } } },
{ // Inter
{ // Band 0
{ 28864, 29988, 32423, 32766, 32767, 32768 },
{ 18496, 24572, 30167, 32687, 32737, 32768 },
{ 5440, 19618, 25332, 32393, 32491, 32768 } },
{ // Band 1
{ 1, 23745, 29427, 32751, 32757, 32768 },
{ 1, 23745, 28704, 32716, 32731, 32768 },
{ 1, 23105, 27943, 32524, 32587, 32768 },
{ 1, 21057, 24773, 29589, 30282, 32768 },
{ 1, 12609, 14823, 23831, 24713, 32768 },
{ 1, 16449, 16450, 16545, 16593, 32768 } },
{ // Band 2
{ 1, 25025, 30203, 32754, 32759, 32768 },
{ 1, 23617, 28361, 32715, 32729, 32768 },
{ 1, 17985, 21562, 31354, 31543, 32768 },
{ 1, 12353, 18915, 28742, 29548, 32768 },
{ 1, 193, 289, 16545, 16593, 32768 },
{ 1, 2625, 2652, 7276, 7351, 32768 } },
{ // Band 3
{ 1, 26433, 30892, 32757, 32761, 32768 },
{ 1, 24513, 29274, 32721, 32735, 32768 },
{ 1, 20161, 24040, 32055, 32171, 32768 },
{ 1, 21953, 24678, 27382, 28734, 32768 },
{ 1, 5697, 5750, 14739, 14792, 32768 },
{ 1, 2881, 2913, 8427, 8498, 32768 } },
{ // Band 4
{ 1, 27457, 31485, 32759, 32763, 32768 },
{ 1, 24129, 29502, 32752, 32757, 32768 },
{ 1, 19009, 25452, 32473, 32544, 32768 },
{ 1, 32705, 32706, 32737, 32738, 32768 },
{ 1, 5313, 5366, 14376, 14430, 32768 },
{ 1, 2753, 2789, 8909, 8979, 32768 } },
{ // Band 5
{ 1, 27841, 32288, 32759, 32764, 32768 },
{ 1, 19137, 30271, 32742, 32753, 32768 },
{ 1, 18625, 27739, 29979, 31099, 32768 },
{ 1, 5697, 7486, 20238, 21009, 32768 },
{ 1, 4929, 5579, 16402, 16866, 32768 },
{ 1, 3009, 3246, 10158, 10533, 32768 } } } }
};
static const coeff_cdf_model default_coef_head_cdf_16x16[PLANE_TYPES] = {
{ // Y plane
{ // Intra
{ // Band 0
{ 960, 4882, 9467, 17710, 20412, 32768 },
{ 704, 4657, 6561, 14507, 16279, 32768 },
{ 192, 3443, 3759, 9011, 9685, 32768 } },
{ // Band 1
{ 1, 12481, 13958, 24487, 24997, 32768 },
{ 1, 11457, 13075, 23820, 24406, 32768 },
{ 1, 9793, 11127, 21775, 22387, 32768 },
{ 1, 7745, 8457, 18155, 18655, 32768 },
{ 1, 5441, 5668, 13180, 13467, 32768 },
{ 1, 2497, 2520, 6340, 6417, 32768 } },
{ // Band 2
{ 1, 19521, 20572, 28965, 29177, 32768 },
{ 1, 15425, 16741, 27247, 27554, 32768 },
{ 1, 11969, 12690, 23872, 24141, 32768 },
{ 1, 9281, 9678, 19970, 20207, 32768 },
{ 1, 6081, 6266, 14682, 14876, 32768 },
{ 1, 2753, 2779, 7150, 7225, 32768 } },
{ // Band 3
{ 1, 22337, 23293, 30630, 30753, 32768 },
{ 1, 16321, 17427, 28368, 28570, 32768 },
{ 1, 11457, 11907, 23570, 23741, 32768 },
{ 1, 7233, 7331, 17258, 17334, 32768 },
{ 1, 4033, 4070, 10375, 10441, 32768 },
{ 1, 1601, 1619, 4706, 4788, 32768 } },
{ // Band 4
{ 1, 24769, 25536, 31660, 31722, 32768 },
{ 1, 18113, 18886, 29420, 29534, 32768 },
{ 1, 11201, 11412, 23207, 23291, 32768 },
{ 1, 6977, 7033, 16599, 16646, 32768 },
{ 1, 4033, 4070, 10375, 10441, 32768 },
{ 1, 1601, 1620, 4827, 4909, 32768 } },
{ // Band 5
{ 1, 28353, 28831, 32502, 32517, 32768 },
{ 1, 21441, 21869, 30977, 31017, 32768 },
{ 1, 11969, 12088, 24116, 24158, 32768 },
{ 1, 7489, 7547, 17413, 17458, 32768 },
{ 1, 4545, 4585, 11325, 11388, 32768 },
{ 1, 2113, 2133, 5526, 5606, 32768 } } },
{ // Intra
{ // Band 0
{ 2496, 8717, 17280, 28922, 29751, 32768 },
{ 2496, 9665, 15235, 26542, 27580, 32768 },
{ 448, 9240, 11886, 24124, 24898, 32768 } },
{ // Band 1
{ 1, 21057, 22896, 31877, 31953, 32768 },
{ 1, 20673, 23151, 31706, 31825, 32768 },
{ 1, 18753, 20519, 30497, 30668, 32768 },
{ 1, 15425, 16608, 27789, 28027, 32768 },
{ 1, 10305, 10977, 21405, 21749, 32768 },
{ 1, 3649, 3812, 11213, 11445, 32768 } },
{ // Band 2
{ 1, 24001, 25899, 32307, 32360, 32768 },
{ 1, 20929, 22941, 31775, 31867, 32768 },
{ 1, 15169, 16734, 29228, 29425, 32768 },
{ 1, 10561, 12047, 24918, 25324, 32768 },
{ 1, 6977, 7929, 18311, 18918, 32768 },
{ 1, 3649, 3760, 9962, 10162, 32768 } },
{ // Band 3
{ 1, 25793, 27526, 32565, 32591, 32768 },
{ 1, 21825, 23885, 32064, 32135, 32768 },
{ 1, 15041, 16286, 29203, 29360, 32768 },
{ 1, 10433, 11058, 24349, 24538, 32768 },
{ 1, 5569, 6016, 16460, 16794, 32768 },
{ 1, 193, 194, 384, 479, 32768 } },
{ // Band 4
{ 1, 26433, 28398, 32682, 32696, 32768 },
{ 1, 22977, 25086, 32367, 32412, 32768 },
{ 1, 16577, 17928, 30144, 30275, 32768 },
{ 1, 12481, 13352, 25993, 26211, 32768 },
{ 1, 7745, 8069, 20501, 20657, 32768 },
{ 1, 16449, 16450, 16545, 16593, 32768 } },
{ // Band 5
{ 1, 27841, 29700, 32721, 32730, 32768 },
{ 1, 23873, 26202, 32578, 32604, 32768 },
{ 1, 17729, 19046, 30448, 30568, 32768 },
{ 1, 13505, 14508, 26034, 26304, 32768 },
{ 1, 10049, 10494, 19945, 20233, 32768 },
{ 1, 2113, 2183, 7202, 7377, 32768 } } } },
{ // UV plane
{ // Inter
{ // Band 0
{ 27072, 27916, 31095, 32400, 32553, 32768 },
{ 12352, 16792, 22516, 28853, 29797, 32768 },
{ 2880, 9023, 11126, 20602, 21713, 32768 } },
{ // Band 1
{ 1, 20161, 24785, 31070, 31430, 32768 },
{ 1, 17985, 22773, 30430, 30880, 32768 },
{ 1, 15937, 18802, 28265, 28788, 32768 },
{ 1, 11841, 13587, 24798, 25335, 32768 },
{ 1, 8769, 9160, 19316, 19566, 32768 },
{ 1, 5313, 5357, 12874, 12932, 32768 } },
{ // Band 2
{ 1, 24129, 26501, 31672, 31844, 32768 },
{ 1, 19649, 21553, 30130, 30370, 32768 },
{ 1, 11713, 13134, 25983, 26321, 32768 },
{ 1, 9409, 9948, 21408, 21663, 32768 },
{ 1, 5569, 5757, 14335, 14533, 32768 },
{ 1, 2241, 2305, 13152, 13209, 32768 } },
{ // Band 3
{ 1, 26817, 28135, 32130, 32209, 32768 },
{ 1, 20161, 21412, 30331, 30481, 32768 },
{ 1, 13377, 13798, 26065, 26176, 32768 },
{ 1, 8129, 8290, 19920, 20008, 32768 },
{ 1, 5697, 5751, 14950, 15002, 32768 },
{ 1, 5569, 5601, 11041, 11105, 32768 } },
{ // Band 4
{ 1, 28225, 29079, 32387, 32426, 32768 },
{ 1, 21185, 22046, 30982, 31061, 32768 },
{ 1, 13377, 13595, 25762, 25824, 32768 },
{ 1, 8001, 8123, 20530, 20590, 32768 },
{ 1, 4289, 4322, 9907, 9974, 32768 },
{ 1, 3393, 3412, 6663, 6739, 32768 } },
{ // Band 5
{ 1, 30529, 31014, 32651, 32664, 32768 },
{ 1, 23489, 24268, 31627, 31682, 32768 },
{ 1, 14017, 14239, 26653, 26707, 32768 },
{ 1, 11201, 11317, 23122, 23169, 32768 },
{ 1, 6721, 6768, 14810, 14863, 32768 },
{ 1, 6593, 6632, 13188, 13245, 32768 } } },
{ // Inter
{ // Band 0
{ 29888, 30492, 32500, 32766, 32767, 32768 },
{ 18752, 23235, 29846, 32214, 32442, 32768 },
{ 5568, 17762, 25039, 31213, 31651, 32768 } },
{ // Band 1
{ 1, 26433, 29681, 32757, 32760, 32768 },
{ 1, 24769, 28761, 32722, 32734, 32768 },
{ 1, 22209, 26975, 32418, 32500, 32768 },
{ 1, 16321, 21333, 28368, 29283, 32768 },
{ 1, 12865, 14775, 22545, 23553, 32768 },
{ 1, 12353, 12354, 12473, 12532, 32768 } },
{ // Band 2
{ 1, 27457, 30005, 32738, 32745, 32768 },
{ 1, 24897, 27541, 32723, 32731, 32768 },
{ 1, 15297, 19106, 30414, 30711, 32768 },
{ 1, 6593, 8826, 19732, 20840, 32768 },
{ 1, 4161, 4233, 16509, 16557, 32768 },
{ 1, 2625, 2652, 7276, 7351, 32768 } },
{ // Band 3
{ 1, 28609, 30482, 32761, 32763, 32768 },
{ 1, 25665, 27830, 32727, 32733, 32768 },
{ 1, 21057, 23803, 30367, 30721, 32768 },
{ 1, 10945, 21878, 32726, 32737, 32768 },
{ 1, 5697, 5750, 14739, 14792, 32768 },
{ 1, 2881, 2913, 8427, 8498, 32768 } },
{ // Band 4
{ 1, 28993, 30944, 32762, 32764, 32768 },
{ 1, 26561, 28695, 32733, 32739, 32768 },
{ 1, 17985, 19028, 31008, 31079, 32768 },
{ 1, 7873, 8039, 19981, 20068, 32768 },
{ 1, 5313, 5366, 14376, 14430, 32768 },
{ 1, 2753, 2789, 8909, 8979, 32768 } },
{ // Band 5
{ 1, 30273, 32029, 32764, 32766, 32768 },
{ 1, 28609, 30847, 32745, 32751, 32768 },
{ 1, 21313, 24377, 31986, 32098, 32768 },
{ 1, 32705, 32709, 32739, 32741, 32768 },
{ 1, 4929, 5579, 16402, 16866, 32768 },
{ 1, 3009, 3246, 10158, 10533, 32768 } } } }
};
static const coeff_cdf_model default_coef_head_cdf_32x32[PLANE_TYPES] = {
{ // Y plane
{ // Intra
{ // Band 0
{ 2240, 5407, 18304, 25601, 27911, 32768 },
{ 960, 4633, 8197, 16254, 18796, 32768 },
{ 192, 3061, 3557, 8701, 9762, 32768 } },
{ // Band 1
{ 1, 11969, 15846, 25660, 26667, 32768 },
{ 1, 11713, 15794, 25737, 26760, 32768 },
{ 1, 9281, 12675, 23181, 24351, 32768 },
{ 1, 7105, 8757, 18383, 19437, 32768 },
{ 1, 4289, 4579, 11353, 11792, 32768 },
{ 1, 1857, 1874, 4695, 4777, 32768 } },
{ // Band 2
{ 1, 20929, 22297, 29370, 29646, 32768 },
{ 1, 17473, 18985, 28079, 28413, 32768 },
{ 1, 13121, 14064, 24902, 25217, 32768 },
{ 1, 9793, 10214, 20069, 20329, 32768 },
{ 1, 5825, 5987, 13350, 13559, 32768 },
{ 1, 2241, 2260, 5520, 5600, 32768 } },
{ // Band 3
{ 1, 25921, 26891, 31632, 31729, 32768 },
{ 1, 18241, 19463, 29222, 29419, 32768 },
{ 1, 11585, 12065, 23294, 23488, 32768 },
{ 1, 6593, 6686, 16153, 16234, 32768 },
{ 1, 3137, 3170, 8751, 8821, 32768 },
{ 1, 1345, 1359, 3739, 3824, 32768 } },
{ // Band 4
{ 1, 27713, 28504, 32068, 32132, 32768 },
{ 1, 19265, 20354, 29789, 29943, 32768 },
{ 1, 11201, 11538, 22701, 22848, 32768 },
{ 1, 6337, 6424, 15268, 15353, 32768 },
{ 1, 3649, 3681, 9052, 9121, 32768 },
{ 1, 1601, 1618, 4584, 4667, 32768 } },
{ // Band 5
{ 1, 30913, 31044, 32635, 32640, 32768 },
{ 1, 22081, 22261, 30452, 30477, 32768 },
{ 1, 10561, 10625, 21535, 21568, 32768 },
{ 1, 6081, 6130, 14369, 14423, 32768 },
{ 1, 3777, 3809, 9156, 9225, 32768 },
{ 1, 1857, 1875, 4936, 5018, 32768 } } },
{ // Intra
{ // Band 0
{ 4672, 6927, 23534, 29846, 30928, 32768 },
{ 3776, 6784, 18075, 25863, 27926, 32768 },
{ 1344, 5588, 12166, 20966, 23504, 32768 } },
{ // Band 1
{ 1, 19393, 22016, 31280, 31444, 32768 },
{ 1, 21185, 24329, 31706, 31865, 32768 },
{ 1, 20673, 23240, 31186, 31379, 32768 },
{ 1, 17857, 20035, 29594, 29889, 32768 },
{ 1, 13633, 14929, 24883, 25337, 32768 },
{ 1, 7873, 8416, 17452, 17886, 32768 } },
{ // Band 2
{ 1, 25665, 27145, 32256, 32314, 32768 },
{ 1, 21057, 22826, 31465, 31576, 32768 },
{ 1, 13633, 14885, 27873, 28088, 32768 },
{ 1, 8769, 9515, 21941, 22248, 32768 },
{ 1, 6209, 6594, 15598, 15950, 32768 },
{ 1, 1985, 2014, 6855, 6931, 32768 } },
{ // Band 3
{ 1, 26817, 27824, 32362, 32399, 32768 },
{ 1, 21185, 22321, 31389, 31466, 32768 },
{ 1, 13761, 14154, 27163, 27245, 32768 },
{ 1, 8897, 9011, 20600, 20659, 32768 },
{ 1, 4673, 4774, 15044, 15131, 32768 },
{ 1, 193, 194, 384, 479, 32768 } },
{ // Band 4
{ 1, 28865, 29687, 32655, 32667, 32768 },
{ 1, 23233, 24218, 32080, 32118, 32768 },
{ 1, 15041, 15444, 28787, 28845, 32768 },
{ 1, 9921, 10248, 22818, 22944, 32768 },
{ 1, 7745, 7866, 16591, 16702, 32768 },
{ 1, 193, 194, 384, 479, 32768 } },
{ // Band 5
{ 1, 31169, 31559, 32741, 32744, 32768 },
{ 1, 24769, 25583, 32347, 32370, 32768 },
{ 1, 15937, 16169, 29120, 29152, 32768 },
{ 1, 7489, 7578, 22647, 22677, 32768 },
{ 1, 7617, 7689, 19849, 19887, 32768 },
{ 1, 2113, 2183, 7202, 7377, 32768 } } } },
{ // UV plane
{ // Inter
{ // Band 0
{ 23232, 24301, 30231, 31582, 32091, 32768 },
{ 7872, 11041, 22542, 27086, 29145, 32768 },
{ 1344, 3989, 18125, 25340, 27820, 32768 } },
{ // Band 1
{ 1, 15937, 29000, 32210, 32434, 32768 },
{ 1, 12353, 26626, 31533, 31993, 32768 },
{ 1, 11457, 29187, 30896, 31750, 32768 },
{ 1, 5697, 21278, 28169, 29764, 32768 },
{ 1, 7489, 8855, 13365, 15620, 32768 },
{ 1, 4289, 4833, 8572, 10108, 32768 } },
{ // Band 2
{ 1, 25025, 30783, 32603, 32666, 32768 },
{ 1, 24385, 29586, 31803, 32142, 32768 },
{ 1, 22337, 23002, 27573, 27903, 32768 },
{ 1, 10945, 12336, 21900, 22590, 32768 },
{ 1, 8257, 8830, 19986, 20298, 32768 },
{ 1, 10945, 10990, 18660, 18701, 32768 } },
{ // Band 3
{ 1, 29761, 31473, 32693, 32715, 32768 },
{ 1, 20417, 24512, 31394, 31650, 32768 },
{ 1, 11713, 13283, 25819, 26206, 32768 },
{ 1, 13121, 14099, 21909, 22514, 32768 },
{ 1, 193, 248, 9546, 9614, 32768 },
{ 1, 2497, 2524, 7050, 7125, 32768 } },
{ // Band 4
{ 1, 30657, 31885, 32691, 32715, 32768 },
{ 1, 19393, 26050, 31698, 31988, 32768 },
{ 1, 15809, 15863, 24985, 25008, 32768 },
{ 1, 23489, 28138, 32751, 32756, 32768 },
{ 1, 16449, 16450, 16545, 16593, 32768 },
{ 1, 2369, 2395, 6822, 6898, 32768 } },
{ // Band 5
{ 1, 32705, 32744, 32766, 32767, 32768 },
{ 1, 21953, 24962, 32156, 32246, 32768 },
{ 1, 13121, 15358, 26284, 26835, 32768 },
{ 1, 5697, 7417, 20132, 20885, 32768 },
{ 1, 4417, 4939, 15104, 15535, 32768 },
{ 1, 2625, 2680, 8218, 8338, 32768 } } },
{ // Inter
{ // Band 0
{ 25280, 25678, 32446, 32622, 32724, 32768 },
{ 10560, 11822, 28682, 29919, 31276, 32768 },
{ 3264, 5170, 21779, 24026, 27905, 32768 } },
{ // Band 1
{ 1, 24257, 30554, 32719, 32738, 32768 },
{ 1, 17217, 27413, 32617, 32667, 32768 },
{ 1, 22977, 27600, 32482, 32552, 32768 },
{ 1, 16833, 24360, 30746, 31293, 32768 },