Commit babf3e78 authored by Angie Chiang's avatar Angie Chiang

Add default probability model for lv_map

Change-Id: Ib3b8c70c7ba06043f0017785af035dd1aaf5ba54
parent b1bedf5f
......@@ -16,6 +16,226 @@
#include "av1/common/onyxc_int.h"
#include "av1/common/seg_common.h"
#if CONFIG_LV_MAP
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 },
};
const aom_prob default_coeff_base
[TX_SIZES][PLANE_TYPES][NUM_BASE_LEVELS][COEFF_BASE_CONTEXTS] = {
{ // TX_4X4
{
// PLANE_Y
{ 73, 128, 131, 204, 165, 226, 169, 236, 18, 128, 51,
153, 97, 179, 123, 201, 145, 226, 20, 128, 59, 153,
107, 181, 129, 201, 142, 226, 3, 128, 19, 99, 46,
135, 92, 166, 129, 190, 157, 217, 128, 128 },
{ 128, 128, 178, 218, 192, 236, 186, 243, 55, 128, 110,
183, 151, 205, 168, 221, 180, 238, 65, 128, 116, 178,
157, 206, 172, 222, 183, 238, 24, 128, 65, 127, 104,
164, 154, 195, 187, 216, 205, 230, 128, 128 },
},
{
// PLANE_UV
{ 47, 128, 100, 176, 140, 207, 150, 223, 11, 128, 35,
133, 79, 165, 115, 186, 129, 210, 8, 128, 30, 114,
80, 159, 116, 187, 146, 214, 2, 128, 9, 59, 28,
86, 71, 131, 117, 165, 149, 188, 128, 128 },
{ 83, 128, 152, 205, 168, 227, 192, 238, 42, 128, 92,
169, 138, 193, 165, 209, 128, 206, 36, 128, 86, 159,
141, 198, 181, 213, 102, 223, 18, 128, 50, 132, 90,
144, 141, 169, 180, 191, 128, 217, 128, 128 },
} },
{
// TX_8X8
{
// PLANE_Y
{ 82, 128, 143, 203, 177, 225, 186, 237, 7, 128, 37,
109, 78, 151, 110, 182, 139, 213, 25, 128, 51, 115,
86, 146, 111, 175, 125, 205, 3, 128, 12, 55, 32,
78, 63, 111, 96, 148, 123, 185, 146, 206 },
{ 136, 128, 182, 220, 201, 236, 205, 243, 46, 128, 101,
164, 147, 194, 170, 218, 177, 234, 62, 128, 104, 146,
143, 183, 165, 207, 183, 228, 30, 128, 60, 95, 95,
128, 135, 163, 166, 196, 175, 219, 192, 231 },
},
{
// PLANE_UV
{ 47, 128, 112, 189, 164, 202, 163, 218, 8, 128, 32,
110, 68, 151, 102, 179, 134, 195, 5, 128, 22, 76,
54, 103, 80, 146, 101, 182, 1, 128, 5, 39, 17,
53, 46, 93, 79, 127, 112, 161, 64, 195 },
{ 90, 128, 156, 210, 183, 225, 128, 236, 39, 128, 98,
164, 146, 201, 209, 219, 171, 208, 32, 128, 68, 123,
119, 169, 154, 184, 128, 213, 15, 128, 38, 111, 83,
112, 120, 163, 180, 170, 154, 213, 128, 205 },
},
},
{
// TX_16X16
{
// PLANE_Y
{ 96, 128, 169, 218, 208, 233, 187, 244, 10, 128, 34,
101, 82, 153, 113, 184, 137, 212, 6, 128, 34, 104,
81, 145, 109, 176, 147, 202, 1, 128, 3, 43, 15,
53, 43, 89, 79, 129, 108, 168, 110, 194 },
{ 156, 128, 206, 232, 218, 240, 128, 251, 39, 128, 108,
161, 156, 202, 187, 216, 179, 234, 40, 128, 103, 152,
144, 185, 159, 208, 205, 227, 14, 128, 39, 84, 76,
110, 121, 151, 157, 187, 201, 206, 64, 216 },
},
{
// PLANE_UV
{ 42, 128, 139, 211, 180, 230, 199, 238, 3, 128, 32,
96, 69, 145, 102, 186, 117, 212, 4, 128, 25, 72,
55, 111, 81, 159, 116, 198, 1, 128, 4, 22, 16,
34, 35, 68, 63, 116, 89, 165, 102, 199 },
{ 135, 128, 193, 227, 182, 239, 128, 246, 42, 128, 115,
156, 146, 203, 188, 216, 128, 229, 32, 128, 82, 127,
120, 178, 165, 203, 213, 229, 11, 128, 32, 73, 79,
111, 129, 158, 162, 187, 156, 209, 85, 222 },
},
},
{
// TX_32X32
{
// PLANE_Y
{ 97, 128, 163, 232, 191, 246, 219, 252, 3, 128, 41,
108, 91, 147, 104, 183, 118, 225, 6, 128, 45, 91,
83, 125, 92, 160, 99, 215, 1, 128, 11, 36, 28,
46, 43, 59, 57, 86, 73, 145, 91, 210 },
{ 127, 128, 201, 239, 247, 248, 128, 254, 40, 128, 103,
152, 158, 199, 186, 225, 181, 242, 38, 128, 92, 112,
146, 189, 162, 217, 112, 239, 17, 128, 30, 47, 63,
89, 113, 146, 147, 187, 168, 217, 150, 233 },
},
{
// PLANE_UV
{ 65, 128, 155, 223, 166, 235, 154, 244, 15, 128, 57,
154, 110, 199, 159, 224, 149, 239, 9, 128, 57, 140,
97, 185, 148, 218, 176, 236, 1, 128, 3, 43, 19,
42, 64, 98, 117, 167, 154, 199, 128, 158 },
{ 130, 128, 189, 231, 171, 247, 128, 246, 63, 128, 132,
222, 186, 224, 199, 244, 128, 247, 55, 128, 113, 211,
164, 230, 225, 243, 128, 239, 7, 128, 31, 102, 106,
138, 147, 183, 171, 223, 171, 224, 128, 128 },
},
},
};
const aom_prob default_nz_map[TX_SIZES][PLANE_TYPES][SIG_COEF_CONTEXTS] = {
{
{ 34, 103, 61, 106, 62, 160, 112, 54, 173, 121,
75, 157, 92, 75, 157, 129, 94, 65, 52, 37 },
{ 52, 124, 84, 136, 107, 197, 161, 82, 183, 151,
109, 153, 140, 103, 152, 134, 109, 81, 69, 50 },
},
{
{ 34, 127, 74, 124, 74, 204, 153, 76, 226, 162,
92, 207, 126, 91, 227, 192, 149, 108, 85, 55 },
{ 43, 136, 115, 158, 130, 212, 187, 112, 231, 180,
130, 202, 164, 130, 236, 204, 168, 139, 112, 114 },
},
{
{ 25, 117, 70, 120, 77, 215, 171, 102, 234, 156,
105, 235, 155, 109, 247, 220, 176, 127, 92, 72 },
{ 24, 88, 49, 100, 62, 202, 148, 62, 237, 178,
102, 233, 168, 105, 244, 198, 162, 127, 103, 71 },
},
{
{ 11, 54, 17, 69, 26, 128, 125, 56, 232, 130,
60, 237, 121, 66, 250, 168, 134, 114, 93, 53 },
{ 21, 52, 32, 95, 64, 171, 152, 70, 247, 159,
81, 252, 177, 100, 252, 221, 192, 143, 195, 146 },
},
};
const aom_prob default_eob_flag[TX_SIZES][PLANE_TYPES][EOB_COEF_CONTEXTS] = {
{
{ 229, 236, 231, 222, 239, 236, 214, 201, 236, 226, 195, 134, 228,
210, 150, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 },
{ 182, 186, 172, 176, 207, 213, 152, 122, 187, 171, 131, 65, 170,
134, 101, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 },
},
{
{ 225, 234, 244, 236, 205, 242, 246, 247, 246, 234, 191, 242, 237,
215, 142, 224, 206, 142, 73, 128, 128, 128, 128, 128, 128 },
{ 154, 171, 187, 175, 62, 199, 202, 206, 215, 200, 111, 197, 199,
174, 100, 135, 105, 104, 45, 128, 128, 128, 128, 128, 128 },
},
{
{ 180, 213, 216, 229, 233, 232, 240, 235, 220, 178, 239, 238, 225,
187, 229, 214, 226, 200, 183, 141, 158, 179, 128, 128, 128 },
{ 190, 225, 234, 248, 249, 248, 253, 251, 232, 110, 254, 252, 236,
57, 253, 248, 232, 85, 244, 189, 112, 64, 128, 128, 128 },
},
{
{ 248, 224, 246, 244, 239, 245, 251, 246, 251, 255, 255, 255, 249,
255, 255, 255, 229, 255, 255, 255, 228, 255, 255, 247, 137 },
{ 204, 207, 233, 215, 193, 228, 239, 221, 227, 250, 236, 207, 135,
236, 186, 182, 57, 209, 140, 128, 85, 184, 110, 128, 128 },
},
};
const aom_prob default_coeff_lps[TX_SIZES][PLANE_TYPES][LEVEL_CONTEXTS] = {
{
{ 164, 128, 134, 165, 128, 137, 168, 128, 97, 136, 167, 128,
182, 205, 143, 172, 200, 145, 173, 193, 103, 137, 170, 191,
198, 214, 162, 187, 209, 162, 187, 207, 128, 156, 183, 201,
219, 230, 204, 210, 225, 201, 209, 225, 187, 190, 203, 214 },
{ 106, 128, 98, 126, 128, 87, 122, 128, 54, 89, 131, 128,
142, 180, 123, 154, 189, 115, 149, 175, 79, 115, 157, 182,
175, 197, 147, 174, 199, 145, 174, 201, 89, 135, 173, 194,
212, 222, 206, 203, 223, 188, 201, 220, 128, 144, 202, 206 },
},
{
{ 171, 128, 123, 169, 128, 121, 165, 128, 82, 125, 168, 128,
191, 213, 143, 177, 199, 136, 170, 194, 95, 135, 171, 195,
206, 222, 166, 191, 212, 154, 184, 207, 115, 149, 180, 204,
223, 237, 196, 215, 231, 186, 209, 228, 158, 178, 201, 222 },
{ 115, 128, 115, 146, 128, 91, 147, 128, 55, 93, 139, 128,
147, 190, 141, 176, 201, 123, 156, 173, 68, 114, 156, 195,
186, 205, 153, 191, 214, 141, 179, 205, 107, 132, 166, 184,
215, 225, 200, 212, 230, 102, 207, 222, 128, 119, 200, 212 },
},
{
{ 185, 128, 134, 198, 128, 128, 195, 128, 58, 110, 162, 128,
208, 227, 154, 196, 206, 144, 188, 209, 83, 130, 168, 198,
219, 232, 167, 205, 222, 158, 196, 216, 107, 143, 178, 204,
233, 244, 202, 226, 238, 191, 217, 234, 153, 178, 200, 223 },
{ 160, 128, 154, 197, 128, 129, 178, 128, 53, 112, 157, 128,
185, 214, 169, 196, 221, 134, 179, 186, 82, 131, 168, 194,
204, 220, 176, 209, 221, 173, 194, 209, 107, 154, 181, 203,
230, 241, 202, 226, 237, 185, 223, 234, 162, 187, 203, 222 },
},
{
{ 177, 128, 165, 226, 128, 152, 219, 128, 45, 129, 188, 128,
198, 218, 179, 220, 228, 163, 214, 220, 72, 134, 181, 206,
216, 225, 177, 218, 231, 158, 213, 223, 112, 150, 185, 210,
245, 251, 204, 234, 247, 195, 231, 243, 163, 186, 213, 235 },
{ 161, 128, 174, 205, 128, 146, 182, 128, 59, 125, 179, 128,
183, 208, 199, 220, 239, 184, 213, 217, 71, 141, 196, 217,
213, 219, 215, 230, 237, 171, 224, 238, 112, 173, 193, 221,
239, 246, 168, 243, 249, 93, 241, 247, 128, 195, 216, 233 },
},
};
#endif // CONFIG_LV_MAP
#if CONFIG_ALT_INTRA
const aom_prob av1_kf_y_mode_prob[INTRA_MODES][INTRA_MODES][INTRA_MODES - 1] = {
......@@ -2480,6 +2700,14 @@ static void init_mode_probs(FRAME_CONTEXT *fc) {
av1_copy(fc->intra_inter_prob, default_intra_inter_p);
av1_copy(fc->comp_inter_prob, default_comp_inter_p);
av1_copy(fc->comp_ref_prob, default_comp_ref_p);
#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);
av1_copy(fc->dc_sign, default_dc_sign);
av1_copy(fc->coeff_base, default_coeff_base);
av1_copy(fc->coeff_lps, default_coeff_lps);
#endif
#if CONFIG_EXT_REFS
av1_copy(fc->comp_bwdref_prob, default_comp_bwdref_p);
#endif // CONFIG_EXT_REFS
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment