Commit 04b100b2 authored by Deb Mukherjee's avatar Deb Mukherjee
Browse files

Updates vp9_pattern search to return integer sads

Updates the vp9_pattern_search function to return integer one-away
neighbors' sad values, for subsequent use in speeding up the
sub-pel search. Also, removes code for the do_refine option
which is not being used currently.
Updates the integer and subpel functions to pass in a 5-element
sad list for output or input.

A new pruned sub-pel search algorithm is implemented that uses
the sad returned from the integer pel search. But it is not
deployed yet.

Change-Id: Ifa9f5ad024b5b660570366d2bd900343e1891520
parent 08db5f95
...@@ -522,6 +522,10 @@ static INLINE int get_chessboard_index(const int frame_index) { ...@@ -522,6 +522,10 @@ static INLINE int get_chessboard_index(const int frame_index) {
return frame_index & 0x1; return frame_index & 0x1;
} }
static INLINE int *cond_sad_list(const struct VP9_COMP *cpi, int *sad_list) {
return cpi->sf.mv.subpel_search_method != SUBPEL_TREE ? sad_list : NULL;
}
#ifdef __cplusplus #ifdef __cplusplus
} // extern "C" } // extern "C"
#endif #endif
......
...@@ -34,6 +34,7 @@ static unsigned int do_16x16_motion_iteration(VP9_COMP *cpi, ...@@ -34,6 +34,7 @@ static unsigned int do_16x16_motion_iteration(VP9_COMP *cpi,
const int tmp_row_min = x->mv_row_min; const int tmp_row_min = x->mv_row_min;
const int tmp_row_max = x->mv_row_max; const int tmp_row_max = x->mv_row_max;
MV ref_full; MV ref_full;
int sad_list[5];
// Further step/diamond searches as necessary // Further step/diamond searches as necessary
int step_param = mv_sf->reduce_first_step_size; int step_param = mv_sf->reduce_first_step_size;
...@@ -45,8 +46,9 @@ static unsigned int do_16x16_motion_iteration(VP9_COMP *cpi, ...@@ -45,8 +46,9 @@ static unsigned int do_16x16_motion_iteration(VP9_COMP *cpi,
ref_full.row = ref_mv->row >> 3; ref_full.row = ref_mv->row >> 3;
/*cpi->sf.search_method == HEX*/ /*cpi->sf.search_method == HEX*/
vp9_hex_search(x, &ref_full, step_param, x->errorperbit, 0, &v_fn_ptr, 0, vp9_hex_search(x, &ref_full, step_param, x->errorperbit, 0,
ref_mv, dst_mv); cond_sad_list(cpi, sad_list),
&v_fn_ptr, 0, ref_mv, dst_mv);
// Try sub-pixel MC // Try sub-pixel MC
// if (bestsme > error_thresh && bestsme < INT_MAX) // if (bestsme > error_thresh && bestsme < INT_MAX)
...@@ -55,8 +57,10 @@ static unsigned int do_16x16_motion_iteration(VP9_COMP *cpi, ...@@ -55,8 +57,10 @@ static unsigned int do_16x16_motion_iteration(VP9_COMP *cpi,
unsigned int sse; unsigned int sse;
cpi->find_fractional_mv_step( cpi->find_fractional_mv_step(
x, dst_mv, ref_mv, cpi->common.allow_high_precision_mv, x->errorperbit, x, dst_mv, ref_mv, cpi->common.allow_high_precision_mv, x->errorperbit,
&v_fn_ptr, 0, mv_sf->subpel_iters_per_step, NULL, NULL, &distortion, &v_fn_ptr, 0, mv_sf->subpel_iters_per_step,
&sse, NULL, 0, 0); cond_sad_list(cpi, sad_list),
NULL, NULL,
&distortion, &sse, NULL, 0, 0);
} }
xd->mi[0]->mbmi.mode = NEWMV; xd->mi[0]->mbmi.mode = NEWMV;
......
...@@ -256,62 +256,152 @@ static INLINE const uint8_t *pre(const uint8_t *buf, int stride, int r, int c) { ...@@ -256,62 +256,152 @@ static INLINE const uint8_t *pre(const uint8_t *buf, int stride, int r, int c) {
} \ } \
} }
int vp9_find_best_sub_pixel_tree(const MACROBLOCK *x, #define SETUP_SUBPEL_SEARCH \
const uint8_t *const z = x->plane[0].src.buf; \
const int src_stride = x->plane[0].src.stride; \
const MACROBLOCKD *xd = &x->e_mbd; \
unsigned int besterr = INT_MAX; \
unsigned int sse; \
unsigned int whichdir; \
int thismse; \
const unsigned int halfiters = iters_per_step; \
const unsigned int quarteriters = iters_per_step; \
const unsigned int eighthiters = iters_per_step; \
const int y_stride = xd->plane[0].pre[0].stride; \
const int offset = bestmv->row * y_stride + bestmv->col; \
const uint8_t *const y = xd->plane[0].pre[0].buf; \
\
int rr = ref_mv->row; \
int rc = ref_mv->col; \
int br = bestmv->row * 8; \
int bc = bestmv->col * 8; \
int hstep = 4; \
const int minc = MAX(x->mv_col_min * 8, ref_mv->col - MV_MAX); \
const int maxc = MIN(x->mv_col_max * 8, ref_mv->col + MV_MAX); \
const int minr = MAX(x->mv_row_min * 8, ref_mv->row - MV_MAX); \
const int maxr = MIN(x->mv_row_max * 8, ref_mv->row + MV_MAX); \
int tr = br; \
int tc = bc; \
\
bestmv->row *= 8; \
bestmv->col *= 8; \
if (second_pred != NULL) { \
DECLARE_ALIGNED_ARRAY(16, uint8_t, comp_pred, 64 * 64); \
vp9_comp_avg_pred(comp_pred, second_pred, w, h, y + offset, y_stride); \
besterr = vfp->vf(comp_pred, w, z, src_stride, sse1); \
} else { \
besterr = vfp->vf(y + offset, y_stride, z, src_stride, sse1); \
} \
*distortion = besterr; \
besterr += mv_err_cost(bestmv, ref_mv, mvjcost, mvcost, error_per_bit);
int vp9_find_best_sub_pixel_tree_pruned(const MACROBLOCK *x,
MV *bestmv, const MV *ref_mv, MV *bestmv, const MV *ref_mv,
int allow_hp, int allow_hp,
int error_per_bit, int error_per_bit,
const vp9_variance_fn_ptr_t *vfp, const vp9_variance_fn_ptr_t *vfp,
int forced_stop, int forced_stop,
int iters_per_step, int iters_per_step,
int *sad_list,
int *mvjcost, int *mvcost[2], int *mvjcost, int *mvcost[2],
int *distortion, int *distortion,
unsigned int *sse1, unsigned int *sse1,
const uint8_t *second_pred, const uint8_t *second_pred,
int w, int h) { int w, int h) {
const uint8_t *const z = x->plane[0].src.buf; SETUP_SUBPEL_SEARCH;
const int src_stride = x->plane[0].src.stride;
const MACROBLOCKD *xd = &x->e_mbd; if (sad_list &&
unsigned int besterr = INT_MAX; sad_list[0] != INT_MAX && sad_list[1] != INT_MAX &&
unsigned int sse; sad_list[2] != INT_MAX && sad_list[3] != INT_MAX &&
unsigned int whichdir; sad_list[4] != INT_MAX) {
int thismse; unsigned int left, right, up, down, diag;
const unsigned int halfiters = iters_per_step; whichdir = (sad_list[1] < sad_list[3] ? 0 : 1) +
const unsigned int quarteriters = iters_per_step; (sad_list[2] < sad_list[4] ? 0 : 2);
const unsigned int eighthiters = iters_per_step; switch (whichdir) {
case 0:
const int y_stride = xd->plane[0].pre[0].stride; CHECK_BETTER(left, tr, tc - hstep);
const int offset = bestmv->row * y_stride + bestmv->col; CHECK_BETTER(up, tr - hstep, tc);
const uint8_t *const y = xd->plane[0].pre[0].buf; CHECK_BETTER(diag, tr - hstep, tc - hstep);
break;
int rr = ref_mv->row; case 1:
int rc = ref_mv->col; CHECK_BETTER(right, tr, tc + hstep);
int br = bestmv->row * 8; CHECK_BETTER(up, tr - hstep, tc);
int bc = bestmv->col * 8; CHECK_BETTER(diag, tr - hstep, tc + hstep);
int hstep = 4; break;
const int minc = MAX(x->mv_col_min * 8, ref_mv->col - MV_MAX); case 2:
const int maxc = MIN(x->mv_col_max * 8, ref_mv->col + MV_MAX); CHECK_BETTER(left, tr, tc - hstep);
const int minr = MAX(x->mv_row_min * 8, ref_mv->row - MV_MAX); CHECK_BETTER(down, tr + hstep, tc);
const int maxr = MIN(x->mv_row_max * 8, ref_mv->row + MV_MAX); CHECK_BETTER(diag, tr + hstep, tc - hstep);
break;
int tr = br; case 3:
int tc = bc; CHECK_BETTER(right, tr, tc + hstep);
CHECK_BETTER(down, tr + hstep, tc);
// central mv CHECK_BETTER(diag, tr + hstep, tc + hstep);
bestmv->row *= 8; break;
bestmv->col *= 8; }
// calculate central point error
// TODO(yunqingwang): central pointer error was already calculated in full-
// pixel search, and can be passed in this function.
if (second_pred != NULL) {
DECLARE_ALIGNED_ARRAY(16, uint8_t, comp_pred, 64 * 64);
vp9_comp_avg_pred(comp_pred, second_pred, w, h, y + offset, y_stride);
besterr = vfp->vf(comp_pred, w, z, src_stride, sse1);
} else { } else {
besterr = vfp->vf(y + offset, y_stride, z, src_stride, sse1); FIRST_LEVEL_CHECKS;
if (halfiters > 1) {
SECOND_LEVEL_CHECKS;
} }
*distortion = besterr; }
besterr += mv_err_cost(bestmv, ref_mv, mvjcost, mvcost, error_per_bit);
tr = br;
tc = bc;
// Each subsequent iteration checks at least one point in common with
// the last iteration could be 2 ( if diag selected) 1/4 pel
// Note forced_stop: 0 - full, 1 - qtr only, 2 - half only
if (forced_stop != 2) {
hstep >>= 1;
FIRST_LEVEL_CHECKS;
if (quarteriters > 1) {
SECOND_LEVEL_CHECKS;
}
tr = br;
tc = bc;
}
if (allow_hp && vp9_use_mv_hp(ref_mv) && forced_stop == 0) {
hstep >>= 1;
FIRST_LEVEL_CHECKS;
if (eighthiters > 1) {
SECOND_LEVEL_CHECKS;
}
tr = br;
tc = bc;
}
// These lines insure static analysis doesn't warn that
// tr and tc aren't used after the above point.
(void) tr;
(void) tc;
bestmv->row = br;
bestmv->col = bc;
if ((abs(bestmv->col - ref_mv->col) > (MAX_FULL_PEL_VAL << 3)) ||
(abs(bestmv->row - ref_mv->row) > (MAX_FULL_PEL_VAL << 3)))
return INT_MAX;
return besterr;
}
int vp9_find_best_sub_pixel_tree(const MACROBLOCK *x,
MV *bestmv, const MV *ref_mv,
int allow_hp,
int error_per_bit,
const vp9_variance_fn_ptr_t *vfp,
int forced_stop,
int iters_per_step,
int *sad_list,
int *mvjcost, int *mvcost[2],
int *distortion,
unsigned int *sse1,
const uint8_t *second_pred,
int w, int h) {
SETUP_SUBPEL_SEARCH;
(void) sad_list; // to silence compiler warning
// Each subsequent iteration checks at least one point in // Each subsequent iteration checks at least one point in
// common with the last iteration could be 2 ( if diag selected) // common with the last iteration could be 2 ( if diag selected)
...@@ -398,14 +488,17 @@ static INLINE int is_mv_in(const MACROBLOCK *x, const MV *mv) { ...@@ -398,14 +488,17 @@ static INLINE int is_mv_in(const MACROBLOCK *x, const MV *mv) {
// Each scale can have a different number of candidates and shape of // Each scale can have a different number of candidates and shape of
// candidates as indicated in the num_candidates and candidates arrays // candidates as indicated in the num_candidates and candidates arrays
// passed into this function // passed into this function
//
static int vp9_pattern_search(const MACROBLOCK *x, static int vp9_pattern_search(const MACROBLOCK *x,
MV *ref_mv, MV *ref_mv,
int search_param, int search_param,
int sad_per_bit, int sad_per_bit,
int do_init_search, int do_refine, int do_init_search,
int *sad_list,
const vp9_variance_fn_ptr_t *vfp, const vp9_variance_fn_ptr_t *vfp,
int use_mvcost, int use_mvcost,
const MV *center_mv, MV *best_mv, const MV *center_mv,
MV *best_mv,
const int num_candidates[MAX_PATTERN_SCALES], const int num_candidates[MAX_PATTERN_SCALES],
const MV candidates[MAX_PATTERN_SCALES] const MV candidates[MAX_PATTERN_SCALES]
[MAX_PATTERN_CANDIDATES]) { [MAX_PATTERN_CANDIDATES]) {
...@@ -413,7 +506,7 @@ static int vp9_pattern_search(const MACROBLOCK *x, ...@@ -413,7 +506,7 @@ static int vp9_pattern_search(const MACROBLOCK *x,
static const int search_param_to_steps[MAX_MVSEARCH_STEPS] = { static const int search_param_to_steps[MAX_MVSEARCH_STEPS] = {
10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0,
}; };
int i, j, s, t; int i, s, t;
const struct buf_2d *const what = &x->plane[0].src; const struct buf_2d *const what = &x->plane[0].src;
const struct buf_2d *const in_what = &xd->plane[0].pre[0]; const struct buf_2d *const in_what = &xd->plane[0].pre[0];
int br, bc; int br, bc;
...@@ -552,47 +645,38 @@ static int vp9_pattern_search(const MACROBLOCK *x, ...@@ -552,47 +645,38 @@ static int vp9_pattern_search(const MACROBLOCK *x,
} while (s--); } while (s--);
} }
// Check 4 1-away neighbors if do_refine is true. // Returns the one-away integer pel sad values around the best as follows:
// For most well-designed schemes do_refine will not be necessary. // sad_list[0]: sad at the best integer pel
if (do_refine) { // sad_list[1]: sad at delta {0, -1} (left) from the best integer pel
static const MV neighbors[4] = {{0, -1}, { -1, 0}, {1, 0}, {0, 1}}; // sad_list[2]: sad at delta {-1, 0} (top) from the best integer pel
// sad_list[3]: sad at delta { 0, 1} (right) from the best integer pel
for (j = 0; j < 16; j++) { // sad_list[4]: sad at delta { 1, 0} (bottom) from the best integer pel
int best_site = -1; if (sad_list) {
static const MV neighbors[4] = {{0, -1}, {-1, 0}, {0, 1}, {1, 0}};
sad_list[0] = bestsad;
if (check_bounds(x, br, bc, 1)) { if (check_bounds(x, br, bc, 1)) {
for (i = 0; i < 4; i++) { for (i = 0; i < 4; i++) {
const MV this_mv = {br + neighbors[i].row, const MV this_mv = {br + neighbors[i].row,
bc + neighbors[i].col}; bc + neighbors[i].col};
thissad = vfp->sdf(what->buf, what->stride, sad_list[i + 1] = vfp->sdf(what->buf, what->stride,
get_buf_from_mv(in_what, &this_mv), get_buf_from_mv(in_what, &this_mv),
in_what->stride); in_what->stride);
CHECK_BETTER
} }
} else { } else {
for (i = 0; i < 4; i++) { for (i = 0; i < 4; i++) {
const MV this_mv = {br + neighbors[i].row, const MV this_mv = {br + neighbors[i].row,
bc + neighbors[i].col}; bc + neighbors[i].col};
if (!is_mv_in(x, &this_mv)) if (!is_mv_in(x, &this_mv))
continue; sad_list[i + 1] = INT_MAX;
thissad = vfp->sdf(what->buf, what->stride, else
sad_list[i + 1] = vfp->sdf(what->buf, what->stride,
get_buf_from_mv(in_what, &this_mv), get_buf_from_mv(in_what, &this_mv),
in_what->stride); in_what->stride);
CHECK_BETTER
}
} }
if (best_site == -1) {
break;
} else {
br += neighbors[best_site].row;
bc += neighbors[best_site].col;
} }
} }
}
best_mv->row = br; best_mv->row = br;
best_mv->col = bc; best_mv->col = bc;
return bestsad; return bestsad;
} }
...@@ -634,6 +718,7 @@ int vp9_hex_search(const MACROBLOCK *x, ...@@ -634,6 +718,7 @@ int vp9_hex_search(const MACROBLOCK *x,
int search_param, int search_param,
int sad_per_bit, int sad_per_bit,
int do_init_search, int do_init_search,
int *sad_list,
const vp9_variance_fn_ptr_t *vfp, const vp9_variance_fn_ptr_t *vfp,
int use_mvcost, int use_mvcost,
const MV *center_mv, MV *best_mv) { const MV *center_mv, MV *best_mv) {
...@@ -658,7 +743,7 @@ int vp9_hex_search(const MACROBLOCK *x, ...@@ -658,7 +743,7 @@ int vp9_hex_search(const MACROBLOCK *x,
{ -1024, 0}}, { -1024, 0}},
}; };
return vp9_pattern_search(x, ref_mv, search_param, sad_per_bit, return vp9_pattern_search(x, ref_mv, search_param, sad_per_bit,
do_init_search, 0, vfp, use_mvcost, do_init_search, sad_list, vfp, use_mvcost,
center_mv, best_mv, center_mv, best_mv,
hex_num_candidates, hex_candidates); hex_num_candidates, hex_candidates);
} }
...@@ -668,6 +753,7 @@ int vp9_bigdia_search(const MACROBLOCK *x, ...@@ -668,6 +753,7 @@ int vp9_bigdia_search(const MACROBLOCK *x,
int search_param, int search_param,
int sad_per_bit, int sad_per_bit,
int do_init_search, int do_init_search,
int *sad_list,
const vp9_variance_fn_ptr_t *vfp, const vp9_variance_fn_ptr_t *vfp,
int use_mvcost, int use_mvcost,
const MV *center_mv, const MV *center_mv,
...@@ -699,7 +785,7 @@ int vp9_bigdia_search(const MACROBLOCK *x, ...@@ -699,7 +785,7 @@ int vp9_bigdia_search(const MACROBLOCK *x,
{-512, 512}, {-1024, 0}}, {-512, 512}, {-1024, 0}},
}; };
return vp9_pattern_search(x, ref_mv, search_param, sad_per_bit, return vp9_pattern_search(x, ref_mv, search_param, sad_per_bit,
do_init_search, 0, vfp, use_mvcost, do_init_search, sad_list, vfp, use_mvcost,
center_mv, best_mv, center_mv, best_mv,
bigdia_num_candidates, bigdia_candidates); bigdia_num_candidates, bigdia_candidates);
} }
...@@ -709,6 +795,7 @@ int vp9_square_search(const MACROBLOCK *x, ...@@ -709,6 +795,7 @@ int vp9_square_search(const MACROBLOCK *x,
int search_param, int search_param,
int sad_per_bit, int sad_per_bit,
int do_init_search, int do_init_search,
int *sad_list,
const vp9_variance_fn_ptr_t *vfp, const vp9_variance_fn_ptr_t *vfp,
int use_mvcost, int use_mvcost,
const MV *center_mv, const MV *center_mv,
...@@ -740,7 +827,7 @@ int vp9_square_search(const MACROBLOCK *x, ...@@ -740,7 +827,7 @@ int vp9_square_search(const MACROBLOCK *x,
{0, 1024}, {-1024, 1024}, {-1024, 0}}, {0, 1024}, {-1024, 1024}, {-1024, 0}},
}; };
return vp9_pattern_search(x, ref_mv, search_param, sad_per_bit, return vp9_pattern_search(x, ref_mv, search_param, sad_per_bit,
do_init_search, 0, vfp, use_mvcost, do_init_search, sad_list, vfp, use_mvcost,
center_mv, best_mv, center_mv, best_mv,
square_num_candidates, square_candidates); square_num_candidates, square_candidates);
} }
...@@ -750,12 +837,13 @@ int vp9_fast_hex_search(const MACROBLOCK *x, ...@@ -750,12 +837,13 @@ int vp9_fast_hex_search(const MACROBLOCK *x,
int search_param, int search_param,
int sad_per_bit, int sad_per_bit,
int do_init_search, // must be zero for fast_hex int do_init_search, // must be zero for fast_hex
int *sad_list,
const vp9_variance_fn_ptr_t *vfp, const vp9_variance_fn_ptr_t *vfp,
int use_mvcost, int use_mvcost,
const MV *center_mv, const MV *center_mv,
MV *best_mv) { MV *best_mv) {
return vp9_hex_search(x, ref_mv, MAX(MAX_MVSEARCH_STEPS - 2, search_param), return vp9_hex_search(x, ref_mv, MAX(MAX_MVSEARCH_STEPS - 2, search_param),
sad_per_bit, do_init_search, vfp, use_mvcost, sad_per_bit, do_init_search, sad_list, vfp, use_mvcost,
center_mv, best_mv); center_mv, best_mv);
} }
...@@ -764,13 +852,14 @@ int vp9_fast_dia_search(const MACROBLOCK *x, ...@@ -764,13 +852,14 @@ int vp9_fast_dia_search(const MACROBLOCK *x,
int search_param, int search_param,
int sad_per_bit, int sad_per_bit,
int do_init_search, int do_init_search,
int *sad_list,
const vp9_variance_fn_ptr_t *vfp, const vp9_variance_fn_ptr_t *vfp,
int use_mvcost, int use_mvcost,
const MV *center_mv, const MV *center_mv,
MV *best_mv) { MV *best_mv) {
return vp9_bigdia_search(x, ref_mv, MAX(MAX_MVSEARCH_STEPS - 2, search_param), return vp9_bigdia_search(x, ref_mv, MAX(MAX_MVSEARCH_STEPS - 2, search_param),
sad_per_bit, do_init_search, vfp, use_mvcost, sad_per_bit, do_init_search, sad_list, vfp,
center_mv, best_mv); use_mvcost, center_mv, best_mv);
} }
#undef CHECK_BETTER #undef CHECK_BETTER
...@@ -1368,33 +1457,41 @@ int vp9_refining_search_8p_c(const MACROBLOCK *x, ...@@ -1368,33 +1457,41 @@ int vp9_refining_search_8p_c(const MACROBLOCK *x,
int vp9_full_pixel_search(VP9_COMP *cpi, MACROBLOCK *x, int vp9_full_pixel_search(VP9_COMP *cpi, MACROBLOCK *x,
BLOCK_SIZE bsize, MV *mvp_full, BLOCK_SIZE bsize, MV *mvp_full,
int step_param, int error_per_bit, int step_param, int error_per_bit,
int *sad_list,
const MV *ref_mv, MV *tmp_mv, const MV *ref_mv, MV *tmp_mv,
int var_max, int rd) { int var_max, int rd) {
const SPEED_FEATURES *const sf = &cpi->sf; const SPEED_FEATURES *const sf = &cpi->sf;
const SEARCH_METHODS method = sf->mv.search_method; const SEARCH_METHODS method = sf->mv.search_method;
vp9_variance_fn_ptr_t *fn_ptr = &cpi->fn_ptr[bsize]; vp9_variance_fn_ptr_t *fn_ptr = &cpi->fn_ptr[bsize];
int var = 0; int var = 0;
if (sad_list) {
sad_list[0] = INT_MAX;
sad_list[1] = INT_MAX;
sad_list[2] = INT_MAX;
sad_list[3] = INT_MAX;
sad_list[4] = INT_MAX;
}
switch (method) { switch (method) {
case FAST_DIAMOND: case FAST_DIAMOND:
var = vp9_fast_dia_search(x, mvp_full, step_param, error_per_bit, 0, var = vp9_fast_dia_search(x, mvp_full, step_param, error_per_bit, 0,
fn_ptr, 1, ref_mv, tmp_mv); sad_list, fn_ptr, 1, ref_mv, tmp_mv);
break; break;
case FAST_HEX: case FAST_HEX:
var = vp9_fast_hex_search(x, mvp_full, step_param, error_per_bit, 0, var = vp9_fast_hex_search(x, mvp_full, step_param, error_per_bit, 0,
fn_ptr, 1, ref_mv, tmp_mv); sad_list, fn_ptr, 1, ref_mv, tmp_mv);
break; break;
case HEX: case HEX:
var = vp9_hex_search(x, mvp_full, step_param, error_per_bit, 1, var = vp9_hex_search(x, mvp_full, step_param, error_per_bit, 1,
fn_ptr, 1, ref_mv, tmp_mv); sad_list, fn_ptr, 1, ref_mv, tmp_mv);
break; break;
case SQUARE: case SQUARE:
var = vp9_square_search(x, mvp_full, step_param, error_per_bit, 1, var = vp9_square_search(x, mvp_full, step_param, error_per_bit, 1,
fn_ptr, 1, ref_mv, tmp_mv); sad_list, fn_ptr, 1, ref_mv, tmp_mv);
break; break;
case BIGDIA: case BIGDIA:
var = vp9_bigdia_search(x, mvp_full, step_param, error_per_bit, 1, var = vp9_bigdia_search(x, mvp_full, step_param, error_per_bit, 1,
fn_ptr, 1, ref_mv, tmp_mv); sad_list, fn_ptr, 1, ref_mv, tmp_mv);
break; break;
case NSTEP: case NSTEP:
var = vp9_full_pixel_diamond(cpi, x, mvp_full, step_param, error_per_bit, var = vp9_full_pixel_diamond(cpi, x, mvp_full, step_param, error_per_bit,
......
...@@ -79,6 +79,7 @@ typedef int (integer_mv_pattern_search_fn) ( ...@@ -79,6 +79,7 @@ typedef int (integer_mv_pattern_search_fn) (
int search_param, int search_param,
int error_per_bit, int error_per_bit,
int do_init_search, int do_init_search,
int *sad_list,
const vp9_variance_fn_ptr_t *vf, const vp9_variance_fn_ptr_t *vf,
int use_mvcost, int use_mvcost,
const MV *center_mv, const MV *center_mv,
...@@ -98,12 +99,14 @@ typedef int (fractional_mv_step_fp) ( ...@@ -98,12 +99,14 @@ typedef int (fractional_mv_step_fp) (
const vp9_variance_fn_ptr_t *vfp, const vp9_variance_fn_ptr_t *vfp,
int forced_stop, // 0 - full, 1 - qtr only, 2 - half only int forced_stop, // 0 - full, 1 - qtr only, 2 - half only
int iters_per_step, int iters_per_step,
int *sad_list,
int *mvjcost, int *mvcost[2],