entropymode.c 159 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
 */

Yaowu Xu's avatar
Yaowu Xu committed
12
#include "aom_mem/aom_mem.h"
Jingning Han's avatar
Jingning Han committed
13

14
#include "av1/common/reconinter.h"
Angie Chiang's avatar
Angie Chiang committed
15
#include "av1/common/scan.h"
16 17
#include "av1/common/onyxc_int.h"
#include "av1/common/seg_common.h"
18 19 20
#if CONFIG_LV_MAP
#include "av1/common/txb_common.h"
#endif
Jingning Han's avatar
Jingning Han committed
21

22
#if CONFIG_LV_MAP
23
#include "av1/common/txb_common.h"
24
const aom_prob default_txb_skip[TX_SIZES][TXB_SKIP_CONTEXTS] = {
Jingning Han's avatar
Jingning Han committed
25 26 27 28
  { 255, 86, 115, 175, 148, 203, 249, 35, 126, 219, 14, 79, 185 },
  { 255, 76, 109, 162, 150, 201, 244, 26, 118, 218, 12, 72, 187 },
  { 253, 78, 124, 165, 170, 211, 245, 34, 135, 223, 15, 98, 212 },
  { 243, 46, 143, 173, 205, 226, 250, 52, 182, 240, 15, 100, 220 },
29
#if CONFIG_TX64X64
Jingning Han's avatar
Jingning Han committed
30
  { 243, 46, 143, 173, 205, 226, 250, 52, 182, 240, 15, 100, 220 },
31
#endif
32 33 34 35 36
};
const aom_prob default_dc_sign[PLANE_TYPES][DC_SIGN_CONTEXTS] = {
  { 125, 102, 147 }, { 119, 101, 135 },
};

37
#if CONFIG_LV_MAP_MULTI || TRAIN_INIT_PROB
38 39
const aom_prob default_coeff_base
    [TX_SIZES][PLANE_TYPES][NUM_BASE_LEVELS][COEFF_BASE_CONTEXTS] = {
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89
      { { { 109, 233, 200, 134, 86,  51,  240, 211, 142, 91,  60,  128,
            128, 128, 128, 128, 128, 128, 128, 128, 128, 233, 208, 116,
            74,  58,  227, 200, 121, 58,  28,  241, 203, 122, 68,  41,
            238, 204, 116, 56,  128, 128, 207, 247, 248, 248 },
          { 108, 226, 198, 145, 100, 58,  224, 205, 153, 107, 69,  128,
            128, 128, 128, 128, 128, 128, 128, 128, 128, 205, 196, 130,
            93,  66,  199, 183, 126, 76,  35,  216, 186, 129, 81,  53,
            202, 185, 124, 79,  128, 128, 205, 234, 229, 216 } },
        { { 162, 242, 224, 173, 108, 56,  248, 237, 200, 130, 75,  128,
            128, 128, 128, 128, 128, 128, 128, 128, 128, 249, 244, 214,
            125, 64,  128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
            128, 128, 128, 128, 128, 128, 229, 249, 253, 254 },
          { 153, 231, 212, 164, 112, 66,  233, 221, 179, 125, 88,  128,
            128, 128, 128, 128, 128, 128, 128, 128, 128, 241, 235, 200,
            110, 192, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
            128, 128, 128, 128, 128, 128, 213, 240, 244, 248 } } },
      { { { 87,  227, 194, 132, 87,  47,  242, 213, 156, 106, 61,  240,
            201, 138, 90,  52,  237, 200, 136, 89,  51,  248, 228, 173,
            118, 73,  232, 202, 139, 78,  35,  245, 220, 166, 108, 58,
            247, 220, 150, 95,  58,  128, 200, 251, 253, 252 },
          { 82,  196, 182, 137, 97,  53,  229, 208, 164, 119, 70,  219,
            194, 144, 101, 58,  220, 194, 143, 99,  57,  233, 218, 183,
            140, 88,  214, 190, 138, 91,  43,  223, 200, 157, 112, 64,
            217, 199, 149, 105, 67,  128, 197, 237, 239, 233 } },
        { { 138, 234, 211, 157, 108, 66,  247, 231, 185, 129, 77,  246,
            227, 173, 108, 56,  237, 213, 162, 118, 76,  253, 246, 216,
            159, 87,  128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
            128, 128, 128, 128, 128, 128, 228, 250, 253, 255 },
          { 128, 192, 200, 161, 121, 75,  236, 222, 184, 137, 85,  221,
            211, 164, 103, 63,  221, 206, 167, 132, 84,  244, 232, 205,
            159, 104, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
            128, 128, 128, 128, 128, 128, 204, 230, 245, 247 } } },
      { { { 75,  226, 186, 123, 79,  38,  241, 206, 146, 97,  53,  244,
            209, 146, 96,  51,  242, 208, 145, 92,  43,  252, 236, 190,
            135, 82,  228, 193, 125, 70,  30,  243, 219, 169, 110, 49,
            251, 234, 180, 114, 61,  128, 191, 252, 255, 255 },
          { 69,  201, 172, 126, 86,  41,  222, 195, 151, 107, 57,  213,
            196, 149, 105, 56,  218, 195, 147, 100, 46,  235, 222, 189,
            148, 92,  206, 183, 126, 79,  35,  209, 194, 158, 110, 53,
            231, 209, 167, 120, 68,  128, 194, 233, 240, 240 } },
        { { 114, 226, 196, 145, 107, 66,  246, 225, 176, 128, 80,  245,
            217, 161, 105, 61,  247, 225, 179, 130, 83,  253, 241, 202,
            150, 96,  128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
            128, 128, 128, 128, 128, 128, 221, 252, 255, 255 },
          { 102, 185, 164, 140, 112, 69,  229, 218, 183, 142, 86,  197,
            194, 154, 114, 73,  229, 213, 180, 144, 90,  243, 229, 203,
            164, 111, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
            128, 128, 128, 128, 128, 128, 184, 222, 224, 246 } } },
      { { { 69,  212, 170, 112, 74,  32,  238, 199, 137, 90,  43,  241,
            208, 145, 97,  51,  244, 213, 156, 106, 50,  252, 233, 183,
90
            132, 74,  128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
91 92 93 94 95 96
            128, 128, 128, 128, 128, 128, 209, 251, 254, 255 },
          { 65,  187, 151, 114, 78,  33,  217, 186, 140, 99,  46,  203,
            185, 147, 105, 53,  215, 200, 162, 116, 54,  234, 215, 181,
            140, 79,  128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
            128, 128, 128, 128, 128, 128, 207, 222, 245, 244 } },
        { { 79,  216, 181, 139, 106, 60,  236, 208, 166, 127, 91,  128,
97 98 99 100 101 102
            128, 128, 128, 128, 128, 128, 128, 128, 128, 253, 240, 205,
            158, 111, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
            128, 128, 128, 128, 128, 128, 205, 250, 255, 254 },
          { 66,  175, 129, 103, 89,  57,  204, 189, 164, 133, 106, 128,
            128, 128, 128, 128, 128, 128, 128, 128, 128, 238, 228, 202,
            166, 124, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121
            128, 128, 128, 128, 128, 128, 154, 207, 128, 226 } } },
#if CONFIG_TX64X64
      { { { 72,  212, 172, 113, 74,  33,  238, 200, 139, 91,  44,  240,
            208, 147, 98,  51,  244, 214, 157, 107, 51,  253, 233, 184,
            132, 74,  128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
            128, 128, 128, 128, 128, 128, 201, 250, 254, 255 },
          { 68,  187, 154, 116, 80,  34,  217, 186, 142, 101, 47,  205,
            187, 148, 106, 56,  218, 201, 163, 118, 55,  236, 215, 181,
            141, 79,  128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
            128, 128, 128, 128, 128, 128, 192, 219, 246, 244 } },
        { { 80,  217, 179, 140, 106, 60,  237, 208, 165, 129, 94,  128,
            128, 128, 128, 128, 128, 128, 128, 128, 128, 253, 240, 205,
            158, 111, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
            128, 128, 128, 128, 128, 128, 205, 250, 255, 254 },
          { 66,  175, 129, 103, 89,  57,  204, 189, 164, 133, 106, 128,
            128, 128, 128, 128, 128, 128, 128, 128, 128, 238, 228, 202,
            166, 124, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
            128, 128, 128, 128, 128, 128, 154, 207, 128, 226 } } },
#endif
122 123 124
    };

