summaryrefslogtreecommitdiff
path: root/vp9
diff options
context:
space:
mode:
authorJingning Han <jingning@google.com>2014-07-22 11:32:17 -0700
committerJingning Han <jingning@google.com>2014-07-22 11:35:59 -0700
commit5de6114e8fc708b8230f75745e0c58aed7ac05ff (patch)
treefae069849f6bb7f57fabb7721647028a284554f1 /vp9
parentffd948bbd527e7491d0e9f240251eb3f86fd7aa4 (diff)
downloadlibvpx-5de6114e8fc708b8230f75745e0c58aed7ac05ff.tar
libvpx-5de6114e8fc708b8230f75745e0c58aed7ac05ff.tar.gz
libvpx-5de6114e8fc708b8230f75745e0c58aed7ac05ff.tar.bz2
libvpx-5de6114e8fc708b8230f75745e0c58aed7ac05ff.zip
USE local best_filter variable in handle_inter_mode
This should be a local variable. Move the definition from vp9_rd_pick_inter_mode_sb to handle_inter_mode. Change-Id: I14f4168bb1c896ed04e8f6d4cd89fbf4c9839944
Diffstat (limited to 'vp9')
-rw-r--r--vp9/encoder/vp9_rdopt.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/vp9/encoder/vp9_rdopt.c b/vp9/encoder/vp9_rdopt.c
index eae469dab..cdc79345b 100644
--- a/vp9/encoder/vp9_rdopt.c
+++ b/vp9/encoder/vp9_rdopt.c
@@ -2014,7 +2014,6 @@ static int64_t handle_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
int *rate_y, int64_t *distortion_y,
int *rate_uv, int64_t *distortion_uv,
int *mode_excluded, int *disable_skip,
- INTERP_FILTER *best_filter,
int_mv (*mode_mv)[MAX_REF_FRAMES],
int mi_row, int mi_col,
int_mv single_newmv[MAX_REF_FRAMES],
@@ -2041,6 +2040,7 @@ static int64_t handle_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
uint8_t *orig_dst[MAX_MB_PLANE];
int orig_dst_stride[MAX_MB_PLANE];
int rs = 0;
+ INTERP_FILTER best_filter = cm->interp_filter;
if (is_comp_pred) {
if (frame_mv[refs[0]].as_int == INVALID_MV ||
@@ -2124,9 +2124,9 @@ static int64_t handle_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
rd_opt->filter_cache[i] = INT64_MAX;
if (cm->interp_filter != BILINEAR) {
- *best_filter = EIGHTTAP;
+ best_filter = EIGHTTAP;
if (x->source_variance < cpi->sf.disable_filter_search_var_thresh) {
- *best_filter = EIGHTTAP;
+ best_filter = EIGHTTAP;
} else {
int newbest;
int tmp_rate_sum = 0;
@@ -2189,7 +2189,7 @@ static int64_t handle_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
if (newbest) {
best_rd = rd;
- *best_filter = mbmi->interp_filter;
+ best_filter = mbmi->interp_filter;
if (cm->interp_filter == SWITCHABLE && i && !intpel_mv)
best_needs_copy = !best_needs_copy;
}
@@ -2205,7 +2205,7 @@ static int64_t handle_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
}
// Set the appropriate filter
mbmi->interp_filter = cm->interp_filter != SWITCHABLE ?
- cm->interp_filter : *best_filter;
+ cm->interp_filter : best_filter;
rs = cm->interp_filter == SWITCHABLE ? vp9_get_switchable_rate(cpi) : 0;
if (pred_exists) {
@@ -2480,7 +2480,6 @@ int64_t vp9_rd_pick_inter_mode_sb(VP9_COMP *cpi, MACROBLOCK *x,
int64_t best_inter_rd = INT64_MAX;
PREDICTION_MODE best_intra_mode = DC_PRED;
MV_REFERENCE_FRAME best_inter_ref_frame = LAST_FRAME;
- INTERP_FILTER tmp_best_filter = SWITCHABLE;
int rate_uv_intra[TX_SIZES], rate_uv_tokenonly[TX_SIZES];
int64_t dist_uv[TX_SIZES];
int skip_uv[TX_SIZES];
@@ -2743,8 +2742,7 @@ int64_t vp9_rd_pick_inter_mode_sb(VP9_COMP *cpi, MACROBLOCK *x,
&rate2, &distortion2, &skippable,
&rate_y, &distortion_y,
&rate_uv, &distortion_uv,
- &mode_excluded, &disable_skip,
- &tmp_best_filter, frame_mv,
+ &mode_excluded, &disable_skip, frame_mv,
mi_row, mi_col,
single_newmv, &total_sse, best_rd);
if (this_rd == INT64_MAX)