Add NCOBMC_ADAPT_WEIGHT as another motion mode

Change-Id: Id5c3df752528a3ea74e655b3d18a5d6f258a2238
This commit is contained in:
Wei-Ting Lin 2017-06-28 14:08:29 -07:00 коммит произвёл Wei-ting Lin
Родитель d1ff7543df
Коммит 852683073f
2 изменённых файлов: 43 добавлений и 17 удалений

Просмотреть файл

@ -1136,23 +1136,6 @@ static const aom_prob default_wedge_interintra_prob[BLOCK_SIZES] = {
#endif // CONFIG_INTERINTRA
#endif // CONFIG_EXT_INTER
// Change this section appropriately once warped motion is supported
#if CONFIG_MOTION_VAR && !CONFIG_WARPED_MOTION
const aom_tree_index av1_motion_mode_tree[TREE_SIZE(MOTION_MODES)] = {
-SIMPLE_TRANSLATION, -OBMC_CAUSAL
};
static const aom_prob default_motion_mode_prob[BLOCK_SIZES][MOTION_MODES - 1] =
{
#if CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
{ 255 }, { 255 }, { 255 },
#endif
{ 255 }, { 255 }, { 255 }, { 151 }, { 153 }, { 144 }, { 178 },
{ 165 }, { 160 }, { 207 }, { 195 }, { 168 }, { 244 },
#if CONFIG_EXT_PARTITION
{ 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,
@ -1171,6 +1154,46 @@ static const aom_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
};
static const aom_prob default_motion_mode_prob[BLOCK_SIZES][MOTION_MODES - 1] =
{
#if CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
{ 255 }, { 255 }, { 255 },
#endif
{ 255 }, { 255 }, { 255 }, { 151 }, { 153 }, { 144 }, { 178 },
{ 165 }, { 160 }, { 207 }, { 195 }, { 168 }, { 244 },
#if CONFIG_EXT_PARTITION
{ 252 }, { 252 }, { 252 },
#endif // CONFIG_EXT_PARTITION
};
#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,
};
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
#elif !CONFIG_MOTION_VAR && CONFIG_WARPED_MOTION
const aom_tree_index av1_motion_mode_tree[TREE_SIZE(MOTION_MODES)] = {

Просмотреть файл

@ -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;