summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_rdopt.c
diff options
context:
space:
mode:
authorDmitry Kovalev <dkovalev@google.com>2014-01-07 09:56:41 -0800
committerGerrit Code Review <gerrit@gerrit.golo.chromium.org>2014-01-07 09:56:41 -0800
commit16f5607dfef1041e507a7f755a1f937b7cd52242 (patch)
tree10430f5997489a51ce9858bbd0283d5cb76e7970 /vp9/encoder/vp9_rdopt.c
parent7b496783c23e08b2440fe35c8a071947604c0668 (diff)
parentc015ba5f6ec63cc8d94c7487ecfe9eb9bc6ac2ff (diff)
downloadlibvpx-16f5607dfef1041e507a7f755a1f937b7cd52242.tar
libvpx-16f5607dfef1041e507a7f755a1f937b7cd52242.tar.gz
libvpx-16f5607dfef1041e507a7f755a1f937b7cd52242.tar.bz2
libvpx-16f5607dfef1041e507a7f755a1f937b7cd52242.zip
Merge "Adding new_mv local variable."
Diffstat (limited to 'vp9/encoder/vp9_rdopt.c')
-rw-r--r--vp9/encoder/vp9_rdopt.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/vp9/encoder/vp9_rdopt.c b/vp9/encoder/vp9_rdopt.c
index fe7b1385e..9c6765240 100644
--- a/vp9/encoder/vp9_rdopt.c
+++ b/vp9/encoder/vp9_rdopt.c
@@ -1748,6 +1748,7 @@ static void rd_check_segment_txsize(VP9_COMP *cpi, MACROBLOCK *x,
// motion search for newmv (single predictor case only)
if (!has_second_rf && this_mode == NEWMV &&
seg_mvs[i][mbmi->ref_frame[0]].as_int == INVALID_MV) {
+ int_mv *const new_mv = &mode_mv[NEWMV];
int step_param = 0;
int further_steps;
int thissme, bestsme = INT_MAX;
@@ -1803,24 +1804,24 @@ static void rd_check_segment_txsize(VP9_COMP *cpi, MACROBLOCK *x,
step_param,
sadpb, 1, v_fn_ptr, 1,
&bsi->ref_mv->as_mv,
- &mode_mv[NEWMV].as_mv);
+ &new_mv->as_mv);
} else if (cpi->sf.search_method == SQUARE) {
bestsme = vp9_square_search(x, &mvp_full,
step_param,
sadpb, 1, v_fn_ptr, 1,
&bsi->ref_mv->as_mv,
- &mode_mv[NEWMV].as_mv);
+ &new_mv->as_mv);
} else if (cpi->sf.search_method == BIGDIA) {
bestsme = vp9_bigdia_search(x, &mvp_full,
step_param,
sadpb, 1, v_fn_ptr, 1,
&bsi->ref_mv->as_mv,
- &mode_mv[NEWMV].as_mv);
+ &new_mv->as_mv);
} else {
bestsme = vp9_full_pixel_diamond(cpi, x, &mvp_full, step_param,
sadpb, further_steps, 0, v_fn_ptr,
&bsi->ref_mv->as_mv,
- &mode_mv[NEWMV]);
+ new_mv);
}
// Should we do a full search (best quality only)
@@ -1836,18 +1837,18 @@ static void rd_check_segment_txsize(VP9_COMP *cpi, MACROBLOCK *x,
if (thissme < bestsme) {
bestsme = thissme;
- mode_mv[NEWMV].as_int = mi->bmi[i].as_mv[0].as_int;
+ new_mv->as_int = mi->bmi[i].as_mv[0].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 = mode_mv[NEWMV].as_int;
+ mi->bmi[i].as_mv[0].as_int = new_mv->as_int;
}
}
if (bestsme < INT_MAX) {
int distortion;
cpi->find_fractional_mv_step(x,
- &mode_mv[NEWMV].as_mv,
+ &new_mv->as_mv,
&bsi->ref_mv->as_mv,
cm->allow_high_precision_mv,
x->errorperbit, v_fn_ptr,
@@ -1857,11 +1858,11 @@ static void rd_check_segment_txsize(VP9_COMP *cpi, MACROBLOCK *x,
&x->pred_sse[mbmi->ref_frame[0]]);
// save motion search result for use in compound prediction
- seg_mvs[i][mbmi->ref_frame[0]].as_int = mode_mv[NEWMV].as_int;
+ seg_mvs[i][mbmi->ref_frame[0]].as_int = new_mv->as_int;
}
if (cpi->sf.adaptive_motion_search)
- x->pred_mv[mbmi->ref_frame[0]].as_int = mode_mv[NEWMV].as_int;
+ x->pred_mv[mbmi->ref_frame[0]].as_int = new_mv->as_int;
// restore src pointers
mi_buf_restore(x, orig_src, orig_pre);