summaryrefslogtreecommitdiff
path: root/vp9
diff options
context:
space:
mode:
authorYunqing Wang <yunqingwang@google.com>2014-07-01 12:18:27 -0700
committerYunqing Wang <yunqingwang@google.com>2014-07-01 14:50:39 -0700
commitf31ff029df13a415ab2eb8c2abbc212b41d5d6af (patch)
tree58280718d7f57619f90cdc0b9358ad03ceaa05c6 /vp9
parent19cbf5414394d0a45f06e25556433c0b6976aaca (diff)
downloadlibvpx-f31ff029df13a415ab2eb8c2abbc212b41d5d6af.tar
libvpx-f31ff029df13a415ab2eb8c2abbc212b41d5d6af.tar.gz
libvpx-f31ff029df13a415ab2eb8c2abbc212b41d5d6af.tar.bz2
libvpx-f31ff029df13a415ab2eb8c2abbc212b41d5d6af.zip
Elevate NEWMV mode checking threshold in real time
The current threshold is knid of low, and in many cases NEWMV mode is checked but not picked as the best mode. This patch added a speed feature to increase NEWMV threshold, so that less partition mode checking goes to check NEWMV. This feature is enabled for speed 6 and 7. Rtc set borg tests showed: 1. Speed 6, overall psnr: -0.088%, ssim: -1.339%; Average speedup on rtc set is 11.1%. 2. Speed 7, overall psnr: -0.505%, ssim: -2.320% Average speedup on rtc set is 12.9%. Change-Id: I953b849eeb6e0d5a1f13eacba30c14204472c5be
Diffstat (limited to 'vp9')
-rw-r--r--vp9/encoder/vp9_rdopt.c5
-rw-r--r--vp9/encoder/vp9_speed_features.c5
-rw-r--r--vp9/encoder/vp9_speed_features.h3
3 files changed, 13 insertions, 0 deletions
diff --git a/vp9/encoder/vp9_rdopt.c b/vp9/encoder/vp9_rdopt.c
index 0107dcdbc..e1a03a62f 100644
--- a/vp9/encoder/vp9_rdopt.c
+++ b/vp9/encoder/vp9_rdopt.c
@@ -4273,6 +4273,7 @@ int64_t vp9_rd_pick_inter_mode_sub8x8(VP9_COMP *cpi, MACROBLOCK *x,
void vp9_set_rd_speed_thresholds(VP9_COMP *cpi) {
int i;
RD_OPT *const rd = &cpi->rd;
+ SPEED_FEATURES *const sf = &cpi->sf;
// Set baseline threshold values
for (i = 0; i < MAX_MODES; ++i)
@@ -4350,6 +4351,10 @@ void vp9_set_rd_speed_thresholds(VP9_COMP *cpi) {
rd->thresh_mult[THR_COMP_NEARGA ] = INT_MAX;
rd->thresh_mult[THR_COMP_NEWGA ] = INT_MAX;
}
+
+ // Adjust threshold only in real time mode, which only use last reference
+ // frame.
+ rd->thresh_mult[THR_NEWMV] += sf->elevate_newmv_thresh;
}
void vp9_set_rd_speed_thresholds_sub8x8(VP9_COMP *cpi) {
diff --git a/vp9/encoder/vp9_speed_features.c b/vp9/encoder/vp9_speed_features.c
index 88a750276..811187057 100644
--- a/vp9/encoder/vp9_speed_features.c
+++ b/vp9/encoder/vp9_speed_features.c
@@ -277,11 +277,15 @@ static void set_rt_speed_feature(VP9_COMP *cpi, SPEED_FEATURES *sf,
// This feature is only enabled when partition search is disabled.
sf->reuse_inter_pred_sby = 1;
+
+ // Increase mode checking threshold for NEWMV.
+ sf->elevate_newmv_thresh = 2000;
}
if (speed >= 7) {
sf->lpf_pick = LPF_PICK_MINIMAL_LPF;
sf->encode_breakout_thresh = (MIN(cm->width, cm->height) >= 720) ?
800 : 300;
+ sf->elevate_newmv_thresh = 2500;
}
if (speed >= 8) {
int i;
@@ -352,6 +356,7 @@ void vp9_set_speed_features(VP9_COMP *cpi) {
sf->always_this_block_size = BLOCK_16X16;
sf->search_type_check_frequency = 50;
sf->encode_breakout_thresh = 0;
+ sf->elevate_newmv_thresh = 0;
// Recode loop tolerence %.
sf->recode_tolerance = 25;
diff --git a/vp9/encoder/vp9_speed_features.h b/vp9/encoder/vp9_speed_features.h
index e14eb404c..f6d631184 100644
--- a/vp9/encoder/vp9_speed_features.h
+++ b/vp9/encoder/vp9_speed_features.h
@@ -361,6 +361,9 @@ typedef struct SPEED_FEATURES {
// This variable sets the encode_breakout threshold. Currently, it is only
// enabled in real time mode.
int encode_breakout_thresh;
+
+ // In real time encoding, increase the threshold for NEWMV.
+ int elevate_newmv_thresh;
} SPEED_FEATURES;
struct VP9_COMP;