Commit 18679578 authored by Yue Chen's avatar Yue Chen
Browse files

Add SMOOTH_PRED to interintra mode list

Change-Id: Id490c57df5dca13c59a62b0a542779784842944c
parent e180478a
......@@ -831,6 +831,15 @@ static const aom_prob default_interintra_prob[BLOCK_SIZE_GROUPS] = {
208, 208, 208, 208,
};
#if CONFIG_ALT_INTRA
static const aom_prob
default_interintra_mode_prob[BLOCK_SIZE_GROUPS][INTERINTRA_MODES - 1] = {
{ 88, 16, 47, 133, 143, 150, 70, 48, 84, 122 }, // block_size < 8x8
{ 75, 26, 51, 120, 158, 157, 44, 45, 56, 102 }, // block_size < 16x16
{ 73, 24, 60, 115, 184, 164, 26, 36, 32, 63 }, // block_size < 32x32
{ 96, 27, 50, 107, 221, 148, 16, 22, 14, 39 }, // block_size >= 32x32
};
#else
static const aom_prob
default_interintra_mode_prob[BLOCK_SIZE_GROUPS][INTERINTRA_MODES - 1] = {
{ 65, 32, 18, 144, 162, 194, 41, 51, 98 }, // block_size < 8x8
......@@ -838,6 +847,7 @@ static const aom_prob
{ 173, 80, 19, 176, 240, 193, 64, 35, 46 }, // block_size < 32x32
{ 221, 135, 38, 194, 248, 121, 96, 85, 29 } // block_size >= 32x32
};
#endif // CONFIG_ALT_INTRA
static const aom_prob default_wedge_interintra_prob[BLOCK_SIZES] = {
#if CONFIG_CB4X4
......@@ -979,6 +989,20 @@ const aom_tree_index av1_inter_mode_tree[TREE_SIZE(INTER_MODES)] = {
#if CONFIG_EXT_INTER
/* clang-format off */
#if CONFIG_ALT_INTRA
const aom_tree_index av1_interintra_mode_tree[TREE_SIZE(INTERINTRA_MODES)] = {
-II_DC_PRED, 2, /* 0 = II_DC_NODE */
-II_TM_PRED, 4, /* 1 = II_TM_NODE */
-II_V_PRED, 6, /* 2 = II_V_NODE */
8, 12, /* 3 = II_COM_NODE */
-II_H_PRED, 10, /* 4 = II_H_NODE */
-II_D135_PRED, -II_D117_PRED, /* 5 = II_D135_NODE */
-II_D45_PRED, 14, /* 6 = II_D45_NODE */
-II_D63_PRED, 16, /* 7 = II_D63_NODE */
-II_D153_PRED, 18, /* 8 = II_D153_NODE */
-II_D207_PRED, -II_SMOOTH_PRED, /* 9 = II_D207_NODE */
};
#else
const aom_tree_index av1_interintra_mode_tree[TREE_SIZE(INTERINTRA_MODES)] = {
-II_DC_PRED, 2, /* 0 = II_DC_NODE */
-II_TM_PRED, 4, /* 1 = II_TM_NODE */
......@@ -990,6 +1014,7 @@ const aom_tree_index av1_interintra_mode_tree[TREE_SIZE(INTERINTRA_MODES)] = {
-II_D63_PRED, 16, /* 7 = II_D63_NODE */
-II_D153_PRED, -II_D207_PRED /* 8 = II_D153_NODE */
};
#endif
const aom_tree_index av1_inter_compound_mode_tree
[TREE_SIZE(INTER_COMPOUND_MODES)] = {
......
......@@ -376,6 +376,9 @@ typedef enum {
II_D153_PRED,
II_D207_PRED,
II_D63_PRED,
#if CONFIG_ALT_INTRA
II_SMOOTH_PRED,
#endif // CONFIG_ALT_INTRA
II_TM_PRED,
INTERINTRA_MODES
} INTERINTRA_MODE;
......
......@@ -2591,6 +2591,9 @@ static void combine_interintra(INTERINTRA_MODE mode, int use_wedge_interintra,
break;
case II_D135_PRED:
#if CONFIG_ALT_INTRA
case II_SMOOTH_PRED:
#endif
for (i = 0; i < bh; ++i) {
for (j = 0; j < bw; ++j) {
int scale = ii_weights1d[(i < j ? i : j) * size_scale];
......@@ -2707,6 +2710,9 @@ static void combine_interintra_highbd(
break;
case II_D135_PRED:
#if CONFIG_ALT_INTRA
case II_SMOOTH_PRED:
#endif
for (i = 0; i < bh; ++i) {
for (j = 0; j < bw; ++j) {
int scale = ii_weights1d[(i < j ? i : j) * size_scale];
......
......@@ -30,17 +30,21 @@ void av1_predict_intra_block(const MACROBLOCKD *xd, int bw, int bh,
#if CONFIG_EXT_INTER
// Mapping of interintra to intra mode for use in the intra component
static const PREDICTION_MODE interintra_to_intra_mode[INTERINTRA_MODES] = {
DC_PRED, V_PRED, H_PRED, D45_PRED, D135_PRED,
D117_PRED, D153_PRED, D207_PRED, D63_PRED, TM_PRED
DC_PRED, V_PRED, H_PRED, D45_PRED, D135_PRED,
D117_PRED, D153_PRED, D207_PRED, D63_PRED,
#if CONFIG_ALT_INTRA
SMOOTH_PRED,
#endif
TM_PRED
};
// Mapping of intra mode to the interintra mode
static const INTERINTRA_MODE intra_to_interintra_mode[INTRA_MODES] = {
II_DC_PRED, II_V_PRED, II_H_PRED, II_D45_PRED, II_D135_PRED,
II_D117_PRED, II_D153_PRED, II_D207_PRED, II_D63_PRED,
II_DC_PRED, II_V_PRED, II_H_PRED, II_D45_PRED, II_D135_PRED,
II_D117_PRED, II_D153_PRED, II_D207_PRED, II_D63_PRED,
#if CONFIG_ALT_INTRA
II_DC_PRED, // Note: Filler value, as there's no II_SMOOTH_PRED.
#endif // CONFIG_ALT_INTRA
II_SMOOTH_PRED,
#endif
II_TM_PRED
};
#endif // CONFIG_EXT_INTER
......
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