ref: dee5782f93cf9dcbe5e7fdad1873039fc0ab8cbf
parent: 9d41313e4bd28d3c504c26079cbe4a499e7eceb7
author: Yunqing Wang <[email protected]>
date: Fri Jun 27 13:44:32 EDT 2014
Enable encode breakout in real time For real time speed 7, once encode breakout is on(i.e. encoding setting --static-thresh=1), a proper encode breakout threshold is set to speed up the encoder. Set --static-thresh=1, RTC set borg test showed a slight overall psnr loss of 0.162%, but ssim gain of 0.287%. The average speedup on RTC set is 6%, and for some clips, the speedup can be 10+%. Change-Id: Id522d9ce779ff7c699936d13d0c47083de4afb85
--- a/vp9/encoder/vp9_speed_features.c
+++ b/vp9/encoder/vp9_speed_features.c
@@ -280,6 +280,8 @@
}
if (speed >= 7) {
sf->lpf_pick = LPF_PICK_MINIMAL_LPF;
+ sf->encode_breakout_thresh = (MIN(cm->width, cm->height) >= 720) ?
+ 800 : 300;
}
if (speed >= 8) {
int i;
@@ -349,6 +351,7 @@
// to FIXED_PARTITION.
sf->always_this_block_size = BLOCK_16X16;
sf->search_type_check_frequency = 50;
+ sf->encode_breakout_thresh = 0;
// Recode loop tolerence %.
sf->recode_tolerance = 25;
@@ -392,4 +395,8 @@
if (!cpi->oxcf.frame_periodic_boost) {
sf->max_delta_qindex = 0;
}
+
+ if (cpi->encode_breakout && oxcf->mode == REALTIME &&
+ sf->encode_breakout_thresh > cpi->encode_breakout)
+ cpi->encode_breakout = sf->encode_breakout_thresh;
}
--- a/vp9/encoder/vp9_speed_features.h
+++ b/vp9/encoder/vp9_speed_features.h
@@ -357,6 +357,10 @@
// can be reused in final block encoding process. It is enabled only for real-
// time mode speed 6.
int reuse_inter_pred_sby;
+
+ // This variable sets the encode_breakout threshold. Currently, it is only
+ // enabled in real time mode.
+ int encode_breakout_thresh;
} SPEED_FEATURES;
struct VP9_COMP;