]> granicus.if.org Git - libvpx/commitdiff
vp9: Using source sad for speedup for dynamic resizing.
authorJerome Jiang <jianj@google.com>
Mon, 13 Mar 2017 22:27:02 +0000 (15:27 -0700)
committerJerome Jiang <jianj@google.com>
Tue, 14 Mar 2017 22:47:19 +0000 (15:47 -0700)
Only for speed >= 7.

Change-Id: I3ac85fbb4023cf7e6f8333806b345b0174382a09

vp9/encoder/vp9_encoder.c
vp9/encoder/vp9_speed_features.c

index 5f3baa77524febe985f55ce365b8546ad7b3c99b..4775088304dfe3539595015a93e791cafa5f66d8 100644 (file)
@@ -3128,9 +3128,10 @@ static void encode_without_recode_loop(VP9_COMP *cpi, size_t *size,
 #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) *
index 7b78d1d5ec53d1ce5e0356f22b9e2a6d517fff42..b97c10a0a55a6620cf3319141eeb5dd1667c759c 100644 (file)
@@ -501,9 +501,7 @@ static void set_rt_speed_feature_framesize_independent(
       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 &&