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

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

Issue 23600008: libvpx: Pull from upstream (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 7 years, 4 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 219822)
+++ source/libvpx/vp9/encoder/vp9_mbgraph.c (working copy)
@@ -40,14 +40,15 @@
(cpi->speed < 8 ? (cpi->speed > 5 ? 1 : 0) : 2);
step_param = MIN(step_param, (cpi->sf.max_step_search_steps - 2));
- vp9_clamp_mv_min_max(x, ref_mv);
+ vp9_clamp_mv_min_max(x, &ref_mv->as_mv);
ref_full.as_mv.col = ref_mv->as_mv.col >> 3;
ref_full.as_mv.row = ref_mv->as_mv.row >> 3;
/*cpi->sf.search_method == HEX*/
- best_err = vp9_hex_search(x, &ref_full, dst_mv, step_param, x->errorperbit,
- &v_fn_ptr, NULL, NULL, NULL, NULL, ref_mv);
+ best_err = vp9_hex_search(x, &ref_full, step_param, x->errorperbit,
+ 0, &v_fn_ptr,
+ 0, ref_mv, dst_mv);
// Try sub-pixel MC
// if (bestsme > error_thresh && bestsme < INT_MAX)
@@ -58,12 +59,12 @@
x,
dst_mv, ref_mv,
x->errorperbit, &v_fn_ptr,
- NULL, NULL,
+ 0, cpi->sf.subpel_iters_per_step, NULL, NULL,
& distortion, &sse);
}
vp9_set_mbmode_and_mvs(x, NEWMV, dst_mv);
- vp9_build_inter_predictors_sby(xd, mb_row, mb_col, BLOCK_SIZE_MB16X16);
+ vp9_build_inter_predictors_sby(xd, mb_row, mb_col, BLOCK_16X16);
best_err = vp9_sad16x16(x->plane[0].src.buf, x->plane[0].src.stride,
xd->plane[0].dst.buf, xd->plane[0].dst.stride,
INT_MAX);
@@ -77,9 +78,7 @@
return best_err;
}
-static int do_16x16_motion_search(VP9_COMP *cpi,
- int_mv *ref_mv, int_mv *dst_mv,
- int buf_mb_y_offset, int mb_y_offset,
+static int do_16x16_motion_search(VP9_COMP *cpi, int_mv *ref_mv, int_mv *dst_mv,
int mb_row, int mb_col) {
MACROBLOCK *const x = &cpi->mb;
MACROBLOCKD *const xd = &x->e_mbd;
@@ -118,9 +117,7 @@
return err;
}
-static int do_16x16_zerozero_search(VP9_COMP *cpi,
- int_mv *dst_mv,
- int buf_mb_y_offset, int mb_y_offset) {
+static int do_16x16_zerozero_search(VP9_COMP *cpi, int_mv *dst_mv) {
MACROBLOCK *const x = &cpi->mb;
MACROBLOCKD *const xd = &x->e_mbd;
unsigned int err;
@@ -210,7 +207,6 @@
g_motion_error = do_16x16_motion_search(cpi,
prev_golden_ref_mv,
&stats->ref[GOLDEN_FRAME].m.mv,
- mb_y_offset, gld_y_offset,
mb_row, mb_col);
stats->ref[GOLDEN_FRAME].err = g_motion_error;
} else {
@@ -224,8 +220,7 @@
xd->plane[0].pre[0].buf = alt_ref->y_buffer + mb_y_offset;
xd->plane[0].pre[0].stride = alt_ref->y_stride;
a_motion_error = do_16x16_zerozero_search(cpi,
- &stats->ref[ALTREF_FRAME].m.mv,
- mb_y_offset, arf_y_offset);
+ &stats->ref[ALTREF_FRAME].m.mv);
stats->ref[ALTREF_FRAME].err = a_motion_error;
} else {
@@ -246,11 +241,8 @@
int mb_col, mb_row, offset = 0;
int mb_y_offset = 0, arf_y_offset = 0, gld_y_offset = 0;
int_mv arf_top_mv, gld_top_mv;
- MODE_INFO mi_local;
+ MODE_INFO mi_local = { { 0 } };
- // Make sure the mi context starts in a consistent state.
- memset(&mi_local, 0, sizeof(mi_local));
-
// Set up limit values for motion vectors to prevent them extending outside the UMV borders
arf_top_mv.as_int = 0;
gld_top_mv.as_int = 0;
@@ -262,7 +254,7 @@
xd->plane[0].pre[0].stride = buf->y_stride;
xd->plane[1].dst.stride = buf->uv_stride;
xd->mode_info_context = &mi_local;
- mi_local.mbmi.sb_type = BLOCK_SIZE_MB16X16;
+ mi_local.mbmi.sb_type = BLOCK_16X16;
mi_local.mbmi.ref_frame[0] = LAST_FRAME;
mi_local.mbmi.ref_frame[1] = NONE;
@@ -315,7 +307,7 @@
static void separate_arf_mbs(VP9_COMP *cpi) {
VP9_COMMON *const cm = &cpi->common;
int mb_col, mb_row, offset, i;
- int ncnt[4];
+ int ncnt[4] = { 0 };
int n_frames = cpi->mbgraph_n_frames;
int *arf_not_zz;
@@ -351,7 +343,6 @@
}
}
- vpx_memset(ncnt, 0, sizeof(ncnt));
for (offset = 0, mb_row = 0; mb_row < cm->mb_rows;
offset += cm->mb_cols, mb_row++) {
for (mb_col = 0; mb_col < cm->mb_cols; mb_col++) {
« 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