Commit 85268307 authored by Wei-Ting Lin's avatar Wei-Ting Lin Committed by Wei-ting Lin

Add NCOBMC_ADAPT_WEIGHT as another motion mode

Change-Id: Id5c3df752528a3ea74e655b3d18a5d6f258a2238
parent d1ff7543
......@@ -1136,8 +1136,27 @@ static const aom_prob default_wedge_interintra_prob[BLOCK_SIZES] = {
#endif // CONFIG_INTERINTRA
#endif // CONFIG_EXT_INTER
#if CONFIG_NCOBMC_ADAPT_WEIGHT
const aom_tree_index av1_ncobmc_mode_tree[TREE_SIZE(MAX_NCOBMC_MODES)] = {
-NO_OVERLAP, 2, -NCOBMC_MODE_1, 4,
-NCOBMC_MODE_2, 6, -NCOBMC_MODE_3, 8,
-NCOBMC_MODE_4, 10, -NCOBMC_MODE_5, 12,
-NCOBMC_MODE_6, 14, -NCOBMC_MODE_7, -NCOBMC_MODE_8
};
// TODO(weitinglin): find default prob
static const aom_prob
default_ncobmc_mode_prob[ADAPT_OVERLAP_BLOCKS][MAX_NCOBMC_MODES - 1] = {
{ 23, 37, 37, 38, 65, 71, 81, 86 }, // 8x8
{ 28, 32, 37, 43, 51, 64, 85, 128 }, // 16X16 equal prob
{ 86, 22, 32, 25, 10, 40, 97, 65 }, // 32X32
{ 28, 32, 37, 43, 51, 64, 85, 128 } // 64X64 equal prob
};
#endif
// Change this section appropriately once warped motion is supported
#if CONFIG_MOTION_VAR && !CONFIG_WARPED_MOTION
#if !CONFIG_NCOBMC_ADAPT_WEIGHT
const aom_tree_index av1_motion_mode_tree[TREE_SIZE(MOTION_MODES)] = {
-SIMPLE_TRANSLATION, -OBMC_CAUSAL
};
......@@ -1152,22 +1171,26 @@ static const aom_prob default_motion_mode_prob[BLOCK_SIZES][MOTION_MODES - 1] =
{ 252 }, { 252 }, { 252 },
#endif // CONFIG_EXT_PARTITION
};
#if CONFIG_NCOBMC_ADAPT_WEIGHT
const aom_tree_index av1_ncobmc_mode_tree[TREE_SIZE(MAX_NCOBMC_MODES)] = {
-NO_OVERLAP, 2, -NCOBMC_MODE_1, 4,
-NCOBMC_MODE_2, 6, -NCOBMC_MODE_3, 8,
-NCOBMC_MODE_4, 10, -NCOBMC_MODE_5, 12,
-NCOBMC_MODE_6, 14, -NCOBMC_MODE_7, -NCOBMC_MODE_8
#else
// TODO(weitinglin): The default probability is copied from warped motion right
// now as a place holder. It needs to be fined tuned after
// NCOBMC_ADAPT_WEIGHT is actually implemented. Also needs to
// change this section appropriately once warped motion is
// supported.
const aom_tree_index av1_motion_mode_tree[TREE_SIZE(MOTION_MODES)] = {
-SIMPLE_TRANSLATION, 2, -OBMC_CAUSAL, -NCOBMC_ADAPT_WEIGHT,
};
// TODO(weitinglin): find default prob
static const aom_prob
default_ncobmc_mode_prob[ADAPT_OVERLAP_BLOCKS][MAX_NCOBMC_MODES - 1] = {
{ 23, 37, 37, 38, 65, 71, 81, 86 }, // 8x8
{ 28, 32, 37, 43, 51, 64, 85, 128 }, // 16X16 equal prob
{ 86, 22, 32, 25, 10, 40, 97, 65 }, // 32X32
{ 28, 32, 37, 43, 51, 64, 85, 128 } // 64X64 equal prob
static const aom_prob default_motion_mode_prob[BLOCK_SIZES][MOTION_MODES - 1] =
{
#if CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
{ 255, 200 }, { 255, 200 }, { 255, 200 },
#endif
{ 255, 200 }, { 255, 200 }, { 255, 200 }, { 151, 200 }, { 153, 200 },
{ 144, 200 }, { 178, 200 }, { 165, 200 }, { 160, 200 }, { 207, 200 },
{ 195, 200 }, { 168, 200 }, { 244, 200 },
#if CONFIG_EXT_PARTITION
{ 252, 200 }, { 252, 200 }, { 252, 200 },
#endif // CONFIG_EXT_PARTITION
};
#endif
......
......@@ -408,6 +408,9 @@ typedef enum {
#if CONFIG_WARPED_MOTION
WARPED_CAUSAL, // 2-sided WARPED
#endif // CONFIG_WARPED_MOTION
#if CONFIG_NCOBMC_ADAPT_WEIGHT
NCOBMC_ADAPT_WEIGHT,
#endif
MOTION_MODES
} MOTION_MODE;
......
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