const aom_prob default_nz_map[TX_SIZES][PLANE_TYPES][SIG_COEF_CONTEXTS] = {
125 126 127 128 129 130 131
  { { 59,  183, 130, 75,  46,  27,  203, 154, 83,  52,  34,  128,
      128, 128, 128, 128, 128, 128, 128, 128, 128, 202, 165, 81,
      67,  39,  184, 132, 70,  27,  12,  213, 158, 76,  32,  21,
      222, 171, 73,  28,  128, 128, 1,   1,   1,   1 },
    { 97,  210, 172, 111, 60,  28,  223, 188, 130, 74,  32,  128,
      128, 128, 128, 128, 128, 128, 128, 128, 128, 214, 191, 139,
      56,  64,  128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
132
      128, 128, 128, 128, 128, 128, 1,   1,   1,   1 } },
133 134 135 136 137 138 139
  { { 49,  193, 128, 72,  45,  24,  207, 149, 88,  54,  31,  206,
      141, 79,  49,  27,  191, 136, 78,  47,  26,  223, 179, 108,
      65,  37,  206, 137, 81,  39,  17,  228, 169, 106, 56,  29,
      232, 178, 95,  47,  28,  128, 1,   1,   1,   1 },
    { 85,  209, 158, 90,  56,  32,  223, 182, 115, 67,  37,  228,
      181, 112, 58,  26,  218, 162, 97,  62,  40,  237, 208, 147,
      88,  47,  128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
140
      128, 128, 128, 128, 128, 128, 1,   1,   1,   1 } },
141 142 143
  { { 42,  189, 120, 65,  40,  19,  212, 143, 80,  49,  26,  226,
      150, 82,  48,  25,  213, 146, 82,  46,  22,  237, 191, 117,
      68,  39,  204, 126, 69,  35,  15,  227, 168, 105, 58,  25,
144
      236, 195, 117, 59,  30,  128, 1,   1,   1,   1 },
145 146
    { 69,  207, 145, 81,  54,  33,  225, 166, 99,  62,  38,  237,
      173, 94,  54,  34,  228, 169, 103, 67,  41,  243, 201, 124,
147
      77,  48,  128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
148
      128, 128, 128, 128, 128, 128, 1,   1,   1,   1 } },
149 150
  { { 38,  174, 105, 57,  37,  16,  213, 134, 72,  44,  21,  235,
      144, 79,  48,  25,  227, 148, 83,  52,  24,  247, 195, 107,
151
      65,  35,  128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
152
      128, 128, 128, 128, 128, 128, 1,   1,   1,   1 },
153 154 155
    { 44,  206, 151, 90,  60,  30,  214, 148, 92,  62,  40,  128,
      128, 128, 128, 128, 128, 128, 128, 128, 128, 248, 197, 125,
      80,  52,  128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
156 157 158 159 160 161 162 163 164 165 166
      128, 128, 128, 128, 128, 128, 1,   1,   1,   1 } },
#if CONFIG_TX64X64
  { { 39,  175, 107, 58,  38,  16,  214, 135, 73,  44,  21,  235,
      145, 80,  48,  26,  227, 149, 84,  52,  25,  247, 195, 108,
      65,  35,  128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
      128, 128, 128, 128, 128, 128, 1,   1,   1,   1 },
    { 44,  206, 151, 90,  60,  30,  214, 148, 92,  62,  40,  128,
      128, 128, 128, 128, 128, 128, 128, 128, 128, 248, 197, 125,
      80,  52,  128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
      128, 128, 128, 128, 128, 128, 1,   1,   1,   1 } },
#endif
167 168
};
#else  // CONFIG_LV_MAP_MULTI
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
const aom_prob default_coeff_base
    [TX_SIZES][PLANE_TYPES][NUM_BASE_LEVELS][COEFF_BASE_CONTEXTS] = {
      { { { 139, 242, 199, 135, 87,  51,  245, 208, 138, 89,  60,
            128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 240,
            200, 108, 70,  56,  230, 199, 126, 66,  32,  242, 204,
            128, 74,  45,  241, 203, 120, 62,  128, 128 },
          { 118, 230, 197, 147, 103, 60,  228, 202, 154, 110, 72,
            128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 213,
            196, 134, 94,  58,  199, 184, 130, 82,  40,  217, 186,
            134, 86,  57,  204, 185, 127, 74,  128, 128 } },
        { { 203, 248, 223, 170, 105, 58,  252, 235, 195, 125, 72,
            128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 253,
            244, 209, 110, 85,  128, 128, 128, 128, 128, 128, 128,
            128, 128, 128, 128, 128, 128, 128, 128, 128 },
          { 170, 239, 210, 163, 112, 68,  239, 219, 175, 127, 84,
            128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 246,
            234, 184, 142, 154, 128, 128, 128, 128, 128, 128, 128,
            128, 128, 128, 128, 128, 128, 128, 128, 128 } } },
      { { { 119, 240, 196, 136, 90,  50,  247, 214, 159, 109, 64,
            241, 201, 137, 91,  53,  239, 199, 136, 89,  52,  251,
            230, 176, 121, 76,  231, 202, 142, 84,  39,  246, 221,
            169, 111, 61,  248, 221, 152, 97,  60,  128 },
          { 98,  209, 182, 140, 100, 56,  234, 207, 166, 122, 73,
            215, 189, 142, 103, 59,  216, 188, 140, 99,  59,  235,
            216, 179, 137, 88,  214, 189, 141, 96,  46,  224, 200,
            159, 117, 68,  221, 199, 152, 108, 68,  128 } },
        { { 195, 245, 212, 159, 108, 64,  251, 231, 186, 131, 80,
            250, 228, 175, 108, 58,  244, 213, 163, 120, 82,  254,
            245, 216, 159, 91,  128, 128, 128, 128, 128, 128, 128,
            128, 128, 128, 128, 128, 128, 128, 128, 128 },
          { 150, 207, 199, 164, 121, 76,  239, 221, 185, 142, 89,
            231, 208, 162, 113, 69,  228, 205, 169, 136, 95,  246,
            235, 204, 157, 110, 128, 128, 128, 128, 128, 128, 128,
            128, 128, 128, 128, 128, 128, 128, 128, 128 } } },
      { { { 93,  232, 185, 124, 81,  38,  244, 206, 147, 98,  53,
            246, 210, 150, 100, 54,  244, 208, 146, 94,  44,  253,
            236, 189, 135, 82,  228, 195, 130, 76,  35,  242, 220,
            170, 114, 59,  253, 235, 184, 122, 68,  128 },
          { 80,  203, 169, 127, 86,  41,  228, 194, 151, 108, 58,
            221, 195, 152, 110, 60,  220, 194, 149, 103, 48,  238,
            221, 188, 147, 92,  205, 184, 130, 85,  41,  208, 195,
            159, 120, 62,  233, 212, 173, 126, 76,  128 } },
        { { 187, 239, 199, 149, 109, 66,  250, 226, 179, 130, 82,
            248, 218, 159, 100, 63,  251, 227, 184, 135, 91,  254,
            241, 202, 150, 99,  128, 128, 128, 128, 128, 128, 128,
            128, 128, 128, 128, 128, 128, 128, 128, 128 },
          { 130, 202, 169, 146, 118, 73,  236, 217, 186, 146, 91,
            215, 194, 154, 102, 77,  234, 216, 188, 145, 98,  245,
            229, 201, 163, 110, 128, 128, 128, 128, 128, 128, 128,
            128, 128, 128, 128, 128, 128, 128, 128, 128 } } },
      { { { 102, 225, 171, 113, 74,  33,  243, 201, 139, 92,  44,
            244, 208, 146, 99,  53,  247, 214, 158, 107, 52,  253,
            233, 183, 131, 73,  128, 128, 128, 128, 128, 128, 128,
            128, 128, 128, 128, 128, 128, 128, 128, 128 },
          { 80,  190, 152, 116, 79,  34,  222, 187, 142, 101, 47,
            211, 187, 148, 106, 56,  221, 200, 163, 118, 56,  236,
            215, 181, 140, 78,  128, 128, 128, 128, 128, 128, 128,
            128, 128, 128, 128, 128, 128, 128, 128, 128 } },
        { { 166, 237, 184, 144, 106, 62,  245, 211, 167, 129, 93,
            128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 254,
            240, 205, 158, 112, 128, 128, 128, 128, 128, 128, 128,
            128, 128, 128, 128, 128, 128, 128, 128, 128 },
          { 91,  185, 133, 105, 95,  60,  213, 190, 164, 131, 107,
            128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 242,
            227, 203, 160, 127, 128, 128, 128, 128, 128, 128, 128,
234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252
            128, 128, 128, 128, 128, 128, 128, 128, 128 } } },
#if CONFIG_TX64X64
      { { { 102, 225, 171, 113, 74,  33,  243, 201, 139, 92,  44,
            244, 208, 146, 99,  53,  247, 214, 158, 107, 52,  253,
            233, 183, 131, 73,  128, 128, 128, 128, 128, 128, 128,
            128, 128, 128, 128, 128, 128, 128, 128, 128 },
          { 80,  190, 152, 116, 79,  34,  222, 187, 142, 101, 47,
            211, 187, 148, 106, 56,  221, 200, 163, 118, 56,  236,
            215, 181, 140, 78,  128, 128, 128, 128, 128, 128, 128,
            128, 128, 128, 128, 128, 128, 128, 128, 128 } },
        { { 166, 237, 184, 144, 106, 62,  245, 211, 167, 129, 93,
            128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 254,
            240, 205, 158, 112, 128, 128, 128, 128, 128, 128, 128,
            128, 128, 128, 128, 128, 128, 128, 128, 128 },
          { 91,  185, 133, 105, 95,  60,  213, 190, 164, 131, 107,
            128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 242,
            227, 203, 160, 127, 128, 128, 128, 128, 128, 128, 128,
            128, 128, 128, 128, 128, 128, 128, 128, 128 } } },
#endif
253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278
    };

