| /* |
| * Copyright (c) 2016, Alliance for Open Media. All rights reserved |
| * |
| * 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. |
| */ |
| |
| #include "aom_mem/aom_mem.h" |
| |
| #include "av1/common/reconinter.h" |
| #include "av1/common/scan.h" |
| #include "av1/common/onyxc_int.h" |
| #include "av1/common/seg_common.h" |
| #if CONFIG_LV_MAP |
| #include "av1/common/txb_common.h" |
| #endif |
| |
| #if CONFIG_LV_MAP |
| #include "av1/common/txb_common.h" |
| const aom_prob default_txb_skip[TX_SIZES][TXB_SKIP_CONTEXTS] = { |
| { 252, 71, 126, 184, 178, 218, 251, 49, 133, 221, 27, 92, 197 }, |
| { 252, 71, 126, 184, 178, 218, 251, 49, 133, 221, 27, 92, 197 }, |
| { 252, 71, 126, 184, 178, 218, 251, 49, 133, 221, 27, 92, 197 }, |
| { 252, 71, 126, 184, 178, 218, 251, 49, 133, 221, 27, 92, 197 }, |
| }; |
| const aom_prob default_dc_sign[PLANE_TYPES][DC_SIGN_CONTEXTS] = { |
| { 125, 102, 147 }, { 119, 101, 135 }, |
| }; |
| |
| #if USE_CAUSAL_BASE_CTX |
| 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, |
| 128, 128, 128, 128, 128, 128, 128, 128, 128 } } } |
| }; |
| |
| 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, |
| 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } } |
| }; |
| |
| #else // USE_CAUSAL_BASE_CTX |
| |
| const aom_prob default_coeff_base |
| [TX_SIZES][PLANE_TYPES][NUM_BASE_LEVELS][COEFF_BASE_CONTEXTS] = { |
| { { { |
| 230, 199, 168, 74, 128, 169, 213, 173, 87, 21, 60, 117, 213, |
| 177, 126, 22, 64, 121, 206, 168, 67, 10, 33, 96, 140, |
| }, |
| { |
| 236, 218, 201, 124, 185, 219, 223, 196, 128, 65, 127, 176, 224, |
| 199, 151, 75, 131, 177, 217, 190, 102, 38, 93, 161, 192, |
| } }, |
| { { |
| 219, 188, 161, 46, 114, 163, 198, 154, 73, 10, 43, 101, 199, |
| 160, 89, 12, 49, 111, 186, 136, 62, 2, 15, 66, 123, |
| }, |
| { |
| 228, 210, 191, 108, 177, 215, 213, 183, 125, 58, 112, 169, 212, |
| 183, 134, 65, 120, 171, 206, 166, 90, 27, 73, 140, 173, |
| } } }, |
| |
| { { { |
| 232, 198, 164, 85, 124, 169, 207, 156, 49, 9, 42, 97, 208, |
| 160, 90, 11, 45, 101, 198, 145, 50, 2, 15, 66, 120, |
| }, |
| { |
| 237, 218, 199, 123, 187, 222, 219, 187, 101, 54, 117, 167, 221, |
| 189, 125, 61, 121, 171, 212, 175, 81, 27, 78, 147, 185, |
| } }, |
| { { |
| 204, 165, 154, 39, 100, 144, 173, 117, 42, 7, 27, 71, 156, |
| 108, 52, 9, 32, 78, 165, 117, 46, 2, 12, 55, 102, |
| }, |
| { |
| 225, 204, 183, 99, 173, 149, 205, 167, 88, 47, 99, 160, 186, |
| 149, 88, 48, 98, 157, 183, 148, 76, 34, 75, 133, 187, |
| } } }, |
| |
| { { { |
| 231, 199, 182, 107, 136, 172, 200, 148, 55, 8, 35, 87, 204, |
| 150, 72, 10, 37, 89, 184, 127, 36, 1, 9, 47, 103, |
| }, |
| { |
| 236, 217, 206, 128, 188, 222, 213, 180, 98, 51, 113, 166, 218, |
| 182, 115, 55, 115, 167, 200, 162, 66, 22, 70, 135, 178, |
| } }, |
| { { |
| 229, 200, 220, 56, 123, 179, 184, 123, 64, 8, 24, 62, 177, |
| 118, 55, 8, 27, 70, 158, 101, 8, 1, 12, 54, 107, |
| }, |
| { |
| 232, 222, 223, 108, 195, 154, 213, 184, 71, 41, 101, 154, 206, |
| 164, 109, 42, 96, 162, 182, 137, 5, 33, 81, 146, 177, |
| } } }, |
| { { { |
| 232, 208, 213, 120, 151, 192, 200, 152, 57, 13, 44, 94, 200, |
| 148, 87, 13, 42, 94, 181, 124, 45, 1, 9, 46, 99, |
| }, |
| { |
| 241, 226, 222, 129, 197, 179, 213, 184, 133, 57, 119, 168, 214, |
| 178, 116, 64, 119, 162, 199, 157, 64, 24, 70, 130, 176, |
| } }, |
| { { |
| 233, 223, 202, 65, 131, 128, 178, 138, 128, 2, 24, 59, 99, |
| 111, 73, 3, 17, 52, 149, 99, 19, 2, 18, 72, 140, |
| }, |
| { |
| 240, 199, 230, 79, 181, 128, 192, 198, 128, 64, 121, 171, 192, |
| 148, 37, 26, 83, 85, 183, 149, 8, 33, 101, 168, 128, |
| } } } |
| }; |
| |
| static const aom_prob default_nz_map[TX_SIZES][PLANE_TYPES][SIG_COEF_CONTEXTS] = |
| { { { 40, 157, 108, 70, 34, 19, 168, 98, 60, 32, 20, 128, |
| 128, 128, 128, 128, 128, 128, 128, 128, 128, 125, 80, 41, |
| 128, 128, 173, 120, 81, 36, 128, 188, 127, 84, 35, 128, |
| 183, 128, 60, 128, 128, 128, 170, 122, 82, 35, 128, 186, |
| 129, 84, 34, 128, 183, 128, 56, 128, 128, 128 }, |
| { 67, 176, 120, 77, 44, 26, 182, 124, 77, 47, 32, 128, |
| 128, 128, 128, 128, 128, 128, 128, 128, 128, 163, 127, 74, |
| 128, 128, 203, 167, 122, 70, 128, 202, 171, 125, 72, 128, |
| 198, 176, 105, 128, 128, 128, 192, 160, 108, 67, 128, 186, |
| 160, 113, 74, 128, 188, 173, 121, 128, 128, 128 } }, |
| { { 55, 192, 143, 93, 43, 17, 201, 155, 101, 50, 22, 171, 124, 76, 38, |
| 17, 176, 123, 77, 40, 19, 205, 148, 99, 53, 26, 200, 140, 94, 52, |
| 24, 218, 157, 103, 58, 28, 221, 161, 109, 63, 34, 128, 194, 144, 96, |
| 52, 24, 212, 160, 104, 59, 26, 216, 161, 105, 57, 27, 128 }, |
| { 84, 190, 149, 102, 59, 29, 204, 159, 111, 69, 41, 200, |
| 151, 98, 54, 32, 193, 143, 98, 69, 46, 216, 167, 111, |
| 65, 37, 211, 174, 123, 62, 23, 222, 184, 137, 79, 43, |
| 222, 195, 148, 87, 128, 128, 199, 160, 119, 92, 55, 185, |
| 147, 98, 70, 57, 197, 169, 122, 82, 68, 128 } }, |
| { { 56, 204, 126, 80, 41, 16, 218, 157, 100, 50, 22, 211, 142, 92, 47, |
| 21, 212, 150, 98, 50, 22, 230, 172, 118, 65, 32, 223, 134, 91, 50, |
| 22, 237, 167, 109, 60, 31, 239, 182, 128, 78, 40, 128, 209, 138, 90, |
| 52, 25, 223, 160, 105, 62, 30, 228, 173, 119, 72, 36, 128 }, |
| { 79, 201, 140, 99, 64, 37, 225, 175, 128, 78, 35, 215, |
| 151, 108, 49, 24, 211, 173, 138, 100, 44, 241, 185, 136, |
| 95, 39, 210, 109, 89, 43, 128, 234, 144, 73, 85, 128, |
| 252, 212, 121, 64, 128, 128, 216, 167, 127, 99, 102, 211, |
| 182, 168, 129, 110, 202, 157, 101, 66, 42, 128 } }, |
| { { 41, 177, 92, 53, 29, 14, 218, 137, 87, 47, 20, 201, |
| 124, 80, 50, 29, 208, 151, 104, 59, 27, 244, 173, 113, |
| 66, 36, 233, 105, 76, 53, 23, 249, 163, 97, 98, 128, |
| 254, 192, 136, 97, 47, 128, 237, 137, 86, 54, 31, 244, |
| 157, 100, 60, 33, 241, 177, 115, 68, 33, 128 }, |
| { 73, 231, 149, 83, 63, 64, 242, 192, 132, 113, 114, 128, |
| 128, 128, 128, 128, 128, 128, 128, 128, 128, 252, 204, 160, |
| 114, 36, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, |
| 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, |
| 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } } }; |
| #endif // USE_CAUSAL_BASE_CTX |
| |
| #if CONFIG_CTX1D |
| const aom_prob default_eob_flag[TX_SIZES][PLANE_TYPES][EOB_COEF_CONTEXTS] = { |
| { { 220, 225, 220, 216, 233, 225, 189, 178, 222, 199, 164, 112, 207, |
| 171, 115, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, |
| |
| 147, 125, 104, 36, 117, 107, 26, 128, 128, 128, 128, 128, 128, |
| 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, |
| |
| 156, 124, 128, 128, 146, 68, 128, 128, 131, 17, 128, 128, 64, |
| 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, |
| |
| { 146, 150, 142, 144, 178, 167, 131, 116, 150, 123, 107, 63, 119, |
| 89, 74, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, |
| |
| 117, 127, 105, 69, 53, 56, 30, 128, 128, 128, 128, 128, 128, |
| 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, |
| |
| 128, 86, 128, 128, 140, 72, 128, 128, 120, 44, 128, 128, 80, |
| 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } }, |
| { { 237, 242, 242, 219, 192, 246, 246, 243, 233, 184, 155, 234, 217, |
| 188, 152, 195, 167, 114, 89, 128, 128, 128, 128, 128, 128, |
| |
| 180, 173, 154, 133, 112, 147, 145, 142, 102, 128, 128, 128, 128, |
| 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, |
| |
| 198, 173, 130, 200, 128, 208, 182, 160, 106, 171, 128, 144, 128, |
| 128, 128, 124, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, |
| |
| { 140, 170, 162, 111, 94, 182, 195, 165, 153, 110, 81, 178, 169, |
| 158, 83, 133, 85, 85, 38, 128, 128, 128, 128, 128, 128, |
| |
| 112, 127, 107, 87, 31, 57, 49, 128, 128, 128, 128, 128, 128, |
| 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, |
| |
| 160, 143, 99, 126, 128, 164, 133, 126, 59, 71, 128, 138, 128, |
| 128, 128, 99, 128, 128, 128, 128, 128, 128, 128, 128, 128 } }, |
| { { 229, 241, 243, 245, 247, 247, 251, 248, 235, 210, 247, 235, 208, |
| 166, 245, 247, 244, 182, 236, 229, 180, 136, 128, 128, 128, |
| |
| 191, 197, 96, 70, 199, 128, 128, 191, 174, 117, 128, 128, 128, |
| 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, |
| |
| 211, 183, 215, 188, 138, 209, 136, 128, 170, 128, 191, 128, 161, |
| 128, 182, 128, 128, 128, 164, 128, 128, 128, 128, 128, 128 }, |
| |
| { 106, 153, 182, 191, 186, 202, 211, 203, 166, 147, 205, 205, 195, |
| 128, 206, 212, 182, 109, 192, 154, 139, 79, 128, 128, 128, |
| |
| 112, 133, 128, 255, 128, 128, 128, 130, 154, 98, 128, 128, 128, |
| 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, |
| |
| 144, 185, 169, 199, 85, 183, 128, 128, 64, 128, 146, 128, 128, |
| 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } }, |
| { { 169, 203, 224, 222, 220, 228, 229, 223, 234, 247, 242, 230, 222, |
| 238, 246, 234, 196, 245, 249, 245, 192, 240, 235, 199, 161, |
| |
| 176, 148, 158, 77, 178, 128, 128, 158, 128, 128, 196, 208, 155, |
| 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, |
| |
| 232, 187, 191, 221, 116, 217, 154, 128, 203, 128, 128, 192, 128, |
| 201, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, |
| |
| { 133, 182, 215, 204, 176, 220, 182, 168, 187, 197, 181, 145, 75, |
| 164, 136, 51, 57, 156, 128, 128, 128, 85, 128, 128, 128, |
| |
| 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, |
| 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, |
| |
| 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, |
| 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } }, |
| }; |
| #else // CONFIG_CTX1D |
| static const aom_prob |
| default_eob_flag[TX_SIZES][PLANE_TYPES][EOB_COEF_CONTEXTS] = { |
| { { 225, 240, 225, 200, 128, 128, 128, 128, 128, 128, 128, |
| 245, 246, 238, 203, 128, 128, 128, 128, 128, 128, 128 }, |
| { 181, 219, 192, 144, 128, 128, 128, 128, 128, 128, 128, |
| 218, 231, 199, 152, 128, 128, 128, 128, 128, 128, 128 } }, |
| { { 233, 247, 240, 234, 211, 194, 128, 128, 128, 128, 128, |
| 252, 252, 249, 242, 221, 208, 128, 128, 128, 128, 128 }, |
| { 154, 222, 204, 180, 132, 128, 128, 128, 128, 128, 128, |
| 216, 235, 206, 181, 121, 112, 128, 128, 128, 128, 128 } }, |
| { { 233, 246, 241, 238, 231, 216, 186, 171, 128, 128, 128, |
| 251, 252, 251, 244, 233, 218, 192, 191, 128, 128, 128 }, |
| { 117, 221, 214, 223, 215, 202, 176, 116, 128, 128, 128, |
| 205, 234, 219, 183, 195, 126, 76, 128, 128, 128, 128 } }, |
| { { 194, 231, 213, 215, 207, 200, 183, 169, 135, 168, 128, |
| 240, 246, 243, 238, 210, 201, 172, 133, 107, 128, 128 }, |
| { 122, 232, 230, 244, 250, 247, 252, 253, 254, 52, 128, |
| 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } } |
| }; |
| |
| static const aom_prob |
| default_eob_extra[TX_SIZES][PLANE_TYPES][EOB_COEF_CONTEXTS] = { |
| { { |
| 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, |
| 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, |
| }, |
| { |
| 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, |
| 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, |
| } }, |
| { { |
| 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, |
| 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, |
| }, |
| { |
| 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, |
| 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, |
| } }, |
| { { |
| 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, |
| 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, |
| }, |
| { |
| 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, |
| 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, |
| } }, |
| { { |
| 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, |
| 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, |
| }, |
| { |
| 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, |
| 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, |
| } } |
| }; |
| #endif // CONFIG_CTX1D |
| |
| const aom_prob default_coeff_lps[TX_SIZES][PLANE_TYPES][LEVEL_CONTEXTS] = { |
| { { 96, 128, 86, 122, 128, 84, 125, 128, 88, 99, 126, 128, |
| 135, 159, 99, 130, 134, 100, 128, 144, 70, 97, 128, 139, |
| 157, 168, 127, 148, 162, 121, 149, 157, 118, 127, 143, 157, |
| 178, 186, 168, 171, 183, 165, 169, 180, 180, 169, 166, 177 }, |
| { 81, 128, 72, 95, 128, 64, 98, 128, 42, 66, 101, 128, |
| 129, 163, 97, 122, 130, 91, 119, 141, 70, 94, 118, 166, |
| 157, 168, 117, 143, 151, 111, 144, 154, 76, 113, 128, 158, |
| 177, 185, 165, 167, 179, 155, 166, 179, 110, 137, 115, 165 } }, |
| { { 102, 128, 79, 125, 128, 74, 121, 128, 61, 98, 128, 128, |
| 141, 164, 96, 132, 150, 90, 128, 153, 62, 100, 128, 153, |
| 162, 172, 120, 146, 162, 113, 142, 154, 96, 113, 138, 155, |
| 181, 188, 151, 170, 179, 147, 167, 181, 158, 157, 163, 176 }, |
| { 103, 128, 80, 116, 128, 66, 94, 128, 35, 65, 109, 128, |
| 134, 163, 104, 137, 154, 92, 128, 104, 58, 94, 129, 132, |
| 156, 173, 137, 149, 165, 104, 143, 143, 112, 101, 133, 159, |
| 176, 186, 134, 172, 175, 155, 169, 177, 255, 107, 137, 168 } }, |
| { { 125, 128, 85, 157, 128, 82, 155, 128, 42, 83, 116, 128, |
| 155, 174, 101, 144, 155, 93, 140, 155, 57, 92, 124, 149, |
| 173, 178, 114, 148, 161, 111, 145, 161, 77, 101, 131, 153, |
| 190, 191, 140, 169, 183, 140, 169, 179, 108, 122, 150, 171 }, |
| { 136, 128, 108, 163, 128, 96, 140, 128, 48, 90, 85, 128, |
| 144, 164, 113, 158, 179, 107, 159, 128, 43, 75, 133, 160, |
| 157, 184, 144, 160, 189, 154, 152, 184, 128, 124, 137, 140, |
| 188, 196, 148, 170, 178, 128, 177, 159, 128, 179, 135, 135 } }, |
| { { 133, 128, 110, 153, 128, 101, 157, 128, 49, 91, 134, 128, |
| 151, 168, 129, 158, 162, 112, 154, 168, 63, 99, 130, 158, |
| 171, 178, 128, 160, 173, 111, 155, 171, 86, 108, 143, 159, |
| 194, 196, 162, 177, 185, 123, 172, 181, 101, 132, 156, 178 }, |
| { 133, 128, 129, 144, 128, 116, 135, 128, 43, 101, 100, 128, |
| 140, 163, 158, 173, 205, 128, 165, 171, 128, 128, 210, 163, |
| 172, 184, 192, 176, 201, 183, 177, 190, 128, 192, 199, 144, |
| 192, 192, 1, 196, 192, 255, 171, 178, 255, 128, 171, 179 } } |
| }; |
| |
| 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, |
| 125, 159, 128, 173, 212, 128, 85, 189, 128, 128, 255, 171 } } } |
| }; |
| #if CONFIG_CTX1D |
| static const aom_prob default_eob_mode[TX_SIZES][PLANE_TYPES][TX_CLASSES] = { |
| { { 128, 176, 157 }, { 128, 222, 198 } }, |
| { { 128, 35, 56 }, { 128, 203, 225 } }, |
| { { 128, 55, 136 }, { 128, 230, 253 } }, |
| { { 128, 101, 188 }, { 128, 128, 128 } } |
| }; |
| static const aom_prob default_empty_line[TX_SIZES][PLANE_TYPES][TX_CLASSES] |
| [EMPTY_LINE_CONTEXTS] = { |
| { { { 128, 128, 128, 128, 128 }, |
| { 142, 153, 211, 205, 128 }, |
| { 162, 142, 203, 197, 128 } }, |
| { { 128, 128, 128, 128, 128 }, |
| { 133, 116, 178, 123, 128 }, |
| { 139, 109, 159, 115, 128 } } }, |
| { { { 128, 128, 128, 128, 128 }, |
| { 185, 130, 183, 204, 227 }, |
| { 171, 81, 177, 200, 221 } }, |
| { { 128, 128, 128, 128, 128 }, |
| { 180, 127, 175, 189, 213 }, |
| { 120, 74, 129, 134, 156 } } }, |
| { { { 128, 128, 128, 128, 128 }, |
| { 202, 82, 183, 214, 248 }, |
| { 144, 41, 163, 185, 203 } }, |
| { { 128, 128, 128, 128, 128 }, |
| { 151, 93, 171, 224, 160 }, |
| { 128, 51, 171, 128, 1 } } }, |
| { { { 128, 128, 128, 128, 128 }, |
| { 154, 48, 174, 210, 233 }, |
| { 123, 16, 148, 189, 197 } }, |
| { { 128, 128, 128, 128, 128 }, |
| { 128, 128, 128, 128, 128 }, |
| { 128, 128, 128, 128, 128 } } } |
| }; |
| static const aom_prob |
| default_hv_eob[TX_SIZES][PLANE_TYPES][TX_CLASSES][HV_EOB_CONTEXTS] = { |
| { { { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, |
| 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, |
| { 151, 173, 114, 128, 128, 128, 128, 128, 128, 162, 198, 128, |
| 128, 128, 128, 128, 182, 198, 109, 128, 128, 128, 128, 128 }, |
| { 152, 173, 119, 128, 128, 128, 128, 128, 128, 164, 193, 128, |
| 128, 128, 128, 128, 198, 209, 121, 128, 128, 128, 128, 128 } }, |
| { { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, |
| 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, |
| { 123, 143, 70, 128, 128, 128, 128, 128, 128, 127, 154, 128, |
| 128, 128, 128, 128, 176, 148, 36, 128, 128, 128, 128, 128 }, |
| { 132, 152, 73, 128, 128, 128, 128, 128, 128, 127, 159, 128, |
| 128, 128, 128, 128, 186, 181, 48, 128, 128, 128, 128, 128 } } }, |
| { { { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, |
| 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, |
| { 109, 105, 78, 44, 128, 128, 128, 128, 128, 146, 185, 221, |
| 128, 128, 128, 128, 199, 188, 134, 69, 128, 128, 128, 128 }, |
| { 124, 127, 115, 82, 128, 128, 128, 128, 128, 162, 198, 224, |
| 128, 128, 128, 128, 206, 214, 177, 135, 128, 128, 128, 128 } }, |
| { { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, |
| 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, |
| { 95, 102, 65, 14, 128, 128, 128, 128, 128, 132, 164, 199, |
| 128, 128, 128, 128, 162, 163, 66, 27, 128, 128, 128, 128 }, |
| { 83, 141, 97, 38, 128, 128, 128, 128, 128, 154, 132, 184, |
| 128, 128, 128, 128, 194, 218, 112, 63, 128, 128, 128, 128 } } }, |
| { { { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, |
| 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, |
| { 117, 107, 86, 61, 51, 104, 128, 128, 128, 160, 198, 238, |
| 252, 251, 128, 128, 221, 223, 209, 186, 99, 81, 128, 128 }, |
| { 118, 122, 121, 100, 91, 97, 128, 128, 128, 168, 190, 214, |
| 233, 235, 128, 128, 197, 216, 177, 165, 147, 126, 128, 128 } }, |
| { { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, |
| 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, |
| { 109, 102, 63, 51, 255, 85, 128, 128, 128, 163, 131, 175, |
| 128, 128, 128, 128, 183, 102, 40, 1, 128, 128, 128, 128 }, |
| { 255, 255, 1, 1, 128, 1, 128, 128, 128, 1, 128, 128, |
| 128, 128, 128, 128, 255, 1, 128, 128, 128, 128, 128, 128 } } }, |
| { { { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, |
| 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, |
| { 114, 108, 83, 61, 53, 28, 77, 177, 128, 161, 187, 218, |
| 240, 237, 228, 234, 200, 207, 167, 136, 98, 78, 183, 128 }, |
| { 117, 138, 116, 77, 75, 85, 26, 1, 128, 197, 162, 200, |
| 184, 212, 225, 236, 189, 225, 168, 124, 144, 171, 128, 128 } }, |
| { { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, |
| 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, |
| { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, |
| 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, |
| { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, |
| 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } } } |
| }; |
| #endif // CONFIG_CTX1D |
| #endif // CONFIG_LV_MAP |
| |
| #if CONFIG_EXT_PARTITION_TYPES |
| static const aom_prob |
| default_partition_probs[PARTITION_CONTEXTS][EXT_PARTITION_TYPES - 1] = { |
| // 8x8 -> 4x4 |
| { 199, 122, 141, 128, 128, 128, 255, 128, 255 }, // a/l both not split |
| { 147, 63, 159, 128, 128, 128, 255, 128, 255 }, // a split, l not split |
| { 148, 133, 118, 128, 128, 128, 255, 128, 255 }, // l split, a not split |
| { 121, 104, 114, 128, 128, 128, 255, 128, 255 }, // a/l both split |
| // 16x16 -> 8x8 |
| { 174, 73, 87, 128, 128, 128, 255, 128, 255 }, // a/l both not split |
| { 92, 41, 83, 128, 128, 128, 255, 128, 255 }, // a split, l not split |
| { 82, 99, 50, 128, 128, 128, 255, 128, 255 }, // l split, a not split |
| { 53, 39, 39, 128, 128, 128, 255, 128, 255 }, // a/l both split |
| // 32x32 -> 16x16 |
| { 177, 58, 59, 128, 128, 85, 128, 85, 128 }, // a/l both not split |
| { 68, 26, 63, 128, 128, 85, 128, 85, 128 }, // a split, l not split |
| { 52, 79, 25, 128, 128, 85, 128, 85, 128 }, // l split, a not split |
| { 17, 14, 12, 128, 128, 85, 128, 85, 128 }, // a/l both split |
| // 64x64 -> 32x32 |
| { 222, 34, 30, 128, 128, 85, 128, 85, 128 }, // a/l both not split |
| { 72, 16, 44, 128, 128, 85, 128, 85, 128 }, // a split, l not split |
| { 58, 32, 12, 128, 128, 85, 128, 85, 128 }, // l split, a not split |
| { 10, 7, 6, 128, 128, 85, 128, 85, 128 }, // a/l both split |
| #if CONFIG_EXT_PARTITION |
| // 128x128 -> 64x64 |
| { 222, 34, 30, 128, 128, 128, 255, 128, 255 }, // a/l both not split |
| { 72, 16, 44, 128, 128, 128, 255, 128, 255 }, // a split, l not split |
| { 58, 32, 12, 128, 128, 128, 255, 128, 255 }, // l split, a not split |
| { 10, 7, 6, 128, 128, 128, 255, 128, 255 }, // a/l both split |
| #endif // CONFIG_EXT_PARTITION |
| #if CONFIG_UNPOISON_PARTITION_CTX |
| { 0, 0, 141, 0, 0, 0, 0, 0, 0 }, // 8x8 -> 4x4 |
| { 0, 0, 87, 0, 0, 0, 0, 0, 0 }, // 16x16 -> 8x8 |
| { 0, 0, 59, 0, 0, 0, 0, 0, 0 }, // 32x32 -> 16x16 |
| { 0, 0, 30, 0, 0, 0, 0, 0, 0 }, // 64x64 -> 32x32 |
| #if CONFIG_EXT_PARTITION |
| { 0, 0, 30, 0, 0, 0, 0, 0, 0 }, // 128x128 -> 64x64 |
| #endif // CONFIG_EXT_PARTITION |
| { 0, 122, 0, 0, 0, 0, 0, 0, 0 }, // 8x8 -> 4x4 |
| { 0, 73, 0, 0, 0, 0, 0, 0, 0 }, // 16x16 -> 8x8 |
| { 0, 58, 0, 0, 0, 0, 0, 0, 0 }, // 32x32 -> 16x16 |
| { 0, 34, 0, 0, 0, 0, 0, 0, 0 }, // 64x64 -> 32x32 |
| #if CONFIG_EXT_PARTITION |
| { 0, 34, 0, 0, 0, 0, 0, 0, 0 }, // 128x128 -> 64x64 |
| #endif // CONFIG_EXT_PARTITION |
| #endif // CONFIG_UNPOISON_PARTITION_CTX |
| }; |
| #else |
| static const aom_prob |
| default_partition_probs[PARTITION_CONTEXTS][PARTITION_TYPES - 1] = { |
| // 8x8 -> 4x4 |
| { 199, 122, 141 }, // a/l both not split |
| { 147, 63, 159 }, // a split, l not split |
| { 148, 133, 118 }, // l split, a not split |
| { 121, 104, 114 }, // a/l both split |
| // 16x16 -> 8x8 |
| { 174, 73, 87 }, // a/l both not split |
| { 92, 41, 83 }, // a split, l not split |
| { 82, 99, 50 }, // l split, a not split |
| { 53, 39, 39 }, // a/l both split |
| // 32x32 -> 16x16 |
| { 177, 58, 59 }, // a/l both not split |
| { 68, 26, 63 }, // a split, l not split |
| { 52, 79, 25 }, // l split, a not split |
| { 17, 14, 12 }, // a/l both split |
| // 64x64 -> 32x32 |
| { 222, 34, 30 }, // a/l both not split |
| { 72, 16, 44 }, // a split, l not split |
| { 58, 32, 12 }, // l split, a not split |
| { 10, 7, 6 }, // a/l both split |
| #if CONFIG_EXT_PARTITION |
| // 128x128 -> 64x64 |
| { 222, 34, 30 }, // a/l both not split |
| { 72, 16, 44 }, // a split, l not split |
| { 58, 32, 12 }, // l split, a not split |
| { 10, 7, 6 }, // a/l both split |
| #endif // CONFIG_EXT_PARTITION |
| #if CONFIG_UNPOISON_PARTITION_CTX |
| { 0, 0, 141 }, // 8x8 -> 4x4 |
| { 0, 0, 87 }, // 16x16 -> 8x8 |
| { 0, 0, 59 }, // 32x32 -> 16x16 |
| { 0, 0, 30 }, // 64x64 -> 32x32 |
| #if CONFIG_EXT_PARTITION |
| { 0, 0, 30 }, // 128x128 -> 64x64 |
| #endif // CONFIG_EXT_PARTITION |
| { 0, 122, 0 }, // 8x8 -> 4x4 |
| { 0, 73, 0 }, // 16x16 -> 8x8 |
| { 0, 58, 0 }, // 32x32 -> 16x16 |
| { 0, 34, 0 }, // 64x64 -> 32x32 |
| #if CONFIG_EXT_PARTITION |
| { 0, 34, 0 }, // 128x128 -> 64x64 |
| #endif // CONFIG_EXT_PARTITION |
| #endif // CONFIG_UNPOISON_PARTITION_CTX |
| }; |
| #endif // CONFIG_EXT_PARTITION_TYPES |
| |
| static const aom_prob default_newmv_prob[NEWMV_MODE_CONTEXTS] = { |
| 155, 116, 94, 32, 96, 56, 30, |
| }; |
| |
| static const aom_prob default_zeromv_prob[GLOBALMV_MODE_CONTEXTS] = { |
| 45, 13, |
| }; |
| |
| static const aom_prob default_refmv_prob[REFMV_MODE_CONTEXTS] = { |
| 178, 212, 135, 244, 203, 122, 128, 128, 128, |
| }; |
| |
| static const aom_prob default_drl_prob[DRL_MODE_CONTEXTS] = { |
| 119, 128, 189, 134, 128, |
| }; |
| #if CONFIG_NEW_MULTISYMBOL |
| static const aom_cdf_prob default_newmv_cdf[NEWMV_MODE_CONTEXTS][CDF_SIZE(2)] = |
| { { 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) } }; |
| static const aom_cdf_prob default_zeromv_cdf[GLOBALMV_MODE_CONTEXTS][CDF_SIZE( |
| 2)] = { { AOM_CDF2(128 * 45) }, { AOM_CDF2(128 * 13) } }; |
| static const aom_cdf_prob default_refmv_cdf[REFMV_MODE_CONTEXTS][CDF_SIZE(2)] = |
| { |
| { 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) } |
| }; |
| static const aom_cdf_prob default_drl_cdf[DRL_MODE_CONTEXTS][CDF_SIZE(2)] = { |
| { AOM_CDF2(128 * 119) }, |
| { AOM_CDF2(128 * 128) }, |
| { AOM_CDF2(128 * 189) }, |
| { AOM_CDF2(128 * 134) }, |
| { AOM_CDF2(128 * 128) } |
| }; |
| #endif |
| |
| static const aom_prob default_inter_compound_mode_probs |
| [INTER_MODE_CONTEXTS][INTER_COMPOUND_MODES - 1] = { |
| { 154, 167, 233, 165, 143, 170, 167 }, // 0 = both zero mv |
| { 75, 168, 237, 155, 135, 176, 172 }, // 1 = 1 zero + 1 predicted |
| { 7, 173, 227, 128, 153, 188, 189 }, // 2 = two predicted mvs |
| { 8, 120, 214, 113, 154, 178, 174 }, // 3 = 1 pred/zero, 1 new |
| { 4, 85, 194, 94, 155, 173, 167 }, // 4 = two new mvs |
| { 23, 89, 180, 73, 157, 151, 155 }, // 5 = one intra neighbour |
| { 27, 49, 152, 91, 134, 153, 142 }, // 6 = two intra neighbours |
| }; |
| |
| static const aom_cdf_prob |
| default_inter_compound_mode_cdf[INTER_MODE_CONTEXTS][CDF_SIZE( |
| INTER_COMPOUND_MODES)] = { |
| { 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) } |
| }; |
| |
| #if CONFIG_COMPOUND_SINGLEREF |
| // TODO(zoeliu): Default values to be further adjusted based on the collected |
| // stats. |
| /* |
| static const aom_prob default_inter_singleref_comp_mode_probs |
| [INTER_MODE_CONTEXTS][INTER_SINGLEREF_COMP_MODES - 1] = { |
| { 2, 173, 68, 180 }, // 0 = both zero mv |
| { 7, 145, 160, 180 }, // 1 = 1 zero + 1 predicted |
| { 7, 166, 126, 180 }, // 2 = two predicted mvs |
| { 7, 94, 132, 180 }, // 3 = 1 pred/zero, 1 new |
| { 8, 64, 64, 180 }, // 4 = two new mvs |
| { 17, 81, 52, 180 }, // 5 = one intra neighbour |
| { 25, 29, 50, 180 }, // 6 = two intra neighbours |
| };*/ |
| static const aom_prob default_inter_singleref_comp_mode_probs |
| [INTER_MODE_CONTEXTS][INTER_SINGLEREF_COMP_MODES - 1] = { |
| { 2, 173, 68 }, // 0 = both zero mv |
| { 7, 145, 160 }, // 1 = 1 zero + 1 predicted |
| { 7, 166, 126 }, // 2 = two predicted mvs |
| { 7, 94, 132 }, // 3 = 1 pred/zero, 1 new |
| { 8, 64, 64 }, // 4 = two new mvs |
| { 17, 81, 52 }, // 5 = one intra neighbour |
| { 25, 29, 50 }, // 6 = two intra neighbours |
| }; |
| |
| static const aom_cdf_prob |
| default_inter_singleref_comp_mode_cdf[INTER_MODE_CONTEXTS][CDF_SIZE( |
| INTER_SINGLEREF_COMP_MODES)] = { |
| { AOM_CDF4(21971, 24771, 25027) }, { AOM_CDF4(18053, 26690, 27586) }, |
| { AOM_CDF4(20667, 26182, 27078) }, { AOM_CDF4(11703, 22103, 22999) }, |
| { AOM_CDF4(7936, 13888, 14912) }, { AOM_CDF4(9679, 13927, 16103) }, |
| { AOM_CDF4(3349, 8470, 11670) } |
| }; |
| #endif // CONFIG_COMPOUND_SINGLEREF |
| |
| static const aom_prob |
| default_compound_type_probs[BLOCK_SIZES_ALL][COMPOUND_TYPES - 1] = { |
| { 128, 128 }, { 128, 128 }, { 128, 128 }, { 128, 128 }, |
| { 255, 128 }, { 255, 128 }, { 66, 51 }, { 72, 35 }, |
| { 79, 29 }, { 71, 18 }, { 81, 29 }, { 81, 26 }, |
| { 69, 19 }, { 104, 1 }, { 99, 1 }, { 75, 1 }, |
| #if CONFIG_EXT_PARTITION |
| { 255, 1 }, { 255, 1 }, { 255, 1 }, |
| #endif // CONFIG_EXT_PARTITION |
| { 208, 128 }, { 208, 128 }, { 208, 128 }, { 208, 128 }, |
| { 208, 1 }, { 208, 1 }, |
| #if CONFIG_EXT_PARTITION |
| { 208, 1 }, { 208, 1 } |
| #endif // CONFIG_EXT_PARTITION |
| }; |
| |
| static const aom_cdf_prob |
| default_compound_type_cdf[BLOCK_SIZES_ALL][CDF_SIZE(COMPOUND_TYPES)] = { |
| { AOM_CDF3(16384, 24576) }, { AOM_CDF3(16384, 24576) }, |
| { AOM_CDF3(16384, 24576) }, { 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) }, |
| #if CONFIG_EXT_PARTITION |
| { AOM_CDF3(32640, 32641) }, // 255, 1 |
| { AOM_CDF3(32640, 32641) }, { AOM_CDF3(32640, 32641) }, |
| #endif // CONFIG_EXT_PARTITION |
| { 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) }, |
| #if CONFIG_EXT_PARTITION |
| { AOM_CDF3(26624, 26648) }, { AOM_CDF3(26624, 26648) }, |
| #endif |
| }; |
| |
| static const aom_prob default_interintra_prob[BLOCK_SIZE_GROUPS] = { |
| 128, 226, 244, 254, |
| }; |
| #if CONFIG_NEW_MULTISYMBOL |
| static const aom_cdf_prob default_interintra_cdf[BLOCK_SIZE_GROUPS][CDF_SIZE( |
| 2)] = { { AOM_CDF2(128 * 128) }, |
| { AOM_CDF2(226 * 128) }, |
| { AOM_CDF2(244 * 128) }, |
| { AOM_CDF2(254 * 128) } }; |
| #endif |
| |
| static const aom_prob |
| default_interintra_mode_prob[BLOCK_SIZE_GROUPS][INTERINTRA_MODES - 1] = { |
| { 128, 128, 128 }, // block_size < 8x8 |
| { 24, 34, 119 }, // block_size < 16x16 |
| { 38, 33, 95 }, // block_size < 32x32 |
| { 51, 21, 110 }, // block_size >= 32x32 |
| }; |
| static const aom_cdf_prob |
| 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) } }; |
| |
| static const aom_prob default_wedge_interintra_prob[BLOCK_SIZES_ALL] = { |
| 128, 128, 128, 128, 128, 128, 194, 213, |
| 217, 222, 224, 226, 220, 128, 128, 128, |
| #if CONFIG_EXT_PARTITION |
| 255, 255, 255, |
| #endif // CONFIG_EXT_PARTITION |
| 208, 208, 208, 208, 255, 255, |
| #if CONFIG_EXT_PARTITION |
| 255, 255 |
| #endif // CONFIG_EXT_PARTITION |
| }; |
| |
| #if CONFIG_NEW_MULTISYMBOL |
| static const aom_cdf_prob |
| default_wedge_interintra_cdf[BLOCK_SIZES_ALL][CDF_SIZE(2)] = { |
| { AOM_CDF2(128 * 128) }, { AOM_CDF2(128 * 128) }, { AOM_CDF2(128 * 128) }, |
| { 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) }, |
| #if CONFIG_EXT_PARTITION |
| { AOM_CDF2(255 * 128) }, { AOM_CDF2(255 * 128) }, { AOM_CDF2(255 * 128) }, |
| #endif // CONFIG_EXT_PARTITION |
| { AOM_CDF2(208 * 128) }, { AOM_CDF2(208 * 128) }, { AOM_CDF2(208 * 128) }, |
| { AOM_CDF2(208 * 128) }, { AOM_CDF2(255 * 128) }, { AOM_CDF2(255 * 128) }, |
| #if CONFIG_EXT_PARTITION |
| { AOM_CDF2(255 * 128) }, { AOM_CDF2(255 * 128) }, |
| #endif // CONFIG_EXT_PARTITION |
| }; |
| #endif // CONFIG_NEW_MULTISYMBOL |
| |
| const aom_tree_index av1_motion_mode_tree[TREE_SIZE(MOTION_MODES)] = { |
| -SIMPLE_TRANSLATION, 2, -OBMC_CAUSAL, -WARPED_CAUSAL, |
| }; |
| |
| static const aom_prob |
| default_motion_mode_prob[BLOCK_SIZES_ALL][MOTION_MODES - 1] = { |
| { 128, 128 }, { 128, 128 }, { 128, 128 }, { 128, 128 }, |
| { 128, 128 }, { 128, 128 }, { 62, 115 }, { 39, 131 }, |
| { 39, 132 }, { 118, 94 }, { 77, 125 }, { 100, 121 }, |
| { 190, 66 }, { 207, 102 }, { 197, 100 }, { 239, 76 }, |
| #if CONFIG_EXT_PARTITION |
| { 252, 200 }, { 252, 200 }, { 252, 200 }, |
| #endif // CONFIG_EXT_PARTITION |
| { 208, 200 }, { 208, 200 }, { 208, 200 }, { 208, 200 }, |
| { 208, 200 }, { 208, 200 }, |
| #if CONFIG_EXT_PARTITION |
| { 252, 200 }, { 252, 200 } |
| #endif // CONFIG_EXT_PARTITION |
| }; |
| static const aom_cdf_prob |
| default_motion_mode_cdf[BLOCK_SIZES_ALL][CDF_SIZE(MOTION_MODES)] = { |
| { AOM_CDF3(16384, 24576) }, { AOM_CDF3(16384, 24576) }, |
| { AOM_CDF3(16384, 24576) }, { AOM_CDF3(16384, 24576) }, |
| { AOM_CDF3(16384, 24576) }, { 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) }, |
| #if CONFIG_EXT_PARTITION |
| { AOM_CDF3(32256, 32656) }, { AOM_CDF3(32256, 32656) }, |
| { AOM_CDF3(32256, 32656) }, |
| #endif |
| { AOM_CDF3(32640, 32740) }, { AOM_CDF3(32640, 32740) }, |
| { AOM_CDF3(32640, 32740) }, { AOM_CDF3(32640, 32740) }, |
| { AOM_CDF3(32640, 32740) }, { AOM_CDF3(32640, 32740) }, |
| #if CONFIG_EXT_PARTITION |
| { AOM_CDF3(32256, 32656) }, { AOM_CDF3(32256, 32656) }, |
| #endif |
| }; |
| |
| // Probability for the case that only 1 additional motion mode is allowed |
| static const aom_prob default_obmc_prob[BLOCK_SIZES_ALL] = { |
| 128, 128, 128, 128, 128, 128, 45, 79, 75, 130, 141, 144, 208, 201, 186, 231, |
| #if CONFIG_EXT_PARTITION |
| 252, 252, 252, |
| #endif // CONFIG_EXT_PARTITION |
| 208, 208, 208, 208, 208, 208, |
| #if CONFIG_EXT_PARTITION |
| 252, 252 |
| #endif // CONFIG_EXT_PARTITION |
| }; |
| |
| #if CONFIG_NEW_MULTISYMBOL |
| static const aom_cdf_prob default_obmc_cdf[BLOCK_SIZES_ALL][CDF_SIZE(2)] = { |
| { AOM_CDF2(128 * 128) }, { AOM_CDF2(128 * 128) }, { AOM_CDF2(128 * 128) }, |
| { 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) }, |
| #if CONFIG_EXT_PARTITION |
| { AOM_CDF2(252 * 128) }, { AOM_CDF2(252 * 128) }, { AOM_CDF2(252 * 128) }, |
| #endif // CONFIG_EXT_PARTITION |
| { AOM_CDF2(208 * 128) }, { AOM_CDF2(208 * 128) }, { AOM_CDF2(208 * 128) }, |
| { AOM_CDF2(208 * 128) }, { AOM_CDF2(208 * 128) }, { AOM_CDF2(208 * 128) }, |
| #if CONFIG_EXT_PARTITION |
| { AOM_CDF2(252 * 128) }, { AOM_CDF2(252 * 128) }, |
| #endif // CONFIG_EXT_PARTITION |
| }; |
| #endif // CONFIG_NEW_MULTISYMBOL |
| |
| static const aom_prob default_delta_q_probs[DELTA_Q_PROBS] = { 220, 220, 220 }; |
| static const aom_cdf_prob default_delta_q_cdf[CDF_SIZE(DELTA_Q_PROBS + 1)] = { |
| AOM_CDF4(28160, 32120, 32677) |
| }; |
| #if CONFIG_EXT_DELTA_Q |
| #if CONFIG_LOOPFILTER_LEVEL |
| static const aom_prob |
| default_delta_lf_multi_probs[FRAME_LF_COUNT][DELTA_LF_PROBS] = { |
| { 220, 220, 220 }, { 220, 220, 220 }, { 220, 220, 220 }, { 220, 220, 220 } |
| }; |
| 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) } }; |
| #endif // CONFIG_LOOPFILTER_LEVEL |
| static const aom_prob default_delta_lf_probs[DELTA_LF_PROBS] = { 220, 220, |
| 220 }; |
| static const aom_cdf_prob default_delta_lf_cdf[CDF_SIZE(DELTA_LF_PROBS + 1)] = { |
| AOM_CDF4(28160, 32120, 32677) |
| }; |
| #endif |
| |
| /* clang-format off */ |
| const aom_tree_index av1_interintra_mode_tree[TREE_SIZE(INTERINTRA_MODES)] = { |
| -II_DC_PRED, 2, /* 0 = II_DC_NODE */ |
| -II_SMOOTH_PRED, 4, /* 1 = II_SMOOTH_PRED */ |
| -II_V_PRED, -II_H_PRED /* 2 = II_V_NODE */ |
| }; |
| |
| const aom_tree_index av1_inter_compound_mode_tree |
| [TREE_SIZE(INTER_COMPOUND_MODES)] = { |
| -INTER_COMPOUND_OFFSET(GLOBAL_GLOBALMV), 2, |
| -INTER_COMPOUND_OFFSET(NEAREST_NEARESTMV), 4, |
| 6, -INTER_COMPOUND_OFFSET(NEW_NEWMV), |
| -INTER_COMPOUND_OFFSET(NEAR_NEARMV), 8, |
| 10, 12, |
| -INTER_COMPOUND_OFFSET(NEAREST_NEWMV), -INTER_COMPOUND_OFFSET(NEW_NEARESTMV), |
| -INTER_COMPOUND_OFFSET(NEAR_NEWMV), -INTER_COMPOUND_OFFSET(NEW_NEARMV) |
| }; |
| |
| #if CONFIG_COMPOUND_SINGLEREF |
| // TODO(zoeliu): To redesign the tree structure once the number of mode changes. |
| /* |
| const aom_tree_index av1_inter_singleref_comp_mode_tree |
| [TREE_SIZE(INTER_SINGLEREF_COMP_MODES)] = { |
| -INTER_SINGLEREF_COMP_OFFSET(SR_ZERO_NEWMV), 2, |
| -INTER_SINGLEREF_COMP_OFFSET(SR_NEAREST_NEARMV), 4, |
| 6, -INTER_SINGLEREF_COMP_OFFSET(SR_NEW_NEWMV), |
| -INTER_SINGLEREF_COMP_OFFSET(SR_NEAREST_NEWMV), |
| -INTER_SINGLEREF_COMP_OFFSET(SR_NEAR_NEWMV) |
| };*/ |
| |
| const aom_tree_index av1_inter_singleref_comp_mode_tree |
| [TREE_SIZE(INTER_SINGLEREF_COMP_MODES)] = { |
| -INTER_SINGLEREF_COMP_OFFSET(SR_ZERO_NEWMV), 2, |
| -INTER_SINGLEREF_COMP_OFFSET(SR_NEAREST_NEARMV), 4, |
| -INTER_SINGLEREF_COMP_OFFSET(SR_NEAR_NEWMV), |
| -INTER_SINGLEREF_COMP_OFFSET(SR_NEW_NEWMV) |
| }; |
| #endif // CONFIG_COMPOUND_SINGLEREF |
| |
| const aom_tree_index av1_compound_type_tree[TREE_SIZE(COMPOUND_TYPES)] = { |
| -COMPOUND_AVERAGE, 2, -COMPOUND_WEDGE, -COMPOUND_SEG |
| }; |
| /* clang-format on */ |
| |
| const aom_tree_index av1_partition_tree[TREE_SIZE(PARTITION_TYPES)] = { |
| -PARTITION_NONE, 2, -PARTITION_HORZ, 4, -PARTITION_VERT, -PARTITION_SPLIT |
| }; |
| |
| #if CONFIG_EXT_PARTITION_TYPES |
| /* clang-format off */ |
| const aom_tree_index av1_ext_partition_tree[TREE_SIZE(EXT_PARTITION_TYPES)] = { |
| -PARTITION_NONE, 2, |
| 6, 4, |
| 8, -PARTITION_SPLIT, |
| -PARTITION_HORZ, 10, |
| -PARTITION_VERT, 14, |
| |
| -PARTITION_HORZ_A, 12, |
| -PARTITION_HORZ_B, -PARTITION_HORZ_4, |
| |
| -PARTITION_VERT_A, 16, |
| -PARTITION_VERT_B, -PARTITION_VERT_4 |
| }; |
| /* clang-format on */ |
| #endif // CONFIG_EXT_PARTITION_TYPES |
| |
| static const aom_prob default_intra_inter_p[INTRA_INTER_CONTEXTS] = { |
| 6, 97, 151, 205, |
| }; |
| |
| #if CONFIG_NEW_MULTISYMBOL |
| 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) } |
| }; |
| #endif |
| |
| static const aom_prob default_comp_inter_p[COMP_INTER_CONTEXTS] = { |
| 190, 156, 91, 77, 22 |
| }; |
| |
| #if CONFIG_NEW_MULTISYMBOL |
| static const aom_cdf_prob default_comp_inter_cdf[COMP_INTER_CONTEXTS][CDF_SIZE( |
| 2)] = { { AOM_CDF2(24290) }, |
| { AOM_CDF2(19956) }, |
| { AOM_CDF2(11641) }, |
| { AOM_CDF2(9804) }, |
| { AOM_CDF2(2842) } }; |
| #endif // CONFIG_NEW_MULTISYMBOL |
| |
| #if CONFIG_EXT_COMP_REFS |
| static const aom_prob default_comp_ref_type_p[COMP_REF_TYPE_CONTEXTS] = { |
| 8, 20, 78, 91, 194 |
| }; |
| static const aom_prob |
| default_uni_comp_ref_p[UNI_COMP_REF_CONTEXTS][UNIDIR_COMP_REFS - 1] = { |
| { 88, 30, 28 }, { 218, 97, 105 }, { 254, 180, 196 } |
| }; |
| |
| #if CONFIG_NEW_MULTISYMBOL |
| static const aom_cdf_prob default_comp_ref_type_cdf[COMP_REF_TYPE_CONTEXTS] |
| [CDF_SIZE(2)] = { |
| { AOM_CDF2(8 * 128) }, |
| { AOM_CDF2(20 * 128) }, |
| { AOM_CDF2(78 * 128) }, |
| { AOM_CDF2(91 * 128) }, |
| { AOM_CDF2(194 * 128) } |
| }; |
| static const aom_cdf_prob |
| default_uni_comp_ref_cdf[UNI_COMP_REF_CONTEXTS][UNIDIR_COMP_REFS - 1] |
| [CDF_SIZE(2)] = { { { AOM_CDF2(88 * 128) }, |
| { AOM_CDF2(30 * 128) }, |
| { AOM_CDF2(28 * 128) } }, |
| { { AOM_CDF2(218 * 128) }, |
| { AOM_CDF2(97 * 128) }, |
| { AOM_CDF2(105 * 128) } }, |
| { { AOM_CDF2(254 * 128) }, |
| { AOM_CDF2(180 * 128) }, |
| { AOM_CDF2(196 * 128) } } }; |
| #endif // CONFIG_NEW_MULTISYMBOL |
| #endif // CONFIG_EXT_COMP_REFS |
| |
| static const aom_prob default_comp_ref_p[REF_CONTEXTS][FWD_REFS - 1] = { |
| { 28, 10, 8 }, |
| { 77, 27, 26 }, |
| { 127, 62, 56 }, |
| { 186, 126, 160 }, |
| { 236, 143, 172 } |
| }; |
| |
| static const aom_prob default_comp_bwdref_p[REF_CONTEXTS][BWD_REFS - 1] = { |
| { 22, 13 }, { 140, 124 }, { 241, 239 }, { 128, 128 }, { 128, 128 } |
| }; |
| |
| #if CONFIG_NEW_MULTISYMBOL |
| static const aom_cdf_prob |
| default_comp_ref_cdf[REF_CONTEXTS][FWD_REFS - 1][CDF_SIZE(2)] = { |
| { { AOM_CDF2(3556) }, { AOM_CDF2(1217) }, { AOM_CDF2(988) } }, |
| { { AOM_CDF2(9857) }, { AOM_CDF2(3394) }, { AOM_CDF2(3303) } }, |
| { { AOM_CDF2(16237) }, { AOM_CDF2(7946) }, { AOM_CDF2(7195) } }, |
| { { AOM_CDF2(23826) }, { AOM_CDF2(16124) }, { AOM_CDF2(20536) } }, |
| { { AOM_CDF2(30195) }, { AOM_CDF2(18344) }, { AOM_CDF2(21980) } } |
| }; |
| |
| static const aom_cdf_prob |
| default_comp_bwdref_cdf[REF_CONTEXTS][BWD_REFS - 1][CDF_SIZE(2)] = { |
| { { AOM_CDF2(2762) }, { AOM_CDF2(1614) } }, |
| { { AOM_CDF2(17976) }, { AOM_CDF2(15912) } }, |
| { { AOM_CDF2(30894) }, { AOM_CDF2(30639) } }, |
| { { AOM_CDF2(32768) }, { AOM_CDF2(32768) } }, |
| { { AOM_CDF2(32768) }, { AOM_CDF2(32768) } } |
| }; |
| #endif // CONFIG_NEW_MULTISYMBOL |
| |
| static const aom_prob default_single_ref_p[REF_CONTEXTS][SINGLE_REFS - 1] = { |
| { 36, 16, 32, 57, 11, 14 }, |
| { 68, 128, 73, 128, 49, 124 }, |
| { 136, 236, 127, 170, 81, 238 }, |
| { 128, 128, 191, 211, 115, 128 }, |
| { 224, 128, 230, 242, 208, 128 } |
| }; |
| |
| #if CONFIG_NEW_MULTISYMBOL |
| static const aom_cdf_prob default_single_ref_cdf[REF_CONTEXTS][SINGLE_REFS - 1] |
| [CDF_SIZE(2)] = { |
| { { AOM_CDF2(4623) }, |
| { AOM_CDF2(2110) }, |
| { AOM_CDF2(4132) }, |
| { AOM_CDF2(7309) }, |
| { AOM_CDF2(1392) }, |
| { AOM_CDF2(1781) } }, |
| { { AOM_CDF2(8659) }, |
| { AOM_CDF2(16372) }, |
| { AOM_CDF2(9371) }, |
| { AOM_CDF2(16322) }, |
| { AOM_CDF2(6216) }, |
| { AOM_CDF2(15834) } }, |
| { { AOM_CDF2(17353) }, |
| { AOM_CDF2(30182) }, |
| { AOM_CDF2(16300) }, |
| { AOM_CDF2(21702) }, |
| { AOM_CDF2(10365) }, |
| { AOM_CDF2(30486) } }, |
| { { AOM_CDF2(32768) }, |
| { AOM_CDF2(32768) }, |
| { AOM_CDF2(24426) }, |
| { AOM_CDF2(26972) }, |
| { AOM_CDF2(14760) }, |
| { AOM_CDF2(32768) } }, |
| { { AOM_CDF2(28634) }, |
| { AOM_CDF2(32768) }, |
| { AOM_CDF2(29425) }, |
| { AOM_CDF2(30969) }, |
| { AOM_CDF2(26676) }, |
| { AOM_CDF2(32768) } } |
| }; |
| #endif // CONFIG_NEW_MULTISYMBOL |
| |
| #if CONFIG_COMPOUND_SINGLEREF |
| // TODO(zoeliu): Default values to be further adjusted based on the collected |
| // stats. |
| static const aom_prob default_comp_inter_mode_p[COMP_INTER_MODE_CONTEXTS] = { |
| 40, 110, 160, 220 |
| }; |
| #endif // CONFIG_COMPOUND_SINGLEREF |
| |
| // TODO(huisu): tune these cdfs |
| const aom_cdf_prob |
| default_palette_y_size_cdf[PALETTE_BLOCK_SIZES][CDF_SIZE(PALETTE_SIZES)] = { |
| { AOM_CDF7(12288, 19408, 24627, 26662, 28499, 30667) }, |
| { AOM_CDF7(2815, 4570, 9416, 10875, 13782, 19863) }, |
| { AOM_CDF7(3839, 5986, 11949, 13413, 16286, 21823) }, |
| { AOM_CDF7(12032, 14948, 22187, 23138, 24756, 27635) }, |
| { AOM_CDF7(14847, 20167, 25433, 26751, 28278, 30119) }, |
| { AOM_CDF7(14336, 20240, 24840, 26079, 27908, 30034) }, |
| { AOM_CDF7(18816, 25574, 29030, 29877, 30656, 31506) }, |
| { AOM_CDF7(23039, 27333, 30220, 30708, 31070, 31826) }, |
| { AOM_CDF7(13696, 18911, 23620, 25371, 29821, 31617) }, |
| { AOM_CDF7(12543, 20838, 27455, 28762, 29763, 31546) }, |
| }; |
| |
| const aom_cdf_prob default_palette_uv_size_cdf[PALETTE_BLOCK_SIZES][CDF_SIZE( |
| PALETTE_SIZES)] = { |
| { AOM_CDF7(20480, 29888, 32453, 32715, 32751, 32766) }, |
| { AOM_CDF7(11135, 23641, 31056, 31998, 32496, 32668) }, |
| { AOM_CDF7(9216, 23108, 30806, 31871, 32414, 32637) }, |
| { AOM_CDF7(9984, 21999, 29192, 30645, 31640, 32402) }, |
| { AOM_CDF7(7552, 16614, 24880, 27283, 29254, 31203) }, |
| { AOM_CDF7(9600, 20279, 27548, 29261, 30494, 31631) }, |
| { AOM_CDF7(11391, 18656, 23727, 26058, 27788, 30278) }, |
| { AOM_CDF7(8576, 13585, 17632, 20884, 23948, 27152) }, |
| { AOM_CDF7(15360, 24200, 26978, 30846, 31409, 32545) }, |
| { AOM_CDF7(9216, 14276, 19043, 22689, 25799, 28712) }, |
| }; |
| |
| // When palette mode is enabled, following probability tables indicate the |
| // probabilities to code the "is_palette" bit (i.e. the bit that indicates |
| // if this block uses palette mode or DC_PRED mode). |
| const aom_prob av1_default_palette_y_mode_prob[PALETTE_BLOCK_SIZES] |
| [PALETTE_Y_MODE_CONTEXTS] = { |
| { 240, 180, 100 }, |
| { 240, 180, 100 }, |
| { 240, 180, 100 }, |
| { 240, 180, 100 }, |
| { 240, 180, 100 }, |
| { 240, 180, 100 }, |
| { 240, 180, 100 }, |
| { 240, 180, 100 }, |
| { 240, 180, 100 }, |
| { 240, 180, 100 }, |
| }; |
| |
| const aom_prob av1_default_palette_uv_mode_prob[PALETTE_UV_MODE_CONTEXTS] = { |
| 253, 229 |
| }; |
| |
| #if CONFIG_NEW_MULTISYMBOL |
| const aom_cdf_prob default_palette_y_mode_cdf[PALETTE_BLOCK_SIZES] |
| [PALETTE_Y_MODE_CONTEXTS] |
| [CDF_SIZE(2)] = { |
| { { AOM_CDF2(128 * 240) }, |
| { AOM_CDF2(128 * 180) }, |
| { AOM_CDF2(128 * 100) } }, |
| { { AOM_CDF2(128 * 240) }, |
| { AOM_CDF2(128 * 180) }, |
| { AOM_CDF2(128 * 100) } }, |
| { { AOM_CDF2(128 * 240) }, |
| { AOM_CDF2(128 * 180) }, |
| { AOM_CDF2(128 * 100) } }, |
| { { AOM_CDF2(128 * 240) }, |
| { AOM_CDF2(128 * 180) }, |
| { AOM_CDF2(128 * 100) } }, |
| { { AOM_CDF2(128 * 240) }, |
| { AOM_CDF2(128 * 180) }, |
| { AOM_CDF2(128 * 100) } }, |
| { { AOM_CDF2(128 * 240) }, |
| { AOM_CDF2(128 * 180) }, |
| { AOM_CDF2(128 * 100) } }, |
| { { AOM_CDF2(128 * 240) }, |
| { AOM_CDF2(128 * 180) }, |
| { AOM_CDF2(128 * 100) } }, |
| { { AOM_CDF2(128 * 240) }, |
| { AOM_CDF2(128 * 180) }, |
| { AOM_CDF2(128 * 100) } }, |
| { { AOM_CDF2(128 * 240) }, |
| { AOM_CDF2(128 * 180) }, |
| { AOM_CDF2(128 * 100) } }, |
| { { AOM_CDF2(128 * 240) }, |
| { AOM_CDF2(128 * 180) }, |
| { AOM_CDF2(128 * 100) } }, |
| }; |
| |
| const aom_cdf_prob |
| default_palette_uv_mode_cdf[PALETTE_UV_MODE_CONTEXTS][CDF_SIZE(2)] = { |
| { AOM_CDF2(128 * 253) }, { AOM_CDF2(128 * 229) } |
| }; |
| #endif |
| |
| const aom_cdf_prob default_palette_y_color_index_cdf |
| [PALETTE_SIZES][PALETTE_COLOR_INDEX_CONTEXTS][CDF_SIZE(PALETTE_COLORS)] = { |
| { |
| { AOM_CDF2(29568), 0, 0, 0, 0, 0, 0 }, |
| { AOM_CDF2(16384), 0, 0, 0, 0, 0, 0 }, |
| { AOM_CDF2(8832), 0, 0, 0, 0, 0, 0 }, |
| { AOM_CDF2(28672), 0, 0, 0, 0, 0, 0 }, |
| { AOM_CDF2(31872), 0, 0, 0, 0, 0, 0 }, |
| }, |
| { |
| { AOM_CDF3(28032, 30326), 0, 0, 0, 0, 0 }, |
| { AOM_CDF3(11647, 27405), 0, 0, 0, 0, 0 }, |
| { AOM_CDF3(4352, 30659), 0, 0, 0, 0, 0 }, |
| { AOM_CDF3(23552, 27800), 0, 0, 0, 0, 0 }, |
| { AOM_CDF3(32256, 32504), 0, 0, 0, 0, 0 }, |
| }, |
| { |
| { AOM_CDF4(26112, 28374, 30039), 0, 0, 0, 0 }, |
| { AOM_CDF4(9472, 22576, 27712), 0, 0, 0, 0 }, |
| { AOM_CDF4(6656, 26138, 29608), 0, 0, 0, 0 }, |
| { AOM_CDF4(19328, 23791, 28946), 0, 0, 0, 0 }, |
| { AOM_CDF4(31744, 31984, 32336), 0, 0, 0, 0 }, |
| }, |
| { |
| { AOM_CDF5(27904, 29215, 30075, 31190), 0, 0, 0 }, |
| { AOM_CDF5(9728, 22598, 26134, 29425), 0, 0, 0 }, |
| { AOM_CDF5(2688, 30066, 31058, 31933), 0, 0, 0 }, |
| { AOM_CDF5(22015, 25039, 27726, 29932), 0, 0, 0 }, |
| { AOM_CDF5(32383, 32482, 32554, 32660), 0, 0, 0 }, |
| }, |
| { |
| { AOM_CDF6(24319, 26299, 27486, 28600, 29804), 0, 0 }, |
| { AOM_CDF6(7935, 18217, 21116, 25440, 28589), 0, 0 }, |
| { AOM_CDF6(6656, 25016, 27105, 28698, 30399), 0, 0 }, |
| { AOM_CDF6(19967, 24117, 26550, 28566, 30224), 0, 0 }, |
| { AOM_CDF6(31359, 31607, 31775, 31977, 32258), 0, 0 }, |
| }, |
| { |
| { AOM_CDF7(26368, 27768, 28588, 29274, 29997, 30917), 0 }, |
| { AOM_CDF7(8960, 18260, 20810, 23986, 26627, 28882), 0 }, |
| { AOM_CDF7(7295, 24111, 25836, 27515, 29033, 30769), 0 }, |
| { AOM_CDF7(22016, 25208, 27305, 28159, 29221, 30274), 0 }, |
| { AOM_CDF7(31744, 31932, 32050, 32199, 32335, 32521), 0 }, |
| }, |
| { |
| { AOM_CDF8(26624, 27872, 28599, 29153, 29633, 30172, 30841) }, |
| { AOM_CDF8(6655, 17569, 19587, 23345, 25884, 28088, 29678) }, |
| { AOM_CDF8(3584, 27296, 28429, 29158, 30032, 30780, 31572) }, |
| { AOM_CDF8(23551, 25855, 27070, 27893, 28597, 29721, 30970) }, |
| { AOM_CDF8(32128, 32173, 32245, 32337, 32416, 32500, 32609) }, |
| }, |
| }; |
| |
| const aom_cdf_prob default_palette_uv_color_index_cdf |
| [PALETTE_SIZES][PALETTE_COLOR_INDEX_CONTEXTS][CDF_SIZE(PALETTE_COLORS)] = { |
| { |
| { AOM_CDF2(29824), 0, 0, 0, 0, 0, 0 }, |
| { AOM_CDF2(16384), 0, 0, 0, 0, 0, 0 }, |
| { AOM_CDF2(8832), 0, 0, 0, 0, 0, 0 }, |
| { AOM_CDF2(30720), 0, 0, 0, 0, 0, 0 }, |
| { AOM_CDF2(31744), 0, 0, 0, 0, 0, 0 }, |
| }, |
| { |
| { AOM_CDF3(27648, 30208), 0, 0, 0, 0, 0 }, |
| { AOM_CDF3(14080, 26563), 0, 0, 0, 0, 0 }, |
| { AOM_CDF3(5120, 30932), 0, 0, 0, 0, 0 }, |
| { AOM_CDF3(24448, 27828), 0, 0, 0, 0, 0 }, |
| { AOM_CDF3(31616, 32219), 0, 0, 0, 0, 0 }, |
| }, |
| { |
| { AOM_CDF4(25856, 28259, 30584), 0, 0, 0, 0 }, |
| { AOM_CDF4(11520, 22476, 27944), 0, 0, 0, 0 }, |
| { AOM_CDF4(8064, 26882, 30308), 0, 0, 0, 0 }, |
| { AOM_CDF4(19455, 23823, 29134), 0, 0, 0, 0 }, |
| { AOM_CDF4(30848, 31501, 32174), 0, 0, 0, 0 }, |
| }, |
| { |
| { AOM_CDF5(26751, 28020, 29541, 31230), 0, 0, 0 }, |
| { AOM_CDF5(12032, 26045, 30772, 31497), 0, 0, 0 }, |
| { AOM_CDF5(1280, 32153, 32458, 32560), 0, 0, 0 }, |
| { AOM_CDF5(23424, 24154, 29201, 29856), 0, 0, 0 }, |
| { AOM_CDF5(32256, 32402, 32561, 32682), 0, 0, 0 }, |
| }, |
| { |
| { AOM_CDF6(24576, 26720, 28114, 28950, 31694), 0, 0 }, |
| { AOM_CDF6(7551, 16613, 20462, 25269, 29077), 0, 0 }, |
| { AOM_CDF6(6272, 23039, 25623, 28163, 30861), 0, 0 }, |
| { AOM_CDF6(17024, 18808, 20771, 27941, 29845), 0, 0 }, |
| { AOM_CDF6(31616, 31936, 32079, 32321, 32546), 0, 0 }, |
| }, |
| { |
| { AOM_CDF7(23296, 25590, 27833, 29337, 29954, 31229), 0 }, |
| { AOM_CDF7(7552, 13659, 16570, 21695, 24506, 27701), 0 }, |
| { AOM_CDF7(6911, 24788, 26284, 27753, 29575, 30872), 0 }, |
| { AOM_CDF7(17535, 22236, 24457, 26242, 27363, 30191), 0 }, |
| { AOM_CDF7(30592, 31289, 31745, 31921, 32149, 32321), 0 }, |
| }, |
| { |
| { AOM_CDF8(22016, 24242, 25141, 27137, 27797, 29331, 30848) }, |
| { AOM_CDF8(8063, 13564, 16940, 21948, 24568, 25689, 26989) }, |
| { AOM_CDF8(6528, 27028, 27835, 28741, 30031, 31795, 32285) }, |
| { AOM_CDF8(18047, 23797, 25444, 26274, 27111, 27929, 30367) }, |
| { AOM_CDF8(30208, 30628, 31046, 31658, 31762, 32367, 32469) }, |
| } |
| }; |
| #if CONFIG_MRC_TX |
| // TODO(sarahparker) Tune these cdfs |
| const aom_cdf_prob default_mrc_mask_intra_cdf |
| [PALETTE_SIZES][PALETTE_COLOR_INDEX_CONTEXTS][CDF_SIZE(PALETTE_COLORS)] = { |
| { |
| { AOM_CDF2(29568), 0, 0, 0, 0, 0, 0 }, |
| { AOM_CDF2(16384), 0, 0, 0, 0, 0, 0 }, |
| { AOM_CDF2(8832), 0, 0, 0, 0, 0, 0 }, |
| { AOM_CDF2(28672), 0, 0, 0, 0, 0, 0 }, |
| { AOM_CDF2(31872), 0, 0, 0, 0, 0, 0 }, |
| }, |
| { |
| { AOM_CDF3(28032, 30326), 0, 0, 0, 0, 0 }, |
| { AOM_CDF3(11647, 27405), 0, 0, 0, 0, 0 }, |
| { AOM_CDF3(4352, 30659), 0, 0, 0, 0, 0 }, |
| { AOM_CDF3(23552, 27800), 0, 0, 0, 0, 0 }, |
| { AOM_CDF3(32256, 32504), 0, 0, 0, 0, 0 }, |
| }, |
| { |
| { AOM_CDF4(26112, 28374, 30039), 0, 0, 0, 0 }, |
| { AOM_CDF4(9472, 22576, 27712), 0, 0, 0, 0 }, |
| { AOM_CDF4(6656, 26138, 29608), 0, 0, 0, 0 }, |
| { AOM_CDF4(19328, 23791, 28946), 0, 0, 0, 0 }, |
| { AOM_CDF4(31744, 31984, 32336), 0, 0, 0, 0 }, |
| }, |
| { |
| { AOM_CDF5(27904, 29215, 30075, 31190), 0, 0, 0 }, |
| { AOM_CDF5(9728, 22598, 26134, 29425), 0, 0, 0 }, |
| { AOM_CDF5(2688, 30066, 31058, 31933), 0, 0, 0 }, |
| { AOM_CDF5(22015, 25039, 27726, 29932), 0, 0, 0 }, |
| { AOM_CDF5(32383, 32482, 32554, 32660), 0, 0, 0 }, |
| }, |
| { |
| { AOM_CDF6(24319, 26299, 27486, 28600, 29804), 0, 0 }, |
| { AOM_CDF6(7935, 18217, 21116, 25440, 28589), 0, 0 }, |
| { AOM_CDF6(6656, 25016, 27105, 28698, 30399), 0, 0 }, |
| { AOM_CDF6(19967, 24117, 26550, 28566, 30224), 0, 0 }, |
| { AOM_CDF6(31359, 31607, 31775, 31977, 32258), 0, 0 }, |
| }, |
| { |
| { AOM_CDF7(26368, 27768, 28588, 29274, 29997, 30917), 0 }, |
| { AOM_CDF7(8960, 18260, 20810, 23986, 26627, 28882), 0 }, |
| { AOM_CDF7(7295, 24111, 25836, 27515, 29033, 30769), 0 }, |
| { AOM_CDF7(22016, 25208, 27305, 28159, 29221, 30274), 0 }, |
| { AOM_CDF7(31744, 31932, 32050, 32199, 32335, 32521), 0 }, |
| }, |
| { |
| { AOM_CDF8(26624, 27872, 28599, 29153, 29633, 30172, 30841) }, |
| { AOM_CDF8(6655, 17569, 19587, 23345, 25884, 28088, 29678) }, |
| { AOM_CDF8(3584, 27296, 28429, 29158, 30032, 30780, 31572) }, |
| { AOM_CDF8(23551, 25855, 27070, 27893, 28597, 29721, 30970) }, |
| { AOM_CDF8(32128, 32173, 32245, 32337, 32416, 32500, 32609) }, |
| }, |
| }; |
| |
| const aom_cdf_prob default_mrc_mask_inter_cdf |
| [PALETTE_SIZES][PALETTE_COLOR_INDEX_CONTEXTS][CDF_SIZE(PALETTE_COLORS)] = { |
| { |
| { AOM_CDF2(29568), 0, 0, 0, 0, 0, 0 }, |
| { AOM_CDF2(16384), 0, 0, 0, 0, 0, 0 }, |
| { AOM_CDF2(8832), 0, 0, 0, 0, 0, 0 }, |
| { AOM_CDF2(28672), 0, 0, 0, 0, 0, 0 }, |
| { AOM_CDF2(31872), 0, 0, 0, 0, 0, 0 }, |
| }, |
| { |
| { AOM_CDF3(28032, 30326), 0, 0, 0, 0, 0 }, |
| { AOM_CDF3(11647, 27405), 0, 0, 0, 0, 0 }, |
| { AOM_CDF3(4352, 30659), 0, 0, 0, 0, 0 }, |
| { AOM_CDF3(23552, 27800), 0, 0, 0, 0, 0 }, |
| { AOM_CDF3(32256, 32504), 0, 0, 0, 0, 0 }, |
| }, |
| { |
| { AOM_CDF4(26112, 28374, 30039), 0, 0, 0, 0 }, |
| { AOM_CDF4(9472, 22576, 27712), 0, 0, 0, 0 }, |
| { AOM_CDF4(6656, 26138, 29608), 0, 0, 0, 0 }, |
| { AOM_CDF4(19328, 23791, 28946), 0, 0, 0, 0 }, |
| { AOM_CDF4(31744, 31984, 32336), 0, 0, 0, 0 }, |
| }, |
| { |
| { AOM_CDF5(27904, 29215, 30075, 31190), 0, 0, 0 }, |
| { AOM_CDF5(9728, 22598, 26134, 29425), 0, 0, 0 }, |
| { AOM_CDF5(2688, 30066, 31058, 31933), 0, 0, 0 }, |
| { AOM_CDF5(22015, 25039, 27726, 29932), 0, 0, 0 }, |
| { AOM_CDF5(32383, 32482, 32554, 32660), 0, 0, 0 }, |
| }, |
| { |
| { AOM_CDF6(24319, 26299, 27486, 28600, 29804), 0, 0 }, |
| { AOM_CDF6(7935, 18217, 21116, 25440, 28589), 0, 0 }, |
| { AOM_CDF6(6656, 25016, 27105, 28698, 30399), 0, 0 }, |
| { AOM_CDF6(19967, 24117, 26550, 28566, 30224), 0, 0 }, |
| { AOM_CDF6(31359, 31607, 31775, 31977, 32258), 0, 0 }, |
| }, |
| { |
| { AOM_CDF7(26368, 27768, 28588, 29274, 29997, 30917), 0 }, |
| { AOM_CDF7(8960, 18260, 20810, 23986, 26627, 28882), 0 }, |
| { AOM_CDF7(7295, 24111, 25836, 27515, 29033, 30769), 0 }, |
| { AOM_CDF7(22016, 25208, 27305, 28159, 29221, 30274), 0 }, |
| { AOM_CDF7(31744, 31932, 32050, 32199, 32335, 32521), 0 }, |
| }, |
| { |
| { AOM_CDF8(26624, 27872, 28599, 29153, 29633, 30172, 30841) }, |
| { AOM_CDF8(6655, 17569, 19587, 23345, 25884, 28088, 29678) }, |
| { AOM_CDF8(3584, 27296, 28429, 29158, 30032, 30780, 31572) }, |
| { AOM_CDF8(23551, 25855, 27070, 27893, 28597, 29721, 30970) }, |
| { AOM_CDF8(32128, 32173, 32245, 32337, 32416, 32500, 32609) }, |
| }, |
| }; |
| #endif // CONFIG_MRC_TX |
| |
| #if CONFIG_INTRABC |
| static const aom_cdf_prob default_intrabc_cdf[CDF_SIZE(2)] = { AOM_CDF2(192 * |
| 128) }; |
| #endif // CONFIG_INTRABC |
| |
| #define MAX_COLOR_CONTEXT_HASH 8 |
| // Negative values are invalid |
| static const int palette_color_index_context_lookup[MAX_COLOR_CONTEXT_HASH + |
| 1] = { -1, -1, 0, -1, -1, |
| 4, 3, 2, 1 }; |
| |
| #if CONFIG_RECT_TX_EXT |
| static const aom_prob default_quarter_tx_size_prob = 192; |
| #if CONFIG_NEW_MULTISYMBOL |
| static const aom_cdf_prob default_quarter_tx_size_cdf[CDF_SIZE(2)] = { AOM_CDF2( |
| 192 * 128) }; |
| #endif |
| #endif |
| |
| #if CONFIG_LOOP_RESTORATION |
| static const aom_cdf_prob default_switchable_restore_cdf[CDF_SIZE( |
| RESTORE_SWITCHABLE_TYPES)] = { AOM_CDF3(32 * 128, 144 * 128) }; |
| |
| #if CONFIG_NEW_MULTISYMBOL |
| static const aom_cdf_prob default_wiener_restore_cdf[CDF_SIZE(2)] = { AOM_CDF2( |
| 64 * 128) }; |
| |
| static const aom_cdf_prob default_sgrproj_restore_cdf[CDF_SIZE(2)] = { AOM_CDF2( |
| 64 * 128) }; |
| #endif // CONFIG_NEW_MULTISYMBOL |
| #endif // CONFIG_LOOP_RESTORATION |
| |
| #define NUM_PALETTE_NEIGHBORS 3 // left, top-left and top. |
| int av1_get_palette_color_index_context(const uint8_t *color_map, int stride, |
| int r, int c, int palette_size, |
| uint8_t *color_order, int *color_idx) { |
| int i; |
| // The +10 below should not be needed. But we get a warning "array subscript |
| // is above array bounds [-Werror=array-bounds]" without it, possibly due to |
| // this (or similar) bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59124 |
| int scores[PALETTE_MAX_SIZE + 10]; |
| const int weights[NUM_PALETTE_NEIGHBORS] = { 2, 1, 2 }; |
| const int hash_multipliers[NUM_PALETTE_NEIGHBORS] = { 1, 2, 2 }; |
| int color_index_ctx_hash; |
| int color_index_ctx; |
| int color_neighbors[NUM_PALETTE_NEIGHBORS]; |
| int inverse_color_order[PALETTE_MAX_SIZE]; |
| assert(palette_size <= PALETTE_MAX_SIZE); |
| assert(r > 0 || c > 0); |
| |
| // Get color indices of neighbors. |
| color_neighbors[0] = (c - 1 >= 0) ? color_map[r * stride + c - 1] : -1; |
| color_neighbors[1] = |
| (c - 1 >= 0 && r - 1 >= 0) ? color_map[(r - 1) * stride + c - 1] : -1; |
| color_neighbors[2] = (r - 1 >= 0) ? color_map[(r - 1) * stride + c] : -1; |
| |
| for (i = 0; i < PALETTE_MAX_SIZE; ++i) { |
| color_order[i] = i; |
| inverse_color_order[i] = i; |
| } |
| memset(scores, 0, PALETTE_MAX_SIZE * sizeof(scores[0])); |
| for (i = 0; i < NUM_PALETTE_NEIGHBORS; ++i) { |
| if (color_neighbors[i] >= 0) { |
| scores[color_neighbors[i]] += weights[i]; |
| } |
| } |
| |
| // Get the top NUM_PALETTE_NEIGHBORS scores (sorted from large to small). |
| for (i = 0; i < NUM_PALETTE_NEIGHBORS; ++i) { |
| int max = scores[i]; |
| int max_idx = i; |
| int j; |
| for (j = i + 1; j < palette_size; ++j) { |
| if (scores[j] > max) { |
| max = scores[j]; |
| max_idx = j; |
| } |
| } |
| if (max_idx != i) { |
| // Move the score at index 'max_idx' to index 'i', and shift the scores |
| // from 'i' to 'max_idx - 1' by 1. |
| const int max_score = scores[max_idx]; |
| const uint8_t max_color_order = color_order[max_idx]; |
| int k; |
| for (k = max_idx; k > i; --k) { |
| scores[k] = scores[k - 1]; |
| color_order[k] = color_order[k - 1]; |
| inverse_color_order[color_order[k]] = k; |
| } |
| scores[i] = max_score; |
| color_order[i] = max_color_order; |
| inverse_color_order[color_order[i]] = i; |
| } |
| } |
| |
| // Get hash value of context. |
| color_index_ctx_hash = 0; |
| for (i = 0; i < NUM_PALETTE_NEIGHBORS; ++i) { |
| color_index_ctx_hash += scores[i] * hash_multipliers[i]; |
| } |
| assert(color_index_ctx_hash > 0); |
| assert(color_index_ctx_hash <= MAX_COLOR_CONTEXT_HASH); |
| |
| // Lookup context from hash. |
| color_index_ctx = palette_color_index_context_lookup[color_index_ctx_hash]; |
| assert(color_index_ctx >= 0); |
| assert(color_index_ctx < PALETTE_COLOR_INDEX_CONTEXTS); |
| |
| if (color_idx != NULL) { |
| *color_idx = inverse_color_order[color_map[r * stride + c]]; |
| } |
| return color_index_ctx; |
| } |
| #undef NUM_PALETTE_NEIGHBORS |
| #undef MAX_COLOR_CONTEXT_HASH |
| |
| static const aom_prob default_txfm_partition_probs[TXFM_PARTITION_CONTEXTS] = { |
| #if CONFIG_TX64X64 |
| 249, 240, 223, 249, 229, 177, 250, 243, 208, 226, 187, |
| 145, 236, 204, 150, 183, 149, 125, 181, 146, 113, 128 |
| #else |
| 250, 231, 212, 241, 166, 66, 241, 230, 135, 243, 154, 64, 248, 161, 63, 128 |
| #endif // CONFIG_TX64X64 |
| }; |
| #if CONFIG_NEW_MULTISYMBOL |
| static const aom_cdf_prob |
| default_txfm_partition_cdf[TXFM_PARTITION_CONTEXTS][CDF_SIZE(2)] = { |
| #if CONFIG_TX64X64 |
| { AOM_CDF2(249 * 128) }, { AOM_CDF2(240 * 128) }, { AOM_CDF2(223 * 128) }, |
| { AOM_CDF2(249 * 128) }, { AOM_CDF2(229 * 128) }, { AOM_CDF2(177 * 128) }, |
| { AOM_CDF2(250 * 128) }, { AOM_CDF2(243 * 128) }, { AOM_CDF2(208 * 128) }, |
| { AOM_CDF2(226 * 128) }, { AOM_CDF2(187 * 128) }, { AOM_CDF2(145 * 128) }, |
| { AOM_CDF2(236 * 128) }, { AOM_CDF2(204 * 128) }, { AOM_CDF2(150 * 128) }, |
| { AOM_CDF2(183 * 128) }, { AOM_CDF2(149 * 128) }, { AOM_CDF2(125 * 128) }, |
| { AOM_CDF2(181 * 128) }, { AOM_CDF2(146 * 128) }, { AOM_CDF2(113 * 128) }, |
| { AOM_CDF2(128 * 128) } |
| #else |
| { AOM_CDF2(250 * 128) }, { AOM_CDF2(231 * 128) }, { AOM_CDF2(212 * 128) }, |
| { AOM_CDF2(241 * 128) }, { AOM_CDF2(166 * 128) }, { AOM_CDF2(66 * 128) }, |
| { AOM_CDF2(241 * 128) }, { AOM_CDF2(230 * 128) }, { AOM_CDF2(135 * 128) }, |
| { AOM_CDF2(243 * 128) }, { AOM_CDF2(154 * 128) }, { AOM_CDF2(64 * 128) }, |
| { AOM_CDF2(248 * 128) }, { AOM_CDF2(161 * 128) }, { AOM_CDF2(63 * 128) }, |
| { AOM_CDF2(128 * 128) }, |
| #endif // CONFIG_TX64X64 |
| }; |
| #endif // CONFIG_NEW_MULTISYMBOL |
| |
| #if CONFIG_NEW_MULTISYMBOL |
| #if CONFIG_EXT_SKIP |
| static const aom_cdf_prob default_skip_mode_cdfs[SKIP_MODE_CONTEXTS][CDF_SIZE( |
| 2)] = { { AOM_CDF2(24576) }, { AOM_CDF2(16384) }, { AOM_CDF2(8192) } }; |
| #endif // CONFIG_EXT_SKIP |
| static const aom_cdf_prob default_skip_cdfs[SKIP_CONTEXTS][CDF_SIZE(2)] = { |
| { AOM_CDF2(24576) }, { AOM_CDF2(16384) }, { AOM_CDF2(8192) } |
| }; |
| #else // !CONFIG_NEW_MULTISYMBOL |
| #if CONFIG_EXT_SKIP |
| static const aom_prob default_skip_mode_probs[SKIP_MODE_CONTEXTS] = { 192, 128, |
| 64 }; |
| #endif // CONFIG_EXT_SKIP |
| static const aom_prob default_skip_probs[SKIP_CONTEXTS] = { 192, 128, 64 }; |
| #endif // CONFIG_NEW_MULTISYMBOL |
| |
| #if CONFIG_JNT_COMP |
| #if CONFIG_NEW_MULTISYMBOL |
| static const aom_cdf_prob |
| default_compound_idx_cdfs[COMP_INDEX_CONTEXTS][CDF_SIZE(2)] = { |
| { AOM_ICDF(24576), AOM_ICDF(32768), 0 }, |
| { AOM_ICDF(16384), AOM_ICDF(32768), 0 }, |
| { AOM_ICDF(8192), AOM_ICDF(32768), 0 }, |
| { AOM_ICDF(24576), AOM_ICDF(32768), 0 }, |
| { AOM_ICDF(16384), AOM_ICDF(32768), 0 }, |
| { AOM_ICDF(8192), AOM_ICDF(32768), 0 }, |
| { AOM_ICDF(24576), AOM_ICDF(32768), 0 }, |
| { AOM_ICDF(16384), AOM_ICDF(32768), 0 }, |
| { AOM_ICDF(8192), AOM_ICDF(32768), 0 } |
| }; |
| #endif // CONFIG_NEW_MULTISYMBOL |
| static const aom_prob default_compound_idx_probs[COMP_INDEX_CONTEXTS] = { |
| 192, 128, 64, 192, 128, 64, 192, 128, 64, |
| }; |
| #endif // CONFIG_JNT_COMP |
| |
| #if CONFIG_FILTER_INTRA |
| static const aom_prob default_filter_intra_probs[2] = { 103, 231 }; |
| |
| static const aom_cdf_prob default_filter_intra_mode_cdf[2][CDF_SIZE( |
| FILTER_INTRA_MODES)] = { { AOM_CDF6(24348, 27690, 30315, 30864, 31701) }, |
| { AOM_CDF6(31977, 32117, 32300, 32484, 32719) } }; |
| #endif // CONFIG_FILTER_INTRA |
| |
| // FIXME(someone) need real defaults here |
| static const aom_prob default_segment_tree_probs[SEG_TREE_PROBS] = { |
| 128, 128, 128, 128, 128, 128, 128 |
| }; |
| // clang-format off |
| static const aom_prob default_segment_pred_probs[PREDICTION_PROBS] = { |
| 128, 128, 128 |
| }; |
| #if CONFIG_NEW_MULTISYMBOL |
| static const aom_cdf_prob |
| default_segment_pred_cdf[PREDICTION_PROBS][CDF_SIZE(2)] = { |
| { AOM_CDF2(128 * 128) }, |
| { AOM_CDF2(128 * 128) }, |
| { AOM_CDF2(128 * 128) } |
| }; |
| #endif |
| // clang-format on |
| #if CONFIG_DUAL_FILTER |
| #if USE_EXTRA_FILTER |
| static const aom_cdf_prob |
| default_switchable_interp_cdf[SWITCHABLE_FILTER_CONTEXTS][CDF_SIZE( |
| SWITCHABLE_FILTERS)] = { |
| { AOM_CDF4(30080, 31088, 31760) }, { AOM_CDF4(4608, 9620, 11050) }, |
| { AOM_CDF4(4352, 5240, 31880) }, { AOM_CDF4(4352, 5240, 31880) }, |
| { AOM_CDF4(19072, 23352, 28488) }, { AOM_CDF4(30080, 31088, 31760) }, |
| { AOM_CDF4(4608, 9620, 11050) }, { AOM_CDF4(4352, 5240, 31880) }, |
| { AOM_CDF4(4352, 5240, 31880) }, { AOM_CDF4(19072, 23352, 28488) }, |
| { AOM_CDF4(30080, 31088, 31760) }, { AOM_CDF4(4608, 9620, 11050) }, |
| { AOM_CDF4(4352, 5240, 31880) }, { AOM_CDF4(4352, 5240, 31880) }, |
| { AOM_CDF4(19072, 23352, 28488) }, { AOM_CDF4(30080, 31088, 31760) }, |
| { AOM_CDF4(4608, 9620, 11050) }, { AOM_CDF4(4352, 5240, 31880) }, |
| { AOM_CDF4(4352, 5240, 31880) }, { AOM_CDF4(19072, 23352, 28488) }, |
| }; |
| #else // USE_EXTRA_FILTER |
| static const aom_cdf_prob |
| default_switchable_interp_cdf[SWITCHABLE_FILTER_CONTEXTS][CDF_SIZE( |
| SWITCHABLE_FILTERS)] = { |
| { AOM_CDF3(32256, 32654) }, { AOM_CDF3(2816, 32651) }, |
| { AOM_CDF3(512, 764) }, { AOM_CDF3(30464, 31778) }, |
| { AOM_CDF3(32384, 32483) }, { AOM_CDF3(3072, 32652) }, |
| { AOM_CDF3(256, 383) }, { AOM_CDF3(25344, 26533) }, |
| { AOM_CDF3(32000, 32531) }, { AOM_CDF3(2048, 32648) }, |
| { AOM_CDF3(384, 890) }, { AOM_CDF3(28928, 31358) }, |
| { AOM_CDF3(31616, 31787) }, { AOM_CDF3(4224, 32433) }, |
| { AOM_CDF3(128, 256) }, { AOM_CDF3(17408, 18248) } |
| }; |
| #endif // USE_EXTRA_FILTER |
| #else // CONFIG_DUAL_FILTER |
| static const aom_cdf_prob |
| default_switchable_interp_cdf[SWITCHABLE_FILTER_CONTEXTS] |
| [CDF_SIZE(SWITCHABLE_FILTERS)] = { |
| { AOM_CDF3(30080, 31781) }, |
| { AOM_CDF3(4608, 32658) }, |
| { AOM_CDF3(4352, 4685) }, |
| { AOM_CDF3(19072, 26776) }, |
| }; |
| #endif // CONFIG_DUAL_FILTER |
| |
| static const aom_cdf_prob default_seg_tree_cdf[CDF_SIZE(MAX_SEGMENTS)] = { |
| AOM_CDF8(4096, 8192, 12288, 16384, 20480, 24576, 28672) |
| }; |
| |
| #if CONFIG_Q_SEGMENTATION |
| static const aom_cdf_prob |
| default_q_seg_tree_cdf[Q_SEGMENT_CDF_COUNT][CDF_SIZE(MAX_SEGMENTS)] = { |
| { |
| AOM_CDF8(5622, 7893, 16093, 18233, 27809, 28373, 32533), |
| }, |
| { |
| AOM_CDF8(14274, 18230, 22557, 24935, 29980, 30851, 32344), |
| }, |
| { |
| AOM_CDF8(27527, 28487, 28723, 28890, 32397, 32647, 32679), |
| }, |
| }; |
| #endif |
| |
| static const aom_cdf_prob |
| default_tx_size_cdf[MAX_TX_DEPTH][TX_SIZE_CONTEXTS][CDF_SIZE(MAX_TX_DEPTH + |
| 1)] = { |
| { { AOM_CDF2(12800) }, { AOM_CDF2(8448) } }, |
| { { AOM_CDF3(2560, 20496) }, { AOM_CDF3(1920, 14091) } }, |
| { { AOM_CDF4(384, 17588, 19782) }, { AOM_CDF4(640, 7166, 8466) } }, |
| #if CONFIG_TX64X64 |
| { { AOM_CDF5(128, 8288, 21293, 26986) }, |
| { AOM_CDF5(128, 4208, 10009, 15965) } }, |
| #endif |
| }; |
| |
| static const aom_cdf_prob |
| default_if_y_mode_cdf[BLOCK_SIZE_GROUPS][CDF_SIZE(INTRA_MODES)] = { |
| { AOM_CDF13(7168, 10680, 13913, 16928, 20294, 22790, 24706, 26275, 28139, |
| 29751, 30563, 31468) }, |
| { AOM_CDF13(11776, 13823, 15307, 15725, 16638, 17406, 17994, 18814, 19634, |
| 21513, 22198, 22928) }, |
| { AOM_CDF13(14720, 16459, 18091, 18299, 18757, 19125, 19423, 19924, 20504, |
| 22922, 24063, 25577) }, |
| { AOM_CDF13(18944, 19925, 20908, 20998, 21017, 21072, 21084, 21121, 21159, |
| 22064, 22820, 24290) }, |
| }; |
| |
| #if CONFIG_CFL |
| static const aom_cdf_prob |
| default_uv_mode_cdf[INTRA_MODES][CDF_SIZE(UV_INTRA_MODES)] = { |
| { AOM_CDF14(18377, 18815, 19743, 20178, 20560, 20889, 21359, 22098, 22481, |
| 24563, 25781, 26662, 28396) }, |
| { AOM_CDF14(5350, 16837, 17066, 17360, 17692, 18778, 18969, 19206, 20291, |
| 22367, 23212, 24670, 27912) }, |
| { AOM_CDF14(6671, 6759, 17812, 17998, 18260, 18384, 19408, 20667, 20806, |
| 22760, 24142, 24875, 28072) }, |
| { AOM_CDF14(7461, 8082, 8515, 15013, 15583, 16098, 16522, 18519, 20348, |
| 22954, 24130, 25342, 26548) }, |
| { AOM_CDF14(3694, 4403, 5370, 5854, 17841, 19639, 21625, 22224, 22651, |
| 24613, 25399, 26143, 26599) }, |
| { AOM_CDF14(3700, 5651, 6112, 6541, 8929, 20623, 21213, 21640, 22214, |
| 24306, 25412, 26406, 27249) }, |
| { AOM_CDF14(4649, 4947, 7128, 7432, 9439, 9903, 21163, 21774, 22056, |
| 24426, 25403, 26324, 27128) }, |
| { AOM_CDF14(7208, 7375, 8779, 9683, 10072, 10284, 10796, 19786, 20152, |
| 22955, 24246, 25165, 26589) }, |
| { AOM_CDF14(5897, 7283, 7555, 8910, 9391, 9937, 10276, 11044, 19841, |
| 22620, 23784, 25060, 26418) }, |
| { AOM_CDF14(12171, 12718, 13885, 14348, 14925, 15394, 16108, 17075, 17583, |
| 21996, 23614, 25048, 27011) }, |
| { AOM_CDF14(10192, 11222, 12318, 12877, 13533, 14184, 14866, 15879, 16650, |
| 20419, 23265, 24295, 26596) }, |
| { AOM_CDF14(10776, 11387, 12899, 13471, 14088, 14575, 15366, 16456, 17040, |
| 20815, 22009, 24448, 26492) }, |
| { AOM_CDF14(4015, 6473, 9853, 10285, 10655, 11032, 11431, 12199, 12738, |
| 14760, 16121, 17263, 28612) }, |
| }; |
| #else |
| #if CONFIG_FILTER_INTRA |
| static const aom_cdf_prob |
| default_uv_mode_cdf[INTRA_MODES][CDF_SIZE(UV_INTRA_MODES)] = { |
| { AOM_CDF13(17902, 18828, 21117, 21487, 21924, 22484, 23588, 24669, 25177, |
| 28731, 29903, 31509) }, |
| { AOM_CDF13(9654, 23559, 23873, 24050, 24203, 24929, 25057, 25286, 26027, |
| 28172, 28716, 30913) }, |
| { AOM_CDF13(10012, 10124, 25394, 25540, 25665, 25752, 26567, 27761, 27876, |
| 29497, 30581, 31179) }, |
| { AOM_CDF13(15143, 15859, 16581, 21567, 21968, 22430, 22867, 24953, 26969, |
| 30310, 31125, 32329) }, |
| { AOM_CDF13(14063, 14416, 14921, 15022, 25164, 26720, 28661, 29083, 29277, |
| 31337, 31882, 32565) }, |
| { AOM_CDF13(12942, 14713, 15178, 15325, 16964, 27421, 27834, 28306, 28645, |
| 30804, 31322, 32387) }, |
| { AOM_CDF13(13687, 13993, 16776, 16912, 18338, 18648, 27557, 28140, 28359, |
| 30820, 31669, 32443) }, |
| { AOM_CDF13(14180, 14439, 16582, 17373, 17675, 17931, 18453, 26308, 26761, |
| 30058, 31293, 32156) }, |
| { AOM_CDF13(12480, 14300, 14838, 16085, 16434, 17023, 17426, 18313, 26041, |
| 29653, 30347, 32067) }, |
| { AOM_CDF13(17202, 18093, 19414, 19910, 20311, 20837, 21554, 22830, 23572, |
| 28770, 30259, 32145) }, |
| { AOM_CDF13(16336, 18149, 19485, 19927, 20365, 20924, 21524, 22561, 23421, |
| 28141, 30701, 32020) }, |
| { AOM_CDF13(16485, 17366, 19874, 20364, 20713, 21057, 21773, 23100, 23685, |
| 28079, 29091, 32028) }, |
| { AOM_CDF13(13638, 16789, 19763, 19903, 19995, 20201, 20405, 20861, 21174, |
| 22802, 23566, 24754) } |
| }; |
| #else |
| static const aom_cdf_prob |
| default_uv_mode_cdf[INTRA_MODES][CDF_SIZE(UV_INTRA_MODES)] = { |
| { AOM_CDF13(23552, 25936, 28623, 29033, 29395, 29892, 30252, 30905, 31370, |
| 31980, 32293, 32660) }, |
| { AOM_CDF13(2944, 26431, 27553, 27746, 28022, 29080, 29204, 29377, 30264, |
| 31206, 31613, 32418) }, |
| { AOM_CDF13(4352, 5120, 27952, 28117, 28473, 28759, 29563, 30864, 31051, |
| 31694, 32073, 32435) }, |
| { AOM_CDF13(17664, 20288, 21839, 26072, 26420, 26972, 27240, 28565, 30914, |
| 31694, 32083, 32591) }, |
| { AOM_CDF13(16640, 18390, 20233, 20557, 25162, 27789, 29397, 29895, 30369, |
| 31497, 32025, 32642) }, |
| { AOM_CDF13(13952, 17947, 18918, 19206, 21131, 30668, 31061, 31317, 31838, |
| 32137, 32342, 32547) }, |
| { AOM_CDF13(15872, 16990, 21479, 21732, 24134, 24854, 30296, 30887, 31163, |
| 31902, 32218, 32702) }, |
| { AOM_CDF13(16256, 17280, 23081, 24039, 24457, 24838, 25346, 30329, 30908, |
| 31746, 32206, 32639) }, |
| { AOM_CDF13(14720, 19249, 20501, 22079, 22439, 23218, 23463, 24107, 30308, |
| 31379, 31866, 32556) }, |
| { AOM_CDF13(16768, 19967, 22374, 22976, 23836, 24050, 24642, 25760, 26653, |
| 29585, 30937, 32518) }, |
| { AOM_CDF13(16768, 20751, 23026, 23591, 24299, 24516, 24981, 25876, 26806, |
| 29520, 31286, 32455) }, |
| { AOM_CDF13(17536, 20055, 22965, 23507, 24210, 24398, 25098, 26366, 27033, |
| 29674, 30689, 32530) }, |
| { AOM_CDF13(17536, 22753, 27126, 27353, 27571, 28139, 28505, 29198, 29886, |
| 30801, 31335, 32054) }, |
| }; |
| #endif |
| #endif // CONFIG_CFL |
| |
| #if CONFIG_EXT_PARTITION_TYPES |
| static const aom_cdf_prob default_partition_cdf[PARTITION_CONTEXTS][CDF_SIZE( |
| EXT_PARTITION_TYPES)] = { |
| // 8x8 -> 4x4 only supports the four legacy partition types |
| { AOM_CDF4(25472, 28949, 31052), 0, 0, 0, 0, 0, 0 }, |
| { AOM_CDF4(18816, 22250, 28783), 0, 0, 0, 0, 0, 0 }, |
| { AOM_CDF4(18944, 26126, 29188), 0, 0, 0, 0, 0, 0 }, |
| { AOM_CDF4(15488, 22508, 27077), 0, 0, 0, 0, 0, 0 }, |
| // 16x16 -> 8x8 |
| { AOM_CDF10(22272, 23768, 25043, 29996, 30495, 30994, 31419, 31844, 32343) }, |
| { AOM_CDF10(11776, 13457, 16315, 28229, 28789, 29349, 30302, 31255, 31816) }, |
| { AOM_CDF10(10496, 14802, 16136, 27127, 28563, 29999, 30444, 30889, 32324) }, |
| { AOM_CDF10(6784, 8763, 10440, 29110, 29770, 30430, 30989, 31548, 32208) }, |
| // 32x32 -> 16x16 |
| { AOM_CDF10(22656, 23801, 24702, 30721, 31103, 31485, 31785, 32085, 32467) }, |
| { AOM_CDF10(8704, 9926, 12586, 28885, 29292, 29699, 30586, 31473, 31881) }, |
| { AOM_CDF10(6656, 10685, 11566, 27857, 29200, 30543, 30837, 31131, 32474) }, |
| { AOM_CDF10(2176, 3012, 3690, 31253, 31532, 31811, 32037, 32263, 32542) }, |
| // 64x64 -> 32x32 |
| { AOM_CDF10(28416, 28705, 28926, 32258, 32354, 32450, 32523, 32596, 32693) }, |
| { AOM_CDF10(9216, 9952, 11849, 30134, 30379, 30624, 31256, 31888, 32134) }, |
| { AOM_CDF10(7424, 9008, 9528, 30664, 31192, 31720, 31893, 32066, 32594) }, |
| { AOM_CDF10(1280, 1710, 2069, 31978, 32121, 32264, 32383, 32502, 32647) }, |
| #if CONFIG_EXT_PARTITION |
| // 128x128 -> 64x64 |
| { AOM_CDF10(28416, 28705, 28926, 32258, 32354, 32450, 32523, 32596, 32693) }, |
| { AOM_CDF10(9216, 9952, 11849, 30134, 30379, 30624, 31256, 31888, 32134) }, |
| { AOM_CDF10(7424, 9008, 9528, 30664, 31192, 31720, 31893, 32066, 32594) }, |
| { AOM_CDF10(1280, 1710, 2069, 31978, 32121, 32264, 32383, 32502, 32647) }, |
| #endif |
| }; |
| #else |
| static const aom_cdf_prob |
| default_partition_cdf[PARTITION_CONTEXTS][CDF_SIZE(PARTITION_TYPES)] = { |
| { AOM_CDF4(25472, 28949, 31052) }, { AOM_CDF4(18816, 22250, 28783) }, |
| { AOM_CDF4(18944, 26126, 29188) }, { AOM_CDF4(15488, 22508, 27077) }, |
| { AOM_CDF4(22272, 25265, 27815) }, { AOM_CDF4(11776, 15138, 20854) }, |
| { AOM_CDF4(10496, 19109, 21777) }, { AOM_CDF4(6784, 10743, 14098) }, |
| { AOM_CDF4(22656, 24947, 26749) }, { AOM_CDF4(8704, 11148, 16469) }, |
| { AOM_CDF4(6656, 14714, 16477) }, { AOM_CDF4(2176, 3849, 5205) }, |
| { AOM_CDF4(28416, 28994, 29436) }, { AOM_CDF4(9216, 10688, 14483) }, |
| { AOM_CDF4(7424, 10592, 11632) }, { AOM_CDF4(1280, 2141, 2859) }, |
| #if CONFIG_EXT_PARTITION |
| { AOM_CDF4(28416, 28994, 29436) }, { AOM_CDF4(9216, 10688, 14483) }, |
| { AOM_CDF4(7424, 10592, 11632) }, { AOM_CDF4(1280, 2141, 2859) }, |
| #endif |
| }; |
| #endif |
| |
| static const aom_cdf_prob default_intra_ext_tx_cdf |
| [EXT_TX_SETS_INTRA][EXT_TX_SIZES][INTRA_MODES][CDF_SIZE(TX_TYPES)] = { |
| { |
| // FIXME: unused zero positions, from uncoded trivial transform set |
| { |
| { 0 }, |
| { 0 }, |
| { 0 }, |
| { 0 }, |
| { 0 }, |
| { 0 }, |
| { 0 }, |
| { 0 }, |
| { 0 }, |
| { 0 }, |
| { 0 }, |
| { 0 }, |
| { 0 }, |
| }, |
| { |
| { 0 }, |
| { 0 }, |
| { 0 }, |
| { 0 }, |
| { 0 }, |
| { 0 }, |
| { 0 }, |
| { 0 }, |
| { 0 }, |
| { 0 }, |
| { 0 }, |
| { 0 }, |
| { 0 }, |
| }, |
| { |
| { 0 }, |
| { 0 }, |
| { 0 }, |
| { 0 }, |
| { 0 }, |
| { 0 }, |
| { 0 }, |
| { 0 }, |
| { 0 }, |
| { 0 }, |
| { 0 }, |
| { 0 }, |
| { 0 }, |
| }, |
| { |
| { 0 }, |
| { 0 }, |
| { 0 }, |
| { 0 }, |
| { 0 }, |
| { 0 }, |
| { 0 }, |
| { 0 }, |
| { 0 }, |
| { 0 }, |
| { 0 }, |
| { 0 }, |
| { 0 }, |
| }, |
| }, |
| { |
| { |
| { AOM_CDF7(1024, 28800, 29048, 29296, 30164, 31466) }, |
| { AOM_CDF7(1280, 5216, 6938, 8660, 10167, 27118) }, |
| { AOM_CDF7(1280, 5216, 6938, 8660, 10167, 15817) }, |
| { AOM_CDF7(1152, 25852, 26284, 26717, 28230, 30499) }, |
| { AOM_CDF7(1024, 2016, 3938, 5860, 29404, 31086) }, |
| { AOM_CDF7(1280, 5216, 6938, 8660, 10167, 27118) }, |
| { AOM_CDF7(1280, 5216, 6938, 8660, 10167, 15817) }, |
| { AOM_CDF7(1280, 4109, 5900, 7691, 15528, 27380) }, |
| { AOM_CDF7(1280, 4109, 5900, 7691, 15528, 27380) }, |
| { AOM_CDF7(1280, 5216, 6938, 8660, 10167, 15817) }, |
| { AOM_CDF7(1280, 5216, 6938, 8660, 10167, 15817) }, |
| { AOM_CDF7(1280, 5216, 6938, 8660, 10167, 15817) }, |
| { AOM_CDF7(1280, 5216, 6938, 8660, 10167, 15817) }, |
| }, |
| { |
| { AOM_CDF7(1024, 28800, 29048, 29296, 30164, 31466) }, |
| { AOM_CDF7(1280, 5216, 6938, 8660, 10167, 27118) }, |
| { AOM_CDF7(1280, 5216, 6938, 8660, 10167, 15817) }, |
| { AOM_CDF7(1152, 25852, 26284, 26717, 28230, 30499) }, |
| { AOM_CDF7(1024, 2016, 3938, 5860, 29404, 31086) }, |
| { AOM_CDF7(1280, 5216, 6938, 8660, 10167, 27118) }, |
| { AOM_CDF7(1280, 5216, 6938, 8660, 10167, 15817) }, |
| { AOM_CDF7(1280, 4109, 5900, 7691, 15528, 27380) }, |
| { AOM_CDF7(1280, 4109, 5900, 7691, 15528, 27380) }, |
| { AOM_CDF7(1280, 5216, 6938, 8660, 10167, 15817) }, |
| { AOM_CDF7(1280, 5216, 6938, 8660, 10167, 15817) }, |
| { AOM_CDF7(1280, 5216, 6938, 8660, 10167, 15817) }, |
| { AOM_CDF7(1280, 5216, 6938, 8660, 10167, 15817) }, |
| }, |
| { |
| { AOM_CDF7(1024, 28800, 29048, 29296, 30164, 31466) }, |
| { AOM_CDF7(1280, 5216, 6938, 8660, 10167, 27118) }, |
| { AOM_CDF7(1280, 5216, 6938, 8660, 10167, 15817) }, |
| { AOM_CDF7(1152, 25852, 26284, 26717, 28230, 30499) }, |
| { AOM_CDF7(1024, 2016, 3938, 5860, 29404, 31086) }, |
| { AOM_CDF7(1280, 5216, 6938, 8660, 10167, 27118) }, |
| { AOM_CDF7(1280, 5216, 6938, 8660, 10167, 15817) }, |
| { AOM_CDF7(1280, 4109, 5900, 7691, 15528, 27380) }, |
| { AOM_CDF7(1280, 4109, 5900, 7691, 15528, 27380) }, |
| { AOM_CDF7(1280, 5216, 6938, 8660, 10167, 15817) }, |
| { AOM_CDF7(1280, 5216, 6938, 8660, 10167, 15817) }, |
| { AOM_CDF7(1280, 5216, 6938, 8660, 10167, 15817) }, |
| { AOM_CDF7(1280, 5216, 6938, 8660, 10167, 15817) }, |
| }, |
| { |
| { AOM_CDF7(1024, 28800, 29048, 29296, 30164, 31466) }, |
| { AOM_CDF7(1280, 5216, 6938, 8660, 10167, 27118) }, |
| { AOM_CDF7(1280, 5216, 6938, 8660, 10167, 15817) }, |
| { AOM_CDF7(1152, 25852, 26284, 26717, 28230, 30499) }, |
| { AOM_CDF7(1024, 2016, 3938, 5860, 29404, 31086) }, |
| { AOM_CDF7(1280, 5216, 6938, 8660, 10167, 27118) }, |
| { AOM_CDF7(1280, 5216, 6938, 8660, 10167, 15817) }, |
| { AOM_CDF7(1280, 4109, 5900, 7691, 15528, 27380) }, |
| { AOM_CDF7(1280, 4109, 5900, 7691, 15528, 27380) }, |
| { AOM_CDF7(1280, 5216, 6938, 8660, 10167, 15817) }, |
| { AOM_CDF7(1280, 5216, 6938, 8660, 10167, 15817) }, |
| { AOM_CDF7(1280, 5216, 6938, 8660, 10167, 15817) }, |
| { AOM_CDF7(1280, 5216, 6938, 8660, 10167, 15817) }, |
| }, |
| }, |
| { |
| { |
| { AOM_CDF5(1024, 28800, 29792, 31280) }, |
| { AOM_CDF5(1280, 5216, 6938, 26310) }, |
| { AOM_CDF5(1280, 5216, 6938, 13396) }, |
| { AOM_CDF5(1152, 25852, 27581, 30174) }, |
| { AOM_CDF5(1024, 2016, 28924, 30846) }, |
| { AOM_CDF5(1280, 5216, 6938, 26310) }, |
| { AOM_CDF5(1280, 5216, 6938, 13396) }, |
| { AOM_CDF5(1280, 4109, 13065, 26611) }, |
| { AOM_CDF5(1280, 4109, 13065, 26611) }, |
| { AOM_CDF5(1280, 5216, 6938, 13396) }, |
| { AOM_CDF5(1280, 5216, 6938, 13396) }, |
| { AOM_CDF5(1280, 5216, 6938, 13396) }, |
| { AOM_CDF5(1280, 5216, 6938, 13396) }, |
| }, |
| { |
| { AOM_CDF5(1024, 28800, 29792, 31280) }, |
| { AOM_CDF5(1280, 5216, 6938, 26310) }, |
| { AOM_CDF5(1280, 5216, 6938, 13396) }, |
| { AOM_CDF5(1152, 25852, 27581, 30174) }, |
| { AOM_CDF5(1024, 2016, 28924, 30846) }, |
| { AOM_CDF5(1280, 5216, 6938, 26310) }, |
| { AOM_CDF5(1280, 5216, 6938, 13396) }, |
| { AOM_CDF5(1280, 4109, 13065, 26611) }, |
| { AOM_CDF5(1280, 4109, 13065, 26611) }, |
| { AOM_CDF5(1280, 5216, 6938, 13396) }, |
| { AOM_CDF5(1280, 5216, 6938, 13396) }, |
| { AOM_CDF5(1280, 5216, 6938, 13396) }, |
| { AOM_CDF5(1280, 5216, 6938, 13396) }, |
| }, |
| { |
| { AOM_CDF5(1024, 28800, 29792, 31280) }, |
| { AOM_CDF5(1280, 5216, 6938, 26310) }, |
| { AOM_CDF5(1280, 5216, 6938, 13396) }, |
| { AOM_CDF5(1152, 25852, 27581, 30174) }, |
| { AOM_CDF5(1024, 2016, 28924, 30846) }, |
| { AOM_CDF5(1280, 5216, 6938, 26310) }, |
| { AOM_CDF5(1280, 5216, 6938, 13396) }, |
| { AOM_CDF5(1280, 4109, 13065, 26611) }, |
| { AOM_CDF5(1280, 4109, 13065, 26611) }, |
| { AOM_CDF5(1280, 5216, 6938, 13396) }, |
| { AOM_CDF5(1280, 5216, 6938, 13396) }, |
| { AOM_CDF5(1280, 5216, 6938, 13396) }, |
| { AOM_CDF5(1280, 5216, 6938, 13396) }, |
| }, |
| { |
| { AOM_CDF5(1024, 28800, 29792, 31280) }, |
| { AOM_CDF5(1280, 5216, 6938, 26310) }, |
| { AOM_CDF5(1280, 5216, 6938, 13396) }, |
| { AOM_CDF5(1152, 25852, 27581, 30174) }, |
| { AOM_CDF5(1024, 2016, 28924, 30846) }, |
| { AOM_CDF5(1280, 5216, 6938, 26310) }, |
| { AOM_CDF5(1280, 5216, 6938, 13396) }, |
| { AOM_CDF5(1280, 4109, 13065, 26611) }, |
| { AOM_CDF5(1280, 4109, 13065, 26611) }, |
| { AOM_CDF5(1280, 5216, 6938, 13396) }, |
| { AOM_CDF5(1280, 5216, 6938, 13396) }, |
| { AOM_CDF5(1280, 5216, 6938, 13396) }, |
| { AOM_CDF5(1280, 5216, 6938, 13396) }, |
| }, |
| }, |
| #if CONFIG_MRC_TX |
| { |
| { |
| { AOM_CDF2(1024) }, |
| { AOM_CDF2(1280) }, |
| { AOM_CDF2(1280) }, |
| { AOM_CDF2(1152) }, |
| { AOM_CDF2(1024) }, |
| { AOM_CDF2(1280) }, |
| { AOM_CDF2(1280) }, |
| { AOM_CDF2(1280) }, |
| { AOM_CDF2(1280) }, |
| { AOM_CDF2(1280) }, |
| { AOM_CDF2(1280) }, |
| { AOM_CDF2(1280) }, |
| { AOM_CDF2(1280) }, |
| }, |
| { |
| { AOM_CDF2(1024) }, |
| { AOM_CDF2(1280) }, |
| { AOM_CDF2(1280) }, |
| { AOM_CDF2(1152) }, |
| { AOM_CDF2(1024) }, |
| { AOM_CDF2(1280) }, |
| { AOM_CDF2(1280) }, |
| { AOM_CDF2(1280) }, |
| { AOM_CDF2(1280) }, |
| { AOM_CDF2(1280) }, |
| { AOM_CDF2(1280) }, |
| { AOM_CDF2(1280) }, |
| { AOM_CDF2(1280) }, |
| }, |
| { |
| { AOM_CDF2(1024) }, |
| { AOM_CDF2(1280) }, |
| { AOM_CDF2(1280) }, |
| { AOM_CDF2(1152) }, |
| { AOM_CDF2(1024) }, |
| { AOM_CDF2(1280) }, |
| { AOM_CDF2(1280) }, |
| { AOM_CDF2(1280) }, |
| { AOM_CDF2(1280) }, |
| { AOM_CDF2(1280) }, |
| { AOM_CDF2(1280) }, |
| { AOM_CDF2(1280) }, |
| { AOM_CDF2(1280) }, |
| }, |
| { |
| { AOM_CDF2(1024) }, |
| { AOM_CDF2(1280) }, |
| { AOM_CDF2(1280) }, |
| { AOM_CDF2(1152) }, |
| { AOM_CDF2(1024) }, |
| { AOM_CDF2(1280) }, |
| { AOM_CDF2(1280) }, |
| { AOM_CDF2(1280) }, |
| { AOM_CDF2(1280) }, |
| { AOM_CDF2(1280) }, |
| { AOM_CDF2(1280) }, |
| { AOM_CDF2(1280) }, |
| { AOM_CDF2(1280) }, |
| }, |
| } |
| #endif // CONFIG_MRC_TX |
| }; |
| static const aom_cdf_prob |
| default_inter_ext_tx_cdf[EXT_TX_SETS_INTER][EXT_TX_SIZES][CDF_SIZE( |
| TX_TYPES)] = { |
| { { 0 }, { 0 }, { 0 }, { 0 } }, |
| { { AOM_CDF16(1280, 1453, 1626, 2277, 2929, 3580, 4232, 16717, 19225, |
| 21733, 24241, 26749, 28253, 29758, 31263) }, |
| { AOM_CDF16(1280, 1453, 1626, 2277, 2929, 3580, 4232, 16717, 19225, |
| 21733, 24241, 26749, 28253, 29758, 31263) }, |
| { AOM_CDF16(1280, 1453, 1626, 2277, 2929, 3580, 4232, 16717, 19225, |
| 21733, 24241, 26749, 28253, 29758, 31263) }, |
| { AOM_CDF16(1280, 1453, 1626, 2277, 2929, 3580, 4232, 16717, 19225, |
| 21733, 24241, 26749, 28253, 29758, 31263) } }, |
| { { AOM_CDF12(1280, 3125, 4970, 17132, 19575, 22018, 24461, 26904, 28370, |
| 29836, 31302) }, |
| { AOM_CDF12(1280, 3125, 4970, 17132, 19575, 22018, 24461, 26904, 28370, |
| 29836, 31302) }, |
| { AOM_CDF12(1280, 3125, 4970, 17132, 19575, 22018, 24461, 26904, 28370, |
| 29836, 31302) }, |
| { AOM_CDF12(1280, 3125, 4970, 17132, 19575, 22018, 24461, 26904, 28370, |
| 29836, 31302) } }, |
| { { AOM_CDF2(1536) }, |
| { AOM_CDF2(1536) }, |
| { AOM_CDF2(1536) }, |
| { AOM_CDF2(1536) } }, |
| #if CONFIG_MRC_TX |
| { { AOM_CDF3(30080, 31781) }, |
| { AOM_CDF3(4608, 32658) }, |
| { AOM_CDF3(4352, 4685) }, |
| { AOM_CDF3(19072, 26776) } }, |
| #endif // CONFIG_MRC_TX |
| }; |
| |
| #if CONFIG_CFL |
| static const aom_cdf_prob default_cfl_sign_cdf[CDF_SIZE(CFL_JOINT_SIGNS)] = { |
| AOM_CDF8(1892, 2229, 11464, 14116, 25661, 26409, 32508) |
| }; |
| |
| static const aom_cdf_prob |
| default_cfl_alpha_cdf[CFL_ALPHA_CONTEXTS][CDF_SIZE(CFL_ALPHABET_SIZE)] = { |
| { AOM_CDF16(16215, 27740, 31726, 32606, 32736, 32751, 32757, 32759, 32761, |
| 32762, 32763, 32764, 32765, 32766, 32767) }, |
| { AOM_CDF16(15213, 24615, 29704, 31974, 32545, 32673, 32713, 32746, 32753, |
| 32756, 32758, 32761, 32763, 32764, 32766) }, |
| { AOM_CDF16(13250, 24677, 29113, 31666, 32408, 32578, 32628, 32711, 32730, |
| 32738, 32744, 32749, 32752, 32756, 32759) }, |
| { AOM_CDF16(24593, 30787, 32062, 32495, 32656, 32707, 32735, 32747, 32752, |
| 32757, 32760, 32763, 32764, 32765, 32767) }, |
| { AOM_CDF16(19883, 27419, 30100, 31392, 31896, 32184, 32299, 32511, 32568, |
| 32602, 32628, 32664, 32680, 32691, 32708) }, |
| { AOM_CDF16(15939, 24151, 27754, 29680, 30651, 31267, 31527, 31868, 32001, |
| 32090, 32181, 32284, 32314, 32366, 32486) } |
| }; |
| #endif |
| |
| #if CONFIG_KF_CTX |
| // TODO(jingning): This initial models are copied directly from the entries |
| // from the original table. The copied indexes are (0, 0), (0, 1), .. (4, 4). |
| // It is possible to re-train this model and bring back the 0.14% loss in CIF |
| // set key frame coding. This reduction in context model does not change the |
| // key frame coding stats for mid and high resolution sets. |
| const aom_cdf_prob |
| default_kf_y_mode_cdf[KF_MODE_CONTEXTS][KF_MODE_CONTEXTS][CDF_SIZE( |
| INTRA_MODES)] = { |
| { |
| { AOM_CDF13(14208, 17049, 20482, 21400, 22520, 23261, 23963, 25010, |
| 25828, 28398, 29394, 30738) }, |
| { AOM_CDF13(10496, 18295, 19872, 20945, 21933, 22818, 23334, 24033, |
| 24996, 27652, 29060, 30071) }, |
| { AOM_CDF13(5120, 6461, 19840, 20310, 21151, 21506, 22535, 23900, |
| 24281, 26958, 27680, 29636) }, |
| { AOM_CDF13(12544, 15177, 17666, 19855, 21147, 22017, 22797, 24514, |
| 25779, 28716, 29772, 31267) }, |
| { AOM_CDF13(7552, 9909, 11908, 13141, 18765, 22029, 23872, 24920, |
| 25674, 29031, 30244, 31684) }, |
| }, |
| { |
| { AOM_CDF13(3968, 17613, 19125, 19550, 20305, 21908, 22274, 22719, |
| 23959, 26970, 29013, 29843) }, |
| { AOM_CDF13(3072, 21231, 21863, 22306, 22674, 23414, 23517, 23798, |
| 24770, 27032, 29016, 29636) }, |
| { AOM_CDF13(2560, 9825, 15681, 16370, 17054, 17687, 18236, 19273, |
| 20311, 24863, 26825, 28756) }, |
| { AOM_CDF13(6912, 15140, 16485, 18364, 19181, 20394, 20663, 22098, |
| 23936, 27555, 29704, 30849) }, |
| { AOM_CDF13(2944, 13101, 14006, 14974, 17818, 21093, 21930, 22566, |
| 24137, 27732, 29814, 30904) }, |
| }, |
| { |
| { AOM_CDF13(11392, 12961, 20901, 21544, 22490, 22928, 23888, 25214, |
| 25777, 28256, 29102, 30513) }, |
| { AOM_CDF13(8064, 13595, 18888, 19616, 20765, 21454, 21990, 23103, |
| 23980, 26772, 28070, 29197) }, |
| { AOM_CDF13(4352, 5059, 21705, 22099, 22703, 22846, 23679, 25469, |
| 25728, 27919, 28484, 30215) }, |
| { AOM_CDF13(10752, 12277, 16471, 18276, 19443, 19917, 21158, 23881, |
| 24892, 27709, 28771, 30274) }, |
| { AOM_CDF13(8320, 10000, 14147, 15330, 19197, 20923, 22954, 24541, |
| 25285, 28407, 29431, 30953) }, |
| }, |
| { |
| { AOM_CDF13(10240, 12819, 15545, 18248, 19779, 20932, 21899, 23377, |
| 25448, 28730, 29936, 31536) }, |
| { AOM_CDF13(7552, 15309, 16645, 19760, 20653, 21650, 22221, 23273, |
| 25509, 28683, 30153, 31192) }, |
| { AOM_CDF13(5248, 6840, 16129, 17940, 19069, 19660, 20588, 22760, |
| 23927, 27538, 28397, 30725) }, |
| { AOM_CDF13(11008, 11903, 13794, 21320, 21931, 22310, 22546, 25375, |
| 27347, 29800, 30761, 31833) }, |
| { AOM_CDF13(6272, 8678, 10313, 13073, 16823, 19980, 21520, 23242, |
| 25344, 28797, 30405, 31940) }, |
| }, |
| { |
| { AOM_CDF13(7296, 9304, 11772, 12529, 18014, 20418, 23076, 24662, |
| 25549, 29074, 30392, 31773) }, |
| { AOM_CDF13(7168, 11687, 13541, 14431, 18214, 20761, 22269, 23320, |
| 24633, 28339, 30193, 31268) }, |
| { AOM_CDF13(3584, 4428, 13496, 14189, 17372, 18617, 20609, 22615, |
| 23270, 27280, 28305, 30602) }, |
| { AOM_CDF13(7424, 8834, 10499, 14357, 17671, 19150, 20460, 23235, |
| 24391, 28351, 29843, 31481) }, |
| { AOM_CDF13(4480, 5888, 7093, 7902, 18290, 22123, 24511, 25532, 26360, |
| 29653, 30954, 32215) }, |
| }, |
| }; |
| #else |
| const aom_cdf_prob |
| default_kf_y_mode_cdf[INTRA_MODES][INTRA_MODES][CDF_SIZE(INTRA_MODES)] = { |
| #if CONFIG_FILTER_INTRA |
| { { AOM_CDF13(14683, 16164, 18655, 19530, 20058, 20712, 21844, 23569, |
| 24762, 29323, 30502, 32305) }, |
| { AOM_CDF13(12656, 20348, 21294, 21804, 22202, 23095, 23587, 24461, |
| 25907, 29190, 30652, 31811) }, |
| { AOM_CDF13(9503, 9951, 23007, 23314, 23541, 23705, 24951, 26524, 26849, |
| 29605, 30141, 31999) }, |
| { AOM_CDF13(13260, 14061, 15139, 17906, 18255, 18765, 19485, 22590, |
| 24686, 29535, 30788, 32556) }, |
| { AOM_CDF13(9636, 10707, 11584, 12180, 19805, 22417, 24821, 25934, |
| 26829, 30447, 31325, 32571) }, |
| { AOM_CDF13(11503, 14182, 15005, 15716, 17312, 22822, 23813, 24939, |
| 26485, 30176, 31386, 32491) }, |
| { AOM_CDF13(10780, 11415, 14363, 14834, 16619, 17205, 23514, 24954, |
| 25580, 29808, 30651, 32535) }, |
| { AOM_CDF13(10987, 11732, 14421, 15496, 15957, 16409, 17580, 23241, |
| 24331, 29195, 30353, 32508) }, |
| { AOM_CDF13(12508, 14242, 15162, 16631, 17071, 17984, 18776, 20784, |
| 24151, 29108, 30867, 32444) }, |
| { AOM_CDF13(12829, 14161, 16064, 16898, 17478, 18230, 19432, 21587, |
| 22866, 28544, 30194, 32428) }, |
| { AOM_CDF13(12573, 14467, 16431, 17241, 17858, 18791, 19760, 21697, |
| 22982, 28322, 30394, 32214) }, |
| { AOM_CDF13(12584, 13813, 16632, 17412, 17891, 18453, 19775, 21906, |
| 22973, 28492, 29852, 32414) }, |
| { AOM_CDF13(10371, 13033, 17420, 17894, 18176, 18567, 19210, 20319, |
| 21090, 24048, 25125, 26632) } }, |
| { { AOM_CDF13(9051, 21642, 22328, 22666, 22990, 24191, 24466, 25094, |
| 26458, 29094, 30542, 31304) }, |
| { AOM_CDF13(5783, 26271, 26458, 26655, 26792, 27507, 27595, 27910, |
| 29012, 30270, 31322, 31740) }, |
| { AOM_CDF13(9084, 14570, 20536, 20922, 21174, 21685, 22190, 23274, |
| 24293, 26854, 27998, 29451) }, |
| { AOM_CDF13(9162, 15547, 16132, 18428, 19036, 19961, 20253, 22111, |
| 25468, 28977, 31151, 32108) }, |
| { AOM_CDF13(6626, 15650, 16281, 16696, 20419, 23826, 24669, 25188, |
| 26709, 29561, 31203, 31811) }, |
| { AOM_CDF13(5946, 17790, 18063, 18339, 19049, 25701, 25942, 26289, |
| 28224, 30501, 31732, 32192) }, |
| { AOM_CDF13(8247, 15710, 16700, 17083, 18600, 19891, 23303, 24149, |
| 25418, 28745, 30205, 31229) }, |
| { AOM_CDF13(7414, 14790, 16103, 17056, 17437, 18332, 18797, 23279, |
| 25024, 28630, 30385, 31627) }, |
| { AOM_CDF13(7886, 17142, 17377, 18228, 18517, 19566, 19789, 20477, |
| 26467, 29451, 31424, 32074) }, |
| { AOM_CDF13(8251, 19430, 19998, 20426, 20782, 22155, 22488, 23281, |
| 25037, 28791, 30593, 31614) }, |
| { AOM_CDF13(8042, 19117, 19777, 20139, 20462, 21878, 22212, 23083, |
| 24811, 28090, 30592, 31308) }, |
| { AOM_CDF13(8268, 19518, 20406, 20756, 21064, 22108, 22552, 23405, |
| 25111, 28731, 30343, 31534) }, |
| { AOM_CDF13(6521, 21472, 22603, 22915, 23041, 23480, 23618, 24110, |
| 25099, 26516, 27883, 28449) } }, |
| { { AOM_CDF13(12527, 13076, 21835, 22214, 22492, 22728, 23978, 25665, |
| 26165, 29466, 30247, 32239) }, |
| { AOM_CDF13(12377, 16820, 21011, 21631, 21960, 22438, 23031, 24350, |
| 25400, 28539, 29714, 31154) }, |
| { AOM_CDF13(6712, 6862, 26853, 26972, 27060, 27103, 27826, 29143, 29267, |
| 30799, 31064, 32294) }, |
| { AOM_CDF13(11320, 11776, 15386, 17447, 17768, 18066, 18973, 23664, |
| 25022, 29029, 30158, 32267) }, |
| { AOM_CDF13(10773, 11905, 15020, 15656, 20247, 21640, 24465, 25777, |
| 26419, 29685, 30762, 32481) }, |
| { AOM_CDF13(12323, 14046, 17449, 18101, 19214, 22210, 23345, 24975, |
| 26412, 29729, 30931, 32336) }, |
| { AOM_CDF13(9944, 10198, 17726, 18052, 18893, 19155, 25498, 26898, |
| 27176, 30160, 30652, 32510) }, |
| { AOM_CDF13(8721, 8970, 16785, 17446, 17649, 17826, 18746, 25927, 26396, |
| 29702, 30461, 32528) }, |
| { AOM_CDF13(11404, 12417, 15834, 17066, 17441, 18014, 18966, 21819, |
| 24083, 29077, 30376, 32213) }, |
| { AOM_CDF13(11450, 11958, 18297, 18820, 19165, 19479, 20809, 23280, |
| 23916, 28662, 29933, 32364) }, |
| { AOM_CDF13(10920, 11607, 17980, 18561, 18921, 19301, 20390, 22706, |
| 23413, 28156, 30004, 31872) }, |
| { AOM_CDF13(11462, 11962, 19642, 20131, 20369, 20530, 21898, 24152, |
| 24686, 28899, 29656, 32424) }, |
| { AOM_CDF13(8171, 9219, 21810, 22146, 22350, 22480, 22930, 24054, 24405, |
| 26437, 27109, 28397) } }, |
| { { AOM_CDF13(12474, 13429, 14740, 17535, 18021, 18752, 19551, 22163, |
| 24563, 29410, 30687, 32505) }, |
| { AOM_CDF13(9862, 15025, 15766, 18942, 19321, 20031, 20492, 21747, |
| 25671, 29272, 30926, 32270) }, |
| { AOM_CDF13(8764, 9426, 17676, 19605, 19945, 20174, 21106, 24312, 25470, |
| 29242, 30066, 31831) }, |
| { AOM_CDF13(8566, 9030, 9692, 18683, 18787, 18968, 19155, 23451, 26278, |
| 30299, 31208, 32537) }, |
| { AOM_CDF13(7535, 8616, 9353, 13056, 18938, 21199, 22627, 23971, 26022, |
| 30131, 31243, 32618) }, |
| { AOM_CDF13(9138, 11001, 11570, 14638, 16000, 20926, 21803, 23237, |
| 26287, 30063, 31128, 32599) }, |
| { AOM_CDF13(9729, 10184, 11919, 13759, 15439, 16099, 20564, 22949, |
| 24424, 29313, 30373, 32518) }, |
| { AOM_CDF13(8615, 9090, 10462, 14832, 15157, 15466, 16143, 22773, 24815, |
| 29574, 30593, 32635) }, |
| { AOM_CDF13(9258, 10308, 10884, 15905, 16092, 16466, 16802, 19277, |
| 25235, 29804, 31328, 32508) }, |
| { AOM_CDF13(10403, 11313, 12386, 15442, 15884, 16549, 17269, 20362, |
| 22913, 28783, 30284, 32578) }, |
| { AOM_CDF13(9620, 10894, 11874, 14923, 15398, 16326, 17076, 20069, |
| 23137, 28656, 30608, 32331) }, |
| { AOM_CDF13(10095, 10981, 12537, 15703, 16165, 16741, 17550, 20754, |
| 22975, 29162, 30500, 32582) }, |
| { AOM_CDF13(8858, 11204, 14847, 18228, 18741, 19060, 19629, 21234, |
| 24400, 27622, 29011, 30627) } }, |
| { { AOM_CDF13(9911, 10689, 11787, 12138, 19892, 22168, 24984, 26365, |
| 27052, 30676, 31618, 32577) }, |
| { AOM_CDF13(10405, 14007, 14667, 15051, 20542, 23567, 25261, 26243, |
| 27418, 30244, 31480, 32398) }, |
| { AOM_CDF13(7972, 8563, 16778, 17053, 20474, 21431, 24348, 26064, 26466, |
| 29456, 30241, 31822) }, |
| { AOM_CDF13(10502, 10858, 11637, 13369, 16831, 18528, 20122, 23814, |
| 25350, 29741, 31151, 32539) }, |
| { AOM_CDF13(4993, 5184, 5393, 5580, 25670, 27769, 29927, 30768, 31020, |
| 32139, 32371, 32721) }, |
| { AOM_CDF13(6994, 8042, 8425, 8775, 18573, 26670, 27998, 29060, 29741, |
| 31512, 32140, 32705) }, |
| { AOM_CDF13(6608, 6893, 7917, 8137, 18180, 19484, 27302, 28268, 28648, |
| 31184, 31688, 32604) }, |
| { AOM_CDF13(7758, 8381, 9673, 10202, 15951, 17361, 19451, 26253, 26891, |
| 30394, 31343, 32571) }, |
| { AOM_CDF13(9961, 11581, 12003, 12812, 17402, 19995, 21609, 23735, |
| 25957, 29973, 31339, 32560) }, |
| { AOM_CDF13(10245, 10965, 11887, 12326, 18409, 20778, 23127, 24779, |
| 25560, 30046, 31167, 32588) }, |
| { AOM_CDF13(9047, 10157, 11136, 11600, 17607, 20541, 22746, 24278, |
| 25239, 29844, 31296, 32466) }, |
| { AOM_CDF13(10318, 11227, 12470, 12792, 17742, 19600, 22120, 24346, |
| 25079, 29588, 30917, 32593) }, |
| { AOM_CDF13(8281, 10602, 15452, 15940, 19120, 20702, 22521, 23526, |
| 24236, 27829, 28776, 29973) } }, |
| { { AOM_CDF13(9850, 12693, 13536, 13937, 16080, 23341, 24177, 25258, |
| 26372, 30167, 31506, 32425) }, |
| { AOM_CDF13(8537, 15828, 16155, 16425, 17738, 25313, 25706, 26423, |
| 27642, 30290, 31795, 32372) }, |
| { AOM_CDF13(8805, 10168, 16679, 17136, 18480, 21724, 22707, 24501, |
| 25226, 28734, 29582, 31015) }, |
| { AOM_CDF13(11887, 13456, 14000, 16402, 17550, 20969, 21942, 24081, |
| 26141, 29735, 31365, 32610) }, |
| { AOM_CDF13(5462, 6783, 7085, 7427, 16960, 26746, 27970, 28609, 29343, |
| 31379, 32138, 32593) }, |
| { AOM_CDF13(4786, 7121, 7242, 7469, 9622, 28427, 28700, 29374, 30121, |
| 31764, 32356, 32637) }, |
| { AOM_CDF13(9172, 10388, 11156, 11527, 15483, 20332, 24727, 25954, |
| 26870, 30198, 31246, 32352) }, |
| { AOM_CDF13(8102, 9847, 11124, 11911, 13567, 18203, 19081, 24364, 25695, |
| 29586, 31057, 32380) }, |
| { AOM_CDF13(10488, 13506, 14020, 14824, 16307, 20899, 21549, 22906, |
| 25886, 29488, 31408, 32369) }, |
| { AOM_CDF13(9407, 11928, 12529, 12941, 14674, 20905, 21782, 23113, |
| 24351, 29073, 31009, 32410) }, |
| { AOM_CDF13(8764, 11728, 12298, 12713, 14609, 21424, 22115, 23419, |
| 24779, 29206, 31355, 32390) }, |
| { AOM_CDF13(9517, 11912, 12950, 13401, 15075, 20426, 21436, 23153, |
| 24539, 29531, 31132, 32469) }, |
| { AOM_CDF13(8253, 12956, 16212, 16664, 17756, 22714, 23216, 24249, |
| 25321, 28440, 29620, 30259) } }, |
| { { AOM_CDF13(11792, 12317, 15563, 16032, 17398, 17977, 23384, 25171, |
| 25807, 29850, 30737, 32541) }, |
| { AOM_CDF13(10922, 14049, 15834, 16386, 17629, 18873, 22496, 24451, |
| 25744, 29328, 30878, 32141) }, |
| { AOM_CDF13(8243, 8431, 19690, 19885, 20402, 20560, 25644, 27470, 27737, |
| 30291, 30701, 32380) }, |
| { AOM_CDF13(11266, 11746, 13215, 15105, 15916, 16497, 19044, 22912, |
| 24422, 29451, 30565, 32543) }, |
| { AOM_CDF13(7970, 8353, 8989, 9324, 18715, 20136, 27478, 28360, 28854, |
| 31356, 31910, 32687) }, |
| { AOM_CDF13(9835, 10905, 11896, 12507, 15383, 20329, 25102, 26520, |
| 27487, 30879, 31709, 32540) }, |
| { AOM_CDF13(6779, 6957, 9270, 9436, 11553, 11824, 27958, 28747, 29030, |
| 31268, 31664, 32666) }, |
| { AOM_CDF13(9125, 9475, 12773, 13383, 14285, 14691, 18620, 24633, 25338, |
| 29728, 30582, 32548) }, |
| { AOM_CDF13(11721, 12709, 14065, 15136, 16224, 17044, 20019, 22634, |
| 24974, 29533, 30976, 32540) }, |
| { AOM_CDF13(11134, 11581, 13908, 14421, 15715, 16407, 20884, 23365, |
| 24142, 29151, 30333, 32546) }, |
| { AOM_CDF13(10621, 11354, 13725, 14331, 15697, 16435, 20811, 23061, |
| 23916, 29068, 30630, 32382) }, |
| { AOM_CDF13(11037, 11497, 14490, 14987, 16009, 16447, 21140, 23683, |
| 24312, 28995, 30105, 32639) }, |
| { AOM_CDF13(9605, 11018, 17444, 17875, 18709, 19288, 22633, 24723, |
| 25518, 28726, 29835, 31394) } }, |
| { { AOM_CDF13(12284, 12942, 15497, 16898, 17400, 17937, 19136, 23012, |
| 24306, 29247, 30360, 32526) }, |
| { AOM_CDF13(11749, 15601, 16892, 18207, 18593, 19416, 20162, 22890, |
| 24773, 28978, 30525, 32157) }, |
| { AOM_CDF13(8357, 8590, 18591, 19354, 19529, 19661, 20764, 25434, 25938, |
| 29380, 29919, 32290) }, |
| { AOM_CDF13(9307, 9623, 10609, 15340, 15587, 15878, 16422, 22905, 25106, |
| 29604, 30579, 32561) }, |
| { AOM_CDF13(9511, 10303, 11146, 12396, 19000, 20742, 22883, 25043, |
| 26322, 30216, 31156, 32668) }, |
| { AOM_CDF13(11525, 12965, 13992, 15314, 16559, 21108, 22323, 24844, |
| 26765, 30376, 31351, 32576) }, |
| { AOM_CDF13(9919, 10382, 13106, 14128, 15212, 15741, 20216, 23213, |
| 24169, 29046, 29869, 32570) }, |
| { AOM_CDF13(8056, 8456, 10218, 11714, 12070, 12383, 12849, 26222, 27079, |
| 30222, 30828, 32606) }, |
| { AOM_CDF13(10700, 11453, 12659, 15291, 15677, 16240, 16902, 20777, |
| 24142, 29325, 30729, 32560) }, |
| { AOM_CDF13(10863, 11450, 13506, 14976, 15428, 15869, 17051, 21294, |
| 22705, 28406, 29836, 32553) }, |
| { AOM_CDF13(10357, 11196, 13312, 14910, 15380, 15977, 16957, 20978, |
| 22542, 28263, 30186, 32369) }, |
| { AOM_CDF13(10325, 10858, 13637, 15045, 15455, 15809, 17144, 21700, |
| 22936, 28610, 29747, 32558) }, |
| { AOM_CDF13(10032, 11356, 16324, 17851, 18191, 18525, 19241, 22933, |
| 24078, 27949, 29094, 31080) } }, |
| { { AOM_CDF13(11187, 13518, 14554, 16266, 16753, 17679, 18282, 19923, |
| 24195, 29274, 30823, 32442) }, |
| { AOM_CDF13(7948, 15152, 15579, 16934, 17200, 18121, 18405, 19130, |
| 26141, 29589, 31275, 32270) }, |
| { AOM_CDF13(8418, 9721, 16634, 18137, 18405, 18791, 19607, 22197, 24804, |
| 28838, 29667, 31725) }, |
| { AOM_CDF13(9661, 10767, 11231, 16796, 16918, 17285, 17685, 20433, |
| 25515, 29910, 31128, 32611) }, |
| { AOM_CDF13(7447, 9631, 10071, 11463, 16405, 18681, 19977, 21135, 25724, |
| 30089, 31371, 32429) }, |
| { AOM_CDF13(7732, 11142, 11643, 13157, 14285, 19050, 19568, 20445, |
| 26278, 30197, 31552, 32543) }, |
| { AOM_CDF13(8655, 9972, 11341, 12647, 14152, 15009, 18424, 20317, 23903, |
| 29129, 30367, 32348) }, |
| { AOM_CDF13(8905, 10161, 11295, 14376, 14751, 15334, 15861, 20676, |
| 24144, 29140, 30559, 32518) }, |
| { AOM_CDF13(7230, 9455, 9769, 12237, 12385, 12718, 12941, 14070, 26774, |
| 30020, 31689, 32544) }, |
| { AOM_CDF13(9676, 11840, 12666, 14444, 14854, 15790, 16395, 18289, |
| 23074, 28546, 30570, 32500) }, |
| { AOM_CDF13(8954, 11507, 12411, 14262, 14736, 15800, 16324, 17931, |
| 23370, 28692, 30899, 32304) }, |
| { AOM_CDF13(9604, 11709, 12728, 14391, 14817, 15784, 16426, 18627, |
| 22984, 28781, 30290, 32507) }, |
| { AOM_CDF13(8037, 12362, 14711, 16445, 16662, 17238, 17667, 18883, |
| 24405, 27873, 29300, 30676) } }, |
| { { AOM_CDF13(12742, 13944, 16005, 16901, 17483, 18249, 19462, 21457, |
| 22908, 28575, 30017, 32411) }, |
| { AOM_CDF13(11299, 16882, 17822, 18576, 19025, 20145, 20676, 21738, |
| 23779, 28608, 30479, 32163) }, |
| { AOM_CDF13(9373, 9807, 20454, 20912, 21134, 21315, 22536, 24523, 25027, |
| 28824, 29546, 31958) }, |
| { AOM_CDF13(10839, 11634, 12609, 15747, 16076, 16521, 17368, 20813, |
| 23179, 28736, 30250, 32547) }, |
| { AOM_CDF13(10018, 11043, 11846, 12631, 18703, 21106, 23223, 24327, |
| 25655, 29908, 31108, 32633) }, |
| { AOM_CDF13(10447, 12670, 13370, 14274, 15751, 20138, 21082, 22289, |
| 24356, 29308, 30721, 32473) }, |
| { AOM_CDF13(10304, 10858, 13242, 13826, 15409, 16080, 21225, 22983, |
| 23924, 29128, 30162, 32556) }, |
| { AOM_CDF13(9909, 10554, 12924, 14243, 14636, 15075, 16202, 21806, |
| 23067, 28721, 29942, 32552) }, |
| { AOM_CDF13(10896, 12565, 13376, 14948, 15378, 16154, 16898, 19033, |
| 22710, 28465, 30461, 32462) }, |
| { AOM_CDF13(11659, 12724, 14290, 15241, 15795, 16545, 17729, 20065, |
| 21669, 28045, 29829, 32507) }, |
| { AOM_CDF13(11351, 12806, 14382, 15343, 15955, 16885, 17916, 20033, |
| 21718, 28093, 30166, 32319) }, |
| { AOM_CDF13(11522, 12494, 14590, 15496, 15977, 16665, 17908, 20267, |
| 21743, 28115, 29581, 32452) }, |
| { AOM_CDF13(9913, 12241, 17367, 18136, 18433, 18985, 19700, 21136, |
| 22405, 26910, 28302, 30379) } }, |
| { { AOM_CDF13(12772, 14653, 16651, 17429, 17957, 18854, 19886, 21672, |
| 23234, 28792, 30500, 32399) }, |
| { AOM_CDF13(10718, 18074, 18913, 19509, 19880, 20951, 21443, 22467, |
| 24411, 28546, 30812, 32079) }, |
| { AOM_CDF13(8668, 9307, 20783, 21169, 21531, 21743, 22862, 24771, 25364, |
| 29059, 29920, 31878) }, |
| { AOM_CDF13(11352, 12585, 13504, 16428, 16801, 17365, 17969, 21427, |
| 23868, 29321, 30836, 32622) }, |
| { AOM_CDF13(9076, 10636, 11637, 12524, 18204, 20593, 22842, 23921, |
| 25465, 29951, 31401, 32575) }, |
| { AOM_CDF13(9924, 12861, 13519, 14327, 15700, 20596, 21434, 22592, |
| 24521, 29177, 30937, 32569) }, |
| { AOM_CDF13(9975, 10926, 13127, 13658, 15283, 16041, 21277, 23058, |
| 24139, 29093, 30305, 32527) }, |
| { AOM_CDF13(9782, 10733, 12976, 14251, 14721, 15295, 16279, 22181, |
| 23520, 29134, 30459, 32591) }, |
| { AOM_CDF13(10910, 13136, 13939, 15246, 15760, 16621, 17278, 19097, |
| 23321, 28756, 31030, 32520) }, |
| { AOM_CDF13(11508, 13079, 14662, 15543, 16088, 16964, 18013, 20126, |
| 21886, 28317, 30284, 32446) }, |
| { AOM_CDF13(11588, 13894, 15463, 16360, 16934, 17975, 18878, 20699, |
| 22408, 28392, 30519, 32360) }, |
| { AOM_CDF13(11198, 12680, 14726, 15620, 16098, 16861, 18056, 20172, |
| 21896, 28252, 29839, 32437) }, |
| { AOM_CDF13(9832, 13268, 17993, 18757, 19173, 19664, 20264, 21689, |
| 23011, 27552, 29216, 30566) } }, |
| { { AOM_CDF13(12350, 13494, 16423, 17219, 17721, 18280, 19569, 21557, |
| 22752, 28182, 29360, 32304) }, |
| { AOM_CDF13(10022, 16315, 17409, 18094, 18533, 19487, 20138, 21179, |
| 22977, 27630, 29129, 31612) }, |
| { AOM_CDF13(9089, 9522, 20772, 21117, 21321, 21492, 22623, 24717, 25118, |
| 28517, 28979, 31962) }, |
| { AOM_CDF13(9995, 10496, 11749, 15264, 15578, 15986, 16825, 20949, |
| 23073, 28353, 29869, 32482) }, |
| { AOM_CDF13(9679, 10801, 11768, 12705, 18527, 20477, 22915, 24165, |
| 25268, 29848, 30931, 32576) }, |
| { AOM_CDF13(9567, 11899, 12955, 13828, 15192, 19318, 20367, 21537, |
| 23628, 28952, 30125, 32358) }, |
| { AOM_CDF13(9977, 10470, 13391, 14019, 15325, 15830, 21218, 23133, |
| 23836, 28927, 29755, 32513) }, |
| { AOM_CDF13(9850, 10345, 13290, 14602, 14927, 15251, 16355, 22136, |
| 23237, 28655, 29584, 32430) }, |
| { AOM_CDF13(10404, 11783, 12735, 14400, 14849, 15513, 16394, 18648, |
| 22370, 28254, 30174, 32416) }, |
| { AOM_CDF13(11468, 12380, 14466, 15450, 15969, 16598, 17836, 20272, |
| 21618, 27769, 29346, 32367) }, |
| { AOM_CDF13(10553, 11978, 13832, 14829, 15388, 16214, 17380, 19633, |
| 21295, 27909, 29723, 32101) }, |
| { AOM_CDF13(11458, 12316, 15258, 16119, 16504, 16926, 18261, 20678, |
| 21757, 27964, 29206, 32426) }, |
| { AOM_CDF13(9827, 12420, 17601, 18357, 18643, 19019, 19747, 21072, |
| 22058, 25919, 27042, 29550) } }, |
| { { AOM_CDF13(9582, 13804, 16310, 16612, 16855, 17317, 17804, 18740, |
| 19414, 21959, 22938, 24178) }, |
| { AOM_CDF13(7931, 20318, 21429, 21817, 21997, 22345, 22526, 23105, |
| 23829, 25586, 26598, 27385) }, |
| { AOM_CDF13(6461, 7883, 22735, 22941, 23061, 23170, 23671, 24830, 25109, |
| 26711, 27168, 28668) }, |
| { AOM_CDF13(9870, 12532, 14896, 17822, 18219, 18649, 19079, 23162, |
| 24634, 28800, 30057, 31098) }, |
| { AOM_CDF13(8170, 13942, 15674, 16236, 20928, 22526, 24154, 25027, |
| 26567, 29246, 29882, 31110) }, |
| { AOM_CDF13(9833, 16669, 17894, 18429, 19535, 23506, 24053, 25052, |
| 26466, 29379, 30616, 31424) }, |
| { AOM_CDF13(9558, 13127, 16722, 16945, 18404, 18965, 23157, 24785, |
| 25444, 28879, 29715, 31451) }, |
| { AOM_CDF13(8656, 11218, 15859, 16851, 17205, 17565, 18231, 24622, |
| 25273, 28496, 29332, 31266) }, |
| { AOM_CDF13(9768, 14291, 15838, 16981, 17225, 18107, 18654, 20335, |
| 24118, 28540, 30170, 31448) }, |
| { AOM_CDF13(10347, 15055, 17791, 18218, 18600, 19290, 19932, 21554, |
| 22592, 26896, 28359, 30358) }, |
| { AOM_CDF13(9093, 14028, 17143, 17521, 17893, 18675, 19203, 20715, |
| 21674, 25422, 28036, 29528) }, |
| { AOM_CDF13(10719, 15009, 18593, 19033, 19256, 19708, 20387, 22033, |
| 22877, 26524, 27841, 30214) }, |
| { AOM_CDF13(6775, 10524, 14225, 14551, 14761, 14914, 15132, 16033, |
| 16477, 17963, 18795, 19673) } } |
| #else |
| { |
| { AOM_CDF13(14208, 17049, 20482, 21400, 22520, 23261, 23963, 25010, |
| 25828, 28398, 29394, 30738) }, |
| { AOM_CDF13(10496, 18295, 19872, 20945, 21933, 22818, 23334, 24033, |
| 24996, 27652, 29060, 30071) }, |
| { AOM_CDF13(5120, 6461, 19840, 20310, 21151, 21506, 22535, 23900, |
| 24281, 26958, 27680, 29636) }, |
| { AOM_CDF13(12544, 15177, 17666, 19855, 21147, 22017, 22797, 24514, |
| 25779, 28716, 29772, 31267) }, |
| { AOM_CDF13(7552, 9909, 11908, 13141, 18765, 22029, 23872, 24920, |
| 25674, 29031, 30244, 31684) }, |
| { AOM_CDF13(11008, 15004, 16534, 18158, 21515, 26668, 27834, 28735, |
| 30471, 30839, 30969, 31068) }, |
| { AOM_CDF13(6272, 7963, 11944, 12780, 17944, 19198, 24071, 25295, |
| 25834, 29014, 29949, 31733) }, |
| { AOM_CDF13(8192, 10189, 14596, 15680, 17143, 17909, 19201, 23711, |
| 24503, 28207, 29338, 31424) }, |
| { AOM_CDF13(10752, 13199, 15048, 17151, 18445, 19604, 20363, 21782, |
| 24311, 28026, 29517, 30962) }, |
| { AOM_CDF13(7424, 10301, 13245, 14307, 16021, 16257, 17265, 18739, |
| 20080, 26066, 28325, 31184) }, |
| { AOM_CDF13(6528, 10893, 13773, 14824, 16540, 16926, 17748, 18876, |
| 20396, 25974, 28795, 30820) }, |
| { AOM_CDF13(8704, 11005, 14320, 15349, 16746, 16884, 17887, 19304, |
| 20265, 26115, 27672, 31358) }, |
| { AOM_CDF13(6272, 9504, 15437, 16399, 17355, 17948, 18814, 20270, |
| 21134, 23690, 24759, 26454) }, |
| }, |
| { |
| { AOM_CDF13(3968, 17613, 19125, 19550, 20305, 21908, 22274, 22719, |
| 23959, 26970, 29013, 29843) }, |
| { AOM_CDF13(3072, 21231, 21863, 22306, 22674, 23414, 23517, 23798, |
| 24770, 27032, 29016, 29636) }, |
| { AOM_CDF13(2560, 9825, 15681, 16370, 17054, 17687, 18236, 19273, |
| 20311, 24863, 26825, 28756) }, |
| { AOM_CDF13(6912, 15140, 16485, 18364, 19181, 20394, 20663, 22098, |
| 23936, 27555, 29704, 30849) }, |
| { AOM_CDF13(2944, 13101, 14006, 14974, 17818, 21093, 21930, 22566, |
| 24137, 27732, 29814, 30904) }, |
| { AOM_CDF13(4352, 17824, 18715, 19632, 21519, 26341, 26922, 27575, |
| 29863, 30432, 30769, 30881) }, |
| { AOM_CDF13(2944, 11971, 13509, 14295, 17202, 19005, 21605, 22458, |
| 23839, 27774, 29492, 30787) }, |
| { AOM_CDF13(4224, 13072, 15288, 16406, 17285, 18362, 19003, 21378, |
| 22942, 27093, 29381, 30872) }, |
| { AOM_CDF13(5120, 15375, 16188, 17415, 18183, 19756, 20030, 20883, |
| 23935, 27428, 29627, 30608) }, |
| { AOM_CDF13(2816, 14999, 16352, 16969, 17836, 18125, 18514, 19181, |
| 20650, 25773, 29172, 30662) }, |
| { AOM_CDF13(2560, 16158, 17320, 17839, 18545, 18848, 19130, 19599, |
| 20863, 25449, 29304, 30408) }, |
| { AOM_CDF13(3328, 15146, 16880, 17523, 18340, 18563, 18896, 19582, |
| 20944, 25914, 28759, 30583) }, |
| { AOM_CDF13(2560, 16618, 18460, 19207, 19654, 20276, 20529, 21179, |
| 22355, 25423, 27696, 28638) }, |
| }, |
| { |
| { AOM_CDF13(11392, 12961, 20901, 21544, 22490, 22928, 23888, 25214, |
| 25777, 28256, 29102, 30513) }, |
| { AOM_CDF13(8064, 13595, 18888, 19616, 20765, 21454, 21990, 23103, |
| 23980, 26772, 28070, 29197) }, |
| { AOM_CDF13(4352, 5059, 21705, 22099, 22703, 22846, 23679, 25469, |
| 25728, 27919, 28484, 30215) }, |
| { AOM_CDF13(10752, 12277, 16471, 18276, 19443, 19917, 21158, 23881, |
| 24892, 27709, 28771, 30274) }, |
| { AOM_CDF13(8320, 10000, 14147, 15330, 19197, 20923, 22954, 24541, |
| 25285, 28407, 29431, 30953) }, |
| { AOM_CDF13(11264, 14751, 18517, 20285, 23172, 25970, 27312, 28684, |
| 29803, 30242, 30412, 30668) }, |
| { AOM_CDF13(6528, 7509, 14190, 14953, 17905, 18452, 23074, 24910, |
| 25374, 28605, 29542, 31640) }, |
| { AOM_CDF13(6784, 7644, 15953, 17055, 17945, 18242, 19351, 24705, |
| 25365, 28466, 29334, 31245) }, |
| { AOM_CDF13(8192, 9802, 14519, 15740, 17351, 18084, 18962, 20908, |
| 22937, 26847, 28284, 29888) }, |
| { AOM_CDF13(5888, 7534, 14635, 15436, 16710, 16830, 18000, 19760, |
| 20571, 25777, 27649, 30668) }, |
| { AOM_CDF13(5248, 7364, 14858, 15545, 16861, 17016, 17859, 19384, |
| 20237, 25239, 27715, 29865) }, |
| { AOM_CDF13(6656, 7989, 15472, 16265, 17271, 17334, 18563, 20327, |
| 20916, 26173, 27350, 31034) }, |
| { AOM_CDF13(4480, 6411, 17828, 18611, 19399, 19684, 20504, 21782, |
| 22335, 25286, 26352, 28016) }, |
| }, |
| { |
| { AOM_CDF13(10240, 12819, 15545, 18248, 19779, 20932, 21899, 23377, |
| 25448, 28730, 29936, 31536) }, |
| { AOM_CDF13(7552, 15309, 16645, 19760, 20653, 21650, 22221, 23273, |
| 25509, 28683, 30153, 31192) }, |
| { AOM_CDF13(5248, 6840, 16129, 17940, 19069, 19660, 20588, 22760, |
| 23927, 27538, 28397, 30725) }, |
| { AOM_CDF13(11008, 11903, 13794, 21320, 21931, 22310, 22546, 25375, |
| 27347, 29800, 30761, 31833) }, |
| { AOM_CDF13(6272, 8678, 10313, 13073, 16823, 19980, 21520, 23242, |
| 25344, 28797, 30405, 31940) }, |
| { AOM_CDF13(7424, 10835, 12653, 16345, 19574, 24868, 25937, 27299, |
| 31104, 31448, 31580, 31679) }, |
| { AOM_CDF13(4992, 6458, 9945, 11961, 16136, 17677, 20946, 23042, |
| 24475, 28304, 29748, 31791) }, |
| { AOM_CDF13(9600, 11879, 14703, 17653, 19176, 20185, 20880, 25194, |
| 26584, 29655, 30430, 32044) }, |
| { AOM_CDF13(9856, 11385, 13457, 18705, 19577, 20266, 20746, 22207, |
| 26724, 29431, 30645, 31604) }, |
| { AOM_CDF13(6272, 9318, 11569, 14812, 16351, 16619, 17537, 19596, |
| 22025, 27384, 29277, 31422) }, |
| { AOM_CDF13(5888, 9348, 11416, 14690, 16254, 16633, 17457, 19031, |
| 21875, 27080, 29442, 31193) }, |
| { AOM_CDF13(6912, 9329, 12218, 15177, 16806, 16998, 17991, 20005, |
| 21952, 27108, 28867, 31657) }, |
| { AOM_CDF13(5120, 9098, 13132, 17701, 18739, 19534, 20415, 22136, |
| 24213, 27199, 28504, 29960) }, |
| }, |
| { |
| { AOM_CDF13(7296, 9304, 11772, 12529, 18014, 20418, 23076, 24662, |
| 25549, 29074, 30392, 31773) }, |
| { AOM_CDF13(7168, 11687, 13541, 14431, 18214, 20761, 22269, 23320, |
| 24633, 28339, 30193, 31268) }, |
| { AOM_CDF13(3584, 4428, 13496, 14189, 17372, 18617, 20609, 22615, |
| 23270, 27280, 28305, 30602) }, |
| { AOM_CDF13(7424, 8834, 10499, 14357, 17671, 19150, 20460, 23235, |
| 24391, 28351, 29843, 31481) }, |
| { AOM_CDF13(4480, 5888, 7093, 7902, 18290, 22123, 24511, 25532, 26360, |
| 29653, 30954, 32215) }, |
| { AOM_CDF13(7296, 10176, 11780, 12824, 19608, 25882, 28520, 29445, |
| 31106, 31573, 31775, 31872) }, |
| { AOM_CDF13(3840, 4833, 7551, 8449, 16668, 18614, 23952, 25668, 26721, |
| 29888, 30697, 32090) }, |
| { AOM_CDF13(6528, 8011, 11083, 12427, 16188, 17548, 19625, 23787, |
| 24792, 28649, 29872, 31845) }, |
| { AOM_CDF13(7168, 9170, 10655, 12439, 15550, 18128, 19565, 21412, |
| 23355, 28007, 30080, 31568) }, |
| { AOM_CDF13(5504, 7636, 10174, 11056, 15562, 16252, 17931, 19598, |
| 20967, 26845, 29149, 31490) }, |
| { AOM_CDF13(5248, 7810, 10004, 11015, 15359, 16310, 17834, 19185, |
| 20903, 26728, 29585, 31478) }, |
| { AOM_CDF13(5376, 7322, 10592, 11694, 15586, 16103, 17999, 19740, |
| 20950, 26894, 28912, 31591) }, |
| { AOM_CDF13(4608, 7276, 12153, 13388, 16091, 17970, 19548, 21175, |
| 22481, 26543, 28212, 29908) }, |
| }, |
| { |
| { AOM_CDF13(6656, 12225, 14441, 15158, 19600, 27127, 28221, 29186, |
| 30439, 30913, 31135, 31238) }, |
| { AOM_CDF13(6400, 14608, 15920, 16643, 20149, 27328, 27896, 28672, |
| 30227, 30778, 31053, 31120) }, |
| { AOM_CDF13(3840, 6925, 14671, 15709, 19830, 24216, 25507, 27459, |
| 28552, 29569, 29808, 30169) }, |
| { AOM_CDF13(9600, 13604, 15202, 17530, 20878, 24279, 25278, 28255, |
| 30651, 31170, 31343, 31410) }, |
| { AOM_CDF13(4608, 8535, 9588, 10740, 18673, 27664, 28826, 29828, |
| 31081, 31503, 31680, 31778) }, |
| { AOM_CDF13(4864, 10543, 11313, 12197, 16785, 27858, 28556, 29480, |
| 30892, 31486, 31722, 31787) }, |
| { AOM_CDF13(3968, 7492, 10283, 11318, 18486, 24061, 26761, 28456, |
| 30126, 30872, 31088, 31305) }, |
| { AOM_CDF13(6016, 10246, 12999, 15083, 18769, 22398, 23584, 27098, |
| 29574, 30609, 30898, 31200) }, |
| { AOM_CDF13(7808, 13404, 14723, 16413, 20186, 24739, 25407, 27106, |
| 29929, 30507, 30827, 30915) }, |
| { AOM_CDF13(2816, 6530, 8123, 9240, 12536, 17593, 18754, 20319, 22070, |
| 27037, 29332, 30779) }, |
| { AOM_CDF13(2432, 6577, 8010, 9215, 12657, 18898, 19588, 20953, 22766, |
| 27231, 29927, 31109) }, |
| { AOM_CDF13(3200, 6974, 9162, 10450, 13818, 17757, 19119, 20842, |
| 22269, 27170, 29271, 30804) }, |
| { AOM_CDF13(4480, 10689, 15307, 16589, 19738, 24416, 25332, 26541, |
| 28634, 29711, 29913, 30116) }, |
| }, |
| { |
| { AOM_CDF13(9600, 11066, 15832, 16515, 18844, 19883, 24302, 25759, |
| 26358, 29290, 30262, 31682) }, |
| { AOM_CDF13(8832, 12814, 16171, 17041, 19066, 20145, 22933, 24074, |
| 25006, 28115, 29722, 30991) }, |
| { AOM_CDF13(3840, 4486, 15821, 16330, 18461, 18879, 22436, 25051, |
| 25443, 28637, 29396, 31412) }, |
| { AOM_CDF13(9856, 10863, 14050, 15920, 18783, 19531, 22502, 24577, |
| 25361, 28559, 29600, 31336) }, |
| { AOM_CDF13(6528, 7620, 10182, 11199, 17281, 19946, 23885, 25333, |
| 26130, 29425, 30332, 31948) }, |
| { AOM_CDF13(9728, 11821, 13954, 15233, 19855, 24478, 28675, 29878, |
| 31238, 31741, 31874, 32048) }, |
| { AOM_CDF13(5120, 5753, 9673, 10149, 14343, 15190, 24967, 26378, |
| 26841, 29749, 30527, 32120) }, |
| { AOM_CDF13(5888, 6606, 11498, 12538, 14737, 15425, 19549, 24047, |
| 24765, 28711, 29822, 32138) }, |
| { AOM_CDF13(10368, 11757, 14126, 15474, 18311, 19358, 21539, 23451, |
| 25034, 28791, 30035, 31280) }, |
| { AOM_CDF13(6016, 7623, 11378, 12248, 15171, 15459, 18958, 20875, |
| 21955, 27411, 29196, 31723) }, |
| { AOM_CDF13(5760, 7469, 11399, 12323, 15165, 15528, 18804, 20769, |
| 21767, 27129, 29435, 31502) }, |
| { AOM_CDF13(7040, 8295, 12298, 13035, 15194, 15357, 18976, 21100, |
| 21805, 26978, 28342, 31763) }, |
| { AOM_CDF13(5632, 7465, 14220, 15035, 17014, 18105, 21111, 23027, |
| 23934, 27207, 28293, 30330) }, |
| }, |
| { |
| { AOM_CDF13(11008, 13089, 17144, 18425, 19954, 20624, 21658, 24229, |
| 25290, 28803, 29938, 31493) }, |
| { AOM_CDF13(9088, 14218, 16378, 17699, 18935, 19928, 20524, 22781, |
| 24155, 27523, 29068, 30270) }, |
| { AOM_CDF13(6144, 7194, 17912, 18991, 19879, 20151, 21170, 23938, |
| 24712, 27763, 28556, 30584) }, |
| { AOM_CDF13(10496, 11614, 13652, 16928, 18425, 18967, 19724, 23817, |
| 25594, 28685, 29734, 30941) }, |
| { AOM_CDF13(7296, 8915, 11163, 13821, 16951, 18507, 20180, 22423, |
| 24017, 28294, 29614, 31673) }, |
| { AOM_CDF13(9728, 13441, 15858, 18860, 21713, 24478, 25995, 28233, |
| 30347, 30853, 31081, 31328) }, |
| { AOM_CDF13(6400, 7480, 11482, 13206, 16199, 16908, 20436, 23507, |
| 24650, 28360, 29438, 31532) }, |
| { AOM_CDF13(9856, 10979, 13430, 15195, 15957, 16350, 16871, 26198, |
| 26991, 29612, 30438, 31962) }, |
| { AOM_CDF13(8960, 10529, 12640, 15350, 16987, 17859, 18590, 21400, |
| 23812, 28188, 29589, 31280) }, |
| { AOM_CDF13(7168, 8877, 12393, 14015, 15655, 15794, 16814, 19923, |
| 21086, 26723, 28669, 31468) }, |
| { AOM_CDF13(6400, 8900, 12241, 13828, 15513, 15671, 16500, 19257, |
| 20456, 25984, 28658, 31017) }, |
| { AOM_CDF13(7296, 8820, 12885, 14441, 15813, 15911, 16954, 20026, |
| 20950, 26563, 28140, 31673) }, |
| { AOM_CDF13(6272, 8455, 13328, 15907, 17026, 17464, 18267, 21436, |
| 22712, 26403, 27660, 29559) }, |
| }, |
| { |
| { AOM_CDF13(6784, 11216, 13269, 15677, 16931, 18445, 19097, 20082, |
| 24298, 28236, 30118, 31448) }, |
| { AOM_CDF13(5760, 13240, 14110, 16966, 17743, 18916, 19281, 19848, |
| 25552, 28646, 30444, 31291) }, |
| { AOM_CDF13(4352, 6870, 14660, 16597, 17361, 18126, 18852, 20765, |
| 23526, 27670, 29096, 31214) }, |
| { AOM_CDF13(9472, 11736, 13172, 18192, 19070, 19651, 19991, 21793, |
| 26005, 29291, 30500, 31767) }, |
| { AOM_CDF13(4480, 7252, 8651, 12379, 14936, 17493, 18326, 19527, |
| 23655, 28031, 29960, 31773) }, |
| { AOM_CDF13(6016, 11561, 12864, 15793, 18765, 23040, 23640, 24415, |
| 31040, 31473, 31740, 31827) }, |
| { AOM_CDF13(4480, 6825, 8810, 11269, 14257, 15716, 18397, 20006, |
| 24020, 28230, 29780, 31773) }, |
| { AOM_CDF13(6912, 9466, 11717, 15159, 16237, 17145, 17814, 21258, |
| 24754, 28864, 30313, 32061) }, |
| { AOM_CDF13(7680, 10517, 11381, 16202, 16809, 17425, 17774, 18764, |
| 26842, 29600, 31073, 31886) }, |
| { AOM_CDF13(4992, 8626, 10531, 13103, 14495, 14784, 15365, 16657, |
| 21051, 27011, 29685, 31574) }, |
| { AOM_CDF13(4736, 9433, 10981, 13494, 14644, 15043, 15396, 16378, |
| 21506, 26869, 29824, 31454) }, |
| { AOM_CDF13(5760, 9526, 11905, 14476, 15722, 16103, 16768, 18070, |
| 21630, 27401, 29592, 31818) }, |
| { AOM_CDF13(4480, 9947, 12386, 15909, 16496, 17397, 17866, 18927, |
| 24408, 27750, 29614, 30889) }, |
| }, |
| { |
| { AOM_CDF13(7424, 10538, 14098, 14891, 16486, 16756, 17607, 18952, |
| 20168, 26275, 28617, 31580) }, |
| { AOM_CDF13(5376, 13070, 14969, 15848, 17197, 17447, 17954, 18747, |
| 20137, 25628, 28753, 30628) }, |
| { AOM_CDF13(3584, 5287, 16141, 16840, 17670, 17760, 18532, 20387, |
| 21102, 26118, 27535, 30830) }, |
| { AOM_CDF13(7424, 9594, 11770, 14505, 16234, 16365, 17201, 20286, |
| 22128, 27371, 29426, 31580) }, |
| { AOM_CDF13(5632, 8393, 10566, 11917, 16025, 16697, 18123, 19541, |
| 21135, 27059, 29325, 31814) }, |
| { AOM_CDF13(3840, 7916, 9526, 11010, 14114, 18169, 19510, 21031, |
| 23083, 27769, 29782, 31299) }, |
| { AOM_CDF13(5376, 7338, 10657, 11699, 14780, 15070, 18291, 20170, |
| 21347, 26985, 28811, 31805) }, |
| { AOM_CDF13(5632, 7669, 11558, 12653, 13962, 14116, 15074, 19886, |
| 21123, 26953, 28755, 31708) }, |
| { AOM_CDF13(6528, 9739, 11612, 13211, 14992, 15237, 16016, 17677, |
| 20588, 26647, 29116, 31435) }, |
| { AOM_CDF13(5376, 8346, 11022, 11976, 13541, 13749, 14520, 16173, |
| 17567, 25182, 28111, 31591) }, |
| { AOM_CDF13(4736, 8894, 11294, 12220, 13753, 14029, 14645, 16065, |
| 17621, 24911, 28655, 31344) }, |
| { AOM_CDF13(5760, 8193, 11667, 12461, 13880, 14040, 14946, 16537, |
| 17642, 25117, 27333, 31713) }, |
| { AOM_CDF13(4096, 8479, 13751, 14813, 15994, 16157, 16905, 18314, |
| 19575, 25132, 27445, 30192) }, |
| }, |
| { |
| { AOM_CDF13(7936, 12263, 15558, 16331, 17779, 18148, 18810, 19794, |
| 21046, 26644, 29417, 31507) }, |
| { AOM_CDF13(5376, 15025, 16457, 17074, 18079, 18299, 18648, 19240, |
| 20612, 25687, 29392, 30842) }, |
| { AOM_CDF13(3840, 6037, 17465, 18089, 18869, 18953, 19688, 21223, |
| 21816, 26562, 28195, 30621) }, |
| { AOM_CDF13(8448, 11255, 13307, 15676, 17392, 17603, 18268, 20783, |
| 22646, 27628, 29737, 31628) }, |
| { AOM_CDF13(5760, 9119, 11015, 12269, 16280, 17023, 18282, 19418, |
| 21325, 27309, 30004, 31818) }, |
| { AOM_CDF13(3968, 9094, 10606, 12007, 14218, 18911, 20089, 20924, |
| 23587, 27808, 30253, 31305) }, |
| { AOM_CDF13(6016, 8627, 11201, 12200, 15305, 15671, 18639, 20185, |
| 21627, 26990, 29449, 31723) }, |
| { AOM_CDF13(6272, 8768, 12320, 13296, 14643, 14970, 15760, 20545, |
| 21863, 27473, 29535, 31836) }, |
| { AOM_CDF13(6912, 10905, 12656, 14084, 15705, 16069, 16674, 17779, |
| 21041, 26586, 29539, 31253) }, |
| { AOM_CDF13(5248, 9672, 12113, 12871, 14423, 14710, 15376, 16708, |
| 18092, 25260, 28991, 31585) }, |
| { AOM_CDF13(4736, 10789, 13029, 13750, 15040, 15385, 15840, 16887, |
| 18393, 25230, 29558, 31454) }, |
| { AOM_CDF13(6016, 9916, 12938, 13741, 15030, 15297, 16116, 17333, |
| 18672, 25954, 28498, 31618) }, |
| { AOM_CDF13(4608, 10266, 15450, 16299, 17114, 17288, 17775, 18835, |
| 20227, 25199, 28098, 30018) }, |
| }, |
| { |
| { AOM_CDF13(7296, 9951, 14124, 14806, 16181, 16377, 17485, 19069, |
| 20078, 26051, 27777, 31574) }, |
| { AOM_CDF13(5376, 13823, 15889, 16620, 17709, 17881, 18327, 19140, |
| 20374, 25685, 28160, 30521) }, |
| { AOM_CDF13(3200, 4602, 16404, 17042, 17780, 17829, 18706, 20608, |
| 21115, 25884, 26960, 30804) }, |
| { AOM_CDF13(7040, 9444, 11770, 14321, 15951, 16074, 17033, 20352, |
| 22301, 27567, 29151, 31662) }, |
| { AOM_CDF13(6016, 8316, 10849, 12136, 15860, 16430, 17935, 19659, |
| 21083, 26968, 28839, 31618) }, |
| { AOM_CDF13(3840, 7472, 9436, 11038, 13625, 17596, 18959, 20543, |
| 22879, 27487, 29351, 31186) }, |
| { AOM_CDF13(5376, 7117, 11424, 12381, 14823, 15053, 18656, 20818, |
| 21722, 27042, 28233, 31591) }, |
| { AOM_CDF13(5760, 7281, 11910, 12912, 14229, 14391, 15474, 20113, |
| 21128, 26627, 28077, 31713) }, |
| { AOM_CDF13(6656, 9452, 11526, 13288, 14861, 15062, 15909, 17695, |
| 20429, 26225, 28603, 31340) }, |
| { AOM_CDF13(5376, 7722, 10921, 11813, 13222, 13348, 14211, 15976, |
| 17110, 24634, 27176, 31484) }, |
| { AOM_CDF13(4736, 8226, 11137, 11988, 13518, 13706, 14332, 16016, |
| 17301, 24641, 27704, 31016) }, |
| { AOM_CDF13(5760, 7592, 11880, 12612, 13738, 13813, 14681, 16392, |
| 17306, 24619, 26334, 31818) }, |
| { AOM_CDF13(4096, 8524, 14316, 15392, 16295, 16433, 17197, 18718, |
| 19924, 25123, 26953, 29856) }, |
| }, |
| { |
| { AOM_CDF13(6528, 13383, 17642, 18342, 19224, 20209, 20899, 21944, |
| 23137, 25966, 27429, 28463) }, |
| { AOM_CDF13(4480, 16901, 18876, 19560, 20257, 20912, 21169, 21959, |
| 23036, 25781, 27676, 28569) }, |
| { AOM_CDF13(2688, 5337, 18178, 18829, 19344, 19628, 20267, 22135, |
| 22671, 25817, 26914, 28773) }, |
| { AOM_CDF13(8192, 11378, 14742, 17269, 18230, 19001, 19655, 22949, |
| 24337, 28025, 29503, 30848) }, |
| { AOM_CDF13(5120, 10133, 13144, 14374, 17020, 18920, 20235, 21677, |
| 23142, 27131, 28671, 30284) }, |
| { AOM_CDF13(7424, 15588, 18431, 19723, 21455, 24705, 25461, 26753, |
| 28923, 29475, 29729, 29897) }, |
| { AOM_CDF13(4224, 8689, 13024, 13658, 16637, 17307, 20836, 22665, |
| 23673, 27015, 28310, 30203) }, |
| { AOM_CDF13(5120, 7896, 13618, 14900, 15708, 16153, 16997, 23625, |
| 24466, 27719, 28892, 30500) }, |
| { AOM_CDF13(5760, 11305, 13669, 15462, 16564, 17683, 18252, 20073, |
| 22917, 27005, 28923, 30236) }, |
| { AOM_CDF13(4224, 9510, 13787, 14587, 15753, 15925, 16513, 18193, |
| 19490, 24944, 27482, 29757) }, |
| { AOM_CDF13(3840, 10052, 14106, 14887, 15827, 15996, 16522, 17939, |
| 19204, 24508, 27661, 29491) }, |
| { AOM_CDF13(4736, 9676, 14492, 15163, 16179, 16390, 17133, 18905, |
| 19864, 25185, 27191, 30030) }, |
| { AOM_CDF13(3584, 9370, 14746, 15820, 16708, 17224, 17718, 19329, |
| 20405, 23541, 25258, 26726) }, |
| }, |
| #endif |
| }; |
| #endif // CONFIG_KF_CTX |
| |
| #if CONFIG_LPF_SB |
| static const aom_cdf_prob default_lpf_reuse_cdf[LPF_REUSE_CONTEXT][CDF_SIZE( |
| 2)] = { { AOM_CDF2(4259) }, { AOM_CDF2(728) } }; |
| |
| static const aom_cdf_prob default_lpf_delta_cdf[LPF_DELTA_CONTEXT][CDF_SIZE( |
| DELTA_RANGE)] = { { AOM_CDF8(100, 688, 2128, 4642, 7895, 11851, 17050) }, |
| { AOM_CDF8(100, 1291, 4358, 7425, 10654, 13559, 18563) }, |
| { AOM_CDF8(100, 1086, 4982, 9134, 13031, 16991, 23123) }, |
| { AOM_CDF8(100, 1068, 3395, 7973, 12512, 17967, 22812) }, |
| { AOM_CDF8(100, 442, 2809, 7178, 12535, 17450, 22417) }, |
| { AOM_CDF8(100, 561, 2246, 6050, 11103, 16592, 21353) }, |
| { AOM_CDF8(100, 345, 2399, 5559, 9682, 13992, 20126) }, |
| { AOM_CDF8(100, 337, 1540, 3573, 6438, 10196, 16320) } }; |
| |
| static const aom_cdf_prob |
| default_lpf_sign_cdf[LPF_REUSE_CONTEXT][LPF_SIGN_CONTEXT][CDF_SIZE(2)] = { |
| { { AOM_CDF2(100) }, { AOM_CDF2(11932) } }, |
| { { AOM_CDF2(14785) }, { AOM_CDF2(8145) } } |
| }; |
| #endif // CONFIG_LPF_SB |
| |
| #if CONFIG_EXT_INTRA_MOD |
| static const aom_cdf_prob default_angle_delta_cdf[DIRECTIONAL_MODES][CDF_SIZE( |
| 2 * MAX_ANGLE_DELTA + 1)] = { |
| { AOM_CDF7(2340, 5327, 7611, 23102, 27196, 30546) }, |
| { AOM_CDF7(3267, 8071, 11970, 21822, 25619, 30034) }, |
| { AOM_CDF7(3417, 9937, 12286, 16420, 19941, 30669) }, |
| { AOM_CDF7(5167, 11735, 15254, 16662, 20697, 28276) }, |
| { AOM_CDF7(1728, 10973, 14103, 18547, 22684, 27007) }, |
| { AOM_CDF7(2764, 10700, 12517, 16957, 20590, 30390) }, |
| { AOM_CDF7(2407, 12749, 16527, 20823, 22781, 29642) }, |
| { AOM_CDF7(3068, 10132, 12079, 16542, 19943, 30448) } |
| }; |
| #endif // CONFIG_EXT_INTRA_MOD |
| |
| static void init_mode_probs(FRAME_CONTEXT *fc) { |
| av1_copy(fc->partition_prob, default_partition_probs); |
| av1_copy(fc->intra_inter_prob, default_intra_inter_p); |
| av1_copy(fc->comp_inter_prob, default_comp_inter_p); |
| av1_copy(fc->palette_y_size_cdf, default_palette_y_size_cdf); |
| av1_copy(fc->palette_uv_size_cdf, default_palette_uv_size_cdf); |
| av1_copy(fc->palette_y_color_index_cdf, default_palette_y_color_index_cdf); |
| av1_copy(fc->palette_uv_color_index_cdf, default_palette_uv_color_index_cdf); |
| av1_copy(fc->kf_y_cdf, default_kf_y_mode_cdf); |
| #if CONFIG_EXT_INTRA_MOD |
| av1_copy(fc->angle_delta_cdf, default_angle_delta_cdf); |
| #endif // CONFIG_EXT_INTRA_MOD |
| #if CONFIG_MRC_TX |
| av1_copy(fc->mrc_mask_inter_cdf, default_mrc_mask_inter_cdf); |
| av1_copy(fc->mrc_mask_intra_cdf, default_mrc_mask_intra_cdf); |
| #endif // CONFIG_MRC_TX |
| #if CONFIG_NEW_MULTISYMBOL |
| av1_copy(fc->comp_inter_cdf, default_comp_inter_cdf); |
| #endif // CONFIG_NEW_MULTISYMBOL |
| #if CONFIG_EXT_COMP_REFS |
| av1_copy(fc->comp_ref_type_prob, default_comp_ref_type_p); |
| av1_copy(fc->uni_comp_ref_prob, default_uni_comp_ref_p); |
| #if CONFIG_NEW_MULTISYMBOL |
| av1_copy(fc->comp_ref_type_cdf, default_comp_ref_type_cdf); |
| av1_copy(fc->uni_comp_ref_cdf, default_uni_comp_ref_cdf); |
| #endif // CONFIG_NEW_MULTISYMBOL |
| #endif // CONFIG_EXT_COMP_REFS |
| av1_copy(fc->comp_ref_prob, default_comp_ref_p); |
| #if CONFIG_NEW_MULTISYMBOL |
| av1_copy(fc->palette_y_mode_cdf, default_palette_y_mode_cdf); |
| av1_copy(fc->palette_uv_mode_cdf, default_palette_uv_mode_cdf); |
| av1_copy(fc->comp_ref_cdf, default_comp_ref_cdf); |
| #endif |
| #if CONFIG_LV_MAP |
| av1_copy(fc->txb_skip, default_txb_skip); |
| av1_copy(fc->nz_map, default_nz_map); |
| av1_copy(fc->eob_flag, default_eob_flag); |
| #if !CONFIG_CTX1D |
| av1_copy(fc->eob_extra, default_eob_extra); |
| #endif |
| av1_copy(fc->dc_sign, default_dc_sign); |
| av1_copy(fc->coeff_base, default_coeff_base); |
| av1_copy(fc->coeff_lps, default_coeff_lps); |
| av1_copy(fc->coeff_br, default_coeff_br); |
| #if CONFIG_CTX1D |
| av1_copy(fc->eob_mode, default_eob_mode); |
| av1_copy(fc->empty_line, default_empty_line); |
| av1_copy(fc->hv_eob, default_hv_eob); |
| #endif // CONFIG_CTX1D |
| |
| av1_init_txb_probs(fc); |
| #endif |
| av1_copy(fc->comp_bwdref_prob, default_comp_bwdref_p); |
| #if CONFIG_NEW_MULTISYMBOL |
| av1_copy(fc->comp_bwdref_cdf, default_comp_bwdref_cdf); |
| #endif |
| av1_copy(fc->single_ref_prob, default_single_ref_p); |
| #if CONFIG_NEW_MULTISYMBOL |
| av1_copy(fc->single_ref_cdf, default_single_ref_cdf); |
| #endif |
| #if CONFIG_COMPOUND_SINGLEREF |
| av1_copy(fc->comp_inter_mode_prob, default_comp_inter_mode_p); |
| #endif // CONFIG_COMPOUND_SINGLEREF |
| #if CONFIG_RECT_TX_EXT |
| fc->quarter_tx_size_prob = default_quarter_tx_size_prob; |
| #if CONFIG_NEW_MULTISYMBOL |
| av1_copy(fc->quarter_tx_size_cdf, default_quarter_tx_size_cdf); |
| #endif // CONFIG_NEW_MULTISYMBOL |
| #endif |
| av1_copy(fc->txfm_partition_prob, default_txfm_partition_probs); |
| #if CONFIG_NEW_MULTISYMBOL |
| av1_copy(fc->txfm_partition_cdf, default_txfm_partition_cdf); |
| #endif |
| #if CONFIG_JNT_COMP |
| #if CONFIG_NEW_MULTISYMBOL |
| av1_copy(fc->compound_index_cdf, default_compound_idx_cdfs); |
| #endif // CONFIG_NEW_MULTISYMBOL |
| av1_copy(fc->compound_index_probs, default_compound_idx_probs); |
| #endif // CONFIG_JNT_COMP |
| av1_copy(fc->newmv_prob, default_newmv_prob); |
| av1_copy(fc->zeromv_prob, default_zeromv_prob); |
| av1_copy(fc->refmv_prob, default_refmv_prob); |
| av1_copy(fc->drl_prob, default_drl_prob); |
| #if CONFIG_NEW_MULTISYMBOL |
| av1_copy(fc->newmv_cdf, default_newmv_cdf); |
| av1_copy(fc->zeromv_cdf, default_zeromv_cdf); |
| av1_copy(fc->refmv_cdf, default_refmv_cdf); |
| av1_copy(fc->drl_cdf, default_drl_cdf); |
| #endif |
| av1_copy(fc->motion_mode_prob, default_motion_mode_prob); |
| av1_copy(fc->motion_mode_cdf, default_motion_mode_cdf); |
| av1_copy(fc->obmc_prob, default_obmc_prob); |
| #if CONFIG_NEW_MULTISYMBOL |
| av1_copy(fc->obmc_cdf, default_obmc_cdf); |
| #endif |
| av1_copy(fc->inter_compound_mode_probs, default_inter_compound_mode_probs); |
| av1_copy(fc->inter_compound_mode_cdf, default_inter_compound_mode_cdf); |
| #if CONFIG_COMPOUND_SINGLEREF |
| av1_copy(fc->inter_singleref_comp_mode_probs, |
| default_inter_singleref_comp_mode_probs); |
| av1_copy(fc->inter_singleref_comp_mode_cdf, |
| default_inter_singleref_comp_mode_cdf); |
| #endif // CONFIG_COMPOUND_SINGLEREF |
| av1_copy(fc->compound_type_prob, default_compound_type_probs); |
| av1_copy(fc->compound_type_cdf, default_compound_type_cdf); |
| av1_copy(fc->interintra_prob, default_interintra_prob); |
| av1_copy(fc->wedge_interintra_prob, default_wedge_interintra_prob); |
| #if CONFIG_NEW_MULTISYMBOL |
| av1_copy(fc->interintra_cdf, default_interintra_cdf); |
| av1_copy(fc->wedge_interintra_cdf, default_wedge_interintra_cdf); |
| #endif // CONFIG_NEW_MULTISYMBOL |
| av1_copy(fc->interintra_mode_prob, default_interintra_mode_prob); |
| av1_copy(fc->interintra_mode_cdf, default_interintra_mode_cdf); |
| av1_copy(fc->seg.tree_probs, default_segment_tree_probs); |
| av1_copy(fc->seg.pred_probs, default_segment_pred_probs); |
| #if CONFIG_NEW_MULTISYMBOL |
| av1_copy(fc->seg.pred_cdf, default_segment_pred_cdf); |
| #endif |
| #if CONFIG_FILTER_INTRA |
| av1_copy(fc->filter_intra_probs, default_filter_intra_probs); |
| av1_copy(fc->filter_intra_mode_cdf, default_filter_intra_mode_cdf); |
| #endif // CONFIG_FILTER_INTRA |
| #if CONFIG_LOOP_RESTORATION |
| av1_copy(fc->switchable_restore_cdf, default_switchable_restore_cdf); |
| #if CONFIG_NEW_MULTISYMBOL |
| av1_copy(fc->wiener_restore_cdf, default_wiener_restore_cdf); |
| av1_copy(fc->sgrproj_restore_cdf, default_sgrproj_restore_cdf); |
| #endif // CONFIG_NEW_MULTISYMBOL |
| #endif // CONFIG_LOOP_RESTORATION |
| av1_copy(fc->y_mode_cdf, default_if_y_mode_cdf); |
| av1_copy(fc->uv_mode_cdf, default_uv_mode_cdf); |
| av1_copy(fc->switchable_interp_cdf, default_switchable_interp_cdf); |
| av1_copy(fc->partition_cdf, default_partition_cdf); |
| av1_copy(fc->intra_ext_tx_cdf, default_intra_ext_tx_cdf); |
| av1_copy(fc->inter_ext_tx_cdf, default_inter_ext_tx_cdf); |
| #if CONFIG_NEW_MULTISYMBOL |
| #if CONFIG_EXT_SKIP |
| av1_copy(fc->skip_mode_cdfs, default_skip_mode_cdfs); |
| #endif // CONFIG_EXT_SKIP |
| av1_copy(fc->skip_cdfs, default_skip_cdfs); |
| av1_copy(fc->intra_inter_cdf, default_intra_inter_cdf); |
| #else // !CONFIG_NEW_MULTISYMBOL |
| #if CONFIG_EXT_SKIP |
| av1_copy(fc->skip_mode_probs, default_skip_mode_probs); |
| #endif // CONFIG_EXT_SKIP |
| av1_copy(fc->skip_probs, default_skip_probs); |
| #endif // CONFIG_NEW_MULTISYMBOL |
| av1_copy(fc->seg.tree_cdf, default_seg_tree_cdf); |
| #if CONFIG_Q_SEGMENTATION |
| for (int i = 0; i < Q_SEGMENT_CDF_COUNT; i++) |
| av1_copy(fc->seg.q_seg_cdf[i], default_q_seg_tree_cdf[i]); |
| #endif |
| av1_copy(fc->tx_size_cdf, default_tx_size_cdf); |
| av1_copy(fc->delta_q_prob, default_delta_q_probs); |
| av1_copy(fc->delta_q_cdf, default_delta_q_cdf); |
| #if CONFIG_EXT_DELTA_Q |
| av1_copy(fc->delta_lf_prob, default_delta_lf_probs); |
| av1_copy(fc->delta_lf_cdf, default_delta_lf_cdf); |
| #if CONFIG_LOOPFILTER_LEVEL |
| av1_copy(fc->delta_lf_multi_prob, default_delta_lf_multi_probs); |
| av1_copy(fc->delta_lf_multi_cdf, default_delta_lf_multi_cdf); |
| #endif // CONFIG_LOOPFILTER_LEVEL |
| #endif |
| #if CONFIG_CFL |
| av1_copy(fc->cfl_sign_cdf, default_cfl_sign_cdf); |
| av1_copy(fc->cfl_alpha_cdf, default_cfl_alpha_cdf); |
| #endif |
| #if CONFIG_INTRABC |
| av1_copy(fc->intrabc_cdf, default_intrabc_cdf); |
| #endif |
| #if CONFIG_LPF_SB |
| av1_copy(fc->lpf_reuse_cdf, default_lpf_reuse_cdf); |
| av1_copy(fc->lpf_delta_cdf, default_lpf_delta_cdf); |
| av1_copy(fc->lpf_sign_cdf, default_lpf_sign_cdf); |
| #endif // CONFIG_LPF_SB |
| } |
| |
| void av1_adapt_inter_frame_probs(AV1_COMMON *cm) { |
| int i, j; |
| FRAME_CONTEXT *fc = cm->fc; |
| const FRAME_CONTEXT *pre_fc = cm->pre_fc; |
| const FRAME_COUNTS *counts = &cm->counts; |
| |
| for (i = 0; i < INTRA_INTER_CONTEXTS; i++) |
| fc->intra_inter_prob[i] = av1_mode_mv_merge_probs( |
| pre_fc->intra_inter_prob[i], counts->intra_inter[i]); |
| |
| for (i = 0; i < COMP_INTER_CONTEXTS; i++) |
| fc->comp_inter_prob[i] = av1_mode_mv_merge_probs(pre_fc->comp_inter_prob[i], |
| counts->comp_inter[i]); |
| |
| #if CONFIG_EXT_COMP_REFS |
| for (i = 0; i < COMP_REF_TYPE_CONTEXTS; i++) |
| fc->comp_ref_type_prob[i] = av1_mode_mv_merge_probs( |
| pre_fc->comp_ref_type_prob[i], counts->comp_ref_type[i]); |
| |
| for (i = 0; i < UNI_COMP_REF_CONTEXTS; i++) |
| for (j = 0; j < (UNIDIR_COMP_REFS - 1); j++) |
| fc->uni_comp_ref_prob[i][j] = av1_mode_mv_merge_probs( |
| pre_fc->uni_comp_ref_prob[i][j], counts->uni_comp_ref[i][j]); |
| #endif // CONFIG_EXT_COMP_REFS |
| |
| for (i = 0; i < REF_CONTEXTS; i++) |
| for (j = 0; j < (FWD_REFS - 1); j++) |
| fc->comp_ref_prob[i][j] = mode_mv_merge_probs(pre_fc->comp_ref_prob[i][j], |
| counts->comp_ref[i][j]); |
| for (i = 0; i < REF_CONTEXTS; i++) |
| for (j = 0; j < (BWD_REFS - 1); j++) |
| fc->comp_bwdref_prob[i][j] = mode_mv_merge_probs( |
| pre_fc->comp_bwdref_prob[i][j], counts->comp_bwdref[i][j]); |
| |
| for (i = 0; i < REF_CONTEXTS; i++) |
| for (j = 0; j < (SINGLE_REFS - 1); j++) |
| fc->single_ref_prob[i][j] = av1_mode_mv_merge_probs( |
| pre_fc->single_ref_prob[i][j], counts->single_ref[i][j]); |
| |
| #if CONFIG_COMPOUND_SINGLEREF |
| for (i = 0; i < COMP_INTER_MODE_CONTEXTS; i++) |
| fc->comp_inter_mode_prob[i] = av1_mode_mv_merge_probs( |
| pre_fc->comp_inter_mode_prob[i], counts->comp_inter_mode[i]); |
| |
| #endif // CONFIG_COMPOUND_SINGLEREF |
| |
| for (i = 0; i < NEWMV_MODE_CONTEXTS; ++i) |
| fc->newmv_prob[i] = |
| av1_mode_mv_merge_probs(pre_fc->newmv_prob[i], counts->newmv_mode[i]); |
| for (i = 0; i < GLOBALMV_MODE_CONTEXTS; ++i) |
| fc->zeromv_prob[i] = |
| av1_mode_mv_merge_probs(pre_fc->zeromv_prob[i], counts->zeromv_mode[i]); |
| for (i = 0; i < REFMV_MODE_CONTEXTS; ++i) |
| fc->refmv_prob[i] = |
| av1_mode_mv_merge_probs(pre_fc->refmv_prob[i], counts->refmv_mode[i]); |
| |
| for (i = 0; i < DRL_MODE_CONTEXTS; ++i) |
| fc->drl_prob[i] = |
| av1_mode_mv_merge_probs(pre_fc->drl_prob[i], counts->drl_mode[i]); |
| |
| for (i = BLOCK_8X8; i < BLOCK_SIZES_ALL; ++i) |
| aom_tree_merge_probs(av1_motion_mode_tree, pre_fc->motion_mode_prob[i], |
| counts->motion_mode[i], fc->motion_mode_prob[i]); |
| for (i = BLOCK_8X8; i < BLOCK_SIZES_ALL; ++i) |
| fc->obmc_prob[i] = |
| av1_mode_mv_merge_probs(pre_fc->obmc_prob[i], counts->obmc[i]); |
| |
| for (i = 0; i < INTER_MODE_CONTEXTS; i++) |
| aom_tree_merge_probs( |
| av1_inter_compound_mode_tree, pre_fc->inter_compound_mode_probs[i], |
| counts->inter_compound_mode[i], fc->inter_compound_mode_probs[i]); |
| #if CONFIG_COMPOUND_SINGLEREF |
| for (i = 0; i < INTER_MODE_CONTEXTS; i++) |
| aom_tree_merge_probs(av1_inter_singleref_comp_mode_tree, |
| pre_fc->inter_singleref_comp_mode_probs[i], |
| counts->inter_singleref_comp_mode[i], |
| fc->inter_singleref_comp_mode_probs[i]); |
| #endif // CONFIG_COMPOUND_SINGLEREF |
| if (cm->allow_interintra_compound) { |
| for (i = 0; i < BLOCK_SIZE_GROUPS; ++i) { |
| if (is_interintra_allowed_bsize_group(i)) |
| fc->interintra_prob[i] = av1_mode_mv_merge_probs( |
| pre_fc->interintra_prob[i], counts->interintra[i]); |
| } |
| for (i = 0; i < BLOCK_SIZE_GROUPS; i++) { |
| aom_tree_merge_probs( |
| av1_interintra_mode_tree, pre_fc->interintra_mode_prob[i], |
| counts->interintra_mode[i], fc->interintra_mode_prob[i]); |
| } |
| for (i = 0; i < BLOCK_SIZES_ALL; ++i) { |
| if (is_interintra_allowed_bsize(i) && is_interintra_wedge_used(i)) |
| fc->wedge_interintra_prob[i] = av1_mode_mv_merge_probs( |
| pre_fc->wedge_interintra_prob[i], counts->wedge_interintra[i]); |
| } |
| } |
| |
| if (cm->allow_masked_compound) { |
| for (i = 0; i < BLOCK_SIZES_ALL; ++i) { |
| aom_tree_merge_probs( |
| av1_compound_type_tree, pre_fc->compound_type_prob[i], |
| counts->compound_interinter[i], fc->compound_type_prob[i]); |
| } |
| } |
| |
| #if CONFIG_JNT_COMP |
| for (i = 0; i < COMP_INDEX_CONTEXTS; ++i) |
| fc->compound_index_probs[i] = av1_mode_mv_merge_probs( |
| pre_fc->compound_index_probs[i], counts->compound_index[i]); |
| #endif // CONFIG_JNT_COMP |
| } |
| |
| void av1_adapt_intra_frame_probs(AV1_COMMON *cm) { |
| int i; |
| FRAME_CONTEXT *fc = cm->fc; |
| const FRAME_CONTEXT *pre_fc = cm->pre_fc; |
| const FRAME_COUNTS *counts = &cm->counts; |
| |
| if (cm->tx_mode == TX_MODE_SELECT) { |
| #if CONFIG_RECT_TX_EXT |
| fc->quarter_tx_size_prob = av1_mode_mv_merge_probs( |
| pre_fc->quarter_tx_size_prob, counts->quarter_tx_size); |
| #endif |
| } |
| |
| if (cm->tx_mode == TX_MODE_SELECT) { |
| for (i = 0; i < TXFM_PARTITION_CONTEXTS; ++i) |
| fc->txfm_partition_prob[i] = av1_mode_mv_merge_probs( |
| pre_fc->txfm_partition_prob[i], counts->txfm_partition[i]); |
| } |
| |
| #if !CONFIG_NEW_MULTISYMBOL |
| #if CONFIG_EXT_SKIP |
| for (i = 0; i < SKIP_MODE_CONTEXTS; ++i) |
| fc->skip_mode_probs[i] = av1_mode_mv_merge_probs(pre_fc->skip_mode_probs[i], |
| counts->skip_mode[i]); |
| #endif // CONFIG_EXT_SKIP |
| for (i = 0; i < SKIP_CONTEXTS; ++i) |
| fc->skip_probs[i] = |
| av1_mode_mv_merge_probs(pre_fc->skip_probs[i], counts->skip[i]); |
| #endif // !CONFIG_NEW_MULTISYMBOL |
| |
| if (cm->seg.temporal_update) { |
| for (i = 0; i < PREDICTION_PROBS; i++) |
| fc->seg.pred_probs[i] = av1_mode_mv_merge_probs(pre_fc->seg.pred_probs[i], |
| counts->seg.pred[i]); |
| |
| aom_tree_merge_probs(av1_segment_tree, pre_fc->seg.tree_probs, |
| counts->seg.tree_mispred, fc->seg.tree_probs); |
| } else { |
| aom_tree_merge_probs(av1_segment_tree, pre_fc->seg.tree_probs, |
| counts->seg.tree_total, fc->seg.tree_probs); |
| } |
| |
| #if CONFIG_EXT_PARTITION_TYPES |
| for (i = 0; i < PARTITION_PLOFFSET; ++i) |
| aom_tree_merge_probs(av1_partition_tree, pre_fc->partition_prob[i], |
| counts->partition[i], fc->partition_prob[i]); |
| for (; i < PARTITION_CONTEXTS_PRIMARY; ++i) |
| aom_tree_merge_probs(av1_ext_partition_tree, pre_fc->partition_prob[i], |
| counts->partition[i], fc->partition_prob[i]); |
| #else |
| for (i = 0; i < PARTITION_CONTEXTS_PRIMARY; ++i) { |
| aom_tree_merge_probs(av1_partition_tree, pre_fc->partition_prob[i], |
| counts->partition[i], fc->partition_prob[i]); |
| } |
| #endif // CONFIG_EXT_PARTITION_TYPES |
| #if CONFIG_UNPOISON_PARTITION_CTX |
| for (i = PARTITION_CONTEXTS_PRIMARY; |
| i < PARTITION_CONTEXTS_PRIMARY + PARTITION_BLOCK_SIZES; ++i) { |
| unsigned int ct[2] = { counts->partition[i][PARTITION_VERT], |
| counts->partition[i][PARTITION_SPLIT] }; |
| assert(counts->partition[i][PARTITION_NONE] == 0); |
| assert(counts->partition[i][PARTITION_HORZ] == 0); |
| assert(fc->partition_prob[i][PARTITION_NONE] == 0); |
| assert(fc->partition_prob[i][PARTITION_HORZ] == 0); |
| fc->partition_prob[i][PARTITION_VERT] = |
| av1_mode_mv_merge_probs(pre_fc->partition_prob[i][PARTITION_VERT], ct); |
| } |
| for (i = PARTITION_CONTEXTS_PRIMARY + PARTITION_BLOCK_SIZES; |
| i < PARTITION_CONTEXTS_PRIMARY + 2 * PARTITION_BLOCK_SIZES; ++i) { |
| unsigned int ct[2] = { counts->partition[i][PARTITION_HORZ], |
| counts->partition[i][PARTITION_SPLIT] }; |
| assert(counts->partition[i][PARTITION_NONE] == 0); |
| assert(counts->partition[i][PARTITION_VERT] == 0); |
| assert(fc->partition_prob[i][PARTITION_NONE] == 0); |
| assert(fc->partition_prob[i][PARTITION_VERT] == 0); |
| fc->partition_prob[i][PARTITION_HORZ] = |
| av1_mode_mv_merge_probs(pre_fc->partition_prob[i][PARTITION_HORZ], ct); |
| } |
| #endif |
| for (i = 0; i < DELTA_Q_PROBS; ++i) |
| fc->delta_q_prob[i] = |
| mode_mv_merge_probs(pre_fc->delta_q_prob[i], counts->delta_q[i]); |
| #if CONFIG_EXT_DELTA_Q |
| #if CONFIG_LOOPFILTER_LEVEL |
| for (i = 0; i < FRAME_LF_COUNT; ++i) |
| for (int k = 0; k < DELTA_LF_PROBS; ++k) |
| fc->delta_lf_multi_prob[i][k] = mode_mv_merge_probs( |
| pre_fc->delta_lf_multi_prob[i][k], counts->delta_lf_multi[i][k]); |
| #endif // CONFIG_LOOPFILTER_LEVEL |
| for (i = 0; i < DELTA_LF_PROBS; ++i) |
| fc->delta_lf_prob[i] = |
| mode_mv_merge_probs(pre_fc->delta_lf_prob[i], counts->delta_lf[i]); |
| #endif // CONFIG_EXT_DELTA_Q |
| #if CONFIG_FILTER_INTRA |
| for (i = 0; i < PLANE_TYPES; ++i) { |
| fc->filter_intra_probs[i] = av1_mode_mv_merge_probs( |
| pre_fc->filter_intra_probs[i], counts->filter_intra[i]); |
| } |
| #endif // CONFIG_FILTER_INTRA |
| } |
| |
| static void set_default_lf_deltas(struct loopfilter *lf) { |
| lf->mode_ref_delta_enabled = 1; |
| lf->mode_ref_delta_update = 1; |
| |
| lf->ref_deltas[INTRA_FRAME] = 1; |
| lf->ref_deltas[LAST_FRAME] = 0; |
| lf->ref_deltas[LAST2_FRAME] = lf->ref_deltas[LAST_FRAME]; |
| lf->ref_deltas[LAST3_FRAME] = lf->ref_deltas[LAST_FRAME]; |
| lf->ref_deltas[BWDREF_FRAME] = lf->ref_deltas[LAST_FRAME]; |
| lf->ref_deltas[GOLDEN_FRAME] = -1; |
| lf->ref_deltas[ALTREF2_FRAME] = -1; |
| lf->ref_deltas[ALTREF_FRAME] = -1; |
| |
| lf->mode_deltas[0] = 0; |
| lf->mode_deltas[1] = 0; |
| |
| av1_copy(lf->last_ref_deltas, lf->ref_deltas); |
| av1_copy(lf->last_mode_deltas, lf->mode_deltas); |
| } |
| |
| void av1_setup_past_independence(AV1_COMMON *cm) { |
| // Reset the segment feature data to the default stats: |
| // Features disabled, 0, with delta coding (Default state). |
| struct loopfilter *const lf = &cm->lf; |
| |
| int i; |
| av1_clearall_segfeatures(&cm->seg); |
| |
| if (cm->last_frame_seg_map && !cm->frame_parallel_decode) |
| memset(cm->last_frame_seg_map, 0, (cm->mi_rows * cm->mi_cols)); |
| |
| if (cm->current_frame_seg_map) |
| memset(cm->current_frame_seg_map, 0, (cm->mi_rows * cm->mi_cols)); |
| |
| // Reset the mode ref deltas for loop filter |
| av1_zero(lf->last_ref_deltas); |
| av1_zero(lf->last_mode_deltas); |
| set_default_lf_deltas(lf); |
| |
| // To force update of the sharpness |
| lf->last_sharpness_level = -1; |
| |
| av1_default_coef_probs(cm); |
| init_mode_probs(cm->fc); |
| av1_init_mv_probs(cm); |
| #if CONFIG_LV_MAP |
| av1_init_lv_map(cm); |
| #endif |
| #if CONFIG_ADAPT_SCAN |
| av1_init_scan_order(cm); |
| #endif |
| av1_convolve_init(cm); |
| cm->fc->initialized = 1; |
| |
| #if CONFIG_NO_FRAME_CONTEXT_SIGNALING |
| if (cm->frame_type == KEY_FRAME) { |
| // Reset all frame contexts, as all reference frames will be lost. |
| for (i = 0; i < FRAME_CONTEXTS; ++i) cm->frame_contexts[i] = *cm->fc; |
| } |
| #else |
| if (cm->frame_type == KEY_FRAME || cm->error_resilient_mode || |
| cm->reset_frame_context == RESET_FRAME_CONTEXT_ALL) { |
| // Reset all frame contexts. |
| for (i = 0; i < FRAME_CONTEXTS; ++i) cm->frame_contexts[i] = *cm->fc; |
| } else if (cm->reset_frame_context == RESET_FRAME_CONTEXT_CURRENT) { |
| #if CONFIG_NO_FRAME_CONTEXT_SIGNALING |
| // Reset the frame context of the first specified ref frame. |
| if (cm->frame_refs[0].idx >= 0) { |
| cm->frame_contexts[cm->frame_refs[0].idx] = *cm->fc; |
| } |
| #else |
| // Reset only the frame context specified in the frame header. |
| cm->frame_contexts[cm->frame_context_idx] = *cm->fc; |
| #endif // CONFIG_NO_FRAME_CONTEXT_SIGNALING |
| } |
| #endif // CONFIG_NO_FRAME_CONTEXT_SIGNALING |
| |
| // prev_mip will only be allocated in encoder. |
| if (frame_is_intra_only(cm) && cm->prev_mip && !cm->frame_parallel_decode) |
| memset(cm->prev_mip, 0, |
| cm->mi_stride * (cm->mi_rows + 1) * sizeof(*cm->prev_mip)); |
| #if !CONFIG_NO_FRAME_CONTEXT_SIGNALING |
| cm->frame_context_idx = 0; |
| #endif // !CONFIG_NO_FRAME_CONTEXT_SIGNALING |
| } |