// indicate if it is in the rd search loop or encoding process
int use_lp32x32fdct;
- int skip_encode;
// use fast quantization process
int quant_fp;
return cpi->common.tx_mode;
}
-static int get_skip_encode_frame(const VP10_COMMON *cm, ThreadData *const td) {
- unsigned int intra_count = 0, inter_count = 0;
- int j;
-
- for (j = 0; j < INTRA_INTER_CONTEXTS; ++j) {
- intra_count += td->counts->intra_inter[j][0];
- inter_count += td->counts->intra_inter[j][1];
- }
-
- return (intra_count << 2) < inter_count &&
- cm->frame_type != KEY_FRAME &&
- cm->show_frame;
-}
-
void vp10_init_tile_data(VP10_COMP *cpi) {
VP10_COMMON *const cm = &cpi->common;
const int tile_cols = 1 << cm->log2_tile_cols;
#endif
static void encode_frame_internal(VP10_COMP *cpi) {
- SPEED_FEATURES *const sf = &cpi->sf;
ThreadData *const td = &cpi->td;
MACROBLOCK *const x = &td->mb;
VP10_COMMON *const cm = &cpi->common;
cpi->time_encode_sb_row += vpx_usec_timer_elapsed(&emr_timer);
}
- sf->skip_encode_frame = sf->skip_encode_sb ?
- get_skip_encode_frame(cm, td) : 0;
-
#if 0
// Keep record of the total distortion this time around for future use
cpi->last_frame_distortion = cpi->frame_distortion;
x->skip_optimize = ctx->is_coded;
ctx->is_coded = 1;
x->use_lp32x32fdct = cpi->sf.use_lp32x32fdct;
- x->skip_encode = (!output_enabled && cpi->sf.skip_encode_frame &&
- x->q_index < QIDX_SKIP_THRESH);
-
- if (x->skip_encode)
- return;
if (!is_inter_block(mbmi)) {
int plane;
if (p->eobs[block])
*(args->skip) = 0;
- if (x->skip_encode || p->eobs[block] == 0)
+ if (p->eobs[block] == 0)
return;
#if CONFIG_VP9_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
src_diff = &p->src_diff[4 * (j * diff_stride + i)];
mode = plane == 0 ? get_y_mode(xd->mi[0], block) : mbmi->uv_mode;
- vp10_predict_intra_block(xd, bwl, tx_size, mode, x->skip_encode ? src : dst,
- x->skip_encode ? src_stride : dst_stride,
+ vp10_predict_intra_block(xd, bwl, tx_size, mode, dst, dst_stride,
dst, dst_stride, i, j, plane);
#if CONFIG_VP9_HIGHBITDEPTH
pd->dequant, eob, scan_order->scan,
scan_order->iscan);
}
- if (!x->skip_encode && *eob)
+ if (*eob)
vp10_inv_txfm_add_32x32(dqcoeff, dst, dst_stride, *eob, tx_type);
break;
case TX_16X16:
pd->dequant, eob, scan_order->scan,
scan_order->iscan);
}
- if (!x->skip_encode && *eob)
+ if (*eob)
vp10_inv_txfm_add_16x16(dqcoeff, dst, dst_stride, *eob, tx_type);
break;
case TX_8X8:
pd->dequant, eob, scan_order->scan,
scan_order->iscan);
}
- if (!x->skip_encode && *eob)
+ if (*eob)
vp10_inv_txfm_add_8x8(dqcoeff, dst, dst_stride, *eob, tx_type);
break;
case TX_4X4:
scan_order->iscan);
}
- if (!x->skip_encode && *eob) {
+ if (*eob) {
// this is like vp10_short_idct4x4 but has a special case around eob<=1
// which is significant (not just an optimization) for the lossless
// case.
cm->mi_rows, cm->mi_cols);
// Do intra 16x16 prediction.
- x->skip_encode = 0;
xd->mi[0]->mbmi.mode = DC_PRED;
xd->mi[0]->mbmi.tx_size = use_dc_pred ?
(bsize >= BLOCK_16X16 ? TX_16X16 : TX_8X8) : TX_4X4;
&this_sse) >> shift;
#endif // CONFIG_VP9_HIGHBITDEPTH
*out_sse = this_sse >> shift;
-
- if (x->skip_encode && !is_inter_block(&xd->mi[0]->mbmi)) {
- // TODO(jingning): tune the model to better capture the distortion.
- int64_t p = (pd->dequant[1] * pd->dequant[1] *
- (1 << ss_txfrm_size)) >>
-#if CONFIG_VP9_HIGHBITDEPTH
- (shift + 2 + (bd - 8) * 2);
-#else
- (shift + 2);
-#endif // CONFIG_VP9_HIGHBITDEPTH
- *out_dist += (p >> 4);
- *out_sse += p;
- }
}
static int rate_block(int plane, int block, BLOCK_SIZE plane_bsize,
vp10_raster_block_offset_int16(BLOCK_8X8, block, p->src_diff);
tran_low_t *const coeff = BLOCK_OFFSET(x->plane[0].coeff, block);
xd->mi[0]->bmi[block].as_mode = mode;
- vp10_predict_intra_block(xd, 1, TX_4X4, mode,
- x->skip_encode ? src : dst,
- x->skip_encode ? src_stride : dst_stride,
+ vp10_predict_intra_block(xd, 1, TX_4X4, mode, dst, dst_stride,
dst, dst_stride, col + idx, row + idy, 0);
vpx_subtract_block(4, 4, src_diff, 8, src, src_stride, dst, dst_stride);
{}
}
- if (best_rd >= rd_thresh || x->skip_encode)
+ if (best_rd >= rd_thresh)
return best_rd;
for (idy = 0; idy < num_4x4_blocks_high * 4; ++idy)
int y_skip = 0, uv_skip = 0;
int64_t dist_y = 0, dist_uv = 0;
TX_SIZE max_uv_tx_size;
- x->skip_encode = 0;
ctx->skip = 0;
xd->mi[0]->mbmi.ref_frame[0] = INTRA_FRAME;
xd->mi[0]->mbmi.ref_frame[1] = NONE;
vp10_zero(best_mbmode);
- x->skip_encode = sf->skip_encode_frame && x->q_index < QIDX_SKIP_THRESH;
-
for (i = 0; i < SWITCHABLE_FILTER_CONTEXTS; ++i)
filter_cache[i] = INT64_MAX;
int rate2 = 0;
const int64_t distortion2 = 0;
- x->skip_encode = cpi->sf.skip_encode_frame && x->q_index < QIDX_SKIP_THRESH;
-
estimate_ref_frame_costs(cm, xd, segment_id, ref_costs_single, ref_costs_comp,
&comp_mode_p);
int internal_active_edge =
vp10_active_edge_sb(cpi, mi_row, mi_col) && vp10_internal_image_edge(cpi);
- x->skip_encode = sf->skip_encode_frame && x->q_index < QIDX_SKIP_THRESH;
memset(x->zcoeff_blk[TX_4X4], 0, 4);
vp10_zero(best_mbmode);
sf->use_square_partition_only = 1;
sf->disable_filter_search_var_thresh = 100;
sf->use_uv_intra_rd_estimate = 1;
- sf->skip_encode_sb = 1;
sf->mv.subpel_iters_per_step = 1;
sf->adaptive_rd_thresh = 4;
sf->mode_skip_start = 6;
// Turn on this to use non-RD key frame coding mode.
sf->mv.search_method = NSTEP;
sf->mv.reduce_first_step_size = 1;
- sf->skip_encode_sb = 0;
}
if (speed >= 7) {
sf->intra_uv_mode_mask[i] = INTRA_ALL;
}
sf->use_rd_breakout = 0;
- sf->skip_encode_sb = 0;
sf->use_uv_intra_rd_estimate = 0;
sf->allow_skip_recode = 0;
sf->lpf_pick = LPF_PICK_FROM_FULL_IMAGE;
// mode to be evaluated. A high value means we will be faster.
int adaptive_rd_thresh;
- // Enables skipping the reconstruction step (idct, recon) in the
- // intermediate steps assuming the last frame didn't have too many intra
- // blocks and the q is less than a threshold.
- int skip_encode_sb;
- int skip_encode_frame;
// Speed feature to allow or disallow skipping of recode at block
// level within a frame.
int allow_skip_recode;