const aom_prob default_nz_map[TX_SIZES][PLANE_TYPES][SIG_COEF_CONTEXTS] = {
  { { 59,  183, 130, 76,  48,  28,  202, 153, 84,  54,  34, 128, 128, 128,
      128, 128, 128, 128, 128, 128, 128, 200, 163, 84,  61, 34,  182, 131,
      71,  31,  16,  210, 156, 78,  36,  26,  220, 170, 73, 32,  128, 128 },
    { 96,  209, 171, 109, 59,  28,  223, 187, 128, 71,  35,  128, 128, 128,
      128, 128, 128, 128, 128, 128, 128, 215, 192, 135, 63,  73,  128, 128,
      128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } },
  { { 49, 190, 129, 74,  46,  25,  206, 150, 90,  55,  32, 205, 142, 79,
      48, 27,  191, 137, 78,  47,  27,  223, 181, 109, 63, 37,  204, 136,
      82, 42,  19,  226, 169, 106, 58,  30,  231, 180, 96, 49,  29,  128 },
    { 86,  210, 159, 90,  56,  34,  223, 181, 114, 69,  40,  229, 182, 113,
      59,  28,  218, 162, 96,  64,  42,  237, 207, 146, 92,  50,  128, 128,
      128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } },
  { { 41, 187, 119, 66,  40,  20,  212, 144, 80,  49,  26,  226, 151, 84,
      49, 27,  214, 146, 82,  47,  22,  237, 190, 115, 68,  40,  206, 126,
      71, 37,  17,  227, 168, 103, 61,  29,  237, 197, 119, 63,  32,  128 },
    { 70,  207, 146, 82,  54,  35,  226, 167, 99,  65,  40,  238, 176, 96,
      57,  29,  229, 171, 108, 69,  47,  244, 201, 124, 78,  48,  128, 128,
      128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } },
  { { 40,  176, 107, 57,  37,  16,  216, 136, 73,  44,  22,  235, 145, 79,
      49,  26,  227, 149, 84,  52,  26,  247, 195, 107, 64,  35,  128, 128,
      128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 },
    { 49,  210, 153, 95,  58,  31,  217, 151, 93,  64,  41,  128, 128, 128,
      128, 128, 128, 128, 128, 128, 128, 248, 197, 123, 79,  53,  128, 128,
279 280 281 282 283 284 285 286 287
      128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } },
#if CONFIG_TX64X64
  { { 40,  176, 107, 57,  37,  16,  216, 136, 73,  44,  22,  235, 145, 79,
      49,  26,  227, 149, 84,  52,  26,  247, 195, 107, 64,  35,  128, 128,
      128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 },
    { 49,  210, 153, 95,  58,  31,  217, 151, 93,  64,  41,  128, 128, 128,
      128, 128, 128, 128, 128, 128, 128, 248, 197, 123, 79,  53,  128, 128,
      128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } },
#endif
288
};
289
#endif  // CONFIG_LV_MAP_MULTI
290

Dake He's avatar
Dake He committed
291 292
static const aom_prob
    default_eob_flag[TX_SIZES][PLANE_TYPES][EOB_COEF_CONTEXTS] = {
293 294 295
      { { 177, 226, 194, 146, 128, 128, 128, 128, 128, 128, 128,
          231, 239, 225, 162, 128, 128, 128, 128, 128, 128, 128 },
        { 123, 211, 166, 117, 128, 128, 128, 128, 128, 128, 128,
296
          128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } },
297 298 299 300 301 302 303 304 305 306 307
      { { 197, 242, 229, 219, 187, 151, 128, 128, 128, 128, 128,
          236, 246, 239, 230, 203, 141, 128, 128, 128, 128, 128 },
        { 124, 225, 204, 179, 116, 98,  128, 128, 128, 128, 128,
          128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } },
      { { 210, 244, 236, 229, 217, 201, 177, 154, 128, 128, 128,
          251, 252, 247, 215, 201, 194, 164, 128, 128, 128, 128 },
        { 86,  222, 202, 192, 172, 154, 132, 109, 128, 128, 128,
          128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } },
      { { 204, 242, 224, 223, 213, 202, 187, 176, 152, 132, 128,
          128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 },
        { 72,  227, 200, 212, 190, 150, 136, 173, 183, 82,  128,
308
          128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } },
309 310 311 312 313
#if CONFIG_TX64X64
      { { 204, 242, 224, 223, 213, 202, 187, 176, 152, 132, 128,
          128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 },
        { 72,  227, 200, 212, 190, 150, 136, 173, 183, 82,  128,
          128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } }
314
#endif
Dake He's avatar
Dake He committed
315
    };
Jingning Han's avatar
Jingning Han committed
316

317 318
static const aom_prob
    default_eob_extra[TX_SIZES][PLANE_TYPES][EOB_COEF_CONTEXTS] = {
319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334
      { { 128, 128, 128, 138, 138, 148, 128, 128, 128, 128, 128,
          128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 },
        { 128, 128, 128, 156, 156, 152, 128, 128, 128, 128, 128,
          128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } },
      { { 128, 128, 128, 134, 148, 143, 144, 140, 128, 128, 128,
          128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 },
        { 128, 128, 128, 165, 164, 160, 161, 157, 128, 128, 128,
          128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } },
      { { 128, 128, 128, 142, 145, 146, 153, 144, 139, 136, 128,
          128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 },
        { 128, 128, 128, 175, 168, 162, 162, 156, 157, 163, 128,
          128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } },
      { { 128, 128, 128, 180, 161, 149, 151, 158, 153, 142, 141,
          141, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 },
        { 128, 128, 128, 204, 172, 156, 139, 170, 170, 154, 166,
          157, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } },
335
#if CONFIG_TX64X64
336 337 338 339
      { { 128, 128, 128, 177, 160, 150, 147, 157, 151, 142, 139,
          133, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 },
        { 128, 128, 128, 200, 173, 159, 135, 158, 174, 160, 172,
          163, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } }
340
#endif
341
    };
342

