shithub: libvpx

Download patch

ref: 5ef063ed275a61afc467e4f48350e7c0f29af3c0
parent: 7a1ac4712b96db9ce48cbddfdc59d8d6adda10e6
author: Jingning Han <jingning@google.com>
date: Thu Jun 14 06:04:03 EDT 2018

Add temporal model control as a speed feature

The model construction would incur 15% slowdown for speed 2. The
speed change on speed 0 is unnoticeable.

The current speed features set up would DISABLE temporal dependency
model for all speed settings.

Change-Id: Ic45dd962f3a54a8f5f0452502dc05e352dc09ca1

--- a/vp9/encoder/vp9_speed_features.c
+++ b/vp9/encoder/vp9_speed_features.c
@@ -183,6 +183,7 @@
   }
 
   if (speed >= 1) {
+    sf->enable_tpl_model = 0;
     if (oxcf->pass == 2) {
       TWO_PASS *const twopass = &cpi->twopass;
       if ((twopass->fr_content_type == FC_GRAPHICS_ANIMATION) ||
@@ -377,6 +378,7 @@
   sf->re_encode_overshoot_rt = 0;
   sf->disable_16x16part_nonkey = 0;
   sf->disable_golden_ref = 0;
+  sf->enable_tpl_model = 0;
 
   if (speed >= 1) {
     sf->allow_txfm_domain_distortion = 1;
@@ -810,6 +812,7 @@
   sf->allow_quant_coeff_opt = sf->optimize_coefficients;
   sf->quant_opt_thresh = 99.0;
   sf->allow_acl = 1;
+  sf->enable_tpl_model = 0;
 
   for (i = 0; i < TX_SIZES; i++) {
     sf->intra_y_mode_mask[i] = INTRA_ALL;
--- a/vp9/encoder/vp9_speed_features.h
+++ b/vp9/encoder/vp9_speed_features.h
@@ -274,6 +274,9 @@
   // alternate reference frames.
   int allow_acl;
 
+  // Temporal dependency model based encoding mode optimization
+  int enable_tpl_model;
+
   // Use transform domain distortion. Use pixel domain distortion in speed 0
   // and certain situations in higher speed to improve the RD model precision.
   int allow_txfm_domain_distortion;