]> granicus.if.org Git - libvpx/commitdiff
Allow encoder to set lpf level to 0
authorYaowu Xu <yaowu@google.com>
Fri, 27 Jun 2014 22:23:02 +0000 (15:23 -0700)
committerYaowu Xu <yaowu@google.com>
Fri, 27 Jun 2014 22:23:41 +0000 (15:23 -0700)
As a way to speed-up rtc encoding at speed 7.

Change-Id: Ie36a010392cf7b741dc130df21a4e733622a75b7

vp9/encoder/vp9_picklpf.c
vp9/encoder/vp9_speed_features.c
vp9/encoder/vp9_speed_features.h

index 53284656e3b910d53ac78197bf5f49a2b2b87023..0f363a7c340948a1f7c1b7375b7f57a58fbc4314 100644 (file)
@@ -144,7 +144,9 @@ void vp9_pick_filter_level(const YV12_BUFFER_CONFIG *sd, VP9_COMP *cpi,
   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);
index 7c8e337430605460bff5d6d064537e5eddfc8930..cf60c8f1c845a1e447bb88dc2110f912f1191f8d 100644 (file)
@@ -280,7 +280,7 @@ static void set_rt_speed_feature(VP9_COMP *cpi, SPEED_FEATURES *sf,
     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;
index 75070a70fd69d7db75382ec41d70c545f03da4ce..5160633ff7896aca246b32861d0768582feda2b3 100644 (file)
@@ -73,6 +73,8 @@ typedef enum {
   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 {