343 344 345
#if CONFIG_LV_MAP_MULTI
const aom_prob default_coeff_lps[TX_SIZES][PLANE_TYPES][BR_CDF_SIZE -
                                                        1][LEVEL_CONTEXTS] = {
Dake He's avatar
Dake He committed
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
  { { { 88,  128, 170, 198, 212, 221, 233, 74,  90,  129, 162,
        184, 196, 214, 63,  80,  114, 150, 174, 181, 206 },
      { 106, 132, 168, 194, 209, 219, 233, 95,  101, 129, 160,
        180, 194, 210, 76,  92,  118, 146, 167, 181, 198 },
      { 120, 137, 168, 191, 206, 216, 231, 119, 113, 132, 157,
        177, 188, 207, 97,  104, 123, 145, 164, 176, 196 } },
    { { 69,  107, 160, 197, 215, 223, 234, 48,  69,  117, 157,
        184, 191, 204, 36,  56,  101, 139, 164, 181, 160 },
      { 91,  118, 162, 196, 211, 219, 230, 63,  84,  122, 158,
        174, 190, 216, 60,  77,  105, 133, 152, 195, 187 },
      { 111, 129, 165, 196, 210, 220, 234, 76,  104, 128, 153,
        175, 192, 204, 85,  85,  108, 135, 157, 144, 179 } } },
  { { { 100, 144, 184, 206, 218, 225, 237, 109, 111, 142, 170,
        187, 200, 218, 61,  81,  115, 148, 169, 184, 205 },
      { 118, 148, 183, 204, 216, 224, 237, 135, 122, 144, 168,
        185, 196, 216, 82,  93,  118, 146, 167, 180, 204 },
      { 134, 154, 183, 202, 214, 222, 235, 154, 134, 148, 167,
        183, 195, 215, 99,  107, 124, 147, 164, 179, 201 } },
    { { 93,  124, 162, 189, 207, 219, 235, 70,  81,  115, 152,
        177, 197, 215, 41,  60,  99,  141, 165, 178, 207 },
      { 106, 130, 161, 187, 204, 215, 234, 88,  95,  120, 152,
        172, 193, 212, 52,  73,  102, 137, 166, 183, 195 },
      { 117, 136, 162, 186, 202, 214, 232, 90,  110, 130, 153,
        165, 185, 212, 71,  84,  114, 141, 154, 178, 200 } } },
  { { { 107, 152, 190, 211, 222, 229, 242, 138, 140, 164, 186,
        201, 210, 229, 68,  89,  122, 153, 175, 189, 212 },
      { 128, 157, 190, 210, 221, 229, 242, 171, 161, 170, 186,
        200, 209, 228, 90,  105, 129, 154, 173, 187, 211 },
      { 147, 163, 191, 209, 220, 227, 241, 188, 178, 177, 188,
        199, 208, 227, 108, 118, 136, 156, 173, 186, 210 } },
    { { 120, 153, 186, 207, 215, 223, 239, 138, 131, 142, 156,
        175, 197, 213, 49,  63,  95,  123, 154, 172, 191 },
      { 136, 160, 185, 205, 216, 223, 237, 167, 156, 153, 161,
        177, 193, 213, 83,  81,  97,  128, 152, 172, 189 },
      { 147, 165, 184, 201, 212, 218, 236, 178, 177, 171, 162,
        182, 186, 215, 101, 85,  111, 134, 153, 168, 194 } } },
  { { { 122, 135, 175, 198, 209, 216, 240, 146, 155, 174, 191,
        203, 210, 231, 83,  98,  126, 155, 176, 189, 216 },
      { 153, 141, 173, 195, 209, 215, 241, 166, 176, 184, 195,
        204, 213, 231, 110, 116, 135, 157, 176, 188, 216 },
      { 180, 149, 172, 195, 209, 214, 241, 181, 191, 195, 201,
        208, 214, 231, 126, 131, 143, 160, 176, 189, 216 } },
    { { 168, 138, 178, 200, 210, 221, 245, 140, 179, 213, 222,
        234, 241, 246, 94,  116, 133, 133, 130, 159, 159 },
      { 193, 154, 172, 188, 199, 229, 244, 166, 189, 209, 224,
        235, 234, 242, 128, 137, 130, 133, 156, 134, 124 },
      { 212, 182, 173, 187, 212, 220, 242, 178, 183, 204, 226,
        230, 229, 241, 149, 155, 144, 170, 117, 145, 205 } } },
394
#if CONFIG_TX64X64
Dake He's avatar
Dake He committed
395 396 397 398 399 400 401 402 403 404 405 406
  { { { 122, 135, 175, 198, 209, 216, 240, 146, 155, 174, 191,
        203, 210, 231, 83,  98,  126, 155, 176, 189, 216 },
      { 153, 141, 173, 195, 209, 215, 241, 166, 176, 184, 195,
        204, 213, 231, 110, 116, 135, 157, 176, 188, 216 },
      { 180, 149, 172, 195, 209, 214, 241, 181, 191, 195, 201,
        208, 214, 231, 126, 131, 143, 160, 176, 189, 216 } },
    { { 168, 138, 178, 200, 210, 221, 245, 140, 179, 213, 222,
        234, 241, 246, 94,  116, 133, 133, 130, 159, 159 },
      { 193, 154, 172, 188, 199, 229, 244, 166, 189, 209, 224,
        235, 234, 242, 128, 137, 130, 133, 156, 134, 124 },
      { 212, 182, 173, 187, 212, 220, 242, 178, 183, 204, 226,
        230, 229, 241, 149, 155, 144, 170, 117, 145, 205 } } }
407 408
#endif
};
Dake He's avatar
Dake He committed
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

