summaryrefslogtreecommitdiff
path: root/vp9/encoder
diff options
context:
space:
mode:
Diffstat (limited to 'vp9/encoder')
-rw-r--r--vp9/encoder/vp9_onyx_if.c17
-rw-r--r--vp9/encoder/vp9_onyx_int.h5
-rw-r--r--vp9/encoder/vp9_rdopt.c13
3 files changed, 26 insertions, 9 deletions
diff --git a/vp9/encoder/vp9_onyx_if.c b/vp9/encoder/vp9_onyx_if.c
index bcc623612..0518fadee 100644
--- a/vp9/encoder/vp9_onyx_if.c
+++ b/vp9/encoder/vp9_onyx_if.c
@@ -594,7 +594,7 @@ static void set_rd_speed_thresholds(VP9_COMP *cpi, int mode, int speed) {
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;
@@ -688,6 +688,11 @@ void vp9_set_speed_features(VP9_COMP *cpi) {
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.
@@ -715,15 +720,21 @@ void vp9_set_speed_features(VP9_COMP *cpi) {
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.
diff --git a/vp9/encoder/vp9_onyx_int.h b/vp9/encoder/vp9_onyx_int.h
index 6d09dcce9..5d55e019c 100644
--- a/vp9/encoder/vp9_onyx_int.h
+++ b/vp9/encoder/vp9_onyx_int.h
@@ -217,6 +217,11 @@ typedef struct {
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 {
diff --git a/vp9/encoder/vp9_rdopt.c b/vp9/encoder/vp9_rdopt.c
index 9cb7ab0e1..99b238f5b 100644
--- a/vp9/encoder/vp9_rdopt.c
+++ b/vp9/encoder/vp9_rdopt.c
@@ -614,7 +614,7 @@ static void super_block_yrd(VP9_COMP *cpi,
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) {
@@ -2236,7 +2236,7 @@ static int64_t handle_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
(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;
@@ -2536,7 +2536,7 @@ int64_t vp9_rd_pick_inter_mode_sb(VP9_COMP *cpi, MACROBLOCK *x,
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++) {
@@ -2576,8 +2576,9 @@ int64_t vp9_rd_pick_inter_mode_sb(VP9_COMP *cpi, MACROBLOCK *x,
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 :
@@ -2623,7 +2624,7 @@ int64_t vp9_rd_pick_inter_mode_sb(VP9_COMP *cpi, MACROBLOCK *x,
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;
}