Index: source/libvpx/vp9/encoder/vp9_mbgraph.c |
=================================================================== |
--- source/libvpx/vp9/encoder/vp9_mbgraph.c (revision 278778) |
+++ source/libvpx/vp9/encoder/vp9_mbgraph.c (working copy) |
@@ -25,9 +25,10 @@ |
MV *dst_mv, |
int mb_row, |
int mb_col) { |
- MACROBLOCK *const x = &cpi->mb; |
+ MACROBLOCK *const x = &cpi->mb; |
MACROBLOCKD *const xd = &x->e_mbd; |
- vp9_variance_fn_ptr_t v_fn_ptr = cpi->fn_ptr[BLOCK_16X16]; |
+ const MV_SPEED_FEATURES *const mv_sf = &cpi->sf.mv; |
+ const vp9_variance_fn_ptr_t v_fn_ptr = cpi->fn_ptr[BLOCK_16X16]; |
const int tmp_col_min = x->mv_col_min; |
const int tmp_col_max = x->mv_col_max; |
@@ -36,9 +37,9 @@ |
MV ref_full; |
// Further step/diamond searches as necessary |
- int step_param = cpi->sf.reduce_first_step_size + |
+ int step_param = mv_sf->reduce_first_step_size + |
(cpi->oxcf.speed > 5 ? 1 : 0); |
- step_param = MIN(step_param, cpi->sf.max_step_search_steps - 2); |
+ step_param = MIN(step_param, mv_sf->max_step_search_steps - 2); |
vp9_set_mv_search_range(x, ref_mv); |
@@ -56,7 +57,7 @@ |
unsigned int sse; |
cpi->find_fractional_mv_step( |
x, dst_mv, ref_mv, cpi->common.allow_high_precision_mv, x->errorperbit, |
- &v_fn_ptr, 0, cpi->sf.subpel_iters_per_step, NULL, NULL, &distortion, |
+ &v_fn_ptr, 0, mv_sf->subpel_iters_per_step, NULL, NULL, &distortion, |
&sse); |
} |
@@ -72,8 +73,7 @@ |
x->mv_row_max = tmp_row_max; |
return vp9_sad16x16(x->plane[0].src.buf, x->plane[0].src.stride, |
- xd->plane[0].dst.buf, xd->plane[0].dst.stride, |
- INT_MAX); |
+ xd->plane[0].dst.buf, xd->plane[0].dst.stride); |
} |
static int do_16x16_motion_search(VP9_COMP *cpi, const MV *ref_mv, |
@@ -86,8 +86,7 @@ |
// Try zero MV first |
// FIXME should really use something like near/nearest MV and/or MV prediction |
err = vp9_sad16x16(x->plane[0].src.buf, x->plane[0].src.stride, |
- xd->plane[0].pre[0].buf, xd->plane[0].pre[0].stride, |
- INT_MAX); |
+ xd->plane[0].pre[0].buf, xd->plane[0].pre[0].stride); |
dst_mv->as_int = 0; |
// Test last reference frame using the previous best mv as the |
@@ -123,8 +122,7 @@ |
// Try zero MV first |
// FIXME should really use something like near/nearest MV and/or MV prediction |
err = vp9_sad16x16(x->plane[0].src.buf, x->plane[0].src.stride, |
- xd->plane[0].pre[0].buf, xd->plane[0].pre[0].stride, |
- INT_MAX); |
+ xd->plane[0].pre[0].buf, xd->plane[0].pre[0].stride); |
dst_mv->as_int = 0; |
@@ -147,7 +145,7 @@ |
xd->plane[0].dst.buf, xd->plane[0].dst.stride, |
0, 0, 0); |
err = vp9_sad16x16(x->plane[0].src.buf, x->plane[0].src.stride, |
- xd->plane[0].dst.buf, xd->plane[0].dst.stride, best_err); |
+ xd->plane[0].dst.buf, xd->plane[0].dst.stride); |
// find best |
if (err < best_err) { |
@@ -235,7 +233,7 @@ |
int mb_col, mb_row, offset = 0; |
int mb_y_offset = 0, arf_y_offset = 0, gld_y_offset = 0; |
- MV arf_top_mv = {0, 0}, gld_top_mv = {0, 0}; |
+ MV gld_top_mv = {0, 0}; |
MODE_INFO mi_local; |
vp9_zero(mi_local); |
@@ -253,7 +251,7 @@ |
mi_local.mbmi.ref_frame[1] = NONE; |
for (mb_row = 0; mb_row < cm->mb_rows; mb_row++) { |
- MV arf_left_mv = arf_top_mv, gld_left_mv = gld_top_mv; |
+ MV gld_left_mv = gld_top_mv; |
int mb_y_in_offset = mb_y_offset; |
int arf_y_in_offset = arf_y_offset; |
int gld_y_in_offset = gld_y_offset; |
@@ -270,10 +268,8 @@ |
update_mbgraph_mb_stats(cpi, mb_stats, buf, mb_y_in_offset, |
golden_ref, &gld_left_mv, alt_ref, |
mb_row, mb_col); |
- arf_left_mv = mb_stats->ref[ALTREF_FRAME].m.mv.as_mv; |
gld_left_mv = mb_stats->ref[GOLDEN_FRAME].m.mv.as_mv; |
if (mb_col == 0) { |
- arf_top_mv = arf_left_mv; |
gld_top_mv = gld_left_mv; |
} |
xd->left_available = 1; |