shithub: libvpx

Download patch

ref: d0cb273e04a865b0ea1e020e1c8caffbb505e43b
parent: 3f92b7b994aceae610ef40bcf92437ca844f73d2
author: Yaowu Xu <[email protected]>
date: Fri Jun 27 11:23:02 EDT 2014

Allow encoder to set lpf level to 0

As a way to speed-up rtc encoding at speed 7.

Change-Id: Ie36a010392cf7b741dc130df21a4e733622a75b7

--- a/vp9/encoder/vp9_picklpf.c
+++ b/vp9/encoder/vp9_picklpf.c
@@ -144,7 +144,9 @@
   lf->sharpness_level = cm->frame_type == KEY_FRAME ? 0
                                                     : cpi->oxcf.sharpness;
 
-  if (method == LPF_PICK_FROM_Q) {
+  if (method == LPF_PICK_MINIMAL_LPF && lf->filter_level) {
+      lf->filter_level = 0;
+  } else if (method >= LPF_PICK_FROM_Q) {
     const int min_filter_level = 0;
     const int max_filter_level = get_max_filter_level(cpi);
     const int q = vp9_ac_quant(cm->base_qindex, 0);
--- a/vp9/encoder/vp9_speed_features.c
+++ b/vp9/encoder/vp9_speed_features.c
@@ -280,7 +280,7 @@
     sf->reuse_inter_pred_sby = 1;
   }
   if (speed >= 7) {
-    sf->disable_filter_search_var_thresh = 1000;
+    sf->lpf_pick = LPF_PICK_MINIMAL_LPF;
   }
   if (speed >= 8) {
     int i;
--- a/vp9/encoder/vp9_speed_features.h
+++ b/vp9/encoder/vp9_speed_features.h
@@ -73,6 +73,8 @@
   LPF_PICK_FROM_SUBIMAGE,
   // Estimate the level based on quantizer and frame type
   LPF_PICK_FROM_Q,
+  // Pick 0 to disable LPF if LPF was enabled last frame
+  LPF_PICK_MINIMAL_LPF
 } LPF_PICK_METHOD;
 
 typedef enum {