Commit 45425f8c authored by Dmitry Kovalev's avatar Dmitry Kovalev

Removing is_best_mode() function.

Change-Id: Iccd7cec885e8aeb0e54613d888f9960c393cee0b
parent df083b26
......@@ -223,10 +223,6 @@ static INLINE int is_lossless_requested(const VP9EncoderConfig *cfg) {
return cfg->best_allowed_q == 0 && cfg->worst_allowed_q == 0;
}
static INLINE int is_best_mode(MODE mode) {
return mode == BEST;
}
typedef struct VP9_COMP {
QUANTS quants;
MACROBLOCK mb;
......
......@@ -462,7 +462,7 @@ void vp9_set_rd_speed_thresholds(VP9_COMP *cpi) {
// Set baseline threshold values.
for (i = 0; i < MAX_MODES; ++i)
rd->thresh_mult[i] = is_best_mode(cpi->oxcf.mode) ? -500 : 0;
rd->thresh_mult[i] = cpi->oxcf.mode == BEST ? -500 : 0;
rd->thresh_mult[THR_NEARESTMV] = 0;
rd->thresh_mult[THR_NEARESTG] = 0;
......@@ -548,7 +548,7 @@ void vp9_set_rd_speed_thresholds_sub8x8(VP9_COMP *cpi) {
int i;
for (i = 0; i < MAX_REFS; ++i)
rd->thresh_mult_sub8x8[i] = is_best_mode(cpi->oxcf.mode) ? -500 : 0;
rd->thresh_mult_sub8x8[i] = cpi->oxcf.mode == BEST ? -500 : 0;
rd->thresh_mult_sub8x8[THR_LAST] += 2500;
rd->thresh_mult_sub8x8[THR_GOLD] += 2500;
......
......@@ -1371,7 +1371,7 @@ static int64_t rd_pick_best_sub8x8_mode(VP9_COMP *cpi, MACROBLOCK *x,
if (best_rd < label_mv_thresh)
break;
if (!is_best_mode(cpi->oxcf.mode)) {
if (cpi->oxcf.mode != BEST) {
// use previous block's result as next block's MV predictor.
if (i > 0) {
bsi->mvp.as_int = mi->bmi[i - 1].as_mv[0].as_int;
......@@ -1413,7 +1413,7 @@ static int64_t rd_pick_best_sub8x8_mode(VP9_COMP *cpi, MACROBLOCK *x,
INT_MAX, 1);
// Should we do a full search (best quality only)
if (is_best_mode(cpi->oxcf.mode)) {
if (cpi->oxcf.mode == BEST) {
int_mv *const best_mv = &mi->bmi[i].as_mv[0];
/* Check if mvp_full is within the range. */
clamp_mv(&mvp_full, x->mv_col_min, x->mv_col_max,
......
......@@ -408,16 +408,14 @@ void vp9_set_speed_features(VP9_COMP *cpi) {
sf->default_interp_filter = SWITCHABLE;
sf->tx_size_search_breakout = 0;
if (oxcf->mode == REALTIME) {
if (oxcf->mode == REALTIME)
set_rt_speed_feature(cpi, sf, oxcf->speed, oxcf->content);
} else {
if (!is_best_mode(oxcf->mode))
set_good_speed_feature(cpi, cm, sf, oxcf->speed);
}
else if (oxcf->mode == GOOD)
set_good_speed_feature(cpi, cm, sf, oxcf->speed);
cpi->full_search_sad = vp9_full_search_sad;
cpi->diamond_search_sad = is_best_mode(oxcf->mode) ? vp9_full_range_search
: vp9_diamond_search_sad;
cpi->diamond_search_sad = oxcf->mode == BEST ? vp9_full_range_search
: vp9_diamond_search_sad;
cpi->refining_search_sad = vp9_refining_search_sad;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment