Merge "Remove unused using_small_partition_info functions"
This commit is contained in:
commit
91b5145673
@ -1613,80 +1613,6 @@ static void rd_auto_partition_range(VP9_COMP *cpi, const TileInfo *const tile,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void compute_fast_motion_search_level(VP9_COMP *cpi, BLOCK_SIZE bsize) {
|
|
||||||
VP9_COMMON *const cm = &cpi->common;
|
|
||||||
MACROBLOCK *const x = &cpi->mb;
|
|
||||||
|
|
||||||
if (cm->frame_type == INTER_FRAME &&
|
|
||||||
!cpi->rc.is_src_frame_alt_ref &&
|
|
||||||
(bsize == BLOCK_16X16 || bsize == BLOCK_32X32 || bsize == BLOCK_64X64)) {
|
|
||||||
const PICK_MODE_CONTEXT *block_context = get_block_context(x, bsize);
|
|
||||||
const int ref0 = block_context[0].mic.mbmi.ref_frame[0];
|
|
||||||
const int ref1 = block_context[1].mic.mbmi.ref_frame[0];
|
|
||||||
const int ref2 = block_context[2].mic.mbmi.ref_frame[0];
|
|
||||||
const int ref3 = block_context[3].mic.mbmi.ref_frame[0];
|
|
||||||
|
|
||||||
// Currently, only consider 4 inter reference frames.
|
|
||||||
if (ref0 && ref1 && ref2 && ref3) {
|
|
||||||
int d01, d23, d02, d13;
|
|
||||||
|
|
||||||
// Motion vectors for the four subblocks.
|
|
||||||
int16_t mvr0 = block_context[0].mic.mbmi.mv[0].as_mv.row;
|
|
||||||
int16_t mvc0 = block_context[0].mic.mbmi.mv[0].as_mv.col;
|
|
||||||
int16_t mvr1 = block_context[1].mic.mbmi.mv[0].as_mv.row;
|
|
||||||
int16_t mvc1 = block_context[1].mic.mbmi.mv[0].as_mv.col;
|
|
||||||
int16_t mvr2 = block_context[2].mic.mbmi.mv[0].as_mv.row;
|
|
||||||
int16_t mvc2 = block_context[2].mic.mbmi.mv[0].as_mv.col;
|
|
||||||
int16_t mvr3 = block_context[3].mic.mbmi.mv[0].as_mv.row;
|
|
||||||
int16_t mvc3 = block_context[3].mic.mbmi.mv[0].as_mv.col;
|
|
||||||
|
|
||||||
// Adjust sign if ref is alt_ref.
|
|
||||||
if (cm->ref_frame_sign_bias[ref0]) {
|
|
||||||
mvr0 *= -1;
|
|
||||||
mvc0 *= -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (cm->ref_frame_sign_bias[ref1]) {
|
|
||||||
mvr1 *= -1;
|
|
||||||
mvc1 *= -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (cm->ref_frame_sign_bias[ref2]) {
|
|
||||||
mvr2 *= -1;
|
|
||||||
mvc2 *= -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (cm->ref_frame_sign_bias[ref3]) {
|
|
||||||
mvr3 *= -1;
|
|
||||||
mvc3 *= -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Calculate mv distances.
|
|
||||||
d01 = MAX(abs(mvr0 - mvr1), abs(mvc0 - mvc1));
|
|
||||||
d23 = MAX(abs(mvr2 - mvr3), abs(mvc2 - mvc3));
|
|
||||||
d02 = MAX(abs(mvr0 - mvr2), abs(mvc0 - mvc2));
|
|
||||||
d13 = MAX(abs(mvr1 - mvr3), abs(mvc1 - mvc3));
|
|
||||||
|
|
||||||
if (d01 < FAST_MOTION_MV_THRESH && d23 < FAST_MOTION_MV_THRESH &&
|
|
||||||
d02 < FAST_MOTION_MV_THRESH && d13 < FAST_MOTION_MV_THRESH) {
|
|
||||||
// Set fast motion search level.
|
|
||||||
x->fast_ms = 1;
|
|
||||||
|
|
||||||
if (ref0 == ref1 && ref1 == ref2 && ref2 == ref3 &&
|
|
||||||
d01 < 2 && d23 < 2 && d02 < 2 && d13 < 2) {
|
|
||||||
// Set fast motion search level.
|
|
||||||
x->fast_ms = 2;
|
|
||||||
|
|
||||||
if (!d01 && !d23 && !d02 && !d13) {
|
|
||||||
x->fast_ms = 3;
|
|
||||||
x->subblock_ref = ref0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static INLINE void store_pred_mv(MACROBLOCK *x, PICK_MODE_CONTEXT *ctx) {
|
static INLINE void store_pred_mv(MACROBLOCK *x, PICK_MODE_CONTEXT *ctx) {
|
||||||
vpx_memcpy(ctx->pred_mv, x->pred_mv, sizeof(x->pred_mv));
|
vpx_memcpy(ctx->pred_mv, x->pred_mv, sizeof(x->pred_mv));
|
||||||
}
|
}
|
||||||
@ -1726,8 +1652,6 @@ static void rd_pick_partition(VP9_COMP *cpi, const TileInfo *const tile,
|
|||||||
bsize >= BLOCK_8X8;
|
bsize >= BLOCK_8X8;
|
||||||
int partition_vert_allowed = !force_horz_split && xss <= yss &&
|
int partition_vert_allowed = !force_horz_split && xss <= yss &&
|
||||||
bsize >= BLOCK_8X8;
|
bsize >= BLOCK_8X8;
|
||||||
|
|
||||||
int partition_split_done = 0;
|
|
||||||
(void) *tp_orig;
|
(void) *tp_orig;
|
||||||
|
|
||||||
if (bsize < BLOCK_8X8) {
|
if (bsize < BLOCK_8X8) {
|
||||||
@ -1869,18 +1793,12 @@ static void rd_pick_partition(VP9_COMP *cpi, const TileInfo *const tile,
|
|||||||
if (cpi->sf.less_rectangular_check)
|
if (cpi->sf.less_rectangular_check)
|
||||||
do_rect &= !partition_none_allowed;
|
do_rect &= !partition_none_allowed;
|
||||||
}
|
}
|
||||||
partition_split_done = 1;
|
|
||||||
restore_context(cpi, mi_row, mi_col, a, l, sa, sl, bsize);
|
restore_context(cpi, mi_row, mi_col, a, l, sa, sl, bsize);
|
||||||
}
|
}
|
||||||
|
|
||||||
x->fast_ms = 0;
|
x->fast_ms = 0;
|
||||||
x->subblock_ref = 0;
|
x->subblock_ref = 0;
|
||||||
|
|
||||||
if (partition_split_done &&
|
|
||||||
cpi->sf.using_small_partition_info) {
|
|
||||||
compute_fast_motion_search_level(cpi, bsize);
|
|
||||||
}
|
|
||||||
|
|
||||||
// PARTITION_HORZ
|
// PARTITION_HORZ
|
||||||
if (partition_horz_allowed && do_rect) {
|
if (partition_horz_allowed && do_rect) {
|
||||||
subsize = get_subsize(bsize, PARTITION_HORZ);
|
subsize = get_subsize(bsize, PARTITION_HORZ);
|
||||||
|
@ -911,7 +911,6 @@ void vp9_set_speed_features(VP9_COMP *cpi) {
|
|||||||
sf->use_uv_intra_rd_estimate = 0;
|
sf->use_uv_intra_rd_estimate = 0;
|
||||||
sf->use_fast_lpf_pick = 0;
|
sf->use_fast_lpf_pick = 0;
|
||||||
sf->use_fast_coef_updates = 0;
|
sf->use_fast_coef_updates = 0;
|
||||||
sf->using_small_partition_info = 0;
|
|
||||||
sf->mode_skip_start = MAX_MODES; // Mode index at which mode skip mask set
|
sf->mode_skip_start = MAX_MODES; // Mode index at which mode skip mask set
|
||||||
sf->use_pick_mode = 0;
|
sf->use_pick_mode = 0;
|
||||||
sf->encode_breakout_thresh = 0;
|
sf->encode_breakout_thresh = 0;
|
||||||
|
@ -346,11 +346,6 @@ typedef struct {
|
|||||||
// inter modes or to enable it always.
|
// inter modes or to enable it always.
|
||||||
int disable_split_mask;
|
int disable_split_mask;
|
||||||
|
|
||||||
// TODO(jbb): Remove this and everything that uses it. It's only valid if
|
|
||||||
// we were doing small to large partition checks. We currently do the
|
|
||||||
// reverse.
|
|
||||||
int using_small_partition_info;
|
|
||||||
|
|
||||||
// TODO(jingning): combine the related motion search speed features
|
// TODO(jingning): combine the related motion search speed features
|
||||||
// This allows us to use motion search at other sizes as a starting
|
// This allows us to use motion search at other sizes as a starting
|
||||||
// point for this motion search and limits the search range around it.
|
// point for this motion search and limits the search range around it.
|
||||||
|
Loading…
Reference in New Issue
Block a user