const aom_cdf_prob
    default_coeff_lps_multi[TX_SIZES][PLANE_TYPES][LEVEL_CONTEXTS][CDF_SIZE(
        BR_CDF_SIZE)] = {
      { { { AOM_CDF4(21555, 28113, 30577) }, { AOM_CDF4(16428, 24339, 28256) },
          { AOM_CDF4(10989, 18433, 23378) }, { AOM_CDF4(7485, 13650, 18484) },
          { AOM_CDF4(5589, 10547, 14891) },  { AOM_CDF4(4426, 8481, 12276) },
          { AOM_CDF4(2881, 5588, 8293) },    { AOM_CDF4(23339, 29272, 31140) },
          { AOM_CDF4(21303, 28228, 30764) }, { AOM_CDF4(16293, 24470, 28491) },
          { AOM_CDF4(12020, 19809, 24797) }, { AOM_CDF4(9189, 16225, 21299) },
          { AOM_CDF4(7683, 13778, 18785) },  { AOM_CDF4(5400, 10345, 14678) },
          { AOM_CDF4(24663, 30358, 31858) }, { AOM_CDF4(22498, 29058, 31259) },
          { AOM_CDF4(18125, 26008, 29530) }, { AOM_CDF4(13536, 21780, 26564) },
          { AOM_CDF4(10546, 18291, 23483) }, { AOM_CDF4(9579, 16349, 21499) },
          { AOM_CDF4(6453, 12376, 17128) } },
        { { AOM_CDF4(23922, 29625, 31402) }, { AOM_CDF4(19040, 26414, 29555) },
          { AOM_CDF4(12348, 19869, 24430) }, { AOM_CDF4(7582, 13510, 18026) },
          { AOM_CDF4(5303, 10148, 14249) },  { AOM_CDF4(4280, 8377, 11826) },
          { AOM_CDF4(2811, 5803, 8084) },    { AOM_CDF4(26608, 31256, 32319) },
          { AOM_CDF4(23934, 29872, 31587) }, { AOM_CDF4(17759, 25602, 29184) },
          { AOM_CDF4(12659, 20319, 25333) }, { AOM_CDF4(9216, 16791, 21855) },
          { AOM_CDF4(8263, 14575, 19079) },  { AOM_CDF4(6672, 10694, 15173) },
          { AOM_CDF4(28210, 31715, 32422) }, { AOM_CDF4(25619, 30627, 32059) },
          { AOM_CDF4(19841, 27449, 30526) }, { AOM_CDF4(14932, 23483, 27854) },
          { AOM_CDF4(11773, 20308, 25116) }, { AOM_CDF4(9459, 14864, 22634) },
          { AOM_CDF4(12072, 17246, 21558) } } },
      { { { AOM_CDF4(19938, 26867, 29676) }, { AOM_CDF4(14274, 22090, 26345) },
          { AOM_CDF4(9225, 15930, 20748) },  { AOM_CDF4(6382, 11744, 16173) },
          { AOM_CDF4(4844, 9162, 13011) },   { AOM_CDF4(3948, 7515, 10887) },
          { AOM_CDF4(2433, 4739, 6987) },    { AOM_CDF4(18867, 25411, 28349) },
          { AOM_CDF4(18606, 26031, 29240) }, { AOM_CDF4(14638, 22572, 26871) },
          { AOM_CDF4(11037, 18517, 23465) }, { AOM_CDF4(8802, 15423, 20353) },
          { AOM_CDF4(7210, 13161, 17862) },  { AOM_CDF4(4904, 9219, 13019) },
          { AOM_CDF4(24908, 30238, 31794) }, { AOM_CDF4(22433, 29032, 31213) },
          { AOM_CDF4(18011, 25945, 29466) }, { AOM_CDF4(13806, 21960, 26577) },
          { AOM_CDF4(11113, 18660, 23757) }, { AOM_CDF4(9252, 16237, 21227) },
          { AOM_CDF4(6548, 11889, 16358) } },
        { { AOM_CDF4(20809, 27804, 30495) }, { AOM_CDF4(16892, 24731, 28500) },
          { AOM_CDF4(12028, 19699, 24487) }, { AOM_CDF4(8553, 15108, 19950) },
          { AOM_CDF4(6303, 11650, 16097) },  { AOM_CDF4(4734, 9245, 13066) },
          { AOM_CDF4(2722, 5357, 7956) },    { AOM_CDF4(23838, 29708, 31693) },
          { AOM_CDF4(22438, 28930, 31114) }, { AOM_CDF4(18024, 25840, 29262) },
          { AOM_CDF4(13356, 21260, 25900) }, { AOM_CDF4(10120, 17584, 22957) },
          { AOM_CDF4(7590, 13822, 19077) },  { AOM_CDF4(5285, 9975, 13926) },
          { AOM_CDF4(27522, 31714, 32477) }, { AOM_CDF4(25070, 30561, 32042) },
          { AOM_CDF4(20135, 27722, 30522) }, { AOM_CDF4(14730, 23098, 27428) },
          { AOM_CDF4(11631, 19031, 24480) }, { AOM_CDF4(9966, 16442, 21406) },
          { AOM_CDF4(6204, 12551, 16937) } } },
      { { { AOM_CDF4(19065, 25915, 28842) }, { AOM_CDF4(13266, 20843, 25186) },
          { AOM_CDF4(8422, 14687, 19287) },  { AOM_CDF4(5698, 10535, 14604) },
          { AOM_CDF4(4346, 8250, 11723) },   { AOM_CDF4(3441, 6587, 9580) },
          { AOM_CDF4(1791, 3507, 5199) },    { AOM_CDF4(15051, 20942, 24075) },
          { AOM_CDF4(14854, 21498, 24913) }, { AOM_CDF4(11799, 18880, 23182) },
          { AOM_CDF4(8918, 15413, 20055) },  { AOM_CDF4(7075, 12706, 17195) },
          { AOM_CDF4(5827, 10806, 14934) },  { AOM_CDF4(3506, 6703, 9625) },
          { AOM_CDF4(24001, 29683, 31469) }, { AOM_CDF4(21337, 28085, 30605) },
          { AOM_CDF4(17211, 24958, 28605) }, { AOM_CDF4(13206, 21021, 25589) },
          { AOM_CDF4(10431, 17673, 22573) }, { AOM_CDF4(8624, 15128, 19923) },
          { AOM_CDF4(5685, 10456, 14453) } },
        { { AOM_CDF4(17447, 24631, 28107) }, { AOM_CDF4(13167, 20490, 24864) },
          { AOM_CDF4(9022, 15643, 20459) },  { AOM_CDF4(6240, 11550, 16094) },
          { AOM_CDF4(5205, 9527, 13534) },   { AOM_CDF4(4201, 7869, 11579) },
          { AOM_CDF4(2148, 4384, 6624) },    { AOM_CDF4(15066, 21210, 24708) },
          { AOM_CDF4(16035, 22582, 25713) }, { AOM_CDF4(14568, 21860, 25486) },
          { AOM_CDF4(12783, 20164, 24803) }, { AOM_CDF4(10318, 17270, 21741) },
          { AOM_CDF4(7498, 13730, 18892) },  { AOM_CDF4(5526, 10062, 13732) },
          { AOM_CDF4(26569, 30769, 31984) }, { AOM_CDF4(24696, 30223, 31927) },
          { AOM_CDF4(20650, 28180, 30770) }, { AOM_CDF4(17087, 24956, 28669) },
          { AOM_CDF4(13081, 21097, 25803) }, { AOM_CDF4(10681, 17893, 23022) },
          { AOM_CDF4(8334, 14681, 19016) } } },
      { { { AOM_CDF4(17185, 23482, 26251) }, { AOM_CDF4(15444, 23256, 27230) },
          { AOM_CDF4(10405, 17619, 22597) }, { AOM_CDF4(7390, 13468, 18098) },
          { AOM_CDF4(6005, 10905, 14947) },  { AOM_CDF4(5101, 9498, 13296) },
          { AOM_CDF4(2014, 3874, 5611) },    { AOM_CDF4(14114, 20695, 24209) },
          { AOM_CDF4(12937, 19147, 22593) }, { AOM_CDF4(10446, 16701, 20502) },
          { AOM_CDF4(8306, 14118, 18095) },  { AOM_CDF4(6743, 12003, 15921) },
          { AOM_CDF4(5826, 10373, 14059) },  { AOM_CDF4(3224, 6138, 8717) },
          { AOM_CDF4(22096, 28196, 30519) }, { AOM_CDF4(20239, 27093, 29867) },
          { AOM_CDF4(16604, 24251, 28006) }, { AOM_CDF4(12875, 20562, 25136) },
          { AOM_CDF4(10257, 17333, 22145) }, { AOM_CDF4(8555, 14959, 19618) },
          { AOM_CDF4(5109, 9467, 13140) } },
        { { AOM_CDF4(11246, 16551, 19319) }, { AOM_CDF4(15159, 22199, 25265) },
          { AOM_CDF4(9912, 17414, 22390) },  { AOM_CDF4(7173, 13945, 18995) },
          { AOM_CDF4(5838, 11785, 15365) },  { AOM_CDF4(4476, 7403, 10904) },
          { AOM_CDF4(1429, 2903, 4502) },    { AOM_CDF4(14802, 21129, 24651) },
          { AOM_CDF4(9832, 15858, 20702) },  { AOM_CDF4(5522, 10567, 15086) },
          { AOM_CDF4(4341, 7835, 10773) },   { AOM_CDF4(2766, 5154, 7962) },
          { AOM_CDF4(1924, 4490, 7405) },    { AOM_CDF4(1231, 2873, 4641) },
          { AOM_CDF4(20719, 26743, 29241) }, { AOM_CDF4(17880, 24787, 27933) },
          { AOM_CDF4(15776, 24114, 27900) }, { AOM_CDF4(15725, 23942, 26884) },
          { AOM_CDF4(16163, 22583, 28118) }, { AOM_CDF4(12288, 22016, 26624) },
          { AOM_CDF4(12193, 22861, 24385) } } },
#if CONFIG_TX64X64
      { { { AOM_CDF4(17185, 23482, 26251) }, { AOM_CDF4(15444, 23256, 27230) },
          { AOM_CDF4(10405, 17619, 22597) }, { AOM_CDF4(7390, 13468, 18098) },
          { AOM_CDF4(6005, 10905, 14947) },  { AOM_CDF4(5101, 9498, 13296) },
          { AOM_CDF4(2014, 3874, 5611) },    { AOM_CDF4(14114, 20695, 24209) },
          { AOM_CDF4(12937, 19147, 22593) }, { AOM_CDF4(10446, 16701, 20502) },
          { AOM_CDF4(8306, 14118, 18095) },  { AOM_CDF4(6743, 12003, 15921) },
          { AOM_CDF4(5826, 10373, 14059) },  { AOM_CDF4(3224, 6138, 8717) },
          { AOM_CDF4(22096, 28196, 30519) }, { AOM_CDF4(20239, 27093, 29867) },
          { AOM_CDF4(16604, 24251, 28006) }, { AOM_CDF4(12875, 20562, 25136) },
          { AOM_CDF4(10257, 17333, 22145) }, { AOM_CDF4(8555, 14959, 19618) },
          { AOM_CDF4(5109, 9467, 13140) } },
        { { AOM_CDF4(11246, 16551, 19319) }, { AOM_CDF4(15159, 22199, 25265) },
          { AOM_CDF4(9912, 17414, 22390) },  { AOM_CDF4(7173, 13945, 18995) },
          { AOM_CDF4(5838, 11785, 15365) },  { AOM_CDF4(4476, 7403, 10904) },
          { AOM_CDF4(1429, 2903, 4502) },    { AOM_CDF4(14802, 21129, 24651) },
          { AOM_CDF4(9832, 15858, 20702) },  { AOM_CDF4(5522, 10567, 15086) },
          { AOM_CDF4(4341, 7835, 10773) },   { AOM_CDF4(2766, 5154, 7962) },
          { AOM_CDF4(1924, 4490, 7405) },    { AOM_CDF4(1231, 2873, 4641) },
          { AOM_CDF4(20719, 26743, 29241) }, { AOM_CDF4(17880, 24787, 27933) },
          { AOM_CDF4(15776, 24114, 27900) }, { AOM_CDF4(15725, 23942, 26884) },
          { AOM_CDF4(16163, 22583, 28118) }, { AOM_CDF4(12288, 22016, 26624) },
          { AOM_CDF4(12193, 22861, 24385) } } }
#endif
    };
526
#else
527
const aom_prob default_coeff_lps[TX_SIZES][PLANE_TYPES][LEVEL_CONTEXTS] = {
528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559
  { { 115, 128, 87,  119, 128, 128, 128, 128, 62,  94,  125, 128,
      151, 164, 113, 140, 147, 128, 128, 128, 80,  111, 137, 142,
      167, 173, 135, 154, 162, 128, 128, 128, 113, 131, 148, 157,
      177, 181, 161, 167, 173, 128, 128, 128, 153, 151, 159, 167 },
    { 97,  128, 70,  103, 128, 128, 128, 128, 37,  77,  109, 128,
      146, 168, 103, 137, 150, 128, 128, 128, 69,  106, 130, 128,
      167, 173, 130, 152, 159, 128, 128, 128, 110, 129, 140, 144,
      178, 181, 159, 166, 172, 128, 128, 128, 128, 147, 142, 168 } },
  { { 125, 128, 95,  136, 128, 128, 128, 128, 55,  98,  132, 128,
      160, 169, 119, 146, 156, 128, 128, 128, 78,  115, 140, 153,
      171, 176, 135, 156, 165, 128, 128, 128, 106, 129, 149, 159,
      179, 184, 156, 169, 176, 128, 128, 128, 140, 149, 162, 170 },
    { 110, 128, 76,  119, 128, 128, 128, 128, 34,  76,  125, 128,
      146, 163, 106, 137, 154, 128, 128, 128, 64,  103, 137, 145,
      163, 172, 132, 150, 165, 128, 128, 128, 80,  126, 144, 162,
      175, 182, 157, 167, 176, 128, 128, 128, 102, 154, 151, 167 } },
  { { 132, 128, 102, 159, 128, 128, 128, 128, 55,  103, 140, 128,
      163, 173, 125, 155, 164, 128, 128, 128, 78,  118, 146, 160,
      174, 179, 138, 162, 170, 128, 128, 128, 102, 129, 151, 164,
      182, 186, 157, 174, 181, 128, 128, 128, 132, 147, 163, 174 },
    { 131, 128, 105, 160, 128, 128, 128, 128, 43,  88,  129, 128,
      159, 168, 110, 148, 151, 128, 128, 128, 66,  106, 132, 152,
      170, 176, 130, 151, 161, 128, 128, 128, 101, 122, 143, 158,
      180, 184, 152, 165, 173, 128, 128, 128, 110, 143, 155, 166 } },
  { { 130, 128, 114, 160, 128, 128, 128, 128, 60,  109, 149, 128,
      159, 170, 128, 159, 167, 128, 128, 128, 83,  122, 149, 162,
      172, 176, 140, 164, 172, 128, 128, 128, 103, 131, 153, 166,
      183, 187, 161, 175, 182, 128, 128, 128, 126, 149, 165, 177 },
    { 154, 128, 130, 153, 128, 128, 128, 128, 49,  101, 151, 128,
      170, 174, 136, 166, 172, 128, 128, 128, 72,  112, 151, 155,
      174, 177, 143, 169, 181, 128, 128, 128, 99,  127, 142, 157,
      185, 187, 146, 181, 185, 128, 128, 128, 101, 129, 157, 170 } },
560
#if CONFIG_TX64X64
561 562 563 564 565 566 567 568
  { { 130, 128, 114, 160, 128, 128, 128, 128, 60,  109, 149, 128,
      159, 170, 128, 159, 167, 128, 128, 128, 83,  122, 149, 162,
      172, 176, 140, 164, 172, 128, 128, 128, 103, 131, 153, 166,
      183, 187, 161, 175, 182, 128, 128, 128, 126, 149, 165, 177 },
    { 154, 128, 130, 153, 128, 128, 128, 128, 49,  101, 151, 128,
      170, 174, 136, 166, 172, 128, 128, 128, 72,  112, 151, 155,
      174, 177, 143, 169, 181, 128, 128, 128, 99,  127, 142, 157,
      185, 187, 146, 181, 185, 128, 128, 128, 101, 129, 157, 170 } }
569
#endif
570
};
571
#endif
Jingning Han's avatar
Jingning Han committed
572

