sf->thresh_mult[THR_COMP_SPLITLA ] += speed_multiplier * 4500;
sf->thresh_mult[THR_COMP_SPLITGA ] += speed_multiplier * 4500;
- if (speed > 4) {
+ if (cpi->sf.skip_lots_of_modes) {
for (i = 0; i < MAX_MODES; ++i)
sf->thresh_mult[i] = INT_MAX;
sf->comp_inter_joint_search_thresh = BLOCK_SIZE_AB4X4;
sf->adpative_rd_thresh = 0;
sf->use_lastframe_partitioning = 0;
+ sf->use_largest_txform = 0;
+ sf->use_8tap_always = 0;
+ sf->use_avoid_tested_higherror = 0;
+ sf->skip_lots_of_modes = 0;
+ sf->adjust_thresholds_by_speed = 0;
#if CONFIG_MULTIPLE_ARF
// Switch segmentation off.
sf->optimize_coefficients = 0;
sf->first_step = 1;
}
- if (speed == 2)
+ if (speed == 2) {
+ sf->comp_inter_joint_search_thresh = BLOCK_SIZE_SB8X8;
sf->use_lastframe_partitioning = 1;
+ sf->first_step = 0;
+ }
break;
}; /* switch */
// Set rd thresholds based on mode and speed setting
- set_rd_speed_thresholds(cpi, mode, speed);
+ if(cpi->sf.adjust_thresholds_by_speed)
+ set_rd_speed_thresholds(cpi, mode, speed);
+ else
+ set_rd_speed_thresholds(cpi, mode, 0);
// Slow quant, dct and trellis not worthwhile for first pass
// so make sure they are always turned off.
int comp_inter_joint_search_thresh;
int adpative_rd_thresh;
int use_lastframe_partitioning;
+ int use_largest_txform;
+ int use_8tap_always;
+ int use_avoid_tested_higherror;
+ int skip_lots_of_modes;
+ int adjust_thresholds_by_speed;
} SPEED_FEATURES;
enum BlockSize {
if (mbmi->ref_frame[0] > INTRA_FRAME)
vp9_subtract_sby(x, bs);
- if (cpi->speed > 4) {
+ if (cpi->sf.use_largest_txform) {
if (bs >= BLOCK_SIZE_SB32X32) {
mbmi->txfm_size = TX_32X32;
} else if (bs >= BLOCK_SIZE_MB16X16) {
(mbmi->mv[1].as_mv.col & 15) == 0;
// Search for best switchable filter by checking the variance of
// pred error irrespective of whether the filter will be used
- if (cpi->speed > 4) {
+ if (cpi->sf.use_8tap_always) {
*best_filter = EIGHTTAP;
} else {
int i, newbest;
best_txfm_rd[i] = INT64_MAX;
// Create a mask set to 1 for each frame used by a smaller resolution.
- if (cpi->speed > 0) {
+ if (cpi->sf.use_avoid_tested_higherror) {
switch (block_size) {
case BLOCK_64X64:
for (i = 0; i < 4; i++) {
frame_mv[NEWMV][ref_frame].as_int = INVALID_MV;
frame_mv[ZEROMV][ref_frame].as_int = 0;
}
- if (cpi->speed == 0
- || (cpi->speed > 0 && (ref_frame_mask & (1 << INTRA_FRAME)))) {
+ if (!cpi->sf.use_avoid_tested_higherror
+ || (cpi->sf.use_avoid_tested_higherror
+ && (ref_frame_mask & (1 << INTRA_FRAME)))) {
mbmi->mode = DC_PRED;
mbmi->ref_frame[0] = INTRA_FRAME;
for (i = 0; i <= (bsize < BLOCK_SIZE_MB16X16 ? TX_4X4 :
this_mode = vp9_mode_order[mode_index].mode;
ref_frame = vp9_mode_order[mode_index].ref_frame;
- if (cpi->speed > 0 && bsize >= BLOCK_SIZE_SB8X8) {
+ if (cpi->sf.use_avoid_tested_higherror && bsize >= BLOCK_SIZE_SB8X8) {
if (!(ref_frame_mask & (1 << ref_frame))) {
continue;
}