Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(539)

Unified Diff: source/libvpx/vp9/encoder/vp9_mbgraph.c

Issue 341293003: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « source/libvpx/vp9/encoder/vp9_firstpass.c ('k') | source/libvpx/vp9/encoder/vp9_mcomp.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « source/libvpx/vp9/encoder/vp9_firstpass.c ('k') | source/libvpx/vp9/encoder/vp9_mcomp.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698