if (!x->skip_recode) {
if (x->quant_fp) {
// Encoding process for rtc mode
- if (x->skip_txfm[0] == 1 && plane == 0) {
+ if (x->skip_txfm[0] == SKIP_TXFM_AC_DC && plane == 0) {
// skip forward transform
p->eobs[block] = 0;
*a = *l = 0;
} else {
if (max_txsize_lookup[plane_bsize] == tx_size) {
int txfm_blk_index = (plane << 2) + (block >> (tx_size << 1));
- if (x->skip_txfm[txfm_blk_index] == 0) {
+ if (x->skip_txfm[txfm_blk_index] == SKIP_TXFM_NONE) {
// full forward transform and quantization
vp9_xform_quant(x, plane, block, plane_bsize, tx_size);
- } else if (x->skip_txfm[txfm_blk_index]== 2) {
+ } else if (x->skip_txfm[txfm_blk_index] == SKIP_TXFM_AC_ONLY) {
// fast path forward transform and quantization
vp9_xform_quant_dc(x, plane, block, plane_bsize, tx_size);
} else {
sse32x32, sum32x32);
// Skipping test
- x->skip_txfm[0] = 0;
+ x->skip_txfm[0] = SKIP_TXFM_NONE;
for (k = 0; k < num; k++)
// Check if all ac coefficients can be quantized to zero.
if (!(var_tx[k] < ac_thr || var == 0)) {
}
if (ac_test) {
- x->skip_txfm[0] = 2;
+ x->skip_txfm[0] = SKIP_TXFM_AC_ONLY;
if (dc_test)
- x->skip_txfm[0] = 1;
+ x->skip_txfm[0] = SKIP_TXFM_AC_DC;
} else if (dc_test) {
skip_dc = 1;
}
}
- if (x->skip_txfm[0] == 1) {
+ if (x->skip_txfm[0] == SKIP_TXFM_AC_DC) {
int skip_uv[2] = {0};
unsigned int var_uv[2];
unsigned int sse_uv[2];
const unsigned int sse_tx = sse >> num_blk_log2;
const unsigned int var_tx = var >> num_blk_log2;
- x->skip_txfm[0] = 0;
+ x->skip_txfm[0] = SKIP_TXFM_NONE;
// Check if all ac coefficients can be quantized to zero.
if (var_tx < ac_thr || var == 0) {
- x->skip_txfm[0] = 2;
+ x->skip_txfm[0] = SKIP_TXFM_AC_ONLY;
// Check if dc coefficient can be quantized to zero.
if (sse_tx - var_tx < dc_thr || sse == var)
- x->skip_txfm[0] = 1;
+ x->skip_txfm[0] = SKIP_TXFM_AC_DC;
} else {
if (sse_tx - var_tx < dc_thr || sse == var)
skip_dc = 1;
}
}
- if (x->skip_txfm[0] == 1) {
+ if (x->skip_txfm[0] == SKIP_TXFM_AC_DC) {
*out_rate_sum = 0;
*out_dist_sum = sse << 4;
return;
static const int flag_list[4] = { 0, VP9_LAST_FLAG, VP9_GOLD_FLAG,
VP9_ALT_FLAG };
RD_COST this_rdc, best_rdc;
- uint8_t skip_txfm = 0, best_mode_skip_txfm = 0;
+ uint8_t skip_txfm = SKIP_TXFM_NONE, best_mode_skip_txfm = SKIP_TXFM_NONE;
// var_y and sse_y are saved to be used in skipping checking
unsigned int var_y = UINT_MAX;
unsigned int sse_y = UINT_MAX;
} else {
this_rdc.rate = vp9_cost_bit(vp9_get_skip_prob(cm, xd), 1);
this_rdc.dist = this_sse;
- x->skip_txfm[0] = 1;
+ x->skip_txfm[0] = SKIP_TXFM_AC_DC;
}
}
mbmi->mode = xd->mi[0]->bmi[3].as_mode;
ctx->mic = *(xd->mi[0]);
ctx->mbmi_ext = *x->mbmi_ext;
- ctx->skip_txfm[0] = 0;
+ ctx->skip_txfm[0] = SKIP_TXFM_NONE;
ctx->skip = 0;
// Dummy assignment for speed -5. No effect in speed -6.
rd_cost->rdcost = best_rd;
x->bsse[(i << 2) + block_idx] = sse;
sum_sse += sse;
- x->skip_txfm[(i << 2) + block_idx] = 0;
+ x->skip_txfm[(i << 2) + block_idx] = SKIP_TXFM_NONE;
if (!x->select_tx_size) {
// Check if all ac coefficients can be quantized to zero.
if (var < ac_thr || var == 0) {
- x->skip_txfm[(i << 2) + block_idx] = 2;
+ x->skip_txfm[(i << 2) + block_idx] = SKIP_TXFM_AC_ONLY;
// Check if dc coefficient can be quantized to zero.
if (sse - var < dc_thr || sse == var) {
- x->skip_txfm[(i << 2) + block_idx] = 1;
+ x->skip_txfm[(i << 2) + block_idx] = SKIP_TXFM_AC_DC;
if (!sse || (var < low_ac_thr && sse - var < low_dc_thr))
low_err_skip = 1;
dist_block(x, plane, block, tx_size, &dist, &sse);
#endif // CONFIG_VP9_HIGHBITDEPTH
} else if (max_txsize_lookup[plane_bsize] == tx_size) {
- if (x->skip_txfm[(plane << 2) + (block >> (tx_size << 1))] == 0) {
+ if (x->skip_txfm[(plane << 2) + (block >> (tx_size << 1))] ==
+ SKIP_TXFM_NONE) {
// full forward transform and quantization
vp9_xform_quant(x, plane, block, plane_bsize, tx_size);
#if CONFIG_VP9_HIGHBITDEPTH
#else
dist_block(x, plane, block, tx_size, &dist, &sse);
#endif // CONFIG_VP9_HIGHBITDEPTH
- } else if (x->skip_txfm[(plane << 2) + (block >> (tx_size << 1))] == 2) {
+ } else if (x->skip_txfm[(plane << 2) + (block >> (tx_size << 1))] ==
+ SKIP_TXFM_AC_ONLY) {
// compute DC coefficient
tran_low_t *const coeff = BLOCK_OFFSET(x->plane[plane].coeff, block);
tran_low_t *const dqcoeff = BLOCK_OFFSET(xd->plane[plane].dqcoeff, block);
dist = MAX(0, sse - dc_correct);
}
} else {
+ // SKIP_TXFM_AC_DC
// skip forward transform
x->plane[plane].eobs[block] = 0;
sse = x->bsse[(plane << 2) + (block >> (tx_size << 1))] << 4;
const PREDICTION_MODE L = vp9_left_block_mode(mic, left_mi, 0);
bmode_costs = cpi->y_mode_costs[A][L];
- memset(x->skip_txfm, 0, sizeof(x->skip_txfm));
+ memset(x->skip_txfm, SKIP_TXFM_NONE, sizeof(x->skip_txfm));
/* Y Search for intra prediction mode */
for (mode = DC_PRED; mode <= TM_PRED; mode++) {
int this_rate_tokenonly, this_rate, s;
int64_t this_distortion, this_sse;
- memset(x->skip_txfm, 0, sizeof(x->skip_txfm));
+ memset(x->skip_txfm, SKIP_TXFM_NONE, sizeof(x->skip_txfm));
for (mode = DC_PRED; mode <= TM_PRED; ++mode) {
if (!(cpi->sf.intra_uv_mode_mask[max_tx_size] & (1 << mode)))
continue;
int64_t unused;
x->e_mbd.mi[0]->mbmi.uv_mode = DC_PRED;
- memset(x->skip_txfm, 0, sizeof(x->skip_txfm));
+ memset(x->skip_txfm, SKIP_TXFM_NONE, sizeof(x->skip_txfm));
super_block_uvrd(cpi, x, rate_tokenonly, distortion,
skippable, &unused, bsize, INT64_MAX);
*rate = *rate_tokenonly + cpi->intra_uv_mode_cost[cm->frame_type][DC_PRED];
if (is_comp_pred)
if (single_skippable[this_mode][refs[0]] &&
single_skippable[this_mode][refs[1]])
- memset(skip_txfm, 1, sizeof(skip_txfm));
+ memset(skip_txfm, SKIP_TXFM_AC_DC, sizeof(skip_txfm));
if (cpi->sf.use_rd_breakout && ref_best_rd < INT64_MAX) {
// if current pred_error modeled rd is substantially more than the best
// then dont bother looking at UV
vp9_build_inter_predictors_sbuv(&x->e_mbd, mi_row, mi_col,
BLOCK_8X8);
- memset(x->skip_txfm, 0, sizeof(x->skip_txfm));
+ memset(x->skip_txfm, SKIP_TXFM_NONE, sizeof(x->skip_txfm));
if (!super_block_uvrd(cpi, x, &rate_uv, &distortion_uv, &uv_skippable,
&uv_sse, BLOCK_8X8, tmp_best_rdu))
continue;