573
#if !CONFIG_LV_MAP_MULTI
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
const aom_prob
    default_coeff_br[TX_SIZES][PLANE_TYPES][BASE_RANGE_SETS][LEVEL_CONTEXTS] = {
      { { { 62,  128, 54,  116, 128, 51,  97,  128, 59,  68,  107, 128,
            119, 158, 68,  115, 131, 65,  112, 138, 34,  71,  118, 137,
            171, 184, 110, 152, 178, 105, 146, 172, 89,  111, 145, 173,
            214, 226, 201, 198, 214, 196, 193, 210, 239, 196, 186, 202 },
          { 41,  128, 58,  52,  128, 51,  61,  128, 92,  54,  48,  128,
            67,  113, 36,  55,  75,  30,  56,  72,  12,  25,  50,  79,
            94,  131, 37,  75,  108, 42,  78,  103, 5,   31,  67,  103,
            172, 192, 131, 135, 167, 129, 136, 165, 149, 144, 120, 149 },
          { 35, 128, 74, 50, 128, 63, 59, 128, 87,  74,  38, 128,
            32, 53,  23, 34, 50,  18, 30, 41,  15,  13,  18, 18,
            52, 74,  18, 29, 36,  18, 31, 47,  51,  9,   15, 27,
            96, 134, 85, 70, 93,  96, 79, 100, 108, 100, 55, 65 } },
        { { 52,  128, 35,  79,  128, 29,  66,  128, 12,  30, 57,  128,
            113, 156, 64,  107, 172, 54,  103, 145, 23,  57, 96,  110,
            165, 184, 95,  138, 166, 95,  141, 184, 55,  80, 133, 165,
            212, 222, 134, 175, 206, 158, 177, 197, 102, 61, 154, 190 },
          { 36,  128, 18, 26,  128, 15, 29,  128, 4, 6,  30, 128,
            63,  113, 25, 44,  66,  22, 40,  67,  9, 14, 34, 55,
            90,  125, 26, 66,  82,  29, 73,  88,  1, 26, 34, 67,
            158, 179, 70, 121, 134, 69, 111, 129, 1, 85, 54, 105 },
          { 24, 128, 8,  31, 128, 15, 16, 128, 1,   1, 1,  128,
            32, 39,  16, 18, 43,  5,  17, 13,  1,   1, 22, 1,
            37, 65,  26, 20, 28,  16, 15, 24,  128, 1, 1,  1,
            83, 107, 57, 56, 74,  34, 29, 73,  128, 1, 37, 47 } } },
      { { { 72,  128, 45,  113, 128, 38,  100, 128, 26,  63,  112, 128,
            134, 177, 65,  121, 148, 57,  111, 143, 27,  68,  116, 152,
            181, 198, 98,  148, 173, 84,  136, 168, 53,  89,  134, 170,
            218, 230, 173, 194, 216, 160, 188, 213, 199, 177, 183, 204 },
          { 54,  128, 34,  55,  128, 32,  53,  128, 66,  45,  54,  128,
            81,  128, 33,  59,  102, 26,  55,  80,  7,   23,  49,  91,
            116, 145, 36,  79,  107, 35,  73,  102, 12,  28,  57,  95,
            170, 201, 102, 133, 173, 105, 127, 173, 166, 132, 114, 149 },
          { 40,  128, 25, 30, 128, 21, 31, 128, 24, 17, 24, 128,
            51,  67,  19, 28, 40,  17, 25, 42,  15, 13, 19, 19,
            61,  77,  19, 30, 48,  13, 33, 50,  11, 15, 21, 30,
            103, 147, 37, 69, 111, 37, 66, 105, 18, 18, 36, 76 } },
        { { 74,  128, 42,  99,  128, 32,  57,  128, 9,  28, 76,  128,
            115, 187, 70,  118, 120, 52,  109, 128, 19, 60, 93,  100,
            178, 197, 119, 147, 179, 92,  137, 178, 37, 87, 110, 158,
            216, 227, 169, 186, 201, 128, 178, 204, 1,  96, 155, 217 },
          { 59,  128, 26, 34,  128, 11, 20,  128, 7,   8, 24, 128,
            73,  125, 38, 74,  96,  23, 61,  79,  15,  9, 23, 110,
            96,  151, 49, 79,  164, 22, 70,  65,  1,   1, 9,  69,
            156, 196, 73, 105, 181, 17, 126, 155, 128, 1, 90, 111 },
          { 42, 128, 10, 11, 128, 13, 1,  128, 1,   1,   1, 128,
            55, 63,  13, 17, 85,  1,  16, 64,  1,   1,   1, 1,
            62, 58,  32, 21, 53,  1,  37, 91,  128, 128, 1, 1,
            81, 133, 51, 48, 79,  1,  25, 81,  128, 128, 1, 54 } } },
      { { { 103, 128, 52,  163, 128, 46,  155, 128, 12, 45,  97,  128,
            162, 196, 69,  140, 170, 60,  130, 158, 21, 58,  109, 150,
            205, 214, 93,  149, 178, 79,  143, 179, 38, 71,  120, 159,
            231, 240, 150, 192, 218, 140, 188, 220, 84, 112, 159, 196 },
          { 93,  128, 42, 143, 128, 41, 132, 128, 6,  15, 40, 128,
            113, 172, 39, 99,  113, 33, 91,  94,  5,  15, 42, 83,
            148, 172, 37, 91,  130, 28, 81,  121, 9,  20, 47, 87,
            201, 223, 75, 139, 183, 77, 132, 176, 23, 41, 82, 147 },
          { 92,  128, 45, 123, 128, 28, 88, 128, 1,  8,  20, 128,
            85,  94,  39, 95,  83,  33, 81, 61,  4,  5,  17, 25,
            84,  109, 17, 59,  76,  11, 46, 62,  1,  4,  13, 35,
            139, 184, 25, 86,  129, 25, 71, 123, 26, 13, 31, 84 } },
        { { 123, 128, 82,  169, 128, 62,  139, 128, 1,   28,  77,  128,
            139, 167, 92,  170, 146, 76,  149, 255, 19,  68,  160, 73,
            190, 209, 171, 165, 218, 57,  152, 209, 128, 61,  122, 164,
            237, 240, 146, 210, 227, 128, 224, 220, 128, 128, 196, 199 },
          { 130, 128, 52,  141, 128, 32,  101, 128, 128, 1,  85,  128,
            94,  155, 71,  121, 255, 30,  116, 85,  1,   8,  58,  255,
            105, 169, 110, 101, 132, 1,   77,  142, 128, 1,  54,  96,
            166, 214, 224, 154, 198, 255, 153, 230, 128, 85, 100, 146 },
          { 103, 128, 26, 83, 128, 20,  47,  128, 128, 128, 1,  128,
            91,  90,  19, 76, 128, 1,   42,  1,   128, 255, 64, 128,
            74,  77,  1,  72, 68,  128, 13,  77,  128, 128, 64, 1,
            71,  147, 37, 99, 171, 1,   104, 151, 128, 1,   1,  96 } } },
      { { { 113, 128, 79,  165, 128, 69,  149, 128, 14, 55,  116, 128,
            163, 202, 104, 169, 205, 82,  159, 180, 22, 64,  121, 165,
            207, 216, 113, 177, 215, 95,  166, 195, 35, 77,  132, 179,
            241, 244, 173, 207, 233, 128, 202, 227, 92, 121, 169, 209 },
          { 114, 128, 67, 136, 128, 54, 132, 128, 6,  26, 62,  128,
            85,  129, 85, 146, 173, 64, 129, 140, 7,  19, 65,  92,
            139, 169, 42, 147, 186, 40, 129, 170, 18, 18, 65,  117,
            213, 230, 74, 172, 213, 69, 165, 196, 1,  40, 103, 170 },
          { 101, 128, 61, 134, 128, 52, 97,  128, 1,   14, 26, 128,
            79,  72,  71, 135, 152, 56, 114, 117, 1,   10, 24, 58,
            64,  66,  60, 133, 148, 16, 126, 123, 1,   32, 26, 56,
            143, 197, 51, 141, 176, 59, 132, 162, 128, 17, 47, 106 } },
        { { 115, 128, 112, 135, 128, 89,  130, 128, 15,  49,  89,  128,
            143, 238, 154, 203, 255, 138, 172, 255, 1,   98,  196, 255,
            185, 203, 255, 211, 255, 192, 217, 235, 128, 128, 171, 255,
            233, 233, 255, 247, 255, 1,   239, 245, 1,   128, 255, 255 },
          { 75,  128, 76,  118, 128, 35,  74,  128, 1,   13,  23,  128,
            63,  138, 114, 164, 140, 91,  128, 128, 128, 1,   138, 64,
            96,  128, 255, 175, 236, 85,  166, 209, 128, 1,   128, 146,
            196, 217, 1,   204, 206, 128, 212, 221, 128, 128, 128, 219 },
          { 49,  128, 36,  62,  128, 37,  56, 128, 128, 1,   1,   128,
            45,  37,  68,  102, 128, 90,  56, 1,   128, 128, 37,  1,
            26,  27,  128, 126, 128, 255, 63, 142, 128, 128, 1,   1,
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
            125, 159, 128, 173, 212, 128, 85, 189, 128, 128, 255, 171 } } },
#if CONFIG_TX64X64
      { { { 113, 128, 79,  165, 128, 69,  149, 128, 14, 55,  116, 128,
            163, 202, 104, 169, 205, 82,  159, 180, 22, 64,  121, 165,
            207, 216, 113, 177, 215, 95,  166, 195, 35, 77,  132, 179,
            241, 244, 173, 207, 233, 128, 202, 227, 92, 121, 169, 209 },
          { 114, 128, 67, 136, 128, 54, 132, 128, 6,  26, 62,  128,
            85,  129, 85, 146, 173, 64, 129, 140, 7,  19, 65,  92,
            139, 169, 42, 147, 186, 40, 129, 170, 18, 18, 65,  117,
            213, 230, 74, 172, 213, 69, 165, 196, 1,  40, 103, 170 },
          { 101, 128, 61, 134, 128, 52, 97,  128, 1,   14, 26, 128,
            79,  72,  71, 135, 152, 56, 114, 117, 1,   10, 24, 58,
            64,  66,  60, 133, 148, 16, 126, 123, 1,   32, 26, 56,
            143, 197, 51, 141, 176, 59, 132, 162, 128, 17, 47, 106 } },
        { { 115, 128, 112, 135, 128, 89,  130, 128, 15,  49,  89,  128,
            143, 238, 154, 203, 255, 138, 172, 255, 1,   98,  196, 255,
            185, 203, 255, 211, 255, 192, 217, 235, 128, 128, 171, 255,
            233, 233, 255, 247, 255, 1,   239, 245, 1,   128, 255, 255 },
          { 75,  128, 76,  118, 128, 35,  74,  128, 1,   13,  23,  128,
            63,  138, 114, 164, 140, 91,  128, 128, 128, 1,   138, 64,
            96,  128, 255, 175, 236, 85,  166, 209, 128, 1,   128, 146,
            196, 217, 1,   204, 206, 128, 212, 221, 128, 128, 128, 219 },
          { 49,  128, 36,  62,  128, 37,  56, 128, 128, 1,   1,   128,
            45,  37,  68,  102, 128, 90,  56, 1,   128, 128, 37,  1,
            26,  27,  128, 126, 128, 255, 63, 142, 128, 128, 1,   1,
            125, 159, 128, 173, 212, 128, 85, 189, 128, 128, 255, 171 } } },
#endif
698
    };
