Merge "change to call vp9_refining_search_sad() directly"

This commit is contained in:
Yaowu Xu 2014-11-18 09:14:02 -08:00 committed by Gerrit Code Review
commit 550707b9e1
5 changed files with 12 additions and 12 deletions

View File

@ -1267,9 +1267,6 @@ specialize qw/vp9_full_search_sad sse3 sse4_1/;
$vp9_full_search_sad_sse3=vp9_full_search_sadx3;
$vp9_full_search_sad_sse4_1=vp9_full_search_sadx8;
add_proto qw/int vp9_refining_search_sad/, "const struct macroblock *x, struct mv *ref_mv, int sad_per_bit, int distance, const struct vp9_variance_vtable *fn_ptr, const struct mv *center_mv";
specialize qw/vp9_refining_search_sad/;
add_proto qw/int vp9_diamond_search_sad/, "const struct macroblock *x, const struct search_site_config *cfg, struct mv *ref_mv, struct mv *best_mv, int search_param, int sad_per_bit, int *num00, const struct vp9_variance_vtable *fn_ptr, const struct mv *center_mv";
specialize qw/vp9_diamond_search_sad/;

View File

@ -345,7 +345,6 @@ typedef struct VP9_COMP {
fractional_mv_step_fp *find_fractional_mv_step;
vp9_full_search_fn_t full_search_sad;
vp9_refining_search_fn_t refining_search_sad;
vp9_diamond_search_fn_t diamond_search_sad;
vp9_variance_fn_ptr_t fn_ptr[BLOCK_SIZES];
uint64_t time_receive_data;

View File

@ -1752,7 +1752,7 @@ int vp9_full_pixel_diamond(const VP9_COMP *cpi, MACROBLOCK *x,
if (do_refine) {
const int search_range = 8;
MV best_mv = *dst_mv;
thissme = cpi->refining_search_sad(x, &best_mv, sadpb, search_range,
thissme = vp9_refining_search_sad(x, &best_mv, sadpb, search_range,
fn_ptr, ref_mv);
if (thissme < INT_MAX)
thissme = vp9_get_mvpred_var(x, &best_mv, ref_mv, fn_ptr, 1);
@ -1956,11 +1956,11 @@ int vp9_full_search_sadx8(const MACROBLOCK *x, const MV *ref_mv,
return best_sad;
}
int vp9_refining_search_sad_c(const MACROBLOCK *x,
MV *ref_mv, int error_per_bit,
int search_range,
const vp9_variance_fn_ptr_t *fn_ptr,
const MV *center_mv) {
int vp9_refining_search_sad(const MACROBLOCK *x,
MV *ref_mv, int error_per_bit,
int search_range,
const vp9_variance_fn_ptr_t *fn_ptr,
const MV *center_mv) {
const MACROBLOCKD *const xd = &x->e_mbd;
const MV neighbors[4] = {{ -1, 0}, {0, -1}, {0, 1}, {1, 0}};
const struct buf_2d *const what = &x->plane[0].src;

View File

@ -66,6 +66,12 @@ struct SPEED_FEATURES;
int vp9_init_search_range(int size);
int vp9_refining_search_sad(const struct macroblock *x,
struct mv *ref_mv,
int sad_per_bit, int distance,
const struct vp9_variance_vtable *fn_ptr,
const struct mv *center_mv);
// Runs sequence of diamond searches in smaller steps for RD
int vp9_full_pixel_diamond(const struct VP9_COMP *cpi, MACROBLOCK *x,
MV *mvp_full, int step_param,

View File

@ -458,8 +458,6 @@ void vp9_set_speed_features_framesize_independent(VP9_COMP *cpi) {
cpi->full_search_sad = vp9_full_search_sad;
cpi->diamond_search_sad = oxcf->mode == BEST ? vp9_full_range_search
: vp9_diamond_search_sad;
cpi->refining_search_sad = vp9_refining_search_sad;
// Slow quant, dct and trellis not worthwhile for first pass
// so make sure they are always turned off.