shithub: libvpx

Download patch

ref: 02463273c974a48c87992c603c944161f9507677
parent: 507204316aaaca39da9ccfa93645302be4a3fd70
author: Jerome Jiang <jianj@google.com>
date: Mon Mar 13 11:27:02 EDT 2017

vp9: Using source sad for speedup for dynamic resizing.

Only for speed >= 7.

Change-Id: I3ac85fbb4023cf7e6f8333806b345b0174382a09

--- a/vp9/encoder/vp9_encoder.c
+++ b/vp9/encoder/vp9_encoder.c
@@ -3128,9 +3128,10 @@
 #endif
   }
 
-  if (cpi->use_svc &&
-      (cpi->svc.spatial_layer_id < cpi->svc.number_spatial_layers - 1 ||
-       cpi->svc.current_superframe < 1)) {
+  if ((cpi->use_svc &&
+       (cpi->svc.spatial_layer_id < cpi->svc.number_spatial_layers - 1 ||
+        cpi->svc.current_superframe < 1)) ||
+      cpi->resize_pending || cpi->resize_state || cpi->external_resize) {
     compute_source_sad = 0;
     if (cpi->content_state_sb != NULL)
       memset(cpi->content_state_sb, 0, (cm->mi_stride >> 3) *
--- a/vp9/encoder/vp9_speed_features.c
+++ b/vp9/encoder/vp9_speed_features.c
@@ -501,9 +501,7 @@
       sf->mv.search_method = NSTEP;
       sf->mv.fullpel_search_step_param = 6;
     }
-    if (!cpi->resize_pending && !cpi->resize_state && !cpi->external_resize &&
-        cpi->oxcf.resize_mode == RESIZE_NONE)
-      sf->use_source_sad = 1;
+    if (!cpi->external_resize) sf->use_source_sad = 1;
     if (sf->use_source_sad) {
       // For SVC allocate for top layer.
       if (cpi->content_state_sb == NULL &&