699
#endif
700 701
#endif  // CONFIG_LV_MAP

702
static const aom_cdf_prob default_newmv_cdf[NEWMV_MODE_CONTEXTS][CDF_SIZE(2)] =
703 704 705
    { { AOM_CDF2(128 * 155) }, { AOM_CDF2(128 * 116) }, { AOM_CDF2(128 * 94) },
      { AOM_CDF2(128 * 32) },  { AOM_CDF2(128 * 96) },  { AOM_CDF2(128 * 56) },
      { AOM_CDF2(128 * 30) } };
Sarah Parker's avatar
Sarah Parker committed
706
static const aom_cdf_prob default_zeromv_cdf[GLOBALMV_MODE_CONTEXTS][CDF_SIZE(
707
    2)] = { { AOM_CDF2(128 * 45) }, { AOM_CDF2(128 * 13) } };
708
static const aom_cdf_prob default_refmv_cdf[REFMV_MODE_CONTEXTS][CDF_SIZE(2)] =
709 710 711 712 713
    {
      { AOM_CDF2(128 * 178) }, { AOM_CDF2(128 * 212) }, { AOM_CDF2(128 * 135) },
      { AOM_CDF2(128 * 244) }, { AOM_CDF2(128 * 203) }, { AOM_CDF2(128 * 122) },
      { AOM_CDF2(128 * 128) }, { AOM_CDF2(128 * 128) }, { AOM_CDF2(128 * 128) }
    };
714
static const aom_cdf_prob default_drl_cdf[DRL_MODE_CONTEXTS][CDF_SIZE(2)] = {
715 716 717 718 719
  { AOM_CDF2(128 * 119) },
  { AOM_CDF2(128 * 128) },
  { AOM_CDF2(128 * 189) },
  { AOM_CDF2(128 * 134) },
  { AOM_CDF2(128 * 128) }
720
};
721

722 723 724
static const aom_cdf_prob
    default_inter_compound_mode_cdf[INTER_MODE_CONTEXTS][CDF_SIZE(
        INTER_COMPOUND_MODES)] = {
725 726 727 728 729 730 731
      { AOM_CDF8(19712, 28229, 30892, 31437, 31712, 32135, 32360) },
      { AOM_CDF8(9600, 24804, 29268, 30323, 30802, 31726, 32177) },
      { AOM_CDF8(896, 22434, 27015, 29026, 29753, 31114, 31597) },
      { AOM_CDF8(1024, 15904, 22127, 25421, 26864, 28996, 30001) },
      { AOM_CDF8(512, 11222, 17217, 21445, 23473, 26133, 27550) },
      { AOM_CDF8(2944, 13313, 17214, 20751, 23211, 25500, 26992) },
      { AOM_CDF8(3456, 9067, 14069, 16907, 18817, 21214, 23139) }
732 733
    };

734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753
#if CONFIG_JNT_COMP
static const aom_cdf_prob
    default_compound_type_cdf[BLOCK_SIZES_ALL][CDF_SIZE(COMPOUND_TYPES - 1)] = {
      { AOM_CDF2(16384) }, { AOM_CDF2(16384) }, { AOM_CDF2(16384) },
      { AOM_CDF2(16384) }, { AOM_CDF2(16384) }, { AOM_CDF2(16384) },
      { AOM_CDF2(16384) }, { AOM_CDF2(16384) }, { AOM_CDF2(16384) },
      { AOM_CDF2(16384) }, { AOM_CDF2(16384) }, { AOM_CDF2(16384) },
      { AOM_CDF2(16384) },
#if CONFIG_EXT_PARTITION
      { AOM_CDF2(16384) },  // 255, 1
      { AOM_CDF2(16384) }, { AOM_CDF2(16384) },
#endif  // CONFIG_EXT_PARTITION
      { AOM_CDF2(16384) }, { AOM_CDF2(16384) }, { AOM_CDF2(16384) },
      { AOM_CDF2(16384) }, { AOM_CDF2(16384) },  // 208, 1
      { AOM_CDF2(16384) },
#if CONFIG_EXT_PARTITION
      { AOM_CDF2(16384) }, { AOM_CDF2(16384) },
#endif
    };
#else
754
static const aom_cdf_prob
755
    default_compound_type_cdf[BLOCK_SIZES_ALL][CDF_SIZE(COMPOUND_TYPES)] = {
756 757 758 759 760 761 762
      { AOM_CDF3(16384, 24576) }, { AOM_CDF3(32640, 32704) },
      { AOM_CDF3(32640, 32704) }, { AOM_CDF3(8448, 13293) },
      { AOM_CDF3(9216, 12436) },  { AOM_CDF3(10112, 12679) },
      { AOM_CDF3(9088, 10753) },  { AOM_CDF3(10368, 12906) },
      { AOM_CDF3(10368, 12643) }, { AOM_CDF3(8832, 10609) },
      { AOM_CDF3(13312, 13388) }, { AOM_CDF3(12672, 12751) },
      { AOM_CDF3(9600, 9691) },
763
#if CONFIG_EXT_PARTITION
764 765
      { AOM_CDF3(32640, 32641) },  // 255, 1
      { AOM_CDF3(32640, 32641) }, { AOM_CDF3(32640, 32641) },
766
#endif  // CONFIG_EXT_PARTITION
767 768 769 770
      { AOM_CDF3(16384, 24576) }, { AOM_CDF3(16384, 24576) },
      { AOM_CDF3(16384, 24576) }, { AOM_CDF3(16384, 24576) },
      { AOM_CDF3(26624, 26648) },  // 208, 1
      { AOM_CDF3(26624, 26648) },
771
#if CONFIG_EXT_PARTITION
772
      { AOM_CDF3(26624, 26648) }, { AOM_CDF3(26624, 26648) },
773
#endif
774
    };
