Commit 0a7b3953 authored by Ronald S. Bultje's avatar Ronald S. Bultje

Remove "update_context" variable from VP9_COMP context.

The variable is always zero.

Change-Id: Id5cdbecad543bca465a5b1d471badaec7e112c8d
parent bed59eb8
......@@ -781,8 +781,6 @@ static void pick_mb_modes(VP9_COMP *cpi,
mbmi = &xd->mode_info_context->mbmi;
mbmi->sb_type = BLOCK_SIZE_MB16X16;
cpi->update_context = 0; // TODO Do we need this now??
vp9_intra_prediction_down_copy(xd);
// Find best coding mode & reconstruct the MB so it is available
......@@ -865,7 +863,6 @@ static void pick_sb_modes(VP9_COMP *cpi,
xd->mode_info_context->mbmi.sb_type = BLOCK_SIZE_SB32X32;
if (cpi->oxcf.tuning == VP8_TUNE_SSIM)
vp9_activity_masking(cpi, x);
cpi->update_context = 0; // TODO Do we need this now??
/* Find best coding mode & reconstruct the MB so it is available
* as a predictor for MBs that follow in the SB */
......@@ -901,7 +898,6 @@ static void pick_sb64_modes(VP9_COMP *cpi,
xd->mode_info_context->mbmi.sb_type = BLOCK_SIZE_SB64X64;
if (cpi->oxcf.tuning == VP8_TUNE_SSIM)
vp9_activity_masking(cpi, x);
cpi->update_context = 0; // TODO(rbultje) Do we need this now??
/* Find best coding mode & reconstruct the MB so it is available
* as a predictor for MBs that follow in the SB */
......
......@@ -688,9 +688,6 @@ typedef struct VP9_COMP {
int droppable;
// TODO Do we still need this??
int update_context;
int dummy_packing; /* flag to indicate if packing is dummy */
unsigned int switchable_interp_count[VP9_SWITCHABLE_FILTERS + 1]
......
......@@ -1179,8 +1179,7 @@ static int64_t rd_pick_intra4x4block(VP9_COMP *cpi, MACROBLOCK *x, BLOCK *be,
static int64_t rd_pick_intra4x4mby_modes(VP9_COMP *cpi, MACROBLOCK *mb,
int *Rate, int *rate_y,
int *Distortion, int64_t best_rd,
int update_contexts) {
int *Distortion, int64_t best_rd) {
int i;
MACROBLOCKD *const xd = &mb->e_mbd;
int cost = mb->mbmode_cost [xd->frame_type] [B_PRED];
......@@ -1191,18 +1190,13 @@ static int64_t rd_pick_intra4x4mby_modes(VP9_COMP *cpi, MACROBLOCK *mb,
ENTROPY_CONTEXT *ta, *tl;
int *bmode_costs;
if (update_contexts) {
ta = (ENTROPY_CONTEXT *)xd->above_context;
tl = (ENTROPY_CONTEXT *)xd->left_context;
} else {
vpx_memcpy(&t_above, xd->above_context,
sizeof(ENTROPY_CONTEXT_PLANES));
vpx_memcpy(&t_left, xd->left_context,
sizeof(ENTROPY_CONTEXT_PLANES));
vpx_memcpy(&t_above, xd->above_context,
sizeof(ENTROPY_CONTEXT_PLANES));
vpx_memcpy(&t_left, xd->left_context,
sizeof(ENTROPY_CONTEXT_PLANES));
ta = (ENTROPY_CONTEXT *)&t_above;
tl = (ENTROPY_CONTEXT *)&t_left;
}
ta = (ENTROPY_CONTEXT *)&t_above;
tl = (ENTROPY_CONTEXT *)&t_left;
xd->mode_info_context->mbmi.mode = B_PRED;
bmode_costs = mb->inter_bmode_costs;
......@@ -3798,8 +3792,7 @@ static void rd_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
// the BPRED mode : x->mbmode_cost[xd->frame_type][BPRED];
mbmi->txfm_size = TX_4X4;
tmp_rd = rd_pick_intra4x4mby_modes(cpi, x, &rate, &rate_y,
&distortion, best_yrd,
cpi->update_context);
&distortion, best_yrd);
rate2 += rate;
rate2 += intra_cost_penalty;
distortion2 += distortion;
......@@ -4394,8 +4387,7 @@ void vp9_rd_pick_intra_mode(VP9_COMP *cpi, MACROBLOCK *x,
error4x4 = rd_pick_intra4x4mby_modes(cpi, x,
&rate4x4, &rate4x4_tokenonly,
&dist4x4, error16x16,
cpi->update_context);
&dist4x4, error16x16);
mbmi->mb_skip_coeff = 0;
if (cpi->common.mb_no_coeff_skip &&
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment