Rename variables to distinguish skip_mode and skip_txfm
BUG=aomedia:2618
Change-Id: If5804bb529ee3b61ae9d8988afd534b1765fe9a5
diff --git a/av1/encoder/nonrd_pickmode.c b/av1/encoder/nonrd_pickmode.c
index b56193e..2882974 100644
--- a/av1/encoder/nonrd_pickmode.c
+++ b/av1/encoder/nonrd_pickmode.c
@@ -837,7 +837,7 @@
block += step;
}
}
- this_rdc->skip = *skippable;
+ this_rdc->skip_txfm = *skippable;
this_rdc->rate = 0;
if (*sse < INT64_MAX) {
*sse = (*sse << 6) >> 2;
@@ -920,16 +920,16 @@
// Take a snapshot of the coding context so it can be
// restored if we decide to encode this way
- ctx->rd_stats.skip = x->force_skip;
+ ctx->rd_stats.skip_txfm = x->skip_txfm;
memset(ctx->blk_skip, 0, sizeof(ctx->blk_skip[0]) * ctx->num_4x4_blk);
memset(ctx->tx_type_map, DCT_DCT,
sizeof(ctx->tx_type_map[0]) * ctx->num_4x4_blk);
- ctx->skippable = x->force_skip;
+ ctx->skippable = x->skip_txfm;
#if CONFIG_INTERNAL_STATS
ctx->best_mode_index = mode_index;
#endif // CONFIG_INTERNAL_STATS
ctx->mic = *xd->mi[0];
- ctx->skippable = x->force_skip;
+ ctx->skippable = x->skip_txfm;
av1_copy_mbmi_ext_to_mbmi_ext_frame(&ctx->mbmi_ext_best, x->mbmi_ext,
av1_ref_frame_type(xd->mi[0]->ref_frame));
ctx->comp_pred_diff = 0;
@@ -1052,7 +1052,7 @@
this_rdc->rate = 0;
this_rdc->dist = 0;
- this_rdc->skip = 0;
+ this_rdc->skip_txfm = 0;
for (i = start_plane; i <= stop_plane; ++i) {
struct macroblock_plane *const p = &x->plane[i];
@@ -1083,14 +1083,14 @@
}
if (this_rdc->rate == 0) {
- this_rdc->skip = 1;
+ this_rdc->skip_txfm = 1;
}
if (RDCOST(x->rdmult, this_rdc->rate, this_rdc->dist) >=
RDCOST(x->rdmult, 0, ((int64_t)tot_sse) << 4)) {
this_rdc->rate = 0;
this_rdc->dist = tot_sse << 4;
- this_rdc->skip = 1;
+ this_rdc->skip_txfm = 1;
}
*var_y = tot_var;
@@ -1353,7 +1353,7 @@
*var_y = pf_var[best_filter_index];
*sse_y = pf_sse[best_filter_index];
*sse_block_yrd = pf_sse_block_yrd[best_filter_index];
- this_rdc->skip = (best_skip || best_early_term);
+ this_rdc->skip_txfm = (best_skip || best_early_term);
*this_early_term = best_early_term;
if (reuse_inter_pred) {
pd->dst.buf = (*this_mode_pred)->data;
@@ -1452,9 +1452,9 @@
av1_foreach_transformed_block_in_plane(xd, bsize, 0, estimate_block_intra,
&args);
if (args.skippable) {
- this_rdc.rate = av1_cost_symbol(av1_get_skip_cdf(xd)[1]);
+ this_rdc.rate = av1_cost_symbol(av1_get_skip_txfm_cdf(xd)[1]);
} else {
- this_rdc.rate += av1_cost_symbol(av1_get_skip_cdf(xd)[0]);
+ this_rdc.rate += av1_cost_symbol(av1_get_skip_txfm_cdf(xd)[0]);
}
this_rdc.rate += bmode_costs[this_mode];
this_rdc.rdcost = RDCOST(x->rdmult, this_rdc.rate, this_rdc.dist);
@@ -1576,7 +1576,7 @@
tmp[3].in_use = 0;
}
- x->force_skip = 0;
+ x->skip_txfm = 0;
// Instead of using av1_get_pred_context_switchable_interp(xd) to assign
// filter_ref, we use a less strict condition on assigning filter_ref.
@@ -1848,7 +1848,7 @@
use_modeled_non_rd_cost);
} else {
model_rd_for_sb_y(cpi, bsize, x, xd, &this_rdc.rate, &this_rdc.dist,
- &this_rdc.skip, NULL, &var_y, &sse_y,
+ &this_rdc.skip_txfm, NULL, &var_y, &sse_y,
use_modeled_non_rd_cost);
}
}
@@ -1858,38 +1858,38 @@
sse_y >> (b_width_log2_lookup[bsize] + b_height_log2_lookup[bsize]);
}
- const int skip_ctx = av1_get_skip_context(xd);
- const int skip_cost = x->skip_cost[skip_ctx][1];
- const int no_skip_cost = x->skip_cost[skip_ctx][0];
+ const int skip_ctx = av1_get_skip_txfm_context(xd);
+ const int skip_txfm_cost = x->skip_txfm_cost[skip_ctx][1];
+ const int no_skip_txfm_cost = x->skip_txfm_cost[skip_ctx][0];
if (!this_early_term) {
if (use_modeled_non_rd_cost) {
- if (this_rdc.skip) {
- this_rdc.rate = skip_cost;
+ if (this_rdc.skip_txfm) {
+ this_rdc.rate = skip_txfm_cost;
} else {
- this_rdc.rate += no_skip_cost;
+ this_rdc.rate += no_skip_txfm_cost;
}
} else {
this_sse = (int64_t)sse_y;
block_yrd(cpi, x, mi_row, mi_col, &this_rdc, &is_skippable, &this_sse,
bsize, mi->tx_size);
- if (this_rdc.skip) {
- this_rdc.rate = skip_cost;
+ if (this_rdc.skip_txfm) {
+ this_rdc.rate = skip_txfm_cost;
} else {
if (RDCOST(x->rdmult, this_rdc.rate, this_rdc.dist) >=
RDCOST(x->rdmult, 0,
this_sse)) { // this_sse already multiplied by 16 in
// block_yrd
- this_rdc.skip = 1;
- this_rdc.rate = skip_cost;
+ this_rdc.skip_txfm = 1;
+ this_rdc.rate = skip_txfm_cost;
this_rdc.dist = this_sse;
} else {
- this_rdc.rate += no_skip_cost;
+ this_rdc.rate += no_skip_txfm_cost;
}
}
}
} else {
- this_rdc.skip = 1;
- this_rdc.rate = skip_cost;
+ this_rdc.skip_txfm = 1;
+ this_rdc.rate = skip_txfm_cost;
this_rdc.dist = sse_y << 4;
}
@@ -1909,7 +1909,7 @@
model_rd_for_sb_uv(cpi, uv_bsize, x, xd, &rdc_uv, &var_y, &sse_y, 1, 2);
this_rdc.rate += rdc_uv.rate;
this_rdc.dist += rdc_uv.dist;
- this_rdc.skip = this_rdc.skip && rdc_uv.skip;
+ this_rdc.skip_txfm = this_rdc.skip_txfm && rdc_uv.skip_txfm;
}
// TODO(kyslov) account for UV prediction cost
@@ -1941,7 +1941,7 @@
best_pickmode.best_pred_filter = mi->interp_filters;
best_pickmode.best_tx_size = mi->tx_size;
best_pickmode.best_ref_frame = ref_frame;
- best_pickmode.best_mode_skip_txfm = this_rdc.skip;
+ best_pickmode.best_mode_skip_txfm = this_rdc.skip_txfm;
best_pickmode.best_second_ref_frame = second_ref_frame;
if (reuse_inter_pred) {
free_pred_buffer(best_pickmode.best_pred);
@@ -1951,7 +1951,7 @@
if (reuse_inter_pred) free_pred_buffer(this_mode_pred);
}
if (best_early_term && idx > 0) {
- x->force_skip = 1;
+ x->skip_txfm = 1;
break;
}
}
@@ -1964,7 +1964,7 @@
mi->mv[0].as_int =
frame_mv[best_pickmode.best_mode][best_pickmode.best_ref_frame].as_int;
mi->ref_frame[1] = best_pickmode.best_second_ref_frame;
- x->force_skip = best_rdc.skip;
+ x->skip_txfm = best_rdc.skip_txfm;
// Perform intra prediction search, if the best SAD is above a certain
// threshold.
@@ -2053,7 +2053,7 @@
// Look into selecting tx_size here, based on prediction residual.
if (use_modeled_non_rd_cost)
model_rd_for_sb_y(cpi, bsize, x, xd, &this_rdc.rate, &this_rdc.dist,
- &this_rdc.skip, NULL, &var_y, &sse_y, 1);
+ &this_rdc.skip_txfm, NULL, &var_y, &sse_y, 1);
else
block_yrd(cpi, x, mi_row, mi_col, &this_rdc, &args.skippable, &this_sse,
bsize, mi->tx_size);