ref: 51c60a891e18a26e0c4a1052f61109507b20b705
parent: ca752e3320274621c1a2f38bafc33a2669f07bba
author: Yaowu Xu <[email protected]>
date: Wed Jul 16 10:28:51 EDT 2014
make default_interp_filter choice a speed feature This commit changed the hard-coded DEFAULT_INTERP_FILTER to a speed feature with the same default value: SWITCHABLE. Change-Id: I7f54f40f1bd3f5277841d04b85db7a84e47313f1
--- a/vp9/encoder/vp9_encoder.c
+++ b/vp9/encoder/vp9_encoder.c
@@ -51,8 +51,6 @@
void vp9_coef_tree_initialize();
-#define DEFAULT_INTERP_FILTER SWITCHABLE
-
#define SHARP_FILTER_QTHRESH 0 /* Q threshold for 8-tap sharp filter */
#define ALTREF_HIGH_PRECISION_MV 1 // Whether to use high precision mv
@@ -636,7 +634,7 @@
rc->worst_quality = cpi->oxcf.worst_allowed_q;
rc->best_quality = cpi->oxcf.best_allowed_q;
- cm->interp_filter = DEFAULT_INTERP_FILTER;
+ cm->interp_filter = cpi->sf.default_interp_filter;
cm->display_width = cpi->oxcf.width;
cm->display_height = cpi->oxcf.height;
@@ -2247,7 +2245,7 @@
q = vp9_rc_pick_q_and_bounds(cpi, &bottom_index, &top_index);
if (!frame_is_intra_only(cm)) {
- cm->interp_filter = DEFAULT_INTERP_FILTER;
+ cm->interp_filter = cpi->sf.default_interp_filter;
/* TODO: Decide this more intelligently */
vp9_set_high_precision_mv(cpi, q < HIGH_PRECISION_MV_QTHRESH);
}
--- a/vp9/encoder/vp9_speed_features.c
+++ b/vp9/encoder/vp9_speed_features.c
@@ -372,6 +372,7 @@
sf->elevate_newmv_thresh = 0;
// Recode loop tolerence %.
sf->recode_tolerance = 25;
+ sf->default_interp_filter = SWITCHABLE;
switch (oxcf->mode) {
case ONE_PASS_BEST:
--- a/vp9/encoder/vp9_speed_features.h
+++ b/vp9/encoder/vp9_speed_features.h
@@ -366,6 +366,9 @@
// In real time encoding, increase the threshold for NEWMV.
int elevate_newmv_thresh;
+
+ // default interp filter choice
+ INTERP_FILTER default_interp_filter;
} SPEED_FEATURES;
struct VP9_COMP;