775
#endif  // CONFIG_JNT_COMP
776

777
static const aom_cdf_prob default_interintra_cdf[BLOCK_SIZE_GROUPS][CDF_SIZE(
778 779 780 781
    2)] = { { AOM_CDF2(128 * 128) },
            { AOM_CDF2(226 * 128) },
            { AOM_CDF2(244 * 128) },
            { AOM_CDF2(254 * 128) } };
782

783
static const aom_cdf_prob
784 785 786 787 788
    default_interintra_mode_cdf[BLOCK_SIZE_GROUPS][CDF_SIZE(INTERINTRA_MODES)] =
        { { AOM_CDF4(16384, 24576, 28672) },
          { AOM_CDF4(3072, 7016, 18987) },
          { AOM_CDF4(4864, 8461, 17481) },
          { AOM_CDF4(6528, 8681, 19031) } };
789

790
static const aom_cdf_prob
791
    default_wedge_interintra_cdf[BLOCK_SIZES_ALL][CDF_SIZE(2)] = {
792 793 794 795 796
      { AOM_CDF2(128 * 128) }, { AOM_CDF2(128 * 128) }, { AOM_CDF2(128 * 128) },
      { AOM_CDF2(194 * 128) }, { AOM_CDF2(213 * 128) }, { AOM_CDF2(217 * 128) },
      { AOM_CDF2(222 * 128) }, { AOM_CDF2(224 * 128) }, { AOM_CDF2(226 * 128) },
      { AOM_CDF2(220 * 128) }, { AOM_CDF2(128 * 128) }, { AOM_CDF2(128 * 128) },
      { AOM_CDF2(128 * 128) },
797
#if CONFIG_EXT_PARTITION
798
      { AOM_CDF2(255 * 128) }, { AOM_CDF2(255 * 128) }, { AOM_CDF2(255 * 128) },
799
#endif  // CONFIG_EXT_PARTITION
800 801
      { AOM_CDF2(208 * 128) }, { AOM_CDF2(208 * 128) }, { AOM_CDF2(208 * 128) },
      { AOM_CDF2(208 * 128) }, { AOM_CDF2(255 * 128) }, { AOM_CDF2(255 * 128) },
802
#if CONFIG_EXT_PARTITION
803
      { AOM_CDF2(255 * 128) }, { AOM_CDF2(255 * 128) },
804
#endif  // CONFIG_EXT_PARTITION
805 806
    };

Thomas Davies's avatar
Thomas Davies committed
807
static const aom_cdf_prob
808
    default_motion_mode_cdf[BLOCK_SIZES_ALL][CDF_SIZE(MOTION_MODES)] = {
809
      { AOM_CDF3(16384, 24576) }, { AOM_CDF3(16384, 24576) },
810 811 812 813 814 815
      { AOM_CDF3(16384, 24576) }, { AOM_CDF3(7936, 19091) },
      { AOM_CDF3(4991, 19205) },  { AOM_CDF3(4992, 19314) },
      { AOM_CDF3(15104, 21590) }, { AOM_CDF3(9855, 21043) },
      { AOM_CDF3(12800, 22238) }, { AOM_CDF3(24320, 26498) },
      { AOM_CDF3(26496, 28995) }, { AOM_CDF3(25216, 28166) },
      { AOM_CDF3(30592, 31238) },
Thomas Davies's avatar
Thomas Davies committed
816
#if CONFIG_EXT_PARTITION
817 818
      { AOM_CDF3(32256, 32656) }, { AOM_CDF3(32256, 32656) },
      { AOM_CDF3(32256, 32656) },
Thomas Davies's avatar
Thomas Davies committed
819
#endif
820 821 822
      { AOM_CDF3(32640, 32740) }, { AOM_CDF3(32640, 32740) },
      { AOM_CDF3(32640, 32740) }, { AOM_CDF3(32640, 32740) },
      { AOM_CDF3(32640, 32740) }, { AOM_CDF3(32640, 32740) },
823
#if CONFIG_EXT_PARTITION
824
      { AOM_CDF3(32256, 32656) }, { AOM_CDF3(32256, 32656) },
825
#endif
Thomas Davies's avatar
Thomas Davies committed
826
    };
Yue Chen's avatar
Yue Chen committed
827

828
static const aom_cdf_prob default_obmc_cdf[BLOCK_SIZES_ALL][CDF_SIZE(2)] = {
829 830 831 832 833
  { AOM_CDF2(128 * 128) }, { AOM_CDF2(128 * 128) }, { AOM_CDF2(128 * 128) },
  { AOM_CDF2(45 * 128) },  { AOM_CDF2(79 * 128) },  { AOM_CDF2(75 * 128) },
  { AOM_CDF2(130 * 128) }, { AOM_CDF2(141 * 128) }, { AOM_CDF2(144 * 128) },
  { AOM_CDF2(208 * 128) }, { AOM_CDF2(201 * 128) }, { AOM_CDF2(186 * 128) },
  { AOM_CDF2(231 * 128) },
834
#if CONFIG_EXT_PARTITION
835
  { AOM_CDF2(252 * 128) }, { AOM_CDF2(252 * 128) }, { AOM_CDF2(252 * 128) },
836
#endif  // CONFIG_EXT_PARTITION
837 838
  { AOM_CDF2(208 * 128) }, { AOM_CDF2(208 * 128) }, { AOM_CDF2(208 * 128) },
  { AOM_CDF2(208 * 128) }, { AOM_CDF2(208 * 128) }, { AOM_CDF2(208 * 128) },
839
#if CONFIG_EXT_PARTITION
840
  { AOM_CDF2(252 * 128) }, { AOM_CDF2(252 * 128) },
841
#endif  // CONFIG_EXT_PARTITION
842
};
843

Thomas Davies's avatar
Thomas Davies committed
844
static const aom_cdf_prob default_delta_q_cdf[CDF_SIZE(DELTA_Q_PROBS + 1)] = {
845
  AOM_CDF4(28160, 32120, 32677)
Thomas Davies's avatar
Thomas Davies committed
846
};
Fangwen Fu's avatar
Fangwen Fu committed
847
#if CONFIG_EXT_DELTA_Q
848
#if CONFIG_LOOPFILTER_LEVEL
849 850 851 852 853
static const aom_cdf_prob default_delta_lf_multi_cdf[FRAME_LF_COUNT][CDF_SIZE(
    DELTA_LF_PROBS + 1)] = { { AOM_CDF4(28160, 32120, 32677) },
                             { AOM_CDF4(28160, 32120, 32677) },
                             { AOM_CDF4(28160, 32120, 32677) },
                             { AOM_CDF4(28160, 32120, 32677) } };
854
#endif  // CONFIG_LOOPFILTER_LEVEL
Fangwen Fu's avatar
Fangwen Fu committed
855
static const aom_cdf_prob default_delta_lf_cdf[CDF_SIZE(DELTA_LF_PROBS + 1)] = {
856
  AOM_CDF4(28160, 32120, 32677)
Fangwen Fu's avatar
Fangwen Fu committed
857 858
};
#endif
859

860 861 862 863 864 865 866
static const aom_cdf_prob default_intra_inter_cdf[INTRA_INTER_CONTEXTS]
                                                 [CDF_SIZE(2)] = {
                                                   { AOM_CDF2(768) },
                                                   { AOM_CDF2(12416) },
                                                   { AOM_CDF2(19328) },
                                                   { AOM_CDF2(26240) }
                                                 };
867

Yaowu Xu's avatar
Yaowu Xu committed
868
static const aom_prob default_comp_inter_p[COMP_INTER_CONTEXTS] = {
869
  190, 156, 91, 77, 22
Jingning Han's avatar
Jingning Han committed
870
};
871

872
static const aom_cdf_prob default_comp_inter_cdf[COMP_INTER_CONTEXTS][CDF_SIZE(
873 874 875 876 877
    2)] = { { AOM_CDF2(24290) },
            { AOM_CDF2(19956) },
            { AOM_CDF2(11641) },
            { AOM_CDF2(9804) },
            { AOM_CDF2(2842) } };
Jingning Han's avatar
Jingning Han committed
878

Zoe Liu's avatar
Zoe Liu committed
879 880
#if CONFIG_EXT_COMP_REFS
static const aom_prob default_comp_ref_type_p[COMP_REF_TYPE_CONTEXTS] = {
881
  8, 20, 78, 91, 194
Zoe Liu's avatar
Zoe Liu committed