Commit fb8ea173 authored by Debargha Mukherjee's avatar Debargha Mukherjee

Various wedge enhancements

Increases number of wedges for smaller block and removes
wedge coding mode for blocks larger than 32x32.

Also adds various other enhancements for subsequent experimentation,
including adding provision for multiple smoothing functions
(though one is used currently), adds a speed feature that decides
the sign for interinter wedges using a fast mechanism, and refactors
wedge representations.

lowres: -2.651% BDRATE

Most of the gain is due to increase in codebook size for 8x8 - 16x16.

Change-Id: I50669f558c8d0d45e5a6f70aca4385a185b58b5b
parent e7ebe26d
......@@ -53,43 +53,6 @@ static INLINE int is_inter_mode(PREDICTION_MODE mode) {
}
#if CONFIG_EXT_INTER
#define WEDGE_BITS_SML 2
#define WEDGE_BITS_MED 3
#define WEDGE_BITS_BIG 4
#define WEDGE_NONE -1
#define WEDGE_WEIGHT_BITS 6
static const int get_wedge_bits_lookup[BLOCK_SIZES] = {
0,
0,
0,
WEDGE_BITS_SML,
WEDGE_BITS_MED,
WEDGE_BITS_MED,
WEDGE_BITS_MED,
WEDGE_BITS_MED,
WEDGE_BITS_MED,
WEDGE_BITS_MED,
WEDGE_BITS_BIG,
WEDGE_BITS_BIG,
WEDGE_BITS_BIG,
#if CONFIG_EXT_PARTITION
WEDGE_BITS_BIG,
WEDGE_BITS_BIG,
WEDGE_BITS_BIG,
#endif // CONFIG_EXT_PARTITION
};
static INLINE int is_interinter_wedge_used(BLOCK_SIZE sb_type) {
(void) sb_type;
return get_wedge_bits_lookup[sb_type] > 0;
}
static INLINE int is_interintra_wedge_used(BLOCK_SIZE sb_type) {
(void) sb_type;
return get_wedge_bits_lookup[sb_type] > 0;
}
static INLINE int is_inter_singleref_mode(PREDICTION_MODE mode) {
return mode >= NEARESTMV && mode <= NEWFROMNEARMV;
}
......
......@@ -281,16 +281,16 @@ static const vpx_prob
};
static const vpx_prob default_wedge_interintra_prob[BLOCK_SIZES] = {
208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208,
208, 208, 208, 208, 208, 208, 216, 216, 216, 224, 224, 224, 240,
#if CONFIG_EXT_PARTITION
208, 208, 208
#endif // CONFIG_EXT_PARTITION
};
static const vpx_prob default_wedge_interinter_prob[BLOCK_SIZES] = {
208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208,
208, 208, 208, 208, 208, 208, 216, 216, 216, 224, 224, 224, 240,
#if CONFIG_EXT_PARTITION
208, 208, 208
255, 255, 255
#endif // CONFIG_EXT_PARTITION
};
#endif // CONFIG_EXT_INTER
......
This diff is collapsed.
......@@ -146,6 +146,55 @@ static INLINE void highbd_inter_predictor(const uint8_t *src, int src_stride,
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_EXT_INTER
#define WEDGE_BITS_2 2
#define WEDGE_BITS_3 3
#define WEDGE_BITS_4 4
#define WEDGE_BITS_5 5
#define WEDGE_NONE -1
#define WEDGE_WEIGHT_BITS 6
static const int get_wedge_bits_lookup[BLOCK_SIZES] = {
0,
0,
0,
WEDGE_BITS_4,
WEDGE_BITS_4,
WEDGE_BITS_4,
WEDGE_BITS_4,
WEDGE_BITS_4,
WEDGE_BITS_4,
WEDGE_BITS_4,
0,
0,
0,
#if CONFIG_EXT_PARTITION
0,
0,
0,
#endif // CONFIG_EXT_PARTITION
};
static INLINE int is_interinter_wedge_used(BLOCK_SIZE sb_type) {
(void) sb_type;
return get_wedge_bits_lookup[sb_type] > 0;
}
static INLINE int get_interinter_wedge_bits(BLOCK_SIZE sb_type) {
const int wbits = get_wedge_bits_lookup[sb_type];
return (wbits > 0) ? wbits + 1 : 0;
}
static INLINE int is_interintra_wedge_used(BLOCK_SIZE sb_type) {
(void) sb_type;
return get_wedge_bits_lookup[sb_type] > 0;
}
static INLINE int get_interintra_wedge_bits(BLOCK_SIZE sb_type) {
return get_wedge_bits_lookup[sb_type];
}
#endif // CONFIG_EXT_INTER
void build_inter_predictors(MACROBLOCKD *xd, int plane,
#if CONFIG_OBMC
int mi_col_offset, int mi_row_offset,
......
This diff is collapsed.
......@@ -165,6 +165,7 @@ static void set_good_speed_feature(VP10_COMP *cpi, VP10_COMMON *cm,
sf->use_transform_domain_distortion = 1;
#if CONFIG_EXT_INTER
sf->disable_wedge_search_var_thresh = 100;
sf->fast_wedge_sign_estimate = 1;
#endif // CONFIG_EXT_INTER
}
......@@ -283,6 +284,7 @@ static void set_rt_speed_feature(VP10_COMP *cpi, SPEED_FEATURES *sf,
sf->use_upsampled_references = 0;
#if CONFIG_EXT_INTER
sf->disable_wedge_search_var_thresh = 100;
sf->fast_wedge_sign_estimate = 1;
#endif // CONFIG_EXT_INTER
// Use transform domain distortion computation
......@@ -517,6 +519,7 @@ void vp10_set_speed_features_framesize_independent(VP10_COMP *cpi) {
#endif // CONFIG_EXT_TILE
#if CONFIG_EXT_INTER
sf->disable_wedge_search_var_thresh = 0;
sf->fast_wedge_sign_estimate = 0;
#endif // CONFIG_EXT_INTER
for (i = 0; i < TX_SIZES; i++) {
......
......@@ -402,6 +402,9 @@ typedef struct SPEED_FEATURES {
#if CONFIG_EXT_INTER
// A source variance threshold below which wedge search is disabled
unsigned int disable_wedge_search_var_thresh;
// Whether fast wedge sign estimate is used
int fast_wedge_sign_estimate;
#endif // CONFIG_EXT_INTER
// These bit masks allow you to enable or disable intra modes for each
......
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