diff options
author | Dmitry Kovalev <dkovalev@google.com> | 2014-02-25 10:51:17 -0800 |
---|---|---|
committer | Gerrit Code Review <gerrit@gerrit.golo.chromium.org> | 2014-02-25 10:51:17 -0800 |
commit | 7bca32a6a37c3ece2e5d30fcb393b9ea58139594 (patch) | |
tree | 07498a0901dab03e7fbc879f056340b3f98ad3cb /vp9/encoder | |
parent | 55214924ac5479c632cdcea78205f47c7fff9aa8 (diff) | |
parent | 36420009ea3a3e462051084bf712ba51952b0d4e (diff) | |
download | libvpx-7bca32a6a37c3ece2e5d30fcb393b9ea58139594.tar libvpx-7bca32a6a37c3ece2e5d30fcb393b9ea58139594.tar.gz libvpx-7bca32a6a37c3ece2e5d30fcb393b9ea58139594.tar.bz2 libvpx-7bca32a6a37c3ece2e5d30fcb393b9ea58139594.zip |
Merge "Changing vp9_full_search_sad{, x3, x8} signatures."
Diffstat (limited to 'vp9/encoder')
-rw-r--r-- | vp9/encoder/vp9_mcomp.c | 9 | ||||
-rw-r--r-- | vp9/encoder/vp9_mcomp.h | 2 | ||||
-rw-r--r-- | vp9/encoder/vp9_rdopt.c | 14 |
3 files changed, 11 insertions, 14 deletions
diff --git a/vp9/encoder/vp9_mcomp.c b/vp9/encoder/vp9_mcomp.c index f18f55042..7d6fd3b99 100644 --- a/vp9/encoder/vp9_mcomp.c +++ b/vp9/encoder/vp9_mcomp.c @@ -1525,7 +1525,7 @@ int vp9_full_search_sad_c(const MACROBLOCK *x, const MV *ref_mv, int sad_per_bit, int distance, const vp9_variance_fn_ptr_t *fn_ptr, int *mvjcost, int *mvcost[2], - const MV *center_mv, int block) { + const MV *center_mv, MV *best_mv) { int r, c; const MACROBLOCKD *const xd = &x->e_mbd; const uint8_t *const what = x->plane[0].src.buf; @@ -1544,7 +1544,6 @@ int vp9_full_search_sad_c(const MACROBLOCK *x, const MV *ref_mv, int best_sad = fn_ptr->sdf(what, what_stride, best_address, in_what_stride, 0x7fffffff) + mvsad_err_cost(ref_mv, &fcenter_mv, mvjsadcost, mvsadcost, sad_per_bit); - MV *best_mv = &xd->mi_8x8[0]->bmi[block].as_mv[0].as_mv; *best_mv = *ref_mv; for (r = row_min; r < row_max; ++r) { @@ -1578,13 +1577,12 @@ int vp9_full_search_sadx3(const MACROBLOCK *x, const MV *ref_mv, int sad_per_bit, int distance, const vp9_variance_fn_ptr_t *fn_ptr, int *mvjcost, int *mvcost[2], - const MV *center_mv, int n) { + const MV *center_mv, MV *best_mv) { const MACROBLOCKD *const xd = &x->e_mbd; const uint8_t *const what = x->plane[0].src.buf; const int what_stride = x->plane[0].src.stride; const uint8_t *const in_what = xd->plane[0].pre[0].buf; const int in_what_stride = xd->plane[0].pre[0].stride; - MV *best_mv = &xd->mi_8x8[0]->bmi[n].as_mv[0].as_mv; MV this_mv; unsigned int bestsad = INT_MAX; int r, c; @@ -1684,13 +1682,12 @@ int vp9_full_search_sadx8(const MACROBLOCK *x, const MV *ref_mv, int sad_per_bit, int distance, const vp9_variance_fn_ptr_t *fn_ptr, int *mvjcost, int *mvcost[2], - const MV *center_mv, int n) { + const MV *center_mv, MV *best_mv) { const MACROBLOCKD *const xd = &x->e_mbd; const uint8_t *const what = x->plane[0].src.buf; const int what_stride = x->plane[0].src.stride; const uint8_t *const in_what = xd->plane[0].pre[0].buf; const int in_what_stride = xd->plane[0].pre[0].stride; - MV *best_mv = &xd->mi_8x8[0]->bmi[n].as_mv[0].as_mv; MV this_mv; unsigned int bestsad = INT_MAX; int r, c; diff --git a/vp9/encoder/vp9_mcomp.h b/vp9/encoder/vp9_mcomp.h index ff4b1df75..586a74c9c 100644 --- a/vp9/encoder/vp9_mcomp.h +++ b/vp9/encoder/vp9_mcomp.h @@ -119,7 +119,7 @@ typedef int (*vp9_full_search_fn_t)(const MACROBLOCK *x, int distance, const vp9_variance_fn_ptr_t *fn_ptr, int *mvjcost, int *mvcost[2], - const MV *center_mv, int n); + const MV *center_mv, MV *best_mv); typedef int (*vp9_refining_search_fn_t)(const MACROBLOCK *x, MV *ref_mv, int sad_per_bit, diff --git a/vp9/encoder/vp9_rdopt.c b/vp9/encoder/vp9_rdopt.c index 376224e5a..0c5873376 100644 --- a/vp9/encoder/vp9_rdopt.c +++ b/vp9/encoder/vp9_rdopt.c @@ -1851,22 +1851,22 @@ static void rd_check_segment_txsize(VP9_COMP *cpi, MACROBLOCK *x, // Should we do a full search (best quality only) if (cpi->oxcf.mode == MODE_BESTQUALITY || cpi->oxcf.mode == MODE_SECONDPASS_BEST) { + int_mv *const best_mv = &mi->bmi[i].as_mv[0]; /* Check if mvp_full is within the range. */ clamp_mv(&mvp_full, x->mv_col_min, x->mv_col_max, x->mv_row_min, x->mv_row_max); - thissme = cpi->full_search_sad(x, &mvp_full, sadpb, 16, v_fn_ptr, x->nmvjointcost, x->mvcost, - &bsi->ref_mv->as_mv, i); - + &bsi->ref_mv->as_mv, + &best_mv->as_mv); if (thissme < bestsme) { bestsme = thissme; - new_mv->as_int = mi->bmi[i].as_mv[0].as_int; + new_mv->as_int = best_mv->as_int; } else { - /* The full search result is actually worse so re-instate the - * previous best vector */ - mi->bmi[i].as_mv[0].as_int = new_mv->as_int; + // The full search result is actually worse so re-instate the + // previous best vector + best_mv->as_int = new_mv->as_int; } } |